All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] systemd-211 upgrade and uclibc fixes
@ 2014-03-16  5:42 Khem Raj
  2014-03-16  5:42 ` [PATCH 1/7] uclibc: Implement clock_adjtime() Khem Raj
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

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

-- 
1.9.0



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/7] uclibc: Implement clock_adjtime()
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
@ 2014-03-16  5:42 ` Khem Raj
  2014-03-16  5:42 ` [PATCH 2/7] uclibc: Remove iconv.h Khem Raj
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

systemd needs it
Also update to latest master

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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

diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc
index 3c8e47c..0649aca 100644
--- a/meta/recipes-core/uclibc/uclibc-git.inc
+++ b/meta/recipes-core/uclibc/uclibc-git.inc
@@ -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"
diff --git a/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch b/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
new file mode 100644
index 0000000..3062ae4
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
@@ -0,0 +1,73 @@
+From 8e19e651145554fbcb90179f3dfbc7ea8a07c900 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Mar 2014 09:32:20 -0700
+Subject: [PATCH 4/4] Add clock_adjtime syscall
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/sys/timex.h                       |  5 ++++-
+ libc/sysdeps/linux/common/Makefile.in     |  2 +-
+ libc/sysdeps/linux/common/clock_adjtime.c | 15 +++++++++++++++
+ 3 files changed, 20 insertions(+), 2 deletions(-)
+ create mode 100644 libc/sysdeps/linux/common/clock_adjtime.c
+
+diff --git a/include/sys/timex.h b/include/sys/timex.h
+index 621afce..9082a28 100644
+--- a/include/sys/timex.h
++++ b/include/sys/timex.h
+@@ -20,6 +20,7 @@
+ 
+ #include <features.h>
+ #include <sys/time.h>
++#include <time.h>
+ 
+ /* These definitions from linux/timex.h as of 2.2.0.  */
+ 
+@@ -125,7 +126,9 @@ libc_hidden_proto(adjtimex)
+ extern int ntp_gettime (struct ntptimeval *__ntv) __THROW;
+ extern int ntp_adjtime (struct timex *__tntx) __THROW;
+ #endif
+-
++#if defined __UCLIBC_HAS_REALTIME__
++extern int clock_adjtime (clockid_t __clock_id, struct timex *__ntx) __THROW;
++#endif
+ __END_DECLS
+ 
+ #endif /* sys/timex.h */
+diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
+index 10d9884..bb985b6 100644
+--- a/libc/sysdeps/linux/common/Makefile.in
++++ b/libc/sysdeps/linux/common/Makefile.in
+@@ -84,7 +84,7 @@ CSRC-$(ARCH_USE_MMU) += msync.c
+ CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
+ CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
+ # aio_cancel|aio_error|aio_fsync|aio_read|aio_return|aio_suspend|aio_write|clock_getres|clock_gettime|clock_settime|clock_settime|fdatasync|lio_listio|mlockall|munlockall|mlock|munlock|mq_close|mq_getattr|mq_notify|mq_open|mq_receive|mq_timedreceive|mq_send|mq_timedsend|mq_setattr|mq_unlink|nanosleep|sched_getparam|sched_get_priority_max|sched_get_priority_min|sched_getscheduler|sched_rr_get_interval|sched_setparam|sched_setscheduler|sem_close|sem_destroy|sem_getvalue|sem_init|sem_open|sem_post|sem_trywait|sem_wait|sem_unlink|sem_wait|shm_open|shm_unlink|sigqueue|sigtimedwait|sigwaitinfo|timer_create|timer_delete|timer_getoverrun|timer_gettime|timer_settime
+-CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
++CSRC-$(UCLIBC_HAS_REALTIME) += clock_adjtime.c clock_getres.c clock_gettime.c clock_settime.c \
+ 	fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
+ 	nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
+ 	sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
+diff --git a/libc/sysdeps/linux/common/clock_adjtime.c b/libc/sysdeps/linux/common/clock_adjtime.c
+new file mode 100644
+index 0000000..968ec27
+--- /dev/null
++++ b/libc/sysdeps/linux/common/clock_adjtime.c
+@@ -0,0 +1,15 @@
++/*
++ * clock_adjtime() for uClibc
++ *
++ * Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
++ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
++ *
++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
++ */
++
++#include <sys/syscall.h>
++#include <sys/timex.h>
++
++#ifdef __NR_clock_adjtime
++_syscall2(int, clock_adjtime, clockid_t, clock_id, struct timex*, ntx)
++#endif
+-- 
+1.9.0
+
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/7] uclibc: Remove iconv.h
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
  2014-03-16  5:42 ` [PATCH 1/7] uclibc: Implement clock_adjtime() Khem Raj
@ 2014-03-16  5:42 ` Khem Raj
  2014-03-16  5:42 ` [PATCH 3/7] gnutls: Link in pthread explicitly for uclibc Khem Raj
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/uclibc/uclibc.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index e2de53c..e00de62 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -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
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/7] gnutls: Link in pthread explicitly for uclibc
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
  2014-03-16  5:42 ` [PATCH 1/7] uclibc: Implement clock_adjtime() Khem Raj
  2014-03-16  5:42 ` [PATCH 2/7] uclibc: Remove iconv.h Khem Raj
@ 2014-03-16  5:42 ` Khem Raj
  2014-03-16  5:42 ` [PATCH 4/7] glib-2.0: Fix localedir expectations " Khem Raj
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

Otherwise we end up with missing symbols from libpthread

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-support/gnutls/gnutls.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
index 39aaec1..25ec3a6 100644
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -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"
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/7] glib-2.0: Fix localedir expectations for uclibc
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
                   ` (2 preceding siblings ...)
  2014-03-16  5:42 ` [PATCH 3/7] gnutls: Link in pthread explicitly for uclibc Khem Raj
@ 2014-03-16  5:42 ` Khem Raj
  2014-03-18 11:13   ` Burton, Ross
  2014-03-16  5:42 ` [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms' Khem Raj
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
new file mode 100644
index 0000000..2a154fd
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
@@ -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 <raj.khem@gmail.com>
+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
+ 	    ;;
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
index 6c336f7..4052950 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
@@ -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"
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
                   ` (3 preceding siblings ...)
  2014-03-16  5:42 ` [PATCH 4/7] glib-2.0: Fix localedir expectations " Khem Raj
@ 2014-03-16  5:42 ` Khem Raj
  2014-03-26  1:19   ` Robert Yang
  2014-03-16  5:42 ` [PATCH 6/7] intltool: Define DATADIRNAME=share for uclibc based systems Khem Raj
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/util-linux/util-linux_2.24.1.bb b/meta/recipes-core/util-linux/util-linux_2.24.1.bb
index b08d68d..aa98b65 100644
--- a/meta/recipes-core/util-linux/util-linux_2.24.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.24.1.bb
@@ -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 \
 "
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 6/7] intltool: Define DATADIRNAME=share for uclibc based systems
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
                   ` (4 preceding siblings ...)
  2014-03-16  5:42 ` [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms' Khem Raj
@ 2014-03-16  5:42 ` Khem Raj
  2014-03-16  5:42 ` [PATCH 7/7] Upgrade to systemd 211+ Khem Raj
  2014-03-17 11:31 ` [PATCH 0/7] systemd-211 upgrade and uclibc fixes Richard Purdie
  7 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

diff --git a/meta/recipes-devtools/intltool/intltool-0.50.2/uclibc.patch b/meta/recipes-devtools/intltool/intltool-0.50.2/uclibc.patch
new file mode 100644
index 0000000..145c181
--- /dev/null
+++ b/meta/recipes-devtools/intltool/intltool-0.50.2/uclibc.patch
@@ -0,0 +1,19 @@
+on uclibc systems localedir should point to /usr/'share' as usual.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+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]
+     ;;
diff --git a/meta/recipes-devtools/intltool/intltool_0.50.2.bb b/meta/recipes-devtools/intltool/intltool_0.50.2.bb
index dffce21..483239d 100644
--- a/meta/recipes-devtools/intltool/intltool_0.50.2.bb
+++ b/meta/recipes-devtools/intltool/intltool_0.50.2.bb
@@ -3,6 +3,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 SRC_URI += "file://intltool-nowarn.patch \
+           file://uclibc.patch \
            ${NATIVEPATCHES} \
            "
 
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 7/7] Upgrade to systemd 211+
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
                   ` (5 preceding siblings ...)
  2014-03-16  5:42 ` [PATCH 6/7] intltool: Define DATADIRNAME=share for uclibc based systems Khem Raj
@ 2014-03-16  5:42 ` Khem Raj
  2014-03-17 11:31 ` [PATCH 0/7] systemd-211 upgrade and uclibc fixes Richard Purdie
  7 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-16  5:42 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...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%)

diff --git a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch b/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
index e204a50..9fdb3c9 100644
--- a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
+++ b/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
@@ -12,11 +12,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  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
-
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch b/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
index d096983..4639532 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
@@ -1,11 +1,13 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
---- 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 <raj.khem@gmail.com>
 +
 +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])],
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
index 1d4f273..7170a38 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
@@ -1,11 +1,11 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-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);
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
index 05223d3..de73be9 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
@@ -1,10 +1,10 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-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;
          }
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
index ceb8483..9b4c940 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
@@ -7,29 +7,29 @@ Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  units/serial-getty@.service.m4 |    2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
-Index: systemd-206/units/getty@.service.m4
+Index: git/units/getty@.service.m4
 ===================================================================
---- systemd-206.orig/units/getty@.service.m4	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/units/getty@.service.m4	2013-08-21 08:45:48.569886828 -0700
+--- git.orig/units/getty@.service.m4	2014-03-15 08:16:17.000000000 -0700
++++ git/units/getty@.service.m4	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/serial-getty@.service.m4
+Index: git/units/serial-getty@.service.m4
 ===================================================================
---- systemd-206.orig/units/serial-getty@.service.m4	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/units/serial-getty@.service.m4	2013-08-21 08:48:52.337890275 -0700
+--- git.orig/units/serial-getty@.service.m4	2014-03-15 08:16:17.000000000 -0700
++++ git/units/serial-getty@.service.m4	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
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
index 99ea573..8c7aa07 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
@@ -1,170 +1,30 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-Index: systemd-206/src/journal/journal-send.c
+Index: git/src/shared/util.c
 ===================================================================
---- systemd-206.orig/src/journal/journal-send.c	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/src/journal/journal-send.c	2013-08-21 08:50:50.825892498 -0700
-@@ -46,6 +46,8 @@
-                 memcpy(*_f + 10, _func, _fl);     \
-         } while(false)
- 
-+#include "config.h"
-+
- /* We open a single fd, and we'll share it with the current process,
-  * all its threads, and all its subprocesses. This means we need to
-  * initialize it atomically, and need to operate on it atomically
-@@ -311,8 +313,13 @@
-         /* Message doesn't fit... Let's dump the data in a temporary
-          * file and just pass a file descriptor of it to the other
-          * side */
--
-+#ifdef HAVE_MKOSTEMP
-         buffer_fd = mkostemp(path, O_CLOEXEC|O_RDWR);
-+#else
-+        buffer_fd = mkstemp(path);
-+        if (buffer_fd >= 0) fcntl(buffer_fd, F_SETFD, FD_CLOEXEC);
-+#endif /* HAVE_MKOSTEMP */
-+
-         if (buffer_fd < 0)
-                 return -errno;
- 
-Index: systemd-206/src/core/manager.c
-===================================================================
---- systemd-206.orig/src/core/manager.c	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/src/core/manager.c	2013-08-21 08:51:35.209893331 -0700
-@@ -71,6 +71,7 @@
- #include "audit-fd.h"
- #include "efivars.h"
- #include "env-util.h"
-+#include "config.h"
- 
- /* As soon as 5s passed since a unit was added to our GC queue, make sure to run a gc sweep */
- #define GC_QUEUE_USEC_MAX (10*USEC_PER_SEC)
-@@ -2058,7 +2059,12 @@
-                 return -ENOMEM;
- 
-         RUN_WITH_UMASK(0077) {
-+#ifdef HAVE_MKOSTEMP
-                 fd = mkostemp(path, O_RDWR|O_CLOEXEC);
-+#else
-+                fd = mkstemp(path);
-+                if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
-+#endif /* HAVE_MKOSTEMP */
-         }
- 
-         if (fd < 0) {
-Index: systemd-206/src/shared/util.c
-===================================================================
---- systemd-206.orig/src/shared/util.c	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/src/shared/util.c	2013-08-21 08:50:50.829892498 -0700
-@@ -74,6 +74,8 @@
- #include "env-util.h"
- #include "fileio.h"
+--- git.orig/src/shared/util.c	2014-03-15 15:14:21.368160908 -0700
++++ git/src/shared/util.c	2014-03-15 15:44:21.988194688 -0700
+@@ -85,6 +85,8 @@
+ #include "def.h"
+ #include "missing.h"
  
 +#include "config.h"
 +
  int saved_argc = 0;
  char **saved_argv = NULL;
  
-@@ -3980,7 +3982,12 @@
-         t[k] = '.';
-         stpcpy(stpcpy(t+k+1, fn), "XXXXXX");
- 
-+#ifdef HAVE_MKOSTEMP
-         fd = mkostemp(t, O_WRONLY|O_CLOEXEC);
-+#else
-+	fd = mkstemp(t);
-+	if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
-+#endif	/* HAVE_MKOSTEMP */
-         if (fd < 0) {
-                 free(t);
-                 return -errno;
-Index: systemd-206/src/shared/ask-password-api.c
-===================================================================
---- systemd-206.orig/src/shared/ask-password-api.c	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/src/shared/ask-password-api.c	2013-08-21 08:50:50.829892498 -0700
-@@ -37,6 +37,8 @@
- 
- #include "ask-password-api.h"
- 
-+#include "config.h"
-+
- static void backspace_chars(int ttyfd, size_t p) {
+@@ -6222,7 +6224,13 @@
  
-         if (ttyfd < 0)
-@@ -325,7 +327,12 @@
-         mkdir_p_label("/run/systemd/ask-password", 0755);
+         u = umask(077);
  
-         RUN_WITH_UMASK(0022) {
 +#ifdef HAVE_MKOSTEMP
-                 fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY);
+         fd = mkostemp(pattern, flags);
 +#else
-+                fd = mkstemp(temp);
-+                if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
-+#endif /* HAVE_MKOSTEMP */
-         }
- 
-         if (fd < 0) {
-Index: systemd-206/src/journal/journalctl.c
-===================================================================
---- systemd-206.orig/src/journal/journalctl.c	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/src/journal/journalctl.c	2013-08-21 08:50:50.833892498 -0700
-@@ -1005,7 +1005,13 @@
-         n /= arg_interval;
- 
-         close_nointr_nofail(fd);
-+#ifdef HAVE_MKOSTEMP
-         fd = mkostemp(k, O_WRONLY|O_CLOEXEC|O_NOCTTY);
-+#else
-+	fd = mkstemp(k);
-+	if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
++        fd = mkstemp(pattern);
++        if (fd >= 0) fcntl(fd, F_SETFD, flags);
 +#endif /* HAVE_MKOSTEMP */
 +
-         if (fd < 0) {
-                 log_error("Failed to open %s: %m", k);
-                 r = -errno;
-Index: systemd-206/src/journal/journal-verify.c
-===================================================================
---- systemd-206.orig/src/journal/journal-verify.c	2013-07-21 15:43:28.000000000 -0700
-+++ systemd-206/src/journal/journal-verify.c	2013-08-21 08:50:50.833892498 -0700
-@@ -811,8 +811,12 @@
- #endif
-         } else if (f->seal)
-                 return -ENOKEY;
--
-+#ifdef HAVE_MKOSTEMP
-         data_fd = mkostemp(data_path, O_CLOEXEC);
-+#else
-+	data_fd = mkstemp(data_path);
-+	if (data_fd >= 0) fcntl(data_fd, F_SETFD, FD_CLOEXEC);
-+#endif	/* HAVE_MKOSTEMP */
-         if (data_fd < 0) {
-                 log_error("Failed to create data file: %m");
-                 r = -errno;
-@@ -820,7 +824,12 @@
-         }
-         unlink(data_path);
- 
-+#ifdef HAVE_MKOSTEMP
-         entry_fd = mkostemp(entry_path, O_CLOEXEC);
-+#else
-+	entry_fd = mkstemp(entry_path);
-+	if (entry_fd >= 0) fcntl(entry_fd, F_SETFD, FD_CLOEXEC);
-+#endif	/* HAVE_MKOSTEMP */
-         if (entry_fd < 0) {
-                 log_error("Failed to create entry file: %m");
-                 r = -errno;
-@@ -828,7 +837,12 @@
-         }
-         unlink(entry_path);
+         if (fd < 0)
+                 return -errno;
  
-+#ifdef HAVE_MKOSTEMP
-         entry_array_fd = mkostemp(entry_array_path, O_CLOEXEC);
-+#else
-+	entry_array_fd = mkstemp(entry_array_path);
-+	if (entry_array_fd >= 0) fcntl(entry_array_fd, F_SETFD, FD_CLOEXEC);
-+#endif  /* HAVE_MKOSTEMP */
-         if (entry_array_fd < 0) {
-                 log_error("Failed to create entry array file: %m");
-                 r = -errno;
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
deleted file mode 100644
index e8a9144..0000000
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
+++ /dev/null
@@ -1,348 +0,0 @@
-Upstream-Status: Denied [no desire for uclibc support]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: systemd-208/src/fsck/fsck.c
-===================================================================
---- systemd-208.orig/src/fsck/fsck.c	2013-08-13 13:02:46.000000000 -0700
-+++ systemd-208/src/fsck/fsck.c	2013-11-05 22:01:26.776490078 -0800
-@@ -37,6 +37,8 @@
- #include "virt.h"
- #include "fileio.h"
- 
-+#include "config.h"
-+
- static bool arg_skip = false;
- static bool arg_force = false;
- static bool arg_show_progress = false;
-@@ -198,9 +200,16 @@
-                 char *device;
-                 double p;
-                 usec_t t;
--
-+#ifdef HAVE_MSFORMAT
-                 if (fscanf(f, "%i %lu %lu %ms", &pass, &cur, &max, &device) != 4)
--                        break;
-+#else
-+		device = malloc(257);
-+		if (fscanf(f, "%i %lu %lu %256s", &pass, &cur, &max, device) != 4) {
-+			free(device);
-+		}
-+
-+#endif /* HAVE_MSFORMAT */
-+			break;
- 
-                 /* Only show one progress counter at max */
-                 if (!locked) {
-Index: systemd-208/src/core/swap.c
-===================================================================
---- systemd-208.orig/src/core/swap.c	2013-09-26 11:20:30.000000000 -0700
-+++ systemd-208/src/core/swap.c	2013-11-05 22:01:26.776490078 -0800
-@@ -41,6 +41,8 @@
- #include "path-util.h"
- #include "virt.h"
- 
-+#include "config.h"
-+
- static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
-         [SWAP_DEAD] = UNIT_INACTIVE,
-         [SWAP_ACTIVATING] = UNIT_ACTIVATING,
-@@ -1041,6 +1043,7 @@
-                 _cleanup_free_ char *dev = NULL, *d = NULL;
-                 int prio = 0, k;
- 
-+#ifdef HAVE_MSFORMAT
-                 k = fscanf(m->proc_swaps,
-                            "%ms "  /* device/file */
-                            "%*s "  /* type of swap */
-@@ -1048,6 +1051,16 @@
-                            "%*s "  /* used */
-                            "%i\n", /* priority */
-                            &dev, &prio);
-+#else
-+                dev = malloc(257);
-+                k = fscanf(m->proc_swaps,
-+                           "%256s "/* device/file */
-+                           "%*s "  /* type of swap */
-+                           "%*s "  /* swap size */
-+                           "%*s "  /* used */
-+                           "%i\n", /* priority */
-+                           dev, &prio);
-+#endif /* HAVE_MSFORMAT */
-                 if (k != 2) {
-                         if (k == EOF)
-                                 break;
-Index: systemd-208/src/core/mount-setup.c
-===================================================================
---- systemd-208.orig/src/core/mount-setup.c	2013-08-13 13:02:46.000000000 -0700
-+++ systemd-208/src/core/mount-setup.c	2013-11-05 22:01:26.776490078 -0800
-@@ -28,6 +28,7 @@
- #include <assert.h>
- #include <unistd.h>
- #include <ftw.h>
-+#include <linux/fs.h>
- 
- #include "mount-setup.h"
- #include "dev-setup.h"
-@@ -43,6 +44,8 @@
- #include "virt.h"
- #include "efivars.h"
- 
-+#include "config.h"
-+
- #ifndef TTY_GID
- #define TTY_GID 5
- #endif
-@@ -233,9 +236,12 @@
-         for (;;) {
-                 char *controller;
-                 int enabled = 0;
--
-+#ifdef HAVE_MSFORMAT
-                 if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
--
-+#else
-+		controller = malloc(257);
-+                if (fscanf(f, "%256s %*i %*i %i", controller, &enabled) != 2) {
-+#endif /* HAVE_MSFORMAT */
-                         if (feof(f))
-                                 break;
- 
-Index: systemd-208/src/core/mount.c
-===================================================================
---- systemd-208.orig/src/core/mount.c	2013-09-26 11:20:30.000000000 -0700
-+++ systemd-208/src/core/mount.c	2013-11-05 22:07:43.784497482 -0800
-@@ -43,6 +43,8 @@
- #include "exit-status.h"
- #include "def.h"
- 
-+#include "config.h"
-+
- static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
-         [MOUNT_DEAD] = UNIT_INACTIVE,
-         [MOUNT_MOUNTING] = UNIT_ACTIVATING,
-@@ -1559,6 +1561,7 @@
-                 _cleanup_free_ char *device = NULL, *path = NULL, *options = NULL, *options2 = NULL, *fstype = NULL, *d = NULL, *p = NULL, *o = NULL;
-                 int k;
- 
-+#ifdef HAVE_MSFORMAT
-                 k = fscanf(m->proc_self_mountinfo,
-                            "%*s "       /* (1) mount id */
-                            "%*s "       /* (2) parent id */
-@@ -1577,7 +1580,31 @@
-                            &fstype,
-                            &device,
-                            &options2);
--
-+#else
-+                path = malloc(257);
-+                options = malloc(257);
-+                fstype = malloc(257);
-+                device = malloc(257);
-+                options2 = malloc(257);
-+                k = fscanf(m->proc_self_mountinfo,
-+                           "%*s "       /* (1) mount id */
-+                           "%*s "       /* (2) parent id */
-+                           "%*s "       /* (3) major:minor */
-+                           "%*s "       /* (4) root */
-+                           "%256s "     /* (5) mount point */
-+                           "%256s"      /* (6) mount options */
-+                           "%*[^-]"     /* (7) optional fields */
-+                           "- "         /* (8) separator */
-+                           "%256s "     /* (9) file system type */
-+                           "%256s"      /* (10) mount source */
-+                           "%256s"      /* (11) mount options 2 */
-+                           "%*[^\n]",   /* some rubbish at the end */
-+                           path,
-+                           options,
-+                           fstype,
-+                           device,
-+                           options2);
-+#endif /* HAVE_MSFORMAT */
-                 if (k == EOF)
-                         break;
- 
-Index: systemd-208/src/core/umount.c
-===================================================================
---- systemd-208.orig/src/core/umount.c	2013-08-13 13:02:46.000000000 -0700
-+++ systemd-208/src/core/umount.c	2013-11-05 22:01:26.776490078 -0800
-@@ -36,6 +36,8 @@
- #include "util.h"
- #include "virt.h"
- 
-+#include "config.h"
-+
- typedef struct MountPoint {
-         char *path;
-         dev_t devnum;
-@@ -75,7 +77,7 @@
-                 MountPoint *m;
- 
-                 path = p = NULL;
--
-+#ifdef HAVE_MSFORMAT
-                 if ((k = fscanf(proc_self_mountinfo,
-                                 "%*s "       /* (1) mount id */
-                                 "%*s "       /* (2) parent id */
-@@ -90,6 +92,23 @@
-                                 "%*s"        /* (11) mount options 2 */
-                                 "%*[^\n]",   /* some rubbish at the end */
-                                 &path)) != 1) {
-+#else
-+		path = malloc(257);
-+                if ((k = fscanf(proc_self_mountinfo,
-+                                "%*s "       /* (1) mount id */
-+                                "%*s "       /* (2) parent id */
-+                                "%*s "       /* (3) major:minor */
-+                                "%*s "       /* (4) root */
-+                                "%256s "     /* (5) mount point */
-+                                "%*s"        /* (6) mount options */
-+                                "%*[^-]"     /* (7) optional fields */
-+                                "- "         /* (8) separator */
-+                                "%*s "       /* (9) file system type */
-+                                "%*s"        /* (10) mount source */
-+                                "%*s"        /* (11) mount options 2 */
-+                                "%*[^\n]",   /* some rubbish at the end */
-+                                path)) != 1) {
-+#endif /* HAVE_MSFORMAT */
-                         if (k == EOF)
-                                 break;
- 
-@@ -151,7 +170,7 @@
-                 MountPoint *swap;
-                 char *dev = NULL, *d;
-                 int k;
--
-+#ifdef HAVE_MSFORMAT
-                 if ((k = fscanf(proc_swaps,
-                                 "%ms " /* device/file */
-                                 "%*s " /* type of swap */
-@@ -159,7 +178,16 @@
-                                 "%*s " /* used */
-                                 "%*s\n", /* priority */
-                                 &dev)) != 1) {
--
-+#else
-+		dev = malloc(257);
-+                if ((k = fscanf(proc_swaps,
-+                                "%256s " /* device/file */
-+                                "%*s " /* type of swap */
-+                                "%*s " /* swap size */
-+                                "%*s " /* used */
-+                                "%*s\n", /* priority */
-+                                dev)) != 1) {
-+#endif /* HAVE_MSFORMAT */
-                         if (k == EOF)
-                                 break;
- 
-Index: systemd-208/src/shared/socket-util.c
-===================================================================
---- systemd-208.orig/src/shared/socket-util.c	2013-09-26 11:20:30.000000000 -0700
-+++ systemd-208/src/shared/socket-util.c	2013-11-05 22:01:26.776490078 -0800
-@@ -40,6 +40,8 @@
- #include "missing.h"
- #include "fileio.h"
- 
-+#include "config.h"
-+
- int socket_address_parse(SocketAddress *a, const char *s) {
-         int r;
-         char *e, *n;
-@@ -203,8 +205,16 @@
-         a->type = SOCK_RAW;
- 
-         errno = 0;
-+#ifdef HAVE_MSFORMAT
-         if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
--                return errno > 0 ? -errno : -EINVAL;
-+                return errno ? -errno : -EINVAL;
-+#else
-+        sfamily = malloc(257);
-+        if (sscanf(s, "%256s %u", sfamily, &group) < 1) {
-+                 free(sfamily);
-+                 return errno ? -errno : -EINVAL;
-+        }
-+#endif /* HAVE_MSFORMAT */
- 
-         family = netlink_family_from_string(sfamily);
-         if (family < 0)
-Index: systemd-208/src/tmpfiles/tmpfiles.c
-===================================================================
---- systemd-208.orig/src/tmpfiles/tmpfiles.c	2013-09-17 14:55:37.000000000 -0700
-+++ systemd-208/src/tmpfiles/tmpfiles.c	2013-11-05 22:01:26.776490078 -0800
-@@ -53,6 +53,8 @@
- #include "capability.h"
- #include "specifier.h"
- 
-+#include "config.h"
-+
- /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
-  * them in the file system. This is intended to be used to create
-  * properly owned directories beneath /tmp, /var/tmp, /run, which are
-@@ -1082,6 +1084,7 @@
-         assert(line >= 1);
-         assert(buffer);
- 
-+#ifdef HAVE_MSFORMAT
-         r = sscanf(buffer,
-                    "%c %ms %ms %ms %ms %ms %n",
-                    &type,
-@@ -1091,6 +1094,29 @@
-                    &group,
-                    &age,
-                    &n);
-+#else
-+        i->path = malloc(257);
-+        mode = malloc(257);
-+        user = malloc(257);
-+        group = malloc(257);
-+        age = malloc(257);
-+        r = sscanf(buffer,
-+                   "%c "
-+                   "%256s "
-+                   "%256s "
-+                   "%256s "
-+                   "%256s "
-+                   "%256s "
-+                   "%n",
-+                   &type,
-+                   i->path,
-+                   mode,
-+                   user,
-+                   group,
-+                   age,
-+                   &n);
-+#endif /* HAVE_MSFORMAT */
-+
-         if (r < 2) {
-                 log_error("[%s:%u] Syntax error.", fname, line);
-                 return -EIO;
-Index: systemd-208/src/cryptsetup/cryptsetup-generator.c
-===================================================================
---- systemd-208.orig/src/cryptsetup/cryptsetup-generator.c	2013-09-30 09:57:04.000000000 -0700
-+++ systemd-208/src/cryptsetup/cryptsetup-generator.c	2013-11-05 22:01:26.776490078 -0800
-@@ -31,6 +31,8 @@
- #include "strv.h"
- #include "fileio.h"
- 
-+#include "config.h"
-+
- static const char *arg_dest = "/tmp";
- static bool arg_enabled = true;
- static bool arg_read_crypttab = true;
-@@ -420,7 +422,16 @@
-                         if (*l == '#' || *l == 0)
-                                 continue;
- 
-+#ifdef HAVE_MSFORMAT
-                         k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options);
-+#else
-+                        name = malloc(257);
-+                        device = malloc(257);
-+                        password = malloc(257);
-+                        options = malloc(257);
-+                        k = sscanf(l, "%256s %256s %256s %256s", name, device, password, options);
-+#endif /* HAVE_MSFORMAT */
-+
-                         if (k < 2 || k > 4) {
-                                 log_error("Failed to parse /etc/crypttab:%u, ignoring.", n);
-                                 r = EXIT_FAILURE;
diff --git a/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch b/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch
new file mode 100644
index 0000000..39dfc9e
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch
@@ -0,0 +1,37 @@
+bypass unimplemented _SC_PHYS_PAGES system configuration API in uclibc
+
+Upstream-Status: Inappropriate [uclibc-specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+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) {
diff --git a/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch b/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch
new file mode 100644
index 0000000..15645de
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch
@@ -0,0 +1,19 @@
+Dont include sys/sysinfo.h on uclibc it conflicts with linux/sysinfo.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+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>
diff --git a/meta/recipes-core/systemd/systemd_208.bb b/meta/recipes-core/systemd/systemd_211.bb
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
--- a/meta/recipes-core/systemd/systemd_208.bb
+++ b/meta/recipes-core/systemd/systemd_211.bb
@@ -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 \
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/7] systemd-211 upgrade and uclibc fixes
  2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
                   ` (6 preceding siblings ...)
  2014-03-16  5:42 ` [PATCH 7/7] Upgrade to systemd 211+ Khem Raj
@ 2014-03-17 11:31 ` Richard Purdie
  2014-03-17 11:41   ` Martin Jansa
  2014-03-17 16:06   ` Khem Raj
  7 siblings, 2 replies; 22+ messages in thread
From: Richard Purdie @ 2014-03-17 11:31 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On Sat, 2014-03-15 at 22:42 -0700, Khem Raj wrote:
> 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+

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




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/7] systemd-211 upgrade and uclibc fixes
  2014-03-17 11:31 ` [PATCH 0/7] systemd-211 upgrade and uclibc fixes Richard Purdie
@ 2014-03-17 11:41   ` Martin Jansa
  2014-03-17 12:29     ` Richard Purdie
  2014-03-17 16:06   ` Khem Raj
  1 sibling, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2014-03-17 11:41 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2374 bytes --]

On Mon, Mar 17, 2014 at 11:31:16AM +0000, Richard Purdie wrote:
> On Sat, 2014-03-15 at 22:42 -0700, Khem Raj wrote:
> > 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+
> 
> 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

> 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
> 
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/7] systemd-211 upgrade and uclibc fixes
  2014-03-17 11:41   ` Martin Jansa
@ 2014-03-17 12:29     ` Richard Purdie
  0 siblings, 0 replies; 22+ messages in thread
From: Richard Purdie @ 2014-03-17 12:29 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Mon, 2014-03-17 at 12:41 +0100, Martin Jansa wrote:
> On Mon, Mar 17, 2014 at 11:31:16AM +0000, Richard Purdie wrote:
> > On Sat, 2014-03-15 at 22:42 -0700, Khem Raj wrote:
> > > 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+
> > 
> > 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/

> 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



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/7] systemd-211 upgrade and uclibc fixes
  2014-03-17 11:31 ` [PATCH 0/7] systemd-211 upgrade and uclibc fixes Richard Purdie
  2014-03-17 11:41   ` Martin Jansa
@ 2014-03-17 16:06   ` Khem Raj
  2014-03-17 21:52     ` Richard Purdie
  1 sibling, 1 reply; 22+ messages in thread
From: Khem Raj @ 2014-03-17 16:06 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Mon, Mar 17, 2014 at 4:31 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Sat, 2014-03-15 at 22:42 -0700, Khem Raj wrote:
>> 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+
>
> 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.


>
> 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.

>
> Cheers,
>
> Richard
>
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/7] systemd-211 upgrade and uclibc fixes
  2014-03-17 16:06   ` Khem Raj
@ 2014-03-17 21:52     ` Richard Purdie
  2014-03-17 22:05       ` Martin Jansa
  0 siblings, 1 reply; 22+ messages in thread
From: Richard Purdie @ 2014-03-17 21:52 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Mon, 2014-03-17 at 09:06 -0700, Khem Raj wrote:
> On Mon, Mar 17, 2014 at 4:31 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Sat, 2014-03-15 at 22:42 -0700, Khem Raj wrote:
> >> 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+
> >
> > 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.
> 
> 
> >
> > 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.

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

Cheers,

Richard



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/7] systemd-211 upgrade and uclibc fixes
  2014-03-17 21:52     ` Richard Purdie
@ 2014-03-17 22:05       ` Martin Jansa
  2014-03-17 22:42         ` Khem Raj
  0 siblings, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2014-03-17 22:05 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3286 bytes --]

On Mon, Mar 17, 2014 at 09:52:55PM +0000, Richard Purdie wrote:
> On Mon, 2014-03-17 at 09:06 -0700, Khem Raj wrote:
> > On Mon, Mar 17, 2014 at 4:31 AM, Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > > On Sat, 2014-03-15 at 22:42 -0700, Khem Raj wrote:
> > >> 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+
> > >
> > > 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.
> > 
> > 
> > >
> > > 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.
> 
> 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.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/7] systemd-211 upgrade and uclibc fixes
  2014-03-17 22:05       ` Martin Jansa
@ 2014-03-17 22:42         ` Khem Raj
  0 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-17 22:42 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Mon, Mar 17, 2014 at 3:05 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Mon, Mar 17, 2014 at 09:52:55PM +0000, Richard Purdie wrote:
>> On Mon, 2014-03-17 at 09:06 -0700, Khem Raj wrote:
>> > On Mon, Mar 17, 2014 at 4:31 AM, Richard Purdie
>> > <richard.purdie@linuxfoundation.org> wrote:
>> > > On Sat, 2014-03-15 at 22:42 -0700, Khem Raj wrote:
>> > >> 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+
>> > >
>> > > 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.
>> >
>> >
>> > >
>> > > 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.
>>
>> 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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 4/7] glib-2.0: Fix localedir expectations for uclibc
  2014-03-16  5:42 ` [PATCH 4/7] glib-2.0: Fix localedir expectations " Khem Raj
@ 2014-03-18 11:13   ` Burton, Ross
  2014-03-18 14:19     ` Khem Raj
  0 siblings, 1 reply; 22+ messages in thread
From: Burton, Ross @ 2014-03-18 11:13 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core

On 16 March 2014 05:42, Khem Raj <raj.khem@gmail.com> wrote:
> ++          *-*-openbsd* | *-*-linux-uclibc*)

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

Ross


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 4/7] glib-2.0: Fix localedir expectations for uclibc
  2014-03-18 11:13   ` Burton, Ross
@ 2014-03-18 14:19     ` Khem Raj
  0 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2014-03-18 14:19 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

On Tuesday, March 18, 2014, Burton, Ross <ross.burton@intel.com> wrote:

> On 16 March 2014 05:42, Khem Raj <raj.khem@gmail.com <javascript:;>>
> wrote:
> > ++          *-*-openbsd* | *-*-linux-uclibc*)
>
> Does uclibc have the same file naming as bsd?  eglibc uses .gmo.
>
>
It uses .mo


> Ross
>

[-- Attachment #2: Type: text/html, Size: 735 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
  2014-03-16  5:42 ` [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms' Khem Raj
@ 2014-03-26  1:19   ` Robert Yang
  2014-03-26  1:20     ` Khem Raj
  0 siblings, 1 reply; 22+ messages in thread
From: Robert Yang @ 2014-03-26  1:19 UTC (permalink / raw)
  To: Khem Raj, openembedded-core


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

On 03/16/2014 01:42 PM, Khem Raj wrote:
> 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
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/util-linux/util-linux_2.24.1.bb b/meta/recipes-core/util-linux/util-linux_2.24.1.bb
> index b08d68d..aa98b65 100644
> --- a/meta/recipes-core/util-linux/util-linux_2.24.1.bb
> +++ b/meta/recipes-core/util-linux/util-linux_2.24.1.bb
> @@ -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 \
>   "
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
  2014-03-26  1:19   ` Robert Yang
@ 2014-03-26  1:20     ` Khem Raj
  2014-03-26  3:33       ` Robert Yang
  0 siblings, 1 reply; 22+ messages in thread
From: Khem Raj @ 2014-03-26  1:20 UTC (permalink / raw)
  To: Robert Yang; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3843 bytes --]

whats native glibc version on build host

-Khem
On Mar 25, 2014 6:19 PM, "Robert Yang" <liezhi.yang@windriver.com> wrote:

>
> 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
>
> On 03/16/2014 01:42 PM, Khem Raj wrote:
>
>> 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
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>   meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/util-linux/util-linux_2.24.1.bbb/meta/recipes-core/util-
>> linux/util-linux_2.24.1.bb
>> index b08d68d..aa98b65 100644
>> --- a/meta/recipes-core/util-linux/util-linux_2.24.1.bb
>> +++ b/meta/recipes-core/util-linux/util-linux_2.24.1.bb
>> @@ -17,7 +17,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch
>> \
>>   SRC_URI[md5sum] = "88d46ae23ca599ac5af9cf96b531590f"
>>   SRC_URI[sha256sum] = "835eb6232cfab0118ef2e4fd649de0
>> ba9f5bd1b8cbf9a7d4d84594541dec8410"
>>
>> -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 \
>>   "
>>
>>

[-- Attachment #2: Type: text/html, Size: 5014 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
  2014-03-26  1:20     ` Khem Raj
@ 2014-03-26  3:33       ` Robert Yang
  2014-03-26  3:47         ` Khem Raj
  0 siblings, 1 reply; 22+ messages in thread
From: Robert Yang @ 2014-03-26  3:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer



On 03/26/2014 09:20 AM, Khem Raj wrote:
> whats native glibc version on build host
>

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

// Robert

> -Khem
> On Mar 25, 2014 6:19 PM, "Robert Yang" <liezhi.yang@windriver.com> wrote:
>
>>
>> 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
>>
>> On 03/16/2014 01:42 PM, Khem Raj wrote:
>>
>>> 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
>>>
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> ---
>>>    meta/recipes-core/util-linux/util-linux_2.24.1.bb | 3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-core/util-linux/util-linux_2.24.1.bbb/meta/recipes-core/util-
>>> linux/util-linux_2.24.1.bb
>>> index b08d68d..aa98b65 100644
>>> --- a/meta/recipes-core/util-linux/util-linux_2.24.1.bb
>>> +++ b/meta/recipes-core/util-linux/util-linux_2.24.1.bb
>>> @@ -17,7 +17,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch
>>> \
>>>    SRC_URI[md5sum] = "88d46ae23ca599ac5af9cf96b531590f"
>>>    SRC_URI[sha256sum] = "835eb6232cfab0118ef2e4fd649de0
>>> ba9f5bd1b8cbf9a7d4d84594541dec8410"
>>>
>>> -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 \
>>>    "
>>>
>>>
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
  2014-03-26  3:33       ` Robert Yang
@ 2014-03-26  3:47         ` Khem Raj
  2014-03-26  5:05           ` Robert Yang
  0 siblings, 1 reply; 22+ messages in thread
From: Khem Raj @ 2014-03-26  3:47 UTC (permalink / raw)
  To: Robert Yang; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]


On Mar 25, 2014, at 8:33 PM, Robert Yang <liezhi.yang@windriver.com> wrote:

> 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

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'
  2014-03-26  3:47         ` Khem Raj
@ 2014-03-26  5:05           ` Robert Yang
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Yang @ 2014-03-26  5:05 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer



On 03/26/2014 11:47 AM, Khem Raj wrote:
>
> On Mar 25, 2014, at 8:33 PM, Robert Yang <liezhi.yang@windriver.com> wrote:
>
>> 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

> that should be an ok fix.
> -Khem
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-03-26  5:05 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-16  5:42 [PATCH 0/7] systemd-211 upgrade and uclibc fixes Khem Raj
2014-03-16  5:42 ` [PATCH 1/7] uclibc: Implement clock_adjtime() Khem Raj
2014-03-16  5:42 ` [PATCH 2/7] uclibc: Remove iconv.h Khem Raj
2014-03-16  5:42 ` [PATCH 3/7] gnutls: Link in pthread explicitly for uclibc Khem Raj
2014-03-16  5:42 ` [PATCH 4/7] glib-2.0: Fix localedir expectations " Khem Raj
2014-03-18 11:13   ` Burton, Ross
2014-03-18 14:19     ` Khem Raj
2014-03-16  5:42 ` [PATCH 5/7] util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms' Khem Raj
2014-03-26  1:19   ` Robert Yang
2014-03-26  1:20     ` Khem Raj
2014-03-26  3:33       ` Robert Yang
2014-03-26  3:47         ` Khem Raj
2014-03-26  5:05           ` Robert Yang
2014-03-16  5:42 ` [PATCH 6/7] intltool: Define DATADIRNAME=share for uclibc based systems Khem Raj
2014-03-16  5:42 ` [PATCH 7/7] Upgrade to systemd 211+ Khem Raj
2014-03-17 11:31 ` [PATCH 0/7] systemd-211 upgrade and uclibc fixes Richard Purdie
2014-03-17 11:41   ` Martin Jansa
2014-03-17 12:29     ` Richard Purdie
2014-03-17 16:06   ` Khem Raj
2014-03-17 21:52     ` Richard Purdie
2014-03-17 22:05       ` Martin Jansa
2014-03-17 22:42         ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.