diff -Nru initramfs-tools-0.142/conf/initramfs.conf initramfs-tools-0.142ubuntu15.1/conf/initramfs.conf --- initramfs-tools-0.142/conf/initramfs.conf 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/conf/initramfs.conf 2023-09-25 21:47:50.000000000 +0200 @@ -30,14 +30,6 @@ BUSYBOX=auto # -# KEYMAP: [ y | n ] -# -# Load a keymap during the initramfs stage. -# - -KEYMAP=n - -# # COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ] # @@ -54,7 +46,7 @@ # 0 - 9 for lz4|xz # 0 - 19 for zstd # -# COMPRESSLEVEL=3 +# COMPRESSLEVEL=1 # # DEVICE: ... diff -Nru initramfs-tools-0.142/debian/changelog initramfs-tools-0.142ubuntu15.1/debian/changelog --- initramfs-tools-0.142/debian/changelog 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/changelog 2023-11-14 20:02:42.000000000 +0100 @@ -1,3 +1,318 @@ +initramfs-tools (0.142ubuntu15.1) mantic; urgency=medium + + * Install intel_lpss_pci and spi_pxa2xx_platform kernel modules for keyboard + on MacBook Pro 2017 (LP: #2042710) + * Install surface_aggregator_registry for keyboard on Surface Laptop 4 + (LP: #2007050) + + -- Benjamin Drung Tue, 14 Nov 2023 20:02:42 +0100 + +initramfs-tools (0.142ubuntu15) mantic; urgency=medium + + * scripts/functions: do not fail to configure networking too quickly. In + particular make sure an unsuccessful attempt to run DHCP takes at least + $ROUNDTTT seconds. (LP: #2037202) + + -- Michael Hudson-Doyle Wed, 04 Oct 2023 12:02:13 +1300 + +initramfs-tools (0.142ubuntu14) mantic; urgency=medium + + * mkinitramfs: Skip compression support check if /boot/config-${version} + is missing (LP: #2018171) + + -- Benjamin Drung Tue, 26 Sep 2023 00:49:57 +0200 + +initramfs-tools (0.142ubuntu13) mantic; urgency=medium + + * Support usr-merged library path when detecting mutliarch dir (LP: #2037156) + + -- Benjamin Drung Sat, 23 Sep 2023 13:45:37 +0200 + +initramfs-tools (0.142ubuntu12) mantic; urgency=medium + + * Change dracut-core dependency to newly created dracut-install package + (LP: #2031304) + * autopkgtest: + - Explicitly specify supported architectures + - Enable KVM if available (not available on Ubuntu runners) + - log qemu parameters + + -- Benjamin Drung Wed, 23 Aug 2023 10:58:40 +0200 + +initramfs-tools (0.142ubuntu11) mantic; urgency=medium + + * Use dracut-install in manual_add_modules to speed up mkinitramfs + significantly (LP: #2031185) + * Install tty/serial kernel modules. Dracut is doing the same. (LP: #2019435) + * Harmonize kernel module installation with dracut's behavior (LP: #2031841): + - Use the symbol regex from dracut-install to reduce the unnessary block + and net kernel modules. + - Install all usb/typec kernel modules instead of cherry-picking some. + - Do not install ARM/RISCV specific modules on other architectures. + + -- Benjamin Drung Fri, 18 Aug 2023 03:44:36 +0200 + +initramfs-tools (0.142ubuntu10) mantic; urgency=medium + + * Fix resolving wrong multiarch libdir in dhcpcd hook (LP: #2031363) + + -- Benjamin Drung Tue, 15 Aug 2023 20:41:22 +0200 + +initramfs-tools (0.142ubuntu9) mantic; urgency=medium + + * Replace dhclient by dhcpcd (LP: #2024164) + * Merge consecutive manual_add_modules calls into one + + -- Benjamin Drung Mon, 14 Aug 2023 18:09:08 +0200 + +initramfs-tools (0.142ubuntu8) mantic; urgency=medium + + [ Benjamin Drung ] + * mkinitramfs: + - Do not store intermediate main cpio archive + - Put compressed kernel modules and firmware files in an uncompressed cpio + (LP: #2028567) + * Add support for zstd-compressed firmware + * test: Ignore remaining systemd-udevd processes on arm64 as well + * Update lintian overrides to format for lintian 2.116.3 + + [ Loïc Minier ] + * hook-functions: add stusb160x kernel module for Tegra IGX (LP: #2027636) + + -- Benjamin Drung Wed, 26 Jul 2023 14:05:19 +0200 + +initramfs-tools (0.142ubuntu7) mantic; urgency=medium + + * Extend autopkgtest to also run qemu on arm64, armhf, ppc64el, and s390x. + (see upstream merge request !80) + + -- Benjamin Drung Wed, 05 Jul 2023 21:54:53 +0200 + +initramfs-tools (0.142ubuntu6) mantic; urgency=medium + + * To ease testing, always use the link-layer address as DHCP unique + identifier (DUID-LL) for DHCPv6. + * Drop direct dependency on isc-dhcp-client (it's not available on i386) + * Add qemu-net-dnsmasq autopkgtest to test DHCPv6 + + -- Benjamin Drung Fri, 23 Jun 2023 21:12:21 +0200 + +initramfs-tools (0.142ubuntu5) mantic; urgency=medium + + * scripts/functions: drop needing basename in initramfs + * Bring up networking if ip or ip6 is specified on cmdline. + Directly depend on isc-dhcp-client for that. + (Closes: #789067, LP: #1463846) (see merge request !77) + * Extent qemu-net autopkgtest to check more cases and results + * Move git repository under the ~ubuntu-core-dev umbrella + + -- Benjamin Drung Fri, 16 Jun 2023 15:19:50 +0200 + +initramfs-tools (0.142ubuntu4) mantic; urgency=medium + + * Include kernel/drivers/usb/typec/ucsi with MODULES=most along with other + USB-C storage drivers. + + -- Loïc Minier Thu, 08 Jun 2023 17:49:02 +0000 + +initramfs-tools (0.142ubuntu3) mantic; urgency=medium + + * Port the net autopkgtest to the common test framework. This drops + depending on downloading a cloud image from the Internet and reduces + the execution time from 3:19 min down to 0:57 min. + * test: Increase minimum ext2 block count (merge request !75) + * Fix shellcheck SC1010 and SC2015 + + -- Benjamin Drung Mon, 05 Jun 2023 12:23:21 +0200 + +initramfs-tools (0.142ubuntu2) lunar; urgency=medium + + * Fix/ignore ShellCheck findings. Mostly taken from Debian MR !73. + Thanks to Damian Szuberski. + + -- Benjamin Drung Thu, 06 Apr 2023 17:41:32 +0200 + +initramfs-tools (0.142ubuntu1) lunar; urgency=medium + + * Merge from Debian unstable (LP: #1988418). Remaining changes: + - Make busybox-initramfs a real runtime dependency, fixing kernel install + failures with cryptsetup + - support mounting of loopback devices via loop*= parameters + - Drop hooks/keymap, scripts/init-top/keymap, and associated code; + console-setup takes care of this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Trim leading whitespaces in dumpe2fs output so date command is happy in + the fixrtc script + - scripts/local-premount/fixrtc: ensure that the fixrtc script doesn't + produce extraneous output from wait-for-root and date + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set to + something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you need + to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Automatically blacklist vga16fb when vga= or video= specified on kernel + command-line. + - add squashfs to list of 'most' modules + - Add vfat and nls modules to the initramfs. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. + - ppc64el: enable PowerPC NX Crypto Coprocessor + - Revised mountroot failure support. This is now deprecated and + effectively removed. However, to prevent breakage in other packages the + add_mountroot_fail_hook function is still present as an empty stub. + - resume: only resume when the partition contains a resume image + - Fix resuming a hibernate session from a swapfile + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev to + finish processing if we catch it in the act, and returns the filesystem + type as already probed by udev. + - local_device_setup: use wait-for-root if it supports the device alias + type + - debian/control: update Vcs-* links for Ubuntu. + - Add support for uppercase and lowercase uuids. + - init: Don't interpret "rootdelay" as a static sleep. + - src/wait-for-root.c, scripts/local: add explicit support for PARTUUID, a + syntax we may prefer for images that might boot without an initramfs. + - scripts/local: Let rootdelay determine the wait-for-root timeout. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el + - Support roottimeout= as the authoritative name for rootdelay= since the + Ubuntu interpretation of rootdelay is *not* a delay and this causes + inconsistent behavior depending on whether the kernel or an initramfs is + interpreting it. + - scripts/functions: by default, when setting up networking, use dhclient + if we're asked to do DHCP explicitly, or if we otherwise are expected to + do things automatically. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and + exit as soon as we get an IP address. + - split out IPv6 options in its own cmdline parameter: ip6= ; always use + dhclient in this case if the value set is anything other than 'off' or + 'none'. Furthermore, parse anything other than 'on', 'dhcp' or 'any' as + the name of an interface. + - rework the stop conditions so that we properly handle the ROUNDTTT loop, + timing out after a short period of time and trying again after a short + sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to do, + or that we've achieved what we wanted (that is, to bring up IPv4, IPv6, + or possibly both). + - Just let dhclient scan the interfaces if none is specified for IPv6. + (previously unnoted) + - Do not handle ip=rarp specially (ipconfig hasn't supported it for some + time) + - Call dhclient in simple cases for IPv4 (this makes some small observable + changes -- for example ip=bootp will now make a DHCP request too -- but + nothing that seems important). + - Do not let dhclient processes hang around past the pivot and have them + respect the shorter timeouts ipconfig was given. + - Only source ipv4 config in configure_networking() if it exists. + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. + - Run unittests during autopkgtests. + - Add some autopkgtests for the network configuration processing. + - scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. + - Adjust testsuite for correct expected netplan output. + - Add tests to parse netplan.yaml with netplan generate. + - Skip setting mac-address, unless unsupported unpredictable netnames are + used. + - scripts/functions:_render_netplan(): Make configure_networking() more + resilient when called by set -e scripts. + - scripts/functions: include a new option to skip enslaved network + devices. + - Auto activate qeth devices on s390x hosts, when using ip= ip6= command + lines. + - Add support for creating VLANs via vlan=eth0.1:eth0 on kernel + commandline, and as VLAN= conf.d snippet. + - Emit empty dictionary in the ethernets section, for static vlan configs + without any matches, as otherwise it is invalid config. + - Skip attempting to chzdev enable VLAN device + - scripts/functions: Fix the fix for bug #1880735, fixing setting up vlans + from the kernel commandline. + - Drop renderer from netplan yaml, such that netplan uses the default + rendered for the target system, i.e. NetworkManager on the desktop. + - debian/{control,rules}: Don't run shellcheck on i386 to avoid pulling + ghc into our minimal supported set for the pruned architecture. + - Work out the kernel modules required to support ZFS filesystems and add + them as necessary. + - Add modules for nvme path components on multipath nvme. + - debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files + in /boot. + - Ensure we have a /usr/sbin directory in initramfs-tools-core + - Drop usage of klibc-utils' fstype in favor of always using udev blkid. + - Use set -a/+a around loading conf snippets, to autoexport hook + configuration variables. This thus allows packaged hooks to configure + each other. + - Fix PATH to include /usr/local. + - Revert upstream commit 0012977; Ubuntu's resume script implementation + diverges from Debian's and this special-case handling of UUID (which is + used as the resume target in the default scenario) is required here. + - Filter out looping or broken symlinks from the initramfs, since they + cause cpio to explode + - Always mount loop-mount filesystems read-write; ntfs-3g and vfat can't + remount yet. + - Provide a clearer error on mount failure of the Windows host filesystem + - Fix copying libgcc_s when there is optimized pthreads installed. + - scripts/local: Re-execute cryptroot local-block script. + - d/tests: Add explicit call to partprobe on net test, specially in prep- + image and run-image. + - scripts/local-premount/resume: Use readlink -f to correctly handle non- + symlink $resume + - d/t/control:autopkgtests running qemu need root, add needs-root + restriction + - Cherry-pick merge request !26 to support xz compressed firmware. + Uncompressed firmware is preffered, with a fallback to use compressed + firmware files. + - Improve shell scripts to conform to standards in shellcheck > 8.0 + - Increase image file to 2GB in autopkgtest + - Force copy pthread and libgcc_s libraries via a stub binary. To avoid + circular shared library dependencies between compiler and libc, + libpthreads chooses to dlopen libgcc_s, instead of linking against it. + However, we have no way to parse/know what it needs. And even when we + hardcode to include libgcc_s1, we don't have a way to know which + libgcc_s1 is needed on a given system and from which path to include it. + But there is a hook-function to copy a binary and all of its shared + library dependencies. Thus create a stub empty executable, with shared + linking against pthreads and gcc_s1 and always include it in the initrd. + This way at initrd creation time, ldd is used to correctly resolve these + shared library dependencies and correctly copy them into the initrd. + This removes hardcoding paths as to where these libraries must be copied + from on the host. + - Lower the compression levels for zstd and lz4 Following the discussion + on the mailing list, we have reached a conclusion to lower the default + compression levels: + - For lz4, the compression level is lowered to 2 from 9 + - For zstd, the compression level is lowered to 1 from 9 + - Include nvdimm modules in block modules, they provide access to block + pmem devices. + - Include dax and nfit modules, also needed for pmem devices. + - Add char/hw_random drivers + * Removed patches obsoleted/merged by upstream: + - Switch default initramfs compression to zstd, as it produces the lower + overall boot time. + - Don't recommend pigz, which is in universe. + - Suppress shellcheck SC1010 errors, returning lots of false-positives on + use of 'done' as a word. + - hook-functions: when MODULES=list there will be no 'kernel' dir, so + don't try to find anything there, as it will log an 'error' this is + needed for amd64-ata-only autopkgtest to pass, or we would need to + ignore the 'error' with allow-stderr + - hooks/fsck: always include fsck binaries irrespective of PASSNO value, + otherwise initrds fail to mount rootfs and have no ability to fix the + rootfs. + - Cherry-pick merge request !51 to decompress compressed kernel modules + for boot speed performance. + - For net boot include most of net/usb modules, except niche modems. + * Reinstate build-time shellcheck (but leave shellcheck out of + autopkgtests as per debian bug #992798) + * Ensure commented COMPRESSLEVEL is consistent with the default + + -- Dave Jones Thu, 01 Sep 2022 13:43:43 +0100 + initramfs-tools (0.142) unstable; urgency=medium [ Dan Streetman ] @@ -82,6 +397,290 @@ -- Ben Hutchings Sun, 10 Apr 2022 23:39:45 +0200 +initramfs-tools (0.140ubuntu17) kinetic; urgency=medium + + * Include update from Debian for depmod from kmod 30 (LP: #1987620) + + Copy modules.builtin.modinfo into initramfs (Closes: #1014319) + + -- Graham Inggs Tue, 30 Aug 2022 13:47:27 +0000 + +initramfs-tools (0.140ubuntu16) kinetic; urgency=medium + + * Add char/hw_random drivers (LP: #1983359) + + -- Heinrich Schuchardt Tue, 02 Aug 2022 22:54:09 +0200 + +initramfs-tools (0.140ubuntu15) kinetic; urgency=medium + + * Include dax and nfit modules, also needed for pmem devices. (LP: #1981385) + + -- Michael Hudson-Doyle Fri, 08 Jul 2022 15:03:33 +1200 + +initramfs-tools (0.140ubuntu14) kinetic; urgency=medium + + * Include nvdimm modules in block modules, they provide access to block + pmem devices. + + -- Dimitri John Ledkov Wed, 06 Jul 2022 23:23:50 +0100 + +initramfs-tools (0.140ubuntu13) jammy; urgency=medium + + * Lower the compression levels for zstd and lz4 (LP: #1958148) + Following the discussion on the mailing list, we have reached + a conclusion to lower the default compression levels: + - For lz4, the compression level is lowered to 2 from 9 + - For zstd, the compression level is lowered to 1 from 19 + + + -- Julian Andres Klode Tue, 15 Mar 2022 16:00:55 +0100 + +initramfs-tools (0.140ubuntu12) jammy; urgency=medium + + * Force copy pthread and libgcc_s libraries via a stub binary. + + To avoid circular shared library dependencies between compiler and + libc, libpthreads chooses to dlopen libgcc_s, instead of linking + against it. However, we have no way to parse/know what it + needs. And even when we hardcode to include libgcc_s1, we don't + have a way to know which libgcc_s1 is needed on a given system and + from which path to include it. But there is a hook-function to + copy a binary and all of its shared library dependencies. Thus + create a stub empty executable, with shared linking against + pthreads and gcc_s1 and always include it in the initrd. This way + at initrd creation time, ldd is used to correctly resolve these + shared library dependencies and correctly copy them into the + initrd. This removes hardcoding paths as to where these libraries + must be copied from on the host. LP: #1958594 LP: #1880853 + + * For net boot include most of net/usb modules, except niche modems. LP: + #1950996 + + * Cherry-pick updated merge request !26 to support xz compressed + firmware. Uncompressed firmware is preffered, with a fallback to use + compressed firmware files. LP: #1942260 + + * Cherry-pick updated merge request !51 to decompress compressed kernel + modules for boot speed performance. LP: #1932329 + + -- Dimitri John Ledkov Tue, 08 Feb 2022 20:43:02 +0000 + +initramfs-tools (0.140ubuntu11) jammy; urgency=medium + + * Increase image file to 2GB in autopkgtest (LP: #1958904) + + -- Andrea Righi Tue, 25 Jan 2022 15:03:39 +0000 + +initramfs-tools (0.140ubuntu10) jammy; urgency=medium + + * Improve shell scripts to conform to standards in shellcheck > 8.0 + + -- William 'jawn-smith' Wilson Thu, 13 Jan 2022 09:19:53 -0600 + +initramfs-tools (0.140ubuntu9) jammy; urgency=medium + + * scripts/local-premount/fixrtc: ensure that the fixrtc script doesn't + produce extraneous output from wait-for-root and date (LP: #1953521) + + -- Dave Jones Tue, 07 Dec 2021 15:35:22 +0000 + +initramfs-tools (0.140ubuntu8) jammy; urgency=medium + + * Cherry-pick merge request !26 to support xz compressed + firmware. Uncompressed firmware is preffered, with a fallback to use + compressed firmware files. LP: #1942260 + * Cherry-pick merge request !51 to decompress compressed kernel modules + for boot speed performance. LP: #1932329 + * Cherry-pick partially merge request !50 to fix ftbfs with new + shellcheck. + * Fix shellcheck issues in ubuntu patches. + + -- Dimitri John Ledkov Tue, 19 Oct 2021 11:49:38 +0100 + +initramfs-tools (0.140ubuntu6) impish; urgency=medium + + * Change dependencies to depend on zstd, instead of lz4. LP: #1931725 + + -- Dimitri John Ledkov Mon, 14 Jun 2021 17:18:41 +0100 + +initramfs-tools (0.140ubuntu5) impish; urgency=medium + + * Switch default initramfs compression to zstd, as it produces the lower + overall boot time. LP: #1931725 + + -- Dimitri John Ledkov Fri, 11 Jun 2021 16:55:30 +0100 + +initramfs-tools (0.140ubuntu4) impish; urgency=medium + + * Pacify shellcheck to fix ftbfs. + + -- Michael Hudson-Doyle Thu, 06 May 2021 10:57:14 +1200 + +initramfs-tools (0.140ubuntu3) impish; urgency=medium + + * scripts/functions: Fix the fix for bug #1880735, fixing setting up vlans + from the kernel commandline. LP: #1924794 + + -- Michael Hudson-Doyle Wed, 05 May 2021 14:09:08 +1200 + +initramfs-tools (0.140ubuntu2) impish; urgency=medium + + * Set +x bit on init again, missed again in merge despite best efforts. + + -- Steve Langasek Fri, 30 Apr 2021 08:28:26 -0700 + +initramfs-tools (0.140ubuntu1) impish; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + - support mounting of loopback devices via loop*= parameters + - Drop hooks/keymap, scripts/init-top/keymap, and associated code; + console-setup takes care of this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Trim leading whitespaces in dumpe2fs output so date command + is happy in the fixrtc script + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - add squashfs to list of 'most' modules + - Add vfat and nls modules to the initramfs. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. + - ppc64el: enable PowerPC NX Crypto Coprocessor + - resume: only resume when the partition contains a resume image + - Fix resuming a hibernate session from a swapfile + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - Don't recommend pigz, which is in universe. + - local_device_setup: use wait-for-root if it supports the device alias + type + - debian/control: update Vcs-* links for Ubuntu. + - Add support for uppercase and lowercase uuids. + - init: Don't interpret "rootdelay" as a static sleep. + - src/wait-for-root.c, scripts/local: add explicit support for PARTUUID, a + syntax we may prefer for images that might boot without an initramfs. + (previously unnoted) + - scripts/local: Let rootdelay determine the wait-for-root timeout. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el + - Support roottimeout= as the authoritative name for rootdelay= since + the Ubuntu interpretation of rootdelay is *not* a delay and this + causes inconsistent behavior depending on whether the kernel or an + initramfs is interpreting it. + - scripts/functions: by default, when setting up networking, use dhclient + if we're asked to do DHCP explicitly, or if we otherwise are expected + to do things automatically. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and + exit as soon as we get an IP address. + - split out IPv6 options in its own cmdline parameter: ip6= ; always use + dhclient in this case if the value set is anything other than 'off' or + 'none'. Furthermore, parse anything other than 'on', 'dhcp' or 'any' + as the name of an interface. + - rework the stop conditions so that we properly handle the ROUNDTTT + loop, timing out after a short period of time and trying again after + a short sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to + do, or that we've achieved what we wanted (that is, to bring up IPv4, + IPv6, or possibly both). + - return ip=dhcp to the ipconfig use case; if set, then ipconfig will + be run using any interface available, or the BOOTIF if it was set. + - Just let dhclient scan the interfaces if none is specified for IPv6. + (previously unnoted) + - Do not handle ip=rarp specially (ipconfig hasn't supported it for + some time) + - Call dhclient in simple cases for IPv4 (this makes some small + observable changes -- for example ip=bootp will now make a DHCP + request too -- but nothing that seems important). + - Do not let dhclient processes hang around past the pivot and have + them respect the shorter timeouts ipconfig was given. + - Only source ipv4 config in configure_networking() if it exists. + (previously unnoted) + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. + - Run unittests during autopkgtests. + - Add some autopkgtests for the network configuration processing. + - scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. + - Adjust testsuite for correct expected netplan output. + - Add tests to parse netplan.yaml with netplan generate. + - Skip setting mac-address, unless unsupported unpredictable netnames + are used. + - scripts/functions:_render_netplan(): Make configure_networking() + more resilient when called by set -e scripts. + - scripts/functions: include a new option to skip enslaved network + devices. + - Auto activate qeth devices on s390x hosts, when using ip= ip6= command + lines. + - Add support for creating VLANs via vlan=eth0.1:eth0 on kernel + commandline, and as VLAN= conf.d snippet. + - Emit empty dictionary in the ethernets section, for static vlan + configs without any matches, as otherwise it is invalid config. + - Skip attempting to chzdev enable VLAN device + - Drop renderer from netplan yaml, such that netplan uses the default + rendered for the target system, i.e. NetworkManager on the + desktop. + - Switch default initramfs compression to lz4, faster than the current + default gzip. + - debian/{control,rules}: Don't run shellcheck on i386 to avoid pulling + ghc into our minimal supported set for the pruned architecture. + - Work out the kernel modules required to support ZFS filesystems and + add them as necessary. + - Add modules for nvme path components on multipath nvme. + - debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files + in /boot. + - Suppress shellcheck SC1010 errors, returning lots of false-positives on + use of 'done' as a word. + - Ensure we have a /usr/sbin directory in initramfs-tools-core + (previously unnoted) + - Drop usage of klibc-utils' fstype in favor of always using udev blkid. + - Use set -a/+a around loading conf snippets, to autoexport hook + configuration variables. This thus allows packaged hooks to configure + each other. + - Fix PATH to include /usr/local. + - Revert upstream commit 0012977; Ubuntu's resume script implementation + diverges from Debian's and this special-case handling of UUID (which is + used as the resume target in the default scenario) is required here. + - Filter out looping or broken symlinks from the initramfs, since they + cause cpio to explode + (previously unnoted) + - Always mount loop-mount filesystems read-write; ntfs-3g and vfat can't + remount yet. + (previously unnoted) + - Provide a clearer error on mount failure of the Windows host filesystem + (previously unnoted) + - Fix copying libgcc_s when there is optimized pthreads installed. + - scripts/local: Re-execute cryptroot local-block script. + - d/tests: Add explicit call to partprobe on net test, specially in + prep-image and run-image. + - Revised mountroot failure support. This is now deprecated and + effectively removed. However, to prevent breakage in other packages + the add_mountroot_fail_hook function is still present as an empty + stub. + - scripts/local-premount/resume: Use readlink -f to correctly handle + non-symlink $resume + - d/t/control:autopkgtests running qemu need root, add needs-root + restriction + - hook-functions: when MODULES=list there will be no 'kernel' dir, so + don't try to find anything there, as it will log an 'error' this is + needed for amd64-ata-only autopkgtest to pass, or we would need to + ignore the 'error' with allow-stderr + - hooks/fsck: always include fsck binaries irrespective of PASSNO value, + otherwise initrds fail to mount rootfs and have no ability to fix the + rootfs. + + -- Steve Langasek Thu, 29 Apr 2021 08:57:03 -0700 + initramfs-tools (0.140) unstable; urgency=medium [ Norbert Lange ] @@ -102,6 +701,179 @@ -- Bastian Blank Sat, 13 Mar 2021 19:13:18 +0100 +initramfs-tools (0.139ubuntu3) hirsute; urgency=medium + + * hooks/fsck: always include fsck binaries irrespective of PASSNO value, + otherwise initrds fail to mount rootfs and have no ability to fix the + rootfs. LP: #1917780 + + -- Dimitri John Ledkov Wed, 24 Mar 2021 15:21:50 +0000 + +initramfs-tools (0.139ubuntu2) hirsute; urgency=medium + + * scripts/local-premount/resume: + - Use readlink -f to correctly handle non-symlink $resume + (LP: #1876570) + * d/t/control: + - autopkgtests running qemu need root, add needs-root restriction + * hook-functions: + - when MODULES=list there will be no 'kernel' dir, so don't try + to find anything there, as it will log an 'error' + this is needed for amd64-ata-only autopkgtest to pass, + or we would need to ignore the 'error' with allow-stderr + + -- Dan Streetman Thu, 18 Mar 2021 14:48:17 -0400 + +initramfs-tools (0.139ubuntu1) hirsute; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + - support mounting of loopback devices via loop*= parameters + - Drop hooks/keymap, scripts/init-top/keymap, and associated code; + console-setup takes care of this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Trim leading whitespaces in dumpe2fs output so date command + is happy in the fixrtc script + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - add squashfs to list of 'most' modules + - Add vfat and nls modules to the initramfs. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. + - ppc64el: enable PowerPC NX Crypto Coprocessor + - resume: only resume when the partition contains a resume image + - Fix resuming a hibernate session from a swapfile + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - Don't recommend pigz, which is in universe. + - local_device_setup: use wait-for-root if it supports the device alias + type + - debian/control: update Vcs-* links for Ubuntu. + - Add support for uppercase and lowercase uuids. + - init: Don't interpret "rootdelay" as a static sleep. + - src/wait-for-root.c, scripts/local: add explicit support for PARTUUID, a + syntax we may prefer for images that might boot without an initramfs. + (previously unnoted) + - scripts/local: Let rootdelay determine the wait-for-root timeout. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el + - Support roottimeout= as the authoritative name for rootdelay= since + the Ubuntu interpretation of rootdelay is *not* a delay and this + causes inconsistent behavior depending on whether the kernel or an + initramfs is interpreting it. + - scripts/functions: by default, when setting up networking, use dhclient + if we're asked to do DHCP explicitly, or if we otherwise are expected + to do things automatically. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and + exit as soon as we get an IP address. + - split out IPv6 options in its own cmdline parameter: ip6= ; always use + dhclient in this case if the value set is anything other than 'off' or + 'none'. Furthermore, parse anything other than 'on', 'dhcp' or 'any' + as the name of an interface. + - rework the stop conditions so that we properly handle the ROUNDTTT + loop, timing out after a short period of time and trying again after + a short sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to + do, or that we've achieved what we wanted (that is, to bring up IPv4, + IPv6, or possibly both). + - return ip=dhcp to the ipconfig use case; if set, then ipconfig will + be run using any interface available, or the BOOTIF if it was set. + - Just let dhclient scan the interfaces if none is specified for IPv6. + (previously unnoted) + - Do not handle ip=rarp specially (ipconfig hasn't supported it for + some time) + - Call dhclient in simple cases for IPv4 (this makes some small + observable changes -- for example ip=bootp will now make a DHCP + request too -- but nothing that seems important). + - Do not let dhclient processes hang around past the pivot and have + them respect the shorter timeouts ipconfig was given. + - Only source ipv4 config in configure_networking() if it exists. + (previously unnoted) + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. + - Run unittests during autopkgtests. + - Add some autopkgtests for the network configuration processing. + - scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. + - Adjust testsuite for correct expected netplan output. + - Add tests to parse netplan.yaml with netplan generate. + - Skip setting mac-address, unless unsupported unpredictable netnames + are used. + - scripts/functions:_render_netplan(): Make configure_networking() + more resilient when called by set -e scripts. + - scripts/functions: include a new option to skip enslaved network + devices. + - Auto activate qeth devices on s390x hosts, when using ip= ip6= command + lines. + - Add support for creating VLANs via vlan=eth0.1:eth0 on kernel + commandline, and as VLAN= conf.d snippet. + - Emit empty dictionary in the ethernets section, for static vlan + configs without any matches, as otherwise it is invalid config. Patch + by mwhudson. + - Skip attempting to chzdev enable VLAN device + - Drop renderer from netplan yaml, such that netplan uses the default + rendered for the target system, i.e. NetworkManager on the + desktop. + - Switch default initramfs compression to lz4, faster than the current + default gzip. + - debian/{control,rules}: Don't run shellcheck on i386 to avoid pulling + ghc into our minimal supported set for the pruned architecture. + - Work out the kernel modules required to support ZFS filesystems and + add them as necessary. + - Add modules for nvme path components on multipath nvme. + - debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files + in /boot. + - Suppress shellcheck SC1010 errors, returning lots of false-positives on + use of 'done' as a word. + - Ensure we have a /usr/sbin directory in initramfs-tools-core + (previously unnoted) + - Drop usage of klibc-utils' fstype in favor of always using udev blkid. + - Use set -a/+a around loading conf snippets, to autoexport hook + configuration variables. This thus allows packaged hooks to configure + each other. + - Fix PATH to include /usr/local. + - Revert upstream commit 0012977; Ubuntu's resume script implementation + diverges from Debian's and this special-case handling of UUID (which is + used as the resume target in the default scenario) is required here. + - Filter out looping or broken symlinks from the initramfs, since they + cause cpio to explode + (previously unnoted) + - Always mount loop-mount filesystems read-write; ntfs-3g and vfat can't + remount yet. + (previously unnoted) + - Provide a clearer error on mount failure of the Windows host filesystem + (previously unnoted) + - Fix copying libgcc_s when there is optimized pthreads installed. + - scripts/local: Re-execute cryptroot local-block script. + - d/tests: Add explicit call to partprobe on net test, specially in + prep-image and run-image. + * Revised mountroot failure support. This is now deprecated and effectively + removed. However, to prevent breakage in other packages the + add_mountroot_fail_hook function is still present as an empty stub. + * Dropped changes, included in Debian: + - Add support for panic=-1 value + - scripts/functions: Prevent printf error carry over if the wrong + console is set. + * Dropped changes, no longer needed: + - Support loading compcache from the initramfs. + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + + -- Dave Jones Sun, 13 Sep 2020 20:42:21 +0000 + initramfs-tools (0.139) unstable; urgency=medium * [9679f0c] debian/tests: Run amd64 tests on either amd64 or generic flavour @@ -159,6 +931,206 @@ -- Ben Hutchings Fri, 11 Sep 2020 20:37:29 +0100 +initramfs-tools (0.137ubuntu12) groovy; urgency=medium + + * d/tests: Add explicit call to partprobe on net test, specially in + prep-image and run-image. (LP: #1893675) + + -- Guilherme G. Piccoli Mon, 31 Aug 2020 18:04:00 -0300 + +initramfs-tools (0.137ubuntu11) groovy; urgency=medium + + * scripts/functions: Prevent printf error carry over if the wrong + console is set. (LP: #1879987) + The function _log_msg() is "void" typed, returning whatever its + last command returns. This function is the basic building block + for all error/warning messages in initramfs-tools. If a bad console + is provided to kernel on command-line, printf returns error, and so + this error is carried over in _log_msg(). Happens that checkfs() + function has a loop that runs forever in this scenario (*if* fsck + is not present in initramfs and "quiet" is not passed in the + command-line). If that happens, boot is stuck and cannot progress. + The simple fix hereby merged is to return zero on _log_msg(). + + * scripts/local: Re-execute cryptroot local-block script. (LP: #1879980) + Currently, if an encrypted rootfs is configured on top of a MD RAID1 + array and such array gets degraded (like a member is removed/failed), + initramfs-tools cannot mount the rootfs and the boot fails. We fix + that issue here by allowing cryptroot script to re-run on local-block + stage, given that mdadm is able to activate a degraded array in that + point. There is a cryptsetup counter-part for this fix, but alone the + initramfs-tools portion is innocuous. + + -- Guilherme G. Piccoli Mon, 03 Aug 2020 18:04:00 -0300 + +initramfs-tools (0.137ubuntu10) groovy; urgency=medium + + * Trim leading whitespaces in dumpe2fs output so date command + is happy in the fixrtc script (LP: #1880968) + + -- Alfonso Sanchez-Beato (email Canonical) Wed, 27 May 2020 16:52:16 +0200 + +initramfs-tools (0.137ubuntu9) groovy; urgency=medium + + * Document add_mountroot_fail_hook correctly. + + -- Dimitri John Ledkov Sat, 30 May 2020 16:33:08 +0100 + +initramfs-tools (0.137ubuntu8) groovy; urgency=medium + + * Partially revert 0.133ubuntu12 upload: + "* scripts/functions: Fix args in the add_mountroot_fail_check function." + The arguments were correct, as used by lvm2 hook. LP: #1871154 + + -- Dimitri John Ledkov Sat, 30 May 2020 14:31:59 +0100 + +initramfs-tools (0.137ubuntu7) groovy; urgency=medium + + * Fix copying libgcc_s when there is optimized pthreads installed. + LP: #1880853 + + -- Dimitri John Ledkov Fri, 29 May 2020 20:06:32 +0100 + +initramfs-tools (0.137ubuntu6) groovy; urgency=medium + + * Fixup previous commit to fix build failure + + -- Gianfranco Costamagna Wed, 27 May 2020 09:57:57 +0200 + +initramfs-tools (0.137ubuntu5) groovy; urgency=medium + + * Skip attempting to chzdev enable VLAN device LP: #1880735 + + -- Dimitri John Ledkov Tue, 26 May 2020 15:07:40 +0100 + +initramfs-tools (0.137ubuntu4) groovy; urgency=medium + + * Drop renderer from netplan yaml, such that netplan uses the default + rendered for the target system, i.e. NetworkManager on the + desktop. LP: #1876884 + + -- Gianfranco Costamagna Wed, 20 May 2020 23:50:52 +0200 + +initramfs-tools (0.137ubuntu3) groovy; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + - support mounting of loopback devices via loop*= parameters + - Drop hooks/keymap, scripts/init-top/keymap, and associated code; + console-setup takes care of this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - add squashfs to list of 'most' modules + - Add vfat and nls modules to the initramfs. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. + - ppc64el: enable PowerPC NX Crypto Coprocessor + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - resume: only resume when the partition contains a resume image + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - local_device_setup: use wait-for-root if it supports the device alias + type + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Support loading compcache from the initramfs. + - debian/control: update Vcs-* links for Ubuntu. + - Set executable bit on resume script in local-premount, which MoM seems + to consistently drop + - Add support for uppercase and lowercase uuids. + - init: Don't interpret "rootdelay" as a static sleep. + - scripts/local: Let rootdelay determine the wait-for-root timeout. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el + - Support roottimeout= as the authoritative name for rootdelay= since + the Ubuntu interpretation of rootdelay is *not* a delay and this + causes inconsistent behavior depending on whether the kernel or an + initramfs is interpreting it. + - scripts/functions: by default, when setting up networking, use dhclient + if we're asked to do DHCP explicitly, or if we otherwise are expected + to do things automatically. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and + exit as soon as we get an IP address. + - scripts/functions: for configure_networking: + - split out IPv6 options in its own cmdline parameter: ip6= ; always + use dhclient in this case if the value set is anything other than + 'off' or 'none'. Furthermore, parse anything other than 'on', 'dhcp' + or 'any' as the name of an interface. + - rework the stop conditions so that we properly handle the ROUNDTTT + loop, timing out after a short period of time and trying again + after a short sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to + do, or that we've achieved what we wanted (that is, to bring up IPv4, + IPv6, or possibly both). + - Do not handle ip=rarp specially (ipconfig hasn't supported it for + some time) + - Call dhclient in simple cases for IPv4 (this makes some small + observable changes -- for example ip=bootp will now make a DHCP + request too -- but nothing that seems important). + - Do not let dhclient processes hang around past the pivot and have + them respect the shorter timeouts ipconfig was given. + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. + - Fix resuming a hibernate session from a swapfile + - scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. + - Add some autopkgtests for the network configuration processing. + - Work out the kernel modules required to support ZFS filesystems and + add them as necessary. + - debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files + in /boot. + - scripts/functions: include a new option to skip enslaved network + devices. + - Fix PATH to include /usr/local. + - Add modules for nvme path components on multipath nvme. + - Don't recommend pigz, which is in universe. + - Suppress shellcheck SC1010 errors, returning lots of false-positives on + use of 'done' as a word. + - Drop usage of klibc-utils' fstype in favor of always using udev blkid. + - Use set -a/+a around loading conf snippets, to autoexport hook + configuration variables. This thus allows packaged hooks to configure + each other. + - Auto activate qeth devices on s390x hosts, when using ip= ip6= command + lines. + - Switch default initramfs compression to lz4, faster than the current + default gzip. + - Add support for creating VLANs via vlan=eth0.1:eth0 on kernel + commandline, and as VLAN= conf.d snippet. + - Add support for panic=-1 value + - debian/{control,rules}: Don't run shellcheck on i386 to avoid pulling + ghc into our minimal supported set for the pruned architecture. + - Adjust testsuite for correct expected netplan output. + - Add tests to parse netplan.yaml with netplan generate. + - Run unittests during autopkgtests. + - Emit empty dictionary in the ethernets section, for static vlan + configs without any matches, as otherwise it is invalid config. Patch + by mwhudson. + - Skip setting mac-address, unless unsupported unpredictable netnames + are used. + - Revert upstream commit 0012977; Ubuntu's resume script implementation + diverges from Debian's and this special-case handling of UUID (which is + used as the resume target in the default scenario) is required here. + LP: #1869996. + - scripts/functions:_render_netplan(): Make configure_networking() + more resilient when called by set -e scripts. LP: #1868310. + + -- Gianfranco Costamagna Sun, 17 May 2020 18:31:33 +0200 + initramfs-tools (0.137) unstable; urgency=medium [ Ben Hutchings ] @@ -179,6 +1151,179 @@ -- Ben Hutchings Tue, 28 Apr 2020 04:56:17 +0100 +initramfs-tools (0.136ubuntu8) groovy; urgency=medium + + * Drop renderer from netplan yaml, such that netplan uses the default + rendered for the target system, i.e. NetworkManager on the + desktop. LP: #1876884 + + -- Dimitri John Ledkov Wed, 20 May 2020 15:41:09 +0100 + +initramfs-tools (0.136ubuntu7) groovy; urgency=medium + + * Cherry-pick changes from Debian + - [f6133e1] Fix new shellcheck warnings around unquoted parameter expansion + (Closes: #958851) + + -- Gianfranco Costamagna Fri, 08 May 2020 11:49:12 +0200 + +initramfs-tools (0.136ubuntu6) focal; urgency=medium + + * Adjust testsuite for correct expected netplan output. + * Add tests to parse netplan.yaml with netplan generate. + * Run unittests during autopkgtests. + + -- Dimitri John Ledkov Thu, 09 Apr 2020 08:35:46 +0100 + +initramfs-tools (0.136ubuntu5) focal; urgency=medium + + * Emit empty dictionary in the ethernets section, for static vlan + configs without any matches, as otherwise it is invalid config. Patch + by mwhudson. + + -- Dimitri John Ledkov Wed, 08 Apr 2020 21:22:40 +0100 + +initramfs-tools (0.136ubuntu4) focal; urgency=medium + + * Skip setting mac-address, unless unsupported unpredictable netnames + are used. + + -- Dimitri John Ledkov Sat, 04 Apr 2020 23:39:59 +0100 + +initramfs-tools (0.136ubuntu3) focal; urgency=medium + + * Revert upstream commit 0012977; Ubuntu's resume script implementation + diverges from Debian's and this special-case handling of UUID (which is + used as the resume target in the default scenario) is required here. + LP: #1869996. + + -- Steve Langasek Wed, 01 Apr 2020 21:33:18 -0700 + +initramfs-tools (0.136ubuntu2) focal; urgency=medium + + * scripts/functions:_render_netplan(): Make configure_networking() + more resilient when called by set -e scripts. LP: #1868310. + + -- dann frazier Fri, 20 Mar 2020 14:09:47 -0600 + +initramfs-tools (0.136ubuntu1) focal; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + - support mounting of loopback devices via loop*= parameters + - Drop hooks/keymap, scripts/init-top/keymap, and associated code; + console-setup takes care of this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - add squashfs to list of 'most' modules + - Add vfat and nls modules to the initramfs. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. + - ppc64el: enable PowerPC NX Crypto Coprocessor + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - resume: only resume when the partition contains a resume image + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - local_device_setup: use wait-for-root if it supports the device alias + type + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Support loading compcache from the initramfs. + - debian/control: update Vcs-* links for Ubuntu. + - Set executable bit on resume script in local-premount, which MoM seems + to consistently drop + - Add support for uppercase and lowercase uuids. + - init: Don't interpret "rootdelay" as a static sleep. + - scripts/local: Let rootdelay determine the wait-for-root timeout. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el + - Support roottimeout= as the authoritative name for rootdelay= since + the Ubuntu interpretation of rootdelay is *not* a delay and this + causes inconsistent behavior depending on whether the kernel or an + initramfs is interpreting it. + - scripts/functions: by default, when setting up networking, use dhclient + if we're asked to do DHCP explicitly, or if we otherwise are expected + to do things automatically. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and + exit as soon as we get an IP address. + - scripts/functions: for configure_networking: + - split out IPv6 options in its own cmdline parameter: ip6= ; always + use dhclient in this case if the value set is anything other than + 'off' or 'none'. Furthermore, parse anything other than 'on', 'dhcp' + or 'any' as the name of an interface. + - rework the stop conditions so that we properly handle the ROUNDTTT + loop, timing out after a short period of time and trying again + after a short sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to + do, or that we've achieved what we wanted (that is, to bring up IPv4, + IPv6, or possibly both). + - Do not handle ip=rarp specially (ipconfig hasn't supported it for + some time) + - Call dhclient in simple cases for IPv4 (this makes some small + observable changes -- for example ip=bootp will now make a DHCP + request too -- but nothing that seems important). + - Do not let dhclient processes hang around past the pivot and have + them respect the shorter timeouts ipconfig was given. + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. + - Fix resuming a hibernate session from a swapfile + - scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. + - Add some autopkgtests for the network configuration processing. + - Work out the kernel modules required to support ZFS filesystems and + add them as necessary. + - debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files + in /boot. + - scripts/functions: include a new option to skip enslaved network + devices. + - Fix PATH to include /usr/local. + - Add modules for nvme path components on multipath nvme. + - Don't recommend pigz, which is in universe. + - Suppress shellcheck SC1010 errors, returning lots of false-positives on + use of 'done' as a word. + - Drop usage of klibc-utils' fstype in favor of always using udev blkid. + - Use set -a/+a around loading conf snippets, to autoexport hook + configuration variables. This thus allows packaged hooks to configure + each other. + - Auto activate qeth devices on s390x hosts, when using ip= ip6= command + lines. + - Switch default initramfs compression to lz4, faster than the current + default gzip. + - Add support for creating VLANs via vlan=eth0.1:eth0 on kernel + commandline, and as VLAN= conf.d snippet. + - Add support for panic=-1 value + - debian/{control,rules}: Don't run shellcheck on i386 to avoid pulling + ghc into our minimal supported set for the pruned architecture. + - Cherrypick upstream patch to include libgcc_s for libpthread. + - Handle both libgcc1 and libgcc-s1 locations. + * Dropped changes, included in Debian: + - Patch unmkinitramfs to cat possible lz4 archives first, as lz4 is + particular about enforcing .lz4 file extensions when operating on + files. + - mkinitramfs: Copy modules.builtin.bin into initramfs + * Dropped changes, no longer needed: + - remove Breaks on pre-bionic isc-dhcp-client. + * src/wait-for-root.c, scripts/local: add explicit support for PARTUUID, a + syntax we may prefer for images that might boot without an initramfs. + * Drop manual modprobe of filesystem modules, deemed redundant upstream + + -- Steve Langasek Mon, 17 Feb 2020 17:19:14 -0800 + initramfs-tools (0.136) unstable; urgency=medium [ Mathieu Malaterre ] @@ -282,6 +1427,220 @@ -- Ben Hutchings Sun, 28 Jul 2019 01:10:56 +0100 +initramfs-tools (0.133ubuntu15) focal; urgency=medium + + * mkinitramfs: Copy modules.builtin.bin into initramfs (LP: #1863261) + + -- Rafael David Tinoco Fri, 14 Feb 2020 15:05:29 +0000 + +initramfs-tools (0.133ubuntu14) focal; urgency=medium + + * Handle both libgcc1 and libgcc-s1 locations. + + -- Dimitri John Ledkov Tue, 04 Feb 2020 23:51:00 +0000 + +initramfs-tools (0.133ubuntu13) focal; urgency=medium + + * Cherrypick upstream patch to include libgcc_s for libpthread. LP: + #1861757 + + -- Dimitri John Ledkov Tue, 04 Feb 2020 13:38:20 +0000 + +initramfs-tools (0.133ubuntu12) focal; urgency=medium + + * debian/{control,rules}: Don't run shellcheck on i386 to avoid pulling + ghc into our minimal supported set for the newly-pruned architecture. + * scripts/functions: Fix args in the add_mountroot_fail_check function. + + -- Adam Conrad Fri, 29 Nov 2019 12:16:07 -0700 + +initramfs-tools (0.133ubuntu11) focal; urgency=medium + + * hooks/fixrtc, debian/rules: Stop pulling in coreutils date and hwclock, + instead using the slimmer and newly built-in busybox-initramfs applets. + + -- Adam Conrad Mon, 04 Nov 2019 10:21:05 -0700 + +initramfs-tools (0.133ubuntu10) eoan; urgency=medium + + * Add support for panic=-1 value (LP: #1831252) + + -- Julian Andres Klode Thu, 05 Sep 2019 12:31:43 +0200 + +initramfs-tools (0.133ubuntu9) eoan; urgency=medium + + * Add support for creating VLANs via vlan=eth0.1:eth0 on kernel + commandline, and as VLAN= conf.d snippet. LP: #1382054 + + -- Dimitri John Ledkov Fri, 14 Jun 2019 14:46:05 +0100 + +initramfs-tools (0.133ubuntu8) eoan; urgency=medium + + * Switch back to lz4 by default. + * Patch unmkinitramfs to cat possible lz4 archives first, as lz4 is + particular about enforcing .lz4 file extensions when operating on + files. LP: #1832108 + + -- Dimitri John Ledkov Mon, 10 Jun 2019 00:21:17 +0100 + +initramfs-tools (0.133ubuntu6) eoan; urgency=medium + + * Revert lz4 by default, and switch to gzip, as lsinitramfs and + unmkinitramfs tools fails on lz4 compressed initrds. Regression bug + https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1832108 + + -- Dimitri John Ledkov Sat, 08 Jun 2019 23:03:00 +0100 + +initramfs-tools (0.133ubuntu5) eoan; urgency=medium + + * Correctly serialize previously absent static ip configuration + (declared as protocol 'none' by ipconfig) into runtime netplan + yaml. LP: #1832042 + * Adjust testsuite sample file to match reality + * Set executable bit on resume script in local-premount + + -- Dimitri John Ledkov Fri, 07 Jun 2019 21:56:33 +0100 + +initramfs-tools (0.133ubuntu4) eoan; urgency=medium + + * Switch default initramfs compression to lz4, faster than the current + default gzip. LP: #1831736 + + -- Dimitri John Ledkov Wed, 05 Jun 2019 13:23:29 +0100 + +initramfs-tools (0.133ubuntu3) eoan; urgency=medium + + * Auto activate qeth devices on s390x hosts, when using ip= ip6= command + lines. + + -- Dimitri John Ledkov Wed, 22 May 2019 00:46:49 +0100 + +initramfs-tools (0.133ubuntu2) eoan; urgency=medium + + * Use set -a/+a around loading conf snippets, to autoexport hook + configuration variables. This thus allows packaged hooks to configure + each other. + + -- Dimitri John Ledkov Fri, 17 May 2019 09:51:24 +0200 + +initramfs-tools (0.133ubuntu1) eoan; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/control: Breaks isc-dhcp-client << 4.3.3-5ubuntu14, since we're + calling the dhclient binary in scripts/functions now. + - Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + - support mounting of loopback devices via loop*= parameters + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - add squashfs to list of 'most' modules + - Add vfat modules to the initramfs. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. + - ppc64el: enable PowerPC NX Crypto Coprocessor + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - resume: only resume when the partition contains a resume image + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - local_device_setup: use wait-for-root if it supports the device alias + type + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Support loading compcache from the initramfs. + - debian/control: update Vcs-* links for Ubuntu. + - Add support for uppercase and lowercase uuids. + - init: Don't interpret "rootdelay" as a static sleep. + - scripts/local: Let rootdelay determine the wait-for-root timeout. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el + - scripts/functions: by default, when setting up networking, use dhclient + if we're asked to do DHCP explicitly, or if we otherwise are expected + to do things automatically. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and + exit as soon as we get an IP address. + - scripts/functions: for configure_networking: + - split out IPv6 options in its own cmdline parameter: ip6= ; always use + dhclient in this case if the value set is anything other than 'off' or + 'none'. Furthermore, parse anything other than 'on', 'dhcp' or 'any' + as the name of an interface. + - rework the stop conditions so that we properly handle the ROUNDTTT + loop, timing out after a short period of time and trying again after + a short sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to + do, or that we've achieved what we wanted (that is, to bring up IPv4, + IPv6, or possibly both). + - return ip=dhcp to the ipconfig use case; if set, then ipconfig will + be run using any interface available, or the BOOTIF if it was set. + - Do not handle ip=rarp specially (ipconfig hasn't supported it for + some time) + - Call dhclient in simple cases for IPv4 (this makes some small + observable changes -- for example ip=bootp will now make a DHCP + request too -- but nothing that seems important). + - Do not let dhclient processes hang around past the pivot and have + them respect the shorter timeouts ipconfig was given. + - Only source ipv4 config in configure_networking() if it exists. + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. + - Fix resuming a hibernate session from a swapfile + - scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. + - Add some autopkgtests for the network configuration processing. + - Work out the kernel modules required to support ZFS filesystems and + add them as necessary. + - debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files + in /boot. + - scripts/functions: include a new option to skip enslaved network + devices. + - Fix PATH to include /usr/local. + - Add modules for nvme path components on multipath nvme. + * Dropped changes, obsoleted in Debian: + - Set takeover=1 in update-initramfs. + * Dropped changes, included in Debian: + - resume: announce resume via plymouth if available + - Cherry-pick change from git to quiet error from rmdir on every call. + * Dropped changes, no longer needed: + - Retain cryptopts= compatibility option; nothing uses this variable, + cryptsetup initramfs script does its own parsing of /proc/cmdline. + - Retain netboot= compatibility option: unclear what used this, nothing + uses it now. + - Drop unused resumedelay commandline option. + - Drop obsolete reference to usplash in the code. + * Don't recommend pigz, which is in universe. We continue to use gzip as + the preferred implementation in main. + * Drop scripts/init-top/keymap, which is also redundant with the + console-setup implementation in Ubuntu. + * Fix minor issues in the Ubuntu-specific code as identified by + shellcheck. + * Suppress shellcheck SC1010 errors, returning lots of false-positives on + use of 'done' as a word. + * Move our build-time tests to the dh_override_auto_test target along with + Debian's. + * Support roottimeout= as an alias for rootdelay= since the Ubuntu + interpretation of rootdelay is *not* a delay and this causes + inconsistent behavior depending on whether the kernel or an initramfs + is interpreting it. + * Drop usage of klibc-utils' fstype in favor of always using udev blkid; + historical claims of relative "robustness" are no longer relevant as + udev is used everywhere and we don't need to be dependent on klibc. + + -- Steve Langasek Mon, 29 Apr 2019 00:24:49 -0700 + initramfs-tools (0.133) unstable; urgency=medium [ Ben Hutchings ] @@ -386,6 +1745,244 @@ -- Ben Hutchings Thu, 26 Jul 2018 01:18:39 +0800 +initramfs-tools (0.131ubuntu19) disco; urgency=medium + + * Add modules for nvme path components on multipath nvme. LP: #1778844 + + -- Thadeu Lima de Souza Cascardo Tue, 26 Mar 2019 14:49:29 -0300 + +initramfs-tools (0.131ubuntu18) disco; urgency=medium + + * Explicitly record net autopkgtest dependency on isc-dhcp-client. + * Make errors in net autopkgtest a little more obvious. + + -- Michael Hudson-Doyle Thu, 14 Mar 2019 09:28:46 +1300 + +initramfs-tools (0.131ubuntu17) disco; urgency=medium + + * Fix PATH to include /usr/local. LP: #1814355 + + -- Dimitri John Ledkov Tue, 12 Feb 2019 13:16:06 +0000 + +initramfs-tools (0.131ubuntu16) disco; urgency=medium + + * scripts/functions: include a new option to skip enslaved network + devices. (LP: #1802591) + Include the new variable NETWORK_SKIP_ENSLAVED. When set to a + value different than "0", this variable will cause any enslaved + network devices to be skipped from the list of netbootable + devices. This variable can be set via the configuration files + under /etc/initramfs-tools/ or via any configuration file under + the initrd directory /conf/conf.d/ via a hook script. + + -- Marcelo Henrique Cerri Mon, 28 Jan 2019 10:02:53 -0200 + +initramfs-tools (0.131ubuntu15) cosmic; urgency=medium + + * Cherry-pick change from git to quiet error from rmdir on every call. + + -- Adam Conrad Mon, 15 Oct 2018 11:54:59 -0600 + +initramfs-tools (0.131ubuntu14) cosmic; urgency=medium + + * hooks/framebuffer: manual_add_modules vboxvideo to support graphical + boot in VirtualBox. LP: #1796822 + + -- Dimitri John Ledkov Wed, 10 Oct 2018 11:06:00 +0100 + +initramfs-tools (0.131ubuntu13) cosmic; urgency=medium + + * scripts/local-premount/fixrtc: + - Hide stderr when running "hwclock -s" to avoid ugly message: + can't open '/dev/misc/rtc': No such file or directory + on pi2 (and possible more PIs) where there is no /dev/rtc of + any kind. + + -- Michael Vogt Mon, 08 Oct 2018 11:38:36 +0200 + +initramfs-tools (0.131ubuntu12) cosmic; urgency=medium + + * Do not include graphical drivers when FRAMEBUFFER is not set (LP: #1561643) + + -- Thadeu Lima de Souza Cascardo Thu, 13 Sep 2018 08:49:11 -0300 + +initramfs-tools (0.131ubuntu11) cosmic; urgency=medium + + * debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files + in /boot. (LP: #1791959) + + -- Tiago Stürmer Daitx Wed, 12 Sep 2018 12:06:58 +0000 + +initramfs-tools (0.131ubuntu10) cosmic; urgency=medium + + * Tidy up configure_networking a bit: + - Just let dhclient scan the interfaces if none is specified for IPv6. + - Do not handle ip=rarp specially (ipconfig hasn't supported it for some + time) + - Call dhclient in simple cases for IPv4 (this makes some small observable + changes -- for example ip=bootp will now make a DHCP request too -- but + nothing that seems important). + - Do not let dhclient processes hang around past the pivot and have them + respect the shorter timeouts ipconfig was given. + * debian/tests/control: add some dependencies that happened to already be + installed on the test runners used so far. + + -- Michael Hudson-Doyle Thu, 06 Sep 2018 14:23:52 +1200 + +initramfs-tools (0.131ubuntu9) cosmic; urgency=medium + + [ John Gallagher ] + * Work out the kernel modules required to support ZFS filesystems and add + them as necessary. (LP: #1661629) + + -- Mathieu Trudel-Lapierre Mon, 20 Aug 2018 10:52:20 -0400 + +initramfs-tools (0.131ubuntu8) cosmic; urgency=medium + + * d/tests: only run on amd64 and i386 for now. + + -- Michael Hudson-Doyle Thu, 09 Aug 2018 16:12:44 +1200 + +initramfs-tools (0.131ubuntu7) cosmic; urgency=medium + + * d/tests: Fix kernel location again. + + -- Michael Hudson-Doyle Thu, 09 Aug 2018 15:01:19 +1200 + +initramfs-tools (0.131ubuntu6) cosmic; urgency=medium + + * d/tests: Use virtio for nic as it is supported everywhere, find kernel on + ppc64el, explicitly depend on curl, pass -machine virt on arm64. + + -- Michael Hudson-Doyle Thu, 09 Aug 2018 12:05:33 +1200 + +initramfs-tools (0.131ubuntu5) cosmic; urgency=medium + + * d/tests/control: depend on qemu-system, not just qemu-system-x86. + + -- Michael Hudson-Doyle Thu, 09 Aug 2018 11:16:12 +1200 + +initramfs-tools (0.131ubuntu4) cosmic; urgency=medium + + * Add some autopkgests for the network configuration processing. + (LP: #1786130) + + -- Michael Hudson-Doyle Wed, 08 Aug 2018 12:33:21 +1200 + +initramfs-tools (0.131ubuntu3) cosmic; urgency=medium + + * Drop including mlx4 and mlx5 InfiniBand modules. Version 0.131 uses + hidden_dep_add_modules() for conditional inclusion instead. + + -- Benjamin Drung Wed, 25 Jul 2018 11:39:00 +0200 + +initramfs-tools (0.131ubuntu2) cosmic; urgency=medium + + * Fix permissions on /usr/share/initramfs-tools/init, which were mangled + by merge-o-matic. LP: #1782854. + + -- Steve Langasek Fri, 20 Jul 2018 22:54:00 -0400 + +initramfs-tools (0.131ubuntu1) cosmic; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/control: Breaks isc-dhcp-client << 4.3.3-5ubuntu14, since we're + calling the dhclient binary in scripts/functions now. + - Retain netboot= compatibility option. + - Retain cryptopts= compatibility option. + - Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + - support mounting of loopback devices via loop*= parameters + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Set takeover=1 in update-initramfs. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - add squashfs to list of 'most' modules + - Add vfat modules to the initramfs. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. + - ppc64el: enable PowerPC NX Crypto Coprocessor + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el + - resume: only resume when the partition contains a resume image + - resume: announce resume via plymouth if available + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - local_device_setup: use wait-for-root if it supports the device alias + type + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Support loading compcache from the initramfs. + - debian/control: update Vcs-* links for Ubuntu. + - Add support for uppercase and lowercase uuids. + - init: Don't interpret "rootdelay" as a static sleep, reverting Debian + commit ab91306. + - scripts/local: Let rootdelay determine the wait-for-root timeout instead + of the shell polling loop that comes after it, as we should never hit the + latter in Ubuntu (where we require udev everywhere). + - scripts/functions: by default, when setting up networking, use dhclient + if we're asked to do DHCP explicitly, or if we otherwise are expected + to do things automatically. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and + exit as soon as we get an IP address. + - scripts/functions: for configure_networking: + - split out IPv6 options in its own cmdline parameter: ip6= ; always use + dhclient in this case if the value set is anything other than 'off' or + 'none'. Furthermore, parse anything other than 'on', 'dhcp' or 'any' + as the name of an interface. + - rework the stop conditions so that we properly handle the ROUNDTTT + loop, timing out after a short period of time and trying again after + a short sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to + do, or that we've achieved what we wanted (that is, to bring up IPv4, + IPv6, or possibly both). + - return ip=dhcp to the ipconfig use case; if set, then ipconfig will + be run using any interface available, or the BOOTIF if it was set. + - Only source ipv4 config in configure_networking() if it exists. + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. + - Include mlx4 and mlx5 InfiniBand modules + - Fix resuming a hibernate session from a swapfile + - scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. + * Dropped changes, no longer needed: + - drop Breaks: against upstart; no longer present in Ubuntu for bionic or + later. + - When receiving "recovery" on cmdline, start upstart with --startup- + event=recovery + - hook-functions: include backported bnxt driver; this was a backport to + trusty and xenial, no reason to continue carrying this special case + * Dropped changes, included in Debian: + - hook-functions: include vmd driver. + - hooks/resume: don't generate RESUME config pointing to + randomly-crypted swap devices. + - hooks/resume: cherry-pick patch from upstream git to fix + auto-configuration of resume devices that are on LVM; always refer to + them by name, never by UUID. + * Change netplan tests to use 'example1' as a device name, so that it + won't collide with real devices on the system and result in unexpected + output; this allows us to re-enable the tests on non-x86 architectures. + + -- Steve Langasek Thu, 19 Jul 2018 10:26:51 -0400 + initramfs-tools (0.131) unstable; urgency=medium [ Ben Hutchings ] @@ -475,6 +2072,171 @@ -- Ben Hutchings Thu, 19 Jul 2018 01:06:01 +0100 +initramfs-tools (0.130ubuntu10) cosmic; urgency=medium + + * Avoid redundant call to dmsetup. + + -- Steve Langasek Thu, 14 Jun 2018 22:26:51 -0700 + +initramfs-tools (0.130ubuntu9) cosmic; urgency=medium + + * hooks/resume: cherry-pick patch from upstream git to fix + auto-configuration of resume devices that are on LVM; always refer to + them by name, never by UUID. LP: #1768230. + + -- Steve Langasek Thu, 14 Jun 2018 22:23:46 -0700 + +initramfs-tools (0.130ubuntu8) cosmic; urgency=medium + + * hooks/resume: minor improvements to the hook based on Debian feedback. + + -- Steve Langasek Mon, 11 Jun 2018 10:39:25 -0700 + +initramfs-tools (0.130ubuntu7) cosmic; urgency=medium + + * hooks/resume: don't generate RESUME config pointing to randomly-crypted + swap devices. LP: #1771962. + + -- Steve Langasek Fri, 08 Jun 2018 21:22:04 -0700 + +initramfs-tools (0.130ubuntu6) cosmic; urgency=medium + + * Fix formatting for the generated netplan config: headers were missing. + + -- Mathieu Trudel-Lapierre Thu, 10 May 2018 12:12:03 -0400 + +initramfs-tools (0.130ubuntu5) cosmic; urgency=medium + + * debian/rules: skip tests on non-x86 architectures, where they then to be + false negatives (extra macaddress matching makes the tests fail to match + expected values). + + -- Mathieu Trudel-Lapierre Thu, 10 May 2018 11:35:56 -0400 + +initramfs-tools (0.130ubuntu4) cosmic; urgency=medium + + [ Scott Moser ] + * scripts/functions: write netplan config files to /run/netplan for + network devices configured with configure_networking. (LP: #1713803) + + [ Mathieu Trudel-Lapierre ] + * scripts/functions: add 'critical: true' parameter; requires netplan + 0.37. (LP: #1713803) + + -- Mathieu Trudel-Lapierre Tue, 08 May 2018 17:15:53 -0400 + +initramfs-tools (0.130ubuntu3) bionic; urgency=medium + + * Fix resuming a hibernate session from a swapfile (LP: #1644975) + + -- Mario Limonciello Tue, 20 Feb 2018 15:34:46 -0600 + +initramfs-tools (0.130ubuntu2) bionic; urgency=medium + + * Include mlx4 and mlx5 InfiniBand modules (Closes: #871595, LP: #1719302) + + -- Benjamin Drung Sat, 27 Jan 2018 12:51:45 +0100 + +initramfs-tools (0.130ubuntu1) bionic; urgency=medium + + * Merge from Debian unstable. Remaining delta: + - Set takeover=1 in update-initramfs. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - When receiving "recovery" on cmdline, start upstart with --startup- + event=recovery (LP: #575469) + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. (LP: #917135) + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Retain netboot= compatibility option. + - Retain cryptopts= compatibility option. + - Add vfat modules to the initramfs. + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el (LP: #1326199) + - ppc64el: enable PowerPC NX Crypto Coprocessor (LP: #1454687) + - resume: only resume when the partition contains a resume image + - resume: announce resume via plymouth if available + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Support loading compcache from the initramfs. + - debian/control: update Vcs-* links for Ubuntu. + - add squashfs to list of 'most' modules (LP: #1501834) + - drop Breaks: against upstart as we use it in user sessions + - support mounting of loopback devices via loop*= parameters + - local_device_setup: use wait-for-root if it supports the device alias + type + - initramfs-tools-core uses initramfs-tools-bin, add dependency (LP: + #1543244) + - Add support for uppercase and lowercase uuids. (LP: #1548120) + - wait-for-root.c: Drop check if device is queued in udev (LP: #1539195) + - hook-functions: add hyperv-keyboard for Generation 2 VMs (LP: #1567107) + - init: fix redirection for /bin/hostname command + - init: drop -b from hostname as it is not supported by busybox + - Ensure we have a /usr/sbin directory in initramfs-tools-core + - Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + - init: Revert Debian commit ab91306. Interpreting "rootdelay" as a static + sleep is complete nonsense. (LP: #1615751) + - scripts/local: Let rootdelay determine the wait-for-root timeout instead + of the shell polling loop that comes after it, as we should never hit the + latter in Ubuntu (where we require udev everywhere). Thanks to Scott Moser + for this patch! + - scripts/functions: by default, when setting up networking, use dhclient if + we're asked to do DHCP explicitly, or if we otherwise are expected to do + things automatically. This way we can bring up both IPv4 and IPv6, as + klibc doesn't support IPv6. (LP: #1621507) + - debian/control: Breaks isc-dhcp-client << 4.3.3-5ubuntu14, since we're + calling the dhclient binary in scripts/functions now. + - scripts/functions: make sure we can try to start all available and + suitable interfaces if ip= isn't set when setting up the network, and exit + as soon as we get an IP address. This retains the old behavior from + ipconfig when ip= is unset, for really simple remote-root scenarios. + (LP: #1628306) + - scripts/functions: for configure_networking: + - split out IPv6 options in its own cmdline parameter: ip6= ; always use + dhclient in this case if the value set is anything other than 'off' or + 'none'. Furthermore, parse anything other than 'on', 'dhcp' or 'any' as + the name of an interface. (LP: #1621507) + - rework the stop conditions so that we properly handle the ROUNDTTT loop, + timing out after a short period of time and trying again after a short + sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to do, + or that we've achieved what we wanted (that is, to bring up IPv4, IPv6, + or possibly both). + - return ip=dhcp to the ipconfig use case; if set, then ipconfig will be + run using any interface available, or the BOOTIF if it was set. + - Only source ipv4 config in configure_networking() if it exists. + - Use configure_networking from yakkety-proposed (SRU), addressing various + review feedback. dhclient -4 will be reconsidered later. LP: #1621507 + - hook-functions: include backported bnxt driver. (LP: #1712491) + - hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. (LP: #1714308) + - hook-functions: include vmd driver. (LP: #1703339) + * Dropped changes: + - Make /etc/mtab a symlink to /proc/mounts on startup, since e.g. + current ntfs-3g doesn't work otherwise. (fixed in 0.126) + + -- Benjamin Drung Fri, 05 Jan 2018 14:44:02 +0100 + initramfs-tools (0.130) unstable; urgency=medium * [5b7c092] hooks/resume: Fix validation of resume devices specified by @@ -567,6 +2329,190 @@ -- Ben Hutchings Thu, 15 Dec 2016 22:43:05 +0000 +initramfs-tools (0.125ubuntu13) bionic; urgency=medium + + [ Oliver Grawert ] + * make fixrtc catch "n/a" string and fall back to a sane value for the date + command instead (LP: #1623125) + + -- Michael Vogt Wed, 20 Dec 2017 09:44:43 +0100 + +initramfs-tools (0.125ubuntu12) artful; urgency=medium + + * hook-functions: include vmd driver. (LP: #1703339) + + -- Seth Forshee Fri, 13 Oct 2017 14:09:26 -0500 + +initramfs-tools (0.125ubuntu11) artful; urgency=medium + + * hook-functions, mkinitramfs, scripts/functions: support usage of dns + after configure_networking. (LP: #1714308) + + -- Scott Moser Tue, 19 Sep 2017 12:54:18 -0400 + +initramfs-tools (0.125ubuntu10) artful; urgency=low + + * hook-functions: include backported bnxt driver. (LP: #1712491) + + -- Andy Whitcroft Wed, 30 Aug 2017 11:28:51 +0100 + +initramfs-tools (0.125ubuntu9) zesty; urgency=medium + + [ Mathieu Trudel-Lapierre ] + * Use configure_networking from yakkety-proposed (SRU), addressing various + review feedback. dhclient -4 will be reconsidered later. LP: #1621507 + + -- LaMont Jones Thu, 15 Dec 2016 15:14:57 -0700 + +initramfs-tools (0.125ubuntu8) zesty; urgency=medium + + [ LaMont Jones ] + * Only source ipv4 config in configure_networking() if it exists. + + [ Mathieu Trudel-Lapierre ] + * init: hey, we also need to actually will in IP6 with what someone passes + at the command-line in ip6=. + + -- Mathieu Trudel-Lapierre Thu, 03 Nov 2016 16:03:25 -0600 + +initramfs-tools (0.125ubuntu7) zesty; urgency=medium + + * scripts/functions: for configure_networking: + - split out IPv6 options in its own cmdline parameter: ip6= ; always use + dhclient in this case if the value set is anything other than 'off' or + 'none'. Furthermore, parse anything other than 'on', 'dhcp' or 'any' as + the name of an interface. (LP: #1621507) + - rework the stop conditions so that we properly handle the ROUNDTTT loop, + timing out after a short period of time and trying again after a short + sleep. + - add a 'done' parameter for both ip= and ip6= so that we can properly + exit the ROUNDTTT loop once we know that either there is no work to do, + or that we've achieved what we wanted (that is, to bring up IPv4, IPv6, + or possibly both). + - return ip=dhcp to the ipconfig use case; if set, then ipconfig will be + run using any interface available, or the BOOTIF if it was set. + + -- Mathieu Trudel-Lapierre Mon, 17 Oct 2016 17:05:49 -0400 + +initramfs-tools (0.125ubuntu5) yakkety; urgency=medium + + * scripts/functions: make sure we can try to start all available and suitable + interfaces if ip= isn't set when setting up the network, and exit as soon + as we get an IP address. This retains the old behavior from ipconfig when + ip= is unset, for really simple remote-root scenarios. (LP: #1628306) + + -- Mathieu Trudel-Lapierre Tue, 27 Sep 2016 18:25:50 -0400 + +initramfs-tools (0.125ubuntu4) yakkety; urgency=medium + + * scripts/functions: by default, when setting up networking, use dhclient if + we're asked to do DHCP explicitly, or if we otherwise are expected to do + things automatically. This way we can bring up both IPv4 and IPv6, as + klibc doesn't support IPv6. (LP: #1621507) + * debian/control: Breaks isc-dhcp-client << 4.3.3-5ubuntu14, since we're + calling the dhclient binary in scripts/functions now. + + -- Mathieu Trudel-Lapierre Wed, 21 Sep 2016 14:01:57 -0400 + +initramfs-tools (0.125ubuntu3) yakkety; urgency=medium + + * init: Revert Debian commit ab91306. Interpreting "rootdelay" as a static + sleep is complete nonsense. (LP: #1615751) + * scripts/local: Let rootdelay determine the wait-for-root timeout instead + of the shell polling loop that comes after it, as we should never hit the + latter in Ubuntu (where we require udev everywhere). Thanks to Scott Moser + for this patch! + + -- Martin Pitt Fri, 26 Aug 2016 12:54:37 +0200 + +initramfs-tools (0.125ubuntu2) yakkety; urgency=medium + + * Make busybox-initramfs a real runtime dependency, fixing + kernel install failures with cryptsetup + + -- Gianfranco Costamagna Fri, 29 Jul 2016 11:09:50 +0200 + +initramfs-tools (0.125ubuntu1) yakkety; urgency=medium + + * Merge with debian 0.125 (LP: #1599915). Remaining delta: + - Set takeover=1 in update-initramfs. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Ignore errors from iscan and iscan-data hooks. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - When receiving "recovery" on cmdline, start upstart with --startup- + event=recovery (LP: #575469) + - Make /etc/mtab a symlink to /proc/mounts on startup, since e.g. + current ntfs-3g doesn't work otherwise. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. (LP: #917135) + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Retain netboot= compatibility option. + - Retain cryptopts= compatibility option. + - Add vfat modules to the initramfs. + - Maintain compatibility with pre- /run configurations + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el (LP: #1326199) + - fixrtc: wait for udev to settle to expose device symlinks + - fixrtc: handle hwclock -s failures safely + - fixrtc: support busybox, handle last mount time on system partition, + expose fs create time (LP: #1420473) + - fixrtc: avoid using xargs, wait-for-root before examining + - fixrtc: suppress /dev/ram as a root when using systempart (LP: + #1443329) + - ppc64el: enable PowerPC NX Crypto Coprocessor + - resume: only resume when the partition contains a resume image + - resume: announce resume via plymouth if available + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Support loading compcache from the initramfs. + - debian/control: update Vcs-* links for Ubuntu. + - hook-functions: fix PowerPC NX Crypto Coprocessor support (LP: + #1454687) + - Drop: Maintain compatibility with pre- /run configurations (LP: + #1485752) + - Drop: Ignore errors from iscan and iscan-data hooks (LP: #1485562) + - add squashfs to list of 'most' modules (LP: #1501834) + - drop Breaks: against upstart as we use it in user sessions + - support mounting of loopback devices via loop*= parameters + - local_device_setup: use wait-for-root if it supports the device alias + type + - Fix vfat support from initramfs (LP: #1540522) + - initramfs-tools-core uses initramfs-tools-bin add dependency (LP: + #1543244) + - Add support for uppercase and lowercase uuids. (LP: #1548120) + - uuids: busybox tr does not support symbolic ranges expand manually + (LP: #1548120) + - wait-for-root.c: Drop check if device is queued in udev (LP: #1539195) + - uuids: only apply case mapping to RFC#4122 format uuids (LP: #1553107, + #1548120) + - hooks/framebuffer: Copy kernel/ubuntu/i915 backport driver too. (LP: + #1500751) + - hook-functions: add hyperv-keyboard for Generation 2 VMs (LP: + #1567107) + - init: fix redirection for /bin/hostname command + - init: drop -b from hostname as it is not supported by busybox + - Ensure we have a /usr/sbin directory in initramfs-tools-core + + -- Andy Whitcroft Thu, 07 Jul 2016 16:49:14 +0100 + initramfs-tools (0.125) unstable; urgency=medium * [74597dd] update-initramfs: Remove $USETRIGGERS variable and condition @@ -665,6 +2611,149 @@ -- Ben Hutchings Thu, 11 Feb 2016 02:13:23 +0000 +initramfs-tools (0.122ubuntu9) yakkety; urgency=medium + + * hook-functions: include ehci-msm in auto_add_modules_list + (LP: #1588946) + + -- dann frazier Fri, 03 Jun 2016 13:37:06 -0600 + +initramfs-tools (0.122ubuntu8) xenial; urgency=medium + + * init: busybox hostname doesn't support the '-b' argument, and it's + not relevant in this context anyway, as we test -f /etc/hostname. + * init: Also fix the wrong redirection of stdout for the above call. + + -- Adam Conrad Fri, 15 Apr 2016 14:37:22 -0600 + +initramfs-tools (0.122ubuntu7) xenial; urgency=medium + + * hook-functions: add hyperv-keyboard for Generation 2 VMs + (LP: #1567107) + + -- Andy Whitcroft Wed, 13 Apr 2016 18:39:27 +0100 + +initramfs-tools (0.122ubuntu6) xenial; urgency=medium + + [ Andy Whitcroft ] + * uuids: only apply case mapping to RFC#4122 format uuids (LP: #1553107, + #1548120) + + [ Timo Aaltonen ] + * hooks/framebuffer: Copy kernel/ubuntu/i915 backport driver too. (LP: + #1500751) + + -- Andy Whitcroft Fri, 04 Mar 2016 10:12:42 +0000 + +initramfs-tools (0.122ubuntu5) xenial; urgency=medium + + [ Andy Whitcroft ] + * uuids: busybox tr does not support symbolic ranges expand manually + (LP: #1548120) + + [ Martin Pitt ] + * wait-for-root.c: Drop check if device is queued in udev (LP: #1539195) + + -- Andy Whitcroft Wed, 24 Feb 2016 14:26:59 +0000 + +initramfs-tools (0.122ubuntu4) xenial; urgency=medium + + [ Manoj Iyer ] + * Add support for uppercase and lowercase uuids. (LP: #1548120) + + -- Andy Whitcroft Sun, 21 Feb 2016 22:12:36 +0000 + +initramfs-tools (0.122ubuntu3) xenial; urgency=medium + + * initramfs-tools-core uses initramfs-tools-bin add dependency (LP: + #1543244) + + -- Andy Whitcroft Mon, 08 Feb 2016 21:50:03 +0000 + +initramfs-tools (0.122ubuntu2) xenial; urgency=medium + + * fix vfat support (LP: #1540522) from initramfs. + + -- Scott Moser Mon, 08 Feb 2016 16:10:45 -0500 + +initramfs-tools (0.122ubuntu1) xenial; urgency=medium + + * Merge with Debian v0.122, known to fix: + - root=PARTUUID= is not recognized as valid syntax + (LP: #1531928) + * Merge with Debian v0.122 (LP: #1541508), remaining changes: + - Set takeover=1 in update-initramfs. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Ignore errors from iscan and iscan-data hooks. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Add hwaddr= alias for BOOTIF= for compatibility. + - When receiving "recovery" on cmdline, start upstart with --startup- + event=recovery (LP: #575469) + - Make /etc/mtab a symlink to /proc/mounts on startup, since e.g. + current ntfs-3g doesn't work otherwise. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. (LP: #917135) + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Retain netboot= compatibility option. + - Breaks: mountall (<< 2.0~) + - Retain cryptopts= compatibility option. + - Use busybox-initramfs for Depends. + - Add vfat modules to the initramfs. + - Maintain compatibility with pre- /run configurations + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Sync the mount options for /run from /lib/init/fstab (LP: #1152744) + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el (LP: #1326199) + - fixrtc: wait for udev to settle to expose device symlinks + - fixrtc: handle hwclock -s failures safely + - fixrtc: support busybox, handle last mount time on system partition, + expose fs create time (LP: #1420473) + - fixrtc: avoid using xargs, wait-for-root before examining + - fixrtc: suppress /dev/ram as a root when using systempart (LP: + #1443329) + - ppc64el: enable PowerPC NX Crypto Coprocessor + - resume: only resume when the partition contains a resume image + - resume: announce resume via plymouth if available + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Support loading compcache from the initramfs. + - debian/control: update Vcs-* links for Ubuntu. + - hook-functions: fix PowerPC NX Crypto Coprocessor support (LP: + #1454687) + - Drop: Maintain compatibility with pre- /run configurations (LP: + #1485752) + - Drop: Ignore errors from iscan and iscan-data hooks (LP: #1485562) + - init: Mount /dev with "nosuid" Thanks to Daniel (LP: #1450960) + - import direct archive upload 0.120ubuntu6 + - add squashfs to list of 'most' modules (LP: #1501834) + - drop Breaks: against upstart as we use it in user sessions. + - support mounting of loopback devices via loop*= parameters + - local_device_setup: use wait-for-root if it supports the device + alias type + + -- Andy Whitcroft Mon, 25 Jan 2016 16:08:12 +0000 + initramfs-tools (0.122) unstable; urgency=medium * [4fa3fe4] init: Validate the real init after devtmpfs is mounted under the @@ -794,6 +2883,141 @@ -- Ben Hutchings Tue, 22 Dec 2015 21:56:40 +0000 +initramfs-tools (0.120ubuntu7) xenial; urgency=medium + + [ Ben Hutchings ] + * hook-functions: Include drivers/nvme in block driver modules (Closes: + #807000) (LP: #1524879) + + [ Louis Bouchard ] + * Add support for NVME devices when MODULES=dep is used (LP: #1532146) + + -- Andy Whitcroft Thu, 21 Jan 2016 16:10:15 +0000 + +initramfs-tools (0.120ubuntu6) wily; urgency=medium + + * add squashfs to list of 'most' modules (LP: #1501834) + + -- Scott Moser Thu, 01 Oct 2015 12:48:11 -0400 + +initramfs-tools (0.120ubuntu5) wily; urgency=medium + + * hook-functions: firmware -- copy symlink components into initramfs + (LP: #1496163) + + -- Andy Whitcroft Sat, 19 Sep 2015 09:55:13 +0100 + +initramfs-tools (0.120ubuntu4) wily; urgency=medium + + * init: Mount /dev with "nosuid". Thanks "Daniel". (LP: #1450960) + + -- Martin Pitt Tue, 15 Sep 2015 07:20:43 +0200 + +initramfs-tools (0.120ubuntu3) wily; urgency=medium + + * hook-functions: fix PowerPC NX Crypto Coprocessor support (LP: + #1454687) + * Drop: Maintain compatibility with pre- /run configurations (LP: + #1485752) + * Drop: Ignore errors from iscan and iscan-data hooks (LP: #1485562) + + -- Andy Whitcroft Tue, 18 Aug 2015 12:15:28 +0100 + +initramfs-tools (0.120ubuntu2) wily; urgency=medium + + * update-initramfs: switch dpkg --compare-versions from > to >= + to avoid warnings from dpkg. (LP: #1480340) + * debian/control: update Vcs-* links for Ubuntu. + * scripts/functions: use :> rather than touch to create fsck + stamp. (LP: #1481789) + * hooks/busybox: revert local changes, these now need to occur + in the new late zz-busybox-initramfs hook. (LP: #1481733) + + -- Andy Whitcroft Wed, 05 Aug 2015 13:02:34 +0100 + +initramfs-tools (0.120ubuntu1) wily; urgency=medium + + * Merge from debian, remaining changes (up to 0.103ubuntu15): + - Drop hooks/keymap and associated code; console-setup takes care of this + in Ubuntu. + - Set takeover=1 in update-initramfs. + - Support loading compcache from the initramfs. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Ignore errors from iscan and iscan-data hooks. + - Allow specifying multiple break points using a comma delimiter. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set to + something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other framebuffer + drivers into the initramfs, but make them optional; you need to set + FRAMEBUFFER=y for these to be included. + - Don't load keymaps unless we're loading a framebuffer; but set the keymap + before giving a root shell. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Add 2>&1 to the run-init line. + - When receiving "recovery" on cmdline, start upstart with + --startup-event=recovery (LP: #575469) + - Make /etc/mtab a symlink to /proc/mounts on startup, since e.g. current + ntfs-3g doesn't work otherwise. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Automatically blacklist vga16fb when vga= or video= specified on kernel + command-line. + - Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. (LP: #917135) + - Allow for alternative PREREQS to be specified using | as the separator. + - Add mountroot failure support, to allow meaningful messages when no root + device can be found. + - Retain netboot= compatibility option. + - Add panic hook support. + - Breaks: mountall (<< 2.0~) + - Retain cryptopts= compatibility option. + - Use busybox-initramfs for Depends. + - Add new initramfs-tools-bin package containing a binary that uses libudev + to wait for udev to create the udev device, or wait for udev to finish + processing if we catch it in the act, and returns the filesystem type + as already probed by udev. Incorporate rzscontrol from compcache so that + we can control current ramzswap devices. + - Replace all instances of vol_id with blkid, and depend on util-linux. + - Add vfat modules to the initramfs. + - Maintain compatibility with pre- /run configurations + - Remove klibc utilities if busybox is in use. + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Loop for 5 seconds waiting for $resume to show up, adjustable with the + resumedelay= command-line arg. + - Call 'plymouth message' before resuming, to notify the user of the reason + for the delay if the plymouth theme supports it. + - Fix major/minor handling. + - Allow the mounting of a root filesystem as a loop device on top of a + host filesystem, used for Wubi installs. Panic if either the root device + doesn't exist, or blkid cannot identify it. Allows for mountroot failure + hooks for md devices to be displayed. + - Sync the mount options for /run from /lib/init/fstab. LP: #1152744 + - When copying firmware, don't use copy_exec; running ldd on random firmware + files is annoying and, if libc-x32 is installed, may cause crashes due + to lack of kernel support. LP: #1115875 + - update maintainers + - When adding i8042 also add psmouse as some keyboards are behind the mouse. + LP: #1314764 + - Create /bin/egrep -> busybox symlink. LP: #1315755 + - Increase rootdelay to 180s on powerpc/ppc64/ppc64el (LP: #1326199) + - add readlink symlink for busybox (LP: #1351295) + - fixrtc: wait for udev to settle to expose device symlinks + - fixrtc: handle hwclock -s failures safely + - fixrtc: support busybox, handle last mount time on system partition, + expose fs create time (LP: #1420473) + - fixrtc: avoid using xargs, wait-for-root before examining + - busybox: add chroot "binary" for busybox (LP: #1421117) + - fixrtc: suppress /dev/ram as a root when using systempart (LP: #1443329) + - hook-functions: Add nx-* and 842-* modules in order to enable PowerPC NX + Crypto Coprocessor. (LP: #1454687) + + -- Andy Whitcroft Fri, 31 Jul 2015 09:24:00 +0100 + initramfs-tools (0.120) unstable; urgency=medium * [23ee5f9] Add '.log' to fsck log output file, and document its existence @@ -1171,6 +3395,195 @@ -- maximilian attems Wed, 06 Jun 2012 14:48:26 +0200 +initramfs-tools (0.103ubuntu16) wily; urgency=medium + + * hook-functions: Add nx-* and 842-* modules in order to enable PowerPC NX + Crypto Coprocessor. (LP: #1454687) + + -- Chris J Arges Thu, 25 Jun 2015 13:59:55 -0500 + +initramfs-tools (0.103ubuntu15) vivid; urgency=medium + + * scripts/local-premount/fixrtc: if systempart= is set, we do not want to + take root=/dev/ram into account even if it is defined on the kernel + cmdline (LP: #1443329) + + -- Oliver Grawert Mon, 13 Apr 2015 10:30:58 +0200 + +initramfs-tools (0.103ubuntu14) vivid; urgency=medium + + * scripts/nfs: Fix nfs mount check for absolute /sbin/init symlink, to make + root NFS work again. Cherry-picked from Debian (commit 7bc24f829f). + (LP: #1439955) + + -- Martin Pitt Thu, 09 Apr 2015 10:03:26 +0200 + +initramfs-tools (0.103ubuntu13) vivid; urgency=medium + + * hooks/busybox: Create /bin/chroot symlink, to fix absolute symlinks when + busybox-static is not installed. (LP: #1421117) + + -- Martin Pitt Tue, 24 Feb 2015 11:56:53 +0100 + +initramfs-tools (0.103ubuntu12) vivid; urgency=medium + + * scripts/local-premount/fixrtc: + - Avoid using xargs, echo is already enough to trim the variable + - Also use wait-for-root before trying to extract the fs metadata + + -- Ricardo Salveti de Araujo Fri, 13 Feb 2015 13:20:30 -0200 + +initramfs-tools (0.103ubuntu11) vivid; urgency=medium + + * scripts/local-premount/fixrtc: + - Make it work with busybox (different date syntax) + - Add support to retrieve the last mount time from the ubuntu touch system + partition + - Make it able to extract the filesystem created timestamp (useful when + last mounted is older) LP: #1420473 + + -- Ricardo Salveti de Araujo Thu, 12 Feb 2015 04:34:46 -0200 + +initramfs-tools (0.103ubuntu10) vivid; urgency=medium + + * scripts/local-premount/fixrtc: do not fail if "hwclock -s" can not work + properly, so we set the new date in any case. + + -- Oliver Grawert Tue, 03 Feb 2015 12:03:55 +0100 + +initramfs-tools (0.103ubuntu9) vivid; urgency=medium + + * Add udevadm settle in scripts/local-premount/fixrtc; required for + /dev/disk/by-*/ symlinks to be added; add udev has a dependency in the + hook. + + -- Loïc Minier Fri, 16 Jan 2015 15:40:20 +0100 + +initramfs-tools (0.103ubuntu8) utopic; urgency=medium + + * Add readlink symlink for busybox in the busybox hook, needed to + support /sbin/init as a readlink (LP: #1351295). + + -- Dimitri John Ledkov Fri, 01 Aug 2014 16:46:35 +0100 + +initramfs-tools (0.103ubuntu7) utopic; urgency=medium + + * Default to a rootdelay of 180 on powerpc/ppc64/ppc64el to account + for the slower device discovery on IPR controllers (LP: #1326199) + + -- Adam Conrad Tue, 03 Jun 2014 21:39:01 -0600 + +initramfs-tools (0.103ubuntu6) utopic; urgency=medium + + * Create /bin/egrep -> busybox symlink, because initramfs-tools + scripts/functions expect to have it & our busybox hook is executed + after zz-busybox one. (LP: #1315755) + + -- Dimitri John Ledkov Tue, 06 May 2014 21:30:41 +0100 + +initramfs-tools (0.103ubuntu5) utopic; urgency=medium + + * hook-functions/auto_add_modules: include psmouse as some keyboards + are connected to the "pass-thru" port on the PS2 mouse port (because + that is such a good idea). (LP: #1314764) + + -- Andy Whitcroft Thu, 01 May 2014 10:49:19 +0100 + +initramfs-tools (0.103ubuntu4) trusty; urgency=medium + + * Cherrypick v0.113 changes (LP: #1194370): + [ Henrique de Moraes Holschuh ] + * [f59e716] implement early initramfs support (Closes: #712521) + * [b8295f0] lsinitramfs(8): document failure to deal with early + initramfs + + -- Dimitri John Ledkov Mon, 03 Mar 2014 08:11:20 +0000 + +initramfs-tools (0.103ubuntu3) trusty; urgency=low + + * wait-for-root.c: Set udev monitor buffer size like udev does, to avoid + losing events due to ENOBUFS errors. Side issue in LP #1215911, thanks to + Kay Sievers for pointing out! + + -- Martin Pitt Tue, 03 Dec 2013 16:29:24 +0100 + +initramfs-tools (0.103ubuntu2) trusty; urgency=low + + * Include usbhid in the list of modules we probe in the panic function, + since we may panic before udev runs and most keyboards are USB these + days. Closes: #229732. + * Add ohci_pci to the list of USB host modules included in the initramfs, + needed on some systems and not a built-in driver in Ubuntu. + LP: #1238194. + + -- Steve Langasek Thu, 24 Oct 2013 13:40:43 -0700 + +initramfs-tools (0.103ubuntu1) saucy; urgency=low + + * src/wait-for-root.c: udev_monitor_receive_device() might still return NULL + even with a blocking socket if recvmsg() fails with ENOBUFS. Retry every + second in that case. Thanks to Tetsuo Handa for debugging this and the + patch! (LP: #1215911) + + -- Martin Pitt Mon, 26 Aug 2013 14:23:10 +0200 + +initramfs-tools (0.103ubuntu0.7) raring; urgency=low + + * src/wait-for-root.c: Set udev monitor socket to blocking, as we want to + wait for events. (LP: #1154813) + + -- Martin Pitt Thu, 14 Mar 2013 07:08:06 +0100 + +initramfs-tools (0.103ubuntu0.6) raring; urgency=low + + * Sync the mount options for /run from /lib/init/fstab. LP: #1152744. + + -- Steve Langasek Wed, 13 Mar 2013 17:52:02 -0700 + +initramfs-tools (0.103ubuntu0.5) raring; urgency=low + + * When copying firmware, don't use copy_exec; running ldd on random + firmware files is annoying and, if libc-x32 is installed, may cause + crashes due to lack of kernel support. LP: #1115875. + + -- Steve Langasek Tue, 12 Feb 2013 07:22:19 +0000 + +initramfs-tools (0.103ubuntu0.4) raring; urgency=low + + * [71ece149] Cherry pick mkinitramfs: Copy modules.builtin into initramfs + (Closes: #659866) (LP: #1075422). + + -- Dmitrijs Ledkovs Tue, 04 Dec 2012 11:51:05 +0000 + +initramfs-tools (0.103ubuntu0.3) raring; urgency=low + + * Add nfsv3, nfsv4 and nfs_acl to the base modules. + This should fix nfs from initramfs. + + -- Stéphane Graber Thu, 22 Nov 2012 09:43:09 -0500 + +initramfs-tools (0.103ubuntu0.2) quantal; urgency=low + + * Add hid-logitech-dj to the static module list to re-enable some + keyboards that stopped working with recent kernels (LP: #1066376) + + -- Adam Conrad Tue, 16 Oct 2012 03:39:23 +0100 + +initramfs-tools (0.103ubuntu0.1) quantal; urgency=low + + * hook-functions: Add hid-generic (LP: #1017991). + + -- Colin Watson Tue, 26 Jun 2012 16:50:54 +0100 + +initramfs-tools (0.103ubuntu0) quantal; urgency=low + + * NOTE: Not an actual merge, just a cherry-pick and reving the + version number to avoid having to touch the Breaks in klibc-utils + * Cherry-pick the changes from 0.102 to 0.103 to move ipconfig + bits from /tmp to /run to match the new behaviour of klibc-utils + + -- Adam Conrad Fri, 01 Jun 2012 10:00:59 +0800 + initramfs-tools (0.103) unstable; urgency=low * [3fd3568] configure_networking: Use /run path for ipconfig generated @@ -1266,6 +3679,116 @@ -- Michael Prokop Tue, 14 Feb 2012 14:42:23 +0100 +initramfs-tools (0.99ubuntu13) precise; urgency=low + + * Deal with the uniquely broken situation of armhf having two linkers + by creating both if we find either one in the target (LP: #984007) + + -- Adam Conrad Tue, 17 Apr 2012 11:44:12 -0600 + +initramfs-tools (0.99ubuntu12) precise; urgency=low + + * Fix cross-building. + + -- Colin Watson Sat, 31 Mar 2012 01:35:00 +0100 + +initramfs-tools (0.99ubuntu11) precise; urgency=low + + * make sure fixrtc only updates the RTC setting if last mount time is actually + in the future (LP: #947988) + + -- Oliver Grawert Wed, 07 Mar 2012 12:33:58 +0100 + +initramfs-tools (0.99ubuntu10) precise; urgency=low + + * Add Hyper-V paravirtualised device drivers to the initramfs to allow + booting of stock images in a Hyper-V guest. (LP: #917135) + + -- Andy Whitcroft Fri, 10 Feb 2012 14:44:46 +0000 + +initramfs-tools (0.99ubuntu9) precise; urgency=low + + * Mark initramfs-tools Multi-Arch: foreign. + + -- Colin Watson Sun, 20 Nov 2011 17:41:31 +0000 + +initramfs-tools (0.99ubuntu8) oneiric-proposed; urgency=low + + * Too optimistic in thinking that the DRM driver will always be loaded + in time for scripts/init-top/framebuffer to load; some users find that + vesafb gets loaded first anyway, scrambling their console state in the + initramfs. Add a one-second sleep before checking if we should fall back + to vesafb, which seems to be long enough to work around this. + LP: #869119. + + -- Steve Langasek Mon, 10 Oct 2011 19:28:38 -0700 + +initramfs-tools (0.99ubuntu7) oneiric; urgency=low + + * When falling back to vesafb, suppress stderr output from modprobe; + otherwise in some cases we'll get error output on a console that was + nicely blank up to a week ago. Failing to load vesafb is usually not an + error in any case. + + -- Steve Langasek Thu, 06 Oct 2011 13:21:02 -0700 + +initramfs-tools (0.99ubuntu6) oneiric; urgency=low + + * scripts/init-top/framebuffer: fall back to vesafb if no other + framebuffer is found/configured, so we can take full advantage of the + grub gfxpayload handoff support. This ensures we get a clean + framebuffer-based plymouth screen even when using binary video drivers. + LP: #864149, LP: #563878, LP: #771905. + + -- Steve Langasek Sat, 01 Oct 2011 20:53:15 -0700 + +initramfs-tools (0.99ubuntu5) oneiric; urgency=low + + * hooks/compcache: udev RUN commands cannot include double quotes (") + nor do they support shell syntax. Move to an external helper script + to provision and add the memory swap partitions. + * hooks/compcache: add support for the updated zram staging driver + which requires the size to be pushed into sysfs and the partition be + initialised before adding. (LP: #832694) + + -- Andy Whitcroft Mon, 19 Sep 2011 15:40:32 +0100 + +initramfs-tools (0.99ubuntu4) oneiric; urgency=low + + * init: When receiving "recovery" on cmdline, start upstart with + --startup-event=recovery (LP: #575469) + + -- Stéphane Graber Thu, 15 Sep 2011 16:07:54 -0400 + +initramfs-tools (0.99ubuntu3) oneiric; urgency=low + + * remove hardcoded flash-kernel call from update-initramfs, flash-kernel + ships the same as /etc/initramfs/post-update.d/ script now + + -- Oliver Grawert Fri, 09 Sep 2011 12:14:01 +0200 + +initramfs-tools (0.99ubuntu2) oneiric; urgency=low + + * hook-functions: Revert changes from 0.98.8ubuntu3. With the current + implementation of copying, and /etc/ld.so.conf now existing in initramfs, + we can leave libraries at their original location. Thanks to maks for + pointing out! + * init: Add back compatibility symlink for /dev/.initramfs, until all + packages using /dev/.initramfs have been moved to /run/initramfs. + (LP: #810221) + + -- Martin Pitt Fri, 15 Jul 2011 11:20:32 +0200 + +initramfs-tools (0.99ubuntu1) oneiric; urgency=low + + * Merge with Debian unstable. See 0.98.8ubuntu1 for remaining Ubuntu + changes. This version creates /run in the initramfs, and moves it over to + the running system. (LP: #807306) + * hooks/busybox: Fix symlinking of /bin/sh to busybox, to work with current + copy_exec() function. + + -- Martin Pitt Tue, 12 Jul 2011 10:37:34 +0200 + initramfs-tools (0.99) unstable; urgency=low Release "scarpe rotte e pur bisogna andar" @@ -1347,6 +3870,100 @@ -- maximilian attems Wed, 11 May 2011 23:38:18 +0200 +initramfs-tools (0.98.8ubuntu4) oneiric; urgency=low + + * Rename xhci to xhci-hcd to fix booting from USB 3.0 devices + (cherry-picked fix from Debian bug #625224). (LP: #565047) + + -- Evan Broder Wed, 22 Jun 2011 10:57:43 -0700 + +initramfs-tools (0.98.8ubuntu3) natty; urgency=low + + * If copy_exec finds libraries to copy which are only accessible to the + runtime linker by virtue of being listed in /etc/ld.so.conf*, then + install those libraries to /lib or /usr/lib as appropriate instead + (LP: #728611). + + -- Colin Watson Sat, 26 Mar 2011 01:12:48 +0000 + +initramfs-tools (0.98.8ubuntu2) natty; urgency=low + + * Restore bnx2 to the initramfs; firmware loading should work these days, + and lots of other modules need firmware. Suggested by maximilian + attems. + + -- Colin Watson Wed, 09 Feb 2011 18:13:23 +0000 + +initramfs-tools (0.98.8ubuntu1) natty; urgency=low + + * Resynchronise with Debian. Remaining changes: + - Use busybox-initramfs for Depends. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Set takeover=1 in update-initramfs. + - Allow the mounting of a root filesystem as a loop device on top of a + host filesystem, used for Wubi installs. + - Add vfat support to the initramfs. + - Add 2>&1 to the run-init line. + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Panic if either the root device doesn't exist, or blkid cannot + identify it. Allows for mountroot failure hooks for md devices to be + displayed. + - Ignore blacklist for forced vga= usage. + - Loop for 5 seconds waiting for $suspend to show up, adjustable with + the resumedelay= command-line arg. + - Allow for alternative PREREQS to be specified using | as the + separator. + - Support loading compcache from the initramfs. + - Remove klibc utilities if busybox is in use. + - Revert "framebuffer: Let udev create fb devices." udev isn't started + at this point and therefore can't create framebuffer devices. + - Create /dev/mem and /dev/zero if video=uvesafb. + - Add hid_* modules, since some keyboards will not be usable at the + initramfs/busybox prompt without them. + - Replace all instances of vol_id with blkid, and depend on util-linux. + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Remove bnx2 from the initramfs; it needs firmware, and at this stage + we only support network modules that don't need firmware loading. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Depend on a sufficient version of udev to load fbcon. + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. Use it while mounting + local root filesystems and while resuming. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Allow specifying multiple break points using a comma delimiter. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Call 'plymouth message' before resuming, to notify the user of the + reason for the delay if the plymouth theme supports it. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + - Call 'plymouth hide-splash' before running failure hooks. + - Make /etc/mtab a symlink to /proc/mounts on startup, since e.g. + current ntfs-3g doesn't work otherwise. + - Ignore errors from iscan and iscan-data hooks. + - Set hostname at boot, for the benefit of mdadm autoassembly. + - If root= is numeric, set ROOT to /dev/block/N:N rather than /dev/root. + - Consolidate framebuffer calls to 'udevadm settle'. + + -- Colin Watson Wed, 09 Feb 2011 17:27:55 +0000 + initramfs-tools (0.98.8) unstable; urgency=high [ maximilian attems ] @@ -1424,6 +4041,135 @@ -- maximilian attems Tue, 07 Sep 2010 12:54:01 +0200 +initramfs-tools (0.98.1ubuntu9) natty; urgency=low + + [ dann frazier ] + * framebuffer: consolidate calls to 'udevadm settle' (LP: #687588). + + -- Colin Watson Thu, 09 Dec 2010 12:28:27 +0000 + +initramfs-tools (0.98.1ubuntu8) natty; urgency=low + + * If the root= argument is numeric, set ROOT to the appropriate + /dev/block/N:N symlink instead of mknod'ing a /dev/root device. This + makes wait-for-root able to detect those devices. (LP: #576429) + + -- Evan Broder Fri, 26 Nov 2010 19:01:30 -0800 + +initramfs-tools (0.98.1ubuntu7) natty; urgency=low + + * mdadm autoassembly works by matching hostname with what is stored in the + uuid bits of the array. So hostname needs to be set at boot time for the + rootfs to be mounted, when the rootfs is on an array which has to be + auto-assembled. Added support for setting the hostname. (LP: #330399) + + -- Surbhi Palande Wed, 06 Oct 2010 17:53:20 +0300 + +initramfs-tools (0.98.1ubuntu6) maverick; urgency=low + + * Apparently the iscan hook is sometimes called iscan-data, so ignore + errors from that too (LP: #654856). + + -- Colin Watson Mon, 04 Oct 2010 23:34:53 +0100 + +initramfs-tools (0.98.1ubuntu5) maverick; urgency=low + + * Ignore errors from iscan hook, due to a widely-deployed third-party + package causing upgrade problems (LP: #603053). + + -- Colin Watson Mon, 04 Oct 2010 10:42:30 +0100 + +initramfs-tools (0.98.1ubuntu4) maverick; urgency=low + + * Make /etc/mtab a symlink to /proc/mounts on startup, since e.g. current + ntfs-3g doesn't work otherwise (LP: #641306). (We can't make it a + symlink directly in the initramfs, since mkinitramfs uses 'cpio + --dereference'.) + + -- Colin Watson Fri, 17 Sep 2010 18:14:31 +0100 + +initramfs-tools (0.98.1ubuntu3) maverick; urgency=low + + * hooks/thermal: Force load thermal modules on powerpc for now, as there are + no modaliases for these modules, so udev won't touch them. Longer term, + scripts will need to be written to better identify which thermal module + needs to be loaded. (LP: #631358) + + -- Luke Yelavich Wed, 15 Sep 2010 18:08:15 +1000 + +initramfs-tools (0.98.1ubuntu2) maverick; urgency=low + + * scripts/functions: Adding plymouth hide-splash to see the initramfs prompt + messages on VT. (LP: #628400) + + -- Surbhi Palande Mon, 13 Sep 2010 10:24:22 +0100 + +initramfs-tools (0.98.1ubuntu1) maverick; urgency=low + + * Resynchronise with Debian. Remaining changes: + - Use busybox-initramfs for Depends. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Set takeover=1 in update-initramfs. + - Allow the mounting of a root filesystem as a loop device on top of a + host filesystem, used for Wubi installs. + - Add vfat support to the initramfs. + - Add 2>&1 to the run-init line. + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Panic if either the root device doesn't exist, or blkid cannot + identify it. Allows for mountroot failure hooks for md devices to be + displayed. + - Ignore blacklist for forced vga= usage. + - Loop for 5 seconds waiting for $suspend to show up, adjustable with + the resumedelay= command-line arg. + - Allow for alternative PREREQS to be specified using | as the + separator. + - Support loading compcache from the initramfs. + - Remove klibc utilities if busybox is in use. + - Revert "framebuffer: Let udev create fb devices." udev isn't started + at this point and therefore can't create framebuffer devices. + - Create /dev/mem and /dev/zero if video=uvesafb. + - Add hid_* modules, since some keyboards will not be usable at the + initramfs/busybox prompt without them. + - Replace all instances of vol_id with blkid, and depend on util-linux. + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Remove bnx2 from the initramfs; it needs firmware, and at this stage + we only support network modules that don't need firmware loading. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Depend on a sufficient version of udev to load fbcon. + - Conflict with older versions of usplash. + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. Use it while mounting + local root filesystems and while resuming. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Allow specifying multiple break points using a comma delimiter. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Call 'plymouth message' before resuming, to notify the user of the + reason for the delay if the plymouth theme supports it. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + - Incorporate rzscontrol from compcache so that we can control current + ramzswap devices. + * Stop silencing /bin/resume output when trying to resume; the offending + message in klibc is now debug-only. + + -- Colin Watson Tue, 07 Sep 2010 12:45:05 +0100 + initramfs-tools (0.98.1) unstable; urgency=high [ Vagrant Cascadian ] @@ -1432,6 +4178,82 @@ -- maximilian attems Wed, 25 Aug 2010 22:13:18 +0200 +initramfs-tools (0.98ubuntu2) maverick; urgency=low + + * The ramzswap device changed its interface so that the disk size needs to + be given using an ioctl rather than as a module parameter. Incorporate + the rzscontrol tool from the compcache project + (http://code.google.com/p/compcache/) so that we can control current + ramzswap devices (LP: #600782). This is a strictly temporary measure, + as recent versions of compcache change the interface (and module name) + again to involve writing to sysfs files, which won't require any special + tools. + + -- Colin Watson Fri, 20 Aug 2010 09:46:26 +0100 + +initramfs-tools (0.98ubuntu1) maverick; urgency=low + + * Resynchronise with Debian. Remaining changes: + - Use busybox-initramfs for Depends. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Set takeover=1 in update-initramfs. + - Allow the mounting of a root filesystem as a loop device on top of a + host filesystem, used for Wubi installs. + - Add vfat support to the initramfs. + - Add 2>&1 to the run-init line. + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Panic if either the root device doesn't exist, or blkid cannot + identify it. Allows for mountroot failure hooks for md devices to be + displayed. + - Ignore blacklist for forced vga= usage. + - Loop for 5 seconds waiting for $suspend to show up, adjustable with + the resumedelay= command-line arg. + - Allow for alternative PREREQS to be specified using | as the + separator. + - Support loading compcache from the initramfs. + - Remove klibc utilities if busybox is in use. + - Revert "framebuffer: Let udev create fb devices." udev isn't started + at this point and therefore can't create framebuffer devices. + - Create /dev/mem and /dev/zero if video=uvesafb. + - Add hid_* modules, since some keyboards will not be usable at the + initramfs/busybox prompt without them. + - Replace all instances of vol_id with blkid, and depend on util-linux. + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Remove bnx2 from the initramfs; it needs firmware, and at this stage + we only support network modules that don't need firmware loading. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Silence /bin/resume output when trying to resume. + - Depend on a sufficient version of udev to load fbcon. + - Conflict with older versions of usplash. + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. Use it while mounting + local root filesystems and while resuming. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Allow specifying multiple break points using a comma delimiter. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Call 'plymouth message' before resuming, to notify the user of the + reason for the delay if the plymouth theme supports it. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + + -- Colin Watson Wed, 18 Aug 2010 13:05:53 +0100 + initramfs-tools (0.98) unstable; urgency=low [ Michael Prokop ] @@ -1484,6 +4306,81 @@ -- Michael Prokop Sat, 07 Aug 2010 09:41:39 -0400 +initramfs-tools (0.97.2ubuntu2) maverick; urgency=low + + * drop check for flash-kernel entry in kernel-img.conf, debian dropped + kernel-img.conf usage for flash-kernel and this code snippet prevents + flash-kernel from being run. + + -- Oliver Grawert Tue, 09 Aug 2010 17:48:01 +0200 + +initramfs-tools (0.97.2ubuntu1) maverick; urgency=low + + * Resynchronise with Debian: + - Fix initramfs generation without COMPRESS set (LP: #602523, #602621). + Remaining changes: + - Use busybox-initramfs for Depends. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Set takeover=1 in update-initramfs. + - Allow the mounting of a root filesystem as a loop device on top of a + host filesystem, used for Wubi installs. + - Add vfat support to the initramfs. + - Add 2>&1 to the run-init line. + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Panic if either the root device doesn't exist, or blkid cannot + identify it. Allows for mountroot failure hooks for md devices to be + displayed. + - Ignore blacklist for forced vga= usage. + - Loop for 5 seconds waiting for $suspend to show up, adjustable with + the resumedelay= command-line arg. + - Allow for alternative PREREQS to be specified using | as the + separator. + - Support loading compcache from the initramfs. + - Remove klibc utilities if busybox is in use. + - Revert "framebuffer: Let udev create fb devices." udev isn't started + at this point and therefore can't create framebuffer devices. + - Create /dev/mem and /dev/zero if video=uvesafb. + - Add hid_* modules, since some keyboards will not be usable at the + initramfs/busybox prompt without them. + - Replace all instances of vol_id with blkid, and depend on util-linux. + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Remove bnx2 from the initramfs; it needs firmware, and at this stage + we only support network modules that don't need firmware loading. + - update-initramfs: check whether kernel-img.conf exists and + postinst_hook is set before calling flash-kernel. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Silence /bin/resume output when trying to resume. + - Depend on a sufficient version of udev to load fbcon. + - Conflict with older versions of usplash. + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. Use it while mounting + local root filesystems and while resuming. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Allow specifying multiple break points using a comma delimiter. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Call 'plymouth message' before resuming, to notify the user of the + reason for the delay if the plymouth theme supports it. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + + -- Colin Watson Wed, 07 Jul 2010 13:35:54 +0100 + initramfs-tools (0.97.2) unstable; urgency=high * [ce732c3] initramfs-tools: output name of script that errexits. @@ -1498,6 +4395,74 @@ -- maximilian attems Mon, 05 Jul 2010 21:50:47 +0200 +initramfs-tools (0.97ubuntu1) maverick; urgency=low + + * Resynchronise with Debian. Remaining changes: + - Use busybox-initramfs for Depends. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Set takeover=1 in update-initramfs. + - Allow the mounting of a root filesystem as a loop device on top of a + host filesystem, used for Wubi installs. + - Add vfat support to the initramfs. + - Add 2>&1 to the run-init line. + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Panic if either the root device doesn't exist, or blkid cannot + identify it. Allows for mountroot failure hooks for md devices to be + displayed. + - Ignore blacklist for forced vga= usage. + - Loop for 5 seconds waiting for $suspend to show up, adjustable with + the resumedelay= command-line arg. + - Allow for alternative PREREQS to be specified using | as the + separator. + - Support loading compcache from the initramfs. + - Remove klibc utilities if busybox is in use. + - Revert "framebuffer: Let udev create fb devices." udev isn't started + at this point and therefore can't create framebuffer devices. + - Create /dev/mem and /dev/zero if video=uvesafb. + - Add hid_* modules, since some keyboards will not be usable at the + initramfs/busybox prompt without them. + - Replace all instances of vol_id with blkid, and depend on util-linux. + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Remove bnx2 from the initramfs; it needs firmware, and at this stage + we only support network modules that don't need firmware loading. + - update-initramfs: check whether kernel-img.conf exists and + postinst_hook is set before calling flash-kernel. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Silence /bin/resume output when trying to resume. + - Depend on a sufficient version of udev to load fbcon. + - Conflict with older versions of usplash. + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. Use it while mounting + local root filesystems and while resuming. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Allow specifying multiple break points using a comma delimiter. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Call 'plymouth message' before resuming, to notify the user of the + reason for the delay if the plymouth theme supports it. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + - Drop hooks/keymap and associated code; console-setup takes care of + this in Ubuntu. + * Add .conf extension to modprobe blacklist configuration file in the + vga=*|video=* case (it had already been added in other cases, thanks to + an upstream merge). + + -- Colin Watson Tue, 06 Jul 2010 14:04:26 +0100 + initramfs-tools (0.97) unstable; urgency=low [ Martin Michlmayr ] @@ -1563,6 +4528,108 @@ -- Michael Prokop Fri, 18 Jun 2010 12:28:04 +0200 +initramfs-tools (0.96.1ubuntu4) maverick; urgency=low + + * Only make the extra commands conditional on dh_listpackages, not the + override_dh_install target as a whole, as dh gets confused and avoids + calling dh_install at all when we're only building binary-arch. + + -- Steve Langasek Wed, 16 Jun 2010 20:35:31 +0000 + +initramfs-tools (0.96.1ubuntu3) maverick; urgency=low + + * Revert change from 0.96.1ubuntu2; instead, only override dh_install if + we're building the architecture-independent package. + + -- Colin Watson Wed, 16 Jun 2010 16:13:07 +0100 + +initramfs-tools (0.96.1ubuntu2) maverick; urgency=low + + * Make sure /usr/share/initramfs-tools/scripts/panic/ exists before trying + to copy into it. + + -- Colin Watson Wed, 16 Jun 2010 15:15:17 +0100 + +initramfs-tools (0.96.1ubuntu1) maverick; urgency=low + + * Resynchronise with Debian: + - Fixes redboot partition handling (LP: #319730). + - Don't hardcode incorrect elilo path (LP: #396000). + Remaining changes: + - Use busybox-initramfs for Depends, and set BUSYBOXDIR to match. + - Mount /dev with the default tmpfs size rather than sourcing udev.conf. + - Set takeover=1 in update-initramfs. + - Allow the mounting of a root filesystem as a loop device on top of a + host filesystem, used for Wubi installs. + - Add vfat support to the initramfs. + - Reduce timeout to 30 seconds; corner cases (giant disk arrays, + clusters) will need to provide their own rootdelay= boot arg. + - Add 2>&1 to the run-init line. + - Add mountroot failure support, to allow meaningful messages when no + root device can be found. + - Panic if either the root device doesn't exist, or blkid cannot + identify it. Allows for mountroot failure hooks for md devices to be + displayed. + - Ignore blacklist for forced vga= usage. + - Loop for 5 seconds waiting for $suspend to show up, adjustable with + the resumedelay= command-line arg. + - Allow for alternative PREREQS to be specified using | as the + separator. + - Support loading compcache from the initramfs. + - Remove klibc utilities if busybox is in use. + - Change to tty1 on failure. + - Revert "framebuffer: Let udev create fb devices." udev isn't started + at this point and therefore can't create framebuffer devices. + - Create /dev/mem and /dev/zero if video=uvesafb. + - Add hid_* modules, since some keyboards will not be usable at the + initramfs/busybox prompt without them. + - Replace all instances of vol_id with blkid, and depend on util-linux. + - Use gzip from busybox instead of klibc. Depend on busybox-initramfs + (>= 1:1.13.3-1ubuntu5) to ensure that we have it. + - Remove bnx2 from the initramfs; it needs firmware, and at this stage + we only support network modules that don't need firmware loading. + - update-initramfs: check whether kernel-img.conf exists and + postinst_hook is set before calling flash-kernel. + - Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + - Allow scripts and hooks to specify OPTION=VAR, and unless VAR is set + to something other than "n", the script will not be included. + - Restore the framebuffer hook and script, copying KMS and other + framebuffer drivers into the initramfs, but make them optional; you + need to set FRAMEBUFFER=y for these to be included. + - Silence /bin/resume output when trying to resume. + - Depend on a sufficient version of udev to load fbcon. + - Conflict with older versions of usplash. + - Don't load keymaps unless we're loading a framebuffer; but set the + keymap before giving a root shell. + - Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. Use it while mounting + local root filesystems and while resuming. + - Add hwaddr= alias for BOOTIF= for compatibility. + - Allow specifying multiple break points using a comma delimiter. + - Automatically blacklist vga16fb when vga= or video= specified on + kernel command-line. + - Call 'plymouth message' before resuming, to notify the user of the + reason for the delay if the plymouth theme supports it. + - Change to ${DESTDIR} before running find to filter out looping or + broken symlinks, to avoid tickling a find bug. + - Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + * Drop artificial dependency on libc 2.11, which worked around a libapt + bug on upgrade to lucid. + * Drop lpia support. + * Drop hooks/keymap and associated code again; console-setup takes care of + this in Ubuntu. + * Make /usr/share/initramfs-tools/scripts/panic/keymap executable. + * Make hooks/busybox declare hooks/klibc as a prerequisite, so that the + former can remove symlinks installed by the latter. + * Make the dependency on initramfs-tools-bin binNMU-safe. + + -- Colin Watson Wed, 16 Jun 2010 14:44:15 +0100 + initramfs-tools (0.96.1) unstable; urgency=low * hook-functions: Make sure copy_exec hook function does not @@ -2127,6 +5194,791 @@ -- maximilian attems Sat, 05 Jul 2008 00:31:06 +0200 +initramfs-tools (0.92bubuntu78) lucid; urgency=low + + * hooks/compcache: Escape $-expansions inside < Mon, 26 Apr 2010 16:15:57 +0100 + +initramfs-tools (0.92bubuntu77) lucid; urgency=low + + * Add a new 'fixrtc' script that tries to set the system clock forward + based on the last mount time of the root disk; without this kludge, + systems without a working RTC will end up in a perpetual reboot loop. + Thanks to Dave Martin for the patch. LP: #563618. + + -- Steve Langasek Fri, 23 Apr 2010 14:55:24 -0700 + +initramfs-tools (0.92bubuntu76) lucid; urgency=low + + * hooks/compcache: add option to disable usage of compcache completely on + the kernel cmdline using the nocompcache option + + -- Oliver Grawert Thu, 22 Apr 2010 14:53:05 +0200 + +initramfs-tools (0.92bubuntu75) lucid; urgency=low + + * When specifying a network interface by MAC address, set DEVICE to (e.g.) + eth0 rather than /sys/class/net/eth0 (LP: #546964). + + -- Colin Watson Wed, 21 Apr 2010 12:40:42 +0100 + +initramfs-tools (0.92bubuntu74) lucid; urgency=low + + * debian/control, debian/rules: + - force libc6 dependency to >= 2.11 (and libc6.1 on ia64, the libc6 + has a different packages name on this architecture) to workaround a + bug in libapt when it orders the install for essential packages + (LP: #559582) + This can be removed after lucid + + -- Michael Vogt Fri, 16 Apr 2010 13:13:50 +0200 + +initramfs-tools (0.92bubuntu73) lucid; urgency=low + + * Change to ${DESTDIR} before running find to filter out looping or broken + symlinks, to avoid tickling a find bug. + + -- Colin Watson Wed, 14 Apr 2010 23:33:22 +0100 + +initramfs-tools (0.92bubuntu72) lucid; urgency=low + + * make sure we can use mmc cards for / and add a proper sysfs handler, + (mmc always uses numbering in the device name like mmcblk[0-9]p[0-n], make + sure hook-functions only cuts off the partition but not the device number) + + -- Oliver Grawert Wed, 14 Apr 2010 11:40:30 +0200 + +initramfs-tools (0.92bubuntu71) lucid; urgency=low + + * init: + - mount /dev/pts as well as /dev so we can redirect the console early. + - load the netconsole module when netconsole=* placed on the kernel + command-line. + + -- Scott James Remnant Fri, 26 Mar 2010 14:45:26 +0000 + +initramfs-tools (0.92bubuntu70) lucid; urgency=low + + * Filter out looping or broken symlinks from the initramfs, since they + cause cpio to explode (LP: #540686). + + -- Colin Watson Fri, 26 Mar 2010 13:08:05 +0000 + +initramfs-tools (0.92bubuntu69) lucid; urgency=low + + * scripts/init-top/blacklist: move vga16fb blacklisting before the + bail-out logic. + * scripts/init-top/framebuffer: create "fbmode" argument to force allow + foring a mode via fb /sys interfaces, for framebuffers that do not + correctly handle setting mode via module options. + + -- Kees Cook Sat, 20 Mar 2010 13:12:25 -0700 + +initramfs-tools (0.92bubuntu68) lucid; urgency=low + + * Backport from Debian: + - hook-functions: Cope with partitions over 9 (LP: #539577). + + -- Colin Watson Fri, 19 Mar 2010 18:57:43 +0000 + +initramfs-tools (0.92bubuntu67) lucid; urgency=low + + * debian/control: + - make the Breaks: upslash (<< 0.5.50) a Conflicts to help the + apt resolver on hardy to lucid upgrades + + -- Michael Vogt Fri, 05 Mar 2010 13:25:29 +0100 + +initramfs-tools (0.92bubuntu66) lucid; urgency=low + + * scripts/local-premount/resume: wait-for-root will handle both UUID= and + /dev/disk/by-uuid, but /bin/resume from klibc will only handle the latter, + so revert the changes from 0.92bubuntu59 that dropped our fix-up of + device name. LP: #499940. + * scripts/local-premount/resume: also recognize 'swsuspend' as a valid fs + type for a hibernation partition, since this is what udev returns for the + in-kernel hibernate/resume handling. Thanks to Peter Clifton for noticing + this! + * scripts/local-premount/resume: call 'plymouth message' before resuming, + to notify the user of the reason for the delay if the plymouth theme + supports it. + + -- Steve Langasek Mon, 22 Feb 2010 00:20:22 -0800 + +initramfs-tools (0.92bubuntu65) lucid; urgency=low + + * scripts/init-premount/blacklist: Move to init-top so it has a chance + of running before udev. + * scripts/init-top/blacklist: Automatically blacklist vga16fb when vga= + or video= specified on kernel command-line. + + -- Scott James Remnant Wed, 17 Feb 2010 12:35:22 +0000 + +initramfs-tools (0.92bubuntu64) lucid; urgency=low + + * Allow specifying multiple break points using a comma delimiter. + + -- Evan Dandrea Wed, 10 Feb 2010 11:18:26 +0000 + +initramfs-tools (0.92bubuntu63) lucid; urgency=low + + * init, scripts/functions: Add support for specifying a network interface + by MAC address, using hwaddr= on the command line or HWADDR in an + initramfs configuration file (LP: #473036). + + -- Colin Watson Fri, 05 Feb 2010 11:49:34 -0800 + +initramfs-tools (0.92bubuntu62) lucid; urgency=low + + * src/wait-for-root.c: + - device records we obtain from udev may not have a device node name + yet, check to avoid strcmp between NULL and our path. LP: #499422. + - device records from the queue may not exist at all, check to avoid + calling udev_device_unref on NULL (which should be safe anyway). + - eliminate a race condition; by checking the filesystem before the + queue, there was a small chance that udev could finish processing + between our calls + + -- Scott James Remnant Tue, 22 Dec 2009 19:30:01 +0000 + +initramfs-tools (0.92bubuntu61) lucid; urgency=low + + * init: Mount devtmpfs on /dev, falling back to a tmpfs if not supported + by the kernel. + + * src/wait-for-root.c: accept the timeout on the command-line too rather + than using an environment variable. + * scripts/local: Pass $ROOTDELAY or 30 + * scripts/local-premount/resume: pass $RESUMEDELAY or 5 + + -- Scott James Remnant Mon, 21 Dec 2009 23:06:53 +0000 + +initramfs-tools (0.92bubuntu60) lucid; urgency=low + + * src/wait-for-root.c: + - Fix a bug where we checked queue entries for ID_FS_TYPE too; would + mean we thought a device directly named (e.g. /dev/md0) wasn't + in the queue when it was, and wouldn't wait for it. + - Fix another bug where we didn't clear udev_device after iterating + the queue. + - Rather than mucking around with sequence numbers in the queue, just + wait using the monitor if we identify the device as being in the + queue. + + -- Scott James Remnant Fri, 18 Dec 2009 14:47:30 +0000 + +initramfs-tools (0.92bubuntu59) lucid; urgency=low + + * src/wait-for-root.c: handle the case where we're given UUID= or LABEL= + and the device already exists (we need to stat the /dev/disk path). + * scripts/local-premount/resume: this means we can use wait-for-root for + resume handling too. + * mkinitramfs: drop the PAGE_SIZE conf, it's no longer needed since we + rely on udev finding out it's a hibernated image through blkid. + + -- Scott James Remnant Fri, 18 Dec 2009 04:34:04 +0000 + +initramfs-tools (0.92bubuntu58) lucid; urgency=low + + * Add new initramfs-tools-bin package containing a binary that uses + libudev to wait for udev to create the udev device, or wait for udev + to finish processing if we catch it in the act, and returns the + filesystem type as already probed by udev. + - This avoids calls to udevadm settle, which make us wait for irrelevant + modules that we don't need. + - This avoids duplicate calls to blkid, which since they probe the block + device directly, are expensive + - This does not use fstype; which avoids issues with that and blkid + returning different answers (since everything else throughout the + entire system now uses blkid) + * scripts/local: Rewrite to use wait-for-root rather than looping over + our own shell attempts to do the same. + * mkinitramfs: + - include wait-for-root + - mkinitramfs: Don't quote modules.*map, so we actually expand it. + * hooks/thermal: + - don't force load fan or thermal, they're generally built-in and if not + will be loaded by udev anyway + * scripts/panic/keymap: + - auto-generated from the init-top keymap file, with the OPTION= removed, + so keymap will always be set on panic + + * Remove accidentally included test initramfs. :-) + + -- Scott James Remnant Fri, 18 Dec 2009 03:18:28 +0000 + +initramfs-tools (0.92bubuntu57) lucid; urgency=low + + * debian/initramfs-tools.dirs: + - add scripts/panic directory + + * scripts/functions: + - if tsort is available, use it instead of custom sorting code + - if a pre-cached order file is available, use that instead + - run panic scripts before giving a root shell + * mkinitramfs: + - generate a pre-cached order file for each scripts directory in the + output initramfs + - call depmod before packing the initramfs, so it contains the output + already + * init: + - drop depmod call + + -- Scott James Remnant Wed, 16 Dec 2009 17:47:49 +0000 + +initramfs-tools (0.92bubuntu56) lucid; urgency=low + + * scripts/init-top/keymap: We don't need to load keymaps unless we're + loading the framebuffer module (and thus have a splash screen). + + -- Scott James Remnant Tue, 15 Dec 2009 14:57:29 +0000 + +initramfs-tools (0.92bubuntu55) lucid; urgency=low + + * hooks/framebuffer: Change the inclusion option from USPLASH to + FRAMEBUFFER, in hindsight that option name wasn't very forward-thinking + of me. + * scripts/init-top/framebuffer: + - Make conditional on new option name. + - As well as waiting for fb0 to show up, we also should wait for fbcon + and dri/card0 to show up as well, since we'll almost certainly want + a console and direct rendering. + + -- Scott James Remnant Mon, 30 Nov 2009 23:45:44 +0000 + +initramfs-tools (0.92bubuntu54) lucid; urgency=low + + * hook-functions: check both /lib/firmware/$(uname -r) and /lib/firmware + for the firmware that we wish to copy; in any cases where we want to + suppress a firmware-using module from the initramfs, we should do that + explicitly and not by accidentally failing to include the firmware. + LP: #328550. + * hook-functions: cherry pick fix from Debian upstream version to not warn + about missing firmware for modules whose names are merely /like/ those of + modules listed in /proc/modules. + + -- Steve Langasek Thu, 19 Nov 2009 00:47:55 -0600 + +initramfs-tools (0.92bubuntu53) karmic; urgency=low + + * Explicitly check for fb0 so we don't false-positive on the graphics + subsystem having been initialised (should cure some issues with usplash + using svgalib instead of KMS, and vanishing part way through). + * Don't force load the vesafb driver, we never did this before, so it + seems silly to do it now. + + -- Scott James Remnant Wed, 14 Oct 2009 04:41:37 +0100 + +initramfs-tools (0.92bubuntu52) karmic; urgency=low + + * Include all usb/storage drivers, not just usb-storage.ko LP: #419231 + + -- Scott James Remnant Fri, 09 Oct 2009 15:34:43 +0100 + +initramfs-tools (0.92bubuntu51) karmic; urgency=low + + * scripts/init-top/framebuffer: wait for udev to settle before loading + command-line specified framebuffer driver to ensure that any needed + device nodes are available. LP: #437871. + + -- Scott James Remnant Sat, 03 Oct 2009 07:55:35 +0100 + +initramfs-tools (0.92bubuntu50) karmic; urgency=low + + LP: #392039, #431812. + * hooks/framebuffer: + - rename from hooks/kernelextras, this is much more descriptive and + actually matches the associated script + - copy kernel-mode-setting drivers (drivers/gpu) into the initramfs + - include the vesafb driver, which we previously relied on being in + the special initrd directory + - don't force load fbcon + - don't force load things from the initrd directory + * scripts/init-top/framebuffer: + - add udev as a pre-requisite + - remove mknods since udev will make those now + - remove intel_agp and i915 code + - don't unset MODPROBE_OPTIONS, just override for the modprobe call + (since we want video= to override the blacklist) + - if we didn't pick up a framebuffer from vga= or video=, and don't + have one from udev, wait for udev to finish then if we still don't + have one, load vesafb + - settle after loading drivers to ensure the device is ready + * debian/control: + - increase dependency on udev to that which loads fbcon + - add breaks on older usplash to force upgrade + + -- Scott James Remnant Wed, 23 Sep 2009 14:25:00 -0700 + +initramfs-tools (0.92bubuntu49) karmic; urgency=low + + * Re-add the OPTION=VAR checking to scripts/functions, since we actually do + need this when calling the hooks at initramfs generation; but add a second + argument to call_scripts, "optional", that we check for before doing these + checks since we definitely don't want this to be conditional in the + initramfs at runtime. + + -- Steve Langasek Tue, 22 Sep 2009 09:44:00 -0700 + +initramfs-tools (0.92bubuntu48) karmic; urgency=low + + * Don't do OPTION=VAR checking at runtime, only do it when assembling the + initramfs; this spares us having to add extra config files to the + initramfs to enable functionality that's already been selected. + LP: #433773. + + -- Steve Langasek Tue, 22 Sep 2009 00:17:13 -0700 + +initramfs-tools (0.92bubuntu47) karmic; urgency=low + + * Silence output when trying to resume, since the only output is bitching + that we can't resume because we didn't hibernate in the first place. + LP: #432585. + + -- Scott James Remnant Mon, 21 Sep 2009 16:07:10 -0700 + +initramfs-tools (0.92bubuntu46) karmic; urgency=low + + FFE LP: #427356. + + * mkinitramfs: Allow scripts to specify OPTION=VAR, and unless VAR is + set to something other than "n", the script will not be included. + * scripts/functions: Likewise when running scripts (for hooks) + + * Make usplash-related components optional, you need to set USPLASH=y + for these to be included: + - hooks/kernelextras: which includes the KMS driver + - scripts/init-top/framebuffer: which loads it + + -- Scott James Remnant Tue, 15 Sep 2009 03:30:12 +0100 + +initramfs-tools (0.92bubuntu45) karmic; urgency=low + + * Depend on busybox-initramfs (>= 1:1.13.3-1ubuntu5) to ensure that we + have gzip (LP: #428282). + + -- Colin Watson Mon, 14 Sep 2009 10:23:40 +0100 + +initramfs-tools (0.92bubuntu44) karmic; urgency=low + + * Revert mxcfb changes of 0.92bubuntu40 and 0.92bubuntu41 as a more complete + workaround was put in usplash. + + -- Loïc Minier Fri, 11 Sep 2009 21:46:45 +0200 + +initramfs-tools (0.92bubuntu43) karmic; urgency=low + + * Move "Loading, please wait..." message to after /proc is mounted, so + that we can inspect /proc/cmdline. + + -- Colin Watson Fri, 04 Sep 2009 14:23:05 +0100 + +initramfs-tools (0.92bubuntu42) karmic; urgency=low + + * Don't display "Loading, please wait..." message when 'quiet' is in + /proc/cmdline. + + -- Colin Watson Thu, 03 Sep 2009 23:31:28 +0100 + +initramfs-tools (0.92bubuntu41) karmic; urgency=low + + * fix quoting for mxcfb in scripts/init-top/framebuffer + + -- Oliver Grawert Sun, 30 Aug 2009 10:28:06 +0200 + +initramfs-tools (0.92bubuntu40) karmic; urgency=low + + * add a hack to scripts/init-top/framebuffer for handling the yet broken + mxcfb as described in LP bug #420555, so usplash can be used on the + imx51 architecture based devices + + -- Oliver Grawert Sat, 29 Aug 2009 11:37:27 +0200 + +initramfs-tools (0.92bubuntu39) karmic; urgency=low + + * auto_add_modules net: Load virtio_net, to make testing in kvm easier. + * init: Export IPOPTS (LP: #364626). + + -- Colin Watson Tue, 11 Aug 2009 12:37:56 +0100 + +initramfs-tools (0.92bubuntu38) karmic; urgency=low + + * change --print-installation-architecture to --print-architecture in + mkinitramfs and hook-functions to quieten down dpkg warning during + update-initramfs + + -- Oliver Grawert Tue, 07 Jul 2009 21:33:50 +0200 + +initramfs-tools (0.92bubuntu37) karmic; urgency=low + + * update-initramfs: Fix run_bootloader() to check for grub2 + patch from debian bug #511514 + + -- Oliver Grawert Tue, 07 Jul 2009 19:56:58 +0200 + +initramfs-tools (0.92bubuntu36) karmic; urgency=low + + * add missing colon in the regex and a filename for the grep from the next + upload ... d'oh + + -- Oliver Grawert Tue, 07 Jul 2009 19:28:16 +0200 + +initramfs-tools (0.92bubuntu35) karmic; urgency=low + + * update-initramfs: check whether kernel-img.conf exists and postinst_hook + is set before calling flash-kernel. (patch from Loic Minier to work + around shortcomings described in launchpad bug 365053 (not the desired + solution yet which needs to happen in debian but we need it for + livecd-rootfs to work on armel)) + + -- Oliver Grawert Tue, 07 Jul 2009 16:49:10 +0200 + +initramfs-tools (0.92bubuntu34) karmic; urgency=low + + * Remove bnx2 from the initramfs; it needs firmware, and at this stage we + only support network modules that don't need firmware loading (LP: + #394783). + + -- Colin Watson Tue, 07 Jul 2009 11:45:58 +0100 + +initramfs-tools (0.92bubuntu33) karmic; urgency=low + + * Cope with new compcache module naming. + + -- Colin Watson Mon, 06 Jul 2009 14:12:07 +0100 + +initramfs-tools (0.92bubuntu32) karmic; urgency=low + + * Copy in KMS drivers (currently just i915 and the AGP drivers) if we can, + so that we can load them before starting usplash. NOTE that this whole + edifice is not intended to be used by default on most systems for + Karmic, and that the general intent is to make the initramfs smaller + rather than larger; however, we're still going to need usplash in the + initramfs for some use cases (e.g. dm-crypt), so we might as well get + this working now. + * Fix formatting error in initramfs-tools(8). + * 'set -e' in initramfs-tools.postrm. + * Fix handling of resume_offset: if it's set then we need to check in a + different location for the swap signature. + * Remove kinit and gzip from the initramfs. The first record I can find of + this Ubuntu change is in a merge from Debian, and I can't see any + justification for it since neither binary is actually used by any + initramfs scripts. + * Remove klibc utilities if busybox is in use (patch based on Debian + #338405; LP: #327106). Leave a symlink for /bin/sleep since some scripts + expect that to exist. + + -- Colin Watson Tue, 23 Jun 2009 14:19:02 +0100 + +initramfs-tools (0.92bubuntu31) karmic; urgency=low + + * Set the permissions on the initramfs root to 755, as otherwise + unionfs-fuse (which may be used via casper) can't service requests made + by non-root users. + + -- Colin Watson Thu, 04 Jun 2009 02:58:57 +0100 + +initramfs-tools (0.92bubuntu30) karmic; urgency=low + + * Replace all instances of vol_id with blkid, and depend on util-linux + + -- Scott James Remnant Thu, 07 May 2009 12:52:20 +0100 + +initramfs-tools (0.92bubuntu29) jaunty; urgency=low + + * copy_exec: also avoid picking sse2, neon, and vfp hwcaps versions of libs. + * Move debhelper and cdbs from -Indep to Build-Depends for clean:. + + -- Loic Minier Tue, 14 Apr 2009 11:11:52 +0200 + +initramfs-tools (0.92bubuntu28) jaunty; urgency=low + + * update-initramfs: copy the logic added in Debian to run flash-kernel after + the initrd has been generated (if the system is supported by + flash-kernel); flash-kernel is run twice, but at least the system really + runs the latest initrd; LP: #358762. + + -- Loic Minier Sat, 11 Apr 2009 00:07:04 +0200 + +initramfs-tools (0.92bubuntu27) jaunty; urgency=low + + * Backport from Debian (LP: #347685): + - init: Fix boot with LABEL containing one or several '/'. Thanks to + Andres Salomon for testing. (closes: #489008) + - scripts/local-premount/resume: Fix resume with LABEL containing '/'. + + -- Colin Watson Fri, 03 Apr 2009 02:04:34 +0100 + +initramfs-tools (0.92bubuntu26) jaunty; urgency=low + + * hooks/thermal: Do not load thermal control for macintosh if the device is a PS3. (LP: #346899) + + -- Arnaud Jeansen Thu, 26 Mar 2009 00:41:46 +0100 + +initramfs-tools (0.92bubuntu25) jaunty; urgency=low + + * mkinitramfs: include the modules.order file. LP: #296710. + + -- Scott James Remnant Fri, 13 Mar 2009 16:11:49 +0000 + +initramfs-tools (0.92bubuntu24) jaunty; urgency=low + + * update-initramfs: + - when doing set_linked_version, check if the links point + to a existing initrd.img + + -- Michael Vogt Wed, 11 Mar 2009 10:25:42 +0100 + +initramfs-tools (0.92bubuntu23) jaunty; urgency=low + + * Forgot the top-level MODPROBE_OPTIONS set. + + -- Scott James Remnant Mon, 09 Mar 2009 22:06:46 +0000 + +initramfs-tools (0.92bubuntu22) jaunty; urgency=low + + * Replace calls to modprobe -Q with -q. LP: #340128. + + -- Scott James Remnant Mon, 09 Mar 2009 21:38:45 +0000 + +initramfs-tools (0.92bubuntu21) jaunty; urgency=low + + * mkinitramfs: catch errors in find/cpio/gzip pipe (debian bug 514938): + - git 63cc7b9216d69f413cd5414c96cf2c9a403e03ae + - git 93654c9230d3817fa57069012a0b06ccb1df09e4 + + -- Kees Cook Sun, 15 Feb 2009 09:48:50 -0800 + +initramfs-tools (0.92bubuntu20) jaunty; urgency=low + + * scripts/local-premount/resume: wait for usplash drawing routines + to finish by flushing usplash command buffer before starting resume. + + -- Kees Cook Sun, 08 Feb 2009 07:34:40 -0800 + +initramfs-tools (0.92bubuntu19) jaunty; urgency=low + + * hook-functions: Add hid_* modules, since some keyboards will not be + usable at the initramfs/busybox prompt without them. + + -- Luke Yelavich Thu, 29 Jan 2009 07:00:07 +1100 + +initramfs-tools (0.92bubuntu18) jaunty; urgency=low + + * Add ext4 to the initramfs, in case it stops being built into the kernel. + + -- Colin Watson Thu, 08 Jan 2009 13:29:51 +0000 + +initramfs-tools (0.92bubuntu17) jaunty; urgency=low + + [ Mikael Gerdin ] + * Create /dev/mem and /dev/zero if video=uvesafb (LP: #285970). + + [ Colin Watson ] + * Make debug option write debug output to /dev/.initramfs/initramfs.debug + rather than /tmp/initramfs.debug, so that it can be retrieved after + boot. + + -- Colin Watson Wed, 26 Nov 2008 17:22:18 +0000 + +initramfs-tools (0.92bubuntu16) intrepid-proposed; urgency=low + + * Added atl1e to the list of NICs built into the initramfs. + -LP: #292411 + + -- Tim Gardner Fri, 14 Nov 2008 11:40:29 -0700 + +initramfs-tools (0.92bubuntu15) intrepid; urgency=low + + [ Dan Munckton ] + * Revert "framebuffer: Let udev create fb devices." udev isn't started at + this point and therefore can't create framebuffer devices. This causes + usplash not to run on PS3 (LP: #274860). + + -- Colin Watson Wed, 01 Oct 2008 16:02:37 +0100 + +initramfs-tools (0.92bubuntu14) intrepid; urgency=low + + * scripts/functions: Call ipconfig with a one-minute timeout rather than + waiting forever (LP: #182940). + + -- Colin Watson Wed, 01 Oct 2008 14:51:59 +0100 + +initramfs-tools (0.92bubuntu13) intrepid; urgency=low + + * scripts/local-premount/resume: Fix incorrect resume message by checking + for swsusp signature before assuming there's a resume about to happen + + -- Matt Zimmerman Tue, 16 Sep 2008 11:49:55 +0100 + +initramfs-tools (0.92bubuntu12) intrepid; urgency=low + + * scripts/functions: must chvt(1) during failure hooks, as console input + might be required (eg, boot degraded raid) (LP: #268873). + + -- Dustin Kirkland Thu, 11 Sep 2008 16:49:17 -0400 + +initramfs-tools (0.92bubuntu11) intrepid; urgency=low + + * scripts/local-premount/resume: Display a message indicating that a resume + has begun. This is non-localized text, but is better than nothing until + we can display a graphical indicator. (LP: #41137) + + -- Matt Zimmerman Thu, 11 Sep 2008 09:26:31 +0100 + +initramfs-tools (0.92bubuntu10) intrepid; urgency=low + + * drop silly COMPCACHE_PREREQ and SKIP_COMPCACHE hacks, instead we + export BOOT from init and deacivate compcache on the fly if booting + in casper if we have more than 512M actual ram available. + + -- Oliver Grawert Thu, 14 Aug 2008 00:10:13 +0200 + +initramfs-tools (0.92bubuntu9) intrepid; urgency=low + + * Default update-initramfs.conf to not keep backups. With latest + last-good-boot, we don't need to any more. + TODO: LILO probably wants .bak's since it doesn't do last-good-boot stuff. + Should we worry about this? + + -- Ben Collins Sun, 03 Aug 2008 17:34:22 -0400 + +initramfs-tools (0.92bubuntu8) intrepid; urgency=low + + * scripts/functions: Change to tty1 in the panic function to make sure the + user can read any error messages displayed. (LP: #243226) + + -- Luke Yelavich Tue, 29 Jul 2008 16:29:16 +1000 + +initramfs-tools (0.92bubuntu7) intrepid; urgency=low + + * scripts/functions: + - add_mountroot_fail_hook(): set up symlinks to hooks in tmp directory + - try_failure_hooks(): new function that executes each fail hook in + lexographic order, exiting successfully if a hook succeeds + - panic(): remove the fail hook calling logic, now provided by + try_failure_hooks() + * scripts/local: + - get_fstype(): FSTYPE must be initialized to "unknown" in case the fstype + call does not set it + - root_missing(): new function to provide the oft-called set of checks on + the ROOT device + - mountroot(): use root_missing(), and try the failure hooks before giving + up + * Fixes required for (LP: #120375), lots of help from Kees Cook, thanks! + + -- Dustin Kirkland Fri, 25 Jul 2008 17:34:21 -0500 + +initramfs-tools (0.92bubuntu6) intrepid; urgency=low + + * Replace /bin/mount by a symlink to busybox if busybox is available; + klibc mount doesn't support displaying mount points. + + -- Colin Watson Wed, 16 Jul 2008 11:10:05 +0100 + +initramfs-tools (0.92bubuntu5) intrepid; urgency=low + + * Remove klibc chroot when using busybox, as the former is just wrong + (chroot(); execve() rather than chroot(); chdir(); execvp()). + + -- Colin Watson Fri, 11 Jul 2008 12:21:21 +0100 + +initramfs-tools (0.92bubuntu4) intrepid; urgency=low + + * Add COMPCACHE_PREREQ varable (needs to be exported before running + update-initramfs) to the compcache hook script, so that PREREQ can be + filled by apps like casper. with that we are for example able to + disable compcache dynamically if a certain amount of physical ram is + present. + * Add SKIP_COMPCACHE variable to init-top script (to be read from + /tmp/compcache.opts which should be filled by a PREREQ script defined in + COMPCACHE_PREREQ) to make it possible to let the script silently die + + -- Oliver Grawert Wed, 09 Jul 2008 16:17:39 +0000 + +initramfs-tools (0.92bubuntu3) intrepid; urgency=low + + * Support loading compcache from the initramfs. + - conf/initramfs.conf: Add and document the COMPCACHE_SIZE setting. + - initramfs.conf.5: Document the COMPCACHE_SIZE setting. + - hooks/compcache: Install the compcache module and a script to initialize + the cache if COMPCACHE_SIZE contains a value. + - mkinitramfs: export COMPCACHE_SIZE for the hook. + + -- Johan Kiviniemi Wed, 09 Jul 2008 03:10:21 +0300 + +initramfs-tools (0.92bubuntu2) intrepid; urgency=low + + * Whilst looping for the root filesystem, don't just rely on the existance + of the block device and whether vol_id succeeds on it, but also make + sure that udev is not currently active by calling "settle" on it. This + solves a race where mdadm or devmapper still has a lock on the device, + but the contents are ready which will cause the mount call later to fail. + + -- Scott James Remnant Wed, 02 Jul 2008 16:44:53 +0100 + +initramfs-tools (0.92bubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - Change Build-Depends to Build-Depends-Indep. + - Use busybox-initramfs for Depends. + - Do not source udev.conf. + - Set BUSBOXDIR properly. + - Keep kinit and gzip in initrd. + - Use -Qb for for module loading to honor blacklists via the use of + MODPROBE_OPTIONS. + - all_generic_ide script. + - Remove lvm local-top script (conflicts with lvm-common). + - takeover=1 in update-initramfs. + - Allow the mounting of a root filesystem as a loop device on top + of a host filesystem, used for wubi installs. + - Add vfat support to the initramfs. + - Reduce timeout to 30 seconds -- corner cases (giant + disk arrays, clusters) will need to provide their own rootdelay= + boot arg. + - Keep more meaningful text for no root device panic. + - Provide a clearer error on mount failure of the Windows host + filesystem. + - Add 2>&1 to the run-init line. + - Source /scripts/functions in resume script. + - resume UUID upgrade. + - Add mountroot failure support, to allow meaningful messages when + no root device can be found. + - Panic if either the root device doesn't exist, or vol_id cannot + identify it. Allows for mountroot failure hooks for md devices + to be displayed. + - Ignore blacklist for forced vga= usage. + - Loop for 5 seconds waiting for $suspend to show up, adjustable + with the resumedelay= command-line arg. + - Load virtio_pci for MODULES=most. + - Usplash pulsates until the real init takes over. + - Drop scripts/init-premount/thermal as force_load can do this + for us during initramfs creation. + - Load thermal modules on lpia. + - Allow for alternative PREREQS to be specified using | as the + separator. + - Add udf to auto_add_modules. It was originally added to + dep_add_modules, however dep_add_modules now auto-detects the + modules needed for the root filesystem. + * hook-functions: + - Refer to /lib/firmware/${version} where version is the kernel + version we are building an initramfs for. + - Do not copy /lib/udev/firmware.agent to the initramfs. Ubuntu's + udev has /lib/udev/firmware_helper instead, and the udev hook + copies this to the initramfs for us. + - Dropped the manual_add_firmware function, as initramfs-tools now + checks the firmware field in the module it is copying, and copies + the firmware required by that module if its available. + * Drop hooks/keymap and the KEYMAP variable setting in + conf/initramfs.conf as console-setup takes care of keymap loading. + * hooks/udevhelper: Drop, udev already copies what it needs. + * hooks/legacylvm: Drop, as it refers to binaries and directories our + lvm package doesn't have. + + -- Luke Yelavich Mon, 30 Jun 2008 15:54:36 +1000 + initramfs-tools (0.92b) unstable; urgency=low [ maximilian attems ] @@ -2491,6 +6343,348 @@ -- maximilian attems Wed, 7 Mar 2007 23:34:17 +0100 +initramfs-tools (0.85eubuntu41) intrepid; urgency=low + + * Backport from Debian (required for new busybox): + - init: Fix mount options invocation for klibc mount. + + -- Colin Watson Wed, 11 Jun 2008 18:20:44 +0100 + +initramfs-tools (0.85eubuntu40) intrepid; urgency=low + + * Add vfat support to the initramfs (LP: #236021). + + -- Evan Dandrea Fri, 30 May 2008 12:50:50 -0400 + +initramfs-tools (0.85eubuntu38) intrepid; urgency=low + + * scripts/local: reduce timeout to 30 seconds -- corner cases (giant + disk arrays, clusters) will need to provide their own rootdelay= + boot arg. Expanded the failure text to include a hint about the + "rootdelay" boot argument. + + -- Kees Cook Wed, 28 May 2008 13:17:16 -0700 + +initramfs-tools (0.85eubuntu37) intrepid; urgency=low + + * Provide a clearer error on mount failure of the Windows host + filesystem (LP: #226622) + + -- Agostino Russo Tue, 06 May 2008 23:55:47 +0100 + +initramfs-tools (0.85eubuntu36) hardy; urgency=low + + * Drop dependency on volumeid, it's shipped by udev again. + + -- Scott James Remnant Thu, 10 Apr 2008 14:00:46 +0100 + +initramfs-tools (0.85eubuntu35) hardy; urgency=low + + * hook-functions: Do not display find error messages if firmware directories + cannot be found. (LP: #153743) + * scripts/functions: Remove unneeded quotes. These were causing multiple + mountroot fail hook entries to be run as one command. + * scripts/local: Panic if the root device node cannot be found, or vol_id + can't identify the volume on the device. This allows mdadm's mountroot fail + hook to be reliably triggered, as the md device node exists even if the + array cannot be brought up. + * init: Add 2>&1 to the run-init line at the end of the file, to fix a long + outstanding bug where init has no stderr. + * scripts/local-premount/resume: Source /scripts/functions, thanks to + Nikolaus Filus for the patch. (LP: #203429) + + -- Luke Yelavich Thu, 10 Apr 2008 00:48:51 +1000 + +initramfs-tools (0.85eubuntu34) hardy; urgency=low + + * Wow, somehow my fix for 129910 got removed. Re-implement. DO NOT USE -Qb + for framebuffer. We need to ignore blacklist for forced vga= usage. + + -- Ben Collins Tue, 18 Mar 2008 11:46:44 -0400 + +initramfs-tools (0.85eubuntu33) hardy; urgency=low + + * Edit scripts/local with patch from + https://bugs.edge.launchpad.net/wubi/+bug/201750 comment 1 + "Cannot remount loopfiles inside of vfat" + "The workaround involves mounting all loopinstallations rw to begin with" + Closes LP: #201750 + + -- Jonathan Riddell Mon, 17 Mar 2008 14:35:20 +0000 + +initramfs-tools (0.85eubuntu32) hardy; urgency=low + + * Drop -9 to gzip call in order to save time at a very small size + penalty (< 1%) + + -- Tollef Fog Heen Fri, 14 Mar 2008 10:41:38 +0100 + +initramfs-tools (0.85eubuntu31) hardy; urgency=low + + * debian/initramfs-tools.preinst: If /etc/mkinitramfs/initramfs.conf was not + modified, do not copy it over to /etc/initramfs-tools on a dapper->hardy + upgrade, since this causes an unnecessary dpkg conffile prompt. + (LP: #172853) + + -- Martin Pitt Thu, 13 Mar 2008 19:19:59 +0100 + +initramfs-tools (0.85eubuntu30) hardy; urgency=low + + * Fix check for "ro" on /boot + - LP: #197470 + + -- Ben Collins Tue, 11 Mar 2008 14:41:15 -0400 + +initramfs-tools (0.85eubuntu29) hardy; urgency=low + + * Do not honor blacklists for vga=/video= parsing. We should always load the + fb drivers in this case (since this is a manual operation on the part of + the user) + LP: #129910 + + -- Ben Collins Tue, 11 Mar 2008 11:46:08 -0400 + +initramfs-tools (0.85eubuntu28) hardy; urgency=low + + * update-initramfs: remove failed ".new" initrd when creation is aborted. + + -- Kees Cook Mon, 10 Mar 2008 15:25:03 -0700 + +initramfs-tools (0.85eubuntu27) hardy; urgency=low + + * Copy the initramfs image to a backup file, in the event that the /boot + filesystem doesn't support hard links. + + -- Luke Yelavich Fri, 07 Mar 2008 09:17:53 +1100 + +initramfs-tools (0.85eubuntu26) hardy; urgency=low + + * Loop for 5 seconds waiting for $suspend to show up. + + -- Soren Hansen Fri, 29 Feb 2008 15:34:35 -0500 + +initramfs-tools (0.85eubuntu25) hardy; urgency=low + + * scripts/functions: + - Call all registered mountroot failure hooks, rather than + stopping at one that has reported a failure. + - Change the loop code that runs mountroot failure hooks, so we don't end up + in an infinite loop. + + -- Luke Yelavich Mon, 18 Feb 2008 11:59:07 +1100 + +initramfs-tools (0.85eubuntu24) hardy; urgency=low + + * Implement the initramfs-tools part of the initramfs error handling spec + * update-initramfs: + - Make a hard link to the original initramfs image, rather than moving + it out of the way. + - Create a new initramfs image to ${initramfs}.new, to ensure we still + have a functional initramfs in case of failure. The original initramfs + only gets replaced when a new image is successfully created. + * scripts/functions: + - Added add_mountroot_fail_hook function to allow scripts in + init-premount to register a hook to allow extra information + to be given to the user, in the event of a non-existant root + device. + - The panic function now runs any registered mountroot fail hooks that + were previously registered, and only does so when passed the -r + argument from the calling function. + * scripts/local: Call the panic function with -r to run any registered + mountroot fail hooks when a root device cannot be found. + + -- Luke Yelavich Tue, 05 Feb 2008 13:38:51 +1100 + +initramfs-tools (0.85eubuntu23) hardy; urgency=low + + * Fix broken test in ro_boot_check (LP: #187282). It was matching ro + as a subword. + + -- Evan Dandrea Wed, 30 Jan 2008 10:35:28 -0500 + +initramfs-tools (0.85eubuntu22) hardy; urgency=low + + * Load virtio_pci for MODULES=most. + + -- Soren Hansen Wed, 23 Jan 2008 19:27:18 +0100 + +initramfs-tools (0.85eubuntu21) hardy; urgency=low + + * Drop code to increment the usplash progress bar after each message, + instead this will be pulsating until the real system. LP: #162397. + + -- Scott James Remnant Tue, 13 Nov 2007 20:41:33 +0000 + +initramfs-tools (0.85eubuntu20) gutsy; urgency=low + + * Updates for ps3 modules + + -- Ben Collins Thu, 04 Oct 2007 10:31:53 -0400 + +initramfs-tools (0.85eubuntu19) gutsy; urgency=low + + * Always mount loop-mount NTFS host filesystems read-write; ntfs-3g can't + remount yet. + + -- Colin Watson Thu, 06 Sep 2007 23:36:24 +0100 + +initramfs-tools (0.85eubuntu18) gutsy; urgency=low + + * Use dpkg-trigger even in our own postinst, unless we're doing + trigger processing or the running dpkg version doesn't support + reflexive triggers. This reduces update-initramfs runs from two per + upgrade batch to one per batch. + + -- Ian Jackson Fri, 24 Aug 2007 15:45:38 +0100 + +initramfs-tools (0.85eubuntu17) gutsy; urgency=low + + * Use dpkg-trigger (if available and operational) to save on + calls to update-initramfs. + + -- Ian Jackson Thu, 16 Aug 2007 16:03:52 +0100 + +initramfs-tools (0.85eubuntu16) gutsy; urgency=low + + * Load thermal modules on lpia as well. This may need to change in + the future to support hardware-specific features, but it's a start. + + + -- Adam Conrad Tue, 31 Jul 2007 15:30:42 +1000 + +initramfs-tools (0.85eubuntu15) gutsy; urgency=low + + * Add support for loop=, loopflags=, and loopfstype= arguments, to allow + the real root filesystem to be loop-mounted from a given file on the + filesystem specified by root=. + + -- Colin Watson Mon, 30 Jul 2007 16:46:19 +0100 + +initramfs-tools (0.85eubuntu14) gutsy; urgency=low + + * Add support for sunvnet and sunvdc in hook-functions. + + -- Fabio M. Di Nitto Wed, 04 Jul 2007 18:59:22 +0200 + +initramfs-tools (0.85eubuntu13) gutsy; urgency=low + + * fix nfsroot handling if rootserver is specified with IP and colon in + root-path (debian bug #387808) + + -- Oliver Grawert Wed, 04 Jul 2007 10:19:49 +0200 + +initramfs-tools (0.85eubuntu12) gutsy; urgency=low + + * Add support for alternative prerequisites, specified as e.g. + "kbd|console-tools" (note the lack of spaces around the "|"). + + -- Colin Watson Fri, 01 Jun 2007 16:14:22 +0100 + +initramfs-tools (0.85eubuntu11) gutsy; urgency=low + + * Allow modules specified by force_load to be blacklisted. + * Drop scripts/init-premount/thermal since this can be handled by using + force_load now. + + * Make sure framebuffer modules can be blacklisted. + + * Drop mdrun script, since this can be handled entirely within the udev + and initramfs scripts supplied by the mdadm package. + + -- Scott James Remnant Tue, 22 May 2007 10:42:34 +0100 + +initramfs-tools (0.85eubuntu10) feisty; urgency=low + + * As well as waiting for the existance of the root device node, also check + to see whether we have a filesystem of some kind on it. Some devices + nodes (devmapper/LVM/EVMS, mdadm) will exist before they can be safely + used. LP: #103177. + + -- Scott James Remnant Fri, 13 Apr 2007 10:51:27 +0100 + +initramfs-tools (0.85eubuntu9) feisty; urgency=low + + * Add patch to restore initramfs on failures. Taken from Debian's + initramfs-tools git repo (5dfd85f416a10b1c41ca7005de38b58715c04472). + * While we're here, remove snd_ps3 from autoload list on PS3. Isn't in + initramfs. Installer will add it to /etc/modules. + + -- Ben Collins Tue, 10 Apr 2007 11:05:45 -0400 + +initramfs-tools (0.85eubuntu8) feisty; urgency=low + + * Add support for the netboot variable, used by casper. LP: #96072. + + -- Tollef Fog Heen Fri, 30 Mar 2007 23:25:45 +0200 + +initramfs-tools (0.85eubuntu7) feisty; urgency=low + + * Use -Qb for ppc thermal modprobe's + * Add snd_ps3 to ps3 module loads. Use -Qb here too. + + -- Ben Collins Thu, 29 Mar 2007 19:54:40 -0400 + +initramfs-tools (0.85eubuntu6) feisty; urgency=low + + * hook-functions: Add udf to dep_add_modules and auto_add_modules. + + -- Colin Watson Fri, 23 Mar 2007 19:47:51 +0000 + +initramfs-tools (0.85eubuntu5) feisty; urgency=low + + * Copy all of drivers/block/ to initramfs. Can't believe we didn't do this + before. + * Add init-premount hook to manually load modules for ps3. These modules do + not have aliases or auto-load features, so have to do it by hand + (ps3-system-bus). + * For auto module inclusions, detect when we need to pack ps3 modules. + + -- Ben Collins Thu, 1 Mar 2007 16:45:48 -0500 + +initramfs-tools (0.85eubuntu4) feisty; urgency=low + + * Remove the 10MB size restriction from /dev; this doesn't make sense for + Ubuntu since we use /dev for initramfs/realfs handover and for things like + bootchart. + + -- Scott James Remnant Tue, 27 Feb 2007 15:00:54 +0000 + +initramfs-tools (0.85eubuntu3) feisty; urgency=low + + * Add aic94xx firmware hooks. + + -- Ben Collins Wed, 21 Feb 2007 15:34:56 -0500 + +initramfs-tools (0.85eubuntu2) feisty; urgency=low + + * Don't load vga16fb on amd64 either. usplash 0.4-36 fixes things so that + we don't need it (LP: #67545). + + -- Colin Watson Wed, 7 Feb 2007 09:55:05 +0000 + +initramfs-tools (0.85eubuntu1) feisty; urgency=low + + * Merge from debian unstable, remaining changes: + - Change Build-Depends to Build-Depends-Indep. + - Use busybox-initramfs for Depends. + - RESUME UUID upgrade. + - add_firmware addition to hook-functions. + - Use copy_modules_dir for auto module copying. + - noexec,nodev,nosuid options for /sys and /proc. + - Do not source udev.conf. + - Set BUSBOXDIR properly. + - Keep kinit and gzip in initrd. + - Use -Qb for for module loading to honor blacklists. + - all_generic_ide script. + - Only load vga16fb on amd64 (not i386). + - Remove lvm local-top script (conflicts with lvm-common). + - takeover=1 in update-initramfs. + - Remove udev_helper local-top script. It loads ide-generic, and we don't + want that. + - Closes: #76872 + + -- Ben Collins Tue, 2 Jan 2007 20:28:59 -0500 + initramfs-tools (0.85e) unstable; urgency=high Release "Qu'ils soient rouges, bleus ou blancs Il faudrait mieux les pendre" @@ -3079,6 +7273,41 @@ -- Ben Collins Thu, 23 Nov 2006 02:10:29 -0500 +initramfs-tools (0.69ubuntu20) edgy; urgency=low + + * Add the LSI Logic MegaRAID SAS Driver (megaraid_sas) to the SCSI + module list, common on newer Dell PowerEdge servers, among others. + + -- Adam Conrad Wed, 25 Oct 2006 18:16:15 +1000 + +initramfs-tools (0.69ubuntu19) edgy; urgency=low + + * Check for "modules.dep" before running depmod, not "modules.depmod" + which won't ever exist. This caused depmod to be run after live + filesystem generation without the restricted modules available, it + could also randomly cause the same to happen on upgrades depending + on the order packages are configured. Ubuntu: #60938. + + -- Scott James Remnant Tue, 24 Oct 2006 18:51:09 +0100 + +initramfs-tools (0.69ubuntu18) edgy; urgency=low + + * Anchor regex in sed command to revert conffile edits, to avoid + double-commenting RESUME= and causing a conffile prompt on upgrades + (Closes: LP#66599) + + -- Matt Zimmerman Wed, 18 Oct 2006 04:54:45 -0700 + +initramfs-tools (0.69ubuntu17) edgy; urgency=low + + [ Tollef Fog Heen ] + * Load vga16fb on amd64. + + [ Adam Conrad ] + * ... but only when booting with a splash. + + -- Adam Conrad Tue, 17 Oct 2006 12:29:35 +1000 + initramfs-tools (0.69ubuntu16) edgy; urgency=low * Bring in preinst fixes from Debian, including s/configure/install/ in diff -Nru initramfs-tools-0.142/debian/control initramfs-tools-0.142ubuntu15.1/debian/control --- initramfs-tools-0.142/debian/control 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/control 2023-09-25 21:47:50.000000000 +0200 @@ -2,12 +2,15 @@ Section: utils Priority: optional Uploaders: Michael Prokop , Ben Hutchings -Maintainer: Debian kernel team -Build-Depends: debhelper-compat (= 13), bash-completion +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian kernel team +Build-Depends: debhelper-compat (= 12), bash-completion, pkg-config, libudev-dev, netplan.io [!i386] , shellcheck [!i386] Rules-Requires-Root: no -Standards-Version: 4.6.2 -Vcs-Browser: https://salsa.debian.org/kernel-team/initramfs-tools -Vcs-Git: https://salsa.debian.org/kernel-team/initramfs-tools.git +Standards-Version: 4.1.5 +Vcs-Browser: https://code.launchpad.net/~ubuntu-core-dev/ubuntu/+source/initramfs-tools/+git/initramfs-tools +Vcs-Git: https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/initramfs-tools +X-Debian-Vcs-Browser: https://salsa.debian.org/kernel-team/initramfs-tools +X-Debian-Vcs-Git: https://salsa.debian.org/kernel-team/initramfs-tools.git Package: initramfs-tools Architecture: all @@ -15,7 +18,8 @@ Depends: initramfs-tools-core (= ${binary:Version}), linux-base, ${misc:Depends} Suggests: bash-completion Provides: linux-initramfs-tool -Conflicts: linux-initramfs-tool +Conflicts: linux-initramfs-tool, usplash (<< 0.5.50) +Breaks: initscripts (<< 2.88dsf-59.3~), upstart, e2fsprogs (<< 1.42.13), netplan.io (<< 0.37) Description: generic modular initramfs generator (automation) This package builds a bootable initramfs for Linux kernel packages. The initramfs is loaded along with the kernel and is responsible for @@ -24,12 +28,20 @@ Package: initramfs-tools-core Architecture: all Multi-Arch: foreign -Recommends: ${busybox:Recommends}, zstd -Depends: klibc-utils (>= 2.0.4-8~), cpio (>= 2.12), kmod, udev, coreutils (>= 8.24), logsave | e2fsprogs (<< 1.45.3-1~), ${misc:Depends} +Recommends: zstd +Depends: ${busybox:Depends}, dhcpcd-base, dracut-install, initramfs-tools-bin (= ${binary:Version}), klibc-utils (>= 2.0.4-8~), cpio (>= 2.12), kmod, udev, coreutils (>= 8.24), logsave | e2fsprogs (<< 1.45.3-1~), ${misc:Depends} Suggests: bash-completion -Breaks: ${busybox:Breaks} +Breaks: initramfs-tools (<< 0.121~), ${busybox:Breaks} +Replaces: initramfs-tools (<< 0.121~) Description: generic modular initramfs generator (core tools) This package contains the mkinitramfs program that can be used to create a bootable initramfs for a Linux kernel. The initramfs should be loaded along with the kernel and is then responsible for mounting the root filesystem and starting the main init system. + +Package: initramfs-tools-bin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: binaries used by initramfs-tools + This package contains binaries used inside the initramfs images generated + by initramfs-tools. diff -Nru initramfs-tools-0.142/debian/copyright initramfs-tools-0.142ubuntu15.1/debian/copyright --- initramfs-tools-0.142/debian/copyright 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/copyright 2022-02-08 20:54:47.000000000 +0100 @@ -1,26 +1,33 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Source: https://salsa.debian.org/kernel-team/initramfs-tools +This package was debianized by Jeff Bailey on +Thu, 27 Jan 2005 15:23:52 -0500. -Files: * -Copyright: 2005 - 2011 maximilian attems - 2005 Jeff Bailey - 2005 - 2007 David Härdeman - 2008 - 2010 Martin Michlmayr - 2007 - 2011 Michael Prokop - 2005 - 2009 Scott James Remnant -License: GPL-2+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this package; if not, see 'https://www.gnu.org/licenses/'. -Comment: - On Debian systems, the full text of the GNU General Public License - version 2 can be found in the file '/usr/share/common-licenses/GPL-2'. +The current Debian maintainer are maximilian attems +and Michael Prokop . + +The current ubuntu release can be found at: +http://archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/ + +The Debian tree is maintained with "git" at: +https://anonscm.debian.org/git/kernel/initramfs-tools.git +https://anonscm.debian.org/cgit/kernel/initramfs-tools.git + +Authors: maximilian attems , + Jeff Bailey , + David Härdeman , + Martin Michlmayr , + Michael Prokop , + Scott James Remnant + +Copyright: 2005 - 2011 maximilian attems + 2005 Jeff Bailey + 2005 - 2007 David Härdeman + 2008 - 2010 Martin Michlmayr + 2007 - 2011 Michael Prokop + 2005 - 2009 Scott James Remnant + +License: + +GPL v2 or any later version + +On Debian systems, the complete text of the GNU General Public License version +2 can be found in `/usr/share/common-licenses/GPL-2'. diff -Nru initramfs-tools-0.142/debian/initramfs-tools-bin.install initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools-bin.install --- initramfs-tools-0.142/debian/initramfs-tools-bin.install 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools-bin.install 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,2 @@ +src/wait-for-root usr/lib/initramfs-tools/bin +src/gcc_s1-stub usr/lib/initramfs-tools/bin diff -Nru initramfs-tools-0.142/debian/initramfs-tools-core.install initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools-core.install --- initramfs-tools-0.142/debian/initramfs-tools-core.install 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools-core.install 2023-09-25 21:47:50.000000000 +0200 @@ -6,3 +6,4 @@ hooks usr/share/initramfs-tools hook-functions usr/share/initramfs-tools conf/modules usr/share/initramfs-tools +dhcpcd-hooks usr/share/initramfs-tools diff -Nru initramfs-tools-0.142/debian/initramfs-tools.lintian-overrides initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools.lintian-overrides --- initramfs-tools-0.142/debian/initramfs-tools.lintian-overrides 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools.lintian-overrides 2022-02-08 20:54:47.000000000 +0100 @@ -0,0 +1,2 @@ +# upstart will never be fixed, so it is correct to not specify a version +initramfs-tools: breaks-without-version upstart diff -Nru initramfs-tools-0.142/debian/initramfs-tools.postinst initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools.postinst --- initramfs-tools-0.142/debian/initramfs-tools.postinst 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/initramfs-tools.postinst 2023-08-24 11:57:29.000000000 +0200 @@ -36,7 +36,7 @@ fi # Regenerate initramfs whenever we go to dpkg state `installed' -if [ "x$1" != xtriggered ]; then +if [ "$1" != triggered ]; then # this activates the trigger, if triggers are working update-initramfs -u else @@ -44,4 +44,21 @@ DPKG_MAINTSCRIPT_PACKAGE='' update-initramfs -u fi +# Remove all initrd old dkms files for which there is no +# corresponding initramfs image in /boot (LP: #1791959). +# One shot only: +# - bug only affected users that were upgrading packages +# - new users are not affected +# - LP: #1515513 took care of removing old dkms together with the kernel +if [ "$1" = configure ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.131ubuntu11"; then + for old_dkms_file in /boot/initrd-*.img.old-dkms \ + /boot/initramfs-*.img.old-dkms \ + /boot/initrd.img-*.old-dkms \ + /boot/initrd-*.old-dkms; do + if [ ! -e "${old_dkms_file%%.old-dkms}" ]; then + rm -fv "${old_dkms_file}" + fi + done +fi + #DEBHELPER# diff -Nru initramfs-tools-0.142/debian/NEWS initramfs-tools-0.142ubuntu15.1/debian/NEWS --- initramfs-tools-0.142/debian/NEWS 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/NEWS 2022-02-08 20:54:47.000000000 +0100 @@ -1,6 +1,6 @@ initramfs-tools (0.129) unstable; urgency=medium - Some systems that do not support suspend-to-disk (hibernation) will + * Some systems that do not support suspend-to-disk (hibernation) will require a configuration change to explicitly disable this. From version 0.128, the boot code waits for a suspend/resume device @@ -21,13 +21,12 @@ initramfs-tools (0.121~rc1) unstable; urgency=medium - If initramfs-tools is configured to use busybox but it is not + * If initramfs-tools is configured to use busybox but it is not installed, mkinitramfs will now fail. Previously it would quietly use klibc instead, sometimes producing a broken initramfs. You may need to modify /etc/initramfs-tools/initramfs.conf or install busybox when upgrading. - - Support for loop-aes has been removed. If you use loop-aes encryption + * Support for loop-aes has been removed. If you use loop-aes encryption for the root or /usr filesystem, you will need to switch to cryptsetup. See the 'loop-AES extension' section in cryptsetup(8). @@ -35,22 +34,18 @@ initramfs-tools (0.119) unstable; urgency=medium - The initramfs will now run fsck on the root filesystem before + * The initramfs will now run fsck on the root filesystem before mounting it. If the chosen init program is systemd and there is a separate /usr filesystem, it will also fsck and mount /usr. - - If /usr is a separate filesystem on a RAID device and the INITRDSTART + * If /usr is a separate filesystem on a RAID device and the INITRDSTART setting in /etc/default/mdadm is not 'all', you will need to change it to include that device. - - If /usr is a separate filesystem on an LVM logical volume, and the + * If /usr is a separate filesystem on an LVM logical volume, and the line for /usr in /etc/fstab specifies the device by UUID or LABEL, you must change this line to specify the device using the format /dev/mapper/VG-LV or /dev/VG/LV. - - It is no longer possible to bind-mount the /usr filesystem. - - If the RTC (real time clock) is set to local time and the local time is + * It is no longer possible to bind-mount the /usr filesystem. + * If the RTC (real time clock) is set to local time and the local time is ahead of UTC, e2fsck will print a warning during boot about the time changing backward (bug #767040). You can disable this by putting the following lines in /etc/e2fsck.conf: diff -Nru initramfs-tools-0.142/debian/rules initramfs-tools-0.142ubuntu15.1/debian/rules --- initramfs-tools-0.142/debian/rules 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/rules 2023-09-25 21:47:50.000000000 +0200 @@ -6,14 +6,15 @@ # On Debian we can use either busybox or busybox-static, but on Ubuntu # and derivatives only busybox-initramfs will work. BUSYBOX_PACKAGES := $(shell if dpkg-vendor --derives-from ubuntu; then echo busybox-initramfs; else echo busybox busybox-static; fi) -BUSYBOX_MIN_VERSION := 1:1.22.0-17~ +BUSYBOX_MIN_VERSION := 1:1.30.1-4ubuntu5~ override_dh_gencontrol: echo >> debian/initramfs-tools-core.substvars "busybox:Breaks=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=, % (<< $(BUSYBOX_MIN_VERSION))))" - echo >> debian/initramfs-tools-core.substvars "busybox:Recommends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| % (>= $(BUSYBOX_MIN_VERSION))))" + echo >> debian/initramfs-tools-core.substvars "busybox:Depends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| % (>= $(BUSYBOX_MIN_VERSION))))" dh_gencontrol override_dh_install: + install -d debian/initramfs-tools-core/usr/sbin sed -e 's,@BUSYBOX_PACKAGES@,$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=or %)),' \ -e 's/@BUSYBOX_MIN_VERSION@/$(BUSYBOX_MIN_VERSION)/' \ mkinitramfs > debian/initramfs-tools-core/usr/sbin/mkinitramfs @@ -22,3 +23,27 @@ override_dh_installinitramfs: @: + +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +CROSS := +else +CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config +endif + +override_dh_auto_build: + make -C src $(CROSS) + +override_dh_auto_clean: + make -C src clean + +DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) + +override_dh_auto_test: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + ifeq (,$(filter i386,$(DEB_HOST_ARCH))) + shellcheck -e SC1090,SC1091 -s dash hook-functions $$(find hooks scripts -type f) $$({ find . -maxdepth 1 -type f -executable; find debian -maxdepth 1 -type f; find docs kernel -type f; } | xargs grep -l '^#!/bin/sh') + endif + ./tests/run-tests +endif diff -Nru initramfs-tools-0.142/debian/tests/amd64-ata-only initramfs-tools-0.142ubuntu15.1/debian/tests/amd64-ata-only --- initramfs-tools-0.142/debian/tests/amd64-ata-only 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/tests/amd64-ata-only 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -#!/bin/sh -e - -SUPPORTED_FLAVOURS='amd64 generic' -ROOTDISK_QEMU_IF=ide -ROOTDISK_LINUX_NAME=sda -. debian/tests/test-common - -cat >>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" <>"${CONFDIR}/initramfs.conf" <>"${CONFDIR}/initramfs.conf" <>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" <>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" < "${ROOTDIR}/etc/fstab" "/dev/${USRDISK_LINUX_NAME} /usr ext2 defaults 0 2" -USRDIR="$(mktemp -d)" -mv "${ROOTDIR}/usr/"* "${USRDIR}" - -build_rootfs_ext2 -build_fs_ext2 "${USRDIR}" "${USRDISK}" - -run_qemu_amd64 - -# Check that fsck ran on both devices -grep -q "^/dev/${ROOTDISK_LINUX_NAME}: clean," "${OUTPUT}" -grep -q "^/dev/${USRDISK_LINUX_NAME}: clean," "${OUTPUT}" diff -Nru initramfs-tools-0.142/debian/tests/amd64-virtio-only initramfs-tools-0.142ubuntu15.1/debian/tests/amd64-virtio-only --- initramfs-tools-0.142/debian/tests/amd64-virtio-only 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/tests/amd64-virtio-only 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -#!/bin/sh -e - -SUPPORTED_FLAVOURS='amd64 generic' -ROOTDISK_QEMU_IF=virtio -ROOTDISK_LINUX_NAME=vda -. debian/tests/test-common - -cat >>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" < None: + self.errors = 0 + self.command_outputs = self._extract_command_outputs_from_log(log) + + def _error(self, msg: str) -> None: + print("ERROR: " + msg) + self.errors += 1 + + @staticmethod + def _extract_command_outputs_from_log(log: str) -> dict[str, str]: + """Extract command outputs from the given log output. + + The output must be framed by a header and a footer line. The header + line contains the key surrounded by 10 # characters. The footer + line consist of 40 # characters. Returns a mapping from the output + key to the command output. + """ + marker = "#" * 10 + footer = "#" * 40 + matches = re.findall( + f"^{marker} ([^#]+) {marker}\n(.*?\n){footer}$", + log, + flags=re.DOTALL | re.MULTILINE, + ) + return {m[0]: m[1] for m in matches} + + def get_commands_from_ps_output(self) -> list[str]: + """Get list of command from `ps -ww aux` output.""" + ps_output = self.command_outputs["ps -ww aux"] + lines = ps_output.strip().split("\n")[1:] + commands = [] + for line in lines: + columns = re.split(r"\s+", line, maxsplit=10) + commands.append(columns[10]) + return commands + + def get_ip_addr(self) -> list[typing.Any]: + """Get IP address information from `ip addr` JSON output.""" + ip_addr = json.loads(self.command_outputs["ip -json addr"]) + assert isinstance(ip_addr, list) + return ip_addr + + def get_ip_route(self) -> list[typing.Any]: + """Get IP route information from `ip route` JSON output.""" + ip_route = json.loads(self.command_outputs["ip -json route"]) + assert isinstance(ip_route, list) + return ip_route + + def run_checks(self, args: list[str]) -> int: + """Run the checks and return the number of errors found. + + The methods of this class can be u + """ + if not args: + return self.errors + + try: + check = getattr(self, args[0]) + except AttributeError: + self._error(f"Check '{args[0]}' not found.") + return self.errors + check_args = [] + + for arg in args[1:]: + if not hasattr(self, arg): + check_args.append(arg) + continue + + check(*check_args) + check = getattr(self, arg) + check_args = [] + + check(*check_args) + return self.errors + + def _check_is_subset(self, expected: set[str], actual: set[str]) -> None: + """Check that the first dictionary is a subset of the second one. + + Log errors if the sets are different. + """ + unexpected = actual - expected + if unexpected: + self._error(f"Not expected entries: {unexpected}") + + def _check_is_subdict( + self, + expected_dict: dict[str, str], + actual_dict: dict[str, str], + log_prefix: str, + ) -> None: + """Check that the first dictionary is a subset of the second one. + + Log errors if differences are found. + """ + missing_keys = set(expected_dict.keys()) - set(actual_dict.keys()) + if missing_keys: + self._error(f"{log_prefix}Missing keys: {missing_keys}") + for key, expected_value in sorted(expected_dict.items()): + actual_value = actual_dict.get(key, "") + if expected_value != actual_value: + self._error( + f"{log_prefix}Value for key '{key}' differs:" + f" '{expected_value}' expected, but got '{actual_value}'" + ) + + # Below are all checks that the user might call. + + def has_hostname(self, hostname_pattern: str) -> None: + """Check that the hostname matches the given regular expression.""" + hostname = self.command_outputs["hostname"].strip() + if re.fullmatch(hostname_pattern, hostname): + print(f"hostname '{hostname}' matches pattern '{hostname_pattern}'") + return + self._error( + f"hostname '{hostname}' does not match" + f" expected pattern '{hostname_pattern}'" + ) + + def has_ip_addr(self, family: str, addr_pattern: str, device_pattern: str) -> None: + """Check that a matching network device has a matching IP address.""" + for device in self.get_ip_addr(): + if not re.fullmatch(device_pattern, device["ifname"]): + continue + for addr in device["addr_info"]: + if addr["family"] != family or addr["scope"] != "global": + continue + address = f"{addr['local']}/{addr['prefixlen']}" + if re.fullmatch(addr_pattern, address): + print(f"found addr {address} for {device['ifname']}: {addr}") + return + self._error( + f"addr {address} for {device['ifname']}" + f" does not match {addr_pattern}: {addr}" + ) + return + name = {"inet": "IPv4", "inet6": "IPv6"}[family] + self._error( + f"no link found that matches '{device_pattern}' and has an {name} address" + ) + + def has_ipv4_addr(self, addr_pattern: str, device_pattern: str) -> None: + """Check that a matching network device has a matching IPv4 address.""" + self.has_ip_addr("inet", addr_pattern, device_pattern) + + def has_ipv6_addr(self, addr_pattern: str, device_pattern: str) -> None: + """Check that a matching network device has a matching IPv6 address.""" + self.has_ip_addr("inet6", addr_pattern, device_pattern) + + def has_ipv4_default_route(self, gateway_pattern: str, device_pattern: str) -> None: + """Check that the IPv4 default route is via a matching gateway and device.""" + for route in self.get_ip_route(): + if route["dst"] != "default": + continue + if not re.fullmatch(gateway_pattern, route["gateway"]) or not re.fullmatch( + device_pattern, route["dev"] + ): + self._error( + f"Default IPv4 route does not match expected gateway pattern" + f" '{gateway_pattern}' or dev pattern '{device_pattern}': {route}" + ) + continue + print( + f"found IPv4 default route via {route['gateway']}" + f" for {route['dev']}: {route}" + ) + return + self._error("no IPv4 default route found") + + def has_net_conf(self, min_expected_files: str, *expected_net_confs: str) -> None: + """Compare the /run/net*.conf files. + + There must be at least one /run/net*.conf file in the log output and no + unexpected one. The format is `=`. + """ + + expected = dict(nc.split("=", maxsplit=1) for nc in expected_net_confs) + prog = re.compile(r"/run/net[^#]+\.conf") + got = { + key: value for key, value in self.command_outputs.items() if prog.match(key) + } + + if len(got) < int(min_expected_files): + self._error( + f"Expected at least {min_expected_files} /run/net*.conf files," + f" but got only {len(got)}: {set(got.keys())}" + ) + self._check_is_subset(set(expected.keys()), set(got.keys())) + + for net_dev in sorted(got.keys()): + log_prefix = f"{net_dev}: " + expected_net_conf = parse_net_conf(expected.get(net_dev, "")) + actual_net_conf = parse_net_conf(got.get(net_dev, "")) + self._check_is_subdict(expected_net_conf, actual_net_conf, log_prefix) + print(f"compared {len(expected_net_conf)} items from {net_dev}") + + def has_no_running_processes(self) -> None: + """Check that there are no remaining running processes from the initrd.""" + processes = drop_kernel_processes(self.get_commands_from_ps_output()) + + udevd = "/lib/systemd/systemd-udevd --daemon --resolve-names=never" + if udevd in processes and get_architecture() != "amd64": + print( + "Warning: Ignoring running /lib/systemd/systemd-udevd processes." + " See https://launchpad.net/bugs/2025369" + ) + processes = [p for p in processes if p != udevd] + + if len(processes) == 2: + print(f"found only expected init and ps process: {processes}") + return + self._error( + f"Expected only init and ps process, but got {len(processes)}: {processes}" + ) + + +def drop_kernel_processes(processes: list[str]) -> list[str]: + """Return a list of processes with the kernel processes dropped.""" + return [p for p in processes if not p.startswith("[") and not p.endswith("]")] + + +def get_architecture() -> str: + """Return architecture of packages dpkg installs.""" + cmd = ["dpkg", "--print-architecture"] + process = subprocess.run(cmd, capture_output=True, check=True, text=True) + return process.stdout.strip() + + +def parse_net_conf(net_conf: str) -> dict[str, str]: + """Parse /run/net*.conf file and return a key to value mapping.""" + items = shlex.split(net_conf) + return dict(item.split("=", maxsplit=1) for item in items) + + +def main(arguments: list[str]) -> int: + """Run given checks on the log output. Return number of errors.""" + parser = argparse.ArgumentParser() + parser.add_argument("log_file", metavar="log-file") + parser.add_argument("checks", metavar="check", nargs="+") + args = parser.parse_args(arguments) + + log = pathlib.Path(args.log_file).read_text(encoding="ascii") + check = Check(log) + return check.run_checks(args.checks) + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff -Nru initramfs-tools-0.142/debian/tests/control initramfs-tools-0.142ubuntu15.1/debian/tests/control --- initramfs-tools-0.142/debian/tests/control 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/tests/control 2023-09-25 21:47:50.000000000 +0200 @@ -1,23 +1,82 @@ -Tests: amd64-klibc -Depends: @, qemu-system-x86, linux-image-amd64 | linux-image-generic:amd64, klibc-utils, genext2fs, zstd -Restrictions: skip-not-installable - -Tests: amd64-busybox -Depends: @, qemu-system-x86, linux-image-amd64 | linux-image-generic:amd64, klibc-utils, busybox | busybox-initramfs, genext2fs, zstd -Restrictions: skip-not-installable - -Tests: amd64-ata-only -Depends: @, qemu-system-x86, linux-image-amd64 | linux-image-generic:amd64, klibc-utils, genext2fs, zstd -Restrictions: skip-not-installable - -Tests: amd64-virtio-only -Depends: @, qemu-system-x86, linux-image-amd64 | linux-image-generic:amd64, klibc-utils, genext2fs, zstd -Restrictions: skip-not-installable - -Tests: amd64-separate-usr -Depends: @, qemu-system-x86, linux-image-amd64 | linux-image-generic:amd64, klibc-utils, genext2fs, zstd -Restrictions: skip-not-installable - -Tests: amd64-panic-shell -Depends: @, qemu-system-x86, linux-image-amd64 | linux-image-generic:amd64, klibc-utils, genext2fs, zstd -Restrictions: skip-not-installable +Test-Command: ./tests/run-tests +Depends: netplan.io +Restrictions: allow-stderr +Features: test-name=unit-tests + +# Note: These tests need root on Ubuntu, because the kernel is only readable by root. See https://launchpad.net/bugs/759725 +Tests: qemu-klibc +Architecture: amd64 armhf s390x +Depends: genext2fs, + ipxe-qemu, + klibc-utils, + linux-image-generic, + qemu-efi-arm [armhf], + qemu-kvm, + zstd, + @ +Restrictions: needs-root + +Tests: qemu-busybox +Architecture: amd64 armhf s390x +Depends: busybox | busybox-initramfs, + genext2fs, + ipxe-qemu, + klibc-utils, + linux-image-generic, + qemu-efi-arm [armhf], + qemu-kvm, + zstd, + @ +Restrictions: needs-root + +Tests: qemu-ata-only +Architecture: amd64 +Depends: genext2fs, klibc-utils, linux-image-generic, qemu-kvm, zstd, @ +Restrictions: needs-root + +Tests: qemu-virtio-only qemu-separate-usr qemu-panic-shell +Architecture: amd64 arm64 armhf ppc64el s390x +Depends: genext2fs, + ipxe-qemu, + klibc-utils, + linux-image-generic, + qemu-efi-aarch64 [arm64], + qemu-efi-arm [armhf], + qemu-kvm, + seabios [ppc64el], + zstd, + @ +Restrictions: needs-root + +Tests: qemu-net +Architecture: amd64 arm64 armhf ppc64el s390x +Depends: genext2fs, + iproute2, + ipxe-qemu, + klibc-utils, + linux-image-generic, + procps, + python3, + qemu-efi-aarch64 [arm64], + qemu-efi-arm [armhf], + qemu-kvm, + seabios [ppc64el], + zstd, + @ +Restrictions: needs-root + +Tests: qemu-net-dnsmasq +Architecture: amd64 armhf s390x +Depends: dnsmasq, + genext2fs, + iproute2, + ipxe-qemu, + klibc-utils, + linux-image-generic, + procps, + python3, + qemu-efi-arm [armhf], + qemu-kvm, + zstd, + @ +Restrictions: needs-root diff -Nru initramfs-tools-0.142/debian/tests/hooks/drop-hostname initramfs-tools-0.142ubuntu15.1/debian/tests/hooks/drop-hostname --- initramfs-tools-0.142/debian/tests/hooks/drop-hostname 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/debian/tests/hooks/drop-hostname 2023-09-25 21:47:50.000000000 +0200 @@ -0,0 +1,17 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in +prereqs) + prereqs + exit 0 + ;; +esac + +rm -f "${DESTDIR}/etc/hostname" diff -Nru initramfs-tools-0.142/debian/tests/hooks/persistent-net initramfs-tools-0.142ubuntu15.1/debian/tests/hooks/persistent-net --- initramfs-tools-0.142/debian/tests/hooks/persistent-net 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/debian/tests/hooks/persistent-net 2023-09-25 21:47:50.000000000 +0200 @@ -0,0 +1,33 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in +prereqs) + prereqs + exit 0 + ;; +esac + +persist_net() { + name="$1" + mac="$2" + + mkdir -p "${DESTDIR}/etc/systemd/network" + cat >"${DESTDIR}/etc/systemd/network/10-persistent-${name}.link" <>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" <>"${CONFDIR}/initramfs.conf" <>"${CONFDIR}/initramfs.conf" <>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" < "${root_dir}/etc/passwd" + echo "root:x:0:" > "${root_dir}/etc/group" + cat >"${root_dir}/sbin/init" <"${root_dir}/etc/dnsmasq.conf" <>>>>>>>>>>>>>>>>>>> dnsmasq qemu log >>>>>>>>>>>>>>>>>>>>" + cat "${DNSMASQ_QEMU_LOG}" + echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" + fi +} + +wait_for_dnsmasq_startup() { + local timeout="$QEMU_TIMEOUT" + while ! grep -q "Executing /sbin/init from root fs" "${DNSMASQ_QEMU_LOG}"; do + echo "Waiting up to $timeout seconds for dnsmasq to get started..." + timeout=$((timeout - 1)) + if test "$timeout" -le 0; then + echo >&2 "Error: dnsmasq was not started within $QEMU_TIMEOUT seconds." + return 1 + fi + sleep 1 + done +} + +trap clean_up INT TERM EXIT + +cat >>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" <>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" <>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" < "${ROOTDIR}/etc/fstab" "/dev/${USRDISK_LINUX_NAME} /usr ext2 defaults 0 2" +USRDIR="$(mktemp -d)" +mv "${ROOTDIR}/usr/"* "${USRDIR}" + +build_rootfs_ext2 +build_fs_ext2 "${USRDIR}" "${USRDISK}" + +run_qemu +check_no_network_configuration + +# Check that fsck ran on both devices +grep -q "^/dev/${ROOTDISK_LINUX_NAME}: clean," "${OUTPUT}" +grep -q "^/dev/${USRDISK_LINUX_NAME}: clean," "${OUTPUT}" diff -Nru initramfs-tools-0.142/debian/tests/qemu-virtio-only initramfs-tools-0.142ubuntu15.1/debian/tests/qemu-virtio-only --- initramfs-tools-0.142/debian/tests/qemu-virtio-only 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/debian/tests/qemu-virtio-only 2023-09-25 21:47:50.000000000 +0200 @@ -0,0 +1,23 @@ +#!/bin/sh -e + +SUPPORTED_FLAVOURS='amd64 arm64 armmp powerpc64 s390x generic' +ROOTDISK_QEMU_IF=virtio +ROOTDISK_LINUX_NAME=vda +. debian/tests/test-common + +cat >>"${CONFDIR}/initramfs.conf" <"${CONFDIR}/modules" <&2 + echo "Usage: ${0##*/} kernel initrd append [extra_args]" >&2 + exit 1 +fi + +kernel="$1" +initrd="$2" +append="$3" +shift 3 + +ARCHITECTURE=$(dpkg --print-architecture) + +case "$ARCHITECTURE" in +amd64) + qemu="qemu-system-x86_64" + ;; +arm64) + qemu="qemu-system-aarch64" + machine="virt,gic-version=max" + cpu="max,pauth-impdef=on" + efi_code=/usr/share/AAVMF/AAVMF_CODE.fd + efi_vars=/usr/share/AAVMF/AAVMF_VARS.fd + ;; +armhf) + qemu="qemu-system-arm" + machine="virt" + cpu=cortex-a7 + efi_code=/usr/share/AAVMF/AAVMF32_CODE.fd + efi_vars=/usr/share/AAVMF/AAVMF32_VARS.fd + console=ttyAMA0 + ;; +ppc64el) + qemu="qemu-system-ppc64" + machine="cap-ccf-assist=off,cap-cfpc=broken,cap-ibs=broken,cap-sbbc=broken" + console=hvc0 + ;; +*) + qemu="qemu-system-${ARCHITECTURE}" +esac + +if [ -c /dev/kvm ] && [ "$ARCHITECTURE" != "ppc64el" ]; then + kvm=-enable-kvm + cpu=host +fi + +if test -f "${efi_vars-}"; then + efi_vars_copy="$(mktemp -t "${efi_vars##*/}.XXXXXXXXXX")" + cp "$efi_vars" "$efi_vars_copy" +fi + +set -- ${machine:+-machine "${machine}"} ${kvm:+"$kvm"} ${cpu:+-cpu "${cpu}"} -m 1G \ + ${efi_code:+-drive "file=${efi_code},if=pflash,format=raw,read-only=on"} \ + ${efi_vars:+-drive "file=${efi_vars_copy},if=pflash,format=raw"} \ + -device virtio-rng-pci,rng=rng0 -object rng-random,filename=/dev/urandom,id=rng0 \ + -nodefaults -no-reboot -kernel "${kernel}" -initrd "${initrd}" "$@" \ + -append "console=${console:-ttyS0},115200 ro ${append}" +echo "${0##*/}: $qemu $*" +exec "$qemu" "$@" diff -Nru initramfs-tools-0.142/debian/tests/test-common initramfs-tools-0.142ubuntu15.1/debian/tests/test-common --- initramfs-tools-0.142/debian/tests/test-common 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/debian/tests/test-common 2023-11-14 20:02:42.000000000 +0100 @@ -13,32 +13,60 @@ exit 2 fi -if [ -n "${AUTOPKGTEST_TMP}" ]; then +case "$(dpkg --print-architecture)" in +arm64) + # Slowest execution seen in Ubuntu arm64 autopkgtest: 562 seconds + QEMU_TIMEOUT=1200 + ;; +armhf) + # Slowest execution seen in Ubuntu armhf autopkgtest: 145 seconds + QEMU_TIMEOUT=300 + ;; +ppc64el) + # Slowest execution seen in Ubuntu ppc64el autopkgtest: 230 seconds + QEMU_TIMEOUT=600 + ;; +s390x) + # Slowest execution seen in Ubuntu s390x autopkgtest: 58 seconds + QEMU_TIMEOUT=120 + ;; +*) + QEMU_TIMEOUT=60 +esac + +if [ -n "${AUTOPKGTEST_TMP-}" ]; then export TMPDIR="${AUTOPKGTEST_TMP}" fi +BASEDIR="$(mktemp -d -t initramfs-test.XXXXXXXXXX)" + # Skeleton configuration directory -CONFDIR="$(mktemp -d)" +CONFDIR="${BASEDIR}/config" +mkdir -p "${CONFDIR}" cp conf/initramfs.conf "${CONFDIR}/initramfs.conf" echo "RESUME=none" >>"${CONFDIR}/initramfs.conf" +mkdir "${CONFDIR}/hooks" touch "${CONFDIR}/modules" mkdir "${CONFDIR}/scripts" # initramfs image file -INITRAMFS="$(mktemp)" +INITRAMFS="${BASEDIR}/initrd.img" # root disk image file -ROOTDISK="$(mktemp)" +ROOTDISK="${BASEDIR}/rootdisk.raw" # root disk interface type (for qemu) and device name (for Linux) test -n "${ROOTDISK_QEMU_IF}" || ROOTDISK_QEMU_IF=virtio test -n "${ROOTDISK_LINUX_NAME}" || ROOTDISK_LINUX_NAME=vda # Create a root fs with a trivial userspace -ROOTDIR="$(mktemp -d)" +ROOTDIR="${BASEDIR}/rootdir" INIT_MESSAGE='root fs init system started successfully' -for subdir in bin dev lib proc run sbin sys usr usr/bin; do - mkdir "${ROOTDIR}/${subdir}" +for subdir in dev proc run sys usr usr/bin usr/lib/modules usr/lib64 usr/sbin; do + mkdir -p "${ROOTDIR}/${subdir}" +done +for subdir in bin lib lib64 sbin; do + ln -s "usr/${subdir}" "${ROOTDIR}/${subdir}" done cat >"${ROOTDIR}/sbin/init" <"${root_dir}/sbin/init" <&1 "$@" + _run_qemu "${1-}" 2>&1 +} + +run_qemu() { + _run_qemu "panic=-1 $*" \ + -device "virtio-net-pci,netdev=lan0,mac=52:54:00:65:43:21" \ + -netdev "user,id=lan0,net=10.0.3.0/24,ipv6-net=fec7::/48,hostname=pizza,dnssearch=test,domainname=example.com,bootfile=/path/to/bootfile2" \ + -device "virtio-net-pci,netdev=lan1,mac=52:54:00:12:34:56" \ + -netdev "user,id=lan1,hostname=goulash,dnssearch=example,dnssearch=example.net,domainname=test,bootfile=/path/to/bootfile" + grep -qF "${INIT_MESSAGE}" "${OUTPUT}" } -run_qemu_amd64() { - _run_qemu_amd64 "panic=-1" +run_qemu_with_socket_network() { + _run_qemu "panic=-1 $*" \ + -device "virtio-net-pci,netdev=lan0,mac=52:54:00:65:43:21" \ + -netdev "socket,id=lan0,connect=localhost:1234" grep -qF "${INIT_MESSAGE}" "${OUTPUT}" } + +check_no_output() { + local msg="$1" + if grep -qF "${msg}" "${OUTPUT}"; then + echo >&2 "E: Message '${msg}' found in log output '${OUTPUT}." + exit 1 + fi +} + +check_output() { + local msg="$1" + if ! grep -qF "${msg}" "${OUTPUT}"; then + echo >&2 "E: Message '${msg}' not found in log output '${OUTPUT}." + exit 1 + fi +} + +check_no_network_configuration() { + check_no_output "Waiting up to 180 secs for" +} diff -Nru initramfs-tools-0.142/dhcpcd-hooks/70-net-conf initramfs-tools-0.142ubuntu15.1/dhcpcd-hooks/70-net-conf --- initramfs-tools-0.142/dhcpcd-hooks/70-net-conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/dhcpcd-hooks/70-net-conf 2023-09-25 21:47:50.000000000 +0200 @@ -0,0 +1,64 @@ +#!/bin/sh +set -e + +# dhcpcd client hook to write /run/net*.conf files compatible to ipconfig from klibc-utils + +# Ensure that the search domain ends with dots +domain_search_with_trailing_dots() { + local domain_search="" + for domain in $1; do + domain_search="${domain_search}${domain_search:+ }${domain%.}." + done + echo "$domain_search" +} + +write_dhcp_netinfo() { + local domain_search netinfo_path="$1" + + domain_search=$(domain_search_with_trailing_dots "${new_domain_search-}") + cat >"$netinfo_path" << EOF +DEVICE='${interface-}' +PROTO='${protocol-}' +IPV4ADDR='${new_ip_address-}' +IPV4BROADCAST='${new_broadcast_address-}' +IPV4NETMASK='${new_subnet_mask-}' +IPV4GATEWAY='${new_routers-}' +IPV4DNS0='${new_domain_name_servers-}' +HOSTNAME='${new_host_name-}' +DNSDOMAIN='${new_domain_name-}' +ROOTSERVER='${new_routers-}' +filename='${new_filename-}' +DHCPLEASETIME='${new_dhcp_lease_time-}' +DOMAINSEARCH='${domain_search}' +EOF +} + +write_dhcp6_netinfo() { + local domain_search netinfo_path="$1" + + domain_search=$(domain_search_with_trailing_dots "${new_dhcp6_domain_search-}") + cat >"$netinfo_path" << EOF +DEVICE6='${interface-}' +IPV6PROTO='${protocol-}' +IPV6ADDR='${new_dhcp6_ia_na1_ia_addr1-}' +IPV6NETMASK='128' +IPV6DNS0='${new_dhcp6_name_servers-}' +IPV6DOMAINSEARCH='${domain_search}' +EOF +} + +if ${if_configured?}; then + if ${if_up?}; then + if [ "${protocol?}" = dhcp ]; then + write_dhcp_netinfo "/run/net-${interface?}.conf" + elif [ "${protocol}" = dhcp6 ]; then + write_dhcp6_netinfo "/run/net6-${interface?}.conf" + fi + elif ${if_down?}; then + if [ "${protocol?}" = dhcp ]; then + rm -f "/run/net-${interface?}.conf" + elif [ "${protocol}" = dhcp6 ]; then + rm -f "/run/net6-${interface?}.conf" + fi + fi +fi diff -Nru initramfs-tools-0.142/hook-functions initramfs-tools-0.142ubuntu15.1/hook-functions --- initramfs-tools-0.142/hook-functions 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/hook-functions 2023-11-14 20:02:42.000000000 +0100 @@ -57,75 +57,47 @@ # whether a warning should be printed in that case.) add_firmware() { - local firmware fwloc + local ext firmware found_fwloc fwloc path firmware="${1}" - if [ -e "${DESTDIR}/lib/firmware/updates/${version?}/${firmware}" ] \ - || [ -e "${DESTDIR}/lib/firmware/updates/${firmware}" ] \ - || [ -e "${DESTDIR}/lib/firmware/${version}/${firmware}" ] \ - || [ -e "${DESTDIR}/lib/firmware/${firmware}" ]; then - return 0 - fi - - for fwloc in "/lib/firmware/updates/${version}/${firmware}" \ - "/lib/firmware/updates/${firmware}" \ - "/lib/firmware/${version}/${firmware}" \ - "/lib/firmware/${firmware}"; do - if [ -e "$fwloc" ]; then - copy_file firmware "$fwloc" - return 0 - fi + for path in "updates/${version?}" "updates" "${version}" ""; do + for ext in ".xz" ".zst" ""; do + fwloc="/lib/firmware${path:+/}${path}/${firmware}${ext}" + if [ -e "${DESTDIR}${fwloc}" ]; then + # DESTDIR already contains a matching firmware file. + return 0 + fi + if [ -z "${found_fwloc}" ] && [ -e "${fwloc}" ]; then + found_fwloc="$fwloc" + fi + done done - # We can't figure out where to get that firmware from. - return 1 + if [ -z "${found_fwloc}" ]; then + # We can't figure out where to get that firmware from. + return 1 + fi + + copy_file firmware "${found_fwloc}" } # Add dependent modules + eventual firmware manual_add_modules() { - local prefix kmod options firmware + local dracut_verbose if [ $# -eq 0 ]; then return fi - # modprobe --ignore-install inhibits processing of 'install' - # configuration lines, so that instead we will see 'insmod - # module.ko' as we want. However it also means that 'softdep' - # configuration lines and embedded softdep information is not - # processed. So we run twice, with and without this option. - # shellcheck disable=SC2034 - { /sbin/modprobe --all --set-version="${version?}" --ignore-install --quiet --show-depends "$@"; - /sbin/modprobe --all --set-version="${version}" --quiet --show-depends "$@"; } | - while read -r prefix kmod options ; do - if [ "${prefix}" != "insmod" ]; then - continue - fi - - copy_file module "${kmod}" || continue + if [ "${verbose?}" = "y" ]; then + dracut_verbose=-v + fi - # Add required firmware - for firmware in $(modinfo -k "${version}" -F firmware "${kmod}"); do - # Only print warning for missing fw of loaded module - # or forced loaded module - if ! add_firmware "$firmware"; then - # Only warn about missing firmware if - # /proc/modules exists - if [ ! -e /proc/modules ] ; then - continue - fi - - kmod_modname="${kmod##*/}" - kmod_modname="${kmod_modname%%.*}" - if grep -q "^$kmod_modname\\>" /proc/modules "${CONFDIR}/modules"; then - echo "W: Possible missing firmware /lib/firmware/${firmware} for module ${kmod_modname}" >&2 - fi - continue - fi - done - done + /usr/lib/dracut/dracut-install -D "$DESTDIR" --kerneldir "/lib/modules/${version?}" \ + --firmwaredirs "/lib/firmware/updates/${version?}:/lib/firmware/updates:/lib/firmware/${version?}:/lib/firmware" \ + ${dracut_verbose-} -o -m "$@" } # manual_add_modules() takes care of adding firmware for things that were built @@ -246,7 +218,7 @@ # Handle common dlopen() dependency (Debian bug #950254) case "${x}" in */libpthread.so.*) - copy_libgcc "${x%/*}" || return + copy_libgcc "${x%/*}" || copy_libgcc "${x%/*}/.." || return ;; esac @@ -332,6 +304,21 @@ done } +nvme_dev_sys_walk_mod_add() +{ + local dev_sys_path component nvme_sys_path + dev_sys_path="$(readlink -f "$1")" + if ! echo "$dev_sys_path" | grep -q "nvme-subsys"; then + return + fi + for component in "$dev_sys_path"/nvme* ; do + if [ -L "$component" ] ; then + nvme_sys_path=$(readlink -f "$component") + sys_walk_mod_add "$nvme_sys_path" + fi + done +} + block_dev_sys_walk_mod_add() { local dev_sys_path disk_sys_path component @@ -350,6 +337,7 @@ find "$disk_sys_path/slaves" -mindepth 1 -maxdepth 1 | while read -r component; do block_dev_sys_walk_mod_add "$component" done + nvme_dev_sys_walk_mod_add "$disk_sys_path/device" sys_walk_mod_add "${dev_sys_path}" } @@ -434,6 +422,22 @@ return fi + if [ "${FSTYPE}" = "zfs" ]; then + manual_add_modules "${FSTYPE}" + + # ZFS uses the name of a filesystem instead of a device. Find + # the devices that make up the pool containing the specified + # filesystem, and add the appropriate driver for each device. + local poolname="${dev_node%%/*}" + # shellcheck disable=SC2034 + zpool list -vPL "$poolname" | while read -r dev ignored; do + # Ignore non-leaf vdevs by skipping anything that doesn't + # look like an absolute path + echo "$dev" | grep -q '^/' && block_dev_mod_add "$dev" + done + return + fi + if [ "$dir" = / ] && [ "${dev_node}" = "/dev/root" ] ; then if [ -b "${dev_node}" ]; then # Match it to the canonical device name by UUID @@ -474,17 +478,12 @@ fi # do not trust mount, check superblock - eval "$(/usr/lib/klibc/bin/fstype "${dev_node}")" - - # check that fstype fs recognition - if [ "${FSTYPE}" = "unknown" ]; then - FSTYPE=$(blkid -o value -s TYPE "${dev_node}") - if [ -z "${FSTYPE}" ]; then - echo "mkinitramfs: unknown fstype on device ${dev_node}" >&2 - echo "mkinitramfs: workaround is MODULES=most" >&2 - echo "Error please report bug on initramfs-tools" >&2 - exit 1 - fi + FSTYPE=$(blkid -o value -s TYPE "${dev_node}") + if [ -z "${FSTYPE}" ]; then + echo "mkinitramfs: unknown fstype on device ${dev_node}" >&2 + echo "mkinitramfs: workaround is MODULES=most" >&2 + echo "Error please report bug on initramfs-tools" >&2 + exit 1 fi # Add filesystem @@ -594,114 +593,138 @@ # The modules "most" classes added per default to the initramfs auto_add_modules() { - local arg + local arg blockfuncs exclude exclude_dir local modules= if [ "$#" -eq 0 ] ; then - set -- base net ide scsi block ata dasd firewire mmc usb_storage fb + set -- base hw_random net ide scsi block ata dasd firewire mmc usb_storage fb virtual nx fi + blockfuncs="ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue" + blockfuncs="${blockfuncs}|register_mtd_blktrans|scsi_esp_register|register_virtio_device" + blockfuncs="${blockfuncs}|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma" + blockfuncs="${blockfuncs}|blk_mq_alloc_disk|blk_mq_alloc_request|blk_mq_destroy_queue|blk_cleanup_disk" + case "$DPKG_ARCH" in + arm64|armel|armhf|riscv64) + blockfuncs="${blockfuncs}|dw_mc_probe|dw_mci_pltfm_register|nvme_init_ctrl" + ;; + esac + for arg in "$@" ; do case "$arg" in base) modules="$modules btrfs ext2 ext3 ext4 f2fs" - modules="$modules isofs jfs reiserfs udf xfs" + modules="$modules isofs jfs reiserfs squashfs udf xfs" modules="$modules nfs nfsv2 nfsv3 nfsv4" modules="$modules af_packet atkbd i8042 psmouse" modules="$modules virtio_pci virtio_mmio" + # nls not automatically pulled in as ubuntu has built-in vfat + modules="$modules vfat nls_cp437 nls_iso8859-1" # Include most USB host and dual-role drivers - copy_modules_dir kernel/drivers/usb/host \ - hwa-hc.ko sl811_cs.ko sl811-hcd.ko \ - u132-hcd.ko whci-hcd.ko - copy_modules_dir kernel/drivers/usb/c67x00 - copy_modules_dir kernel/drivers/usb/chipidea - copy_modules_dir kernel/drivers/usb/dwc2 - copy_modules_dir kernel/drivers/usb/dwc3 - copy_modules_dir kernel/drivers/usb/isp1760 - copy_modules_dir kernel/drivers/usb/musb - copy_modules_dir kernel/drivers/usb/renesas_usbhs - copy_modules_dir kernel/drivers/usb/typec/tcpm + modules="$modules ehci-hcd ehci-pci ehci-platform ohci-hcd ohci-pci" + modules="$modules uhci-hcd usbhid xhci-hcd xhci-pci xhci-plat-hcd" + modules="$modules =drivers/usb/typec" + modules="$modules =drivers/usb/c67x00" + modules="$modules =drivers/usb/renesas_usbhs" # and any extcon drivers for USB modules="$modules extcon-usb-gpio extcon-usbc-cros-ec" - # Add the axp20x_usb_power power supply driver, - # required to initialize the USB host controllers - # on a number of armhf systems - modules="$modules axp20x_usb_power" # Include all keyboard drivers and all HID drivers # unless we're sure they don't support keyboards. # hid-*ff covers various game controllers with # force feedback. - copy_modules_dir kernel/drivers/input/keyboard - copy_modules_dir kernel/drivers/hid \ - 'hid-*ff.ko' hid-a4tech.ko hid-cypress.ko \ - hid-dr.ko hid-elecom.ko hid-gyration.ko \ - hid-icade.ko hid-kensington.ko hid-kye.ko \ - hid-lcpower.ko hid-magicmouse.ko \ - hid-multitouch.ko hid-ntrig.ko \ - hid-petalynx.ko hid-picolcd.ko hid-pl.ko \ - hid-ps3remote.ko hid-quanta.ko \ - 'hid-roccat-ko*.ko' hid-roccat-pyra.ko \ - hid-saitek.ko hid-sensor-hub.ko hid-sony.ko \ - hid-speedlink.ko hid-tivo.ko hid-twinhan.ko \ - hid-uclogic.ko hid-wacom.ko hid-waltop.ko \ - hid-wiimote.ko hid-zydacron.ko + modules="$modules =drivers/input/keyboard" + exclude="a4tech|cypress|dr|elecom|gyration|icade|kensington" + exclude="${exclude}|kye|lcpower|magicmouse|multitouch|ntrig" + exclude="${exclude}|petalynx|picolcd|pl|ps3remote|quanta" + exclude="${exclude}|roccat-ko.*|roccat-pyra|saitek|sensor-hub|sony" + exclude="${exclude}|speedlink|tivo|twinhan|uclogic|wacom|waltop" + exclude="${exclude}|wiimote|zydacron|.*ff" + manual_add_modules -P "/hid-(${exclude})\.ko" =drivers/hid # needed to access keyboard on some ChromeOS devices modules="$modules cros_ec_spi" + # needed to access keyboard on MacBook Pro 2017 + modules="$modules intel_lpss_pci spi_pxa2xx_platform" + # needed for keyboard on Surface Laptop 4 + modules="$modules surface_aggregator_registry" - # Any of these might be needed by other drivers - copy_modules_dir kernel/drivers/bus - copy_modules_dir kernel/drivers/clk - copy_modules_dir kernel/drivers/gpio - copy_modules_dir kernel/drivers/i2c/busses - copy_modules_dir kernel/drivers/i2c/muxes - copy_modules_dir kernel/drivers/mfd - copy_modules_dir kernel/drivers/pci/controller - copy_modules_dir kernel/drivers/phy - copy_modules_dir kernel/drivers/pinctrl - copy_modules_dir kernel/drivers/regulator - copy_modules_dir kernel/drivers/reset - copy_modules_dir kernel/drivers/spi - copy_modules_dir kernel/drivers/usb/phy + # For Linux console access + modules="$modules =drivers/tty/serial" - # Needed for periodic fsck - copy_modules_dir kernel/drivers/rtc + # Any of these might be needed by other drivers + modules="$modules =drivers/bus" + modules="$modules =drivers/i2c/muxes" + modules="$modules =drivers/pci/controller" + modules="$modules =drivers/pinctrl" + + case "$DPKG_ARCH" in + arm64|armel|armhf|riscv64) + manual_add_modules "=drivers/usb/host" \ + -P "/(hwa-hc|sl811_cs|sl811-hcd|u132-hcd|whci-hcd)\.ko" + modules="$modules =drivers/clk" + modules="$modules =drivers/i2c/busses" + modules="$modules =drivers/gpio" + modules="$modules =drivers/mfd" + modules="$modules =drivers/phy" + modules="$modules =drivers/regulator" + modules="$modules =drivers/reset" + modules="$modules =drivers/spi" + modules="$modules =drivers/usb/chipidea" + modules="$modules =drivers/usb/dwc2" + modules="$modules =drivers/usb/dwc3" + modules="$modules =drivers/usb/isp1760" + modules="$modules =drivers/usb/musb" + modules="$modules =drivers/usb/phy" + + # Needed for periodic fsck + modules="$modules =drivers/rtc" + + # Add the axp20x_usb_power power supply driver, + # required to initialize the USB host controllers + # on a number of armhf systems + modules="$modules axp20x_usb_power" + ;; + esac + ;; + hw_random) + modules="$modules =drivers/char/hw_random" ;; net) - copy_modules_dir kernel/drivers/net \ - appletalk arcnet bonding can cdc-phonet.ko \ - cdc_mbim.ko cdc_subset.ko cx82310_eth.ko \ - dummy.ko gl620a.ko hamradio hippi hso.ko \ - huawei_cdc_ncm.ko ifb.ko ipheth.ko irda \ - kalmia.ko lg-vl600.ko macvlan.ko macvtap.ko \ - net1080.ko pcmcia plusb.ko qmi_wwan.ko \ - sb1000.ko sierra_net.ko team tokenring tun.ko \ - veth.ko wan wimax wireless xen-netback.ko \ - zaurus.ko + exclude="cdc_mbim|ipheth|qmi_wwan|sierra_net|veth|xen-netback" + exclude_dir="isdn|net/ethernet|net/phy|net/team|uwb|wan|wireless" + manual_add_modules -P "/((${exclude})\.ko|(${exclude_dir})/)" \ + -s "eth_type_trans|register_virtio_device|usbnet_open" \ + "=drivers/net" + modules="$modules =drivers/net/ethernet =drivers/net/mdio" + modules="$modules =drivers/net/phy 8021q ipvlan" # Required to initialize Ethernet (FEC) on ARM64 iMX8M # devices. modules="$modules nvmem-imx-ocotp" ;; ide) - copy_modules_dir kernel/drivers/ide + modules="$modules =drivers/ide" ;; mmc) - copy_modules_dir kernel/drivers/mmc + modules="$modules =drivers/mmc" ;; scsi) - copy_modules_dir kernel/drivers/scsi - copy_modules_dir kernel/drivers/ufs + manual_add_modules -s "${blockfuncs}|iscsi_register_transport" \ + "=drivers/scsi" "=drivers/ufs" + modules="$modules be2iscsi bnx2i cxgb3i cxgb4i qedi qla4xxx" + modules="$modules scsi_dh_alua scsi_dh_emc scsi_dh_rdac" modules="$modules mptfc mptsas mptscsih mptspi zfcp" + # scsi_transport_srp should have been pulled in by =drivers/scsi + modules="$modules scsi_transport_srp" ;; ata) - copy_modules_dir kernel/drivers/ata + manual_add_modules -s "${blockfuncs}" "=drivers/ata" ;; block) - copy_modules_dir kernel/drivers/block - copy_modules_dir kernel/drivers/nvme - modules="$modules vmd" + manual_add_modules -s "${blockfuncs}" "=drivers/block" \ + "=drivers/nvme" "=drivers/dax" vmd + manual_add_modules -s nvdimm_bus_register "=drivers/nvdimm" "=drivers/acpi" ;; ubi) modules="$modules deflate zlib lzo ubi ubifs" @@ -713,7 +736,7 @@ modules="$modules dasd_diag_mod dasd_eckd_mod dasd_fba_mod" ;; usb_storage) - copy_modules_dir kernel/drivers/usb/storage + modules="$modules =drivers/usb/storage" ;; fb) # For machines that don't have a generic framebuffer device. @@ -723,6 +746,15 @@ modules="$modules pwm_imx27 nwl-dsi ti-sn65dsi86 imx-dcss" modules="$modules mux-mmio mxsfb imx8mq-interconnect" ;; + virtual) + # Hyper-V + modules="$modules hv_vmbus hv_utils hv_netvsc hv_mouse hv_storvsc hyperv-keyboard" + ;; + nx) + # PowerPC NX Crypto Coprocessor + modules="$modules nx-compress nx-compress-crypto nx-compress-platform" + modules="$modules nx-compress-pseries nx-compress-powernv 842-decompress" + ;; esac done @@ -876,6 +908,12 @@ set -e for cs_x in ${runlist}; do [ -f "${initdir}/${cs_x}" ] || continue + if [ "$call_scripts_optional" = "y" ]; then + option=$(sed '/^OPTION=/!d;$d;s/^OPTION=//;s/[[:space:]]*$//' "${initdir}/${cs_x}") + # shellcheck disable=SC1083,2086 + [ -z "${option}" ] || eval test -n \"\${$option}\" -a \"\${$option}\" != \"n\" || continue + fi + # mkinitramfs verbose output if [ "${verbose}" = "y" ]; then echo "Calling hook ${cs_x}" @@ -904,3 +942,35 @@ runlist=$(get_prereq_pairs | tsort) call_scripts "$scriptdir" } + +run_scripts_optional() +{ + call_scripts_optional=y + run_scripts "$@" +} + +add_dns() { + local destdir="$1" nsswitch="" lib="" libdir="" f="" + # find the multiarch lib dir (for example /lib/x86_64-linux-gnu) + libdir=$(ldd /bin/sh | sed -En 's;^.*\s(\S+)/libc\.so\..*$;\1;p') + if [ -z "$libdir" ]; then + echo "WARNING: no libdir found for adding dns." 1>&2 + return + fi + nsswitch="$destdir/etc/nsswitch.conf" + if ! grep -qs "^hosts:" "$nsswitch"; then + echo "hosts: files dns" >> "$nsswitch" + fi + local found="" + for lib in libnss_files libnss_dns libresolv; do + found="" + for f in "$libdir/$lib.so".?; do + [ -e "$f" ] || continue + [ "$verbose" = "y" ] && echo "dns: $lib: $f" + copy_file library "$f" + found="$f" + done + [ -n "$found" ] || echo "WARNING: no $libdir/$lib.? file" 1>&2 + done + return 0 +} diff -Nru initramfs-tools-0.142/hooks/dhcpcd initramfs-tools-0.142ubuntu15.1/hooks/dhcpcd --- initramfs-tools-0.142/hooks/dhcpcd 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/hooks/dhcpcd 2023-09-25 21:47:50.000000000 +0200 @@ -0,0 +1,53 @@ +#!/bin/sh +set -e + +# initramfs hook to include dhcpcd as DHCP client + +PREREQ="" + +# Output pre-requisites +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +if ! [ -x /usr/sbin/dhcpcd ]; then + exit 0 +fi + +copy_exec /usr/sbin/dhcpcd +copy_exec /usr/lib/dhcpcd/dhcpcd-run-hooks +copy_file config /usr/lib/dhcpcd/dhcpcd-hooks/30-hostname +copy_file config /usr/share/initramfs-tools/dhcpcd-hooks/70-net-conf /usr/lib/dhcpcd/dhcpcd-hooks/70-net-conf +mkdir -p "${DESTDIR}/var/lib/dhcpcd" + +mkdir -p "${DESTDIR}/etc" +cat >"${DESTDIR}/etc/dhcpcd.conf" <&2 fi - unset -f fstype else echo "${MNT_TYPE}" fi diff -Nru initramfs-tools-0.142/hooks/keymap initramfs-tools-0.142ubuntu15.1/hooks/keymap --- initramfs-tools-0.142/hooks/keymap 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/hooks/keymap 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# Hook to load keymaps into the initramfs if requested by KEYMAP="y" -if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then - exit 0 -fi - -if [ ! -x /bin/setupcon ]; then - echo "setupcon is missing. Please install the 'console-setup' package." - exit 0 -fi - -. /usr/share/initramfs-tools/hook-functions - -# Tell setupcon to copy/create the files it needs. -setupcon --setup-dir "$DESTDIR" - -# Copy additional files that setupcon needs. We assume they are -# executables. -while read -r file; do - copy_exec "$file" -done < "$DESTDIR/morefiles" -rm -f "$DESTDIR/morefiles" - -exit 0 diff -Nru initramfs-tools-0.142/hooks/thermal initramfs-tools-0.142ubuntu15.1/hooks/thermal --- initramfs-tools-0.142/hooks/thermal 2020-11-05 23:24:02.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/hooks/thermal 2023-09-25 21:47:50.000000000 +0200 @@ -55,17 +55,11 @@ exit 0 ;; esac - manual_add_modules windfarm_core - manual_add_modules windfarm_cpufreq_clamp - manual_add_modules windfarm_lm75_sensor - manual_add_modules windfarm_max6690_sensor - manual_add_modules windfarm_pid - manual_add_modules windfarm_smu_controls - manual_add_modules windfarm_smu_sat - manual_add_modules windfarm_smu_sensors + manual_add_modules windfarm_core windfarm_cpufreq_clamp \ + windfarm_lm75_sensor windfarm_max6690_sensor windfarm_pid \ + windfarm_smu_controls windfarm_smu_sat windfarm_smu_sensors ;; i386|amd64|ia64) - manual_add_modules fan - manual_add_modules thermal + manual_add_modules fan thermal ;; esac diff -Nru initramfs-tools-0.142/init initramfs-tools-0.142ubuntu15.1/init --- initramfs-tools-0.142/init 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/init 2023-09-25 21:47:50.000000000 +0200 @@ -2,7 +2,11 @@ # Default PATH differs between shells, and is not automatically exported # by klibc dash. Make it consistent. -export PATH=/sbin:/usr/sbin:/bin:/usr/bin +# Furthermore, this PATH ends up being used by the init, set it to the +# Standard PATH, without /snap/bin as documented in +# https://wiki.ubuntu.com/PATH +# This also matches /etc/environment, but without games path +export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin [ -d /dev ] || mkdir -m 0755 /dev [ -d /root ] || mkdir -m 0700 /root @@ -57,10 +61,13 @@ export ROOTFLAGS= export ROOTFSTYPE= export IP= +export IP6= +export VLAN= export DEVICE= export BOOT= export BOOTIF= export UBIMTD= +export NETWORK_SKIP_ENSLAVED= export break= export init=/sbin/init export readonly=y @@ -77,6 +84,11 @@ export fsckfix= +# mdadm needs hostname to be set. This has to be done before the udev rules are called! +if [ -f "/etc/hostname" ]; then + /bin/hostname -F /etc/hostname >/dev/null 2>&1 +fi + # Bring in the main config . /conf/initramfs.conf for conf in conf/conf.d/*; do @@ -111,6 +123,26 @@ ;; esac ;; + roottimeout=*) + ROOTDELAY="${x#roottimeout=}" + case ${ROOTDELAY} in + *[![:digit:].]*) + ROOTDELAY= + ;; + esac + ;; + loop=*) + # shellcheck disable=SC2034 + LOOP="${x#loop=}" + ;; + loopflags=*) + # shellcheck disable=SC2034 + LOOPFLAGS="-o ${x#loopflags=}" + ;; + loopfstype=*) + # shellcheck disable=SC2034 + LOOPFSTYPE="${x#loopfstype=}" + ;; nfsroot=*) # shellcheck disable=SC2034 NFSROOT="${x#nfsroot=}" @@ -121,6 +153,12 @@ ip=*) IP="${x#ip=}" ;; + ip6=*) + IP6="${x#ip6=}" + ;; + vlan=*) + VLAN="${x#vlan=}" + ;; boot=*) BOOT=${x#boot=} ;; @@ -129,6 +167,10 @@ ;; resume=*) RESUME="${x#resume=}" + case $RESUME in + UUID=*) + RESUME="/dev/disk/by-uuid/${RESUME#UUID=}" + esac ;; resume_offset=*) resume_offset="${x#resume_offset=}" @@ -179,6 +221,9 @@ BOOTIF=*) BOOTIF=${x#BOOTIF=} ;; + hwaddr=*) + BOOTIF=${x#hwaddr=} + ;; fastboot|fsck.mode=skip) fastboot=y ;; @@ -228,10 +273,6 @@ starttime=$((starttime + 1)) # round up export starttime -if [ "$ROOTDELAY" ]; then - sleep "$ROOTDELAY" -fi - maybe_break premount [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-premount" run_scripts /scripts/init-premount @@ -262,6 +303,18 @@ nfs_bottom local_bottom +case "$IP" in +""|none|off) + case "$IP6" in + ""|none|off) ;; # Do nothing + *) + configure_networking + esac + ;; +*) + configure_networking +esac + maybe_break bottom [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom" # We expect udev's init-bottom script to move /dev to ${rootmnt}/dev @@ -304,6 +357,8 @@ unset ROOTDELAY unset ROOT unset IP +unset IP6 +unset VLAN unset BOOT unset BOOTIF unset DEVICE diff -Nru initramfs-tools-0.142/initramfs.conf.5 initramfs-tools-0.142ubuntu15.1/initramfs.conf.5 --- initramfs-tools-0.142/initramfs.conf.5 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/initramfs.conf.5 2023-09-25 21:47:50.000000000 +0200 @@ -50,13 +50,6 @@ Beware that many boot scripts need busybox utilities. .TP -\fB KEYMAP -If set to 'y', the console keymap will be loaded during the initramfs stage. -The keymap will anyway be loaded by the initscripts later, and the packages -that might need input will normally set this variable automatically, so there -should normally be no need to set this. - -.TP \fB COMPRESS Specifies the compression method used for the initramfs image. .B mkinitramfs @@ -113,6 +106,11 @@ \fIBOOTIF\fP bootargs may override this. .TP +\fB VLAN +Specifies the VLAN tag id to setup, e.g. VLAN=eth0.1:eth0. The \fIvlan\fP +bootarg may override this. + +.TP \fB ROOT Allows optional root bootarg hardcoding, when no root bootarg can be passed. A root bootarg overrides that special setting. diff -Nru initramfs-tools-0.142/initramfs-tools.7 initramfs-tools-0.142ubuntu15.1/initramfs-tools.7 --- initramfs-tools-0.142/initramfs-tools.7 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/initramfs-tools.7 2023-08-24 11:57:29.000000000 +0200 @@ -45,15 +45,32 @@ set the root file system type. .TP +\fB\fI roottimeout +set timeout in seconds. Determines how long mountroot waits for root to appear. +The default is 30 seconds. + +.TP \fB\fI rootdelay -set delay in seconds. Determines how long mountroot waits for root to appear. -The default is 180 seconds. +alias for roottimeout. .TP \fB\fI rootflags set the file system mount option string. .TP +\fB\fI loop= "" +path within the original root file system to loop-mount and use as the real +root file system. + +.TP +\fB\fI loopfstype +set the loop file system type, if applicable. + +.TP +\fB\fI loopflags +set the loop file system mount option string, if applicable. + +.TP \fB\fI nfsroot can be either "auto" to try to get the relevant information from DHCP or a string of the form NFSSERVER:NFSPATH or NFSSERVER:NFSPATH:NFSOPTS. @@ -67,6 +84,12 @@ in any recent Linux source for details. Optional parameter for NFS root. .TP +\fB\fI vlan +tells to create a VLAN tagged device. Allows one to configure one or +multiple VLAN tagged devices using the "vlan=$name.$id:$parent" +syntax. E.g. "vlan=eth0.1:eth0" Optional parameter for NFS root. + +.TP \fB\fI BOOTIF is a mac address in pxelinux format with leading "01-" and "-" as separations. pxelinux passes mac address of network card used to PXE boot on with this @@ -315,7 +338,7 @@ \fB\fI verbose corresponds to the verbosity of the update-initramfs run. .TP -\fB\fI BUSYBOX, KEYMAP, MODULES +\fB\fI BUSYBOX, MODULES are as described in \fIinitramfs.conf\fR(5). .TP \fB\fI BUSYBOXDIR @@ -422,8 +445,17 @@ .PP .B Example: panic "Frobnication failed" +.fi +.RE .RE +.TP +\fB\fI +add_mountroot_fail_hook NN-name +\fBDeprecated\fR: This function is now a stub which is effectively a no-op. It +will be removed in a future version; please remove mountroot failure hooks from +existing packages accordingly. + .SS Subdirectories Both /usr/share/initramfs-tools/scripts and /etc/initramfs-tools/scripts contains the following subdirectories. diff -Nru initramfs-tools-0.142/mkinitramfs initramfs-tools-0.142ubuntu15.1/mkinitramfs --- initramfs-tools-0.142/mkinitramfs 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/mkinitramfs 2023-09-26 00:55:09.000000000 +0200 @@ -93,6 +93,12 @@ . /usr/share/initramfs-tools/scripts/functions . /usr/share/initramfs-tools/hook-functions +# Auto-export any variables set in the conf snippets such that +# initramfs hooks can configure each other +# i.e. initramfs-tools-ubuntu-core affecting +# intel-microcode/amd-microcode hook defaults +set -a + . "${CONFDIR}/initramfs.conf" EXTRA_CONF='' @@ -128,6 +134,9 @@ fi done +# Finish loading conf snippets +set +a + # Check busybox dependency if [ "${BUSYBOX}" = "y" ] && [ -z "${BUSYBOXDIR}" ]; then echo >&2 "E: @BUSYBOX_PACKAGES@, version @BUSYBOX_MIN_VERSION@ or later, is required but not installed" @@ -190,22 +199,27 @@ lz4) kconfig_sym=CONFIG_RD_LZ4 ;; zstd) kconfig_sym=CONFIG_RD_ZSTD ;; esac -while ! grep -q "^$kconfig_sym=y" "/boot/config-${version}"; do - if [ "${compress}" = gzip ]; then - echo "E: gzip compression ($kconfig_sym) not supported by kernel" >&2 - exit 1 - fi - echo "W: ${compress} compression ($kconfig_sym) not supported by kernel, using gzip" >&2 - compress=gzip - kconfig_sym=CONFIG_RD_GZIP -done +if [ -e "/boot/config-${version}" ]; then + while ! grep -q "^$kconfig_sym=y" "/boot/config-${version}"; do + if [ "${compress}" = gzip ]; then + echo "E: gzip compression ($kconfig_sym) not supported by kernel" >&2 + exit 1 + fi + echo "W: ${compress} compression ($kconfig_sym) not supported by kernel, using gzip" >&2 + compress=gzip + kconfig_sym=CONFIG_RD_GZIP + done +else + echo "W: Kernel configuration /boot/config-${version} is missing," \ + "cannot check for ${compress} compression support ($kconfig_sym)" >&2 +fi if [ -z "${compresslevel:-}" ]; then compresslevel=${COMPRESSLEVEL:-} fi case "${compress}" in -lz4) compresslevel="-${compresslevel:-9}" ;; -zstd) compresslevel="-${compresslevel:-9}" ;; +lz4) compresslevel="-${compresslevel:-2}" ;; +zstd) compresslevel="-${compresslevel:-1}" ;; #gzip|xz|bzip2|lzma|lzop included *) # We're not using a compression level by default @@ -258,18 +272,20 @@ # Prepare to clean up temporary files on exit DESTDIR= +__TMPMAINFILES= +__TMPUNCOMPRESSEDFILES= __TMPCPIOGZ= -__TMPMAINCPIO= __TMPEARLYCPIO= # shellcheck disable=SC2317 clean_on_exit() { if [ "${keep}" = "y" ]; then echo "Working files in ${DESTDIR:-}," \ - "early initramfs in ${__TMPEARLYCPIO:-}," \ - "main initramfs in ${__TMPMAINCPIO:-} and" \ + "list of files for main initramfs in ${__TMPMAINFILES:-}," \ + "list of files for uncompressed initramfs in ${__TMPUNCOMPRESSEDFILES:-}," \ + "early initramfs in ${__TMPEARLYCPIO:-} and" \ "overlay in ${__TMPCPIOGZ:-}" else - for path in "${DESTDIR}" "${__TMPCPIOGZ}" "${__TMPMAINCPIO}" "${__TMPEARLYCPIO}"; do + for path in "${DESTDIR}" "${__TMPMAINFILES}" "${__TMPUNCOMPRESSEDFILES}" "${__TMPCPIOGZ}" "${__TMPEARLYCPIO}"; do test -z "${path}" || rm -rf "${path}" done fi @@ -281,8 +297,9 @@ [ -n "${TMPDIR}" ] && [ ! -w "${TMPDIR}" ] && unset TMPDIR DESTDIR="$(mktemp -d "${TMPDIR:-/var/tmp}/mkinitramfs_XXXXXX")" || exit 1 chmod 755 "${DESTDIR}" +__TMPMAINFILES="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-MAIN_files_XXXXXX")" || exit 1 +__TMPUNCOMPRESSEDFILES="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-UNCOMPRESSED_files_XXXXXX")" || exit 1 __TMPCPIOGZ="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-OL_XXXXXX")" || exit 1 -__TMPMAINCPIO="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-MAIN_XXXXXX")" || exit 1 __TMPEARLYCPIO="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-FW_XXXXXX")" || exit 1 DPKG_ARCH=$(dpkg --print-architecture) @@ -295,7 +312,6 @@ export DESTDIR export DPKG_ARCH export verbose -export KEYMAP export MODULES export BUSYBOX export RESUME @@ -367,6 +383,10 @@ # add existant boot scripts for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do + option=$(sed '/^OPTION=/!d;$d;s/^OPTION=//;s/[[:space:]]*$//' "/usr/share/initramfs-tools/scripts/${b}") + # shellcheck disable=SC1083,SC2086 + [ -z "$option" ] || eval test -n \"\${$option}\" -a \"\${$option}\" != \"n\" || continue + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" cp -p "/usr/share/initramfs-tools/scripts/${b}" \ @@ -375,6 +395,9 @@ # Prune dot-files/directories and limit depth to exclude VCS files for b in $(cd "${CONFDIR}/scripts" && find . -maxdepth 2 -name '.?*' -prune -o \ -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f -print); do + option=$(sed '/^OPTION=/!d;$d;s/^OPTION=//;s/[[:space:]]*$//' "${CONFDIR}/scripts/${b}") + # shellcheck disable=SC1083,SC2086 + [ -z "$option" ] || eval test -n \"\${$option}\" -a \"\${$option}\" != \"n\" || continue [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/" @@ -400,6 +423,12 @@ touch "${DESTDIR}/etc/fstab" ln -s /proc/mounts "${DESTDIR}/etc/mtab" +# Install libc6, pthreads, and dlopened gcc_s.so.1 (Debian bug #950254) LP: #1880853 LP: #1958594 +copy_exec /usr/lib/initramfs-tools/bin/gcc_s1-stub /usr/lib/initramfs-tools/bin/gcc_s1-stub + +# install wait-for-root binary. +copy_exec /usr/lib/initramfs-tools/bin/wait-for-root /sbin + # module-init-tools copy_exec /sbin/modprobe /sbin copy_exec /sbin/rmmod /sbin @@ -410,32 +439,14 @@ fi done -run_scripts /usr/share/initramfs-tools/hooks -run_scripts "${CONFDIR}"/hooks +run_scripts_optional /usr/share/initramfs-tools/hooks +run_scripts_optional "${CONFDIR}"/hooks # cache boot run order for b in $(cd "${DESTDIR}/scripts" && find . -mindepth 1 -type d); do cache_run_scripts "${DESTDIR}" "/scripts/${b#./}" done -# decompress modules for boot speed, if possible -find "${DESTDIR}/${MODULESDIR}" -name '*.ko.*' | while read -r ko; do - case "$ko" in - *.xz) - if ! command -v xz >/dev/null 2>&1; then - break - fi - xz -d "${ko}" - ;; - *.zst) - if ! command -v zstd >/dev/null 2>&1; then - break - fi - zstd -q -d --rm "${ko}" - ;; - esac -done - # generate module deps depmod -a -b "${DESTDIR}" "${version}" rm -f "${DESTDIR}/lib/modules/${version}"/modules.*map @@ -458,9 +469,18 @@ copy_file DSDT "${CONFDIR}/DSDT.aml" fi +case "${MODULES}" in + netboot|most) add_dns "${DESTDIR}/";; +esac + +# Remove any looping or broken symbolic links, since they break cpio. +[ "${verbose}" = y ] && xargs_verbose="-t" +# shellcheck disable=SC2086 +(cd "${DESTDIR}" && find . -type l -printf '%p %Y\n' | sed -n 's/ [LN]$//p' \ + | xargs ${xargs_verbose:-} -rL1 rm -f) + [ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs" -( # preserve permissions if root builds the image, see #633582 [ "$(id -ru)" != 0 ] && cpio_owner_root="-R 0:0" @@ -474,46 +494,70 @@ cpio_reproducible="--reproducible" fi -# work around lack of "set -o pipefail" for the following pipe: -# cd "${DESTDIR}" && find . | LC_ALL=C sort | cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc >>"${outfile}" || exit 1 -ec1=1 -ec2=1 -exec 3>&1 -eval "$( - # http://cfaj.freeshell.org/shell/cus-faq-2.html - exec 4>&1 >&3 3>&- - cd "${DESTDIR}" +# Read list of files and echo them plus all leading directories. +# The same directories might be printed multiple times (even with sorted input)! +add_directories() { + local last_dir path dir + while read -r path; do + dir="${path%/*}" + parent="${dir}" + while [ "$parent" != "$last_dir" ] && [ "$parent" != "." ]; do + echo "$parent" + parent="${parent%/*}" + done + last_dir="$dir" + echo "$path" + done + if [ -n "$last_dir" ]; then + echo "." + fi +} + +cd "${DESTDIR}" || exit 1 + +# work around lack of "set -o pipefail" for pipes. +# Write exit code to FD 3 in case of a failure to pass it through the pipes. +{ { - find . 4>&-; echo "ec1=$?;" >&4 - } | { - LC_ALL=C sort - } | { - # shellcheck disable=SC2086 - cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc 4>&- >"${__TMPMAINCPIO}" - echo "ec2=$?;" >&4 - } -)" -if [ "$ec1" -ne 0 ]; then - echo "E: mkinitramfs failure find $ec1 cpio $ec2" >&2 - exit "$ec1" -fi -if [ "$ec2" -ne 0 ]; then - echo "E: mkinitramfs failure cpio $ec2" >&2 - exit "$ec2" -fi -) || exit 1 + find . \( ! -type d ! -name '*.zst' ! -name '*.xz' \) -o \( -type d -empty \) || + { echo "E: mkinitramfs failure main find $?" >&2; echo 1 >&3; exit; } + } | add_directories | { + LC_ALL=C sort || { echo "E: mkinitramfs failure sort $?" >&2; echo 1 >&3; exit; } + } | uniq > "${__TMPMAINFILES}" || { echo "E: mkinitramfs failure uniq $?" >&2; echo 1 >&3; exit; } +} 3>&1 | { read -r exit_code; exit "${exit_code:-0}"; } || exit $? { -if [ -s "${__TMPEARLYCPIO}" ]; then - cat "${__TMPEARLYCPIO}" || exit 1 -fi + { + find . -name '*.zst' -o -name '*.xz' || + { echo "E: mkinitramfs failure uncompressed find $?" >&2; echo 1 >&3; exit; } + } | add_directories | { + LC_ALL=C sort || { echo "E: mkinitramfs failure sort $?" >&2; echo 1 >&3; exit; } + } | uniq > "${__TMPUNCOMPRESSEDFILES}" || { echo "E: mkinitramfs failure uniq $?" >&2; echo 1 >&3; exit; } +} 3>&1 | { read -r exit_code; exit "${exit_code:-0}"; } || exit $? -$compress -c "${__TMPMAINCPIO}" || - { echo "E: mkinitramfs failure $compress $?" >&2; exit 1; } +{ + { + if [ -s "${__TMPEARLYCPIO}" ]; then + cat "${__TMPEARLYCPIO}" || { echo 1 >&3; exit; } + fi -if [ -s "${__TMPCPIOGZ}" ]; then - cat "${__TMPCPIOGZ}" || exit 1 -fi -} >"${outfile}" || exit 1 + if [ -s "${__TMPUNCOMPRESSEDFILES}" ]; then + # shellcheck disable=SC2086 + cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc -D "${DESTDIR}" <"${__TMPUNCOMPRESSEDFILES}" || + { echo "E: mkinitramfs failure uncompressed cpio $?" >&2; echo 1 >&3; exit; } + fi + + { + # shellcheck disable=SC2086 + cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc -D "${DESTDIR}" <"${__TMPMAINFILES}" || + { echo "E: mkinitramfs failure cpio $?" >&2; echo 1 >&3; exit; } + } | $compress -c || + { echo "E: mkinitramfs failure $compress $?" >&2; echo 1 >&3; exit; } + + if [ -s "${__TMPCPIOGZ}" ]; then + cat "${__TMPCPIOGZ}" || { echo 1 >&3; exit; } + fi + } >"${outfile}" || echo $? >&3 +} 3>&1 | { read -r exit_code; exit "${exit_code:-0}"; } || exit $? exit 0 diff -Nru initramfs-tools-0.142/scripts/functions initramfs-tools-0.142ubuntu15.1/scripts/functions --- initramfs-tools-0.142/scripts/functions 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/scripts/functions 2023-10-16 12:36:03.000000000 +0200 @@ -33,6 +33,14 @@ _log_msg "done.\\n" } +# Add failure hook +add_mountroot_fail_hook() +{ + # DEPRECATED; this definition remains as a stub but any packages + # calling this function should be revised to remove references to it + return 0 +} + panic() { local console rest IFS @@ -201,13 +209,7 @@ local FS FSTYPE FS="${1}" - # blkid has a more complete list of file systems, - # but fstype is more robust - FSTYPE="unknown" - eval "$(fstype "${FS}" 2> /dev/null)" - if [ "$FSTYPE" = "unknown" ]; then - FSTYPE=$(blkid -o value -s TYPE "${FS}") || return - fi + FSTYPE=$(blkid -o value -s TYPE "${FS}") || return echo "${FSTYPE}" return 0 } @@ -216,6 +218,7 @@ { # If the ip= parameter is present and specifies a device, use # that in preference to any device name we already have + local rc=1 local IFS=: set -f # shellcheck disable=SC2086 @@ -223,9 +226,17 @@ set +f if [ -n "$6" ]; then DEVICE="$6" - return 0 + rc=0 fi - return 1 + case "$IP6" in + ""|on|dhcp|any|none|off) + ;; + *) + DEVICE6="$IP6" + rc=0 + ;; + esac + return $rc } _set_netdev_from_hw_address() @@ -236,6 +247,7 @@ if [ -f "$device/address" ] && [ "$(cat "$device/address")" = "$want_address" ]; then DEVICE="${device##*/}" + DEVICE6="${device##*/}" return 0 fi done @@ -261,6 +273,33 @@ return 1 } +_set_available_devices_to_up() +{ + # Look for devices with (IFF_UP and IFF_LOOPBACK) clear and + # (IFF_BROADCAST or IFF_POINTTOPOINT) set. Bring those devices up. + # Skip any enslaved device (has "master" link attribute on it) + # if NETWORK_SKIP_ENSLAVED is set to a value different than "0". + local device + local flags + for device in /sys/class/net/*; do + if [ ! -f "${device}/flags" ]; then + continue + fi + flags="$(cat "${device}/flags")" + if [ "$((flags & 9))" -ne 0 ] || + [ "$((flags & 0x12))" -eq 0 ]; then + continue + fi + + if [ "${NETWORK_SKIP_ENSLAVED:-0}" != 0 ]; then + ip -o link show "${device##*/}" | grep -q -w master && continue + fi + + echo "Setting ip link ${device##*/} up" + echo "$(( flags | 1 ))" > "${device}/flags" + done +} + _update_ip_param() { # If the ip= parameter is present, and is a colon-separated list, @@ -289,7 +328,11 @@ # In case 2 we only discover the device name while waiting # for a device. if _set_netdev_from_ip_param; then - netdev_desc="${DEVICE}" + if [ -n "${DEVICE}" ] && [ -n "${DEVICE6}" ]; then + netdev_desc="${DEVICE} and ${DEVICE6}" + else + netdev_desc="${DEVICE:-$DEVICE6}" + fi elif [ -n "${BOOTIF}" ]; then # pxelinux sets BOOTIF to a value based on the mac address of the # network card used to PXE boot @@ -313,14 +356,44 @@ _set_netdev_from_hw_address "${bootif_mac}" netdev_desc="device with address ${bootif_mac}" - elif [ -n "${DEVICE}" ]; then - netdev_desc="${DEVICE}" + elif [ -n "${DEVICE}${DEVICE6}" ]; then + if [ -n "${DEVICE}" ] && [ -n "${DEVICE6}" ]; then + netdev_desc="${DEVICE} and ${DEVICE6}" + else + netdev_desc="${DEVICE:-$DEVICE6}" + fi else netdev_desc="any network device" fi - # networking already configured thus bail out - [ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ] && return 0 + for v in $VLAN; do + VLAN_LINK="$VLAN_LINK ${v##*:}" + VLAN_NAMES="$VLAN_NAMES ${v%:*}" + done + + # activate non-autoconfigured s390x devices + for dev in $DEVICE $DEVICE6 $VLAN_LINK; do + # do not chzdev $dev if it is a not-yet-created vlan interface + for vlan_name in $VLAN_NAMES; do + if [ "$dev" = "$vlan_name" ]; then + continue 2 + fi + done + case ${dev} in + enc*) + zdev=${dev#enc} + chzdev -e "$zdev" || true + ;; + esac + done + + for v in $VLAN; do + vlink=${v##*:} + vname=${v%:*} + vid=${vname#*.} + ip link set up dev "$vlink" + ip link add name "$vname" link "$vlink" type vlan id "$vid" + done local netdevwait=180 log_begin_msg "Waiting up to ${netdevwait} secs for ${netdev_desc} to become available" @@ -349,40 +422,360 @@ # Documentation/frv/booting.txt for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do + local iter_entry_time iter_exit_time - # The NIC is to be configured if this file does not exist. - # Ip-Config tries to create this file and when it succeds - # creating the file, ipconfig is not run again. - for x in /run/net-"${DEVICE}".conf /run/net-*.conf ; do - [ -e "$x" ] && break 2 - done + iter_entry_time=$(time_elapsed) + + if [ -z "${DEVICE}" ]; then + _set_available_devices_to_up + fi case ${IP} in - none|off) + none|done|off) # Do nothing + IP="done" ;; - ""|on|any) - # Bring up device - ipconfig -t ${ROUNDTTT} "${DEVICE}" - ;; - dhcp|bootp|rarp|both) - ipconfig -t ${ROUNDTTT} -c "${IP}" -d "${DEVICE}" + ""|on|any|dhcp|bootp|both) + dhcpcd -1 -t $ROUNDTTT -4 ${DEVICE:+"${DEVICE}"} ;; *) ipconfig -t ${ROUNDTTT} -d "$IP" ;; esac + + case ${IP6} in + ""|none|done|off) + # Do nothing + IP6="done" + ;; + *) + # check the content of IP6 and if it is not on/dhcp/any use it as + # a device name. Otherwise all devices will be tried (unless + # BOOTIF was set, see above). + case "${IP6}" in + on|dhcp|any) + ;; + *) + DEVICE6="$IP6" ;; + esac + + dhcpcd -1 -t $ROUNDTTT -6 ${DEVICE6:+"${DEVICE6}"} + ;; + esac + + # The NIC is to be configured if this file does not exist. + # Ip-Config tries to create this file and when it succeds + # creating the file, ipconfig is not run again. + for x in /run/net-"${DEVICE}".conf /run/net-*.conf ; do + if [ -e "$x" ]; then + IP="done" + break + fi + done + + for x in /run/net6-"${DEVICE}".conf /run/net6-*.conf ; do + if [ -e "$x" ]; then + IP6="done" + break + fi + done + + # if we've reached a point where both IP and IP6 are "done", + # then we're finished with network configuration. + if [ "$IP" = "done" ] && [ "$IP6" = "done" ]; then + break + fi + + iter_exit_time=$(time_elapsed) + + if [ $((iter_exit_time - iter_entry_time)) -le $ROUNDTTT ]; then + sleep $((ROUNDTTT - iter_exit_time + iter_entry_time)) + fi + done + + # source ipconfig output for either $DEVICE or the first one. + # If the user is booting with only IPv6, then DEVICE may be set, + # but no IPv4 conf files exist. + for conf in /run/"net-$DEVICE.conf" /run/net-*.conf; do + if [ -e "$conf" ]; then + # source specific bootdevice + . "$conf" + break + fi + done + + netinfo_to_resolv_conf /etc/resolv.conf \ + /run/"net-${DEVICE}.conf" /run/net-*.conf /run/net6-*.conf + netinfo_to_netplan /run/netplan \ + /run/"net-${DEVICE}.conf" /run/net-*.conf /run/net6-*.conf +} + +netinfo_to_resolv_conf() { + # netinfo_to_resolv_conf(output, files) + # write resolv_conf from /run/net- style files. + if [ "${_in_subshell:-0}" = "0" ]; then + # subshell to avoid modification of variables by '.' + # shellcheck disable=SC2030 + ( _in_subshell=1; netinfo_to_resolv_conf "$@" ) + return + fi + local output="$1" search="" ns="" f="" n="" + shift + for f in "$@"; do + [ -f "$f" ] || continue + unset IPV4DNS0 IPV4DNS1 IPV6DNS0 IPV6DNS1 + unset DOMAINSEARCH IPV6DOMAINSEARCH + . "$f" || { echo "WARN: failed '. \"$f\"'" 1>&2; return 1; } + for n in "${IPV4DNS0}" "${IPV4DNS1}" \ + "${IPV6DNS0}" "${IPV6DNS1}"; do + if [ -z "$n" ] || [ "$n" = "0.0.0.0" ]; then + continue + fi + # skip if 'n' already in list. + case " ${ns} " in + *\ $n\ *) continue;; + esac + ns="${ns} ${n}" + done + for n in "${DOMAINSEARCH}" "${IPV6DOMAINSEARCH}"; do + [ -n "$n" ] || continue + # skip if already in search. + case " ${search}" in + *\ $n\ *) continue;; + esac + search="$search $n" + done + search=${search# } + ns=${ns# } + done + + local rconf="" CR=" +" + for n in ${ns}; do + rconf="${rconf}nameserver $n${CR}" + done + if [ -n "${search}" ]; then + rconf="${rconf}search ${search}${CR}" + fi + if [ -z "$rconf" ]; then + echo "no search or nameservers found in $*" 1>&2 + fi + if [ "$rconf" = "-" ]; then + echo -n "$rconf" + else + echo -n "$rconf" > "$output" + fi +} + +mask2cidr() { + # https://forum.openwrt.org/viewtopic.php?pid=220781#p220781 + # Assumes there's no "255." after a non-255 byte in the mask + local x=${1##*255.} + set -- 0^^^128^192^224^240^248^252^254^ $(( (${#1} - ${#x})*2 )) "${x%%.*}" + x=${1%%"$3"*} + echo $(( $2 + (${#x}/4) )) +} + +_declare_sh_append_var() { + # append_var(name, skip, strings) + # write a declaration of name that will append to any existing + local name="$1" skip="$2" add="" n="" + shift 2 + for n in "$@"; do + if [ -z "$n" ] || [ "$n" = "$skip" ]; then + continue + fi + add="$add $n" done + add=${add# } + [ -n "$add" ] || return 0 + echo "$name=\"\${${name}:+\${${name}} }${add}\"" +} + +_declare_ip_info() { + # declare_ip_info(version, proto, address, netmask, gateway) + local version="$1" proto="$2" address="$3" netmask="$4" gateway="$5" + local netprefix="" + case $proto in + dhcp|dhcp4|dhcp6) + echo "dhcp${version}=true" + ;; + none) + if [ -n "$address" ]; then + netprefix=$netmask + if [ "$version" = "4" ]; then + netprefix=$(mask2cidr "$netmask") + fi + _declare_sh_append_var addresses "" "$address/$netprefix" + fi + if [ -n "$gateway" ]; then + echo "gateway${version}=$gateway" + fi + ;; + esac +} + +_render_netplan() { + # write a netplan stanza for the given device. + local name="$1" mac="$2" dhcp4="$3" dhcp6="$4" addrs="$5" \ + gateway4="$6" gateway6="$7" ns_addrs="$8" ns_search="$9" \ + vlink="${10}" vname="${11}" vid="${12}" + local n found="" + if [ -n "$vlink" ]; then + name=$vlink + fi + echo "network:" + echo " version: 2" + echo " ethernets:" + echo " $name:" + if [ -n "$mac" ] && grep -q net.ifnames=0 /proc/cmdline 2>/dev/null; then + echo " match:" + echo " macaddress: \"$mac\"" + echo " set-name: $name" + elif [ -n "$vname" ]; then + echo " {}" + fi + if [ -n "$vname" ]; then + echo " vlans:" + echo " $vname:" + echo " id: $vid" + echo " link: $name" + fi + if [ -n "$dhcp4" ]; then + echo " dhcp4: $dhcp4" + echo " dhcp-identifier: mac" + fi + if [ -n "$dhcp6" ]; then + echo " dhcp6: $dhcp6" + fi + if [ -n "$dhcp4$dhcp6" ]; then + echo " critical: true" + fi + if [ -n "$addrs" ]; then + echo " addresses:" + found="," + for n in $addrs; do + # remove dups + [ "${found#*,"$n",}" = "${found}" ] || continue + found="${found}$n," + echo " - \"$n\"" + done + fi + if [ -n "$gateway4" ]; then + echo " gateway4: \"$gateway4\"" + fi + if [ -n "$gateway6" ]; then + echo " gateway6: \"$gateway6\"" + fi + + if [ -n "$ns_addrs" ]; then + local alist="[" slist="" + for n in $ns_addrs; do + # do not put in duplicates + [ "${alist#*\""$n"\"}" = "$alist" ] || continue + alist="${alist}\"$n\", "; + done + alist="${alist%, }]" + + if [ -n "$ns_search" ]; then + slist="[" + for n in ${ns_search}; do + # do not put in duplicates + [ "${slist#*\""$n"\"}" = "$slist" ] || continue + slist="${slist}\"$n\", "; + done + slist="${slist%, }]" + fi + echo " nameservers:" + echo " addresses: $alist" + if [ -n "$slist" ]; then + echo " search: $slist" + fi + fi +} - # source ipconfig output - if [ -n "${DEVICE}" ]; then - # source specific bootdevice - . "/run/net-${DEVICE}.conf" +netinfo_to_netplan() { + # read /run/net-* files write netplan config. + # shellcheck disable=SC2031 + if [ "${_in_subshell:-0}" = "0" ]; then + # subshell to avoid modification of variables by '.' + ( _in_subshell=1; netinfo_to_netplan "$@" ) + return + fi + local out_d="$1" tmpd + if command -v mktemp >/dev/null 2>&1; then + tmpd=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX") else - # source any interface... - # ipconfig should have quit after first response - . /run/net-*.conf + tmpd="${TMPDIR:-/tmp}/${0##*/}.niinfo.$$" + mkdir -p "$tmpd" || return fi + + local devices="" mac="" + # we go through all the files presented and create per-device files in + # a tmpdir that are shell sourceable and closer to the netplan that + # we want to render. Then render those to netplan stanzas. + for f in "$@"; do + [ -f "$f" ] || continue + unset DEVICE DEVICE6 PROTO IPV6PROTO + unset IPV6ADDR IPV6NETMASK IPV6GATEWAY + unset IPV4ADDR IPV4NETMASK IPV4GATEWAY + . "$f" || { echo "WARN: failed '. \"$f\"'" 1>&2; return 1; } + local name="" + name=${DEVICE:-${DEVICE6}} + [ -n "$name" ] || { + echo "WARN: $f did not define DEVICE or DEVICE6" 1>&2; + return 1; + } + case " ${devices} " in + *\ ${name}\ *) :;; + *) devices="${devices} ${name}" + esac + if [ ! -e "$tmpd/$name" ] \ + && [ -r "/sys/class/net/$name/address" ] + then + read -r mac < /sys/class/net/"$name"/address && + echo "macaddress=$mac" > "$tmpd/$name" + fi + + { + for v in $VLAN; do + vlink=${v##*:} + vname=${v%:*} + vid=${vname#*.} + if [ "$name" = "$vname" ]; then + echo "vlink=$vlink" + echo "vname=$vname" + echo "vid=$vid" + break + fi + done + if [ -n "$DEVICE" ]; then + # shellcheck disable=SC2153 + _declare_ip_info 4 "$PROTO" "$IPV4ADDR" "$IPV4NETMASK" "$IPV4GATEWAY" + elif [ -n "$DEVICE6" ]; then + _declare_ip_info 6 "$IPV6PROTO" "$IPV6ADDR" "$IPV6NETMASK" \ + "$IPV6GATEWAY" + fi + _declare_sh_append_var ns_addresses "0.0.0.0" \ + "${IPV4DNS0}" "${IPV4DNS1}" "${IPV6DNS0}" "${IPV6DNS1}" + _declare_sh_append_var ns_search "" "$DOMAINSEARCH" "$IPV6DOMAINSEARCH" + } >> "$tmpd/$name" + done + + [ -d "$out_d" ] || mkdir -p "$out_d" || + { echo "WARN: failed mkdir $out_d"; return 1; } + + for name in $devices; do + local macaddress="" dhcp4="" dhcp6="" addresses="" + local gateway4="" gateway6="" ns_addresses="" ns_search="" + local vlink="" vname="" vid="" + . "$tmpd/$name" + _render_netplan "$name" "$macaddress" "$dhcp4" "$dhcp6" "$addresses" \ + "$gateway4" "$gateway6" "$ns_addresses" "$ns_search" \ + "$vlink" "$vname" "$vid" \ + > "${out_d}/$name.yaml" + done + rm -Rf "$tmpd" } # Wait for queued kernel/udev events @@ -428,10 +821,44 @@ # Resolved name is echoed. resolve_device() { DEV="$1" + local orig="$DEV" case "$DEV" in LABEL=* | UUID=* | PARTLABEL=* | PARTUUID=*) - DEV="$(blkid -l -t "$DEV" -o device)" || return 1 + if ! DEV="$(blkid -l -t "$DEV" -o device)"; then + DEV="$orig" + + # Support uppercase and lowercase UUIDs -- see RFC#4122: + # "Each field is treated as an integer and has its value printed as + # a zero-filled hexadecimal digit string with the most significant + # digit first. The hexadecimal values "a" through "f" are output as + # lower case characters and are case insensitive on input." + # + # Note: that blkid which we will use to map these assums the input is lower + # case. + + # Only apply this behaviour to UUIDs. + case "$DEV" in + UUID=* | PARTUUID=*) ;; + *) return 1 ;; + esac + + # Pull DEV apart and map it. + local type value fmt + type=$(echo "${DEV}" | cut -f 1 -d =) + value=$(echo "${DEV}" | cut -f 2 -d = | tr 'A-F' 'a-f') + + # ... in RFC#4122 format; + # look for five hexadecimal fragments separated by minus signs. + fmt=$( echo "$value" | sed -e 's/[0-9a-fA-F]*//g' ) + if [ "$fmt" != '----' ]; then + return 1 + fi + DEV="${type}=${value}" + + # Retry with the lower cased UUID. + DEV="$(blkid -l -t "$DEV" -o device)" || return 1 + fi ;; esac [ -e "$DEV" ] && echo "$DEV" diff -Nru initramfs-tools-0.142/scripts/init-top/blacklist initramfs-tools-0.142ubuntu15.1/scripts/init-top/blacklist --- initramfs-tools-0.142/scripts/init-top/blacklist 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/scripts/init-top/blacklist 2023-08-24 11:57:29.000000000 +0200 @@ -15,6 +15,16 @@ ;; esac +# blacklist vga16fb when vga= or video= given +# shellcheck disable=SC2013 +for x in $(cat /proc/cmdline); do + case ${x} in + vga=*|video=*) + echo "blacklist vga16fb" >> /etc/modprobe.d/initramfs.conf + ;; + esac +done + # sanity check [ -z "${blacklist?}" ] && exit 0 diff -Nru initramfs-tools-0.142/scripts/init-top/framebuffer initramfs-tools-0.142ubuntu15.1/scripts/init-top/framebuffer --- initramfs-tools-0.142/scripts/init-top/framebuffer 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/scripts/init-top/framebuffer 2023-09-25 21:47:50.000000000 +0200 @@ -0,0 +1,135 @@ +#!/bin/sh + +# shellcheck disable=SC2034 +OPTION=FRAMEBUFFER +PREREQ="udev" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + + +# The options part of the kernel "video=" argument (i.e. everyting +# after "video=:") has very inconsistent rules. +# +# Generally the following applies: +# 1) options are comma-separated +# 2) options can be in either of these three forms: +# =, :, . +# 3) the "mode" option has the form x[M][R][-][@][i][m] +# and may or may not start with "mode=" +# +# When the options are used with modules, they need to be space-separated +# and the following conversions are needed: +# : -> = +# -> =1 +# -> mode= +parse_video_opts() +{ + local OPTS="$1" + local IFS="," + + # Must be a line like video=:,[opt2]... + if [ "${OPTS}" = "${OPTS%%:*}" ]; then + return + fi + OPTS="${OPTS#*:}" + for opt in ${OPTS}; do + # Already in the "=" form + if [ "${opt}" != "${opt#*=}" ]; then + echo -n "$opt " + # In the ":" form + elif [ "${opt}" != "${opt#*:}" ]; then + echo -n "${opt%:*}=${opt#*:} " + # Presumably a modevalue without the "mode=" prefix + elif [ "${opt}" != "${opt#[0-9]*x[0-9]}" ]; then + echo -n "mode=$opt " + # Presumably a boolean + else + echo -n "${opt}=1 " + fi + done +} + +FB="" +OPTS="" + +# shellcheck disable=SC2013 +for x in $(cat /proc/cmdline); do + case ${x} in + vga=*) + FB="vesafb"; + OPTS=""; + ;; + video=*) + FB=${x#*=} + FB="${FB%%:*}" + OPTS="$(parse_video_opts "${x}")" + esac +done + +# Map command line name to module name +case ${FB} in +matroxfb) + FB=matroxfb_base + ;; +esac + +if [ -n "${FB}" ]; then + # Some framebuffer devices need character devices :-/ + udevadm settle + # shellcheck disable=SC2086 + MODPROBE_OPTIONS=-q modprobe ${FB} ${OPTS} + # Wait for the framebuffer devices to be ready + udevadm settle +else + # If we have no graphics devices yet, wait for udev to settle + if ! [ -d /sys/class/graphics/fbcon ] \ + || ! [ -d /sys/class/graphics/fb0 ] \ + || ! [ -d /sys/class/drm/card0 ] + then + udevadm settle + fi + + # If we still have no graphics device, fall back to vesafb like + # we do in the post-initramfs case in + # /etc/init/udev-fallback-graphics.conf. + # There is a higher risk of racing the regular video driver init + # than there is in the post-initramfs case, because this is earlier + # in boot and the kernel has had less time to finish probing the + # video drivers; and if we probe vesafb when we aren't meant to it + # will cause problems later. So just to be sure, add a sleep(1) + # which seems to be enough time to let the drm interface get loaded. + if ! [ -d /sys/class/graphics/fbcon ] \ + || ! [ -d /sys/class/graphics/fb0 ] \ + || ! [ -d /sys/class/drm/card0 ] + then + sleep 1 + fi + + if ! [ -d /sys/class/graphics/fbcon ] \ + || ! [ -d /sys/class/graphics/fb0 ] \ + || ! [ -d /sys/class/drm/card0 ] + then + modprobe -q vesafb 2>/dev/null + udevadm settle + fi +fi + +# Force fb mode via /sys interface +# shellcheck disable=SC2013 +for x in $(cat /proc/cmdline); do + case ${x} in + fbmode=*) + MODE=${x#*=} + echo "$MODE" > /sys/class/graphics/fb0/mode + ;; + esac +done diff -Nru initramfs-tools-0.142/scripts/init-top/keymap initramfs-tools-0.142ubuntu15.1/scripts/init-top/keymap --- initramfs-tools-0.142/scripts/init-top/keymap 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/scripts/init-top/keymap 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -#!/bin/sh - -PREREQ="" -prereqs() -{ - echo "$PREREQ" -} -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -if [ -x /bin/setupcon ]; then - /bin/setupcon -fi diff -Nru initramfs-tools-0.142/scripts/local initramfs-tools-0.142ubuntu15.1/scripts/local --- initramfs-tools-0.142/scripts/local 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/scripts/local 2023-09-25 21:47:50.000000000 +0200 @@ -51,7 +51,31 @@ local time_elapsed local count - wait_for_udev 10 + # If wait-for-root understands this prefix, then use it to wait for + # the device rather than settling the whole of udev. + + # Timeout is max(30, rootdelay) seconds (approximately) + local slumber=30 + case $DPKG_ARCH in + powerpc|ppc64|ppc64el) + slumber=180 + ;; + *) + slumber=30 + ;; + esac + if [ "${ROOTDELAY:-0}" -gt $slumber ]; then + slumber=$ROOTDELAY + fi + + case "$dev_id" in + UUID=*|LABEL=*|PARTUUID=*|/dev/*) + FSTYPE=$( wait-for-root "$dev_id" "$slumber" ) + ;; + *) + wait_for_udev 10 + ;; + esac # Load ubi with the correct MTD partition and return since fstype # doesn't work with a char device like ubi. @@ -73,16 +97,13 @@ # to allow for asynchronous device discovery (e.g. USB). We # also need to keep invoking the local-block scripts in case # there are devices stacked on top of those. + # + # in Ubuntu, we should never actually enter this loop as wait-for-root + # above should have waited until the device appeared. if ! real_dev=$(resolve_device "${dev_id}") || ! get_fstype "${real_dev}" >/dev/null; then log_begin_msg "Waiting for ${name}" - # Timeout is max(30, rootdelay) seconds (approximately) - slumber=30 - if [ "${ROOTDELAY:-0}" -gt $slumber ]; then - slumber=$ROOTDELAY - fi - while true; do sleep 1 time_elapsed="$(time_elapsed)" @@ -92,6 +113,7 @@ # If mdadm's local-block script counts the # number of times it is run, make sure to # run it the expected number of times. + mdadm_exec=0 while true; do if [ -f /run/count.mdadm.initrd ]; then count="$(cat /run/count.mdadm.initrd)" @@ -105,9 +127,32 @@ if [ "${count}" -ge "${time_elapsed}" ]; then break; fi + + # Track that mdadm was executed to force + # cryptroot execution after the loop, see + # LP #1879980. + mdadm_exec=1 /scripts/local-block/mdadm "${dev_id}" + + # Cryptroot must run here, see LP #1879980. + # The counter is inc/dec on cryptroot script! + if [ -f /run/cryptroot.initrd.cnt ]; then + crypt_cnt=$(cat /run/cryptroot.initrd.cnt) + if [ "${crypt_cnt}" -gt 0 ]; then + /scripts/local-block/cryptroot "${dev_id}" + fi + fi done + # Extra cryptroot run after mdadm loop in order to + # start encrypted volumes on top of RAID arrays. + if [ -f /run/cryptroot.initrd.cnt ]; then + crypt_cnt=$(cat /run/cryptroot.initrd.cnt) + if [ "${crypt_cnt}" -gt 0 ] || [ ${mdadm_exec} -ne 0 ]; then + /scripts/local-block/cryptroot "${dev_id}" + fi + fi + if real_dev=$(resolve_device "${dev_id}") && get_fstype "${real_dev}" >/dev/null; then wait_for_udev 10 @@ -159,7 +204,8 @@ local_premount - if [ "${readonly?}" = "y" ]; then + if [ "${readonly?}" = "y" ] && \ + [ -z "$LOOP" ]; then roflag=-r else roflag=-w @@ -169,8 +215,56 @@ # Mount root # shellcheck disable=SC2086 - if ! mount ${roflag} ${FSTYPE:+-t "${FSTYPE}"} ${ROOTFLAGS} "${ROOT}" "${rootmnt?}"; then - panic "Failed to mount ${ROOT} as root file system." + mount ${roflag} ${FSTYPE:+-t "${FSTYPE}"} ${ROOTFLAGS} "${ROOT}" "${rootmnt?}" + mountroot_status="$?" + if [ "$LOOP" ]; then + if [ "$mountroot_status" != 0 ]; then + if [ "${FSTYPE}" = ntfs ] || [ "${FSTYPE}" = vfat ] + then + panic " +Could not mount the partition ${ROOT}. +This could also happen if the file system is not clean because of an operating +system crash, an interrupted boot process, an improper shutdown, or unplugging +of a removable device without first unmounting or ejecting it. To fix this, +simply reboot into Windows, let it fully start, log in, run 'chkdsk /r', then +gracefully shut down and reboot back into Windows. After this you should be +able to reboot again and resume the installation. +(filesystem = ${FSTYPE}, error code = $mountroot_status) +" + fi + fi + + mkdir -p /host + mount -o move "$rootmnt" /host + + while [ ! -e "/host/${LOOP#/}" ]; do + panic "ALERT! /host/${LOOP#/} does not exist. Dropping to a shell!" + done + + # Get the loop filesystem type if not set + # shellcheck disable=SC2153 + FSTYPE="$LOOPFSTYPE" + if [ -z "$FSTYPE" ] || [ "$FSTYPE" = "unknown" ]; then + FSTYPE=$(/sbin/blkid -s TYPE -o value "/host/${LOOP#/}") + [ -z "$FSTYPE" ] && FSTYPE="unknown" + fi + + if [ "$readonly" = y ]; then + roflag=-r + else + roflag=-w + fi + + # FIXME This has no error checking + modprobe loop + + # FIXME This has no error checking + # shellcheck disable=SC2086 + mount ${roflag} -o loop -t ${FSTYPE} ${LOOPFLAGS} "/host/${LOOP#/}" "${rootmnt?}" + + if [ -d "$rootmnt/host" ]; then + mount -o move /host "$rootmnt/host" + fi fi } diff -Nru initramfs-tools-0.142/scripts/local-premount/fixrtc initramfs-tools-0.142ubuntu15.1/scripts/local-premount/fixrtc --- initramfs-tools-0.142/scripts/local-premount/fixrtc 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/scripts/local-premount/fixrtc 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,135 @@ +#!/bin/sh -e +# initramfs local-premount script for fixrtc + +PREREQ="" + +# Output pre-requisites +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + +# use the fixrtc cmdline option in your bootloader to +# automatically set the hardware clock to the date of +# the last mount of your root filesystem to avoid fsck +# to get confused by the superblock being in the future + +BROKEN_CLOCK="" +ROOTDEV="" +# System partition is currently used by ubuntu touch only +SYSTEMPART="" + +# shellcheck disable=SC2013 +for x in $(cat /proc/cmdline); do + case ${x} in + root=*) + value=${x#*=} + + # Find the device node path depending on the form of root= : + case ${value} in + UUID=*) + ROOTDEV=/dev/disk/by-uuid/${value#UUID=} + ;; + LABEL=*) + ROOTDEV=/dev/disk/by-label/${value#LABEL=} + ;; + *) + ROOTDEV=${value} + ;; + esac + ;; + systempart=*) + value=${x#*=} + + # Find the device node path depending on the form of root= : + case ${value} in + UUID=*) + SYSTEMPART=/dev/disk/by-uuid/${value#UUID=} + ;; + LABEL=*) + SYSTEMPART=/dev/disk/by-label/${value#LABEL=} + ;; + *) + SYSTEMPART=${value} + ;; + esac + # if systempart= is defined we do not want root=/dev/ram + # been taken into account + [ "$ROOTDEV" = "/dev/ram" ] && ROOTDEV="" + ;; + fixrtc) + BROKEN_CLOCK=1 + ;; + esac +done + +# Touch devices might not have a valid 'root', so use system part if available +if [ -z "$ROOTDEV" ] && [ -n "$SYSTEMPART" ]; then + ROOTDEV=$SYSTEMPART +fi + +if [ -n "$BROKEN_CLOCK" ] && [ -n "$ROOTDEV" ]; then + # need udev settle for /dev/disk/by-* symlinks to be added + udevadm settle + + wait-for-root "$ROOTDEV" "${ROOTDELAY:-180}" >/dev/null + + ROOTDISK=$(readlink -f "$ROOTDEV") + + MOUNTDATESTR=$(dumpe2fs -h "$ROOTDISK" 2>/dev/null|grep "Last mount time") + # Trim whitespace for busybox + MOUNTDATE="${MOUNTDATESTR#*:}" + MOUNTDATE="${MOUNTDATE#"${MOUNTDATE%%[![:space:]]*}"}" + + CREATEDATESTR=$(dumpe2fs -h "$ROOTDISK" 2>/dev/null|grep "Filesystem created") || true + # Trim whitespace for busybox + CREATEDATE="${CREATEDATESTR#*:}" + CREATEDATE="${CREATEDATE#"${CREATEDATE%%[![:space:]]*}"}" + + # Hide stderr to avoid ugly message: + # can't open '/dev/misc/rtc': No such file or directory + # on pi2 (and possible more PIs) where there is no /dev/rtc of + # any kind. We still need to keep this call because we use + # fixrtc on all armhf images. + hwclock -s 2>/dev/null || true + + # make sure we're also compatible with busybox, if available + DATE="/bin/date -D%c" + date -D%c 2>/dev/null 2>&1 || DATE=/bin/date + + if [ "$MOUNTDATE" = "n/a" ]; then + # some versions of mkfs set n/a now, date is not happy with this so + # let us use some half way sane epoch instead + MOUNTDATE="Fri Jan 1 00:00:00 1999" + fi + TIMESTR=$MOUNTDATE + TIME=$(${DATE} --utc --date "${TIMESTR}" +%s) + + CURTIME=$(${DATE} --utc +%s) + + # in case the created time is newer than last mount, use that instead + if [ -n "$CREATEDATE" ]; then + CREATETIME=$(${DATE} --utc --date "${CREATEDATE}" +%s) + if [ "$CREATETIME" -gt "$TIME" ]; then + TIMESTR=$CREATEDATE + TIME=$CREATETIME + fi + fi + + if [ "$TIME" -gt "$CURTIME" ]; then + ${DATE} --set="${TIMESTR} 1 minute" >/dev/null 2>&1 + fi + +fi + +# This script is best-effort. If we couldn't fudge the clock as desired, +# just try to carry on boot anyway: +# It will probably fail, but we won't have made the situation any worse. +exit 0 diff -Nru initramfs-tools-0.142/scripts/local-premount/resume initramfs-tools-0.142ubuntu15.1/scripts/local-premount/resume --- initramfs-tools-0.142/scripts/local-premount/resume 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/scripts/local-premount/resume 2023-08-24 11:57:29.000000000 +0200 @@ -22,25 +22,55 @@ . /scripts/functions . /scripts/local +PAGE_SIZE=4096 +if [ -x /bin/getconf ]; then + PAGE_SIZE=$(getconf PAGESIZE) +fi +export PAGE_SIZE + if ! local_device_setup "${resume}" "suspend/resume device" false; then exit 0 fi -if [ "$(get_fstype "${DEV}")" = suspend ] && - command -v plymouth >/dev/null && - plymouth --ping; then - plymouth display-message --text="Resuming from hibernation" - - # The above command does not wait for a framebuffer update to - # complete, so the kernel can freeze the framebuffer before - # the message is even visible. Wait just a moment to make - # that less likely. - sleep 0.1 +DEV=$(readlink -f "$resume") +DEV=/sys/class/block/${DEV##*/}/dev +if [ -r "$DEV" ]; then + read -r MAJMIN < "$DEV" +fi +if [ -z "$MAJMIN" ]; then + exit 1 fi -# hardcode path, uswsusp ships an resume binary too -if [ -n "${resume_offset?}" ]; then - /bin/resume "${DEV}" "${resume_offset}" +if [ "${resume_offset?}" -ge 0 ] 2>/dev/null; then + offset_option=$((${resume_offset?} * PAGE_SIZE)) + SWAPTYPE=$(blkid -p -O ${offset_option} "${resume}" -s TYPE -o value) + MAJMIN="${MAJMIN}:${resume_offset?}" else - /bin/resume "${DEV}" + SWAPTYPE=$(blkid -p -o value -s TYPE "$resume") +fi + +use_plymouth=false +if command -v plymouth >/dev/null && plymouth --ping; then + use_plymouth=true +fi + +case "${SWAPTYPE}" in + swsuspend|s1suspend|s2suspend|ulsuspend|tuxonice) + if "$use_plymouth"; then + plymouth message --text="Resuming from $resume" + + # The above command does not wait for a framebuffer update to + # complete, so the kernel can freeze the framebuffer before + # the message is even visible. Wait just a moment to make + # that less likely. + sleep 0.1 + fi + + echo "${MAJMIN}" > /sys/power/resume + ;; +esac + +if "$use_plymouth"; then + # plymouth hide-message does not work yet + plymouth display-message --text="" fi diff -Nru initramfs-tools-0.142/src/Makefile initramfs-tools-0.142ubuntu15.1/src/Makefile --- initramfs-tools-0.142/src/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/src/Makefile 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,21 @@ +PKG_CONFIG = pkg-config +UDEV_CFLAGS = $(shell $(PKG_CONFIG) --cflags libudev) +UDEV_LIBS = $(shell $(PKG_CONFIG) --libs libudev) + +CC = gcc +CFLAGS = -g -Wall -O2 $(UDEV_CFLAGS) +LDFLAGS = + + +.PHONY: all +all: wait-for-root gcc_s1-stub + +wait-for-root: wait-for-root.o + $(CC) $(LDFLAGS) -o $@ $< $(UDEV_LIBS) + +gcc_s1-stub: + gcc -Wl,--no-as-needed -shared -l:libpthread.so.0 -l:libgcc_s.so.1 -o $@ + +.PHONY: clean +clean: + rm -f wait-for-root.o wait-for-root gcc_s1-stub core *~ diff -Nru initramfs-tools-0.142/src/wait-for-root.c initramfs-tools-0.142ubuntu15.1/src/wait-for-root.c --- initramfs-tools-0.142/src/wait-for-root.c 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/src/wait-for-root.c 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,171 @@ +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +static int matching_device (struct udev_device *device, const char *path); + +static void alarm_handler (int signum); + + +int +main (int argc, + char *argv[]) +{ + const char * devpath; + char path[PATH_MAX]; + int timeout; + struct udev * udev; + struct udev_monitor *udev_monitor; + struct stat devstat; + struct udev_device * udev_device; + const char * type; + int flags; + + if (argc != 3) { + fprintf (stderr, "Usage: %s DEVICE TIMEOUT\n", argv[0]); + exit (2); + } + + devpath = argv[1]; + if (! strncmp (devpath, "UUID=", 5)) { + strcpy (path, "/dev/disk/by-uuid/"); + strcat (path, devpath + 5); + } else if (! strncmp (devpath, "LABEL=", 6)) { + strcpy (path, "/dev/disk/by-label/"); + strcat (path, devpath + 6); + } else if (! strncmp (devpath, "PARTUUID=", 9)) { + strcpy (path, "/dev/disk/by-partuuid/"); + strcat (path, devpath + 9); + } else { + strcpy (path, devpath); + } + + timeout = atoi (argv[2]); + + signal (SIGALRM, alarm_handler); + alarm (timeout); + + /* Connect to the udev monitor first; if we stat() first, the + * event might happen between the stat() and the time we actually + * get hooked up. + */ + udev = udev_new (); + udev_monitor = udev_monitor_new_from_netlink (udev, "udev"); + + udev_monitor_filter_add_match_subsystem_devtype (udev_monitor, "block", NULL); + udev_monitor_enable_receiving (udev_monitor); + udev_monitor_set_receive_buffer_size(udev_monitor, 128*1024*1024); + + /* Check to see whether the device exists already on the filesystem. + * If this is true, we don't need to wait for it can obtain the + * filesystem type by looking up the udevdb record by major/minor. + */ + if (stat (path, &devstat) == 0 && S_ISBLK (devstat.st_mode)) + { + udev_device = udev_device_new_from_devnum (udev, 'b', devstat.st_rdev); + if (udev_device) { + type = udev_device_get_property_value (udev_device, "ID_FS_TYPE"); + if (type) { + printf ("%s\n", type); + + udev_device_unref (udev_device); + goto exit; + } + + udev_device_unref (udev_device); + } + } + + /* udev monitor socket is nonblocking by default, but we want to wait + * for events */ + flags = fcntl (udev_monitor_get_fd (udev_monitor), F_GETFL, 0); + flags &= ~O_NONBLOCK; + fcntl (udev_monitor_get_fd (udev_monitor), F_SETFL, flags); + + /* When the device doesn't exist yet, or is still being processed + * by udev, use the monitor socket to wait it to be done. + */ + while (1) { + /* even though we use a blocking socket this might still fail + * due to ENOBUFS or similar. */ + while ((udev_device = udev_monitor_receive_device (udev_monitor)) == NULL) + sleep (1); + if (matching_device (udev_device, devpath)) { + type = udev_device_get_property_value (udev_device, "ID_FS_TYPE"); + if (type) { + printf ("%s\n", type); + + udev_device_unref (udev_device); + goto exit; + } + + } + + udev_device_unref (udev_device); + } + +exit: + udev_monitor_unref (udev_monitor); + udev_unref (udev); + + exit (0); +} + + +static int +matching_device (struct udev_device *device, + const char * path) +{ + const char * devnode; + struct udev_list_entry *devlinks_entry; + + /* Match by name */ + devnode = udev_device_get_devnode (device); + if (devnode && (! strcmp (path, devnode))) + return 1; + + /* Match by UUID */ + if (! strncmp (path, "UUID=", 5)) { + const char *uuid; + + uuid = udev_device_get_property_value (device, "ID_FS_UUID"); + if (uuid && (! strcmp (path + 5, uuid))) + return 1; + } + + /* Match by LABEL */ + if (! strncmp (path, "LABEL=", 6)) { + const char *label; + + label = udev_device_get_property_value (device, "ID_FS_LABEL"); + if (label && (! strcmp (path + 6, label))) + return 1; + } + + /* Match by symlink */ + for (devlinks_entry = udev_device_get_devlinks_list_entry (device); + devlinks_entry != NULL; + devlinks_entry = udev_list_entry_get_next (devlinks_entry)) + if (! strcmp (path, udev_list_entry_get_name (devlinks_entry))) + return 1; + + return 0; +} + + +static void +alarm_handler (int signum) +{ + exit (1); +} diff -Nru initramfs-tools-0.142/tests/run-tests initramfs-tools-0.142ubuntu15.1/tests/run-tests --- initramfs-tools-0.142/tests/run-tests 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/run-tests 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,30 @@ +#!/bin/sh +# Simply call all files named 'test_*' in the same directory as this file. +# Record their exit code as pass or fail. exit 1 if any failed. +my_dir=$(dirname "$0") + +npass=0 +nfail=0 +for test_file in "${my_dir}/test_"*; do + [ -f "$test_file" -a -x "$test_file" ] || continue + echo "executing $test_file" 1>&2 + "$test_file" + ret=$? + if [ $ret -eq 0 ]; then + npass=$(($npass+1)) + else + nfail=$(($nfail+1)) + fails="${fails:+${fails} }${test_file}" + fi +done + +if [ $nfail -ne 0 ]; then + echo "Passed $npass tests. Failed $nfail tests: ${fails}." 1>&2 + exit 1 +elif [ $npass -eq 0 ]; then + echo "No tests executed?" 1>&2 +else + echo "Passed $npass tests. Failed 0 tests." 1>&2 +fi + +exit 0 diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4/expected-resolv.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4/expected-resolv.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4/expected-resolv.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4/expected-resolv.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,2 @@ +nameserver 192.168.122.1 +search foo.com diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4/net-example1.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4/net-example1.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4/net-example1.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4/net-example1.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,17 @@ +DEVICE='example1' +PROTO='dhcp' +IPV4ADDR='192.168.122.89' +IPV4BROADCAST='192.168.122.255' +IPV4NETMASK='255.255.255.0' +IPV4GATEWAY='192.168.122.1' +IPV4DNS0='192.168.122.1' +IPV4DNS1='0.0.0.0' +HOSTNAME='foohost' +DNSDOMAIN='' +NISDOMAIN='' +ROOTSERVER='192.168.122.1' +ROOTPATH='' +filename='' +UPTIME='21' +DHCPLEASETIME='3600' +DOMAINSEARCH='foo.com' diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4/netplan/example1.yaml initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4/netplan/example1.yaml --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4/netplan/example1.yaml 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4/netplan/example1.yaml 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,10 @@ +network: + version: 2 + ethernets: + example1: + dhcp4: true + dhcp-identifier: mac + critical: true + nameservers: + addresses: ["192.168.122.1"] + search: ["foo.com"] diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/expected-resolv.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/expected-resolv.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/expected-resolv.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/expected-resolv.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,3 @@ +nameserver 192.168.122.1 +nameserver 2001:67c:1562:8010::2:1 +search foo.com example.com ubuntu.com diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/net6-example1.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/net6-example1.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/net6-example1.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/net6-example1.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,10 @@ +DEVICE6=example1 +HOSTNAME= +DNSDOMAIN= +IPV6PROTO=dhcp6 +IPV6ADDR=2001:67c:1562:8010:0:1:: +IPV6NETMASK=64 +IPV6DNS0=2001:67c:1562:8010::2:1 +IPV6DOMAINSEARCH="example.com ubuntu.com" +HOSTNAME= +DNSDOMAIN= diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/net-example1.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/net-example1.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/net-example1.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/net-example1.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,17 @@ +DEVICE='example1' +PROTO='dhcp' +IPV4ADDR='192.168.122.89' +IPV4BROADCAST='192.168.122.255' +IPV4NETMASK='255.255.255.0' +IPV4GATEWAY='192.168.122.1' +IPV4DNS0='192.168.122.1' +IPV4DNS1='0.0.0.0' +HOSTNAME='foohost' +DNSDOMAIN='' +NISDOMAIN='' +ROOTSERVER='192.168.122.1' +ROOTPATH='' +filename='' +UPTIME='21' +DHCPLEASETIME='3600' +DOMAINSEARCH='foo.com' diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/netplan/example1.yaml initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/netplan/example1.yaml --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4and6/netplan/example1.yaml 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4and6/netplan/example1.yaml 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,11 @@ +network: + version: 2 + ethernets: + example1: + dhcp4: true + dhcp-identifier: mac + dhcp6: true + critical: true + nameservers: + addresses: ["192.168.122.1", "2001:67c:1562:8010::2:1"] + search: ["foo.com", "example.com", "ubuntu.com"] diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4static/net-example1.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4static/net-example1.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4static/net-example1.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4static/net-example1.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,12 @@ +DEVICE='example1' +PROTO='none' +IPV4ADDR='10.0.0.2' +IPV4BROADCAST='10.0.0.255' +IPV4NETMASK='255.255.255.0' +IPV4GATEWAY='10.0.0.1' +IPV4DNS0='0.0.0.0' +IPV4DNS1='0.0.0.0' +HOSTNAME='foohost' +UPTIME='21' +DHCPLEASETIME='' +DOMAINSEARCH='' diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv4static/netplan/example1.yaml initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4static/netplan/example1.yaml --- initramfs-tools-0.142/tests/test_netinfo.d/ipv4static/netplan/example1.yaml 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv4static/netplan/example1.yaml 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,7 @@ +network: + version: 2 + ethernets: + example1: + addresses: + - "10.0.0.2/24" + gateway4: "10.0.0.1" diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv6/expected-resolv.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv6/expected-resolv.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv6/expected-resolv.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv6/expected-resolv.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,2 @@ +nameserver 2001:67c:1562:8010::2:1 +search example.com ubuntu.com diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv6/net6-example1.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv6/net6-example1.conf --- initramfs-tools-0.142/tests/test_netinfo.d/ipv6/net6-example1.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv6/net6-example1.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,10 @@ +DEVICE6=example1 +HOSTNAME= +DNSDOMAIN= +IPV6PROTO=dhcp6 +IPV6ADDR=2001:67c:1562:8010:0:1:: +IPV6NETMASK=64 +IPV6DNS0=2001:67c:1562:8010::2:1 +IPV6DOMAINSEARCH="example.com ubuntu.com" +HOSTNAME= +DNSDOMAIN= diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/ipv6/netplan/example1.yaml initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv6/netplan/example1.yaml --- initramfs-tools-0.142/tests/test_netinfo.d/ipv6/netplan/example1.yaml 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/ipv6/netplan/example1.yaml 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,9 @@ +network: + version: 2 + ethernets: + example1: + dhcp6: true + critical: true + nameservers: + addresses: ["2001:67c:1562:8010::2:1"] + search: ["example.com", "ubuntu.com"] diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/vlan/expected-resolv.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/expected-resolv.conf --- initramfs-tools-0.142/tests/test_netinfo.d/vlan/expected-resolv.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/expected-resolv.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,3 @@ +nameserver 192.168.122.1 +nameserver 2001:67c:1562:8010::2:1 +search foo.com example.com ubuntu.com diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/vlan/net6-example1.1.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/net6-example1.1.conf --- initramfs-tools-0.142/tests/test_netinfo.d/vlan/net6-example1.1.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/net6-example1.1.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,15 @@ +# VLAN actually comes from vlan= kernel cmdline... +# ... but this file is sourced, so pretend it was +# parsed out kernel cmdline +VLAN=example1.1:example1 +# end of hack +DEVICE6=example1.1 +HOSTNAME= +DNSDOMAIN= +IPV6PROTO=dhcp6 +IPV6ADDR=2001:67c:1562:8010:0:1:: +IPV6NETMASK=64 +IPV6DNS0=2001:67c:1562:8010::2:1 +IPV6DOMAINSEARCH="example.com ubuntu.com" +HOSTNAME= +DNSDOMAIN= diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/vlan/net-example1.1.conf initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/net-example1.1.conf --- initramfs-tools-0.142/tests/test_netinfo.d/vlan/net-example1.1.conf 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/net-example1.1.conf 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,22 @@ +# VLAN actually comes from vlan= kernel cmdline... +# ... but this file is sourced, so pretend it was +# parsed out kernel cmdline +VLAN=example1.1:example1 +# end of hack +DEVICE='example1.1' +PROTO='dhcp' +IPV4ADDR='192.168.122.89' +IPV4BROADCAST='192.168.122.255' +IPV4NETMASK='255.255.255.0' +IPV4GATEWAY='192.168.122.1' +IPV4DNS0='192.168.122.1' +IPV4DNS1='0.0.0.0' +HOSTNAME='foohost' +DNSDOMAIN='' +NISDOMAIN='' +ROOTSERVER='192.168.122.1' +ROOTPATH='' +filename='' +UPTIME='21' +DHCPLEASETIME='3600' +DOMAINSEARCH='foo.com' diff -Nru initramfs-tools-0.142/tests/test_netinfo.d/vlan/netplan/example1.1.yaml initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/netplan/example1.1.yaml --- initramfs-tools-0.142/tests/test_netinfo.d/vlan/netplan/example1.1.yaml 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.d/vlan/netplan/example1.1.yaml 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,16 @@ +network: + version: 2 + ethernets: + example1: + {} + vlans: + example1.1: + id: 1 + link: example1 + dhcp4: true + dhcp-identifier: mac + dhcp6: true + critical: true + nameservers: + addresses: ["192.168.122.1", "2001:67c:1562:8010::2:1"] + search: ["foo.com", "example.com", "ubuntu.com"] diff -Nru initramfs-tools-0.142/tests/test_netinfo.sh initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.sh --- initramfs-tools-0.142/tests/test_netinfo.sh 1970-01-01 01:00:00.000000000 +0100 +++ initramfs-tools-0.142ubuntu15.1/tests/test_netinfo.sh 2023-08-24 11:57:29.000000000 +0200 @@ -0,0 +1,119 @@ +#!/bin/sh + +data_dir="${0%.sh}.d" +my_dir=$(dirname "$0") +SCRIPTS_D=$(cd "$my_dir/../scripts" && pwd) +RET_SKIP=99 +RET_FAIL=2 +RET_PASS=0 + +PASSES=0 +FAILS=0 +SKIPS=0 + +logfail() { echo "FAIL:" "$@" 1>&2; return $RET_FAIL; } +logpass() { echo "PASS:" "$@" 1>&2; return $RET_PASS; } + +pass_on_nodiff() { + # log_on_diff(tname, expected, found) + local tname="$1" expected="$2" found="$3" out="" opts="-u" + [ -d "$expected" ] && opts="-Naur" + out=$(diff $opts "$expected" "$found") + r=$? + if [ $r -eq 0 ]; then + logpass "$tname" + else + logfail "$tname: expected output differed" + echo "$out" 1>&2 + return $RET_FAIL + fi +} + +_run_in_functions() { + local name="$1" r="" + shift + sh -ec '. "$1"; shift; "$@";' \ + "test-$name" "$SCRIPTS_D/functions" "$@" || { + r=$? + logfail "$name execution returned $r. ($*)" + return $r + } +} + +run_resolvconf() { + local bname="$1" testdir="$2" results_d="$3" + local tname="$bname-netinfo-to-resolv.conf" + shift 3 + local expected="$testdir/expected-resolv.conf" + local found="$results_d/resolv.conf" + [ -f "$expected" ] || return $RET_SKIP + _run_in_functions "$tname" netinfo_to_resolv_conf "$found" "$@" || return + + pass_on_nodiff "$tname" "$expected" "$found" +} + +run_netinfo_to_netplan() { + local bname="$1" testdir="$2" results_d="$3" + local tname="$bname-netinfo-to-netplan" + shift 3 + local found_d="$results_d/netplan" + local expected_d="$testdir/netplan" + [ -d "$expected_d" ] || return $RET_SKIP + + _run_in_functions "$tname" netinfo_to_netplan "$found_d" "$@" || return + pass_on_nodiff "$tname" "$expected_d" "$found_d" +} + +run_netplan_generate() { + local bname="$1" testdir="$2" results_d="$3" + local tname="$bname-netplan-generate" + shift 3 + local expected_d="$testdir/netplan" + [ -d "$expected_d" ] || return $RET_SKIP + type netplan >/dev/null 2>/dev/null || return $RET_SKIP + + mkdir -p $results_d/lib/ + cp -r $expected_d $results_d/lib + netplan generate --root-dir $results_d + r=$? + if [ $r -eq 0 ]; then + logpass "$tname" + else + logfail "$tname: netplan generate failed" + return $RET_FAIL + fi +} + +record() { + local ret="$1" + case "$ret" in + 0) PASSES=$(($PASSES+1));; + $RET_SKIP) SKIPS=$(($SKIPS+1));; + *) FAILS=$(($FAILS+1));; + esac +} + +for testdir in "${data_dir}"/*; do + [ -d "$testdir" ] || continue + dname="${testdir##*/}" + results_d=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXX") + confs=$( + for f in "${testdir}"/net-*.conf "${testdir}/net6-"*.conf; do + [ -f "$f" ] && echo "$f" + done + ) + run_resolvconf "$dname" "$testdir" "$results_d" $confs + record $? + + run_netinfo_to_netplan "$dname" "$testdir" "$results_d" $confs + record $? + + run_netplan_generate "$dname" "$testdir" "$results_d" $confs + record $? + + rm -Rf "${results_d}" +done + +echo "INFO: ran $(($PASSES+$FAILS)) tests: $PASSES pass. $FAILS fail." +[ $FAILS -eq 0 ] +exit diff -Nru initramfs-tools-0.142/unmkinitramfs initramfs-tools-0.142ubuntu15.1/unmkinitramfs --- initramfs-tools-0.142/unmkinitramfs 2022-07-12 23:51:34.000000000 +0200 +++ initramfs-tools-0.142ubuntu15.1/unmkinitramfs 2023-09-25 21:47:50.000000000 +0200 @@ -112,6 +112,7 @@ fi dd < "$initramfs" skip=$start count=$((end - start)) iflag=skip_bytes 2> /dev/null | ( + # shellcheck disable=SC2030 if [ -n "$dir" ]; then mkdir -p -- "$dir/$subdir" cd -- "$dir/$subdir" @@ -127,9 +128,11 @@ trap 'rm -f "$subarchive"' EXIT dd < "$initramfs" skip="$end" iflag=skip_bytes 2> /dev/null \ > "$subarchive" + # shellcheck disable=SC2030,SC2031 xcpio "$subarchive" "${dir:+$dir/main}" -i "$@" else # Don't use subdirectories (for backward compatibility) + # shellcheck disable=SC2031 xcpio "$initramfs" "$dir" -i "$@" fi }