base-files: /etc/os-release should contain VERSION variables for testing and unstable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ CC linux-kbuild folks (see [0] ]

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.

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



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux