SHA256
1
0
forked from pool/systemd

Accepting request 147543 from Base:System

- udevd: add missing ':' to getopt_long 'e'.
  add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and
  systemd patches.
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).

- udevd: add missing ':' to getopt_long 'e'.
  add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and
  systemd patches. 
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).

OBS-URL: https://build.opensuse.org/request/show/147543
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=119
This commit is contained in:
Stephan Kulow 2013-01-08 20:14:07 +00:00 committed by Git OBS Bridge
parent 963624c00d
commit a4cc02351c
12 changed files with 112 additions and 64 deletions

View File

@ -0,0 +1,27 @@
From 5bbbe461fd4d133eac49f41210e2fd4846f577d8 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Wed, 19 Dec 2012 13:12:26 +0100
Subject: [PATCH] udevd: add missing ':' to getopt_long 'e'
Parameter -e is set without additional argument in getopt
and this leads to segfault when calling 'systemd-udevd -e'.
---
src/udev/udevd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index ebd601e..ffc48a0 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1097,7 +1097,7 @@ int main(int argc, char *argv[])
for (;;) {
int option;
- option = getopt_long(argc, argv, "c:deDtN:hV", options, NULL);
+ option = getopt_long(argc, argv, "c:de:DtN:hV", options, NULL);
if (option == -1)
break;
--
1.7.7

View File

@ -14,19 +14,22 @@
. /etc/rc.status
PATH="/sbin:/bin"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
DAEMON="@@SYSTEMD@@/systemd-udevd"
UDEVADM="@@BINDIR@@/udevadm"
WRITERULE="@@PREFIX@@/write_dev_root_rule"
udev_timeout=180
case "$1" in
start)
# create /dev/root symlink with dynamic rule
if [ -x /lib/udev/write_dev_root_rule ]; then
/lib/udev/write_dev_root_rule
if [ -x ${WRITERULE} ]; then
${WRITERULE} >/dev/null 2>&1 || true
fi
# start udevd
echo -n "Starting udevd: "
/sbin/udevd --daemon
${DAEMON} --daemon
if [ $? -ne 0 ]; then
rc_status -v
rc_exit
@ -35,42 +38,32 @@ case "$1" in
# trigger events for all devices
echo -n "Loading drivers, configuring devices: "
/sbin/udevadm trigger --type=subsystems --action=add
/sbin/udevadm trigger --type=devices --action=add
${UDEVADM} trigger --type=subsystems --action=add
${UDEVADM} trigger --type=devices --action=add
# wait for events to finish
/sbin/udevadm settle --timeout=$udev_timeout
${UDEVADM} settle --timeout=$udev_timeout
rc_status -v
;;
stop)
echo -n "Stopping udevd: "
killproc /sbin/udevd
killproc ${DAEMON}
rc_status -v
;;
restart)
echo -n "Restarting udevd: "
killproc /sbin/udevd
/sbin/udevd --daemon
killproc ${DAEMON}
${DAEMON} --daemon
rc_status -v
;;
status)
echo -n "Checking for udevd: "
checkproc /sbin/udevd
checkproc ${DAEMON}
rc_status -v
;;
reload)
echo -n "Reloading udev rules: "
/sbin/udevadm control --reload-rules
rc_status -v
;;
force-reload)
echo -n "Restarting udev and reconfiguring all devices: "
killproc /sbin/udevd
rm -rf /dev/.udev /dev/disk
root_symlink_rule
/sbin/udevd --daemon
/sbin/udevadm trigger --action=add
/sbin/udevadm settle --timeout=$udev_timeout
reload|force-reload)
echo -n "Reloading udevd: "
killproc -G -HUP ${DAEMON}
rc_status -v
;;
*)

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Jan 8 12:47:43 UTC 2013 - rmilasan@suse.com
- udevd: add missing ':' to getopt_long 'e'.
add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and
systemd patches.
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).
-------------------------------------------------------------------
Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package systemd-mini
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -164,19 +164,20 @@ Patch74: detect-btrfs-ssd.patch
Patch75: timedated-donot-close-bogus-dbus-connection.patch
# udev patches
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
Patch1001: 0001-Reinstate-TIMEOUT-handling.patch
# PATCH-FIX-OPENSUSE 0013-re-enable-by_path-links-for-ata-devices.patch
Patch1013: 0013-re-enable-by_path-links-for-ata-devices.patch
# PATCH-FIX-OPENSUSE 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch
Patch1014: 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch
# PATCH-FIX-OPENSUSE 0026-udev-netlink-null-rules.patch
Patch1026: 0026-udev-netlink-null-rules.patch
# PATCH-FIX-OPENSUSE 0027-udev-fix-sg-autoload-regression.patch
Patch1027: 0027-udev-fix-sg-autoload-regression.patch
# PATCH-FIX-OPENSUSE fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr
Patch1028: fix-devname-prefix.patch
# PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch
Patch1001: 1001-Reinstate-TIMEOUT-handling.patch
# PATCH-FIX-OPENSUSE 1002-re-enable-by_path-links-for-ata-devices.patch
Patch1002: 1002-re-enable-by_path-links-for-ata-devices.patch
# PATCH-FIX-OPENSUSE 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch
Patch1003: 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch
# PATCH-FIX-OPENSUSE 1004-udev-netlink-null-rules.patch
Patch1004: 1004-udev-netlink-null-rules.patch
# PATCH-FIX-OPENSUSE 1005-udev-fix-sg-autoload-regression.patch
Patch1005: 1005-udev-fix-sg-autoload-regression.patch
# PATCH-FIX-OPENSUSE 1007-fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr
Patch1006: 1006-fix-devname-prefix.patch
# PATCH-FIX-UPSTREAM 1007-udevd-add-missing-to-getopt_long-e.patch
Patch1007: 1007-udevd-add-missing-to-getopt_long-e.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -338,11 +339,12 @@ cp %{SOURCE7} m4/
#udev
%patch1001 -p1
%patch1013 -p1
%patch1014 -p1
%patch1026 -p1
%patch1027 -p1
%patch1028 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%patch1005 -p1
%patch1006 -p1
%patch1007 -p1
#systemd
%patch1 -p1
@ -422,13 +424,16 @@ ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
%endif
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060}
sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060}
sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060}
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062}
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
ln -sf ../udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
#workaround for 716939

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Jan 8 12:47:43 UTC 2013 - rmilasan@suse.com
- udevd: add missing ':' to getopt_long 'e'.
add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and
systemd patches.
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).
-------------------------------------------------------------------
Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package systemd
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -159,19 +159,20 @@ Patch74: detect-btrfs-ssd.patch
Patch75: timedated-donot-close-bogus-dbus-connection.patch
# udev patches
# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch
Patch1001: 0001-Reinstate-TIMEOUT-handling.patch
# PATCH-FIX-OPENSUSE 0013-re-enable-by_path-links-for-ata-devices.patch
Patch1013: 0013-re-enable-by_path-links-for-ata-devices.patch
# PATCH-FIX-OPENSUSE 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch
Patch1014: 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch
# PATCH-FIX-OPENSUSE 0026-udev-netlink-null-rules.patch
Patch1026: 0026-udev-netlink-null-rules.patch
# PATCH-FIX-OPENSUSE 0027-udev-fix-sg-autoload-regression.patch
Patch1027: 0027-udev-fix-sg-autoload-regression.patch
# PATCH-FIX-OPENSUSE fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr
Patch1028: fix-devname-prefix.patch
# PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch
Patch1001: 1001-Reinstate-TIMEOUT-handling.patch
# PATCH-FIX-OPENSUSE 1002-re-enable-by_path-links-for-ata-devices.patch
Patch1002: 1002-re-enable-by_path-links-for-ata-devices.patch
# PATCH-FIX-OPENSUSE 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch
Patch1003: 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch
# PATCH-FIX-OPENSUSE 1004-udev-netlink-null-rules.patch
Patch1004: 1004-udev-netlink-null-rules.patch
# PATCH-FIX-OPENSUSE 1005-udev-fix-sg-autoload-regression.patch
Patch1005: 1005-udev-fix-sg-autoload-regression.patch
# PATCH-FIX-OPENSUSE 1007-fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr
Patch1006: 1006-fix-devname-prefix.patch
# PATCH-FIX-UPSTREAM 1007-udevd-add-missing-to-getopt_long-e.patch
Patch1007: 1007-udevd-add-missing-to-getopt_long-e.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -333,11 +334,12 @@ cp %{SOURCE7} m4/
#udev
%patch1001 -p1
%patch1013 -p1
%patch1014 -p1
%patch1026 -p1
%patch1027 -p1
%patch1028 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%patch1005 -p1
%patch1006 -p1
%patch1007 -p1
#systemd
%patch1 -p1
@ -417,13 +419,16 @@ ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
%endif
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060}
sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060}
sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060}
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062}
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
ln -sf ../udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
#workaround for 716939