- Fix SUSE specific sysconfig numlock logic for 12.2 (bnc#746595).
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=286
This commit is contained in:
parent
f5dcc8b995
commit
cc3736d38f
@ -78,45 +78,52 @@ Index: systemd-44/Makefile.am
|
||||
===================================================================
|
||||
--- systemd-44.orig/Makefile.am
|
||||
+++ systemd-44/Makefile.am
|
||||
@@ -2043,7 +2043,8 @@ dist_udevrules_DATA += \
|
||||
src/login/71-seat.rules
|
||||
@@ -42,6 +42,7 @@ dbussessionservicedir=@dbussessionservic
|
||||
dbussystemservicedir=@dbussystemservicedir@
|
||||
dbusinterfacedir=@dbusinterfacedir@
|
||||
udevrulesdir=@udevrulesdir@
|
||||
+udevhelperdir=@udevhelperdir@
|
||||
pamlibdir=@pamlibdir@
|
||||
pkgconfigdatadir=$(datadir)/pkgconfig
|
||||
pkgconfiglibdir=$(libdir)/pkgconfig
|
||||
@@ -202,6 +203,9 @@ rootlibexec_PROGRAMS = \
|
||||
systemgenerator_PROGRAMS = \
|
||||
systemd-getty-generator
|
||||
|
||||
+udevhelper_PROGRAMS = \
|
||||
+ numlock-on
|
||||
+
|
||||
noinst_PROGRAMS = \
|
||||
test-engine \
|
||||
test-job-type \
|
||||
@@ -2033,6 +2037,12 @@ systemd_uaccess_LDADD = \
|
||||
$(UDEV_LIBS) \
|
||||
$(ACL_LIBS)
|
||||
|
||||
+numlock_on_SOURCES = \
|
||||
+ src/login/numlock-on.c
|
||||
+
|
||||
+numlock_on_CFLAGS = \
|
||||
+ $(AM_CFLAGS)
|
||||
+
|
||||
rootlibexec_PROGRAMS += \
|
||||
systemd-uaccess
|
||||
|
||||
@@ -2040,7 +2050,8 @@ dist_udevrules_DATA += \
|
||||
src/login/70-uaccess.rules
|
||||
|
||||
dist_udevrules_DATA += \
|
||||
- src/login/71-seat.rules
|
||||
+ src/login/71-seat.rules \
|
||||
+ src/login/73-seat-numlock.rules
|
||||
|
||||
nodist_udevrules_DATA += \
|
||||
- src/login/73-seat-late.rules
|
||||
+ src/login/73-seat-late.rules \
|
||||
+ src/login/73-seat-numlock.rules
|
||||
|
||||
MANPAGES += \
|
||||
man/systemd-logind.conf.5 \
|
||||
@@ -2106,12 +2107,14 @@ EXTRA_DIST += \
|
||||
src/login/logind-user.h \
|
||||
src/login/logind-acl.h \
|
||||
src/login/73-seat-late.rules.in \
|
||||
+ src/login/73-seat-numlock.rules.in \
|
||||
units/systemd-logind.service.in \
|
||||
units/systemd-user-sessions.service.in
|
||||
|
||||
CLEANFILES += \
|
||||
src/login/logind-gperf.c \
|
||||
- src/login/73-seat-late.rules
|
||||
+ src/login/73-seat-late.rules \
|
||||
+ src/login/73-seat-numlock.rules
|
||||
endif
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
@@ -2121,6 +2124,7 @@ SED_PROCESS = \
|
||||
-e 's,@rootbindir\@,$(rootbindir),g' \
|
||||
-e 's,@bindir\@,$(bindir),g' \
|
||||
-e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
|
||||
+ -e 's,@SETLEDS\@,$(SETLEDS),g' \
|
||||
-e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
|
||||
-e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
|
||||
-e 's,@pkgdatadir\@,$(pkgdatadir),g' \
|
||||
src/login/73-seat-late.rules
|
||||
Index: systemd-44/configure.ac
|
||||
===================================================================
|
||||
--- systemd-44.orig/configure.ac
|
||||
+++ systemd-44/configure.ac
|
||||
@@ -410,6 +410,12 @@ fi
|
||||
@@ -410,6 +410,13 @@ fi
|
||||
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
|
||||
AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
|
||||
|
||||
@ -125,14 +132,43 @@ Index: systemd-44/configure.ac
|
||||
+ AC_DEFINE_UNQUOTED([HWINFO], ["${HWINFO}"], [Path to hwinfo binary. (SUSE)])
|
||||
+fi
|
||||
+AC_PATH_PROG([SETLEDS], [setleds], [/bin/setleds], [/sbin:/usr/sbin:/usr/bin:/bin])
|
||||
+AC_DEFINE_UNQUOTED([SETLEDS], ["${SETLEDS}"], [Path to setleds binary.])
|
||||
+
|
||||
# Location of the init scripts as mandated by LSB
|
||||
SYSTEM_SYSVINIT_PATH=/etc/init.d
|
||||
SYSTEM_SYSVRCND_PATH=/etc/rc.d
|
||||
@@ -579,6 +586,11 @@ AC_ARG_WITH([udevrulesdir],
|
||||
[],
|
||||
[with_udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d])
|
||||
|
||||
+AC_ARG_WITH([udevhelperdir],
|
||||
+ AS_HELP_STRING([--with-udevhelperdir=DIR], [Directory for udev helpers]),
|
||||
+ [],
|
||||
+ [with_udevhelperdir=`pkg-config --variable=udevdir udev`])
|
||||
+
|
||||
AC_ARG_WITH([rootprefix],
|
||||
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
|
||||
[], [with_rootprefix=${ac_default_prefix}])
|
||||
@@ -611,6 +623,7 @@ AC_SUBST([dbussessionservicedir], [$with
|
||||
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
|
||||
AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
|
||||
AC_SUBST([udevrulesdir], [$with_udevrulesdir])
|
||||
+AC_SUBST([udevhelperdir], [$with_udevhelperdir])
|
||||
AC_SUBST([pamlibdir], [$with_pamlibdir])
|
||||
AC_SUBST([rootprefix], [$with_rootprefix])
|
||||
AC_SUBST([rootlibdir], [$with_rootlibdir])
|
||||
@@ -650,6 +663,7 @@ AC_MSG_RESULT([
|
||||
rootlib dir: ${with_rootlibdir}
|
||||
PAM modules dir: ${with_pamlibdir}
|
||||
udev rules dir: ${with_udevrulesdir}
|
||||
+ udev hepler dir: ${with_udevhelperdir}
|
||||
D-Bus policy dir: ${with_dbuspolicydir}
|
||||
D-Bus session dir: ${with_dbussessionservicedir}
|
||||
D-Bus system dir: ${with_dbussystemservicedir}
|
||||
Index: systemd-44/src/login/73-seat-numlock.rules.in
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ systemd-44/src/login/73-seat-numlock.rules.in
|
||||
+++ systemd-44/src/login/73-seat-numlock.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
@ -141,4 +177,45 @@ Index: systemd-44/src/login/73-seat-numlock.rules.in
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TAG=="systemd", TEST=="/run/numlock-on", RUN+="@SETLEDS@ -D +num <$env{DEVNAME}"
|
||||
+SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}"
|
||||
Index: systemd-44/src/login/numlock-on.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ systemd-44/src/login/numlock-on.c
|
||||
@@ -0,0 +1,36 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
+
|
||||
+/***
|
||||
+ This file is part of systemd.
|
||||
+
|
||||
+ Copyright 2012 Stanislav Brabec
|
||||
+
|
||||
+ 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.
|
||||
+
|
||||
+ systemd is distributed in the hope that it will be useful, but
|
||||
+ WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
+***/
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include <fcntl.h>
|
||||
+#include <sysexits.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int main (int argc, char *argv[]) {
|
||||
+ static char *args[] = { SETLEDS, "-D", "+num", NULL };
|
||||
+
|
||||
+ if (argc != 2)
|
||||
+ return EX_USAGE;
|
||||
+ close (STDIN_FILENO);
|
||||
+ if (open (argv[1], O_RDONLY) != STDIN_FILENO)
|
||||
+ return EX_IOERR;
|
||||
+ return execv(args[0], args);
|
||||
+}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 3 20:07:47 CEST 2012 - sbrabec@suse.cz
|
||||
|
||||
- Fix SUSE specific sysconfig numlock logic for 12.2 (bnc#746595).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 3 17:58:39 CEST 2012 - fcrozat@suse.com
|
||||
|
||||
|
@ -373,6 +373,7 @@ rm -rf %{buildroot}
|
||||
%{_mandir}/man8/*.8*
|
||||
%{_docdir}/systemd
|
||||
/lib/udev/rules.d/*.rules
|
||||
/lib/udev/numlock-on
|
||||
%dir /lib/systemd
|
||||
/lib/systemd/system
|
||||
/lib/systemd/system-generators
|
||||
|
Loading…
Reference in New Issue
Block a user