Skip to contentSkip to conversation

systemd-211 upgrade and uclibc fixes

PATCH In review Khem Raj 5 participants 22 messages Mar 16, 2014 – Mar 26, 2014

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

cover systemd-211 upgrade and uclibc fixes

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

 meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch   |  20 ++
 meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb      |   1 +
 ...1-uClibc-doesn-t-implement-pwritev-preadv.patch |  15 +-
 .../systemd-pam-configure-check-uclibc.patch       |  25 +-
 .../systemd/systemd/systemd-pam-fix-execvpe.patch  |  22 +-
 .../systemd/systemd-pam-fix-fallocate.patch        |  16 +-
 .../systemd/systemd-pam-fix-getty-unit.patch       |  20 +-
 .../systemd/systemd/systemd-pam-fix-mkostemp.patch | 166 +---------
 .../systemd/systemd/systemd-pam-fix-msformat.patch | 348 ---------------------
 .../systemd/systemd/uclibc-get-physmem.patch       |  37 +++
 .../systemd/systemd/uclibc-sysinfo_h.patch         |  19 ++
 .../systemd/{systemd_208.bb => systemd_211.bb}     |  31 +-
 meta/recipes-core/uclibc/uclibc-git.inc            |   3 +-
 .../0004-Add-clock_adjtime-syscall.patch           |  73 +++++
 meta/recipes-core/uclibc/uclibc.inc                |   3 +-
 meta/recipes-core/util-linux/util-linux_2.24.1.bb  |   3 +-
 .../intltool/intltool-0.50.2/uclibc.patch          |  19 ++
 meta/recipes-devtools/intltool/intltool_0.50.2.bb  |   1 +
 meta/recipes-support/gnutls/gnutls.inc             |   2 +
 19 files changed, 258 insertions(+), 566 deletions(-)
 create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
 create mode 100644 meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch
 create mode 100644 meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch
 rename meta/recipes-core/systemd/{systemd_208.bb => systemd_211.bb} (93%)
 create mode 100644 meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
 create mode 100644 meta/recipes-devtools/intltool/intltool-0.50.2/uclibc.patch
Signature · 1 line
1.9.0
author
#1 lore raw

PATCH 1/7 uclibc: Implement clock_adjtime()

systemd needs it
Also update to latest master

---
 meta/recipes-core/uclibc/uclibc-git.inc            |  3 +-
 .../0004-Add-clock_adjtime-syscall.patch           | 73 ++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
meta/recipes-core/uclibc/uclibc-git.inc +2 -1
index 3c8e47c..0649aca 100644
@@ -1,4 +1,4 @@
-SRCREV="19f21a1d974d802f05c43e4cabd6ed6891a8ae50"
+SRCREV="5eddde8f094ef52dca06695cc598e3b2556dcccb"
 
 PV = "0.9.33+git${SRCPV}"
 
@@ -24,5 +24,6 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
 	file://0001-Add-eventfd_read-and-eventfd_write.patch \
 	file://0002-wire-setns-syscall.patch \
 	file://0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch \
+        file://0004-Add-clock_adjtime-syscall.patch \ 
 	"
 S = "${WORKDIR}/git"
meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
1.9.0
author
#2 lore raw

PATCH 2/7 uclibc: Remove iconv.h

We get it from libiconv on uclibc anyway no need to transplant uclibc one

---
 meta/recipes-core/uclibc/uclibc.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/uclibc/uclibc.inc +2 -1
index e2de53c..e00de62 100644
@@ -155,7 +155,8 @@ do_configure() {
 }
 
 do_install() {
-        oe_runmake PREFIX=${D} install
+	oe_runmake PREFIX=${D} install
+	rm -rf ${D}${includedir}/iconv.h
 }
 
 # build ldd, ldconfig and friends but only for full uclibc
Signature · 1 line
1.9.0
author
#3 lore raw

PATCH 3/7 gnutls: Link in pthread explicitly for uclibc

In reply to Khem Raj

Otherwise we end up with missing symbols from libpthread

---
 meta/recipes-support/gnutls/gnutls.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/gnutls/gnutls.inc +2 -0
index 39aaec1..25ec3a6 100644
@@ -44,4 +44,6 @@ FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
 FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
 FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
 
+LDFLAGS_append_libc-uclibc += " -pthread"
+
 BBCLASSEXTEND = "native"
Signature · 1 line
1.9.0
author
#4 lore raw

PATCH 4/7 glib-2.0: Fix localedir expectations for uclibc

In reply to Khem Raj

DATADIRNAME is used by many applications using autotools to install locale data, we get a wrong value for uclibc systems since it does not recognise it as proper linux systems and start putting locale info in /usr/lib instead of /usr/share

---
 meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch | 20 ++++++++++++++++++++
 meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb    |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch new file +20 -0
new file mode 100644
index 0000000..2a154fd
@@ -0,0 +1,20 @@
+Fix DATADIRNAME on uclibc/Linux
+
+translation files are always installed under PREFIX/share/locale in uclibc
+based systems therefore lets set DATADIRNAME to "share".
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+Index: glib-2.38.2/m4macros/glib-gettext.m4
+===================================================================
+--- glib-2.38.2.orig/m4macros/glib-gettext.m4	2013-11-07 07:29:13.000000000 -0800
++++ glib-2.38.2/m4macros/glib-gettext.m4	2014-03-15 14:51:54.712135644 -0700
+@@ -239,7 +239,7 @@
+ 	      [CATOBJEXT=.mo
+                DATADIRNAME=lib])
+ 	    ;;
+-	    *-*-openbsd*)
++	    *-*-openbsd* | *-*-linux-uclibc*)
+ 	    CATOBJEXT=.mo
+             DATADIRNAME=share
+ 	    ;;
meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb +1 -0
index 6c336f7..4052950 100644
@@ -15,6 +15,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
            file://ptest-paths.patch \
            file://gtest-skip-fixes.patch \
            file://gio-test-race.patch \
+           file://uclibc.patch \
           "
 
 SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
Signature · 1 line
1.9.0
author
#7 lore raw

PATCH 5/7 util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'

In reply to Khem Raj

This patch actually makes sense for uclibc more than glibc since if we did not cache scanf_cv_alloc_modifier configure test will determine it correctly for glibc but the test does not do proper job when uclibc is involved the reason is it depends on define __GLIBC_ and uclibc unfortunately poses as glibc and defines this variable.

%m is implemented in uclibc as well and we enable it so caching value of 'ms' specifier is going to work across all libcs

This fixes mounting errors we see with util-linux/mount on uclibc/systemd

Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: /proc/self/mountinfo: parse error: ignore entry at line 21.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: /proc/self/mountinfo: parse error: ignore entry at line 22.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: can't find / in /etc/fstab
---
 meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/util-linux/util-linux_2.24.1.bb +2 -1
index b08d68d..aa98b65 100644
@@ -17,7 +17,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
 SRC_URI[md5sum] = "88d46ae23ca599ac5af9cf96b531590f"
 SRC_URI[sha256sum] = "835eb6232cfab0118ef2e4fd649de0ba9f5bd1b8cbf9a7d4d84594541dec8410"
 
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
 EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
                              --disable-fallocate --disable-use-tty-group \
 "
Signature · 1 line
1.9.0
author
#13 lore raw

PATCH 6/7 intltool: Define DATADIRNAME=share for uclibc based systems

In reply to Khem Raj

This otherwise makes localedir to point to prefix/lib which is wrong location for locale splitting and we end with unpackaged locale files e.g. systemd throws this

WARNING: QA Issue: systemd: Files/directories were installed but not shipped
/usr/lib/locale
/usr/lib/locale/fr
/usr/lib/locale/pl
/usr/lib/locale/ru
/usr/lib/locale/it
/usr/lib/locale/fr/LC_MESSAGES /usr/lib/locale/fr/LC_MESSAGES/systemd.mo /usr/lib/locale/pl/LC_MESSAGES /usr/lib/locale/pl/LC_MESSAGES/systemd.mo /usr/lib/locale/ru/LC_MESSAGES /usr/lib/locale/ru/LC_MESSAGES/systemd.mo /usr/lib/locale/it/LC_MESSAGES /usr/lib/locale/it/LC_MESSAGES/systemd.mo

---
 .../intltool/intltool-0.50.2/uclibc.patch             | 19 +++++++++++++++++++
 meta/recipes-devtools/intltool/intltool_0.50.2.bb     |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-devtools/intltool/intltool-0.50.2/uclibc.patch
meta/recipes-devtools/intltool/intltool-0.50.2/uclibc.patch new file +19 -0
new file mode 100644
index 0000000..145c181
@@ -0,0 +1,19 @@
+on uclibc systems localedir should point to /usr/'share' as usual.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: intltool-0.50.2/intltool.m4
+===================================================================
+--- intltool-0.50.2.orig/intltool.m4	2014-03-15 22:09:01.016627665 -0700
++++ intltool-0.50.2/intltool.m4	2014-03-15 22:12:09.732631206 -0700
+@@ -173,6 +173,9 @@
+     AC_CHECK_FUNC(bind_textdomain_codeset,
+       [DATADIRNAME=share], [DATADIRNAME=lib])
+     ;;
++    *-*-*uclibc*)
++    [DATADIRNAME=share]
++    ;;
+     *)
+     [DATADIRNAME=lib]
+     ;;
meta/recipes-devtools/intltool/intltool_0.50.2.bb +1 -0
index dffce21..483239d 100644
@@ -3,6 +3,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 SRC_URI += "file://intltool-nowarn.patch \
+           file://uclibc.patch \
            ${NATIVEPATCHES} \
            "
 
Signature · 1 line
1.9.0
author
#14 lore raw

PATCH 7/7 Upgrade to systemd 211+

In reply to Khem Raj

Fixes [YOCTO #5940]

Fix checks for %ms format to be a link time check
runtime checks wont work in cross compiling

Add a patch to workaround missing _SC_PHYS_PAGES
in uclibc

---
 ...1-uClibc-doesn-t-implement-pwritev-preadv.patch |  15 +-
 .../systemd-pam-configure-check-uclibc.patch       |  25 +-
 .../systemd/systemd/systemd-pam-fix-execvpe.patch  |  22 +-
 .../systemd/systemd-pam-fix-fallocate.patch        |  16 +-
 .../systemd/systemd-pam-fix-getty-unit.patch       |  20 +-
 .../systemd/systemd/systemd-pam-fix-mkostemp.patch | 166 +---------
 .../systemd/systemd/systemd-pam-fix-msformat.patch | 348 ---------------------
 .../systemd/systemd/uclibc-get-physmem.patch       |  37 +++
 .../systemd/systemd/uclibc-sysinfo_h.patch         |  19 ++
 .../systemd/{systemd_208.bb => systemd_211.bb}     |  31 +-
 10 files changed, 136 insertions(+), 563 deletions(-)
 delete mode 100644 meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
 create mode 100644 meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch
 create mode 100644 meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch
 rename meta/recipes-core/systemd/{systemd_208.bb => systemd_211.bb} (93%)
meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch +6 -9
index e204a50..9fdb3c9 100644
@@ -12,11 +12,11 @@ Signed-off-by: Khem Raj <[email protected]>
  src/libsystemd-bus/test-bus-memfd.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/src/libsystemd-bus/test-bus-memfd.c b/src/libsystemd-bus/test-bus-memfd.c
-index 05ef555..45e5e44 100644
---- a/src/libsystemd-bus/test-bus-memfd.c
-+++ b/src/libsystemd-bus/test-bus-memfd.c
-@@ -145,6 +145,7 @@ int main(int argc, char *argv[]) {
+Index: systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c
+===================================================================
+--- systemd-209.orig/src/libsystemd/sd-bus/test-bus-memfd.c	2014-02-19 15:03:09.983254602 -0800
++++ systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c	2014-02-19 23:42:10.636652864 -0800
+@@ -151,6 +151,7 @@
          /* check content */
          assert_se(memcmp(buf, "ll", 2) == 0);
  
@@ -24,7 +24,7 @@ index 05ef555..45e5e44 100644
          /* writev it out*/
          iov[0].iov_base = (char *)"ABC";
          iov[0].iov_len = 3;
-@@ -167,6 +168,7 @@ int main(int argc, char *argv[]) {
+@@ -173,6 +174,7 @@
          assert_se(memcmp(bufv[0], "ABC", 3) == 0);
          assert_se(memcmp(bufv[1], "DEF", 3) == 0);
          assert_se(memcmp(bufv[2], "GHI", 3) == 0);
@@ -32,6 +32,3 @@ index 05ef555..45e5e44 100644
  
          sd_memfd_free(m);
  
--- 
-1.8.3.4
-
meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch +14 -11
index d096983..4639532 100644
@@ -1,11 +1,13 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <[email protected]>
 
---- systemd-185.orig/configure.ac	2012-06-04 14:15:16.000000000 -0400
-+++ systemd-pam-185/configure.ac	2012-06-21 22:57:10.000000000 -0400
-@@ -63,6 +63,23 @@
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac	2014-03-15 17:53:51.756340454 -0700
++++ git/configure.ac	2014-03-15 18:07:34.888355897 -0700
+@@ -78,6 +78,24 @@
  
- AC_PATH_PROG([M4], [m4])
+ M4_DEFINES=
  
 +# check for few functions not implemented in uClibc
 +
@@ -15,15 +17,16 @@ Signed-off-by: Khem Raj <[email protected]>
 +
 +AC_MSG_CHECKING([whether %ms format is supported by *scanf])
 +
-+AC_RUN_IFELSE(
-+	[AC_LANG_PROGRAM([[ include <stdio.h> ]],
-+			[[ char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
-+			   int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
-+			   return (rc==3)?0:1;]])],
++AC_LINK_IFELSE(
++	[AC_LANG_PROGRAM([ 
++	 #include <stdio.h>
++	 ],[
++	    char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
++	    int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
++	    return (rc==3)?0:1;])],
 +	[AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
-+	[AC_MSG_RESULT([no])],
 +	[AC_MSG_RESULT([no])])
 +
  # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
  m4_ifdef([GTK_DOC_CHECK], [
- GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
+ GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch +11 -11
index 1d4f273..7170a38 100644
@@ -1,11 +1,11 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <[email protected]>
 
-Index: git/src/nspawn/nspawn.c
+Index: systemd-209/src/nspawn/nspawn.c
 ===================================================================
---- git.orig/src/nspawn/nspawn.c	2012-09-22 17:57:05.000000000 -0700
-+++ git/src/nspawn/nspawn.c	2012-09-22 18:01:41.541405768 -0700
-@@ -63,6 +63,8 @@
+--- systemd-209.orig/src/nspawn/nspawn.c	2014-02-19 15:03:09.000000000 -0800
++++ systemd-209/src/nspawn/nspawn.c	2014-02-19 23:20:38.720628627 -0800
+@@ -91,6 +91,8 @@
          LINK_GUEST
  } LinkJournal;
  
@@ -13,17 +13,17 @@ Index: git/src/nspawn/nspawn.c
 +
  static char *arg_directory = NULL;
  static char *arg_user = NULL;
- static char **arg_controllers = NULL;
-@@ -1373,7 +1375,12 @@
+ static sd_id128_t arg_uuid = {};
+@@ -2045,7 +2047,12 @@
                                  a[0] = (char*) "/sbin/init";
-                                 execve(a[0], a, (char**) envp);
+                                 execve(a[0], a, env_use);
                          } else if (argc > optind)
 +#ifdef HAVE_EXECVPE
-                                 execvpe(argv[optind], argv + optind, (char**) envp);
+                                 execvpe(argv[optind], argv + optind, env_use);
 +#else
-+                                environ = (char **)envp;
++                                environ = env_use;
 +                                execvp(argv[optind], argv + optind);
-+#endif /* HAVE_EXECVPE */			
++#endif /* HAVE_EXECVPE */                      
                          else {
                                  chdir(home ? home : "/root");
-                                 execle("/bin/bash", "-bash", NULL, (char**) envp);
+                                 execle("/bin/bash", "-bash", NULL, env_use);
meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch +8 -8
index 05223d3..de73be9 100644
@@ -1,10 +1,10 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <[email protected]>
 
-Index: git/src/journal/journal-file.c
+Index: systemd-209/src/journal/journal-file.c
 ===================================================================
---- git.orig/src/journal/journal-file.c	2014-03-02 16:25:38.000000000 -0800
-+++ git/src/journal/journal-file.c	2014-03-02 16:27:24.151238740 -0800
+--- systemd-209.orig/src/journal/journal-file.c	2014-02-12 18:42:33.000000000 -0800
++++ systemd-209/src/journal/journal-file.c	2014-02-19 23:23:19.464631643 -0800
 @@ -38,6 +38,8 @@
  #include "compress.h"
  #include "fsprg.h"
@@ -48,11 +48,11 @@ Index: git/src/journal/journal-file.c
  
          if (fstat(f->fd, &f->last_stat) < 0)
                  return -errno;
-Index: git/src/journal/journald-kmsg.c
+Index: systemd-209/src/journal/journald-kmsg.c
 ===================================================================
---- git.orig/src/journal/journald-kmsg.c	2014-03-02 16:25:38.000000000 -0800
-+++ git/src/journal/journald-kmsg.c	2014-03-02 16:26:35.419237826 -0800
-@@ -408,6 +408,7 @@
+--- systemd-209.orig/src/journal/journald-kmsg.c	2014-02-19 15:03:09.000000000 -0800
++++ systemd-209/src/journal/journald-kmsg.c	2014-02-19 23:22:14.396630422 -0800
+@@ -441,6 +441,7 @@
  
  int server_open_kernel_seqnum(Server *s) {
          int fd;
@@ -60,7 +60,7 @@ Index: git/src/journal/journald-kmsg.c
          uint64_t *p;
  
          assert(s);
-@@ -421,8 +422,19 @@
+@@ -454,8 +455,19 @@
                  log_error("Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
                  return 0;
          }
meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch +10 -10
index ceb8483..9b4c940 100644
@@ -7,29 +7,29 @@ Signed-off-by: Maxime Ripard <[email protected]>
  units/[email protected] |    2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
-Index: systemd-206/units/[email protected]
+Index: git/units/[email protected]
 ===================================================================
---- systemd-206.orig/units/[email protected]	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/units/[email protected]	2013-08-21 08:45:48.569886828 -0700
+--- git.orig/units/[email protected]	2014-03-15 08:16:17.000000000 -0700
++++ git/units/[email protected]	2014-03-15 08:21:11.007695825 -0700
 @@ -27,7 +27,7 @@
  
  [Service]
  # the VT is cleared by TTYVTDisallocate
--ExecStart=-/sbin/agetty --noclear %I
-+ExecStart=-/sbin/getty -L %I
+-ExecStart=-/sbin/agetty --noclear %I $TERM
++ExecStart=-/sbin/getty -L %I $TERM
  Type=idle
  Restart=always
  RestartSec=0
-Index: systemd-206/units/[email protected]
+Index: git/units/[email protected]
 ===================================================================
---- systemd-206.orig/units/[email protected]	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/units/[email protected]	2013-08-21 08:48:52.337890275 -0700
+--- git.orig/units/[email protected]	2014-03-15 08:16:17.000000000 -0700
++++ git/units/[email protected]	2014-03-15 08:22:31.291697331 -0700
 @@ -22,7 +22,7 @@
  IgnoreOnIsolate=yes
  
  [Service]
--ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
-+ExecStart=-/sbin/getty -L %I 115200
+-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
++ExecStart=-/sbin/getty -L 115200 %I $TERM
  Type=idle
  Restart=always
  RestartSec=0
meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch +13 -153

183 lines not on this page · raw message

meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch deleted +0 -348

348 lines not on this page · raw message

meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch new file +37 -0
new file mode 100644
index 0000000..39dfc9e
@@ -0,0 +1,37 @@
+bypass unimplemented _SC_PHYS_PAGES system configuration API in uclibc
+
+Upstream-Status: Inappropriate [uclibc-specific]
+
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: git/src/shared/util.c
+===================================================================
+--- git.orig/src/shared/util.c	2014-03-15 18:09:34.796358146 -0700
++++ git/src/shared/util.c	2014-03-15 20:16:33.836501084 -0700
+@@ -6332,11 +6332,24 @@
+ 
+         /* We return this as uint64_t in case we are running as 32bit
+          * process on a 64bit kernel with huge amounts of memory */
+-
++#ifdef __UCLIBC__
++        char line[128];
++        FILE *f = fopen("/proc/meminfo", "r");
++        if (f == NULL)
++                return 0;
++        while (!feof(f) && fgets(line, sizeof(line)-1, f)) {
++                if (sscanf(line, "MemTotal: %l kB", &mem) == 1) {
++                        mem *= 1024;
++                        break;
++                }
++        }
++        fclose(f);
++        return (uint64_t) mem;
++#else
+         mem = sysconf(_SC_PHYS_PAGES);
+         assert(mem > 0);
+-
+         return (uint64_t) mem * (uint64_t) page_size();
++#endif
+ }
+ 
+ char* mount_test_option(const char *haystack, const char *needle) {
meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch new file +19 -0
new file mode 100644
index 0000000..15645de
@@ -0,0 +1,19 @@
+Dont include sys/sysinfo.h on uclibc it conflicts with linux/sysinfo.h
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Inappropriate [uclibc specific]
+
+Index: systemd-209/src/readahead/readahead-common.c
+===================================================================
+--- systemd-209.orig/src/readahead/readahead-common.c	2014-02-12 18:42:33.810685053 -0800
++++ systemd-209/src/readahead/readahead-common.c	2014-02-19 23:49:31.856661142 -0800
+@@ -22,7 +22,9 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
++#ifndef __UCLIBC__
+ #include <sys/sysinfo.h>
++#endif
+ #include <sys/inotify.h>
+ #include <fcntl.h>
+ #include <sys/mman.h>
meta/recipes-core/systemd/systemd_211.bb renamed from meta/recipes-core/systemd/systemd_208.bb +18 -13
similarity index 93%
rename from meta/recipes-core/systemd/systemd_208.bb
rename to meta/recipes-core/systemd/systemd_211.bb
index 98da15c..044aab5 100644
@@ -17,14 +17,22 @@ SECTION = "base/shell"
 
 inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest
 
-SRCREV = "255eb046a7bcb90e60a3a54302bc1250c1aed26a"
+SRCREV = "3a450ec5c6adf3057bcedd6cc19c10617abc35a5"
 
-PV = "208+git${SRCPV}"
+PV = "211+git${SRCPV}"
 
-SRC_URI = "git://anongit.freedesktop.org/systemd/systemd-stable;branch=v208-stable;protocol=git \
+SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
            file://binfmt-install.patch \
+           file://systemd-pam-configure-check-uclibc.patch \
+           file://systemd-pam-fix-execvpe.patch \
+           file://systemd-pam-fix-fallocate.patch \
+           file://systemd-pam-fix-mkostemp.patch \
+           file://optional_secure_getenv.patch \
+           file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \
+           file://uclibc-sysinfo_h.patch \
+           file://uclibc-get-physmem.patch \
+           \
            file://touchscreen.rules \
-           ${UCLIBCPATCHES} \
            file://00-create-volatile.conf \
            file://init \
            file://run-ptest \
@@ -32,17 +40,10 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd-stable;branch=v208-stab
 
 S = "${WORKDIR}/git"
 
-UCLIBCPATCHES = ""
-UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \
-                             file://systemd-pam-fix-execvpe.patch \
-                             file://systemd-pam-fix-fallocate.patch \
+SRC_URI_append_libc-uclibc = "\
                              file://systemd-pam-fix-getty-unit.patch \
-                             file://systemd-pam-fix-mkostemp.patch \
-                             file://systemd-pam-fix-msformat.patch \
-                             file://optional_secure_getenv.patch \
-                             file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \
                             "
-LDFLAGS_libc-uclibc_append = " -lrt"
+LDFLAGS_append_libc-uclibc = " -lrt"
 
 GTKDOC_DOCDIR = "${S}/docs/"
 
@@ -74,6 +75,7 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
                  --disable-manpages \
                  --disable-coredump \
                  --disable-introspection \
+                 --disable-kdbus \
                  --enable-split-usr \
                  --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
@@ -92,6 +94,8 @@ do_configure_prepend() {
 		cp -r ${S}/units ${S}/units.pre_sed
 	fi
 	sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
+	sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
+	sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
 }
 
 do_install() {
@@ -215,6 +219,7 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${libdir}/libnss_myhostname.so.2 \
                 /cgroup \
                 ${bindir}/systemd* \
+                ${bindir}/busctl \
                 ${bindir}/localectl \
                 ${bindir}/hostnamectl \
                 ${bindir}/timedatectl \
Signature · 1 line
1.9.0
#15 lore raw
In reply to Khem Raj
Quoted 23 lines · Khem Raj

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Quoted 8 lines

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

I tried this on the autobuilder, with and without the pulseaudio 4->5 upgrade. The result was:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/111
http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/112

so I'm afraid I can't take the systemd part of this series. Its getting late in the cycle for a pulseaudio 4->5 upgrade too :/

Does anyone have any strong opinions on this?

Cheers,

Richard

#16 lore raw
Quoted 33 lines · Richard Purdie
Quoted 23 lines · Khem Raj

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Quoted 8 lines

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

Quoted 5 lines

I tried this on the autobuilder, with and without the pulseaudio 4->5 upgrade. The result was:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/111
http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/112

Both links show pulseaudio/4.0 in error log and 4.0 needs something like:
http://lists.openembedded.org/pipermail/openembedded-core/2014-February/089796.html

Quoted 15 lines

so I'm afraid I can't take the systemd part of this series. Its getting late in the cycle for a pulseaudio 4->5 upgrade too :/

Does anyone have any strong opinions on this?

Cheers,

Richard

Signature · 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#17 lore raw
Quoted 34 lines · Martin Jansa
Quoted 33 lines · Richard Purdie
Quoted 31 lines · Khem Raj

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

Quoted 5 lines
Quoted 5 lines

I tried this on the autobuilder, with and without the pulseaudio 4->5 upgrade. The result was:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/111
http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/112

Sorry, pa-5 is:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/110/

Quoted 3 lines

Both links show pulseaudio/4.0 in error log and 4.0 needs something like:
http://lists.openembedded.org/pipermail/openembedded-core/2014-February/089796.html

Thanks, will take a look at that.

Cheers,

Richard

author
#18 lore raw
In reply to Richard Purdie
Quoted 33 lines · Richard Purdie
Quoted 23 lines · Khem Raj

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Quoted 8 lines

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

Quoted 8 lines

I tried this on the autobuilder, with and without the pulseaudio 4->5 upgrade. The result was:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/111
http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/112

so I'm afraid I can't take the systemd part of this series. Its getting late in the cycle for a pulseaudio 4->5 upgrade too :/

I was fighting with runtime issues than the build time so I was building minimal images for quick debug/test cycles.
my bad since I kept pulseaudio out of this pull request the systemd patch that Martin had
was also left out.

Quoted 2 lines

Does anyone have any strong opinions on this?

Give it a shot, if you can otherwise it can wait, 208 still shows issues with journald where journal
sometimes misses chunks of logs of chatty daemons for an interval of time after few hours of running, I haven't seen this issue with 211 yet so this is an improvement.
however 208 will keep getting fixes it probably isnt a bad choice to stick with for this release.

Quoted 6 lines

Cheers,

Richard

#19 lore raw
Quoted 54 lines · Khem Raj
Quoted 33 lines · Richard Purdie
Quoted 23 lines · Khem Raj

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Quoted 8 lines

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

Quoted 8 lines

I tried this on the autobuilder, with and without the pulseaudio 4->5 upgrade. The result was:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/111
http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/112

so I'm afraid I can't take the systemd part of this series. Its getting late in the cycle for a pulseaudio 4->5 upgrade too :/

I was fighting with runtime issues than the build time so I was building minimal images for quick debug/test cycles.
my bad since I kept pulseaudio out of this pull request the systemd patch that Martin had
was also left out.

Quoted 2 lines

Does anyone have any strong opinions on this?

Quoted 7 lines

Give it a shot, if you can otherwise it can wait, 208 still shows issues with journald where journal
sometimes misses chunks of logs of chatty daemons for an interval of time after few hours of running, I haven't seen this issue with 211 yet so this is an improvement.
however 208 will keep getting fixes it probably isnt a bad choice to stick with for this release.

FWIW Martin's patch showed a green build. I'm therefore more widely testing that combination.

Cheers,

Richard

#20 lore raw
Quoted 63 lines · Richard Purdie
Quoted 54 lines · Khem Raj
Quoted 33 lines · Richard Purdie
Quoted 23 lines · Khem Raj

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Quoted 8 lines

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

Quoted 8 lines

I tried this on the autobuilder, with and without the pulseaudio 4->5 upgrade. The result was:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/111
http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/112

so I'm afraid I can't take the systemd part of this series. Its getting late in the cycle for a pulseaudio 4->5 upgrade too :/

I was fighting with runtime issues than the build time so I was building minimal images for quick debug/test cycles.
my bad since I kept pulseaudio out of this pull request the systemd patch that Martin had
was also left out.

Quoted 2 lines

Does anyone have any strong opinions on this?

Quoted 7 lines

Give it a shot, if you can otherwise it can wait, 208 still shows issues with journald where journal
sometimes misses chunks of logs of chatty daemons for an interval of time after few hours of running, I haven't seen this issue with 211 yet so this is an improvement.
however 208 will keep getting fixes it probably isnt a bad choice to stick with for this release.

Quoted 2 lines

FWIW Martin's patch showed a green build. I'm therefore more widely testing that combination.

I should say that my pulseaudio change was also motivated mostly to get green build and to allow me to flash new image on my MACHINEs, and test systemd in runtime, but then I don't use pulseaudio in runtime, so it wasn't properly tested there.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
author
#21 lore raw
Quoted 64 lines · Martin Jansa
Quoted 63 lines · Richard Purdie
Quoted 61 lines · Khem Raj
Quoted 33 lines · Richard Purdie
Quoted 23 lines · Khem Raj

Finally, managed to get systemd 211 to boot on uclibc and eglibc on all supported qemu machines, this should fix bug #5940

Additional functionality in uclibc is needed to support this systemd

gnutls, glib-2.0, intltool fixes are uclibc specific and are needed to get uclibc images going

util-linux fix is moulded to support uclibc

I have been testing this fix on the qemuarm/qemuppc/qemumips/qemux86/qemux86-64 on both uclibc/eglibc images and its been working good.

The following changes since commit 58aae40bbf8edd9c5ca70b2094eeb724391f1993:

eglibc: Update SRC_URI to point to final download location (2014-03-13 20:44:48 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/systemd-211
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/systemd-211

Quoted 8 lines

Khem Raj (7):
uclibc: Implement clock_adjtime()
uclibc: Remove iconv.h
gnutls: Link in pthread explicitly for uclibc glib-2.0: Fix localedir expectations for uclibc
util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
intltool: Define DATADIRNAME=share for uclibc based systems Upgrade to systemd 211+

Quoted 8 lines

I tried this on the autobuilder, with and without the pulseaudio 4->5 upgrade. The result was:

http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/111
http://autobuilder.yoctoproject.org/main/builders/nightly-qa-systemd/builds/112

so I'm afraid I can't take the systemd part of this series. Its getting late in the cycle for a pulseaudio 4->5 upgrade too :/

I was fighting with runtime issues than the build time so I was building minimal images for quick debug/test cycles.
my bad since I kept pulseaudio out of this pull request the systemd patch that Martin had
was also left out.

Quoted 2 lines

Does anyone have any strong opinions on this?

Give it a shot, if you can otherwise it can wait, 208 still shows issues with journald where journal
sometimes misses chunks of logs of chatty daemons for an interval of time after few hours of running, I haven't seen this issue with 211 yet so this is an improvement.
however 208 will keep getting fixes it probably isnt a bad choice to stick with for this release.

Quoted 7 lines
Quoted 2 lines

FWIW Martin's patch showed a green build. I'm therefore more widely testing that combination.

I should say that my pulseaudio change was also motivated mostly to get green build and to allow me to flash new image on my MACHINEs, and test systemd in runtime, but then I don't use pulseaudio in runtime, so it wasn't properly tested there.

I think, this change should be done a bit differently where it looks for both libraries and then it will become
worthy of submitting to pulseaudio upstream. There might be couple of other packages that integrate with systemd
APIs which will need this kind of fix.

#5 lore raw

Re: [PATCH 4/7] glib-2.0: Fix localedir expectations for uclibc

In reply to Khem Raj
Quoted 1 line · Khem Raj

++ *-*-openbsd* | *-*-linux-uclibc*)

Does uclibc have the same file naming as bsd? eglibc uses .gmo.

Ross

author
#6 lore raw

Re: [PATCH 4/7] glib-2.0: Fix localedir expectations for uclibc

Quoted 7 lines · Ross
Quoted 1 line · On 16 March 2014 05:42, Khem Raj <[email protected] <javascript:;>> wrote:

++ *-*-openbsd* | *-*-linux-uclibc*)

Does uclibc have the same file naming as bsd? eglibc uses .gmo.

It uses .mo

Quoted 2 lines

Ross

#8 lore raw

Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'

In reply to Khem Raj

Hi Khem,

I got an error on CentOS 5.10, seems caused by this patch:

| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64-linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c: In function 'main':
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64-linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151: error: 'MS_PRIVATE' undeclared (first use in this function)
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64-linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151: error: (Each undeclared identifier is reported only once
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64-linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151: error: for each function it appears in.)
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64-linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151: error: 'MS_REC' undeclared (first use in this function)
| make[2]: *** [sys-utils/unshare.o] Error 1

We can add the following lines to util-linux/sys-utils/unshare.c as a workaround:

#ifndef MS_PRIVATE
#define MS_PRIVATE (1<<18) /* 262144 Private*/
#endif

#ifndef MS_REC
#define MS_REC 0x4000 /* 16384: Recursive loopback */
#endif

#ifndef MS_NOSUID
#define MS_NOSUID 2 /* Ignore suid and sgid bits */
#endif

#ifndef MS_NOEXEC
#define MS_NOEXEC 8 /* Disallow program execution */
#endif

#ifndef MS_NODEV
#define MS_NODEV 4 /* Disallow access to device special files */
#endif

Do you have any ideas, please ?

// Robert

Quoted 37 lines · Khem Raj

This patch actually makes sense for uclibc more than glibc since if we did not cache scanf_cv_alloc_modifier configure test will determine it correctly for glibc but the test does not do proper job when uclibc is involved the reason is it depends on define __GLIBC_ and uclibc unfortunately poses as glibc and defines this variable.

%m is implemented in uclibc as well and we enable it so caching value of 'ms' specifier is going to work across all libcs

This fixes mounting errors we see with util-linux/mount on uclibc/systemd

Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: /proc/self/mountinfo: parse error: ignore entry at line 21.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: /proc/self/mountinfo: parse error: ignore entry at line 22.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: can't find / in /etc/fstab
---
  meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/util-linux/util-linux_2.24.1.bb +2 -1
index b08d68d..aa98b65 100644
@@ -17,7 +17,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
  SRC_URI[md5sum] = "88d46ae23ca599ac5af9cf96b531590f"
  SRC_URI[sha256sum] = "835eb6232cfab0118ef2e4fd649de0ba9f5bd1b8cbf9a7d4d84594541dec8410"
 
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
  EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
                               --disable-fallocate --disable-use-tty-group \
  "
author
#9 lore raw

Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'

whats native glibc version on build host

-Khem

Quoted 97 lines · Robert Yang

Hi Khem,

I got an error on CentOS 5.10, seems caused by this patch:

| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:
In function 'main':
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: 'MS_PRIVATE' undeclared (first use in this function)
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: (Each undeclared identifier is reported only once
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: for each function it appears in.)
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: 'MS_REC' undeclared (first use in this function)
| make[2]: *** [sys-utils/unshare.o] Error 1

We can add the following lines to util-linux/sys-utils/unshare.c as a workaround:

#ifndef MS_PRIVATE
#define MS_PRIVATE (1<<18) /* 262144 Private*/
#endif

#ifndef MS_REC
#define MS_REC 0x4000 /* 16384: Recursive loopback */
#endif

#ifndef MS_NOSUID
#define MS_NOSUID 2 /* Ignore suid and sgid bits */
#endif

#ifndef MS_NOEXEC
#define MS_NOEXEC 8 /* Disallow program execution */
#endif

#ifndef MS_NODEV
#define MS_NODEV 4 /* Disallow access to device special files
*/
#endif

Do you have any ideas, please ?

// Robert

Quoted 45 lines · Khem Raj

This patch actually makes sense for uclibc more than glibc since if we did not cache scanf_cv_alloc_modifier configure test will determine it correctly for glibc but the test does not do proper job when uclibc is involved the reason is it depends on define __GLIBC_ and uclibc unfortunately poses as glibc and defines this variable.

%m is implemented in uclibc as well and we enable it so caching value of 'ms' specifier is going to work across all libcs

This fixes mounting errors we see with util-linux/mount on uclibc/systemd

Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount:
/proc/self/mountinfo: parse error: ignore entry at line 21.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount:
/proc/self/mountinfo: parse error: ignore entry at line 22.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: can't find /

in /etc/fstab

---
  meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

linux/util-linux_2.24.1.bb
index b08d68d..aa98b65 100644

meta/recipes-core/util-linux/util-linux_2.24.1.bb +0 -0
@@ -17,7 +17,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch
 \
  SRC_URI[md5sum] = "88d46ae23ca599ac5af9cf96b531590f"
  SRC_URI[sha256sum] = "835eb6232cfab0118ef2e4fd649de0

ba9f5bd1b8cbf9a7d4d84594541dec8410"

meta/recipes-core/util-linux/util-linux_2.24.1.bb +2 -2
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
  EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
                               --disable-fallocate
--disable-use-tty-group \
  "
#10 lore raw

Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'

Quoted 2 lines · Khem Raj

whats native glibc version on build host

Thanks for the quick response, it is glibc-2.5-118.el5_10.2.

// Robert

Quoted 101 lines

-Khem

Quoted 97 lines · Robert Yang

Hi Khem,

I got an error on CentOS 5.10, seems caused by this patch:

| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:
In function 'main':
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: 'MS_PRIVATE' undeclared (first use in this function)
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: (Each undeclared identifier is reported only once
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: for each function it appears in.)
| /home/build/lyang1/testre/bitbake_build/tmp/work/x86_64- linux/util-linux-native/2.24.1-r0/util-linux-2.24.1/sys-utils/unshare.c:151:
error: 'MS_REC' undeclared (first use in this function)
| make[2]: *** [sys-utils/unshare.o] Error 1

We can add the following lines to util-linux/sys-utils/unshare.c as a workaround:

#ifndef MS_PRIVATE
#define MS_PRIVATE (1<<18) /* 262144 Private*/
#endif

#ifndef MS_REC
#define MS_REC 0x4000 /* 16384: Recursive loopback */
#endif

#ifndef MS_NOSUID
#define MS_NOSUID 2 /* Ignore suid and sgid bits */
#endif

#ifndef MS_NOEXEC
#define MS_NOEXEC 8 /* Disallow program execution */
#endif

#ifndef MS_NODEV
#define MS_NODEV 4 /* Disallow access to device special files
*/
#endif

Do you have any ideas, please ?

// Robert

Quoted 45 lines · Khem Raj

This patch actually makes sense for uclibc more than glibc since if we did not cache scanf_cv_alloc_modifier configure test will determine it correctly for glibc but the test does not do proper job when uclibc is involved the reason is it depends on define __GLIBC_ and uclibc unfortunately poses as glibc and defines this variable.

%m is implemented in uclibc as well and we enable it so caching value of 'ms' specifier is going to work across all libcs

This fixes mounting errors we see with util-linux/mount on uclibc/systemd

Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount:
/proc/self/mountinfo: parse error: ignore entry at line 21.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount:
/proc/self/mountinfo: parse error: ignore entry at line 22.
Mar 16 01:46:40 qemux86 systemd-remount-fs[124]: /bin/mount: can't find /

in /etc/fstab

---
   meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

linux/util-linux_2.24.1.bb
index b08d68d..aa98b65 100644

meta/recipes-core/util-linux/util-linux_2.24.1.bb +0 -0
@@ -17,7 +17,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch
 \
   SRC_URI[md5sum] = "88d46ae23ca599ac5af9cf96b531590f"
   SRC_URI[sha256sum] = "835eb6232cfab0118ef2e4fd649de0

ba9f5bd1b8cbf9a7d4d84594541dec8410"

meta/recipes-core/util-linux/util-linux_2.24.1.bb +2 -2
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
   EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
                                --disable-fallocate
--disable-use-tty-group \
   "
author
#11 lore raw

Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'

Quoted 1 line · Robert Yang

Thanks for the quick response, it is glibc-2.5-118.el5_10.2.

That says it then %ms was added in 2.7 onwards. One thing you could try is convert the configvars to be target applicable only e.g.

CACHED_CONFIGUREVARS_append_class-target = " scanf_cv_alloc_modifier=ms”

that should be an ok fix.
-Khem

#12 lore raw

Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'

Quoted 10 lines · Khem Raj
Quoted 1 line · Robert Yang

Thanks for the quick response, it is glibc-2.5-118.el5_10.2.

That says it then %ms was added in 2.7 onwards. One thing you could try is convert the configvars to be target applicable only e.g.

CACHED_CONFIGUREVARS_append_class-target = " scanf_cv_alloc_modifier=ms”

I'm sorry, I wrongly thought that the error was caused by your patch, but it didn't, I didn't notice util-linux has been upgraded recently, so it didn't work, I have to figure out the root cause.

// Robert

Quoted 3 lines

that should be an ok fix.
-Khem