Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2019 09:57:00 +0200
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r346018 - head/sys/conf
Message-ID:  <CAPQ4ffvb0gL=WiaVDi9MzYUp6JM5%2BKVuaRXbqikmH0c-OK8XGA@mail.gmail.com>
In-Reply-To: <CANCZdfqHoQNOwFiLhMGfUZdCRvAv_OdMt%2Bjua_n%2B4ax759y5Gg@mail.gmail.com>
References:  <201904071839.x37IduPO002007@repo.freebsd.org> <CAPQ4ffuqxQvszqxvpBDt_D0no_k8OS-5xDrgccPJCE5RfxsLBg@mail.gmail.com> <CANCZdfqHoQNOwFiLhMGfUZdCRvAv_OdMt%2Bjua_n%2B4ax759y5Gg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, April 8, 2019, Warner Losh <imp@bsdimp.com> wrote:

>
>
> On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter <oliver.pinter@hardenedbsd.org>
> wrote:
>
>> Please revert this patch. If I'm not wrong, this will break the
>> freebsd-version command's generation or output.
>>
>
> You are going to need to be a lot more specific about this. It makes no
> sense to me at all how any of this could break that. The code is identical
> logically and produces the same result.
>

Now I double checked, it may work, but I remembered to this "black magic" :
https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile


>
> Warner
>
>
> On Sunday, April 7, 2019, Warner Losh <imp@freebsd.org> wrote:
>>
>>> Author: imp
>>> Date: Sun Apr  7 18:39:55 2019
>>> New Revision: 346018
>>> URL: https://svnweb.freebsd.org/changeset/base/346018
>>>
>>> Log:
>>>   Use default shell assignment rather more complicated if then
>>>   construct.
>>>
>>>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
>>> feedback)
>>>   Differential Revision: https://reviews.freebsd.org/D19797
>>>
>>> Modified:
>>>   head/sys/conf/newvers.sh
>>>
>>> Modified: head/sys/conf/newvers.sh
>>> ============================================================
>>> ==================
>>> --- head/sys/conf/newvers.sh    Sun Apr  7 18:31:45 2019        (r346017)
>>> +++ head/sys/conf/newvers.sh    Sun Apr  7 18:39:55 2019        (r346018)
>>> @@ -46,10 +46,7 @@
>>>
>>>  TYPE="FreeBSD"
>>>  REVISION="13.0"
>>> -BRANCH="CURRENT"
>>> -if [ -n "${BRANCH_OVERRIDE}" ]; then
>>> -       BRANCH=${BRANCH_OVERRIDE}
>>> -fi
>>> +BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>>>  RELEASE="${REVISION}-${BRANCH}"
>>>  VERSION="${TYPE} ${RELEASE}"
>>>
>>> @@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
>>>      SYSDIR=$(dirname $0)/..
>>>  fi
>>>
>>> -if [ -n "${PARAMFILE}" ]; then
>>> -       RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/
>>> {print $3}' \
>>> -               ${PARAMFILE})
>>> -else
>>> -       RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/
>>> {print $3}' \
>>> -               ${SYSDIR}/sys/param.h)
>>> -fi
>>> +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
>>> +             ${PARAMFILE:-${SYSDIR}/sys/param.h})
>>>
>>> -b=share/examples/etc/bsd-style-copyright
>>>  if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
>>>         year=$(sed -Ee '/^Copyright .* The FreeBSD
>>> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
>>>  else
>>>         year=$(date +%Y)
>>>  fi
>>>  # look for copyright template
>>> +b=share/examples/etc/bsd-style-copyright
>>>  for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
>>>  do
>>>         if [ -r "$bsd_copyright" ]; then
>>> @@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
>>>
>>>  # VARS_ONLY means no files should be generated, this is just being
>>>  # included.
>>> -if [ -n "$VARS_ONLY" ]; then
>>> -       return 0
>>> -fi
>>> +[ -n "$VARS_ONLY" ] && return 0
>>>
>>>  LC_ALL=C; export LC_ALL
>>>  if [ ! -r version ]
>>> _______________________________________________
>>> svn-src-head@freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>>> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
>>>
>>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffvb0gL=WiaVDi9MzYUp6JM5%2BKVuaRXbqikmH0c-OK8XGA>