Date: Tue, 18 Apr 2023 10:10:57 +0100 From: Nuno Teixeira <eduardo@freebsd.org> To: Piotr Smyrak <ps.ports@smyrak.com> Cc: ports@freebsd.org Subject: Re: Get ${OSREL} at install time Message-ID: <CAFDf7ULeUKBthnLWM_6wgK%2BVSTpQT2XvNpCOVL%2BAy6fQwKqeLw@mail.gmail.com> In-Reply-To: <20230418105544.4e4d5a44@daleth.home> References: <CAFDf7UKJ%2BSy0f9xJZ8oc8fcaejhT1LFgjspVTHDt4E99z2sz3w@mail.gmail.com> <20230418105544.4e4d5a44@daleth.home>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000021c9ae05f998b01a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Piotr, Yes, something like it. I will not need src sys/conf/newvers.sh, /etc/os-release will do the job. Thinking right now in a way to check /etc/os-release version at install time. Cheers Piotr Smyrak <ps.ports@smyrak.com> escreveu no dia ter=C3=A7a, 18/04/2023 = =C3=A0(s) 09:56: > On Tue, 18 Apr 2023 09:05:36 +0100 > Nuno Teixeira <eduardo@freebsd.org> wrote: > > > net/gitup uses a reinplace cmd to setup gitup.conf to the > > correspondent RELEASE/STABLE for command `gitup release` and `gitup > > stable`. So, if user is using 13.1-RELEASE, reinplace will configure > > gitup.conf to: > > > > "release" : { > > "branch" : "releng/13.1", > > "stable" : { > > "branch" : "stable/13", > > > > The problem is that OSREL is taken from build time and at this moment > > 13.2 pkgs are being built on a 13.1 machine. > > So the result is wrong by setting releng/13.1 instead of releng/13.2. > > > > the reinplace cmd is: > > --- > > ${REINPLACE_CMD} -e 's|stable\/12|stable\/${OSREL:R}| ; \ > > s|releng\/11.4|releng\/${OSREL}|' \ > > ${WRKSRC}/gitup.conf > > --- > > > > Any sugestion or example that permits to get OSREL at install time? > > Not sure whether I understand your pursuit well, but if you have OS > source access, you might want to take a look at sys/conf/newvers.sh > > $ egrep '^(TYPE|REVISION|BRANCH)' /usr/src/sys/conf/newvers.sh > > -- > Piotr Smyrak > > --=20 Nuno Teixeira FreeBSD Committer (ports) --00000000000021c9ae05f998b01a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hello Piotr,</div><div><br></div><div>Yes, something = like it. I will not need src sys/conf/newvers.sh, /etc/os-release will do t= he job.</div><div><br></div><div>Thinking right now in a way to check /etc/= os-release version at install time.</div><div><br></div><div>Cheers <font c= olor=3D"#888888"><br></font></div></div><br><div class=3D"gmail_quote"><div= dir=3D"ltr" class=3D"gmail_attr">Piotr Smyrak <<a href=3D"mailto:ps.por= ts@smyrak.com">ps.ports@smyrak.com</a>> escreveu no dia ter=C3=A7a, 18/0= 4/2023 =C3=A0(s) 09:56:<br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex">On Tue, 18 Apr 2023 09:05:36 +0100<br> Nuno Teixeira <<a href=3D"mailto:eduardo@freebsd.org" target=3D"_blank">= eduardo@freebsd.org</a>> wrote:<br> <br> > net/gitup uses a reinplace cmd to setup gitup.conf to the<br> > correspondent RELEASE/STABLE for command `gitup release` and `gitup<br= > > stable`. So, if user is using 13.1-RELEASE, reinplace will configure<b= r> > gitup.conf to:<br> > <br> > "release" : {<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"bra= nch"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: "releng/13.1"= ,<br> > "stable" : {<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"bra= nch"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: "stable/13",<= br> > <br> > The problem is that OSREL is taken from build time and at this moment<= br> > 13.2 pkgs are being built on a 13.1 machine.<br> > So the result is wrong by setting releng/13.1 instead of releng/13.2.<= br> > <br> > the reinplace cmd is:<br> > ---<br> > ${REINPLACE_CMD} -e 's|stable\/12|stable\/${OSREL:R}| ; \<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s|releng\= /11.4|releng\/${OSREL}|' \<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${WRKSRC}= /gitup.conf<br> > ---<br> > <br> > Any sugestion or example that permits to get OSREL at install time?<br= > <br> Not sure whether I understand your pursuit well, but if you have OS<br> source access, you might want to take a look at sys/conf/newvers.sh<br> <br> $ egrep '^(TYPE|REVISION|BRANCH)' /usr/src/sys/conf/newvers.sh<br> <br> -- <br> =C2=A0Piotr Smyrak<br> <br> </blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre= fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"l= tr"><span style=3D"color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committ= er (ports)</span></div></div> --00000000000021c9ae05f998b01a--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7ULeUKBthnLWM_6wgK%2BVSTpQT2XvNpCOVL%2BAy6fQwKqeLw>