pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Setting up a pbulk build environment




Sounds like you set up pbulk outside the chroot.� There's nothing to stop you from doing this (I don't use a chroot on OS X, because it's not so trivial to create a pristine OS X env like I do for CentOS and NetBSD - I just use an old Mac with no extra software installed).

On https://wiki.netbsd.org/tutorials/pkgsrc/pbulk/, the useradd and pbulk.sh run are done in the chroot.

I played with these instructions for a while and decided to work at a lower level so I'd have more direct control and a better understanding.

If you want to understand the process more clearly, I would suggest going to https://netbsd.org/~bacon/Pbulk/index.html and studying the pbulk-* scripts there.

pbulk-new-chroot is run on the host and uses a tarball of a (hopefully pristine) CentOS or NetBSD installation.� I create the tarballs in a virtualbox guest, but the instructions there will work on a bare metal installation or any other VM.

pbulk-start-chroot enters the chroot env with minimal pollution from the host (null-mounts only the bare necessities).

pbulk-setup is then run inside the chroot.

On 10/2/18 6:25 PM, Robert Nestor wrote:
Thanks Jason!  I forged ahead and did the user add in the host system, so it shows up there and in the chroot environment.  I deduced that the pbulk.sh script needed to be run in the host system and did that as well.  So it appears I have the environment set up.

However, in the Wiki tutorial is says in the �Running the build� section to invoke the bulk build from the chroot with the command /usr/pbulk/bin/bulkbuild.   This script doesn�t exist in the chroot environment in that path.  It does exist in that path in the host environment though.

So how is the /usr/pbulk/bin/bulkbuild script run from the chroot environment as described in the Wiki?

-bob

On Oct 2, 2018, at 1:15 PM, Jason Bacon <outpaddling%yahoo.com@localhost> wrote:

On 10/2/18 11:12 AM, Robert Nestor wrote:
I�m trying to set up a pbulk build environment on a NetBSD system to build packages for an older version of NetBSD.  Trying to follow the guide in the Wiki but I�m confused about a couple of the steps in the section of �Prepare the pbulk environment�.

The first step in this section directs one to chroot into the newly created and mounted sandbox using the sandbox script.  I assume the remaining steps in this section are done in the chroot environment, but that�s where things get confusing.

Is the user add done in the chroot environment?  Doing that produces an non-fatal error that the user is being created with no home directory though.  Should a /home be created in the chroot filesystem?  Should a �-m� be added to the user add command here?  Or is the user add done outside of the chroot environment, or does it not really matter, i.e. ignore the error and create the user in either filesystem space?

After creating the mk.conf.frag file the following step class for deploying and configuring the pbulk tools by executing the pbulk.sh script.  If this is done in the chroot filesystem the file isn�t found since pkgsrc is mounted on /tree/pkgsrc, not /usr/pkgsrc.  And deeper into this script is another hard reference to /usr/pkgsrc which also can�t be found.  So is this deploy step executed in the chroot filesystem?

I�m assuming the resolution to these setup issues is that the commands are not to be executed inside the chroot filesystem.  Can someone confirm that?  And if that�s the case, shouldn�t the Wiki guide reflect that the first step is just to verify that one can enter the sandbox and how it�s done, but that the remaining steps should be executed outside the sandbox?

Thanks,
-bob
I have some documentation here:

https://uwm.edu/hpc/software-management/
https://netbsd.org/~bacon/Pbulk/index.html

Take a look at the scripts themselves for details on the process.

Regards,

��� JB



Home | Main Index | Thread Index | Old Index