poudriere, FLAVOR and rebuilding for python3.6

Bjarne bjb at darco.dk
Wed Sep 12 04:42:23 UTC 2018


Mailtrouble - hopefully this is not duplicated.


Thanks for your response


On 10-09-2018 08:11, Matthew Seaman wrote:
> On 09/09/2018 19:34, Bjarne wrote:
>> I have been using python 2.7 so far for all ports, which means all
>> python packages  are built as py27-something. These python packages are
>> all automaticcaly build as dependencies from other packages, for example
>> like py27-dnspython which is a requirement of mailman.
>>
>> Now I am trying to change to python36, but can't get the py36 packages
>> to build. In the transition period,  I would like to simultaneously have:
>> py27-something
>> py36-something
>>
>>
>> In make.conf for the jail I set:
>> DEFAULT_VERSIONS+= python=3.6 python=2.7
> This does not do what you're expecting, and will be equivalent to just
> 'python=2.7'
OK, I see. I saw this in an old post, hence the test.
>> I would expect a new "poudriere bulk" command would build all
>> py36-something for me, but no, got nothing.
>> No packages where build.
>>
>>
>> I added the follwing to  poudriere.conf:
>> FLAVOR_DEFAULT_ALL=yes
>> Still without any luck.
>>
>> I can of course specify that I want to build for example dnspython and
>> then poudriere builds py36-dnspython, but that means I will have to go
>> through all dependencies by hand.
>>
>> So what am I supposed to do.
> OK, there are two ways of handling this.
>
> Firstly you can specify a package as:
>
>     some/port at all
>
> in the list of packages you feed to poudriere.  I think you can use that
> on a package which is not itself flavoured, and the effect is inherited
> by flavoured dependencies, but you'll need to experiment.  If you do
> this explicitly for python ports it will result in building both
> python-2.7 and python-3.6 versions.
That seems to work .  At the same time I get all php7 and php56 packages. I did not foresee that. 
That is the next update project.

setting FLAVOR_DEFAULT_ALL=yes  in poudriere.conf has the same effect, without adding @all   to the 
port names.

> Secondly you can build your packages with one default setting, and then
> do an incremental bulk using the other default setting, which should
> result in you ending up with both flavours in your repository.
> Something like:
>
>    # echo 'DEFAULT_VERSIONS+= python=3.6' >
> /usr/local/etc/poudriere.d/python36-make.conf
>    # poudriere bulk -c -f /usr/local/etc/poudriere.d/my-ports
>    # poudriere bulk -z python36 -f  /usr/local/etc/poudriere.d/my-ports
Interesting - i was not aware of sets, thanks for pointing that out to me.
However, This seems to  result in an extra repository containing ALL packages with the new options:

    00:00:01] [Dry Run] Mounting system devices for freebsd_11-2-HEAD-python27
    [00:00:01] [Dry Run] Mounting ports/packages/distfiles
    [00:00:01] [Dry Run] Stashing existing package repository
    [00:00:01] [Dry Run] Mounting packages from:
    /tank/poudriere/data/packages/freebsd_11-2-HEAD-python27
    [00:00:01] [Dry Run] Copying /var/db/ports from:
    /usr/local/etc/poudriere.d/freebsd_11-2-HEAD-options
    [00:00:01] [Dry Run] Appending to make.conf: /usr/local/etc/poudriere.d/freebsd_11-2-make.conf
    [00:00:01] [Dry Run] Appending to make.conf:
    /usr/local/etc/poudriere.d/freebsd_11-2-python27-make.conf
    /etc/resolv.conf -> /tank/poudriere/data/.m/freebsd_11-2-HEAD-python27/ref/etc/resolv.conf
    [00:00:01] [Dry Run] Starting jail freebsd_11-2-HEAD-python27
    [00:00:01] [Dry Run] Logs:
    /tank/poudriere/data/logs/bulk/freebsd_11-2-HEAD-python27/2018-09-10_17h51m05s
    [00:00:01] [Dry Run] WWW:
    xxxxxxxxxxxxxx/build.html?mastername=freebsd_11-2-HEAD-python27&build=2018-09-10_17h51m05s
    [00:00:01] [Dry Run] Loading MOVED for
    /tank/poudriere/data/.m/freebsd_11-2-HEAD-python27/ref/usr/ports
    [00:00:02] [Dry Run] Ports supports: FLAVORS SELECTED_OPTIONS
    [00:00:02] [Dry Run] Gathering ports metadata
    [00:00:04] [Dry Run] Calculating ports order and dependencies
    [00:00:05] [Dry Run] pkg package missing, skipping sanity
    [00:00:05] [Dry Run] Skipping incremental rebuild and repository sanity checks
    [00:00:05] [Dry Run] Cleaning the build queue
    [00:00:05] [Dry Run] Sanity checking build queue
    [00:00:05] [Dry Run] Processing PRIORITY_BOOST
    [00:00:05] [Dry Run] Balancing pool
    [00:00:05] [Dry Run] Dry run mode, cleaning up and exiting
    [00:00:05] [Dry Run] Would build 340 packages using 5 builders

I was kind of hoping i could end with one repository, containing both py27 and py36, but maybe this 
is better for some projects.

> :snip
>
> However, your example of trying to treat the mail/mailman port in this
> way is unfortunately doomed to failure, as mailman is specifically
> restricted to python-2.7 only.
oh bummer - I missed that. Decision time for the future of mailman....


Ok, in my case, I think adding FLAVOR_DEFAULT_ALL=yes to poudriere.conf seems to be the way to go. 
That will give me acces to all versions from the same repository and i can work my way through the 
different servers to update python and php packages.

Python and php -  what a lovely couple!


Thanks a lot for your input, that actually helped me understand poudriere a little better.



> 	Cheers,
>
> 	Matthew
>

-- 
mvh,
Bjarne



More information about the freebsd-ports mailing list