Skip to contentSkip to conversation

package/util-linux: bump version to 2.36

PATCH New Michael Fischer 2 participants 2 messages Sep 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/util-linux: bump version to 2.36

Drop patches 0001-0004: already applied upstream

---
 ...0001-blkdiscard-use-O_EXCL-add-force.patch |  86 --------
 ...d-fdisk_set_disklabel_id_from_string.patch | 195 ------------------
 ...k-add-disk-id-to-change-disk-UUID-ID.patch | 139 -------------
 .../0004-include-cleanup-pidfd-inckudes.patch |  40 ----
 package/util-linux/util-linux.hash            |   4 +-
 package/util-linux/util-linux.mk              |   5 +-
 6 files changed, 4 insertions(+), 465 deletions(-)
 delete mode 100644 package/util-linux/0001-blkdiscard-use-O_EXCL-add-force.patch
 delete mode 100644 package/util-linux/0002-libfdisk-add-fdisk_set_disklabel_id_from_string.patch
 delete mode 100644 package/util-linux/0003-sfdisk-add-disk-id-to-change-disk-UUID-ID.patch
 delete mode 100644 package/util-linux/0004-include-cleanup-pidfd-inckudes.patch
package/util-linux/0001-blkdiscard-use-O_EXCL-add-force.patch deleted +0 -86
deleted file mode 100644
index 0ecb867029..0000000000
@@ -1,86 +0,0 @@
-From 34fed3ff1740aded9c2aae6b5d67a4eb696f738e Mon Sep 17 00:00:00 2001
-From: Karel Zak <[email protected]>
-Date: Thu, 9 Jan 2020 11:03:51 +0100
-Subject: [PATCH] blkdiscard: use O_EXCL, add --force
-
-Let's make it more robust and safe. O_EXCL is an elegant way how to avoid
-unwanted discard on mounted device.
-
-Addresses: https://github.com/karelzak/util-linux/issues/915
-Signed-off-by: Karel Zak <[email protected]>
-Signed-off-by: Carlos Santos <[email protected]>
----
- sys-utils/blkdiscard.8 |  5 +++++
- sys-utils/blkdiscard.c | 11 ++++++++---
- 2 files changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/sys-utils/blkdiscard.8 b/sys-utils/blkdiscard.8
-index 1f3a32be9..98c6f36a9 100644
---- a/sys-utils/blkdiscard.8
-+++ b/sys-utils/blkdiscard.8
-@@ -36,6 +36,11 @@ MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
- optional, e.g., "K" has the same meaning as "KiB") or the suffixes
- KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
- .TP
-+.BR \-f , " \-\-force"
-+Disable all checking.  Since v2.36 the block device is open in exclusive mode (O_EXCL)
-+by default to avoid collision with mounted filesystem or another kernel subsystem.
-+The force option disables the exclusive access mode.
-+.TP
- .BR \-o , " \-\-offset \fIoffset"
- Byte offset into the device from which to start discarding.  The provided value
- will be aligned to the device sector size.  The default value is zero.
-diff --git a/sys-utils/blkdiscard.c b/sys-utils/blkdiscard.c
-index f9ba5e468..589974f9c 100644
---- a/sys-utils/blkdiscard.c
-+++ b/sys-utils/blkdiscard.c
-@@ -88,6 +88,7 @@ static void __attribute__((__noreturn__)) usage(void)
- 	fputs(_("Discard the content of sectors on a device.\n"), out);
- 
- 	fputs(USAGE_OPTIONS, out);
-+	fputs(_(" -f, --force         disable all checking\n"), out);
- 	fputs(_(" -o, --offset <num>  offset in bytes to discard from\n"), out);
- 	fputs(_(" -l, --length <num>  length of bytes to discard from the offset\n"), out);
- 	fputs(_(" -p, --step <num>    size of the discard iterations within the offset\n"), out);
-@@ -106,7 +107,7 @@ static void __attribute__((__noreturn__)) usage(void)
- int main(int argc, char **argv)
- {
- 	char *path;
--	int c, fd, verbose = 0, secsize;
-+	int c, fd, verbose = 0, secsize, force = 0;
- 	uint64_t end, blksize, step, range[2], stats[2];
- 	struct stat sb;
- 	struct timeval now, last;
-@@ -116,6 +117,7 @@ int main(int argc, char **argv)
- 	    { "help",      no_argument,       NULL, 'h' },
- 	    { "version",   no_argument,       NULL, 'V' },
- 	    { "offset",    required_argument, NULL, 'o' },
-+	    { "force",     no_argument,       NULL, 'f' },
- 	    { "length",    required_argument, NULL, 'l' },
- 	    { "step",      required_argument, NULL, 'p' },
- 	    { "secure",    no_argument,       NULL, 's' },
-@@ -133,8 +135,11 @@ int main(int argc, char **argv)
- 	range[1] = ULLONG_MAX;
- 	step = 0;
- 
--	while ((c = getopt_long(argc, argv, "hVsvo:l:p:z", longopts, NULL)) != -1) {
-+	while ((c = getopt_long(argc, argv, "hfVsvo:l:p:z", longopts, NULL)) != -1) {
- 		switch(c) {
-+		case 'f':
-+			force = 1;
-+			break;
- 		case 'l':
- 			range[1] = strtosize_or_err(optarg,
- 					_("failed to parse length"));
-@@ -176,7 +181,7 @@ int main(int argc, char **argv)
- 		errtryhelp(EXIT_FAILURE);
- 	}
- 
--	fd = open(path, O_WRONLY);
-+	fd = open(path, O_WRONLY | (force ? 0 : O_EXCL));
- 	if (fd < 0)
- 		err(EXIT_FAILURE, _("cannot open %s"), path);
- 
--- 
-2.18.2
-
package/util-linux/0002-libfdisk-add-fdisk_set_disklabel_id_from_string.patch deleted +0 -195

195 lines not on this page · raw message

package/util-linux/0003-sfdisk-add-disk-id-to-change-disk-UUID-ID.patch deleted +0 -139

139 lines not on this page · raw message

package/util-linux/0004-include-cleanup-pidfd-inckudes.patch deleted +0 -40
deleted file mode 100644
index 73f3118b0a..0000000000
@@ -1,40 +0,0 @@
-From 0a4035ff2e4fd5b5ae0cf8f8665696c2aff53b75 Mon Sep 17 00:00:00 2001
-From: Karel Zak <[email protected]>
-Date: Tue, 10 Mar 2020 11:43:16 +0100
-Subject: [PATCH] include: cleanup pidfd inckudes
-
-Signed-off-by: Karel Zak <[email protected]>
-Signed-off-by: Carlos Santos <[email protected]>
----
- include/pidfd-utils.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h
-index 0baedd2c9..4a6c3a604 100644
---- a/include/pidfd-utils.h
-+++ b/include/pidfd-utils.h
-@@ -3,10 +3,10 @@
- 
- #if defined(__linux__)
- # include <sys/syscall.h>
--# if defined(SYS_pidfd_send_signal)
-+# if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open)
- #  include <sys/types.h>
- 
--#  ifndef HAVE_PIDFD_OPEN
-+#  ifndef HAVE_PIDFD_SEND_SIGNAL
- static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
- 				    unsigned int flags)
- {
-@@ -14,7 +14,7 @@ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
- }
- #  endif
- 
--#  ifndef HAVE_PIDFD_SEND_SIGNAL
-+#  ifndef HAVE_PIDFD_OPEN
- static inline int pidfd_open(pid_t pid, unsigned int flags)
- {
- 	return syscall(SYS_pidfd_open, pid, flags);
--- 
-2.18.2
-
package/util-linux/util-linux.hash +2 -2
index 7f87dc9a17..fce97c4892 100644
@@ -1,5 +1,5 @@
-# From https://www.kernel.org/pub/linux/utils/util-linux/v2.35/sha256sums.asc
-sha256  21b7431e82f6bcd9441a01beeec3d57ed33ee948f8a5b41da577073c372eb58a  util-linux-2.35.2.tar.xz
+# From https://www.kernel.org/pub/linux/utils/util-linux/v2.36/sha256sums.asc
+sha256  9e4b1c67eb13b9b67feb32ae1dc0d50e08ce9e5d82e1cccd0ee771ad2fa9e0b1  util-linux-2.36.tar.xz
 # License files, locally calculated
 sha256  869660b5269f4f40a8a679da7f403ea3a6e71d46087aab5e14871b09bcb55955  README.licensing
 sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3-Clause
package/util-linux/util-linux.mk +2 -3
index 4356b2b569..fae952eb77 100644
@@ -7,9 +7,8 @@
 # When making changes to this file, please check if
 # util-linux-libs/util-linux-libs.mk needs to be updated accordingly as well.
 
-UTIL_LINUX_VERSION_MAJOR = 2.35
-UTIL_LINUX_VERSION_MINOR = 2
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).$(UTIL_LINUX_VERSION_MINOR)
+UTIL_LINUX_VERSION_MAJOR = 2.36
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
 UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
 UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
 
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 package/util-linux: bump version to 2.36

Quoted 15 lines · On Tue, 22 Sep 2020 16:47:31 +0200 Michael Fischer <[email protected]> wrote:

Drop patches 0001-0004: already applied upstream

---
 ...0001-blkdiscard-use-O_EXCL-add-force.patch |  86 --------
 ...d-fdisk_set_disklabel_id_from_string.patch | 195 ------------------
 ...k-add-disk-id-to-change-disk-UUID-ID.patch | 139 -------------
 .../0004-include-cleanup-pidfd-inckudes.patch |  40 ----
 package/util-linux/util-linux.hash            |   4 +-
 package/util-linux/util-linux.mk              |   5 +-
 6 files changed, 4 insertions(+), 465 deletions(-)
 delete mode 100644 package/util-linux/0001-blkdiscard-use-O_EXCL-add-force.patch
 delete mode 100644 package/util-linux/0002-libfdisk-add-fdisk_set_disklabel_id_from_string.patch
 delete mode 100644 package/util-linux/0003-sfdisk-add-disk-id-to-change-disk-UUID-ID.patch
 delete mode 100644 package/util-linux/0004-include-cleanup-pidfd-inckudes.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com