- Add tty1.patch: ensure passphrase are handled before starting
gettty on tty1. - Add inittab generator, creating default.target at startup based on /etc/inittab value. - No longer try to create /etc/systemd/system/default.target at initial package install (bnc#707418) - Fix configuration path used for systemd user manager. - Ensure pam-config output is no display in install script. - Remove buildrequires on vala, no longer needed. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=183
This commit is contained in:
parent
793b6d2515
commit
49c1b450dd
@ -0,0 +1,25 @@
|
||||
From 1cf32c016f97b2c99d7df06ce5d5b858f86c507a Mon Sep 17 00:00:00 2001
|
||||
From: Frederic Crozat <fcrozat@suse.com>
|
||||
Date: Wed, 24 Aug 2011 13:39:06 +0200
|
||||
Subject: [PATCH] path-lookup: monitor /etc/systemd/user for user manager
|
||||
|
||||
---
|
||||
src/path-lookup.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/path-lookup.c b/src/path-lookup.c
|
||||
index bed9175..5f5ad8c 100644
|
||||
--- a/src/path-lookup.c
|
||||
+++ b/src/path-lookup.c
|
||||
@@ -209,7 +209,7 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal
|
||||
* the arrays in user_dirs() above! */
|
||||
"/run/systemd/user",
|
||||
USER_CONFIG_UNIT_PATH,
|
||||
- "/etc/systemd/system",
|
||||
+ "/etc/systemd/user",
|
||||
"/usr/local/lib/systemd/user",
|
||||
"/usr/local/share/systemd/user",
|
||||
USER_DATA_UNIT_PATH,
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,68 +0,0 @@
|
||||
From 148ded5c56d62dc358f566d322ea96dddfdd8faf Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 4 Jul 2011 18:59:54 +0200
|
||||
Subject: [PATCH 1/2] password-agent: make sure not to access unallocated memory
|
||||
|
||||
Tracked down by Frederic Crozat
|
||||
---
|
||||
src/tty-ask-password-agent.c | 14 ++++++++------
|
||||
1 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/tty-ask-password-agent.c b/src/tty-ask-password-agent.c
|
||||
index d7e1eba..bee2f97 100644
|
||||
--- a/src/tty-ask-password-agent.c
|
||||
+++ b/src/tty-ask-password-agent.c
|
||||
@@ -376,12 +376,14 @@ static int parse_password(const char *filename, char **wall) {
|
||||
release_terminal();
|
||||
}
|
||||
|
||||
- packet_length = 1+strlen(password)+1;
|
||||
- if (!(packet = new(char, packet_length)))
|
||||
- r = -ENOMEM;
|
||||
- else {
|
||||
- packet[0] = '+';
|
||||
- strcpy(packet+1, password);
|
||||
+ if (r >= 0) {
|
||||
+ packet_length = 1+strlen(password)+1;
|
||||
+ if (!(packet = new(char, packet_length)))
|
||||
+ r = -ENOMEM;
|
||||
+ else {
|
||||
+ packet[0] = '+';
|
||||
+ strcpy(packet+1, password);
|
||||
+ }
|
||||
}
|
||||
|
||||
free(password);
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
|
||||
From 722dad411964f71adc0a22a74609d35308c8ab9b Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 4 Jul 2011 19:06:32 +0200
|
||||
Subject: [PATCH 2/2] password-agent: actually really don't access unallocated memory
|
||||
|
||||
Fix for 9726f9ff11fa7b94dceed2972cd2453a08b9ee6a
|
||||
---
|
||||
src/tty-ask-password-agent.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/tty-ask-password-agent.c b/src/tty-ask-password-agent.c
|
||||
index bee2f97..70d33ea 100644
|
||||
--- a/src/tty-ask-password-agent.c
|
||||
+++ b/src/tty-ask-password-agent.c
|
||||
@@ -384,9 +384,9 @@ static int parse_password(const char *filename, char **wall) {
|
||||
packet[0] = '+';
|
||||
strcpy(packet+1, password);
|
||||
}
|
||||
- }
|
||||
|
||||
- free(password);
|
||||
+ free(password);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (r == -ETIME || r == -ENOENT) {
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,103 +0,0 @@
|
||||
From 06238c421548f9af6ebebd54eba99bba2a2049d4 Mon Sep 17 00:00:00 2001
|
||||
From: Frederic Crozat <fcrozat@suse.com>
|
||||
Date: Thu, 7 Jul 2011 14:56:30 +0200
|
||||
Subject: [PATCH] units: add units for boot.local/halt.local on SUSE distributions.
|
||||
|
||||
---
|
||||
Makefile.am | 19 +++++++++++++++++++
|
||||
units/suse/halt-local.service | 20 ++++++++++++++++++++
|
||||
units/suse/rc-local.service | 18 ++++++++++++++++++
|
||||
3 files changed, 57 insertions(+), 0 deletions(-)
|
||||
create mode 100644 units/suse/halt-local.service
|
||||
create mode 100644 units/suse/rc-local.service
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 78e5caf..d3265b0 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -436,6 +436,12 @@ dist_systemunit_DATA += \
|
||||
units/frugalware/display-manager.service
|
||||
endif
|
||||
|
||||
+if TARGET_SUSE
|
||||
+dist_systemunit_DATA += \
|
||||
+ units/suse/rc-local.service \
|
||||
+ units/suse/halt-local.service
|
||||
+endif
|
||||
+
|
||||
if HAVE_PLYMOUTH
|
||||
dist_systemunit_DATA += \
|
||||
units/plymouth-start.service \
|
||||
@@ -1689,6 +1695,19 @@ if TARGET_DEBIAN_OR_UBUNTU
|
||||
$(LN_S) multi-user.target runlevel5.target )
|
||||
endif
|
||||
|
||||
+if TARGET_SUSE
|
||||
+ $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
|
||||
+ ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
|
||||
+ rm -f rc-local.service && \
|
||||
+ $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
|
||||
+ ( cd $(DESTDIR)$(systemunitdir) && \
|
||||
+ rm -f local.service && \
|
||||
+ $(LN_S) rc-local.service local.service )
|
||||
+ ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
|
||||
+ rm -f halt-local.service && \
|
||||
+ $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
|
||||
+endif
|
||||
+
|
||||
if HAVE_SYSV_COMPAT
|
||||
( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \
|
||||
rm -f var-lock.mount && \
|
||||
diff --git a/units/suse/halt-local.service b/units/suse/halt-local.service
|
||||
new file mode 100644
|
||||
index 0000000..68cacc6
|
||||
--- /dev/null
|
||||
+++ b/units/suse/halt-local.service
|
||||
@@ -0,0 +1,20 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
+# systemd is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+[Unit]
|
||||
+Description=/etc/init.d/halt.local Compatibility
|
||||
+ConditionPathExists=/etc/init.d/halt.local
|
||||
+DefaultDependencies=no
|
||||
+After=shutdown.target
|
||||
+Before=final.target
|
||||
+
|
||||
+[Service]
|
||||
+Type=oneshot
|
||||
+ExecStart=/etc/init.d/halt.local
|
||||
+TimeoutSec=0
|
||||
+StandardOutput=tty
|
||||
+RemainAfterExit=yes
|
||||
diff --git a/units/suse/rc-local.service b/units/suse/rc-local.service
|
||||
new file mode 100644
|
||||
index 0000000..38884c5
|
||||
--- /dev/null
|
||||
+++ b/units/suse/rc-local.service
|
||||
@@ -0,0 +1,18 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
+# systemd is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+[Unit]
|
||||
+Description=/etc/init.d/boot.local Compatibility
|
||||
+ConditionPathExists=/etc/init.d/boot.local
|
||||
+
|
||||
+[Service]
|
||||
+Type=oneshot
|
||||
+ExecStart=/etc/init.d/boot.local
|
||||
+TimeoutSec=0
|
||||
+StandardOutput=tty
|
||||
+RemainAfterExit=yes
|
||||
+SysVStartPriority=99
|
||||
--
|
||||
1.7.3.4
|
||||
|
8
systemd-inittab
Normal file
8
systemd-inittab
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Try to read default runlevel from the old inittab if it exists
|
||||
runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
|
||||
if [ -n "$runlevel" -a -e /lib/systemd/system/runlevel$runlevel.target ] ; then
|
||||
/bin/ln -sf /lib/systemd/system/runlevel$runlevel.target $1/default.target 2>&1 && exit 0
|
||||
fi
|
||||
#failsafe
|
||||
/bin/ln -sf /lib/systemd/system/graphical.target $1/default.target
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 24 13:02:12 UTC 2011 - fcrozat@novell.com
|
||||
|
||||
- Add tty1.patch: ensure passphrase are handled before starting
|
||||
gettty on tty1.
|
||||
- Add inittab generator, creating default.target at startup based
|
||||
on /etc/inittab value.
|
||||
- No longer try to create /etc/systemd/system/default.target at
|
||||
initial package install (bnc#707418)
|
||||
- Fix configuration path used for systemd user manager.
|
||||
- Ensure pam-config output is no display in install script.
|
||||
- Remove buildrequires on vala, no longer needed.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 19 15:29:49 UTC 2011 - fcrozat@suse.com
|
||||
|
||||
|
24
systemd.spec
24
systemd.spec
@ -36,7 +36,7 @@ BuildRequires: tcpd-devel
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: libcryptsetup-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: gtk2-devel libnotify-devel libxslt-devel vala
|
||||
BuildRequires: gtk2-devel libnotify-devel libxslt-devel
|
||||
BuildRequires: libselinux-devel libsepol-devel
|
||||
BuildRequires: intltool
|
||||
Requires: udev >= 172
|
||||
@ -51,9 +51,12 @@ Source1: systemd-rpmlintrc
|
||||
Source2: localfs.service
|
||||
Source3: systemd-sysv-convert
|
||||
Source4: macros.systemd
|
||||
Source5: systemd-inittab
|
||||
Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.patch
|
||||
# handle SUSE specific kbd settings
|
||||
Patch6: 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch
|
||||
# don't start getty on tty1 until all password request are done
|
||||
Patch8: tty1.patch
|
||||
|
||||
# Upstream First - Policy:
|
||||
# Never add any patches to this package without the upstream commit id
|
||||
@ -69,6 +72,8 @@ Patch4: systemd-cryptsetup-query.patch
|
||||
Patch5: fix-crash.patch
|
||||
# PATCH-FIX-UPSTREAM fcrozat@suse.com bnc671673 -- fix kexec support
|
||||
Patch7: 0001-initctl-check-for-kexec_loaded-when-reboot-is-reques.patch
|
||||
# PATCH-FIX-UPSTREAM fcrozat@suse.com -- don't look for system manager configuration when running user manager
|
||||
Patch9: 0001-path-lookup-monitor-etc-systemd-user-for-user-manage.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -135,6 +140,8 @@ Plymouth integration for systemd
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
autoreconf -fiv
|
||||
@ -147,8 +154,6 @@ export V=1
|
||||
--docdir=%{_docdir}/systemd \
|
||||
--with-rootdir= \
|
||||
CFLAGS="%{optflags}"
|
||||
# rebuild due to libnotify 0.7 in factory
|
||||
touch *.vala */*.vala
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
@ -158,6 +163,7 @@ install -m644 %{S:4} %{buildroot}%{_sysconfdir}/rpm
|
||||
find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
|
||||
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated}
|
||||
install -m755 %{S:3} -D %{buildroot}%{_sbindir}/systemd-sysv-convert
|
||||
install -m755 %{S:5} %{buildroot}/lib/systemd/system-generators
|
||||
ln -s ../bin/systemd %{buildroot}/sbin/init
|
||||
ln -s ../bin/systemctl %{buildroot}/sbin/reboot
|
||||
ln -s ../bin/systemctl %{buildroot}/sbin/halt
|
||||
@ -167,6 +173,7 @@ ln -s ../bin/systemctl %{buildroot}/sbin/telinit
|
||||
ln -s ../bin/systemctl %{buildroot}/sbin/runlevel
|
||||
rm -rf %{buildroot}/etc/systemd/system/*.target.wants
|
||||
rm -f %{buildroot}/etc/systemd/system/default.target
|
||||
rm -f %{buildroot}/lib/systemd/system/default.target
|
||||
%if !%{build_plymouth}
|
||||
rm -f %{buildroot}/lib/systemd/system/plymouth-*.service
|
||||
rm -f %{buildroot}/lib/systemd/system/*.wants/plymouth-*.service
|
||||
@ -197,19 +204,14 @@ ln -s systemd-random-seed-load.service %{buildroot}/lib/systemd/system/random.se
|
||||
%endif
|
||||
|
||||
%post
|
||||
/usr/sbin/pam-config -a --systemd || :
|
||||
/usr/sbin/pam-config -a --systemd >/dev/null 2>&1 || :
|
||||
/sbin/ldconfig
|
||||
/bin/systemd-machine-id-setup >/dev/null 2>&1 || :
|
||||
/bin/systemctl daemon-reexec >/dev/null 2>&1 || :
|
||||
/sbin/ldconfig
|
||||
|
||||
# Create default config in /etc at first install.
|
||||
# Later package updates should not overwrite these settings.
|
||||
if [ "$1" -eq 1 ]; then
|
||||
# Try to read default runlevel from the old inittab if it exists
|
||||
runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
|
||||
if [ -n "$runlevel" ] ; then
|
||||
/bin/ln -sf /lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target 2>&1 || :
|
||||
fi
|
||||
# Enable these services by default.
|
||||
/bin/systemctl enable \
|
||||
getty@.service \
|
||||
@ -224,7 +226,7 @@ if [ $1 -ge 1 ]; then
|
||||
/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
if [ $1 -eq 0 ]; then
|
||||
/usr/sbin/pam-config -d --systemd || :
|
||||
/usr/sbin/pam-config -d --systemd >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%preun
|
||||
|
Loading…
Reference in New Issue
Block a user