Bug#987320: dracut: Version is not included in --version, --help or initramfs runtime

2021-04-27 Thread Scott Moser
I'm not sure if its 100% OK to do it, but what we do in cloud-init
similarly is is just write the file in debian/rules, and reference
DEB_VERSION.  That way you even get the packaging number which could
be helpful.

https://github.com/canonical/cloud-init/blob/ubuntu/devel/debian/rules

On Tue, Apr 27, 2021 at 5:39 AM Thomas Lange  wrote:
>
> I can confirm this bug.
>
> I guess the dracut version is created during the build of the package
> extracted from some git tags if avalable. Since I have to do source
> only upload to Debian, the git information is missing and so
> the version information is empty
>
> # cat /usr/lib/dracut/dracut-version.sh
> DRACUT_VERSION=
>
> I'll try to work around this in the next version.
>
> --
> viele Grüße Thomas



Bug#987320: dracut: Version is not included in --version, --help or initramfs runtime

2021-04-27 Thread Thomas Lange
I can confirm this bug.

I guess the dracut version is created during the build of the package
extracted from some git tags if avalable. Since I have to do source
only upload to Debian, the git information is missing and so
the version information is empty

# cat /usr/lib/dracut/dracut-version.sh
DRACUT_VERSION=

I'll try to work around this in the next version.

-- 
viele Grüße Thomas



Bug#987320: dracut: Version is not included in --version, --help or initramfs runtime

2021-04-21 Thread Scott Moser
Package: dracut
Version: 051-1
Severity: normal

Dear Maintainer,

The dracut package does not seem to 'know' its own version.

Example:

$ cat /lib/dracut/dracut-version.sh
DRACUT_VERSION=

$ dracut --version
dracut 

$ dpkg-query --show dracut-core
dracut-core 051-1

$ dracut --help | head -n 5
Usage: /usr/bin/dracut [OPTION]... [ []]

Version:

Creates initial ramdisk images for preloading modules


This is admittedly a minor issue, but also manifests itself in the
initramfs that is created by 'dracut'.  It means an initramfs module
cannot make decisions based on the dracut version.

The fix seems simple enough:

% echo DRACUT_VERSION=051-1 > /lib/dracut/dracut-version.sh
% dracut --version
dracut 051-1


So you just need to manage to write the version to that file during
package build.

-- System Information:
Debian Release: bullseye/sid
  APT prefers focal-updates
  APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 'focal')
Architecture: amd64 (x86_64)

Kernel: Linux 5.8.0-45-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dracut depends on:
pn  dracut-core  

dracut recommends no packages.

Versions of packages dracut suggests:
pn  dracut-network