Skip to contentSkip to conversation

New util-linux-ng and running version of xfsprogs 3.1.3

Buildroot New Marcus Osdoba 2 participants 5 messages Sep 11, 2010 – Sep 13, 2010

lore
Share & tools
lore
#0 lore raw

Shortly I submitted patches for util-linux-ng and xfsprogs. Please feel free to test them and check the coding "standards" of br.

I read, that integrating util-linux-ng is one goal for further development. This patch would be a big step into this direction.

I reported an xfslib not found error some weeks ago (this was reported yesterday again - not by me). This xfsprogs 3.1.3 patch would resolve this newly reported issue, too.

Thanks and kind regards,
Marcus

#1 lore raw

PATCH 1/2 introducing util-linux-ng as replacement for util-linux

From: Marcus Osdoba <[email protected]>

mark util-linux as deprecated since next version (util-linux-ng) is available some basic components of utillinuxng can be switched of (--disable-<> in configure step) this patch uses version 2.17.2 of util-linux-ng

---
 package/Config.in                                  |    1 +
 ...0001-replace-bcopy-bzero-index-and-rindex.patch |  418 ++++++++++++++++++++
 .../0002-Allow-linking-with-uClibc.patch           |   26 ++
 package/util-linux-ng/Config.in                    |   47 +++
 package/util-linux-ng/util-linux-ng.mk             |   57 +++
 package/util-linux/Config.in                       |    1 +
 6 files changed, 550 insertions(+), 0 deletions(-)
 create mode 100644 package/util-linux-ng/0001-replace-bcopy-bzero-index-and-rindex.patch
 create mode 100644 package/util-linux-ng/0002-Allow-linking-with-uClibc.patch
 create mode 100644 package/util-linux-ng/Config.in
 create mode 100644 package/util-linux-ng/util-linux-ng.mk
package/Config.in +1 -0
index d60d8ef..a94e398 100644
@@ -472,6 +472,7 @@ source "package/psmisc/Config.in"
 source "package/sysklogd/Config.in"
 source "package/sysvinit/Config.in"
 source "package/util-linux/Config.in"
+source "package/util-linux-ng/Config.in"
 endif
 endmenu
 
package/util-linux-ng/0001-replace-bcopy-bzero-index-and-rindex.patch new file +418 -0

418 lines not on this page · raw message

package/util-linux-ng/0002-Allow-linking-with-uClibc.patch new file +26 -0
new file mode 100644
index 0000000..9c9eb12
@@ -0,0 +1,26 @@
+From 7973232b86fd16cbcee3bf5e743392c8a452d085 Mon Sep 17 00:00:00 2001
+From: Daniel Mierswa <impulze@...>
+Date: Mon, 17 Aug 2009 07:21:35 +0200
+Subject: [PATCH 2/2] Allow linking with uClibc
+
+uClibc uses lseek64 as llseek, so use it.
+---
+ shlibs/blkid/src/llseek.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/shlibs/blkid/src/llseek.c b/shlibs/blkid/src/llseek.c
+index 5bd0e51..75b7d24 100644
+--- a/shlibs/blkid/src/llseek.c
++++ b/shlibs/blkid/src/llseek.c
+@@ -30,7 +30,7 @@
+ 
+ #ifdef __linux__
+ 
+-#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
++#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE) || defined(__UCLIBC__)
+ 
+ #define my_llseek lseek64
+ 
+-- 
+1.6.4
+
package/util-linux-ng/Config.in new file +47 -0

47 lines not on this page · raw message

package/util-linux-ng/util-linux-ng.mk new file +57 -0

57 lines not on this page · raw message

package/util-linux/Config.in +1 -0
index 434dae9..00e9f88 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_UTIL-LINUX
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	depends on BR2_INET_RPC
+	depends on BR2_DEPRECATED
 	help
 	  Various useful/essential Linux utilities.
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH 1/2 introducing util-linux-ng as replacement for util-linux

Hello,

Quoted 3 lines · On Sat, 11 Sep 2010 10:54:38 +0200 Marcus Osdoba…

mark util-linux as deprecated since next version (util-linux-ng) is available some basic components of utillinuxng can be switched of (--disable-<> in configure step) this patch uses version 2.17.2 of util-linux-ng

Thanks for doing this !

Quoted 2 lines
 ...0001-replace-bcopy-bzero-index-and-rindex.patch |  418 ++++++++++++++++++++
 .../0002-Allow-linking-with-uClibc.patch           |   26 ++

Are those two patches submitted upstream ?

Quoted 7 lines
package/util-linux-ng/Config.in new file +4 -0
@@ -0,0 +1,47 @@
+config BR2_PACKAGE_UTIL_LINUX_NG
+	bool "util-linux-ng"
+	depends on (BR2_PROGRAM_INVOCATION && BR2_LARGEFILE)
+	help

package/util-linux-ng/Config.in line 14

Quoted 10 lines
package/util-linux-ng/Config.in new file +10 -0
+	  Fork of util-linux which consists of essential Linux utilities.
+
+	  Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc...
+	  http://userweb.kernel.org/~kzak/util-linux-ng/
+
+comment "util-linux-ng requires a toolchain with PROGRAM_INVOCATION support"
+	depends on !BR2_PROGRAM_INVOCATION
+
+comment "util-linux-ng requires a toolchain with LARGEFILE support"
+	depends on !BR2_LARGEFILE

The 'old' util-linux version also needed gettext when locale support was enabled. It isn't the case with this new version ?

package/util-linux-ng/Config.in line 23

Quoted 8 lines
package/util-linux-ng/Config.in new file +8 -0
+if BR2_PACKAGE_UTIL_LINUX_NG
+comment "utils selection"
+
+config BR2_PACKAGE_UTIL_LINUX_NG_LIBBLKID
+	bool "The library and tools for blkid support."
+	help
+	 This package provides the recent blkid support 
+	 (parallel versions exist in e2fsprogs and busybox)

Tab + 2 spaces before each line of the help text.

package/util-linux-ng/Config.in line 37

Quoted 13 lines
package/util-linux-ng/Config.in new file +13 -0
+
+config BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID
+	bool "The library and tools for uuid support."
+	help
+	 This package provides the recent uuid support 
+	 (parallel versions exist in e2fsprogs and busybox)
+
+config BR2_PACKAGE_UTIL_LINUX_NG_MOUNT_UTILS
+	bool "Devices mount/unmounting utilities"
+	depends on BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID && BR2_PACKAGE_UTIL_LINUX_NG_LIBBLKID
+	help
+	 This package contains utilities to mount/unmount devices.
+	 Also provided by busybox.

So, shouldn't it be hidden when BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is no ?

package/util-linux-ng/Config.in line 44

Quoted 6 lines
package/util-linux-ng/Config.in new file +6 -0
+config BR2_PACKAGE_UTIL_LINUX_NG_FSCK
+	bool "Filesystem check"
+	depends on BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID && BR2_PACKAGE_UTIL_LINUX_NG_LIBBLKID
+	help
+	 Linux mainstream filesystem check.
+	 Also provided by busybox.

Ditto.

package/util-linux-ng/Config.in

Quoted 7 lines
package/util-linux-ng/Config.in new file +7 -0
+#############################################################
+#
+# UTIL_LINUX_NG
+#
+#############################################################
+UTIL_LINUX_NG_VERSION=2.17.2
+UTIL_LINUX_NG_MAJORVERSION=2.17

Minor thing:

UTIL_LINUX_NG_VERSION=$(UTIL_LINUX_NG_MAJORVERSION).2

package/util-linux-ng/Config.in

Quoted 9 lines
package/util-linux-ng/Config.in new file +9 -0
+UTIL_LINUX_NG_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/util-linux-ng/v$(UTIL_LINUX_NG_MAJORVERSION)
+UTIL_LINUX_NG_SOURCE=util-linux-ng-$(UTIL_LINUX_NG_VERSION).tar.bz2
+#UTIL_LINUX_NG_INSTALL_STAGING = YES
+UTIL_LINUX_NG_CONF_OPT=--disable-use-tty-group \
+                       --enable-shared \
+                       --without-libiconv-prefix \
+                       --without-libintl-prefix \
+                       --disable-rpath \
+                       --disable-nls \

Not needed, the options already contains $(DISABLE_NLS), which will contain the right value depending on whether we want NLS support or not.

package/util-linux-ng/Config.in

Quoted 5 lines
package/util-linux-ng/Config.in new file +5 -0
+                       --disable-schedutils \
+                       --disable-doc
+
+UTIL_LINUX_NG_DEPENDENCIES=e2fsprogs
+UTIL_LINUX_NG_LIBTOOL_PATCH = NO

Minor: please be consistent with regard to the spaces. Either no spaces before and after =, or spaces before and after. My preference is for having spaces, but that's just my own.

package/util-linux-ng/Config.in

Quoted 8 lines
package/util-linux-ng/Config.in new file +8 -0
+# make util-linux-ng win over links to busybox binary
+ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+  UTIL_LINUX_NG_DEPENDENCIES+=busybox
+endif
+
+ifeq ($(BR2_PACKAGE_NCURSES),y)
+  ifneq ($(BR2_USE_WCHAR),y)
+    UTIL_LINUX_NG_CONF_OPT+=--with-ncurses

Sounds strange. When wide char is not available, you need to enable ncurses ? Why ?

It also lacks:

UTIL_LINUX_NG_DEPENDENCIES += curses

The rest seems ok to me.

Thanks again!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/2 introducing util-linux-ng as replacement for util-linux

Am 11.09.2010 19:01, schrieb Thomas Petazzoni:

Quoted 4 lines
Quoted 3 lines
  ...0001-replace-bcopy-bzero-index-and-rindex.patch |  418 ++++++++++++++++++++
  .../0002-Allow-linking-with-uClibc.patch           |   26 ++

Are those two patches submitted upstream ?

You are right. They went upstream 2009. I will remove these patches for the next review round.

Quoted 11 lines
Quoted 11 lines
package/util-linux-ng/Config.in new file +8 -0
@@ -0,0 +1,47 @@
+config BR2_PACKAGE_UTIL_LINUX_NG
+	bool "util-linux-ng"
+	depends on (BR2_PROGRAM_INVOCATION&&  BR2_LARGEFILE)
+	help
+	  Fork of util-linux which consists of essential Linux utilities.
+
+	  Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc...
+	  http://userweb.kernel.org/~kzak/util-linux-ng/
Quoted 8 lines

package/util-linux-ng/Config.in line 14

Quoted 6 lines
package/util-linux-ng/Config.in new file +6 -0
+
+comment "util-linux-ng requires a toolchain with PROGRAM_INVOCATION support"
+	depends on !BR2_PROGRAM_INVOCATION
+
+comment "util-linux-ng requires a toolchain with LARGEFILE support"
+	depends on !BR2_LARGEFILE

The 'old' util-linux version also needed gettext when locale support was enabled. It isn't the case with this new version ?

I read that disable-nls removes all gettext dependancy. To avoid some trouble I disabled it for the first version.
Let me know if you like to have the nls option in the introductory version. I guess activating it if BR2_LOCALE and BR2_GETTEXT is set is the right way.
I think nls is not that important in embedded environments. It just used to function. That's way I look at this with prio 2.

Quoted 9 lines

package/util-linux-ng/Config.in line 23

Quoted 8 lines
package/util-linux-ng/Config.in new file +8 -0
+if BR2_PACKAGE_UTIL_LINUX_NG
+comment "utils selection"
+
+config BR2_PACKAGE_UTIL_LINUX_NG_LIBBLKID
+	bool "The library and tools for blkid support."
+	help
+	 This package provides the recent blkid support
+	 (parallel versions exist in e2fsprogs and busybox)

Tab + 2 spaces before each line of the help text.

Acked.

Quoted 6 lines
Quoted 6 lines
package/util-linux-ng/Config.in new file +6 -0
+
+config BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID
+	bool "The library and tools for uuid support."
+	help
+	 This package provides the recent uuid support
+	 (parallel versions exist in e2fsprogs and busybox)
Quoted 8 lines

package/util-linux-ng/Config.in line 37

Quoted 7 lines
package/util-linux-ng/Config.in new file +7 -0
+
+config BR2_PACKAGE_UTIL_LINUX_NG_MOUNT_UTILS
+	bool "Devices mount/unmounting utilities"
+	depends on BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID&&  BR2_PACKAGE_UTIL_LINUX_NG_LIBBLKID
+	help
+	 This package contains utilities to mount/unmount devices.
+	 Also provided by busybox.

So, shouldn't it be hidden when BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is no ?

I don't think so. Maybe someone likes to compare the busybox vs. the "mainstream" version. So you should be able to install both. The busybox binary still can be launched with the applet parameter to be behave like mount. That's why I added the comment. In fact it is only visibible when BUSYBOX_SHOW_OTHERS is true. So the user should know, that he gains some redundancy if busybox remains enabled. The same for LIBUUID. But this is a library, so maybe it's better here to forbid installing both. Let me know.

Quoted 11 lines

package/util-linux-ng/Config.in line 42

Quoted 8 lines
package/util-linux-ng/Config.in new file +7 -0
+#############################################################
+#
+# UTIL_LINUX_NG
+#
+#############################################################
+UTIL_LINUX_NG_VERSION=2.17.2
+UTIL_LINUX_NG_MAJORVERSION=2.17

Minor thing:

UTIL_LINUX_NG_VERSION=$(UTIL_LINUX_NG_MAJORVERSION).2

Acked.

Quoted 11 lines

package/util-linux-ng/Config.in

Quoted 9 lines
package/util-linux-ng/Config.in new file +9 -0
+UTIL_LINUX_NG_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/util-linux-ng/v$(UTIL_LINUX_NG_MAJORVERSION)
+UTIL_LINUX_NG_SOURCE=util-linux-ng-$(UTIL_LINUX_NG_VERSION).tar.bz2
+#UTIL_LINUX_NG_INSTALL_STAGING = YES
+UTIL_LINUX_NG_CONF_OPT=--disable-use-tty-group \
+                       --enable-shared \
+                       --without-libiconv-prefix \
+                       --without-libintl-prefix \
+                       --disable-rpath \
+                       --disable-nls \

Not needed, the options already contains $(DISABLE_NLS), which will contain the right value depending on whether we want NLS support or not.

See comment above. I read somewhere that disable nls removes need for gettext.
I will cross check this.

Quoted 8 lines

package/util-linux-ng/Config.in

Quoted 5 lines
package/util-linux-ng/Config.in new file +5 -0
+                       --disable-schedutils \
+                       --disable-doc
+
+UTIL_LINUX_NG_DEPENDENCIES=e2fsprogs
+UTIL_LINUX_NG_LIBTOOL_PATCH = NO

Minor: please be consistent with regard to the spaces. Either no spaces before and after =, or spaces before and after. My preference is for having spaces, but that's just my own.

Acked - if you accept indents in if-blocks ;-)

Quoted 11 lines

package/util-linux-ng/Config.in

Quoted 8 lines
package/util-linux-ng/Config.in new file +8 -0
+# make util-linux-ng win over links to busybox binary
+ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+  UTIL_LINUX_NG_DEPENDENCIES+=busybox
+endif
+
+ifeq ($(BR2_PACKAGE_NCURSES),y)
+  ifneq ($(BR2_USE_WCHAR),y)
+    UTIL_LINUX_NG_CONF_OPT+=--with-ncurses

Sounds strange. When wide char is not available, you need to enable ncurses ? Why ?

Quoted 3 lines

It also lacks:

UTIL_LINUX_NG_DEPENDENCIES += curses

Honestly, I dont't know. I took the original dependancy introduced by Daniel Mierswa:
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/16587/match=util+linux+ng
I'll will change (and test) to just activate ncurses --with-ncurses when BR_NCURSES is available. Which sounds more logical now...

Quoted 3 lines

The rest seems ok to me.

Thanks again!

No problem. I needed this for xfsprogs. Feel free to review this patch, too ;-)

Regards,
Marcus

#4 lore raw

PATCH 2/2 updated xfsprogs to 3.1.3 which depends on libuuid (either provided by e2fsprogs or util-linux-ng)

In reply to Marcus Osdoba

From: Marcus Osdoba <[email protected]>

development notes:
- make sure not to use lib64 and
show way how to integrate gettext with BR2 dependencies;
- shared libs patch is not neccessary for usage on target (tested positive with armv5te)
- the libuuid of e2fsprogs runs fine with xfsprogs, too;
it is possible to run xfsprogs with libuuid from e2fsprogs xor util-linux-ng;

---
 package/util-linux-ng/Config.in        |    3 +
 package/util-linux-ng/util-linux-ng.mk |    7 +-
 package/xfsprogs/Config.in             |    8 ++-
 package/xfsprogs/xfsprogs.mk           |  118 ++++++++------------------------
 4 files changed, 40 insertions(+), 96 deletions(-)
package/util-linux-ng/Config.in +3 -0
index d516873..8a56151 100644
@@ -13,6 +13,9 @@ comment "util-linux-ng requires a toolchain with PROGRAM_INVOCATION support"
 comment "util-linux-ng requires a toolchain with LARGEFILE support"
 	depends on !BR2_LARGEFILE
 
+comment "UUID library support already activated outside util-linux-ng"
+	depends on ( BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID && BR2_PACKAGE_E2FSPROGS_LIBUUID )
+
 if BR2_PACKAGE_UTIL_LINUX_NG
 comment "utils selection"
 
package/util-linux-ng/util-linux-ng.mk +4 -3
index 4ea2bbe..7cb1b89 100644
@@ -7,7 +7,6 @@ UTIL_LINUX_NG_VERSION=2.17.2
 UTIL_LINUX_NG_MAJORVERSION=2.17
 UTIL_LINUX_NG_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/util-linux-ng/v$(UTIL_LINUX_NG_MAJORVERSION)
 UTIL_LINUX_NG_SOURCE=util-linux-ng-$(UTIL_LINUX_NG_VERSION).tar.bz2
-#UTIL_LINUX_NG_INSTALL_STAGING = YES
 UTIL_LINUX_NG_CONF_OPT=--disable-use-tty-group \
                        --enable-shared \
                        --without-libiconv-prefix \
@@ -16,10 +15,12 @@ UTIL_LINUX_NG_CONF_OPT=--disable-use-tty-group \
                        --disable-nls \
                        --disable-schedutils \
                        --disable-doc
-
-UTIL_LINUX_NG_DEPENDENCIES=e2fsprogs
 UTIL_LINUX_NG_LIBTOOL_PATCH = NO
 
+ifeq ($(BR2_PACKAGE_E2FSPROGS),y)
+  UTIL_LINUX_NG_DEPENDENCIES=e2fsprogs
+endif
+
 # make util-linux-ng win over links to busybox binary
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
   UTIL_LINUX_NG_DEPENDENCIES+=busybox
package/xfsprogs/Config.in +5 -3
index 12bc69e..7233cf9 100644
@@ -3,13 +3,15 @@ comment "Note that xfsprogs needs a toolchain with UCLIBC_SV4_DEPRECATED and UCL
 	depends on BR2_PACKAGE_XFSPROGS
 
 comment "xfsprogs requires a toolchain with LARGEFILE support"
-        depends on !BR2_LARGEFILE
+	depends on !BR2_LARGEFILE
+
+comment "xfsprogs requires at least on UUID library (from e2fsprogs or from util-linux-ng)"
+	depends on !( BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID || BR2_PACKAGE_E2FSPROGS_LIBUUID )
 
 config BR2_PACKAGE_XFSPROGS
 	bool "xfsprogs"
 	depends on BR2_LARGEFILE
-	select BR2_PACKAGE_E2FSPROGS
-	select BR2_PACKAGE_E2FSPROGS_LIBUUID
+	depends on ( BR2_PACKAGE_UTIL_LINUX_NG_LIBUUID || BR2_PACKAGE_E2FSPROGS_LIBUUID )
 	help
 	  The XFS file system utilities and libraries
 
package/xfsprogs/xfsprogs.mk +28 -90

124 lines not on this page · raw message

Signature · 1 line
1.7.1