mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
util-linux: Update to 2.23
Remove license patch as it is integrated upstream. Add backports of upstream loopdev regression fixes. Updated uclibc-__progname-conflict.patch because it didn't apply. Added bash-completion and partx sub-packages. (From OE-Core rev: 54629315502247c5751c351b5792838f86dd1ea8) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
fe715c4d1b
commit
bd85102951
@@ -0,0 +1,60 @@
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Jonathan Liu <net147@gmail.com>
|
||||
|
||||
From e3b6cb87e0ba1304fa07ec316784de1c6243b28e Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Mon, 13 May 2013 10:54:41 +0200
|
||||
Subject: [PATCH] lib/loopdev: fix loopcxt_check_size() to work with blkdevs
|
||||
|
||||
The loopcxt_check_size() is workaround for kernels < v3.9, kernel has
|
||||
been fixed by commit 541c742a7559eb65f0e36d3e2338c2ca532a3e61.
|
||||
|
||||
The function sets loopdev size according to backing file size. The
|
||||
problem is that the backing file could be a block device where
|
||||
stat.st_size is zero, so we have to use blkdev_get_size() for block
|
||||
devices.
|
||||
|
||||
Addresses: https://bugs.archlinux.org/task/35193
|
||||
Reported-by: Dave Reisner <d@falconindy.com>
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
lib/loopdev.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/loopdev.c b/lib/loopdev.c
|
||||
index c35e306..3b65b5d 100644
|
||||
--- a/lib/loopdev.c
|
||||
+++ b/lib/loopdev.c
|
||||
@@ -1097,7 +1097,17 @@ static int loopcxt_check_size(struct loopdev_cxt *lc, int file_fd)
|
||||
if (fstat(file_fd, &st))
|
||||
return -errno;
|
||||
|
||||
- expected_size = st.st_size;
|
||||
+ if (S_ISBLK(st.st_mode)) {
|
||||
+ if (blkdev_get_size(file_fd,
|
||||
+ (unsigned long long *) &expected_size))
|
||||
+ return -errno;
|
||||
+ } else
|
||||
+ expected_size = st.st_size;
|
||||
+
|
||||
+ if (expected_size == 0 || expected_size <= lc->info.lo_offset) {
|
||||
+ DBG(lc, loopdev_debug("failed to determine expected size"));
|
||||
+ return 0; /* ignore this error */
|
||||
+ }
|
||||
|
||||
if (lc->info.lo_offset > 0)
|
||||
expected_size -= lc->info.lo_offset;
|
||||
@@ -1113,6 +1123,10 @@ static int loopcxt_check_size(struct loopdev_cxt *lc, int file_fd)
|
||||
return -errno;
|
||||
|
||||
if (expected_size != size) {
|
||||
+ DBG(lc, loopdev_debug("warning: loopdev and expected "
|
||||
+ "size dismatch (%ju/%ju)",
|
||||
+ size, expected_size));
|
||||
+
|
||||
if (loopcxt_set_capacity(lc)) {
|
||||
/* ioctl not available */
|
||||
if (errno == ENOTTY || errno == EINVAL)
|
||||
--
|
||||
1.8.2.3
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Jonathan Liu <net147@gmail.com>
|
||||
|
||||
From b048b8af3a5568c90f6e0c2d56f6cb399dedb0d1 Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Mon, 13 May 2013 11:00:47 +0200
|
||||
Subject: [PATCH] losetup: use warn_size() for regular files only
|
||||
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
sys-utils/losetup.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
|
||||
index ccf120e..b44c9e5 100644
|
||||
--- a/sys-utils/losetup.c
|
||||
+++ b/sys-utils/losetup.c
|
||||
@@ -380,7 +380,7 @@ static void warn_size(const char *filename, uint64_t size)
|
||||
struct stat st;
|
||||
|
||||
if (!size) {
|
||||
- if (stat(filename, &st))
|
||||
+ if (stat(filename, &st) || S_ISBLK(st.st_mode))
|
||||
return;
|
||||
size = st.st_size;
|
||||
}
|
||||
--
|
||||
1.8.2.3
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||
|
||||
Notes from Pdraig (via email) :
|
||||
|
||||
Actually LGPLv2+ is most appropriate for that.
|
||||
The intent is that it's licensed under the LGPL anyway:
|
||||
|
||||
$ gnulib/gnulib-tool --local-dir gl --extract-license mbsalign
|
||||
LGPL
|
||||
|
||||
When extracting this to util-linux I should have adjusted
|
||||
the boilerplate default license in the file (which gnulib-tool
|
||||
can do on import).
|
||||
|
||||
|
||||
From 16d8546964db1f6a27ae0f1d1cd24ce42704111d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Fri, 15 Mar 2013 09:48:37 +0000
|
||||
Subject: [PATCH] lib/mbsalign: correct license header from GPLv[23] to
|
||||
LGPLv2+
|
||||
|
||||
* lib/mbsalign.c: s/GPLv3/LGPLv2+/
|
||||
* include/mbsalign.h: s/GPLv2/LGPLv2+/
|
||||
* README.licensing: Remove mention GPLv3 as it's not actually used.
|
||||
---
|
||||
README.licensing | 2 --
|
||||
include/mbsalign.h | 4 ++--
|
||||
lib/mbsalign.c | 4 ++--
|
||||
3 files changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/README.licensing b/README.licensing
|
||||
index b29883c..ab60004 100644
|
||||
--- a/README.licensing
|
||||
+++ b/README.licensing
|
||||
@@ -2,8 +2,6 @@
|
||||
The project util-linux doesn't use the same license for all of the code.
|
||||
There is code under:
|
||||
|
||||
- * GPLv3+ (GNU General Public License version 3, or any later version)
|
||||
-
|
||||
* GPLv2+ (GNU General Public License version 2, or any later version)
|
||||
|
||||
* GPLv2 (GNU General Public License version 2)
|
||||
diff --git a/include/mbsalign.h b/include/mbsalign.h
|
||||
index fd957b3..8c9f2db 100644
|
||||
--- a/include/mbsalign.h
|
||||
+++ b/include/mbsalign.h
|
||||
@@ -2,8 +2,8 @@
|
||||
Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
+ it under the terms of the GNU Lesser General Public License as published by
|
||||
+ the Free Software Foundation, either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
diff --git a/lib/mbsalign.c b/lib/mbsalign.c
|
||||
index d97bbd5..05c4650 100644
|
||||
--- a/lib/mbsalign.c
|
||||
+++ b/lib/mbsalign.c
|
||||
@@ -2,8 +2,8 @@
|
||||
Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
||||
|
||||
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 3 of the License, or
|
||||
+ it under the terms of the GNU Lesser General Public License as published by
|
||||
+ the Free Software Foundation, either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
--
|
||||
1.7.7.6
|
||||
|
||||
@@ -14,6 +14,7 @@ make[3]: *** [cache.lo] Error 1
|
||||
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Jonathan Liu <net147@gmail.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
Index: util-linux-2.22.1/configure.ac
|
||||
@@ -22,10 +23,10 @@ Index: util-linux-2.22.1/configure.ac
|
||||
+++ util-linux-2.22.1/configure.ac
|
||||
@@ -372,7 +372,7 @@ esac
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether program_invocation_short_name is defined)
|
||||
-AC_TRY_COMPILE([#include <argp.h>],
|
||||
+AC_TRY_COMPILE([#include <errno.h>],
|
||||
[program_invocation_short_name = "test";],
|
||||
AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1,
|
||||
[Define if program_invocation_short_name is defined])
|
||||
AC_MSG_CHECKING([whether program_invocation_short_name is defined])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
- #include <argp.h>
|
||||
+ #include <errno.h>
|
||||
]], [[
|
||||
program_invocation_short_name = "test";
|
||||
]])], [
|
||||
|
||||
Reference in New Issue
Block a user