format patches

This commit is contained in:
openKylinBot 2022-05-14 03:14:50 +08:00
parent 809763df0a
commit e788c7535b
8 changed files with 83 additions and 132 deletions

View File

@ -1,6 +1,3 @@
Origin: upstream, https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=cd781c405be82540484da3bfe3d3f17a39b8eb5c
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1870316
Bug-Debian: https://bugs.debian.org/955559
From: J William Piggott <elseifthen@gmx.com>
Date: Fri, 21 Feb 2020 20:03:47 -0500
Subject: [PATCH] hwclock: make glibc 2.31 compatible
@ -46,13 +43,13 @@ for the set_system_clock() function was simplified.
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: J William Piggott <elseifthen@gmx.com>
---
sys-utils/hwclock.c | 71 +++++++++++++++++++++++----------------------
sys-utils/hwclock.c | 71 ++++++++++++++++++++++++++++-------------------------
1 file changed, 37 insertions(+), 34 deletions(-)
Index: util-linux-2.34/sys-utils/hwclock.c
===================================================================
--- util-linux-2.34.orig/sys-utils/hwclock.c
+++ util-linux-2.34/sys-utils/hwclock.c
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 95ce643..c39d680 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -638,28 +638,28 @@ display_time(struct timeval hwctime)
* tz.tz_minuteswest argument and sets PCIL (see below). At boot settimeofday(2)
* has one-shot access to this function as shown in the table below.
@ -95,7 +92,7 @@ Index: util-linux-2.34/sys-utils/hwclock.c
* +---------------------------------------------------------------------------+
* * only on first call after boot
*/
@@ -670,42 +670,45 @@ set_system_clock(const struct hwclock_co
@@ -670,42 +670,45 @@ set_system_clock(const struct hwclock_control *ctl,
struct tm broken;
int minuteswest;
int rc = 0;

View File

@ -1,10 +1,6 @@
Origin: upstream, https://github.com/karelzak/util-linux/commit/189edf1fe501ea39b35911337eab1740888fae7a
Bug: https://github.com/karelzak/util-linux/issues/966
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1865504
Bug-Debian: https://bugs.debian.org/953065
Author: Karel Zak <kzak@redhat.com>
Date: Thu Feb 27 14:04:55 2020 +0100
Description: hwclock reports incorrect status in audit message
From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Date: Sat, 14 May 2022 03:14:50 +0800
Subject: hwclock_fix_audit_status
hwclock: fix audit exit status
@ -14,10 +10,15 @@ Description: hwclock reports incorrect status in audit message
Addresses: https://github.com/karelzak/util-linux/issues/966
Signed-off-by: Karel Zak <kzak@redhat.com>
---
sys-utils/hwclock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index a2c5cc2..95ce643 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1442,7 +1442,7 @@ hwclock_exit(const struct hwclock_contro
@@ -1442,7 +1442,7 @@ hwclock_exit(const struct hwclock_control *ctl
if (ctl->hwaudit_on && !ctl->testing) {
audit_log_user_message(hwaudit_fd, AUDIT_USYS_CONFIG,
"op=change-system-time", NULL, NULL, NULL,

View File

@ -1,7 +1,3 @@
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
@ -20,83 +16,15 @@ 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(-)
diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c
index 99848f9..7e87020 100644
--- a/libblkid/src/superblocks/xfs.c
+++ b/libblkid/src/superblocks/xfs.c
@@ -252,11 +252,12 @@
@@ -252,11 +252,12 @@ static int probe_xfs_log(blkid_probe pr,
if (!buf)
return errno ? -errno : 1;

View File

@ -1,7 +1,3 @@
Origin: upstream, https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=e3bb9bfb76c17b1d05814436ced62c05c4011f48
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1862846
Bug-Debian: https://bugs.debian.org/951217
From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 27 Jun 2019 09:22:18 +0200
Subject: lsblk: force to print PKNAME for partition
@ -17,9 +13,11 @@ Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index e95af7a..3ce6da7 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -1019,6 +1019,9 @@
@@ -1019,6 +1019,9 @@ static void device_to_scols(
DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name));
ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name));

View File

@ -1,14 +1,16 @@
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
From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Date: Sat, 14 May 2022 03:14:50 +0800
Subject: 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#
@ -18,10 +20,15 @@ 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
---
sys-utils/fstrim.service.in | 1 +
sys-utils/fstrim.timer | 1 +
2 files changed, 2 insertions(+)
diff --git a/sys-utils/fstrim.service.in b/sys-utils/fstrim.service.in
index 516023e..c0090e1 100644
--- a/sys-utils/fstrim.service.in
+++ b/sys-utils/fstrim.service.in
@@ -1,6 +1,7 @@
[Unit]
Description=Discard unused blocks on filesystems from /etc/fstab
@ -30,10 +37,10 @@ Index: util-linux-2.34/sys-utils/fstrim.service.in
[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
diff --git a/sys-utils/fstrim.timer b/sys-utils/fstrim.timer
index 3a3762d..563dd45 100644
--- a/sys-utils/fstrim.timer
+++ b/sys-utils/fstrim.timer
@@ -1,6 +1,7 @@
[Unit]
Description=Discard unused blocks once a week

View File

@ -1,10 +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
From: Michael Vogt <michael.vogt@ubuntu.com>
Date: Sat, 14 May 2022 03:14:50 +0800
Subject: Add support for /bin/static-sh as fallback if the regular shell
fails to execute
Bug-Ubuntu: https://launchpad.net/bugs/505887
---
login-utils/sulogin.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 9091caf..2341cff 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -793,6 +793,11 @@
@@ -795,6 +795,11 @@ static void sushell(struct passwd *pwd)
xsetenv("SHELL", "/bin/sh", 1);
execl("/bin/sh", profile ? "-sh" : "sh", NULL);
warn(_("failed to execute %s"), "/bin/sh");

View File

@ -1,12 +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
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Sat, 14 May 2022 03:14:50 +0800
Subject: Make sure file systems can be fixed on machines with locked root
accounts (as Ubuntu does by default). Don't require --force for sulogin.
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 @@
Bug-Debian: https://bugs.debian.org/326678
---
login-utils/sulogin.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 2341cff..eb2c2a0 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -983,7 +983,8 @@ int main(int argc, char **argv)
const char *passwd = pwd->pw_passwd;
const char *answer;
int doshell = 0;

View File

@ -1,9 +1,15 @@
From: Étienne Mollier <etienne.mollier@mailoo.org>
From: =?utf-8?q?=C3=89tienne_Mollier?= <etienne.mollier@mailoo.org>
Date: Sat, 14 May 2022 03:14:50 +0800
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
---
bash-completion/umount | 61 ++++++++++++++++++++++++++++++--------------------
1 file changed, 37 insertions(+), 24 deletions(-)
diff --git a/bash-completion/umount b/bash-completion/umount
index 7fc2bd3..55d3102 100644
--- a/bash-completion/umount
+++ b/bash-completion/umount
@@ -1,3 +1,33 @@
+_umount_points_list()
+{
@ -38,7 +44,7 @@ diff -Naur a/bash-completion/umount b/bash-completion/umount
_umount_module()
{
local cur prev OPTS
@@ -48,28 +78,11 @@
@@ -48,28 +78,11 @@ _umount_module()
return 0
;;
esac