Skip to content
Snippets Groups Projects
  1. Jul 25, 2018
    • Ben Hutchings's avatar
      update-initramfs: Make "-k all" take over other initramfs images · f39625af
      Ben Hutchings authored
      
      Now that we assume ownership of /boot/initrd.img-<version> for all
      installed kernel versions, an update or deletion command with "-k all"
      should be applied to all such files, even if we didn't create them.
      
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      f39625af
    • Ben Hutchings's avatar
      update-initramfs: Always take over other initramfs images · c0ae42ba
      Ben Hutchings authored
      
      In Debian, update-initramfs has always refused to overwrite or delete
      an initramfs image that it didn't create, unless the -t option is
      used.  On Ubuntu, this check is apparently disabled.  The commit log
      doesn't provide much of a clue as to why.  Looking at the the state of
      Debian and the linux-2.6 package at the time, I think the reasoning
      must have been something like:
      
      (1) Multiple initramfs/initrd generators were available and could be
      coinstalled.  The configuration file /etc/kernel-img.conf specified
      which one kernel packages should invoke ("ramdisk" variable).
      
      (2) Packages that hooked into initramfs-tools would always run update-
      initramfs if it existed, and it would immediately update the
      initramfs, because triggers hadn't yet been invented.
      
      (3) To keep the alternate initramfs generators working, update-
      initramfs therefore had to either (a) check the configuration file to
      find out whether initramfs-tools was meant to be used, or (b) keep
      track of which initramfs images it created and therefore "owned".
      
      At this point, (1) is no longer true; the "ramdisk" variable is not
      honoured and the initramfs generator to be invoked is chosen by
      installing one of several conflicting packages.  I think this means
      that (3) no longer follows, and whichever of the automatic initramfs
      generator packages is currently installed should be considered to
      "own" /boot/initrd.img-<version> for all kernel versions.
      
      This commit only disables the checks.  The state directory and the
      state updates are retained for now, in case it becomes necessary to
      revert this change.
      
      Closes: #765750, #804295
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      c0ae42ba
    • Ben Hutchings's avatar
      hooks/resume: Reject zram swap devices when selecting automatically · 312393b0
      Ben Hutchings authored
      
      zram is ephemeral (it's a compressed RAM disk) so we must not use it.
      
      Closes: #861228
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      312393b0
    • Ben Hutchings's avatar
      hooks/resume: Loop over all swap devices when selecting automatically · 4c0d86c4
      Ben Hutchings authored
      
      If we reject the largest swap device then we should look at any
      other swap devices too.
      
      This is unlikely to make a difference by itself, since we only
      reject swap devices encrypted with a random key, and there are
      unlikely to be other swap devices configured differently.
      
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      4c0d86c4
    • Ben Hutchings's avatar
      mkinitramfs: Create usr-merged filesystem layout · 71f5d615
      Ben Hutchings authored
      
      On a usr-merged filesystem /bin, /lib*, /sbin are symlinks to the
      corresponding subdirectories of /usr.  When the host filesystem looks
      like this, copy_file may be asked to copy both /lib/foo and
      /usr/lib/foo.  It's too late at this point to make /lib a symlink
      in the initramfs, and copy_file isn't general enough to do that.
      
      Avoid this by setting up the initramfs as usr-merged.  This could
      possibly cause file conflicts, but it's unlikely because:
      
      * Policy forbids such conflicts on the host filesystem
      * Few executables and libraries that go into the initramfs are
        explicitly installed in /usr on the host filesystem, because
        of historical support for having the init system mount /usr
      * mkinitramfs never used to create /usr/bin or /usr/lib
      
      Closes: #874523
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      71f5d615
    • Ben Hutchings's avatar
      Update debian/.gitignore · ea88876e
      Ben Hutchings authored
      
      Gbp-Dch: ignore
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      ea88876e
    • Ben Hutchings's avatar
      hook-functions: Add support for compressed module files · 8c806b44
      Ben Hutchings authored
      
      Change filename matching in manual_add_modules, copy_modules_dir,
      hidden_dep_add_modules to allow a compression suffix after '.ko'
      in filenames.
      
      kmod is responsible for decompressing modules, and Debian's kmod
      currently only supports xz compression.  We allow any compression
      suffix here, so if kmod is rebuilt with gzip/zlib support enabled then
      initramfs-tools should automatically support it too.
      
      Closes: #891560
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      8c806b44
    • Ben Hutchings's avatar
      hook-functions: Quote exclusions in copy_modules_dir · d0212d3e
      Ben Hutchings authored
      
      Exclusions may include wildcards, which should be matched by find
      and not the shell.  Change the argument processing to manipulate
      the argument array, instead of building a single variable which
      cannot maintain quoting.
      
      (This would be easier in bash - we could use a named array variable.)
      
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      d0212d3e
  2. Jul 19, 2018
  3. Jul 18, 2018
Loading