From nobody Tue Apr 18 11:48:04 2023 X-Original-To: ports@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 4Q12HF0xgyz44yjR for ; Tue, 18 Apr 2023 11:48:09 +0000 (UTC) (envelope-from zirias@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q12HD6tpTz3P28 for ; Tue, 18 Apr 2023 11:48:08 +0000 (UTC) (envelope-from zirias@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681818489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qkCrxegkwpxnC4Erh0NIojgrzxC7e4FQ+70/9+l18So=; b=bbjLHlMNS26SstMVOKdulWR55li/C+zN1LF20pVglcl/xwxYk88NR9atLPn6Av1eStubbO 4PBstR5iLDsnF6lGNfUzOPcxQ1n4XCnDyF1J00qKTcAb7pX/2+De3Xk/Y6LrKJPQkCK/hs 3kPNwuac7D8Q0jHTvo2Bf3paFB3Ltz6TXi801E4SuU2MNSj3cve4Wy1KfUODntU0gkhb2F VkKY6Jdu+TCgVrZfmQ51+e5QnWwnFAHhTmHWRdk4tb5wyfdxtnvX0jHF54i2NKu+VIjn4E 8N/rG5PZN5deq2aIrEzcE88UYUMj0nAKHYZ8gpucHf8cCPHnC6pIS7yE8YaDhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681818489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qkCrxegkwpxnC4Erh0NIojgrzxC7e4FQ+70/9+l18So=; b=mMD2KYqtjtiFsrZKLwm3YGeq+tNWM9Uv9YilUvJDBtRQSoimbjrqMfhogdivEy6iuph4ss 7DaVYfPtVnB7jd4SDvuCg9WOZnoEKD90YAixQraOVgfU8degpQgBxgDxQ7zPU89ZrvUlS1 IcfQQ7opZzm44THlOmPspnEhJzrxQp5VuJstcMuNcTTDTeDixoxpcMnzxWUry4+j/9+hhf wqAMF7pDV0w1G3BR83B16DO3KqZqGJOBwbE37tKA3gMdCo5o0BQFyYZSGNMKOHt6UXGoHm d3q3U5mXc/Oe1JkenUZn1DkGZYqskbrjfHU6m+ctrdPreRtjoUvAHYpWJUYjqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681818489; a=rsa-sha256; cv=none; b=FQV+VS1RVSKGONrJOR6IByv14lw6aGuEwRvJrzOI0tVevzN5EJNRjcM8jQu22L4+eUa85/ xGLi+TIN52ltA+x8/h2/t0fnbQwM0QoVizH8K1YdceAKMej525WETy0U6mSwiUl5bBDQhk 7LuzuOie3m0zXMvITIm8PPXdxQA+tLVmk/4qmbJQWktG7mUFoB8Ay9hYgfwnjBSoN3Fi/g qRue/Ql8oJwhujR2jzqfC/y6elc0+hllcoAY29EmB4zBvHzHNjnee1n4KqaMUiCdV26MFF caIjCaQr5/Np2gxCzdxKwxReSyWAI5Q0F5qpeIZ1obv1dIGIo5E+TfUjbEFSfw== Received: from stef.palmen-it.de (stef.palmen-it.de [IPv6:2001:470:1f0b:bbb:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: zirias/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q12HD5s5Sz12nZ for ; Tue, 18 Apr 2023 11:48:08 +0000 (UTC) (envelope-from zirias@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=palmen-it.de; s=20200414; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qkCrxegkwpxnC4Erh0NIojgrzxC7e4FQ+70/9+l18So=; b=I3R+yi32BObegUVhMxd8TaL6Bs sXMz2rZbDv4r1Z4D/z/BELomxHYn46sqvFktmGbIcCP19v52r5diq+joJsQDRClQF1pjrU6ZzTf1Z +9XCmGTCTg2ySX/w/fEjNKAuvhTU3mJbG3+51g+yGeh08COR4WkFrRTUgyUkMnnaUV+JMRz360XUe XcPZRWLACiCtuDTYxvZ0uWlv8HF+FCDRWi+syolqLyebaYYSA2SS0bmcsv+wYFyXT1C10j+ZnM3QB PMOUKu40i8D0GsGgXKGdFOoI2yVBAecYehx4m+sq0rUBATz1s7Qf5/HdphnZfLmr2Z9t/q5s+/Y2b vb/XwqaA==; Received: from [192.168.71.101] (helo=mail.home.palmen-it.de) by stef.palmen-it.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pojob-005OfA-RT for ports@freebsd.org; Tue, 18 Apr 2023 13:48:05 +0200 Received: from nexus.home.palmen-it.de ([192.168.99.2]) by mail.home.palmen-it.de with esmtpsa (TLS1.3) tls TLS_CHACHA20_POLY1305_SHA256 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pojob-0002VJ-BK for ports@freebsd.org; Tue, 18 Apr 2023 11:48:05 +0000 Date: Tue, 18 Apr 2023 13:48:04 +0200 From: Felix Palmen To: ports@freebsd.org Subject: Re: Get ${OSREL} at install time Message-ID: <3gizlmiaz2h3qwk6xe64iik42vr6mtxyex4d2hjaymazz5nngt@3wm6jdrdxslm> X-Face: /1K@t"h.}e~pR@]c7HorQ!T`F^RJCa'BCr#e>IKA{>C/9OTGB4|xh"y2{?1Z5M i2w"AH^pN_LlHR^{+f',_Np~;.B;!M/bL}*qk]p5*r7F5vW};{:@4u5S?T&f0$7BJ-71Q5SV]:v$`5 A0[DZ:=?S52x8HJ~5@^P_\T@MsjG{R( Organization: FreeBSD.org References: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bmhvz72sfqmq4ujt" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230322 X-ThisMailContainsUnwantedMimeParts: N --bmhvz72sfqmq4ujt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Nuno Teixeira [20230418 12:38]: > @postexec env osrel=3D$(freebsd-version -u) sed -E -e > "s,stable/[0-9]+,stable/${osrel%%.*}," -e > "s,releng/[0-9]+,releng/${osrel%%-*}," %%PREFIX%%/etc/gitup.conf This can't work because the shell will expand ${osrel%%...} before executing this whole command (and then, it's still unset). As a workaround, you could explicitly start another shell, e.g. like | env osrel=3D$([...]) /bin/sh -c 'sed -e "s,foo,${osrel%%-*}," [...]' But this is getting *really* messy, so I'd personally opt for the explicit post-install script. BTW, another thing might be a bit problematic here: Calling freebsd-version like this will work when pkg is used with -c (using chroot), but most likely not with -r. --=20 Felix Palmen {private} felix@palmen-it.de -- ports committer (mentee) -- {web} http://palmen-it.de {pgp public key} http://palmen-it.de/pub.txt {pgp fingerprint} 6936 13D5 5BBF 4837 B212 3ACC 54AD E006 9879 F231 --bmhvz72sfqmq4ujt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iNUEABYKAH0WIQRpNhPVW79IN7ISOsxUreAGmHnyMQUCZD6DdF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0Njkz NjEzRDU1QkJGNDgzN0IyMTIzQUNDNTRBREUwMDY5ODc5RjIzMQAKCRBUreAGmHny MU77AP9E3lUc4NIAoTTUrbWJyze2AKku9aeBsAILGKYbRwiNxgD/Yb11ZTejUEpA /kTekDshfs+c/YTcAYABSBUhppLPJw8= =4zuc -----END PGP SIGNATURE----- --bmhvz72sfqmq4ujt--