Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: util-linux

util-linux (2.34-0.1ubuntu5) focal; urgency=medium * d/p/libblkid-xfs-log-check-for-reg-xfs-on-more-sectors.patch: fix ambivalent detection of bcache and xfs_external_log due to regular xfs on bcache backing device. (LP: #1858802) -- Mauricio Faria de Oliveira <mfo@canonical.com> Wed, 08 Jan 2020 16:03:19 -0300 util-linux (2.34-0.1ubuntu4) focal; urgency=medium * bash-completion/umount: fix completion to not require gawk be present. Thanks to √Čtienne Mollier for the patch. (LP: #1845529) -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Tue, 03 Dec 2019 15:27:13 -0500 util-linux (2.34-0.1ubuntu3) focal; urgency=medium * Drop dependency from util-linux to fdisk. The transition to split-out fdisk was done before 18.04 so the transitional dependency is no longer needed, and fdisk should not be pulled into the essential package set since it's not needed in container environments. For bootable systems which need fdisk, it will be pulled in directly. -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 22 Nov 2019 13:40:12 -0800 util-linux (2.34-0.1ubuntu2) eoan; urgency=medium * d/p/prevent-fstrim-inside-container.patch: - Prevent fstrim to run inside a container environment. (LP: #1589289) -- Eric Desrochers <eric.desrochers@canonical.com> Wed, 21 Aug 2019 13:19:03 +0000 util-linux (2.34-0.1ubuntu1) eoan; urgency=low * Merge from Debian unstable. Remaining changes: - Build hwclock with audit support. - Drop debian/hwclock.rules and hwclock.default, recent kernels sync the RTC automatically. - Add sulogin-fallback-static-sh.patch: Add support for /bin/static-sh as fallback if the regular shell fails to execute. Patch ported from sysvinit. (see LP #505887) - Add sulogin-lockedpwd.patch: Make sure file systems can be fixed on machines with locked root accounts (as Ubuntu does by default). Don't require --force for sulogin. - Clean up weekly fstrim cron file, now a systemd timer unit. - Update s390-tools breaks/replaces, to the correct version for ubuntu. - Enable fstrim.timer by default. * Dropped changes, included upstream: - debian/patches/32-bit-safe-mbr-parsing.patch: [PATCH] libfdisk: (dos) Use strtoul to parse the label-id. -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 15 Aug 2019 23:50:01 -0700

Modifications :
  1. Download patch debian/patches/umount-completion.patch

    --- 2.34-0.1/debian/patches/umount-completion.patch 1970-01-01 00:00:00.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/patches/umount-completion.patch 2019-12-03 20:27:13.000000000 +0000 @@ -0,0 +1,76 @@ +From: √Čtienne Mollier <etienne.mollier@mailoo.org> +Subject: Reimplement umount completion to not use gawk's gensub. + +diff -Naur a/bash-completion/umount b/bash-completion/umount +--- a/bash-completion/umount 2019-04-02 12:12:03.180261025 +0200 ++++ b/bash-completion/umount 2019-08-08 20:14:17.758472003 +0200 +@@ -1,3 +1,33 @@ ++_umount_points_list() ++{ ++ # List of characters to escape, shamelessly stolen from "scp" comp. ++ local escape_chars='[][(){}<>\",:;^&!$=?`|\\'\'' \t\f\n\r\v]' ++ ++ # This is most odd, but we are adding artifically a space after the ++ # file name because, somehow, it enables proper escaping of dangerous ++ # characters, e.g. "|" -> "\|". Without space, it is possible to get ++ # either 0 "|" or 2 "\\|" backslashes, but 1 does not work. Also, ++ # sticking to sub() and gsub(), instead of gensub(), allows to be AWK ++ # implementation agnostic. ++ findmnt -lno TARGET | awk '{ ++ if ($0 ~ "^"ENVIRON["HOME"]) { ++ homeless = $0 ++ sub("^"ENVIRON["HOME"], "~", homeless) ++ gsub("'"$escape_chars"'", "\\\\&", homeless) ++ print homeless " " ++ } ++ if ($0 ~ "^"ENVIRON["PWD"]) { ++ reldir = $0 ++ sub("^"ENVIRON["PWD"]"/?", "", reldir) ++ gsub("'"$escape_chars"'", "\\\\&", reldir) ++ print "./" reldir " " ++ print reldir " " ++ } ++ gsub("'"$escape_chars"'", "\\\\&") ++ print $0 " " ++ }' ++} ++ + _umount_module() + { + local cur prev OPTS +@@ -48,28 +78,11 @@ + return 0 + ;; + esac +- +- local oldifs=$IFS +- IFS=$'\n' +- COMPREPLY=( $( compgen -W "$(findmnt -lno TARGET | awk \ +- '{ +- if ($0 ~ ENVIRON["HOME"]) { +- homeless = $0 +- homeless = gensub(ENVIRON["HOME"], "\\\\~", "g", homeless) +- homeless = gensub(/(\s)/, "\\\\\\1", "g", homeless) +- print homeless +- } +- if ($0 ~ ENVIRON["PWD"]) { +- reldir = $0 +- reldir = gensub(ENVIRON["PWD"]"/", "", "g", reldir) +- reldir = gensub(/(\s)/, "\\\\\\1", "g", reldir) +- print "./" reldir +- print reldir +- } +- gsub(/\s/, "\\\\&") +- print $0 +- }' +- )" -- "$cur" ) ) +- IFS=$oldifs ++ local IFS=$'\n' ++ COMPREPLY=( $( compgen -W '$( _umount_points_list )' -- "$cur" ) ) + } +-complete -F _umount_module umount ++ ++# counteract the artificial addition of " " in _gen_mount_points() by ++# disabling spaces automatically appended to the end of the file name ++# completion via "-o nospace". ++complete -F _umount_module -o nospace umount
  2. Download patch debian/patches/libblkid-xfs-log-check-for-reg-xfs-on-more-sectors.patch

    --- 2.34-0.1/debian/patches/libblkid-xfs-log-check-for-reg-xfs-on-more-sectors.patch 1970-01-01 00:00:00.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/patches/libblkid-xfs-log-check-for-reg-xfs-on-more-sectors.patch 2020-01-08 19:03:19.000000000 +0000 @@ -0,0 +1,114 @@ +Origin: upstream, https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=d756af7d640c51ce8d1414607bd3f17eeecf2424 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1858802 +Bug-Debian: https://bugs.debian.org/948444 +From d756af7d640c51ce8d1414607bd3f17eeecf2424 Mon Sep 17 00:00:00 2001 +From: Mauricio Faria de Oliveira <mfo@canonical.com> +Date: Tue, 7 Jan 2020 18:53:51 -0300 +Subject: [PATCH] libblkid: (xfs) external log: check for regular xfs on more + sectors + +The xfs external log probe only checks for regular xfs on sector zero, +but then checks for valid log record headers on all first 512 sectors. + +This can incorrectly detect an xfs external log if a regular xfs (i.e. +with internal log) is shifted by up to 512 sectors; it may happen with +bcache and LVM1 for example, as the regular xfs is found later in disk. + +This results in ambivalent filesystem detection, thus no UUID for udev. + +Fix this problem by checking for regular xfs on all sectors considered +by the xfs external log probe. + +Test-case with bcache: +--- + + $ IMG=bcache-backing-device.img + $ dd if=/dev/zero of=$IMG bs=1G count=0 seek=1 + $ DEV=$(sudo losetup --find --show $IMG) + + $ sudo make-bcache -B $DEV + + $ sudo mkfs.xfs -d agsize=16m -l agnum=0 -f /dev/bcache0 + + $ sudo LD_LIBRARY_PATH=./.libs ./wipefs /dev/bcache0 + DEVICE OFFSET TYPE UUID LABEL + bcache0 0x0 xfs 9f6dfa9d-4488-46f7-906b-dcfc96027cfe + + $ echo 1 | sudo tee /sys/block/bcache0/bcache/stop + + $ sudo hexdump -C $DEV | grep -m2 -e XFSB -e 'fe ed ba be' + 00002000 58 46 53 42 00 00 10 00 00 00 00 00 00 03 f0 00 |XFSB............| + 00007000 fe ed ba be 00 00 00 01 00 00 00 02 00 00 00 14 |................| + + Without patch: + + $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV + DEVICE OFFSET TYPE UUID LABEL + loop0 0x1018 bcache 23da3ba9-2467-453d-b020-06f02c947190 + loop0 0x7000 xfs_external_log + + With patch: + + $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV + DEVICE OFFSET TYPE UUID LABEL + loop0 0x1018 bcache 23da3ba9-2467-453d-b020-06f02c947190 + +Test-case with LVM1: +--- + + $ IMG=lvm-backing-device.img + $ dd if=/dev/zero of=$IMG bs=1G count=0 seek=1 + $ DEV=$(sudo losetup --find --show $IMG) + + $ sudo lvm pvcreate -M1 $DEV + $ sudo lvm vgcreate -M1 lvm-vg-test $DEV + $ sudo lvm lvcreate lvm-vg-test --name lvm-lv-test --extents 100%VG + + $ sudo mkfs.xfs -d agsize=16m -l agnum=0 -f /dev/mapper/lvm--vg--test-lvm--lv--test + + $ sudo LD_LIBRARY_PATH=./.libs ./wipefs /dev/mapper/lvm--vg--test-lvm--lv--test + DEVICE OFFSET TYPE UUID LABEL + lvm--vg--test-lvm--lv--test 0x0 xfs 451ba725-8394-4ebe-9b49-fc5f4a99667f + + $ sudo lvchange -an lvm-vg-test + + $ sudo hexdump -C $DEV | grep -m2 -e XFSB -e 'fe ed ba be' + 00020000 58 46 53 42 00 00 10 00 00 00 00 00 00 03 f0 00 |XFSB............| + 00025000 fe ed ba be 00 00 00 01 00 00 00 02 00 00 00 14 |................| + + Without patch: + + $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV + DEVICE OFFSET TYPE UUID LABEL + loop0 0x0 LVM1_member agUhNT-9f42-Z30B-Z4Ew-skWd-3h3a-tWMY0A + loop0 0x25000 xfs_external_log + + With patch: + + $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV + DEVICE OFFSET TYPE UUID LABEL + loop0 0x0 LVM1_member agUhNT-9f42-Z30B-Z4Ew-skWd-3h3a-tWMY0A + +Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com> +--- + libblkid/src/superblocks/xfs.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/libblkid/src/superblocks/xfs.c ++++ b/libblkid/src/superblocks/xfs.c +@@ -252,11 +252,12 @@ + if (!buf) + return errno ? -errno : 1; + +- if (memcmp(buf, "XFSB", 4) == 0) +- return 1; /* this is regular XFS, ignore */ +- + /* check the first 512 512-byte sectors */ + for (i = 0; i < 512; i++) { ++ /* this is regular XFS (maybe with some sectors shift), ignore */ ++ if (memcmp(&buf[i*512], "XFSB", 4) == 0) ++ return 1; ++ + rhead = (struct xlog_rec_header *)&buf[i*512]; + + if (xlog_valid_rec_header(rhead)) {
  3. Download patch debian/util-linux.hwclock.default

    --- 2.34-0.1/debian/util-linux.hwclock.default 2019-07-28 15:14:02.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/util-linux.hwclock.default 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -# Defaults for the hwclock init script. See hwclock(5) and hwclock(8). - -# This is used to specify that the hardware clock incapable of storing -# years outside the range of 1994-1999. Set to yes if the hardware is -# broken or no if working correctly. -#BADYEAR=no - -# Set this to yes if it is possible to access the hardware clock, -# or no if it is not. -#HWCLOCKACCESS=yes - -# Set this to any options you might need to give to hwclock, such -# as machine hardware clock type for Alphas. -#HWCLOCKPARS= - -# Set this to the hardware clock device you want to use, it should -# probably match the CONFIG_RTC_HCTOSYS_DEVICE kernel config option. -#HCTOSYS_DEVICE=rtc0 -
  4. Download patch debian/rules

    --- 2.34-0.1/debian/rules 2019-07-28 15:14:02.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/rules 2019-07-28 21:44:43.000000000 +0000 @@ -11,6 +11,7 @@ CONFOPTS += --enable-raw CONFOPTS += --with-selinux CONFOPTS += --with-smack CONFOPTS += --enable-partx +CONFOPTS += --with-audit ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) CONFOPTS += --without-systemd --without-udev --without-audit else @@ -134,9 +135,9 @@ override_dh_installinit: ifeq (linux,$(DEB_HOST_ARCH_OS)) ifeq (,$(findstring s390,$(DEB_HOST_ARCH))) # install /etc/init.d/hwclock.sh - dh_installinit --name=hwclock.sh --no-start - # install /etc/default/hwclock - dh_installinit --name=hwclock + # - update-rc.d manually handled in maintainers scripts as there + # is special per-arch considerations. + dh_installinit --name=hwclock.sh --noscripts endif endif # install uuidd sysvinit script @@ -144,6 +145,7 @@ endif ln -s ../misc-utils/uuidd.rc debian/uuid-runtime.uuidd.init dh_installinit --name=uuidd --restart-after-upgrade rm -f debian/uuid-runtime.uuidd.init + dh_installsystemd --package=util-linux fstrim.timer override_dh_installpam: dh_installpam --package=util-linux --name=runuser
  5. Download patch debian/util-linux.install

    --- 2.34-0.1/debian/util-linux.install 2019-07-28 15:14:02.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/util-linux.install 2019-07-28 21:44:43.000000000 +0000 @@ -1,5 +1,4 @@ #!/usr/bin/dh-exec --with=install -debian/hwclock.rules => /lib/udev/rules.d/85-hwclock.rules debian/hwclock-set => /lib/udev/hwclock-set # perl gets to do rename, not us. debian/tmp/usr/bin/rename => /usr/bin/rename.ul
  6. Download patch debian/patches/sulogin-fallback-static-sh.patch

    --- 2.34-0.1/debian/patches/sulogin-fallback-static-sh.patch 1970-01-01 00:00:00.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/patches/sulogin-fallback-static-sh.patch 2018-02-14 22:20:35.000000000 +0000 @@ -0,0 +1,18 @@ +Description: Add support for /bin/static-sh as fallback if the regular shell fails to execute +Author: Michael Vogt <michael.vogt@ubuntu.com> +Bug-Ubuntu: https://launchpad.net/bugs/505887 + +--- a/login-utils/sulogin.c ++++ b/login-utils/sulogin.c +@@ -793,6 +793,11 @@ + xsetenv("SHELL", "/bin/sh", 1); + execl("/bin/sh", profile ? "-sh" : "sh", NULL); + warn(_("failed to execute %s"), "/bin/sh"); ++ ++ /* Fall back to static shell */ ++ setenv("SHELL", "/bin/static-sh", 1); ++ execl("/bin/static-sh", profile ? "-sh" : "sh", NULL); ++ warn(_("failed to execute %s"), "/bin/static-sh"); + } + + static void usage(void)
  7. Download patch debian/control

    --- 2.34-0.1/debian/control 2019-07-28 15:14:02.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/control 2019-11-22 21:38:02.000000000 +0000 @@ -19,10 +19,12 @@ Build-Depends: bc <!stage1 !nocheck>, socat <!stage1 !nocheck>, systemd [linux-any] <!stage1>, bison, - zlib1g-dev + zlib1g-dev, + libaudit-dev Section: base Priority: required -Maintainer: LaMont Jones <lamont@debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: LaMont Jones <lamont@debian.org> Uploaders: Adam Conrad <adconrad@0c3.net> Standards-Version: 4.4.0 Rules-Requires-Root: binary-targets @@ -35,7 +37,7 @@ Build-Profiles: <!stage1> Section: utils Essential: yes Pre-Depends: ${misc:Pre-Depends}, ${shlibs:Depends} -Depends: ${misc:Depends}, fdisk, login (>= 1:4.5-1.1~) +Depends: ${misc:Depends}, login (>= 1:4.5-1.1~) Suggests: dosfstools, kbd | console-tools, util-linux-locales Replaces: bash-completion (<< 1:2.8), sysvinit-utils (<< 2.88dsf-59.1~), @@ -79,7 +81,7 @@ Build-Profiles: <!stage1> XB-Important: yes Section: admin Pre-Depends: ${misc:Pre-Depends}, ${shlibs:Depends} -Depends: ${misc:Depends}, util-linux (>= 2.29.2-3~) +Depends: ${misc:Depends}, util-linux (>= 2.30.1-0ubuntu4~) Suggests: nfs-common (>=1:1.1.0-13) Breaks: bash-completion (<< 1:2.1-4.3~) Replaces: bash-completion (<< 1:2.1-4.3~) @@ -112,8 +114,8 @@ Section: utils Priority: important Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} -Replaces: util-linux (<< 2.29.2-3~) -Breaks: util-linux (<< 2.29.2-3~) +Replaces: util-linux (<< 2.30.1-0ubuntu4~) +Breaks: util-linux (<< 2.30.1-0ubuntu4~) Multi-Arch: foreign Description: collection of partitioning utilities This package contains the classic fdisk, sfdisk and cfdisk partitioning @@ -368,7 +370,7 @@ Depends: ${misc:Depends}, ${shlibs:Depen Package-Type: udeb Description: stripped down miscellaneous system utilities, for debian-installer This is a minimal version of util-linux for debian-installer. It only - contains the blkid binary at the moment. + contains the blkid and fallocate binaries at the moment. Package: rfkill Architecture: linux-any
  8. Download patch debian/patches/prevent-fstrim-inside-container.patch

    --- 2.34-0.1/debian/patches/prevent-fstrim-inside-container.patch 1970-01-01 00:00:00.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/patches/prevent-fstrim-inside-container.patch 2019-08-21 13:17:10.000000000 +0000 @@ -0,0 +1,44 @@ +Description: fstrim shouldn't run inside a container + Container type implies the following products: + openvz OpenVZ/Virtuozzo + lxc Linux container implementation by LXC + lxc-libvirt Linux container implementation by libvirt + systemd-nspawn systemd's minimal container implementation, see systemd-nspawn(1) + docker Docker container manager + podman Podman container manager + rkt rkt app container runtime + wsl Windows Subsystem for Linux + + References: + https://www.freedesktop.org/software/systemd/man/systemd.unit.html + https://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html# + + Fix: #840 +Author: Eric Desrochers <eric.desrochers@canonical.com> +Origin: upstream, https://github.com/karelzak/util-linux/commit/0280d31a2bd6292acd9a4b86d0f6b5feb275a618 +Bug: https://github.com/karelzak/util-linux/issues/840 +Bug-Ubuntu: https://launchpad.net/bugs/1589289 +Index: util-linux-2.34/sys-utils/fstrim.service.in +=================================================================== +--- util-linux-2.34.orig/sys-utils/fstrim.service.in ++++ util-linux-2.34/sys-utils/fstrim.service.in +@@ -1,6 +1,7 @@ + [Unit] + Description=Discard unused blocks on filesystems from /etc/fstab + Documentation=man:fstrim(8) ++ConditionVirtualization=!container + + [Service] + Type=oneshot +Index: util-linux-2.34/sys-utils/fstrim.timer +=================================================================== +--- util-linux-2.34.orig/sys-utils/fstrim.timer ++++ util-linux-2.34/sys-utils/fstrim.timer +@@ -1,6 +1,7 @@ + [Unit] + Description=Discard unused blocks once a week + Documentation=man:fstrim ++ConditionVirtualization=!container + + [Timer] + OnCalendar=weekly
  9. Download patch debian/util-linux.maintscript

    --- 2.34-0.1/debian/util-linux.maintscript 1970-01-01 00:00:00.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/util-linux.maintscript 2019-01-14 13:00:23.000000000 +0000 @@ -0,0 +1 @@ +rm_conffile /etc/cron.weekly/fstrim 2.31.1-0.4ubuntu1~
  10. Download patch debian/patches/series

    --- 2.34-0.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/patches/series 2020-01-08 19:03:19.000000000 +0000 @@ -0,0 +1,5 @@ +sulogin-fallback-static-sh.patch +sulogin-lockedpwd.patch +prevent-fstrim-inside-container.patch +umount-completion.patch +libblkid-xfs-log-check-for-reg-xfs-on-more-sectors.patch
  11. Download patch debian/patches/sulogin-lockedpwd.patch

    --- 2.34-0.1/debian/patches/sulogin-lockedpwd.patch 1970-01-01 00:00:00.000000000 +0000 +++ 2.34-0.1ubuntu5/debian/patches/sulogin-lockedpwd.patch 2019-01-14 13:00:23.000000000 +0000 @@ -0,0 +1,18 @@ +Description: Make sure file systems can be fixed on machines with locked root accounts (as Ubuntu does by default). Don't require --force for sulogin. +Author: Martin Pitt <martin.pitt@ubuntu.com> +Bug-Debian: https://bugs.debian.org/326678 + +Index: util-linux-2.33.1-0.1ubuntu1/login-utils/sulogin.c +=================================================================== +--- util-linux-2.33.1-0.1ubuntu1.orig/login-utils/sulogin.c ++++ util-linux-2.33.1-0.1ubuntu1/login-utils/sulogin.c +@@ -982,7 +982,8 @@ + const char *passwd = pwd->pw_passwd; + const char *answer; + int doshell = 0; +- int deny = !opt_e && locked_account_password(pwd->pw_passwd); ++ /* Ubuntu's root account is locked by default allow access without --force */ ++ int deny = 0; + + doprompt(passwd, con, deny); +
  1. util-linux