From nobody Tue Apr 18 09:25:52 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 4Q0z7K3xxKz44pC3; Tue, 18 Apr 2023 09:26:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4Q0z7K2zrqz3n7W; Tue, 18 Apr 2023 09:26:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681809965; 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=oNa60aff1cYROiXaSLyP0dT4cvDE1J7dkChhfwpVuUg=; b=IdWWlPKQhfJ6qkeTkPjNrR7dPCFlgtX5mEN3p7VHBhguw2JCgy6GchJfFefQVlyDYHFwYB Y7UEGxpwxtfbrY0ED46Gp8+jIODjmOMJcj2ZkHTYH/Tvj3XKf5gSLemccLvXvuOZ+fqFZV FOmLhkoaqAgfKYZ4FZ7403sjPAiBkIraHB6D0Fld17MJ970IFr1ruZjn87I5bF8ioBCHdY 08yFjkg5aL6PYRJzz20NYoRGFHegirwQVkhltCmEZCdgznr9LwGP9zlaiMjRj0oAQRcIPx uOxvjK/oWzQvH+Q3ggwQ1eSrfCX520h6I53mbb7S0mnuyNUGz4CIY6yrGFntfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681809965; 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=oNa60aff1cYROiXaSLyP0dT4cvDE1J7dkChhfwpVuUg=; b=BEwJr9XUhkRXb6Eq8/PyJ86Xzl43UvslwBfzh/hjHpaDpoQW1JBP1/07q4cOrYwfw9jJv7 gsSQHnu9/sR/i4cAsUbeQI3/c3IGhWdHgDJ0g2Hyu926WiyLXDBMFNei/NNjde31CcytfB a6FrzcoyrCbhiD9s+B5k2FTSebq5fqvhIFkl90ebfP5f8h4Zq8lQHuvF9dMA1ktYOOu71C 98bbOJvjbOhwiSxwPuhmJYayQ5ddMHaintvzFoF6tvum/IE4UPEsAnKdFXQ8w8b9JxvOW0 nFjz73xNMgNSLBSYByTLMkvxmsraDL5Gl2MpghC6SoZ6WeARWGbXUeYDTFOAZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681809965; a=rsa-sha256; cv=none; b=vyqfpL9GZKpv1ivAJsixaFlpz2/J/2FI5F0ZhuyLBfmAPBY/s5h315qjr42s1Y4J9dwXlM g1sjuHbMNy3oyTTv5YdCGkM7ZIc7JdZK9jOW6zIh9Dj9kQI10SRdlPRkj4cYxyV2nIMfas xWjao73cE8pifm4EoBsHRi9OSPszQvmbnvu0kAHA7uWNJQEQHs0WvNuuB8+h/1wd9kafQ5 Pd9yQqoY6UhiXGxEIWyOnVq2cegCBDwtZYU58ggmPKPv3H5+02YK3UauhVDzMFFtwNATcE Y7o/L9CDCh/ZhbuhePaZPv5ulcYkEA02RkDmR7lowDKbSBh5YWSljgDGq12ccA== Received: from mail-vs1-f43.google.com (mail-vs1-f43.google.com [209.85.217.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q0z7K1LJ3z110G; Tue, 18 Apr 2023 09:26:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vs1-f43.google.com with SMTP id cu36so222919vsb.3; Tue, 18 Apr 2023 02:26:05 -0700 (PDT) X-Gm-Message-State: AAQBX9eBDIW6iu16FKgvXkk3YzZwF3qWc4ayaFMO19rsWtBSFyMaSL9b /n3uAqYQ1ZARJ77O5XEs7AgVRzfin5R4jmkCoKI= X-Google-Smtp-Source: AKy350bwGH11C3JNpcGH7CCSHeIuYLgW8ntafBm0DDhU3Um43SwhlE6IGdcGmH9z1Lk/MTDLTuoSTrJX148bhKQLLqg= X-Received: by 2002:a05:6102:23c3:b0:42e:3337:508b with SMTP id x3-20020a05610223c300b0042e3337508bmr10019802vsr.7.1681809964153; Tue, 18 Apr 2023 02:26:04 -0700 (PDT) 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 References: In-Reply-To: From: Nuno Teixeira Date: Tue, 18 Apr 2023 10:25:52 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Get ${OSREL} at install time To: ports@freebsd.org, FreeBSD Mailing List Content-Type: multipart/alternative; boundary="0000000000007e40d705f998e5a8" X-ThisMailContainsUnwantedMimeParts: N --0000000000007e40d705f998e5a8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Just found a port using pkg-post-install in sh: sysutils/nut/pkg-post-install --- #!/bin/sh - pw groupmod -n dialer -m nut --- I can do egrep version from /etc/os-release and sed to setup gitup.conf here. I will do some tests and when it works I will publish it here for sugestions/corrections. Thanks all! Felix Palmen escreveu no dia ter=C3=A7a, 18/04/2023 = =C3=A0(s) 09:52: > * Nuno Teixeira [20230418 09:05]: > > Any sugestion or example that permits to get OSREL at install time? > > Not really OSREL, but when I needed to know the FreeBSD version at > install time, this is what I did: > > > https://cgit.freebsd.org/ports/tree/security/unix-selfauth-helper/pkg-pos= t-install.lua > > It's not exactly nice, just parsing the version manually... > > -- > 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 > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000007e40d705f998e5a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Just found a port using pkg-post-install in sh:

sysutils/nut/pkg-post-install
---
#!/bin/sh -

pw groupmod -n dialer -m nut
---
=
I can do egrep version from /etc/os-release and sed to setup= gitup.conf here.

I will do some tests and when it= works I will publish it here for sugestions/corrections.

Thanks all!

Felix Palmen <zirias@freebsd.org> escreveu no dia ter=C3=A7a, 18/04/2023= =C3=A0(s) 09:52:
eduardo@freebsd.org> [20230418 09:05]:
> Any sugestion or example that permits to get OSREL at install time?
Not really OSREL, but when I needed to know the FreeBSD version at
install time, this is what I did:

https://cgit.f= reebsd.org/ports/tree/security/unix-selfauth-helper/pkg-post-install.lua

It's not exactly nice, just parsing the version manually...

--
=C2=A0Felix Palmen <zirias@FreeBSD.org>=C2=A0 =C2=A0 =C2=A0{private}= =C2=A0 =C2=A0
felix@= palmen-it.de
=C2=A0-- ports committer (mentee) --=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 {web}=C2=A0 http://palmen-it.de
=C2=A0{pgp public key}=C2=A0 http://palmen-it.de/pub.txt
=C2=A0{pgp fingerprint} 6936 13D5 5BBF 4837 B212=C2=A0 3ACC 54AD E006 9879 = F231


--
Nuno Teixeira
FreeBSD Committ= er (ports)
--0000000000007e40d705f998e5a8--