Date: Wed, 26 Oct 2022 13:40:17 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 267364] "make install" target does not fail if dependency "fake-pkg" fails Message-ID: <bug-267364-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267364 Bug ID: 267364 Summary: "make install" target does not fail if dependency "fake-pkg" fails Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: garga@FreeBSD.org Reporter: michael.osipov@siemens.com Assignee: garga@FreeBSD.org Flags: maintainer-feedback?(garga@FreeBSD.org) This can be reproduced on 12-STABLE and 13-STABLE. Consider the following correct behavior with pkg (prod host): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D root@deblndw011x:~ # uname -a FreeBSD deblndw011x.ad001.siemens.net 12.3-STABLE FreeBSD 12.3-STABLE 53bc9= be1c GENERIC amd64 root@deblndw011x:~ # pkg upgrade git Updating ldadw-base repository catalogue... ldadw-base repository is up to date. All repositories are up to date. pkg: websvn-php74 has a missing dependency: php74-pear-Text_Diff Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: git: 2.37.3 -> 2.38.1_1 Number of packages to be upgraded: 1 The process will require 3 MiB more space. Proceed with this action? [y/N]: y [1/1] Upgrading git from 2.37.3 to 2.38.1_1... =3D=3D=3D> Creating groups. Using existing group 'git_daemon'. =3D=3D=3D> Creating users Creating user 'git_daemon' with uid '964'. pw: uid `964' has already been allocated pkg: PRE-INSTALL script failed root@deblndw011x:~ # echo $? 3 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D "pkg upgrade" fails here since the create users pre-install scripts fails. = The reason is that my passwd uses NIS with "+:*:::::" where, for historical reasons, the regular users have been created with id below 1000. (This I ca= n't change for the moment, but simply depicts the bug): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # id 964 uid=3D964(krenek_k) gid=3D121(cad) groups=3D121(cad),305(svn5) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D So pkg does the right here, it spawns the "sh -c .." process and this line fails: "${PW} useradd git_daemon -u 964 -g 964 -c "git daemon" -d /nonexistent -s /usr/sbin/nologin" (checked libpkg and pkg source) Now when running in the ports dir "make -d A install" gives me: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ... 221452 + /usr/bin/env 'PORTSDIR=3D/usr/ports' 'FORCE_POST=3D' /usr/local/sbin/pkg-static register -i /usr/ports/devel/git/work-default/st= age -m /usr/ports/devel/git/work-default/.metadir -f /usr/ports/devel/git/work-default/.PLIST.mktmp 221453 Installing git-2.38.1_1... 221454 =3D=3D=3D> Creating groups. 221455 Using existing group 'git_daemon'. 221456 =3D=3D=3D> Creating users 221457 Creating user 'git_daemon' with uid '964'. 221458 pw: uid `964' has already been allocated 221459 pkg-static: PRE-INSTALL script failed 221460 If you installed the GITWEB option please follow these instructions: ... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Internally "fake-pkg" is invoked by "install" target. The exit code is igno= red from pkg-static, but pkg-static does properly fail (test host): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D root@deblndw013x1v:/usr/ports/devel/git # uname -a FreeBSD deblndw013x1v.ad001.siemens.net 13.1-STABLE FreeBSD 13.1-STABLE #16 ebaebf5b0: Sat Sep 17 10:55:01 CEST 2022=20=20=20=20 root@deblndw013x1v.ad001.siemens.net:/usr/obj/usr/src/amd64.amd64/sys/GENER= IC amd64 root@deblndw013x1v:/usr/ports/devel/git # /usr/local/sbin/pkg-static register -i /usr/ports/devel/git/work-default/stage -m /usr/ports/devel/git/work-default/.metadir -f /usr/ports/devel/git/work-default/.PLIST.mktmp root@deblndw013x1v:/usr/ports/devel/git # echo $? 1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Surprisingly when "make fake-pkg" is invoked manually it does properly fail: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D root@deblndw013x1v:/usr/ports/devel/git # make create-manifest root@deblndw013x1v:/usr/ports/devel/git # make fake-pkg =3D=3D=3D> Registering installation for git-2.38.1_1 *** Error code 1 Stop. make: stopped in /usr/ports/devel/git =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D with "-d A": =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Result of ${.MAKE.EXPORTED:u} is "LANG LC_ALL META_MODE" + /usr/bin/env 'PORTSDIR=3D/usr/ports' 'FORCE_POST=3D' /usr/local/sbin/pkg-= static register -i /usr/ports/devel/git/work-default/stage -m /usr/ports/devel/git/work-default/.metadir -f /usr/ports/devel/git/work-default/.PLIST.mktmp *** Failed target: fake-pkg *** Failed command: /usr/bin/env PORTSDIR=3D/usr/ports FORCE_POST=3D"" /usr/local/sbin/pkg-static register -i /usr/ports/devel/git/work-default/st= age -m /usr/ports/devel/git/work-default/.metadir -f /usr/ports/devel/git/work-default/.PLIST.mktmp *** Error code 1 HashTable targets: size=3D128 numEntries=3D198 maxchain=3D5 HashTable Global variables: size=3D512 numEntries=3D1487 maxchain=3D9 Stop. make: stopped in /usr/ports/devel/git Global: .ERROR_TARGET =3D fake-pkg Global:delete .ERROR_CMD (not found) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D While I don't understand fully why it fails, I am certain that the issue is= in "bsd.port.mk" lines 5321 to 5372 where the ${INSTALL_COOKIE} depends on fake-pkg, but the build does not fail. While I can work around this issue by adding the user manually, but this depicts that there is clearly a bug in the framework. fake-pkg is supplied = by _INSTALL_SUSEQ. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267364-7788>