On Thu, Oct 13, 2022 at 4:03 PM Masahiro Yamada <[email protected]> wrote: > > Hi Sedat, > > Sorry for my late replay. > > > On Mon, Oct 3, 2022 at 6:56 PM Sedat Dilek <[email protected]> wrote: > > > > [ CC linux-kbuild folks (see [0] ] > > > > Can you give me more context of this email? > > > > > > Hi, > > > > I am using Debian/unstable AMD64 and doing Linux-kernel upstream > > development and testing. > > > > People using bindeb-pkg (mkdebian) from Linux-kernel sources > > (scripts/packages) to build and test their selfmade Debian kernels get > > a now a "n/a" for distribution. > > > > Right, if I try the latest sid, > "lsb_release -cs" returns "n/a". > It returned "sid" before IIRC. > > > What was changed in Debian? > Any change in the lsb_release program? >
Hi Masahiro San,
The Debian maintainer(s) changed the co-working of these packages:
root# dpkg -l | egrep 'base-files|lsb-release' | awk '/^ii/ {print $1
" " $2 " " $3}' | column -t
ii base-files 12.3
ii lsb-release 12.0-1
ii lsb-release-minimal 12.0-1
My findings:
First, /usr/bin/lsb_release-11.4 (python) VS.
/usr/bin/lsb_release-12.0 (shell) - both files attached.
Second, version 12.0 checks now explicitly for values in /etc/os-release.
As a side note: All these changes were not mentioned in lsb-release
debian/changelog.
The easiest way to fix this is to add...
VERSION_ID=sid (or unstable)
...to /etc/os-release file.
Just for the sake of technical correctness:
"sid" or "unstable" is not a numerical value - it's a string.
In version 12.3 of base-files "VERSION_CODENAME=bookworm" was added on
users' request.
Last checks:
Original (base-files version 12.0):
[ /etc/os-release ]
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root# lsb_release --all
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bookworm/sid
Release: n/a
Codename: bookworm
Modified:
[ /etc/os-release ]
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=bookworm
VERSION_ID=sid
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root# lsb_release --all
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bookworm/sid
Release: sid
Codename: bookworm
More comments see https://bugs.debian.org/1008735.
-Sedat-
>
>
>
>
>
> >
> > Background (see [1]):
> >
> > [ scripts/package/mkdebian ]
> >
> > # Try to determine distribution
> > if [ -n "$KDEB_CHANGELOG_DIST" ]; then
> > distribution=$KDEB_CHANGELOG_DIST
> > # In some cases lsb_release returns the codename as n/a, which breaks
> > dpkg-parsechangelog
> > elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n
> > "$distribution" ] && [ "$distribution" != "n/a" ]; then
> > : # nothing to do in this case
> > else
> > distribution="unstable"
> > echo >&2 "Using default distribution of 'unstable' in the changelog"
> > echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST
> > explicitly"
> > fi
> >
> > Personally, I set hardcoded in my kernel build-script as a workaround:
> >
> > distribution="bookworm"
> >
> > Gioele suggested me to enrich /etc/os-release with:
> >
> > VERSION_ID=unstable <--- XXX: I prefer sid because of PRETTY_NAME and
> > it's shorter
> > VERSION_CODENAME=bookworm
> >
> > In the end the file looks like:
> >
> > PRETTY_NAME="Debian GNU/Linux bookworm/sid"
> > NAME="Debian GNU/Linux"
> > ID=debian
> > VERSION_ID=sid
> > VERSION_CODENAME=bookworm
> > HOME_URL="https://www.debian.org/"
> > SUPPORT_URL="https://www.debian.org/support"
> > BUG_REPORT_URL="https://bugs.debian.org/"
> >
> > ...and this seems to work:
> >
> > # lsb_release -cs
> > No LSB modules are available.
> > bookworm
> >
> > Please, provide a solution not to break workflows that were successful
> > for years.
> >
> > Thanks.
> >
> > Best regards,
> > -Sedat-
> >
> > [0]
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS#n11005
> > [1]
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/package/mkdebian#n123
>
>
>
> --
> Best Regards
> Masahiro Yamada
lsb_release-11.4
Description: Unix manual page
lsb_release-12.0
Description: Binary data

