Accepting request 141318 from home:fcrozat:branches:Base:System

- /var/log/journal is now only provided by systemd-logger (journal
  won't be persistent for people using another syslog
  implementation).
- install README in /var/log (in systemd-logger) and /etc/init.d
- create adm group when installing systemd.
- fix path in udev-root-symlink.systemd.
- Enforce Requires(post) dependency on libudev in main systemd
  package (help upgrade).
- Ensure configuration is reloaded when upgrading and save random
  seed when installing.
- Create /lib/udev symlink, if we do a fresh install.
- Add fix-build-glibc217.patch: fix build with latest glibc.
- Add libgcrypt.m4: copy of autoconf macro from libgcrypt, only
  used to bootstrap systemd-mini.

OBS-URL: https://build.opensuse.org/request/show/141318
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=311
This commit is contained in:
Andreas Jaeger 2012-11-14 20:14:47 +00:00 committed by Git OBS Bridge
parent b4f3b459fc
commit 7165608664
7 changed files with 242 additions and 11 deletions

32
fix-build-glibc217.patch Normal file
View File

@ -0,0 +1,32 @@
From e17187091d463ad008c0b74eb04de5078b2abb96 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 14 Nov 2012 14:44:05 +0100
Subject: [PATCH] configure.ac: fix FTBFS with new glibc
glibc moved clock_* functions from librt to the core libc. As a result,
clock_gettime is no more a suitable symbol to use when finding librt.
Look for mq_open instead.
Reference:
http://www.sourceware.org/git/gitweb.cgi?p=glibc.git&h=6e6249d0b461b952d0f544792372663feb6d792a
Fixes a FTBFS in Fedora Rawhide.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c4638d1..71ea6ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,7 +171,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
-Wl,-z,now])
AC_SUBST([OUR_LDFLAGS], $with_ldflags)
-AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
+AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
save_LIBS="$LIBS"
--
1.7.10.4

123
libgcrypt.m4 Normal file
View File

@ -0,0 +1,123 @@
dnl Autoconf macros for libgcrypt
dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
dnl
dnl This file is free software; as a special exception the author gives
dnl unlimited permission to copy and/or distribute it, with or without
dnl modifications, as long as this notice is preserved.
dnl
dnl This file is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
dnl with the API version to also check the API compatibility. Example:
dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
dnl this features allows to prevent build against newer versions of libgcrypt
dnl with a changed API.
dnl
AC_DEFUN([AM_PATH_LIBGCRYPT],
[ AC_ARG_WITH(libgcrypt-prefix,
AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
[prefix where LIBGCRYPT is installed (optional)]),
libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
if test x$libgcrypt_config_prefix != x ; then
if test x${LIBGCRYPT_CONFIG+set} != xset ; then
LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
fi
fi
AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
tmp=ifelse([$1], ,1:1.2.0,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
else
req_libgcrypt_api=0
min_libgcrypt_version="$tmp"
fi
AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
ok=no
if test "$LIBGCRYPT_CONFIG" != "no" ; then
req_major=`echo $min_libgcrypt_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $min_libgcrypt_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
req_micro=`echo $min_libgcrypt_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
major=`echo $libgcrypt_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
minor=`echo $libgcrypt_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
micro=`echo $libgcrypt_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
if test "$major" -gt "$req_major"; then
ok=yes
else
if test "$major" -eq "$req_major"; then
if test "$minor" -gt "$req_minor"; then
ok=yes
else
if test "$minor" -eq "$req_minor"; then
if test "$micro" -ge "$req_micro"; then
ok=yes
fi
fi
fi
fi
fi
fi
if test $ok = yes; then
AC_MSG_RESULT([yes ($libgcrypt_config_version)])
else
AC_MSG_RESULT(no)
fi
if test $ok = yes; then
# If we have a recent libgcrypt, we should also check that the
# API is compatible
if test "$req_libgcrypt_api" -gt 0 ; then
tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBGCRYPT API version])
if test "$req_libgcrypt_api" -eq "$tmp" ; then
AC_MSG_RESULT([okay])
else
ok=no
AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
fi
fi
fi
fi
if test $ok = yes; then
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
ifelse([$2], , :, [$2])
if test x"$host" != x ; then
libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
if test x"$libgcrypt_config_host" != xnone ; then
if test x"$libgcrypt_config_host" != x"$host" ; then
AC_MSG_WARN([[
***
*** The config script $LIBGCRYPT_CONFIG was
*** built for $libgcrypt_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-libgcrypt-prefix
*** to specify a matching config script.
***]])
fi
fi
fi
else
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBGCRYPT_CFLAGS)
AC_SUBST(LIBGCRYPT_LIBS)
])

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed Nov 14 17:36:05 UTC 2012 - fcrozat@suse.com
- /var/log/journal is now only provided by systemd-logger (journal
won't be persistent for people using another syslog
implementation).
- install README in /var/log (in systemd-logger) and /etc/init.d
- create adm group when installing systemd.
- fix path in udev-root-symlink.systemd.
- Enforce Requires(post) dependency on libudev in main systemd
package (help upgrade).
- Ensure configuration is reloaded when upgrading and save random
seed when installing.
- Create /lib/udev symlink, if we do a fresh install.
- Add fix-build-glibc217.patch: fix build with latest glibc.
- Add libgcrypt.m4: copy of autoconf macro from libgcrypt, only
used to bootstrap systemd-mini.
-------------------------------------------------------------------
Tue Nov 6 14:40:37 UTC 2012 - coolo@suse.com

View File

@ -86,6 +86,7 @@ Requires: %{udevpkgname} >= 172
Requires: dbus-1 >= 1.4.0
Requires: kbd
Requires: pam-config >= 0.79-5
Requires: pwdutils
Requires: systemd-presets-branding
Requires: util-linux >= 2.21
Requires(post): coreutils
@ -100,6 +101,7 @@ Source3: systemd-sysv-convert
Source4: macros.systemd
Source5: systemd-insserv_conf
Source6: baselibs.conf
Source7: libgcrypt.m4
Source1060: boot.udev
Source1061: write_dev_root_rule
@ -133,6 +135,8 @@ Patch60: var-run-lock.patch
# an exception will be silently removed with the next version update.
# PATCH-FIX-UPSTREAM fix-logind-pty-seat.patch fcrozat@suse.com -- fix logind complaining when doing su/sudo in X terminal
Patch61: fix-logind-pty-seat.patch
# PATCH-FIX-UPSTREAM fix-build-glibc217.patch fcrozat@suse.com -- fix build with latest glibc
Patch62: fix-build-glibc217.patch
# udev patches
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
@ -204,6 +208,7 @@ License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
PreReq: /bin/pidof /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd
Requires(post): lib%{udevpkgname}%{udev_major}
Conflicts: systemd < 39
Conflicts: aaa_base < 11.5
Conflicts: filesystem < 11.5
@ -296,6 +301,11 @@ This package marks the installation to not use syslog but only the journal.
%prep
%setup -q -n systemd-%{version}
# only needed for bootstrap
%if 0%{?bootstrap}
cp %{SOURCE7} m4/
%endif
#udev
%patch1001 -p1
%patch1013 -p1
@ -326,11 +336,10 @@ This package marks the installation to not use syslog but only the journal.
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%build
%if ! 0%{?bootstrap}
autoreconf -fiv
%endif
# prevent pre-generated and distributed files from re-building
find . -name "*.[1-8]" -exec touch '{}' \;
export V=1
@ -426,8 +435,11 @@ rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount
# journal.
rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/coredump.conf
# remove README files for now
rm -f %{buildroot}/var/log/README %{buildroot}/etc/init.d/README
# remove README file for now
rm -f %{buildroot}/etc/init.d/README
%if 0%{?bootstrap}
rm -f %{buildroot}/var/log/README
%endif
# legacy links
ln -s loginctl %{buildroot}%{_bindir}/systemd-loginctl
@ -451,10 +463,15 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants
%fdupes -s %{buildroot}%{_mandir}
%pre
getent group adm >/dev/null || groupadd -r adm
exit 0
%post
/usr/sbin/pam-config -a --systemd >/dev/null 2>&1 || :
/sbin/ldconfig
/usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || :
/usr/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || :
/usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || :
# Try to read default runlevel from the old inittab if it exists
@ -485,6 +502,7 @@ fi
%postun
/sbin/ldconfig
if [ $1 -ge 1 ]; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
/usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
fi
if [ $1 -eq 0 ]; then
@ -511,6 +529,8 @@ if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then
rm /usr/lib/udev
mv /lib/udev /usr/lib
ln -s /usr/lib/udev /lib/udev
elif [ ! -e /lib/udev ]; then
ln -s /usr/lib/udev /lib/udev
fi
# kill daemon if we are not in a chroot
if test -f /proc/1/exe -a -d /proc/1/root ; then
@ -727,7 +747,6 @@ rm -rf %{buildroot}
%dir /var/lib/systemd
%dir /var/lib/systemd/sysv-convert
%dir /var/lib/systemd/migrated
%dir /var/log/journal
%files devel
%defattr(-,root,root,-)
@ -858,6 +877,7 @@ rm -rf %{buildroot}
%files logger
%defattr(-,root,root)
%dir /var/log/journal
/var/log/README
%endif

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed Nov 14 17:36:05 UTC 2012 - fcrozat@suse.com
- /var/log/journal is now only provided by systemd-logger (journal
won't be persistent for people using another syslog
implementation).
- install README in /var/log (in systemd-logger) and /etc/init.d
- create adm group when installing systemd.
- fix path in udev-root-symlink.systemd.
- Enforce Requires(post) dependency on libudev in main systemd
package (help upgrade).
- Ensure configuration is reloaded when upgrading and save random
seed when installing.
- Create /lib/udev symlink, if we do a fresh install.
- Add fix-build-glibc217.patch: fix build with latest glibc.
- Add libgcrypt.m4: copy of autoconf macro from libgcrypt, only
used to bootstrap systemd-mini.
-------------------------------------------------------------------
Tue Nov 6 14:40:37 UTC 2012 - coolo@suse.com

View File

@ -81,6 +81,7 @@ Requires: %{udevpkgname} >= 172
Requires: dbus-1 >= 1.4.0
Requires: kbd
Requires: pam-config >= 0.79-5
Requires: pwdutils
Requires: systemd-presets-branding
Requires: util-linux >= 2.21
Requires(post): coreutils
@ -95,6 +96,7 @@ Source3: systemd-sysv-convert
Source4: macros.systemd
Source5: systemd-insserv_conf
Source6: baselibs.conf
Source7: libgcrypt.m4
Source1060: boot.udev
Source1061: write_dev_root_rule
@ -128,6 +130,8 @@ Patch60: var-run-lock.patch
# an exception will be silently removed with the next version update.
# PATCH-FIX-UPSTREAM fix-logind-pty-seat.patch fcrozat@suse.com -- fix logind complaining when doing su/sudo in X terminal
Patch61: fix-logind-pty-seat.patch
# PATCH-FIX-UPSTREAM fix-build-glibc217.patch fcrozat@suse.com -- fix build with latest glibc
Patch62: fix-build-glibc217.patch
# udev patches
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
@ -199,6 +203,7 @@ License: GPL-2.0
Group: System/Kernel
Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
PreReq: /bin/pidof /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd
Requires(post): lib%{udevpkgname}%{udev_major}
Conflicts: systemd < 39
Conflicts: aaa_base < 11.5
Conflicts: filesystem < 11.5
@ -291,6 +296,11 @@ This package marks the installation to not use syslog but only the journal.
%prep
%setup -q -n systemd-%{version}
# only needed for bootstrap
%if 0%{?bootstrap}
cp %{SOURCE7} m4/
%endif
#udev
%patch1001 -p1
%patch1013 -p1
@ -321,11 +331,10 @@ This package marks the installation to not use syslog but only the journal.
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%build
%if ! 0%{?bootstrap}
autoreconf -fiv
%endif
# prevent pre-generated and distributed files from re-building
find . -name "*.[1-8]" -exec touch '{}' \;
export V=1
@ -421,8 +430,11 @@ rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount
# journal.
rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/coredump.conf
# remove README files for now
rm -f %{buildroot}/var/log/README %{buildroot}/etc/init.d/README
# remove README file for now
rm -f %{buildroot}/etc/init.d/README
%if 0%{?bootstrap}
rm -f %{buildroot}/var/log/README
%endif
# legacy links
ln -s loginctl %{buildroot}%{_bindir}/systemd-loginctl
@ -446,10 +458,15 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants
%fdupes -s %{buildroot}%{_mandir}
%pre
getent group adm >/dev/null || groupadd -r adm
exit 0
%post
/usr/sbin/pam-config -a --systemd >/dev/null 2>&1 || :
/sbin/ldconfig
/usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || :
/usr/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || :
/usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || :
# Try to read default runlevel from the old inittab if it exists
@ -480,6 +497,7 @@ fi
%postun
/sbin/ldconfig
if [ $1 -ge 1 ]; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
/usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
fi
if [ $1 -eq 0 ]; then
@ -506,6 +524,8 @@ if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then
rm /usr/lib/udev
mv /lib/udev /usr/lib
ln -s /usr/lib/udev /lib/udev
elif [ ! -e /lib/udev ]; then
ln -s /usr/lib/udev /lib/udev
fi
# kill daemon if we are not in a chroot
if test -f /proc/1/exe -a -d /proc/1/root ; then
@ -722,7 +742,6 @@ rm -rf %{buildroot}
%dir /var/lib/systemd
%dir /var/lib/systemd/sysv-convert
%dir /var/lib/systemd/migrated
%dir /var/log/journal
%files devel
%defattr(-,root,root,-)
@ -853,6 +872,7 @@ rm -rf %{buildroot}
%files logger
%defattr(-,root,root)
%dir /var/log/journal
/var/log/README
%endif

View File

@ -6,4 +6,4 @@ DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/udev/write_dev_root_rule
ExecStart=/usr/lib/udev/write_dev_root_rule