Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 May 2021 17:12:15 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Tatsuki Makino <tatsuki_makino@hotmail.com>
Cc:        FreeBSD ports <freebsd-ports@freebsd.org>, bob prohaska <fbsd@www.zefox.net>
Subject:   Re: Python 37/38 conflict, was Re: Trubles compiling lxqt on RPi4
Message-ID:  <D7353698-C1AA-484D-9FC8-046531D6372C@yahoo.com>
In-Reply-To: <PSAPR03MB563905B1A1DE546C271DAAABFA2E9@PSAPR03MB5639.apcprd03.prod.outlook.com>
References:  <0B407A98-E0D4-461E-BFD8-E02019E96757.ref@yahoo.com> <0B407A98-E0D4-461E-BFD8-E02019E96757@yahoo.com> <20210515233735.GA58311@www.zefox.net> <A43A154A-FB52-45DB-B3BB-DE1740128B14@yahoo.com> <PSAPR03MB56398C972736997CEF823487FA2E9@PSAPR03MB5639.apcprd03.prod.outlook.com> <52D036B7-D66D-417D-8C75-7868C9FEFE6A@yahoo.com> <PSAPR03MB563905B1A1DE546C271DAAABFA2E9@PSAPR03MB5639.apcprd03.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-May-16, at 15:33, Tatsuki Makino <tatsuki_makino at hotmail.com> =
wrote:

> Mark Millard wrote on 2021/05/16 17:11:
>> On 2021-May-16, at 00:16, Tatsuki Makino <tatsuki_makino at =
hotmail.com> wrote:
>>=20
>>> poudriere jail -c -j main -m 'src=3D/usr/src' -v `make -C =
/usr/src/release/ -V VERSION VERSION=3D\$\{REVISION:Q\}-\$\{BRANCH:Q\}`
>>>=20
>> Bob already does a buildworld based on /usr/src for other
>> reasons/uses than poudriere. My suggestions are targeted
>> to resusing that buildworld result instead of involving
>> doing another buildworld for poudriere. It is also biased
>> to not changing how he does that buildworld (out of scope
>> to what he was asking about). So far as I know he does
>> not use /usr/src/release to do builds. Bob's system is
>> not fast, each buildworld is time consuming.

I will note that in my context I use MAKEOBJDIRPREFIX=3D
to use unusual paths instead of the default /usr/obj/
paths. (I'll not get into why I choose to do this.)

Such need not be a problem for Bob's environment and I've
avoided telling Bob about my odd conventions or otherwise
involving them.

>> Would your command suggestion reuse his already-existing
>> buildworld?
>>=20
>=20
> The /usr/src/release that appeared here is just to create a version =
string.
> `make -C /usr/src/release/ -V VERSION =
VERSION=3D\$\{REVISION:Q\}-\$\{BRANCH:Q\}` will create a string exactly =
like 12.2-STABLE, no matter when /usr/src is.

Sounds good.

>> In my own use the same is true: I buildworld separately
>> before any poudriere activity (for other reasons/uses)
>> and then I reuse the buildworld that resulted for
>> also setting up poudriere later.
>>=20
>=20
> This one of mine is also a reuse of built world.
> The main idea of my buildworld, buildkernel, installkernel, and =
installworld is as follows. (There are some commands mixed in that =
cannot be executed directly.)
>=20
> rm -rf -- /usr/obj/{*,.[^.]*,..?*}

I use WITH_META_MODE=3Dyes and only clear out prior builds
as-needed/on-occasion.

> git -C /usr/src/ pull && git -C /usr/src/ reset --hard && git -C =
/usr/src/ clean -dfx
> cat somepatches*.diff | patch -Nt -d /usr/src/

I was avoiding getting into Bob's buildworld
installworld details. I have some minor differences
in how I operate for the above sorts of things.
(I've actually explored more than one style
with git involved, two still in use.)

> cd /usr/src/
> make buildworld && make buildkernel
> mergemaster -p

Since git, I use etcupdate instead of merge master.

> make installkernel

Sometimes a shutdown -r now is required here
because the new world would not work with the
old kernel that is still live. On rare powerpc64
or powerpc updates I've had to installworld
and shutdown -r now first (announced/documented
at the time).

> make installworld
> make delete-old delete-old-libs

Doing delete-old-libs before installing updated
ports can break things: existing installed ports
might fail to work. Some configurations might
not be able to avoid having such a port's use
attempted before updates can be made. I do
the delete-old-libs later when such might be an
issue in my context.

I normally use BATCH_DELETE_OLD_FILES=3Dyes with
the delete-old*'s.

> mergemaster

Again, since git, I use etcupdate instead of merge
master.

> reboot

I use "shutdown -r now" instead. "man reboot" reports:

QUOTE
     Normally, the shutdown(8) utility is used when the system needs to =
be
     halted or restarted, giving users advance warning of their =
impending doom
     and cleanly terminating specific programs.
END QUOTE

In my context it is only the "cleanly terminating
specific programs" part that leads to my making the
distinction. I've not explored the details.

Past this point in your sequence is not a type of
sequence that I've used.

> poudriere jail -u -j main    # -j name is matched to above command.
> poudriere's jail -u will take care of everything from installworld to =
the /etc installation.
> For poudriere-jail, buildworld will not run without -b option.

Good to know.

> A copy of /usr/src for jail will be made, but it is required to retain =
the original source files for jail.

No such /usr/src copy is made with my sequence: /usr/src is
null mounted instead and used in the port builds that need
/usr/src/ access. Bob had indicated wanting to avoid extra
storage use that was unnecessary.

For my style of use, I'm not aware of any need for the older
/usr/src/ files in the jail at any point after updating
/usr/src/ . The same seemed to apply for Bob's context.

> And just to make things a little more interesting...
> The jail can be started with the following command.
> poudriere jail -s -j main -p default
> This jail will be logged in with the following command.
> jexec main-default-n env -i "TERM=3D$TERM" /usr/bin/login -f -p root
> This is where you can debug, etc. in a mostly clean environment.

I've only used -i to get in the session at the end of a
bulk build. Someday I may experiment with the above sort
of sequence. Thanks for the notes.

> If you break that environment too much, you can use the following =
command to get it back to normal.
> poudriere jail -k -j main -p default

Good to know.

> # Regardless of which person's method is more efficient, I am =
releasing my method in a similar topic area to let people know that =
there are different types of methods.

Thanks for all the notes!

Relative to Bob's activity, he had already reported poudriere as
complicated to become familiar with for his purposes. So I was
avoiding suggesting alternatives for him to initially explore,
as well as avoiding covering other areas where I know he has an
already existing pattern of operation (buildworld, installworld,
etc.). Less to learn all at once. Bob had mentioned avoiding
necessarily using significant extra storage and such as well.

I did not intend to indicate that the alternative presented
was the unique most-efficient style of use, even for Bob's
context. I just tried to address his concerns to give an
initial context to start with, reusing what he already does
that is related. If he finds it sufficiently appropriate to
his context, he may well explore alternatives usage styles.
Hopefully I got close enough to matching his context for
him to make the go/no-go judgments about poudriere use from
trying it --without having to explore poudriere's many
alternative configuration possibilities first.

> Any jails other than -m null will be cleanly removed by poudriere jail =
-d, so try different ones :)



I forgot to warn Bob of:

QUOTE
     Be careful to respect the names supported by jail(8):

           This is an arbitrary string that identifies a jail (except it
           may not contain a '.').
END QUOTE


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D7353698-C1AA-484D-9FC8-046531D6372C>