Public bug reported: Dear linux package maintainers,
A build of the linux-image-unsigned performed by launchpad/Ubuntu can currently not be fully reproduced by a local build. One of the issues is that the kernel build embeds information about the build system and time in the uname string: For example: ``` sudo file /boot/vmlinuz-6.19.0-6-generic /boot/vmlinuz-6.19.0-6-generic: Linux kernel x86 boot executable, bzImage, version 6.19.0-6-generic (buildd@lcy02-amd64-071) #6-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 18 15:48:21 UTC 2026, RO-rootFS, Normal VGA, setup size 512*39, syssize 0x104200, jump 0x26c 0x8cd88ec0fc8cd239 instruction, protocol 2.15, from protected-mode code at offset 0x2cc 0x1008b9f bytes ZST compressed, relocatable, handover offset 0x1035640, legacy 64-bit entry point, can be above 4G, 32-bit EFI handoff entry point, 64-bit EFI handoff entry point, EFI kexec boot support, xloadflags bit 5, max cmdline size 2047, init_size 0x44ba000 uname --all Linux ubuntu 6.19.0-6-generic #6-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 18 15:48:21 UTC 2026 x86_64 GNU/Linux ``` The `buildd@lcy02-amd64-071` depend on the build machine, and the date `Wed Feb 18 15:48:21 UTC 2026` is **not** set based on the SOURCE_DATE_EPOCH variable but set depending on when the build is performed. Debian solves this by setting the following variables during the build, it would be nice if the Ubuntu kernels could follow this: KBUILD_BUILD_USER: for example to `kernel-team` KBUILD_BUILD_HOST: for example to `lists.ubuntu.com` KBUILD_BUILD_TIMESTAMP: to a date based on or derived from SOURCE_DATE_EPOCH On Debian this results in an output of `file` similar to the following, and allows the package builds to be reproduced: ``` /usr/lib/modules/6.18.5+deb14-amd64/vmlinuz: Linux kernel x86 boot executable, bzImage, version 6.18.5+deb14-amd64 ([email protected]) #1 SMP PREEMPT_DYNAMIC Debian 6.18.5-1 (2026-01-16) ``` <https://sources.debian.org/src/linux/6.19.8-1/debian/rules.real#L43>: ``` SOURCE_DATE_UTC_ISO := $(shell date -u -d '@$(SOURCE_DATE_EPOCH)' +%Y-%m-%d) ... setup_env += DISTRIBUTION_OFFICIAL_BUILD=1 DISTRIBUTOR="$(DEB_VENDOR)" DISTRIBUTION_VERSION="$(SOURCEVERSION)" KBUILD_BUILD_TIMESTAMP="@$(SOURCE_DATE_EPOCH)" KBUILD_BUILD_VERSION_TIMESTAMP="$(DEB_VENDOR) $(SOURCEVERSION) ($(SOURCE_DATE_UTC_ISO))" KBUILD_BUILD_USER="$(word 1,$(subst @, ,$(MAINTAINER)))" KBUILD_BUILD_HOST="$(word 2,$(subst @, ,$(MAINTAINER)))" ``` It would be nice if these 3 variables could be set similarly to Debian, allowing the Ubuntu package build to be reproduced locally. Thank you, Jonathan Hettwer ProblemType: Bug DistroRelease: Ubuntu 26.04 Package: linux-image-unsigned-7.0.0-10-generic (not installed) ProcVersionSignature: Ubuntu 6.19.0-6.6-generic 6.19.2 Uname: Linux 6.19.0-6-generic x86_64 AlsaDevices: total 0 crw-rw---- 1 root audio 116, 1 Mar 24 18:02 seq crw-rw---- 1 root audio 116, 33 Mar 24 18:02 timer AplayDevices: Error: [Errno 2] No such file or directory: 'aplay' ApportVersion: 2.33.1-0ubuntu3 Architecture: amd64 ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord' AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1: CRDA: N/A CasperMD5CheckResult: unknown CloudArchitecture: x86_64 CloudBuildName: server CloudID: nocloud CloudName: unknown CloudPlatform: nocloud CloudSerial: 20260221 CloudSubPlatform: config-disk (/dev/sr0) CurrentDmesg: Error: command ['dmesg'] failed with exit code 1: dmesg: read kernel buffer failed: Operation not permitted Date: Thu Mar 26 16:43:11 2026 Lsusb: Error: command ['lsusb'] failed with exit code 1: Lsusb-t: Lsusb-v: Error: command ['lsusb', '-v'] failed with exit code 1: MachineType: QEMU Standard PC (Q35 + ICH9, 2009) PciMultimedia: ProcEnviron: LANG=C.UTF-8 PATH=(custom, user) SHELL=/bin/bash TERM=tmux-256color XDG_RUNTIME_DIR=<set> ProcFB: 0 bochs-drmdrmfb ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-6.19.0-6-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0 RelatedPackageVersions: firmware-sof N/A linux-firmware N/A RfKill: Error: [Errno 2] No such file or directory: 'rfkill' SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) WifiSyslog: acpidump: dmi.bios.date: 02/06/2015 dmi.bios.release: 0.0 dmi.bios.vendor: EFI Development Kit II / OVMF dmi.bios.version: 0.0.0 dmi.chassis.type: 1 dmi.chassis.vendor: QEMU dmi.chassis.version: pc-q35-7.2 dmi.modalias: dmi:bvnEFIDevelopmentKitII/OVMF:bvr0.0.0:bd02/06/2015:br0.0:svnQEMU:pnStandardPC(Q35+ICH9,2009):pvrpc-q35-7.2:cvnQEMU:ct1:cvrpc-q35-7.2:sku: dmi.product.name: Standard PC (Q35 + ICH9, 2009) dmi.product.version: pc-q35-7.2 dmi.sys.vendor: QEMU ** Affects: linux (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug cloud-image resolute -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2146538 Title: Kernel image build is not reproducible due to uname To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2146538/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
