Re: Get ${OSREL} at install time

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Tue, 18 Apr 2023 09:10:57 UTC
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ça, 18/04/2023 à(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
>
>

-- 
Nuno Teixeira
FreeBSD Committer (ports)