From nobody Mon Sep 12 21:42:45 2022 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MRKnx4lRRz4cPcq for ; Mon, 12 Sep 2022 21:42:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MRKnx3bQsz3m9M for ; Mon, 12 Sep 2022 21:42:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MRKnx2h1Jz16mW for ; Mon, 12 Sep 2022 21:42:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 28CLgjD0015399 for ; Mon, 12 Sep 2022 21:42:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28CLgjsI015398 for ports-bugs@FreeBSD.org; Mon, 12 Sep 2022 21:42:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 206951] create-users-groups built a script that failed, but the failure was undetected Date: Mon, 12 Sep 2022 21:42:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jcfyecrayz@liamekaens.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663018965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yhXSU9FAGbn9zI4tcb8vR5LjyahbPcFAuPAvNEFB0vE=; b=psFGZXVIZpxIdNR6k3r7BWYbYrTIel/YoqI8BnA2dUfsHy2+8GeQAFaERVMdVB3phBUieC 2C9iFiYy7/B0KwoLULqTcpBIPIu+Wg/VWygw+7j+MIVTjLMdSI9HoSbWc9M0ApTFgghol9 9A40RiNMH7nhq1TmopE7PvNGbSNWyux8+FydbSa6Dt3sfkX1d2U70JT1nPhkE0+yc7GnmI azoOm2/BSxmUQWHftBubI4TKhjnNkRzyCzQuY2J11wqSMfOQEikIDbOM+k35yJT9stcNl/ QftPfOiNCTpVTHzq+QH8S/039mERCFdTgNNm4UFtcKBkJoYkaBYE+rl/d4nLDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663018965; a=rsa-sha256; cv=none; b=CFeWemoqW+TpfV4lF9z/q1qVl1+FPqDiZsaXWsR3sGRqg7CC/NA2pN3lfxfMJjFSTCctle 0Inxx8qNjZ3PuxiCxYIfjtVUp1dXH5zfX8lst/vak1m1tMD7rKPqzRAdgB3xcjYUd3q/g1 ATyu2WKZdddc4vJkfxhxZpnuEVPGtIgyC+Jr/fqndWNAalo1trLNsEjGtwc+MHRBw9lr32 4W0ZQSUjFlNB+O0yguKUS9ce1nItT/9OuBh0clme6Yv7B39ECigdZtjMg6oMJeFX9Nry0w hSolVGE0mPtG0afXs7NKKeXwlPfbqKSom/h4cGFcbAK7ETK731QwbgsJKWIihQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206951 --- Comment #3 from John Hein --- I tried adding '|| exit 1' in /Mk/Scripts/do-users-groups.sh : --- a/Mk/Scripts/do-users-groups.sh +++ b/Mk/Scripts/do-users-groups.sh @@ -76,7 +76,7 @@ if [ -n "${GROUPS}" ]; then cat >> "${dp_UG_INSTALL}" <<-eot2 if ! \${PW} groupshow $group >/dev/null 2>&1; then echo "Creating group '$group' with gid '$gid'." - \${PW} groupadd $group -g $gid + \${PW} groupadd $group -g $gid || exit 1 else echo "Using existing group '$group'." fi @@ -129,7 +129,7 @@ if [ -n "${USERS}" ]; then cat >> "${dp_UG_INSTALL}" <<-eot2 if ! \${PW} usershow $login >/dev/null 2>&1; then echo "Creating user '$login' with uid '$uid'." - \${PW} useradd $login -u $uid -g $gid $class -c "$gecos" -d $homedir -s $shell + \${PW} useradd $login -u $uid -g $gid $class -c "$gecos" -d $homedir -s $shell || exit 1 else echo "Using existing user '$login'." fi That makes the pre-install script fail, which makes 'pkg add' fail, which is good. However, 'make install' is not failing. It seems that 'pkg register' does = not care if the PRE-INSTALL script fails, but I have not confirmed that. If so, that could be part two of fixing this bug. I (or someone) will have to look into what 'pkg register' is doing - does it ignore the exit code of the PRE-INSTALL script, and if so, why? --=20 You are receiving this mail because: You are on the CC list for the bug.=