poudriere jail creation/update problem

26 views
Skip to first unread message

Balazs Toth

unread,
Apr 21, 2022, 1:19:14 PMApr 21
to HardenedBSD Users
Hi,

I would like to ask for some help, I can not create (first I tried the update and had the same issue), a jail for building package with poudriere anymore.
I did work before, but today I run a hbsd-update and upgraded the packages, and now just does not work.
Maybe I dumb but I do not what is the file that can not find (I see the error is cp can not find something).
Would be nice if somebody could help to figure this out. See command and output below

Balazs

poudriere jail -c -v STABLE -p local -m src=/usr/src -j myhbsd13


[00:00:00] Creating myhbsd13 fs at /poudriere/jails/jails/myhbsd13... done

[00:00:00] Copying /usr/src to /poudriere/jails/jails/myhbsd13/usr/src... done

[00:00:39] Starting make installworld

--- installworld ---

make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at moon.zettasystem.com on Thu Apr 21 14:33:35 CEST 2022

--- _installcheck_world ---

--------------------------------------------------------------

>>> Install check world

--------------------------------------------------------------

--- installworld ---

mkdir -p /tmp/install.g2U2yyM3

progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp  date echo egrep find grep id install   ln make mkdir mtree mv pwd_mkdb  rm sed services_mkdb sh sort strip sysctl test true uname wc  zic tzsetup  makewhatis; do  if progpath=`env PATH=/usr/obj/usr/src/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/sbin:/bin:/usr/sbin:/usr/bin which $prog`; then  echo $progpath;  else  echo "Required tool $prog not found in PATH ($PATH)." >&2;  exit 1;  fi;  done);  if [ -z "" ] ; then  libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u |  while read line; do  $line;  if [ "$2 $3" != "not found" ]; then  echo $2;  else  echo "Required library $1 not found." >&2;  exit 1;  fi;  done);  fi;  cp $libs $progs /tmp/install.g2U2yyM3

cp: [vdso]: No such file or directory

*** [installworld] Error code 1


make[1]: stopped in /usr/src

1 error


make[1]: stopped in /usr/src


make: stopped in /usr/src

[00:00:40] Error: Failed to 'make installworld'

[00:00:40] Error while creating jail, cleaning up.

[00:00:40] Removing myhbsd13 jail... done

[00:00:41] Cleaning myhbsd13 data... done


Shawn Webb

unread,
Apr 22, 2022, 9:10:24 AMApr 22
to Balazs Toth, HardenedBSD Users
Did you buildworld before trying to run `poudriere jail`?

Thanks,

--
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc
signature.asc

Balazs Toth

unread,
Apr 22, 2022, 10:12:20 AMApr 22
to Shawn Webb, HardenedBSD Users
Yes, I did run it... same issue (I did not delete the /usr/obj just run the buildworld)

> On 22 Apr 2022, at 15:10, Shawn Webb <shawn...@hardenedbsd.org> wrote:
> <signature.asc>

Balazs Toth

unread,
May 3, 2022, 5:34:20 PMMay 3
to HardenedBSD Users, Balazs Toth, HardenedBSD Users, Shawn Webb

Any ideas, what could be the problem or how to fix it?


the end of the buildworld

--------------------------------------------------------------

>>> World build completed on Tue May  3 22:00:50 CEST 2022

>>> World built in 4384 seconds, ncpu: 6, make -j6


and the same problem

poudriere jail -c -v STABLE -p local -m src=/usr/src -j myhbsd13

[00:00:00] Creating myhbsd13 fs at /poudriere/jails/jails/myhbsd13... done

[00:00:00] Copying /usr/src to /poudriere/jails/jails/myhbsd13/usr/src... done

[00:00:42] Starting make installworld

--- installworld ---

make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at moon.zettasystem.com on Tue May  3 21:10:49 CEST 2022

--- _installcheck_world ---

--------------------------------------------------------------

>>> Install check world

--------------------------------------------------------------

--- installworld ---

mkdir -p /tmp/install.xeTAfNzz

progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp  date echo egrep find grep id install   ln make mkdir mtree mv pwd_mkdb  rm sed services_mkdb sh sort strip sysctl test true uname wc  zic tzsetup  makewhatis; do  if progpath=`env PATH=/usr/obj/usr/src/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/sbin:/bin:/usr/sbin:/usr/bin which $prog`; then  echo $progpath;  else  echo "Required tool $prog not found in PATH ($PATH)." >&2;  exit 1;  fi;  done);  if [ -z "" ] ; then  libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u |  while read line; do  $line;  if [ "$2 $3" != "not found" ]; then  echo $2;  else  echo "Required library $1 not found." >&2;  exit 1;  fi;  done);  fi;  cp $libs $progs /tmp/install.xeTAfNzz

cp: [vdso]: No such file or directory

*** [installworld] Error code 1


make[1]: stopped in /usr/src

1 error


make[1]: stopped in /usr/src


make: stopped in /usr/src

[00:00:43] Error: Failed to 'make installworld'

[00:00:43] Error while creating jail, cleaning up.

[00:00:43] Removing myhbsd13 jail... done

[00:00:44] Cleaning myhbsd13 data... done


Shawn Webb

unread,
May 3, 2022, 5:37:06 PMMay 3
to Balazs Toth, HardenedBSD Users
Do you have a custom src.conf or make.conf?
signature.asc

Balazs Toth

unread,
May 10, 2022, 4:47:43 PMMay 10
to Shawn Webb, HardenedBSD Users
Hi,

Thanks for picking it up, I do not have (or least I am not aware), I checked and I do not see those files

root@moon ➜  src git:(1b8f98e0dc4) find / -name src.conf
root@moon ➜  src git:(1b8f98e0dc4) find / -name make.conf
/usr/share/examples/etc/make.conf
/usr/src/share/examples/etc/make.conf
root@moon ➜  src git:(1b8f98e0dc4) pwd      
/usr/src
root@moon ➜  src git:(1b8f98e0dc4) git status
HEAD detached at 1b8f98e0dc4
nothing to commit, working tree clean

-------------------------------------------------

root@moon:~ # poudriere jail -c -v STABLE -p local -m src=/usr/src -j myhbsd13
[00:00:00] Creating myhbsd13 fs at /poudriere/jails/jails/myhbsd13... done
[00:00:00] Copying /usr/src to /poudriere/jails/jails/myhbsd13/usr/src... done
[00:00:21] Starting make installworld
--- installworld ---
make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at moon.zettasystem.com on Tue May  3 21:10:49 CEST 2022
--- _installcheck_world ---
--------------------------------------------------------------
>>> Install check world
--------------------------------------------------------------
--- installworld ---
mkdir -p /tmp/install.Y71qMJJc
progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp  date echo egrep find grep id install   ln make mkdir mtree mv pwd_mkdb  rm sed services_mkdb sh sort strip sysctl test true uname wc  zic tzsetup  makewhatis; do  if progpath=`env PATH=/usr/obj/usr/src/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/sbin:/bin:/usr/sbin:/usr/bin which $prog`; then  echo $progpath;  else  echo "Required tool $prog not found in PATH ($PATH)." >&2;  exit 1;  fi;  done);  if [ -z "" ] ; then  libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u |  while read line; do  $line;  if [ "$2 $3" != "not found" ]; then  echo $2;  else  echo "Required library $1 not found." >&2;  exit 1;  fi;  done);  fi;  cp $libs $progs /tmp/install.Y71qMJJc
cp: [vdso]: No such file or directory
*** [installworld] Error code 1

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src

make: stopped in /usr/src
[00:00:22] Error: Failed to 'make installworld'
[00:00:22] Error while creating jail, cleaning up.
[00:00:22] Removing myhbsd13 jail... done
[00:00:23] Cleaning myhbsd13 data... done

--------------------------------------------------------------------------

If I run the problematic statement from bash shell, I see it is complaining about some stuff not found (vdso is there that is complain the cp above)

[root@moon ~]# progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp  date echo egrep find grep id install   ln make mkdir mtree mv pwd_mkdb  rm sed services_mkdb sh sort strip sysctl test true uname wc  zic tzsetup  makewhatis; do  if progpath=`env PATH=/usr/obj/usr/src/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/sbin:/bin:/usr/sbin:/usr/bin which $prog`; then  echo $progpath;  else  echo "Required tool $prog not found in PATH ($PATH)." >&2;  exit 1;  fi;  done);  if [ -z "" ] ; then  libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u |  while read line; do  $line;  if [ "$2 $3" != "not found" ]; then  echo $2;  else  echo "Required library $1 not found." >&2;  exit 1;  fi;  done);  fi;  echo "cp $libs $progs /tmp/install.Y71qMJJc"
bash: [preloaded]: command not found
bash: [vdso]: command not found
bash: libc.so.7: command not found
bash: libcap_fileargs.so.1: command not found
bash: libcasper.so.1: command not found
bash: libdialog.so.9: command not found
bash: libedit.so.8: command not found
bash: libelf.so.2: command not found
bash: libexecinfo.so.1: command not found
bash: libgcc_s.so.1: command not found
bash: libm.so.5: command not found
bash: libmd.so.6: command not found
bash: libncursesw.so.9: command not found
bash: libnv.so.0: command not found
bash: libregex.so.1: command not found
bash: librt.so.1: command not found
bash: libthr.so.3: command not found
bash: libutil.so.9: command not found
bash: libxo.so.0: command not found
cp  /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/[
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/awk
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/cap_mkdb
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/cat
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/chflags
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/chmod
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/chown
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/cmp
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/cp
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/date
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/echo
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/egrep
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/find
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/grep
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/id
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/install
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/ln
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/make
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/mkdir
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/mtree
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/mv
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/pwd_mkdb
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/rm
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/sed
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/services_mkdb
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/sh
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/sort
/usr/obj/usr/src/amd64.amd64/tmp/usr/bin/strip
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/sysctl
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/test
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/true
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/uname
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/wc
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/zic
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/tzsetup
/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin/makewhatis /tmp/install.Y71qMJJc


Balazs

Balazs Toth

unread,
May 20, 2022, 12:56:29 AMMay 20
to Shawn Webb, HardenedBSD Users
Hi,

I found the problem, the ldd returns the preloaded libs, so the [vdso] get into the list to copy, here is a solution to fix it (/usr/src/Makefile.inc1)

--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1293,6 +1293,7 @@ __installcheck_UGID: .PHONY
     (empty(DESTDIR) || ${DESTDIR} == "/") && empty(BYPASS_INSTALLCHECK_SH)
 _installcheck_world: __installcheck_sh_check
 __installcheck_sh_check: .PHONY
+       @echo "MIVAN?"
        @if [ "`${OBJTOP}/rescue/rescue/rescue sh -c 'echo OK'`" != \
            OK ]; then \
                echo "rescue/sh check failed, installation aborted" >&2; \
@@ -1359,7 +1360,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
                fi; \
            done); \
        if [ -z "${CROSSBUILD_HOST}" ] ; then \
-               libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \
+               libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | grep -v "^\\[.*\\]$$" | \
                    while read line; do \
                        set -- $$line; \
                        if [ "$$2 $$3" != "not found" ]; then \
@@ -1370,6 +1371,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
                        fi; \
                    done); \
        fi; \
+       echo "cp $$libs $$progs ${INSTALLTMP}"
        cp $$libs $$progs ${INSTALLTMP}
        cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
 .if defined(NO_ROOT)


On 2022. May 3., at 23:37, Shawn Webb <shawn...@hardenedbsd.org> wrote:

Shawn Webb

unread,
May 20, 2022, 12:40:07 PMMay 20
to Balazs Toth, HardenedBSD Users
Thanks for figuring that out! I just barely ran into the same exact
issue building 13-STABLE from a 14-CURRENT host. Since this stems from
upstream FreeBSD, I'll work with them to get your patch worked
upstream. In the meantime, I'll go ahead and adopt your patch on our
end.

The one question I have is: is that `@echo "MIVAN?"` line required? Or
is that just for debugging?
signature.asc

Balazs Toth

unread,
May 20, 2022, 1:43:57 PMMay 20
to Shawn Webb, HardenedBSD Users
Hi,

No :))) that os not required, I forgot to remove, sorry

Balazs

> On 20 May 2022, at 18:40, Shawn Webb <shawn...@hardenedbsd.org> wrote:
>
> Thanks for figuring that out! I just barely ran into the same exact
> <signature.asc>
Reply all
Reply to author
Forward
0 new messages