NetBSD-Bugs archive

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

bin/57674: Making pkgsrc packages fails within chroot jail on an ext2 partition



>Number:         57674
>Category:       bin
>Synopsis:       Making pkgsrc packages fails within chroot jail on an ext2 partition
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 24 10:05:00 +0000 2023
>Originator:     John Dover
>Release:        10.0_BETA | pkgsrc-current | 2023-10-24
>Organization:
>Environment:
System: NetBSD 10.0_BETA (GENERIC) #0: Sun Oct 8 15:24:41 UTC 2023 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: amd64
Machine: amd64
>Description:
Making pkgsrc packages within a chroot jail fails when done on a mounted ext2 partition.

Making in the same way (following the same commands) on either the main NetBSD partition or a separate mounted ffsv2 partition works as expected.

--

Obvious issues appear during the 'make configure' stage of the pkgtools/cwrappers package (or rather the libnbcompat dependency).

First, a number or errors / unusual output is output almost immediately:

 | ./configure: sh: not found
 | ./configure: sh: not found
 | eval: as_var+=2: not found
 | a
 | /
 | ./configure: /bin/uname: not found
 | ./configure: /bin/arch: not found
 | ./configure: /usr/bin/arch: not found
 | ./configure: /usr/convex/getsysinfo: not found
 | ./configure: /usr/bin/hostinfo: not found
 | ./configure: /bin/machine: not found
 | ./configure: /usr/bin/oslevel: not found
 | ./configure: /bin/universe: not found
 | sparc-sun-sunos4.1.1

Then the operation continues, up to where it would normally create the 'config.status' & 'Makefile' files, at which point it fail (pauses with no further output). Last line displayed is:

 | checking if vsnprintf is standards compliant... yes
>How-To-Repeat:
1) Prepare a ext2 partition (I used gparted from a Linux OS)

2) Install or download mksandbox
 - Install via pkg_add, pkgin, pkgsrc, etc.
 or
 - Download shell script directly like below (only executing script, no make require):
 - $ cd /tmp
 - $ cvs -q -z2 -d anoncvs%anoncvs.netbsd.org@localhost:/cvsroot checkout pkgsrc/pkgtools/mksandbox/files/mksandbox

3) Mount ext2 partition in NetBSD, and create jail directory
 - # mkdir /mnt/ext
 - # mount -t ext2fs /dev/dk(*) mnt/ext

4) Execute mksandbox via installed version, or from downloaded file
 - # mksandbox --without-x --without-pkgsrc --without-src --without-xsrc mnt/ext/jail
 or
 - # /tmp/pkgsrc/pkgtools/mksandbox/files/mksandbox --without-x --without-pkgsrc --without-src --without-xsrc mnt/ext/jail

5) Enter created chroot jail
 - # mnt/ext/jail/sandbox

6) From within the chroot jail, download a copy of the pkgsrc tree
 - ## cd /tmp
 - ## ftp https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc.tar.gz
 - ## tar -xzf pkgsrc.tar.gz -C /usr
 or
 - ## cd /usr
 - ## cvs -q -z2 -d anoncvs%anoncvs.netbsd.org@localhost:/cvsroot checkout pkgsrc

7) Make a package -> it is the cwrappers (or rather the libnbcompat dependency) configure that fails, so it is easy to just 'make configure' there
 - ## cd /usr/pkgsrc/pkgtools/cwrappers
 - ## make configure
>Fix:
Unsure - my current approach is to build pkgsrc on a ffsv2 partition.



Home | Main Index | Thread Index | Old Index