From nobody Tue Apr 18 09:51:31 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 4Q0zhk4vV6z44qxh for ; Tue, 18 Apr 2023 09:51:34 +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 4Q0zhk43pDz3FqP for ; Tue, 18 Apr 2023 09:51:34 +0000 (UTC) (envelope-from zirias@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681811494; 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=cbMkZU/BSVSE56kuSNcPypM/meCUIuMLa7/l7HNOWrM=; b=jESULEg3qGk2wCialDPwpjUvJvYMcPRsvvg80dQ7mRQitTbNsl6aoOw4gx6hp1BlABtxK7 0ZktF/9xY11WyJ4M3YsTD+u7Hz4chWq8NuvyguZQDKve+mEVJNexKd5IofUaFMoJ/CULpZ iXiSRI8BD3sSEUO15cqzc28zYO041eRR9fr9oB7nnEcZzCI7uKRBcC24sJLheUcG0IhgQF W3gEc8FrdSo4pO/al1o1XAqqoVrjfd6fMSRZiRlgRhuxXqBrMTy3ehjLf1iil6xay8gjpz 7Nhj8J1GRkAOHjuUYKGewm157s6qM4a0MtFmlS/CIwnu4V8zIYohMnrnGoGcrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681811494; 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=cbMkZU/BSVSE56kuSNcPypM/meCUIuMLa7/l7HNOWrM=; b=up22sWW/+i7/ozaeQIxuyXJhJeIsTGU0aYK2kshzmJOHXSJTCbHvBQtCRUkCI0Sya1VP+W 3Y9bY2sPiRLoeDrYJ5dFVYFizSwyQetSUYp4KdVs7MMKesoFatUOIky2hKt4GFr1gV2uh4 1zUli+7hR430Yo/afWm5nwMt4rn1Qo/SGYWjiKMOQxO+NQ6syTG+oBUGAesI6NmJto7O2e 25nQYpzEcqrppaaEDYgxJ6IY8YkxSWVKrhOA10rf1hSc1FCWHsZtwRydjBNUgDRf4kCp4/ VOvfDSsReA4xzeHBs2V3OyU0N49u/qoyv7x2v/ahcUJjHRbYJXkbYzqpU/DELg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681811494; a=rsa-sha256; cv=none; b=a+iVrH8LFT9D4amvxY8O0eIOu+ex22z+LCr53yv5Sel448pyCdEWlTs+BeXtQDXdtJR6Xb 4K7CDu8eTJleuwjiLJI8UwpHmLBBp/0wqDQgEIWG5enZrm6GEzNS7jl64S5rgON2LwpUaq aiksSlfiRAFZwkVPzNcQjTg3Z4yyd497kMQlfJe/Q8mI7P/2RCvHS6Z74VbD2/anoha9Y1 M27X37VVeXJs3NLk6l3HzPDSxNHgsTZcCagDb9YoZyTPhjV/vKHaeww637nmHnzfym+rqT W+9A3YLydjjq+mCV5T1TO27Jp432VVIJ/cb3oZzj0PKBgad1IyFlG7s2HrKgWA== 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 4Q0zhk32qzz11CX for ; Tue, 18 Apr 2023 09:51:34 +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=cbMkZU/BSVSE56kuSNcPypM/meCUIuMLa7/l7HNOWrM=; b=NXzOyFe/X07DsQFsny344EeMp3 zrVLkRjpk502LuQcZX/T4RwI9BNn0qPdeZ6NDT0bB7buFHDOoxN68scAVMyn/n0rdrR6+ISmhoj1z IVTOQS4Y2V2oIS4CX4hiBmafZHANKQTGEszKI9+1GQaJkSUrIs4bhorfoXxdRs2cdazyrOjDworLt sRl+CtZy0xgAepE37gw8Z3eR7WYYqxgqdqGrjNL9hJMhxop93oVxiSWggIp1/M+ZMg25m1afSAS/X hp/9MdLdcKGzfyjW2AZhaG9VYqnDjCWcPHoJmXFd+pogvK8E9sm/WFsEFzQDYi5dUKl1xB5IJzeI0 /FaDR4ow==; 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 1pohzp-005O9J-7f for ports@freebsd.org; Tue, 18 Apr 2023 11:51:33 +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 1pohzo-000G2g-1o for ports@freebsd.org; Tue, 18 Apr 2023 09:51:32 +0000 Date: Tue, 18 Apr 2023 11:51:31 +0200 From: Felix Palmen To: ports@freebsd.org Subject: Re: Get ${OSREL} at install time Message-ID: 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="a242t6x5zr7bnig2" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230322 X-ThisMailContainsUnwantedMimeParts: N --a242t6x5zr7bnig2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Eugene Grosbein [20230418 16:41]: > 18.04.2023 16:34, Felix Palmen wrote: >=20 > > * Eugene Grosbein [20230418 16:26]: > >> 18.04.2023 15:05, Nuno Teixeira wrote: > >>> Any sugestion or example that permits to get OSREL at install time? > >> > >> # osrel=3D$(sysctl -n kern.osrelease) > >=20 > > Obtaining the information from the running kernel has the drawback of > > possibly giving wrong results with pkg -c / pkg -r (installing in an > > alternative root, e.g. a jail or boot environment). > >=20 > > Therefore, parsing /etc/os-release should be preferred. >=20 > Even better, we have freebsd-version -u Actually not better but older ;) IIRC, /etc/os-release was only introduced in 13. But then, it's probably "better" just as long as 12 is still supported... With lua scripts, you can't even use freebsd-version because execution is very restricted for them in pkg. And for some features (like e.g. dynamically creating a pkg-message output), you need lua... --=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 --a242t6x5zr7bnig2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iNUEABYKAH0WIQRpNhPVW79IN7ISOsxUreAGmHnyMQUCZD5oI18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0Njkz NjEzRDU1QkJGNDgzN0IyMTIzQUNDNTRBREUwMDY5ODc5RjIzMQAKCRBUreAGmHny MXd6AQDTTqgmzFBxS+xmYgYzigsFL6i62qPFLWLjk6lefit3XQD/WxuiI2u2rydR DgOQSOXWy4GqJc829t/W18WytOnIqgE= =vV0O -----END PGP SIGNATURE----- --a242t6x5zr7bnig2--