From nobody Tue Apr 18 11:28:44 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 4Q11s55vKYz44xlC for ; Tue, 18 Apr 2023 11:28:57 +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 4Q11s46t4xz433h; Tue, 18 Apr 2023 11:28:56 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681817337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wfTyyT9JGsao/npWXDbQv2sBPbRqdBe7yQ2ebdT2Yac=; b=Vb5cDtY7+4vfo2O812zu89xVP/ovcOR7JsZZjbkEdW/noSa2FH+geSxv5837sREiHQa0El AOWatZ2GREKLdHuYkYY1YOPch+K+kJSOWY4+AnF/T2lFE6rZ1lAh/YbW10HzJrLp4BzCK8 41TCe7t7/c3zyiXBRhscdUHL8VLSDGHmyLylEmCB+hqXh+tirmJyI6uuMjWBgzRricQVve Pn5O7JxWDQQ6vi7zxg+K0i3KzGcj8m0Z6HpOLZi7M/SEfnQakFtflVCw3bW+3XejZH72nS C8/rPJu998cEmhcf/AJ278erDnjuy60wy7pEKI+njqyYeMGz5pRftA+abZobIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681817337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wfTyyT9JGsao/npWXDbQv2sBPbRqdBe7yQ2ebdT2Yac=; b=pYe8OGwPliGI4EvpZ1SiKmSmwEFsM5urQ115Dvnto5EWd3FxGscULdscUZbyHEaE9VRz1w x+sLDqdZLwjeENQ3ZVBfKcNBWAX5ex3OXM0rAvZsxzA3l1ttDbSrOZX1X6/4yQ+sNkJygR jZETKz+n4UtK4ez5SK1GtnPjXLzFrsoiDdgnLXTT+uJ43ZQ0zMXhnayeTjWkjRpQhCy1NW +T0nSydrRFC9/xXwOOsCu0kXGPpMoI8wY3uItneAoC7tagFe0FryE3Mkgc7Wv5NNwZi1m/ hL1Unhljh4EaQb2+sh7f2nXzJHv0ALuCmk1Fc76ObARO19+wntL+C0Vt/U1MlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681817337; a=rsa-sha256; cv=none; b=Lz6r8KD6vKESpP+4DXmN+I71ErhbcQUOpZbCrx/x9vfvVdaRJx3k26JDA/meLOQxT/ovAX bb5Lt9K6EplCG9oH7jauI7yz1VkAXrAg9c4S0/ARNEvDOP0YQ6ipHZj1w7d+FcQGbK+MUW 6zpCHxiiU+Vtd8ycaNJ9wXUG+iJr2gRIeE0d/xDCyu+XZlcC7keYUGChEEuIBvwPAyxSNb maDSXwcuMmeQJfYlQnyQ0MF+nJ6MDpX/baThnbiz5+9PZUe9ksHJPp8XR/Flc38Hj8HJUW f+cic4GR5N5AxmI18PNr5yD7lg1pt86sEAjIvfoZWNl+RpRWXRTsMLiiL5wyOw== Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) (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 4Q11s45qrnz132l; Tue, 18 Apr 2023 11:28:56 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-ua1-f51.google.com with SMTP id y21so10036494ual.3; Tue, 18 Apr 2023 04:28:56 -0700 (PDT) X-Gm-Message-State: AAQBX9f6poDjzhZXDS6rilyLrWvjuzowXTDlIPdXa7gBqLNFRo9plz+e i2ZH2Pn828JkSMAWmSh28h27olFQWw30KGN9Y3M= X-Google-Smtp-Source: AKy350YfNPppe2TCocrlS+zW0cW6hXSbvUtNNe6fEgs0XWIGy9vaRBK/PsmZxo9hzNn5Fu5oKmFdgv5ZYcc65JWE1dw= X-Received: by 2002:ab0:5b57:0:b0:771:f808:74e0 with SMTP id v23-20020ab05b57000000b00771f80874e0mr11649818uae.0.1681817336371; Tue, 18 Apr 2023 04:28:56 -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 12:28:44 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Get ${OSREL} at install time To: Felix Palmen Cc: ports@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e9605705f99a9c9c" X-ThisMailContainsUnwantedMimeParts: N --000000000000e9605705f99a9c9c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable pkg-plist: @postexec env osrel=3D$(freebsd-version -u) sed -E -e "s|stable\/12|stable\/${osrel%%.*}|" -e "s|releng\/11.4|releng\/${osrel%%-*}|" %%PREFIX%%/etc/gitup.conf result: --- "branch" : "releng/", "branch" : "stable/", --- For sure I'm doing something wrong with syntax. Nuno Teixeira escreveu no dia ter=C3=A7a, 18/04/2023 = =C3=A0(s) 12:02: > Fixed! > > (on 13.2-RELEASE) > > gitup.conf: > --- > "release" : { > "repository_path" : "/src.git", > "branch" : "releng/13.2", > "target_directory" : "/usr/src", > "ignores" : [ > "sys/[^\/]+/conf", > ], > }, > > "stable" : { > "repository_path" : "/src.git", > "branch" : "stable/13", > "target_directory" : "/usr/src", > "ignores" : [ > "sys/[^\/]+/conf", > --- > > Nice! I have now a working pkg-post-install. > Need to have a pkg-plist method working too so it can be discussed the > best method to use. > > Felix Palmen escreveu no dia ter=C3=A7a, 18/04/2023 = =C3=A0(s) > 11:58: > >> * Nuno Teixeira [20230418 11:55]: >> > sed -E -e 's|stable\/12|stable\/${stable}|' -e >> [...] >> > sed doesn't subtitute as it uses literal variables >> >> The shell doesn't subsitute variables inside single quotes. Try double >> quotes instead. >> >> -- >> 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 >> > > > -- > Nuno Teixeira > FreeBSD Committer (ports) > --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000e9605705f99a9c9c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
pkg-plist:
@postexec env osrel=3D$(free= bsd-version -u) sed -E -e "s|stable\/12|stable\/${osrel%%.*}|" -e= "s|releng\/11.4|releng\/${osrel%%-*}|" %%PREFIX%%/etc/gitup.conf=

result:
---
"branch"= ; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : "releng/",
"= ;branch" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : "stable/",
---

For sure I'm doing something wrong = with syntax.

Nuno Teixeira <eduardo@freebsd.org> escreveu no dia ter=C3=A7a, 18/04/2023 =C3= =A0(s) 12:02:
Fixed!

(on 13.2-RELEASE)
=

gitup.conf:
---
"release&q= uot; : {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "r= epository_path" =C2=A0: "/src.git",
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "branch" =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 : "releng/13.2",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 "target_directory" : "/usr/src"= ;,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "ignores= " =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: [
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "sys/[^\/]+/c= onf",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ],=C2=A0 =C2=A0 =C2=A0 =C2=A0 },

=C2=A0 =C2=A0 =C2=A0 =C2=A0 "st= able" : {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &= quot;repository_path" =C2=A0: "/src.git",
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "branch" =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 : "stable/13",
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "target_directory" : "/usr/s= rc",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "= ignores" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: [
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "sys/[= ^\/]+/conf",
---

Nice! I have now a= working pkg-post-install.
Need to have a pkg-plist method workin= g too so it can be discussed the best method to use.

Felix Palmen = <zirias@freebsd.= org> escreveu no dia ter=C3=A7a, 18/04/2023 =C3=A0(s) 11:58:
* Nuno Teixeira <eduardo@freebsd.org> [20230418 11:55]:
> sed -E -e 's|stable\/12|stable\/${stable}|' -e
[...]
> sed doesn't subtitute as it uses literal variables

The shell doesn't subsitute variables inside single quotes. Try double<= br> quotes instead.

--
=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 TeixeiraFreeBSD Committer (ports)


--
Nuno Teixeira
FreeBSD Committ= er (ports)
--000000000000e9605705f99a9c9c--