util-linux: update to 2.24.1

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 40010
This commit is contained in:
Luka Perkov 2014-03-24 00:19:44 +00:00
parent deec514607
commit bf98d81259
5 changed files with 113 additions and 110 deletions

View file

@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2012 OpenWrt.org
# Copyright (C) 2007-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=util-linux
PKG_VERSION:=2.21.2
PKG_RELEASE:=2
PKG_VERSION:=2.24.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.21
PKG_MD5SUM:=54ba880f1d66782c2287ee2c898520e9
PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.24
PKG_MD5SUM:=88d46ae23ca599ac5af9cf96b531590f
PKG_LICENSE:=GPLv2 LGPLv2.1 BSD-3c
PKG_LICENSE_FILES:=COPYING getopt/COPYING libblkid/COPYING libmount/COPYING Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.LGPLv2.1 libuuid/COPYING Documentation/licenses/COPYING.BSD-3
@ -33,7 +33,6 @@ endef
CONFIGURE_ARGS += \
--enable-new-mount \
--with-ncurses \
--disable-nls \
--disable-tls \
--without-udev
@ -58,9 +57,9 @@ define Build/InstallDev
$(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.{a,so*} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.{a,so*} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.{a,so*} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/.libs/libblkid.{a,so*} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/.libs/libmount.{a,so*} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/.libs/libuuid.{a,so*} $(1)/usr/lib
endef
define Package/libblkid
@ -405,158 +404,158 @@ endef
define Package/libblkid/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so.* $(1)/usr/lib/
endef
define Package/libmount/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/.libs/libmount.so.* $(1)/usr/lib/
endef
define Package/libuuid/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so.* $(1)/usr/lib/
endef
define Package/agetty/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
endef
define Package/blkid/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
endef
define Package/cal/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
endef
define Package/cfdisk/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
endef
define Package/fdisk/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
endef
define Package/findfs/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
endef
define Package/flock/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
endef
define Package/getopt/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
endef
define Package/hwclock/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
endef
define Package/logger/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
endef
define Package/look/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
endef
define Package/losetup/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/losetup $(1)/usr/sbin/
endef
define Package/lsblk/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
endef
define Package/mcookie/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
endef
define Package/mount-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
endef
define Package/namei/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
endef
define Package/rename/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
endef
define Package/partx-utils/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
endef
define Package/script-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
endef
define Package/setterm/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
endef
define Package/sfdisk/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
endef
define Package/swap-utils/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
endef
define Package/uuidd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
endef
define Package/uuidgen/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
endef
define Package/wall/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
endef
define Package/whereis/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
endef
define Package/wipefs/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,libblkid))

View file

@ -1,44 +0,0 @@
--- a/misc-utils/cal.c
+++ b/misc-utils/cal.c
@@ -291,41 +291,6 @@ main(int argc, char **argv) {
}
#endif
-/*
- * The traditional Unix cal utility starts the week at Sunday,
- * while ISO 8601 starts at Monday. We read the start day from
- * the locale database, which can be overridden with the
- * -s (Sunday) or -m (Monday) options.
- */
-#if HAVE_DECL__NL_TIME_WEEK_1STDAY
- /*
- * You need to use 2 locale variables to get the first day of the week.
- * This is needed to support first_weekday=2 and first_workday=1 for
- * the rare case where working days span across 2 weeks.
- * This shell script shows the combinations and calculations involved:
- *
- * for LANG in en_US ru_RU fr_FR csb_PL POSIX; do
- * printf "%s:\t%s + %s -1 = " $LANG $(locale week-1stday first_weekday)
- * date -d"$(locale week-1stday) +$(($(locale first_weekday)-1))day" +%w
- * done
- *
- * en_US: 19971130 + 1 -1 = 0 #0 = sunday
- * ru_RU: 19971130 + 2 -1 = 1
- * fr_FR: 19971201 + 1 -1 = 1
- * csb_PL: 19971201 + 2 -1 = 2
- * POSIX: 19971201 + 7 -1 = 0
- */
- {
- int wfd;
- union { unsigned int word; char *string; } val;
- val.string = nl_langinfo(_NL_TIME_WEEK_1STDAY);
-
- wfd = val.word;
- wfd = day_in_week(wfd % 100, (wfd / 100) % 100, wfd / (100 * 100));
- weekstart = (wfd + *nl_langinfo(_NL_TIME_FIRST_WEEKDAY) - 1) % 7;
- }
-#endif
-
yflag = 0;
while ((ch = getopt_long(argc, argv, "13mjsyVh", longopts, NULL)) != -1)
switch(ch) {

View file

@ -1,17 +1,13 @@
for systems that don't support latest POSIX standard: %as
https://bugs.gentoo.org/406303
--- a/configure.ac
+++ b/configure.ac
@@ -688,7 +688,6 @@ AC_ARG_ENABLE([libmount],
@@ -769,7 +769,6 @@ AC_ARG_ENABLE([libmount],
UL_BUILD_INIT([libmount])
UL_REQUIRES_LINUX([libmount])
UL_REQUIRES_BUILD([libmount], [libblkid])
-UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes])
AC_SUBST([LIBMOUNT_VERSION])
--- a/libmount/src/tab_parse.c
+++ b/libmount/src/tab_parse.c
@@ -22,6 +22,10 @@
@ -90,7 +86,7 @@ https://bugs.gentoo.org/406303
&end);
if (rc >= 7 && end > 0)
@@ -167,9 +202,15 @@ static int mnt_parse_mountinfo_line(stru
@@ -169,9 +204,15 @@ static int mnt_parse_mountinfo_line(stru
UL_SCNsA" " /* (9) source */
UL_SCNsA, /* (10) fs options (fs specific) */

View file

@ -1,13 +0,0 @@
Index: util-linux-2.21.2/libblkid/src/superblocks/swap.c
===================================================================
--- util-linux-2.21.2.orig/libblkid/src/superblocks/swap.c 2012-05-15 13:51:45.814410455 +0200
+++ util-linux-2.21.2/libblkid/src/superblocks/swap.c 2013-06-12 23:23:03.270742199 +0200
@@ -48,7 +48,7 @@
/* SWAPSPACE2 - check for wrong version or zeroed pagecount */
if (strcmp(version, "2") == 0 &&
- (hdr->version != 1 || hdr->lastpage == 0))
+ ((hdr->version != 1 && swab32(hdr->version) != 1) || hdr->lastpage == 0))
return -1;
/* arbitrary sanity check.. is there any garbage down there? */

View file

@ -0,0 +1,65 @@
Support older hosts with latest util-linux-native
mkostemp is not defined on older machines. So we detect this and
provide a define that uses mkstemp instead.
O_CLOEXEC is not defined on older machines. It is however defined
in the 'c.h' header. Fix up the users to include 'c.h'.
fdisks/fdisksunlabel.c was modified to use qsort_r, however
this is not defined on older hosts. Revert:
commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
fdisk: (sun): use ask API, remove global variable
Upstream-Status: Inappropriate [other]
Patches revert upstream changes in order to support older
machines.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
--- a/configure.ac
+++ b/configure.ac
@@ -299,6 +299,7 @@ AC_CHECK_FUNCS([ \
llseek \
lseek64 \
mempcpy \
+ mkostemp \
nanosleep \
personality \
posix_fadvise \
--- a/include/c.h
+++ b/include/c.h
@@ -236,6 +236,13 @@ static inline int dirfd(DIR *d)
#endif
/*
+ * mkostemp replacement
+ */
+#ifndef HAVE_MKOSTEMP
+#define mkostemp(template, flags) mkstemp(template)
+#endif
+
+/*
* MAXHOSTNAMELEN replacement
*/
static inline size_t get_hostname_max(void)
--- a/lib/randutils.c
+++ b/lib/randutils.c
@@ -16,6 +16,7 @@
#include <sys/syscall.h>
#include "randutils.h"
+#include "c.h"
#ifdef HAVE_TLS
#define THREAD_LOCAL static __thread
--- a/lib/wholedisk.c
+++ b/lib/wholedisk.c
@@ -10,6 +10,7 @@
#include "blkdev.h"
#include "wholedisk.h"
+#include "c.h"
int is_whole_disk_fd(int fd, const char *name)
{