diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-17 01:33:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-17 01:33:02 -0400 |
commit | 610d801297fe7e46c319e6da4e6571aaded630dd (patch) | |
tree | d27f6d077694b84ed9881c99b2894701932ca6e1 /src | |
parent | 7648bff2717c24e9f5c90ec9e4588eda510aba9d (diff) |
more
Diffstat (limited to 'src')
212 files changed, 2114 insertions, 220 deletions
diff --git a/src/Makefile b/src/Makefile index 58e747aaff..2ea58046bc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,7 +27,7 @@ nested.subdirs += busctl nested.subdirs += grp-boot nested.subdirs += grp-coredump nested.subdirs += grp-hostname -nested.subdirs += grp-initutils +nested.subdirs += grp-initprogs nested.subdirs += grp-journal nested.subdirs += grp-locale nested.subdirs += grp-login @@ -54,10 +54,8 @@ nested.subdirs += systemd-dbus1-generator nested.subdirs += systemd-debug-generator nested.subdirs += systemd-getty-generator nested.subdirs += systemd-gpt-auto-generator -nested.subdirs += systemd-hibernate-resume nested.subdirs += systemd-initctl nested.subdirs += systemd-machine-id-setup -nested.subdirs += systemd-modules-load nested.subdirs += systemd-nspawn nested.subdirs += systemd-rc-local-generator nested.subdirs += systemd-remount-fs diff --git a/src/grp-coredump/systemd-coredump/Makefile b/src/grp-coredump/systemd-coredump/Makefile index 54fe3aeb0e..108186488c 100644 --- a/src/grp-coredump/systemd-coredump/Makefile +++ b/src/grp-coredump/systemd-coredump/Makefile @@ -75,7 +75,7 @@ CLEANFILES += \ endif # ENABLE_COREDUMP EXTRA_DIST += \ - sysctl.d/50-coredump.conf.in \ + sysctl.d/50-coredump.sysctl.in \ units/systemd-coredump@.service.in sd.CPPFLAGS += -I$(topsrcdir)/src/grp-journal/libjournal-core diff --git a/src/grp-coredump/systemd-coredump/systemd-coredump.socket b/src/grp-coredump/systemd-coredump/systemd-coredump.socket new file mode 100644 index 0000000000..4cb2460471 --- /dev/null +++ b/src/grp-coredump/systemd-coredump/systemd-coredump.socket @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Process Core Dump Socket +Documentation=man:systemd-coredump(8) +DefaultDependencies=no + +[Socket] +ListenSequentialPacket=/run/systemd/coredump +SocketMode=0600 +Accept=yes +MaxConnections=16 diff --git a/src/grp-coredump/systemd-coredump/systemd-coredump.tmpfiles b/src/grp-coredump/systemd-coredump/systemd-coredump.tmpfiles new file mode 100644 index 0000000000..02b052583d --- /dev/null +++ b/src/grp-coredump/systemd-coredump/systemd-coredump.tmpfiles @@ -0,0 +1,10 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +d /var/lib/systemd/coredump 0755 root root 3d diff --git a/src/grp-coredump/systemd-coredump/systemd-coredump@.service.in b/src/grp-coredump/systemd-coredump/systemd-coredump@.service.in new file mode 100644 index 0000000000..588c8d629c --- /dev/null +++ b/src/grp-coredump/systemd-coredump/systemd-coredump@.service.in @@ -0,0 +1,24 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Process Core Dump +Documentation=man:systemd-coredump(8) +DefaultDependencies=no +RequiresMountsFor=/var/lib/systemd/coredump +Conflicts=shutdown.target +After=systemd-remount-fs.service systemd-journald.socket +Requires=systemd-journald.socket +Before=shutdown.target + +[Service] +ExecStart=-@rootlibexecdir@/systemd-coredump +Nice=9 +OOMScoreAdjust=500 +PrivateNetwork=yes +ProtectSystem=full +RuntimeMaxSec=5min diff --git a/src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.in b/src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.in new file mode 100644 index 0000000000..b7079e4a7c --- /dev/null +++ b/src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.in @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Hostname Service +Documentation=man:systemd-hostnamed.service(8) man:hostname(5) man:machine-info(5) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/hostnamed + +[Service] +ExecStart=@rootlibexecdir@/systemd-hostnamed +BusName=org.freedesktop.hostname1 +CapabilityBoundingSet=CAP_SYS_ADMIN +WatchdogSec=3min +PrivateTmp=yes +PrivateDevices=yes +PrivateNetwork=yes +ProtectSystem=yes +ProtectHome=yes diff --git a/src/grp-initutils/Makefile b/src/grp-initprogs/Makefile index 0bc22bb42c..2cf2214e2a 100644 --- a/src/grp-initutils/Makefile +++ b/src/grp-initprogs/Makefile @@ -23,15 +23,16 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +nested.subdirs += grp-sleep nested.subdirs += systemd-backlight nested.subdirs += systemd-binfmt nested.subdirs += systemd-detect-virt nested.subdirs += systemd-firstboot nested.subdirs += systemd-fsck +nested.subdirs += systemd-modules-load nested.subdirs += systemd-quotacheck nested.subdirs += systemd-random-seed nested.subdirs += systemd-rfkill -nested.subdirs += systemd-sleep nested.subdirs += systemd-sysctl nested.subdirs += systemd-sysusers nested.subdirs += systemd-tmpfiles diff --git a/src/grp-initutils/systemd-sleep/Makefile b/src/grp-initprogs/grp-sleep/Makefile index 6097d09f88..5a3a87d2bf 100644 --- a/src/grp-initutils/systemd-sleep/Makefile +++ b/src/grp-initprogs/grp-sleep/Makefile @@ -23,13 +23,8 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -rootlibexec_PROGRAMS += systemd-sleep -systemd_sleep_SOURCES = \ - src/sleep/sleep.c - -systemd_sleep_LDADD = \ - libshared.la - -sd.CPPFLAGS += -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" +nested.subdirs += systemd-hibernate-resume +nested.subdirs += systemd-hibernate-resume-generator +nested.subdirs += systemd-sleep include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile new file mode 100644 index 0000000000..8c0eba2b1a --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile @@ -0,0 +1,40 @@ +# -*- Mode: makefile; indent-tabs-mode: t -*- +# +# This file is part of systemd. +# +# Copyright 2010-2012 Lennart Poettering +# Copyright 2010-2012 Kay Sievers +# Copyright 2013 Zbigniew Jędrzejewski-Szmek +# Copyright 2013 David Strauss +# Copyright 2016 Luke Shumaker +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see <http://www.gnu.org/licenses/>. +include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk +include $(topsrcdir)/build-aux/Makefile.head.mk + +ifneq ($(ENABLE_HIBERNATE),) +systemgenerator_PROGRAMS += \ + systemd-hibernate-resume-generator + +systemd_hibernate_resume_generator_SOURCES = \ + src/hibernate-resume/hibernate-resume-generator.c + +systemd_hibernate_resume_generator_LDADD = \ + libshared.la + +endif # ENABLE_HIBERNATE + +sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + +include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-hibernate-resume/hibernate-resume-generator.c b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/hibernate-resume-generator.c index 6380c297c2..6380c297c2 100644 --- a/src/systemd-hibernate-resume/hibernate-resume-generator.c +++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/hibernate-resume-generator.c diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/Makefile b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/Makefile new file mode 100644 index 0000000000..3b41b82e4b --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/Makefile @@ -0,0 +1,45 @@ +# -*- Mode: makefile; indent-tabs-mode: t -*- +# +# This file is part of systemd. +# +# Copyright 2010-2012 Lennart Poettering +# Copyright 2010-2012 Kay Sievers +# Copyright 2013 Zbigniew Jędrzejewski-Szmek +# Copyright 2013 David Strauss +# Copyright 2016 Luke Shumaker +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see <http://www.gnu.org/licenses/>. +include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk +include $(topsrcdir)/build-aux/Makefile.head.mk + +ifneq ($(ENABLE_HIBERNATE),) + +rootlibexec_PROGRAMS += \ + systemd-hibernate-resume + +systemd_hibernate_resume_SOURCES = \ + src/hibernate-resume/hibernate-resume.c + +systemd_hibernate_resume_LDADD = \ + libshared.la + +nodist_systemunit_DATA += \ + units/systemd-hibernate-resume@.service + +endif # ENABLE_HIBERNATE + +EXTRA_DIST += \ + units/systemd-hibernate-resume@.service.in + +include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-hibernate-resume/hibernate-resume.c b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/hibernate-resume.c index 64d14bf64b..64d14bf64b 100644 --- a/src/systemd-hibernate-resume/hibernate-resume.c +++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/hibernate-resume.c diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.in b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.in new file mode 100644 index 0000000000..65e8eb83f1 --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.in @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Resume from hibernation using device %f +Documentation=man:systemd-hibernate-resume@.service(8) +DefaultDependencies=no +BindsTo=%i.device +Wants=local-fs-pre.target +After=%i.device +Before=local-fs-pre.target +ConditionPathExists=/etc/initrd-release + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-hibernate-resume %f diff --git a/src/systemd-hibernate-resume/Makefile b/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile index 1e085e4b28..ca484794a0 100644 --- a/src/systemd-hibernate-resume/Makefile +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile @@ -20,27 +20,17 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -ifneq ($(ENABLE_HIBERNATE),) -systemgenerator_PROGRAMS += \ - systemd-hibernate-resume-generator - -rootlibexec_PROGRAMS += \ - systemd-hibernate-resume - -systemd_hibernate_resume_SOURCES = \ - src/hibernate-resume/hibernate-resume.c +rootlibexec_PROGRAMS += systemd-sleep +systemd_sleep_SOURCES = \ + src/sleep/sleep.c -systemd_hibernate_resume_LDADD = \ +systemd_sleep_LDADD = \ libshared.la -systemd_hibernate_resume_generator_SOURCES = \ - src/hibernate-resume/hibernate-resume-generator.c - -systemd_hibernate_resume_generator_LDADD = \ - libshared.la +ifneq ($(ENABLE_HIBERNATE),) dist_systemunit_DATA += \ units/hibernate.target \ @@ -48,15 +38,21 @@ dist_systemunit_DATA += \ nodist_systemunit_DATA += \ units/systemd-hibernate.service \ - units/systemd-hibernate-resume@.service \ units/systemd-hybrid-sleep.service + endif # ENABLE_HIBERNATE +dist_systemunit_DATA += \ + units/suspend.target \ + +nodist_systemunit_DATA += \ + units/systemd-suspend.service \ + EXTRA_DIST += \ + units/systemd-suspend.service.in \ units/systemd-hibernate.service.in \ - units/systemd-hibernate-resume@.service.in \ units/systemd-hybrid-sleep.service.in -sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" +sd.CPPFLAGS += -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/hibernate.target b/src/grp-initprogs/grp-sleep/systemd-sleep/hibernate.target new file mode 100644 index 0000000000..143eb59230 --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/hibernate.target @@ -0,0 +1,13 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Hibernate +Documentation=man:systemd.special(7) +DefaultDependencies=no +BindsTo=systemd-hibernate.service +After=systemd-hibernate.service diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/hybrid-sleep.target b/src/grp-initprogs/grp-sleep/systemd-sleep/hybrid-sleep.target new file mode 100644 index 0000000000..d2d3409225 --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/hybrid-sleep.target @@ -0,0 +1,13 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Hybrid Suspend+Hibernate +Documentation=man:systemd.special(7) +DefaultDependencies=no +BindsTo=systemd-hybrid-sleep.service +After=systemd-hybrid-sleep.service diff --git a/src/grp-initutils/systemd-sleep/sleep.c b/src/grp-initprogs/grp-sleep/systemd-sleep/sleep.c index e9e84bc893..e9e84bc893 100644 --- a/src/grp-initutils/systemd-sleep/sleep.c +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/sleep.c diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/suspend.target b/src/grp-initprogs/grp-sleep/systemd-sleep/suspend.target new file mode 100644 index 0000000000..f50cb2264f --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/suspend.target @@ -0,0 +1,13 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Suspend +Documentation=man:systemd.special(7) +DefaultDependencies=no +BindsTo=systemd-suspend.service +After=systemd-suspend.service diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hibernate.service.in b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hibernate.service.in new file mode 100644 index 0000000000..29d9b696a8 --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hibernate.service.in @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Hibernate +Documentation=man:systemd-suspend.service(8) +DefaultDependencies=no +Requires=sleep.target +After=sleep.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-sleep hibernate diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hybrid-sleep.service.in b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hybrid-sleep.service.in new file mode 100644 index 0000000000..914b686c36 --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hybrid-sleep.service.in @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Hybrid Suspend+Hibernate +Documentation=man:systemd-suspend.service(8) +DefaultDependencies=no +Requires=sleep.target +After=sleep.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-sleep hybrid-sleep diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-suspend.service.in b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-suspend.service.in new file mode 100644 index 0000000000..3a702d2e22 --- /dev/null +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-suspend.service.in @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Suspend +Documentation=man:systemd-suspend.service(8) +DefaultDependencies=no +Requires=sleep.target +After=sleep.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-sleep suspend diff --git a/src/grp-initutils/systemd-backlight/Makefile b/src/grp-initprogs/systemd-backlight/Makefile index cf55ac4db9..cf55ac4db9 100644 --- a/src/grp-initutils/systemd-backlight/Makefile +++ b/src/grp-initprogs/systemd-backlight/Makefile diff --git a/src/grp-initutils/systemd-backlight/backlight.c b/src/grp-initprogs/systemd-backlight/backlight.c index aa8d852024..aa8d852024 100644 --- a/src/grp-initutils/systemd-backlight/backlight.c +++ b/src/grp-initprogs/systemd-backlight/backlight.c diff --git a/src/grp-initprogs/systemd-backlight/systemd-backlight@.service.in b/src/grp-initprogs/systemd-backlight/systemd-backlight@.service.in new file mode 100644 index 0000000000..5e6706c11c --- /dev/null +++ b/src/grp-initprogs/systemd-backlight/systemd-backlight@.service.in @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Load/Save Screen Backlight Brightness of %i +Documentation=man:systemd-backlight@.service(8) +DefaultDependencies=no +RequiresMountsFor=/var/lib/systemd/backlight +Conflicts=shutdown.target +After=systemd-remount-fs.service +Before=sysinit.target shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-backlight load %i +ExecStop=@rootlibexecdir@/systemd-backlight save %i +TimeoutSec=90s diff --git a/src/grp-initutils/systemd-binfmt/Makefile b/src/grp-initprogs/systemd-binfmt/Makefile index 3e5c1ac270..3e5c1ac270 100644 --- a/src/grp-initutils/systemd-binfmt/Makefile +++ b/src/grp-initprogs/systemd-binfmt/Makefile diff --git a/src/grp-initutils/systemd-binfmt/binfmt.c b/src/grp-initprogs/systemd-binfmt/binfmt.c index 39bbdb5335..39bbdb5335 100644 --- a/src/grp-initutils/systemd-binfmt/binfmt.c +++ b/src/grp-initprogs/systemd-binfmt/binfmt.c diff --git a/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.automount b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.automount new file mode 100644 index 0000000000..6be38937b1 --- /dev/null +++ b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.automount @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Arbitrary Executable File Formats File System Automount Point +Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt +Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems +DefaultDependencies=no +Before=sysinit.target +ConditionPathExists=/proc/sys/fs/binfmt_misc/ +ConditionPathIsReadWrite=/proc/sys/ + +[Automount] +Where=/proc/sys/fs/binfmt_misc diff --git a/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.mount b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.mount new file mode 100644 index 0000000000..8c7c386318 --- /dev/null +++ b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.mount @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Arbitrary Executable File Formats File System +Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt +Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems +DefaultDependencies=no + +[Mount] +What=binfmt_misc +Where=/proc/sys/fs/binfmt_misc +Type=binfmt_misc diff --git a/src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.in b/src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.in new file mode 100644 index 0000000000..d53073ee61 --- /dev/null +++ b/src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.in @@ -0,0 +1,27 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Set Up Additional Binary Formats +Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5) +Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt +DefaultDependencies=no +Conflicts=shutdown.target +After=proc-sys-fs-binfmt_misc.automount +Before=sysinit.target shutdown.target +ConditionPathIsReadWrite=/proc/sys/ +ConditionDirectoryNotEmpty=|/lib/binfmt.d +ConditionDirectoryNotEmpty=|/usr/lib/binfmt.d +ConditionDirectoryNotEmpty=|/usr/local/lib/binfmt.d +ConditionDirectoryNotEmpty=|/etc/binfmt.d +ConditionDirectoryNotEmpty=|/run/binfmt.d + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-binfmt +TimeoutSec=90s diff --git a/src/grp-initutils/systemd-detect-virt/Makefile b/src/grp-initprogs/systemd-detect-virt/Makefile index 7b9b9f667b..7b9b9f667b 100644 --- a/src/grp-initutils/systemd-detect-virt/Makefile +++ b/src/grp-initprogs/systemd-detect-virt/Makefile diff --git a/src/grp-initutils/systemd-detect-virt/detect-virt.c b/src/grp-initprogs/systemd-detect-virt/detect-virt.c index 06cdab5297..06cdab5297 100644 --- a/src/grp-initutils/systemd-detect-virt/detect-virt.c +++ b/src/grp-initprogs/systemd-detect-virt/detect-virt.c diff --git a/src/grp-initutils/systemd-detect-virt/systemd-detect-virt.completion.bash b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.bash index df06c29841..df06c29841 100644 --- a/src/grp-initutils/systemd-detect-virt/systemd-detect-virt.completion.bash +++ b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.bash diff --git a/src/grp-initutils/systemd-detect-virt/systemd-detect-virt.completion.zsh b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.zsh index a0c7df727c..a0c7df727c 100644 --- a/src/grp-initutils/systemd-detect-virt/systemd-detect-virt.completion.zsh +++ b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.zsh diff --git a/src/grp-initutils/systemd-firstboot/Makefile b/src/grp-initprogs/systemd-firstboot/Makefile index b94b344bb9..b94b344bb9 100644 --- a/src/grp-initutils/systemd-firstboot/Makefile +++ b/src/grp-initprogs/systemd-firstboot/Makefile diff --git a/src/grp-initutils/systemd-firstboot/firstboot.c b/src/grp-initprogs/systemd-firstboot/firstboot.c index d2059a943f..d2059a943f 100644 --- a/src/grp-initutils/systemd-firstboot/firstboot.c +++ b/src/grp-initprogs/systemd-firstboot/firstboot.c diff --git a/src/grp-initprogs/systemd-firstboot/systemd-firstboot.service.in b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.service.in new file mode 100644 index 0000000000..405c6f3fd2 --- /dev/null +++ b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.service.in @@ -0,0 +1,24 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=First Boot Wizard +Documentation=man:systemd-firstboot(1) +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-remount-fs.service +Before=systemd-sysusers.service sysinit.target shutdown.target +ConditionPathIsReadWrite=/etc +ConditionFirstBoot=yes + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootbindir@/systemd-firstboot --prompt-locale --prompt-timezone --prompt-root-password +StandardOutput=tty +StandardInput=tty +StandardError=tty diff --git a/src/grp-initutils/systemd-fsck/Makefile b/src/grp-initprogs/systemd-fsck/Makefile index f29fba4d20..f29fba4d20 100644 --- a/src/grp-initutils/systemd-fsck/Makefile +++ b/src/grp-initprogs/systemd-fsck/Makefile diff --git a/src/grp-initutils/systemd-fsck/fsck.c b/src/grp-initprogs/systemd-fsck/fsck.c index 4ca018763f..4ca018763f 100644 --- a/src/grp-initutils/systemd-fsck/fsck.c +++ b/src/grp-initprogs/systemd-fsck/fsck.c diff --git a/src/grp-initprogs/systemd-fsck/systemd-fsck@.service.in b/src/grp-initprogs/systemd-fsck/systemd-fsck@.service.in new file mode 100644 index 0000000000..6ca6b07e9e --- /dev/null +++ b/src/grp-initprogs/systemd-fsck/systemd-fsck@.service.in @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=File System Check on %f +Documentation=man:systemd-fsck@.service(8) +DefaultDependencies=no +BindsTo=%i.device +After=%i.device systemd-fsck-root.service local-fs-pre.target +Before=systemd-quotacheck.service shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-fsck %f +TimeoutSec=0 diff --git a/src/systemd-modules-load/Makefile b/src/grp-initprogs/systemd-modules-load/Makefile index 1c51b134ad..8503fb32a2 100644 --- a/src/systemd-modules-load/Makefile +++ b/src/grp-initprogs/systemd-modules-load/Makefile @@ -20,7 +20,7 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk ifneq ($(HAVE_KMOD),) diff --git a/src/grp-initprogs/systemd-modules-load/kmod-static-nodes.service.in b/src/grp-initprogs/systemd-modules-load/kmod-static-nodes.service.in new file mode 100644 index 0000000000..a9c8df1184 --- /dev/null +++ b/src/grp-initprogs/systemd-modules-load/kmod-static-nodes.service.in @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Create list of required static device nodes for the current kernel +DefaultDependencies=no +Before=sysinit.target systemd-tmpfiles-setup-dev.service +ConditionCapability=CAP_SYS_MODULE +ConditionFileNotEmpty=/lib/modules/%v/modules.devname + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@KMOD@ static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf diff --git a/src/systemd-modules-load/modules-load.c b/src/grp-initprogs/systemd-modules-load/modules-load.c index d7ea7886c6..d7ea7886c6 100644 --- a/src/systemd-modules-load/modules-load.c +++ b/src/grp-initprogs/systemd-modules-load/modules-load.c diff --git a/src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.in b/src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.in new file mode 100644 index 0000000000..9de6d31349 --- /dev/null +++ b/src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.in @@ -0,0 +1,27 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Load Kernel Modules +Documentation=man:systemd-modules-load.service(8) man:modules-load.d(5) +DefaultDependencies=no +Conflicts=shutdown.target +Before=sysinit.target shutdown.target +ConditionCapability=CAP_SYS_MODULE +ConditionDirectoryNotEmpty=|/lib/modules-load.d +ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d +ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d +ConditionDirectoryNotEmpty=|/etc/modules-load.d +ConditionDirectoryNotEmpty=|/run/modules-load.d +ConditionKernelCommandLine=|modules-load +ConditionKernelCommandLine=|rd.modules-load + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-modules-load +TimeoutSec=90s diff --git a/src/grp-initutils/systemd-quotacheck/Makefile b/src/grp-initprogs/systemd-quotacheck/Makefile index bb3d8dce6b..076d33a587 100644 --- a/src/grp-initutils/systemd-quotacheck/Makefile +++ b/src/grp-initprogs/systemd-quotacheck/Makefile @@ -38,6 +38,7 @@ systemd_quotacheck_LDADD = \ endif # ENABLE_QUOTACHECK EXTRA_DIST += \ + units/quotaon.service.in \ units/systemd-quotacheck.service.in nodist_systemunit_DATA += \ diff --git a/src/grp-initutils/systemd-quotacheck/quotacheck.c b/src/grp-initprogs/systemd-quotacheck/quotacheck.c index 3c2292b0c4..3c2292b0c4 100644 --- a/src/grp-initutils/systemd-quotacheck/quotacheck.c +++ b/src/grp-initprogs/systemd-quotacheck/quotacheck.c diff --git a/src/grp-initprogs/systemd-quotacheck/quotaon.service.in b/src/grp-initprogs/systemd-quotacheck/quotaon.service.in new file mode 100644 index 0000000000..7d59a40195 --- /dev/null +++ b/src/grp-initprogs/systemd-quotacheck/quotaon.service.in @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Enable File System Quotas +Documentation=man:quotaon(8) +DefaultDependencies=no +After=systemd-quotacheck.service +Before=local-fs.target shutdown.target +ConditionPathExists=@QUOTAON@ + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@QUOTAON@ -aug diff --git a/src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.in b/src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.in new file mode 100644 index 0000000000..5cb9bc3bc9 --- /dev/null +++ b/src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.in @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=File System Quota Check +Documentation=man:systemd-quotacheck.service(8) +DefaultDependencies=no +After=systemd-remount-fs.service +Before=local-fs.target shutdown.target +ConditionPathExists=@QUOTACHECK@ + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-quotacheck +TimeoutSec=0 diff --git a/src/grp-initutils/systemd-random-seed/Makefile b/src/grp-initprogs/systemd-random-seed/Makefile index 489a8ab007..489a8ab007 100644 --- a/src/grp-initutils/systemd-random-seed/Makefile +++ b/src/grp-initprogs/systemd-random-seed/Makefile diff --git a/src/grp-initutils/systemd-random-seed/random-seed.c b/src/grp-initprogs/systemd-random-seed/random-seed.c index 7fea6069f3..7fea6069f3 100644 --- a/src/grp-initutils/systemd-random-seed/random-seed.c +++ b/src/grp-initprogs/systemd-random-seed/random-seed.c diff --git a/src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.in b/src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.in new file mode 100644 index 0000000000..115233268d --- /dev/null +++ b/src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.in @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Load/Save Random Seed +Documentation=man:systemd-random-seed.service(8) man:random(4) +DefaultDependencies=no +RequiresMountsFor=@RANDOM_SEED@ +Conflicts=shutdown.target +After=systemd-remount-fs.service +Before=sysinit.target shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-random-seed load +ExecStop=@rootlibexecdir@/systemd-random-seed save +TimeoutSec=30s diff --git a/src/grp-initutils/systemd-rfkill/Makefile b/src/grp-initprogs/systemd-rfkill/Makefile index 2b4430b712..2b4430b712 100644 --- a/src/grp-initutils/systemd-rfkill/Makefile +++ b/src/grp-initprogs/systemd-rfkill/Makefile diff --git a/src/grp-initutils/systemd-rfkill/rfkill.c b/src/grp-initprogs/systemd-rfkill/rfkill.c index 86779e9ac8..86779e9ac8 100644 --- a/src/grp-initutils/systemd-rfkill/rfkill.c +++ b/src/grp-initprogs/systemd-rfkill/rfkill.c diff --git a/src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.in b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.in new file mode 100644 index 0000000000..780a19b996 --- /dev/null +++ b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.in @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Load/Save RF Kill Switch Status +Documentation=man:systemd-rfkill.service(8) +DefaultDependencies=no +RequiresMountsFor=/var/lib/systemd/rfkill +BindsTo=sys-devices-virtual-misc-rfkill.device +Conflicts=shutdown.target +After=sys-devices-virtual-misc-rfkill.device systemd-remount-fs.service +Before=shutdown.target + +[Service] +Type=notify +ExecStart=@rootlibexecdir@/systemd-rfkill +TimeoutSec=30s diff --git a/src/grp-initprogs/systemd-rfkill/systemd-rfkill.socket b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.socket new file mode 100644 index 0000000000..20ae2f8adb --- /dev/null +++ b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.socket @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Load/Save RF Kill Switch Status /dev/rfkill Watch +Documentation=man:systemd-rfkill.socket(8) +DefaultDependencies=no +BindsTo=sys-devices-virtual-misc-rfkill.device +After=sys-devices-virtual-misc-rfkill.device +Conflicts=shutdown.target +Before=shutdown.target + +[Socket] +ListenSpecial=/dev/rfkill +Writable=yes diff --git a/src/grp-initutils/systemd-sysctl/50-default.sysctl b/src/grp-initprogs/systemd-sysctl/50-default.sysctl index def151bb84..def151bb84 100644 --- a/src/grp-initutils/systemd-sysctl/50-default.sysctl +++ b/src/grp-initprogs/systemd-sysctl/50-default.sysctl diff --git a/src/grp-initutils/systemd-sysctl/Makefile b/src/grp-initprogs/systemd-sysctl/Makefile index 3af80e7bef..3af80e7bef 100644 --- a/src/grp-initutils/systemd-sysctl/Makefile +++ b/src/grp-initprogs/systemd-sysctl/Makefile diff --git a/src/grp-initutils/systemd-sysctl/sysctl.c b/src/grp-initprogs/systemd-sysctl/sysctl.c index c44aa0aabb..c44aa0aabb 100644 --- a/src/grp-initutils/systemd-sysctl/sysctl.c +++ b/src/grp-initprogs/systemd-sysctl/sysctl.c diff --git a/src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.in b/src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.in new file mode 100644 index 0000000000..d784c6426d --- /dev/null +++ b/src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.in @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Apply Kernel Variables +Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5) +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-modules-load.service +Before=sysinit.target shutdown.target +ConditionPathIsReadWrite=/proc/sys/ + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-sysctl +TimeoutSec=90s diff --git a/src/grp-initutils/systemd-sysusers/Makefile b/src/grp-initprogs/systemd-sysusers/Makefile index 4753ca75d0..9339b9fd8b 100644 --- a/src/grp-initutils/systemd-sysusers/Makefile +++ b/src/grp-initprogs/systemd-sysusers/Makefile @@ -40,22 +40,14 @@ SYSINIT_TARGET_WANTS += \ systemd-sysusers.service nodist_sysusers_DATA = \ - sysusers.d/systemd.conf \ sysusers.d/basic.conf -ifneq ($(HAVE_REMOTE),) -nodist_sysusers_DATA += \ - sysusers.d/systemd-remote.conf -endif # HAVE_REMOTE - INSTALL_DIRS += \ $(sysusersdir) endif # ENABLE_SYSUSERS EXTRA_DIST += \ units/systemd-sysusers.service.in \ - sysusers.d/systemd.conf.m4 \ - sysusers.d/systemd-remote.conf.m4 \ - sysusers.d/basic.conf.in + sysusers.d/basic.sysusers.in include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initutils/systemd-sysusers/basic.sysusers.in b/src/grp-initprogs/systemd-sysusers/basic.sysusers.in index b2dc5ebd4f..b2dc5ebd4f 100644 --- a/src/grp-initutils/systemd-sysusers/basic.sysusers.in +++ b/src/grp-initprogs/systemd-sysusers/basic.sysusers.in diff --git a/src/grp-initprogs/systemd-sysusers/systemd-sysusers.service.in b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.service.in new file mode 100644 index 0000000000..4d8309ab6b --- /dev/null +++ b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.service.in @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Create System Users +Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8) +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-remount-fs.service +Before=sysinit.target shutdown.target systemd-update-done.service +ConditionNeedsUpdate=/etc + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootbindir@/systemd-sysusers +TimeoutSec=90s diff --git a/src/grp-initutils/systemd-sysusers/sysusers.c b/src/grp-initprogs/systemd-sysusers/sysusers.c index a71d777720..a71d777720 100644 --- a/src/grp-initutils/systemd-sysusers/sysusers.c +++ b/src/grp-initprogs/systemd-sysusers/sysusers.c diff --git a/src/grp-initutils/systemd-tmpfiles/Makefile b/src/grp-initprogs/systemd-tmpfiles/Makefile index d12c910883..de085fa334 100644 --- a/src/grp-initutils/systemd-tmpfiles/Makefile +++ b/src/grp-initprogs/systemd-tmpfiles/Makefile @@ -42,7 +42,6 @@ nodist_systemunit_DATA += \ units/systemd-tmpfiles-clean.service nodist_tmpfiles_DATA = \ - tmpfiles.d/systemd.conf \ tmpfiles.d/etc.conf dist_tmpfiles_DATA = \ @@ -50,9 +49,7 @@ dist_tmpfiles_DATA = \ tmpfiles.d/tmp.conf \ tmpfiles.d/x11.conf \ tmpfiles.d/var.conf \ - tmpfiles.d/home.conf \ - tmpfiles.d/systemd-nspawn.conf \ - tmpfiles.d/journal-nocow.conf + tmpfiles.d/home.conf ifneq ($(HAVE_SYSV_COMPAT),) dist_tmpfiles_DATA += \ @@ -75,8 +72,7 @@ INSTALL_DIRS += \ endif # ENABLE_TMPFILES EXTRA_DIST += \ - tmpfiles.d/systemd.conf.m4 \ - tmpfiles.d/etc.conf.m4 \ + tmpfiles.d/etc.tmpfiles.m4 \ units/systemd-tmpfiles-setup-dev.service.in \ units/systemd-tmpfiles-setup.service.in \ units/systemd-tmpfiles-clean.service.in diff --git a/src/grp-initprogs/systemd-tmpfiles/etc.tmpfiles.m4 b/src/grp-initprogs/systemd-tmpfiles/etc.tmpfiles.m4 new file mode 100644 index 0000000000..928105ea8d --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/etc.tmpfiles.m4 @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +L /etc/os-release - - - - ../usr/lib/os-release +L /etc/localtime - - - - ../usr/share/zoneinfo/UTC +L+ /etc/mtab - - - - ../proc/self/mounts +m4_ifdef(`HAVE_SMACK_RUN_LABEL', +t /etc/mtab - - - - security.SMACK64=_ +)m4_dnl +C /etc/nsswitch.conf - - - - +m4_ifdef(`HAVE_PAM', +C /etc/pam.d - - - - +)m4_dnl diff --git a/src/grp-initprogs/systemd-tmpfiles/home.tmpfiles b/src/grp-initprogs/systemd-tmpfiles/home.tmpfiles new file mode 100644 index 0000000000..9f25b83392 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/home.tmpfiles @@ -0,0 +1,11 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +Q /home 0755 - - - +q /srv 0755 - - - diff --git a/src/grp-initprogs/systemd-tmpfiles/legacy.tmpfiles b/src/grp-initprogs/systemd-tmpfiles/legacy.tmpfiles new file mode 100644 index 0000000000..62e2ae0986 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/legacy.tmpfiles @@ -0,0 +1,27 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +# These files are considered legacy and are unnecessary on legacy-free +# systems. + +d /run/lock 0755 root root - +L /var/lock - - - - ../run/lock + +# /run/lock/subsys is used for serializing SysV service execution, and +# hence without use on SysV-less systems. + +d /run/lock/subsys 0755 root root - + +# /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the +# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and +# 'quotacheck.mode=force' + +r! /forcefsck +r! /fastboot +r! /forcequotacheck diff --git a/src/grp-initprogs/systemd-tmpfiles/systemd-nologin.tmpfiles b/src/grp-initprogs/systemd-tmpfiles/systemd-nologin.tmpfiles new file mode 100644 index 0000000000..a30a8da604 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/systemd-nologin.tmpfiles @@ -0,0 +1,11 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5), systemd-user-session.service(5) and pam_nologin(8). +# This file has special suffix so it is not run by mistake. + +F! /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)" diff --git a/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.service.in b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.service.in new file mode 100644 index 0000000000..133c8c94c4 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.service.in @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Cleanup of Temporary Directories +Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) +DefaultDependencies=no +Conflicts=shutdown.target +After=local-fs.target time-sync.target +Before=shutdown.target + +[Service] +Type=oneshot +ExecStart=@rootbindir@/systemd-tmpfiles --clean +IOSchedulingClass=idle diff --git a/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.timer b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.timer new file mode 100644 index 0000000000..9975dcfaca --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.timer @@ -0,0 +1,14 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Daily Cleanup of Temporary Directories +Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) + +[Timer] +OnBootSec=15min +OnUnitActiveSec=1d diff --git a/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup-dev.service.in b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup-dev.service.in new file mode 100644 index 0000000000..0123a030e4 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup-dev.service.in @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Create Static Device Nodes in /dev +Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-sysusers.service +Before=sysinit.target local-fs-pre.target systemd-udevd.service shutdown.target +ConditionCapability=CAP_SYS_MODULE + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create --boot diff --git a/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup.service.in b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup.service.in new file mode 100644 index 0000000000..e895cda0e6 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup.service.in @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Create Volatile Files and Directories +Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) +DefaultDependencies=no +Conflicts=shutdown.target +After=local-fs.target systemd-sysusers.service +Before=sysinit.target shutdown.target +RefuseManualStop=yes + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev diff --git a/src/grp-initutils/systemd-tmpfiles/systemd-tmpfiles.completion.zsh b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.completion.zsh index 6ff02e5d98..6ff02e5d98 100644 --- a/src/grp-initutils/systemd-tmpfiles/systemd-tmpfiles.completion.zsh +++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.completion.zsh diff --git a/src/grp-initprogs/systemd-tmpfiles/tmp.tmpfiles b/src/grp-initprogs/systemd-tmpfiles/tmp.tmpfiles new file mode 100644 index 0000000000..fe5225d751 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/tmp.tmpfiles @@ -0,0 +1,12 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +# Clear tmp directories separately, to make them easier to override +q /tmp 1777 root root 10d +q /var/tmp 1777 root root 30d diff --git a/src/grp-initutils/systemd-tmpfiles/tmpfiles.c b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c index f865b9cc3e..f865b9cc3e 100644 --- a/src/grp-initutils/systemd-tmpfiles/tmpfiles.c +++ b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c diff --git a/src/grp-initprogs/systemd-tmpfiles/var.tmpfiles b/src/grp-initprogs/systemd-tmpfiles/var.tmpfiles new file mode 100644 index 0000000000..ae7952e77a --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/var.tmpfiles @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +q /var 0755 - - - + +L /var/run - - - - ../run + +d /var/log 0755 - - - +f /var/log/wtmp 0664 root utmp - +f /var/log/btmp 0600 root utmp - + +d /var/cache 0755 - - - + +d /var/lib 0755 - - - + +d /var/spool 0755 - - - diff --git a/src/grp-initprogs/systemd-tmpfiles/x11.tmpfiles b/src/grp-initprogs/systemd-tmpfiles/x11.tmpfiles new file mode 100644 index 0000000000..4c96a54a13 --- /dev/null +++ b/src/grp-initprogs/systemd-tmpfiles/x11.tmpfiles @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +# Make sure these are created by default so that nobody else can +d /tmp/.X11-unix 1777 root root 10d +d /tmp/.ICE-unix 1777 root root 10d +d /tmp/.XIM-unix 1777 root root 10d +d /tmp/.font-unix 1777 root root 10d +d /tmp/.Test-unix 1777 root root 10d + +# Unlink the X11 lock files +r! /tmp/.X[0-9]*-lock diff --git a/src/grp-initutils/systemd-update-done/Makefile b/src/grp-initprogs/systemd-update-done/Makefile index 90cb440874..90cb440874 100644 --- a/src/grp-initutils/systemd-update-done/Makefile +++ b/src/grp-initprogs/systemd-update-done/Makefile diff --git a/src/grp-initprogs/systemd-update-done/systemd-update-done.service.in b/src/grp-initprogs/systemd-update-done/systemd-update-done.service.in new file mode 100644 index 0000000000..ec7d906392 --- /dev/null +++ b/src/grp-initprogs/systemd-update-done/systemd-update-done.service.in @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Update is Completed +Documentation=man:systemd-update-done.service(8) +DefaultDependencies=no +Conflicts=shutdown.target +After=local-fs.target +Before=sysinit.target shutdown.target +ConditionNeedsUpdate=|/etc +ConditionNeedsUpdate=|/var + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-update-done diff --git a/src/grp-initutils/systemd-update-done/update-done.c b/src/grp-initprogs/systemd-update-done/update-done.c index 39d19ec048..39d19ec048 100644 --- a/src/grp-initutils/systemd-update-done/update-done.c +++ b/src/grp-initprogs/systemd-update-done/update-done.c diff --git a/src/grp-initutils/systemd-update-utmp/Makefile b/src/grp-initprogs/systemd-update-utmp/Makefile index 0107808281..0107808281 100644 --- a/src/grp-initutils/systemd-update-utmp/Makefile +++ b/src/grp-initprogs/systemd-update-utmp/Makefile diff --git a/src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.in b/src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.in new file mode 100644 index 0000000000..163eccd91f --- /dev/null +++ b/src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.in @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Update UTMP about System Boot/Shutdown +Documentation=man:systemd-update-utmp.service(8) man:utmp(5) +DefaultDependencies=no +RequiresMountsFor=/var/log/wtmp +Conflicts=shutdown.target +After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service +Before=sysinit.target shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-update-utmp reboot +ExecStop=@rootlibexecdir@/systemd-update-utmp shutdown diff --git a/src/grp-initutils/systemd-update-utmp/update-utmp.c b/src/grp-initprogs/systemd-update-utmp/update-utmp.c index 69264c3a26..69264c3a26 100644 --- a/src/grp-initutils/systemd-update-utmp/update-utmp.c +++ b/src/grp-initprogs/systemd-update-utmp/update-utmp.c diff --git a/src/grp-initutils/systemd-user-sessions/Makefile b/src/grp-initprogs/systemd-user-sessions/Makefile index 66fa3b7059..66fa3b7059 100644 --- a/src/grp-initutils/systemd-user-sessions/Makefile +++ b/src/grp-initprogs/systemd-user-sessions/Makefile diff --git a/src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.in b/src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.in new file mode 100644 index 0000000000..b4ea5a134b --- /dev/null +++ b/src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.in @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Permit User Sessions +Documentation=man:systemd-user-sessions.service(8) +After=remote-fs.target nss-user-lookup.target network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-user-sessions start +ExecStop=@rootlibexecdir@/systemd-user-sessions stop diff --git a/src/grp-initutils/systemd-user-sessions/user-sessions.c b/src/grp-initprogs/systemd-user-sessions/user-sessions.c index 639c0200e6..639c0200e6 100644 --- a/src/grp-initutils/systemd-user-sessions/user-sessions.c +++ b/src/grp-initprogs/systemd-user-sessions/user-sessions.c diff --git a/src/grp-initutils/systemd-vconsole-setup/.gitignore b/src/grp-initprogs/systemd-vconsole-setup/.gitignore index 82741b2fb3..82741b2fb3 100644 --- a/src/grp-initutils/systemd-vconsole-setup/.gitignore +++ b/src/grp-initprogs/systemd-vconsole-setup/.gitignore diff --git a/src/grp-initutils/systemd-vconsole-setup/90-vconsole.rules.in b/src/grp-initprogs/systemd-vconsole-setup/90-vconsole.rules.in index 35b9ad5151..35b9ad5151 100644 --- a/src/grp-initutils/systemd-vconsole-setup/90-vconsole.rules.in +++ b/src/grp-initprogs/systemd-vconsole-setup/90-vconsole.rules.in diff --git a/src/grp-initutils/systemd-vconsole-setup/Makefile b/src/grp-initprogs/systemd-vconsole-setup/Makefile index 99b369967e..99b369967e 100644 --- a/src/grp-initutils/systemd-vconsole-setup/Makefile +++ b/src/grp-initprogs/systemd-vconsole-setup/Makefile diff --git a/src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.in b/src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.in new file mode 100644 index 0000000000..6160361871 --- /dev/null +++ b/src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.in @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Setup Virtual Console +Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5) +DefaultDependencies=no +Conflicts=shutdown.target +Before=sysinit.target shutdown.target +ConditionPathExists=/dev/tty0 + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-vconsole-setup diff --git a/src/grp-initutils/systemd-vconsole-setup/vconsole-setup.c b/src/grp-initprogs/systemd-vconsole-setup/vconsole-setup.c index 87c0c2f066..87c0c2f066 100644 --- a/src/grp-initutils/systemd-vconsole-setup/vconsole-setup.c +++ b/src/grp-initprogs/systemd-vconsole-setup/vconsole-setup.c diff --git a/src/grp-journal/Makefile b/src/grp-journal/Makefile index 6538713813..f1f3453d33 100644 --- a/src/grp-journal/Makefile +++ b/src/grp-journal/Makefile @@ -167,6 +167,9 @@ tests += \ test-compress-benchmark endif # HAVE_COMPRESSION +dist_tmpfiles_DATA = \ + tmpfiles.d/journal-nocow.conf + nested.subdirs += journalctl systemd-journald libjournal-core nested.subdirs += systemd-cat #nested.subdirs += grp-remote diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile index 05df34a71d..f6e07621a8 100644 --- a/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile +++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile @@ -60,6 +60,9 @@ nodist_systemunit_DATA += \ dist_gatewayddocumentroot_DATA = \ src/journal-remote/browse.html +dist_sysusers_DATA += \ + sysusers.d/systemd-journal-gateway.conf + endif # HAVE_MICROHTTPD EXTRA_DIST += \ diff --git a/src/grp-journal/grp-remote/systemd-remote.sysusers.m4 b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gateway.sysusers index 0e9d71cdd0..a60fcf4d42 100644 --- a/src/grp-journal/grp-remote/systemd-remote.sysusers.m4 +++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gateway.sysusers @@ -7,8 +7,3 @@ m4_ifdef(`HAVE_MICROHTTPD', u systemd-journal-gateway - "systemd Journal Gateway" -u systemd-journal-remote - "systemd Journal Remote" -)m4_dnl -m4_ifdef(`HAVE_LIBCURL', -u systemd-journal-upload - "systemd Journal Upload" -)m4_dnl diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.in b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.in new file mode 100644 index 0000000000..f4f845841d --- /dev/null +++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.in @@ -0,0 +1,29 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Gateway Service +Documentation=man:systemd-journal-gatewayd(8) +Requires=systemd-journal-gatewayd.socket + +[Service] +ExecStart=@rootlibexecdir@/systemd-journal-gatewayd +User=systemd-journal-gateway +Group=systemd-journal-gateway +SupplementaryGroups=systemd-journal +PrivateTmp=yes +PrivateDevices=yes +PrivateNetwork=yes +ProtectSystem=full +ProtectHome=yes + +# If there are many split upjournal files we need a lot of fds to +# access them all and combine +LimitNOFILE=16384 + +[Install] +Also=systemd-journal-gatewayd.socket diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.socket b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.socket new file mode 100644 index 0000000000..79d9b04210 --- /dev/null +++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.socket @@ -0,0 +1,16 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Gateway Service Socket +Documentation=man:systemd-journal-gatewayd(8) + +[Socket] +ListenStream=19531 + +[Install] +WantedBy=sockets.target diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile index b75eeedae8..7a9d9b19df 100644 --- a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile +++ b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile @@ -63,6 +63,9 @@ endif # HAVE_GNUTLS dist_systemunit_DATA += \ units/systemd-journal-remote.socket +dist_sysusers_DATA += \ + sysusers.d/systemd-journal-remote.conf + nodist_systemunit_DATA += \ units/systemd-journal-remote.service diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.service.in b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.service.in new file mode 100644 index 0000000000..fdf3da4b64 --- /dev/null +++ b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.service.in @@ -0,0 +1,25 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Remote Sink Service +Documentation=man:systemd-journal-remote(8) man:journal-remote.conf(5) +Requires=systemd-journal-remote.socket + +[Service] +ExecStart=@rootlibexecdir@/systemd-journal-remote \ + --listen-https=-3 \ + --output=/var/log/journal/remote/ +User=systemd-journal-remote +Group=systemd-journal-remote +PrivateTmp=yes +PrivateDevices=yes +PrivateNetwork=yes +WatchdogSec=3min + +[Install] +Also=systemd-journal-remote.socket diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.socket b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.socket new file mode 100644 index 0000000000..076dcae8a3 --- /dev/null +++ b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.socket @@ -0,0 +1,15 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Remote Sink Socket + +[Socket] +ListenStream=19532 + +[Install] +WantedBy=sockets.target diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.sysusers b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.sysusers new file mode 100644 index 0000000000..ca20c24896 --- /dev/null +++ b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.sysusers @@ -0,0 +1,8 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +u systemd-journal-remote - "systemd Journal Remote" diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/Makefile b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile index c47fcf0128..845a3a566d 100644 --- a/src/grp-journal/grp-remote/systemd-journal-upload/Makefile +++ b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile @@ -45,7 +45,11 @@ nodist_systemunit_DATA += \ nodist_pkgsysconf_DATA += \ src/journal-remote/journal-upload.conf -endif + +dist_sysusers_DATA += \ + sysusers.d/systemd-journal-upload.conf + +endif # HAVE_LIBCURL EXTRA_DIST += \ units/systemd-journal-upload.service.in \ diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.service.in b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.service.in new file mode 100644 index 0000000000..1f488ff425 --- /dev/null +++ b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.service.in @@ -0,0 +1,27 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Remote Upload Service +Documentation=man:systemd-journal-upload(8) +After=network.target + +[Service] +ExecStart=@rootlibexecdir@/systemd-journal-upload \ + --save-state +User=systemd-journal-upload +SupplementaryGroups=systemd-journal +PrivateTmp=yes +PrivateDevices=yes +WatchdogSec=3min + +# If there are many split up journal files we need a lot of fds to +# access them all and combine +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.sysusers b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.sysusers new file mode 100644 index 0000000000..927d400279 --- /dev/null +++ b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.sysusers @@ -0,0 +1,8 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +u systemd-journal-upload - "systemd Journal Upload" diff --git a/src/grp-journal/journal-nocow.tmpfiles b/src/grp-journal/journal-nocow.tmpfiles new file mode 100644 index 0000000000..e7938c8911 --- /dev/null +++ b/src/grp-journal/journal-nocow.tmpfiles @@ -0,0 +1,27 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +# Set the NOCOW attribute for directories of journal files. This flag +# is inheredited by their new files and sub-directories. Matters only +# for btrfs filesystems. +# +# WARNING: Enabling the NOCOW attribute improves journal performance +# substantially, but also disables the btrfs checksum logic. In +# btrfs RAID filesystems the checksums are needed for rebuilding +# corrupted files. Without checksums such rebuilds are not +# possible. +# +# In a single-disk filesystem (or a filesystem without redundancy) +# enabling the NOCOW attribute for journal files is safe, because +# they have their own checksums and a rebuilding wouldn't be possible +# in any case. + +h /var/log/journal - - - - +C +h /var/log/journal/%m - - - - +C +h /var/log/journal/remote - - - - +C diff --git a/src/grp-journal/journalctl/Makefile b/src/grp-journal/journalctl/Makefile index ce650ae733..a7aa51403e 100644 --- a/src/grp-journal/journalctl/Makefile +++ b/src/grp-journal/journalctl/Makefile @@ -49,6 +49,18 @@ journalctl_LDADD += \ $(QRENCODE_LIBS) endif # HAVE_QRENCODE +nodist_systemunit_DATA += \ + units/systemd-journal-flush.service \ + units/systemd-journal-catalog-update.service + +SYSINIT_TARGET_WANTS += \ + systemd-journal-flush.service \ + systemd-journal-catalog-update.service + +EXTRA_DIST += \ + units/systemd-journal-flush.service.in \ + units/systemd-journal-catalog-update.service.in + sd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-journal/journalctl/systemd-journal-catalog-update.service.in b/src/grp-journal/journalctl/systemd-journal-catalog-update.service.in new file mode 100644 index 0000000000..6370dd478f --- /dev/null +++ b/src/grp-journal/journalctl/systemd-journal-catalog-update.service.in @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Rebuild Journal Catalog +Documentation=man:systemd-journald.service(8) man:journald.conf(5) +DefaultDependencies=no +Conflicts=shutdown.target +After=local-fs.target +Before=sysinit.target shutdown.target systemd-update-done.service +ConditionNeedsUpdate=/etc + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootbindir@/journalctl --update-catalog +TimeoutSec=90s diff --git a/src/grp-journal/journalctl/systemd-journal-flush.service.in b/src/grp-journal/journalctl/systemd-journal-flush.service.in new file mode 100644 index 0000000000..a0a2e3fdb4 --- /dev/null +++ b/src/grp-journal/journalctl/systemd-journal-flush.service.in @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Flush Journal to Persistent Storage +Documentation=man:systemd-journald.service(8) man:journald.conf(5) +DefaultDependencies=no +Requires=systemd-journald.service +After=systemd-journald.service +After=systemd-remount-fs.service +Before=systemd-user-sessions.service systemd-tmpfiles-setup.service +RequiresMountsFor=/var/log/journal + +[Service] +ExecStart=@rootbindir@/journalctl --flush +Type=oneshot +RemainAfterExit=yes +TimeoutSec=90s diff --git a/src/grp-journal/systemd-journald/Makefile b/src/grp-journal/systemd-journald/Makefile index 640528bae4..62f19aa1b8 100644 --- a/src/grp-journal/systemd-journald/Makefile +++ b/src/grp-journal/systemd-journald/Makefile @@ -40,14 +40,13 @@ dist_systemunit_DATA += \ units/systemd-journald-audit.socket nodist_systemunit_DATA += \ - units/systemd-journald.service \ - units/systemd-journal-flush.service \ - units/systemd-journal-catalog-update.service + units/systemd-journald.service dist_pkgsysconf_DATA += \ src/journal/journald.conf -dist_catalog_DATA = \ +# TODO +_dist_catalog_DATA = \ catalog/systemd.bg.catalog \ catalog/systemd.be.catalog \ catalog/systemd.be@latin.catalog \ @@ -66,14 +65,10 @@ SOCKETS_TARGET_WANTS += \ systemd-journald-audit.socket SYSINIT_TARGET_WANTS += \ - systemd-journald.service \ - systemd-journal-flush.service \ - systemd-journal-catalog-update.service + systemd-journald.service EXTRA_DIST += \ - units/systemd-journald.service.in \ - units/systemd-journal-flush.service.in \ - units/systemd-journal-catalog-update.service.in + units/systemd-journald.service.in gperf_gperf_sources += \ src/journal/journald-gperf.gperf diff --git a/src/grp-journal/libjournal-core/journald.conf b/src/grp-journal/systemd-journald/journald.conf index 2541b949be..2541b949be 100644 --- a/src/grp-journal/libjournal-core/journald.conf +++ b/src/grp-journal/systemd-journald/journald.conf diff --git a/src/grp-journal/systemd-journald/systemd-journald-audit.socket b/src/grp-journal/systemd-journald/systemd-journald-audit.socket new file mode 100644 index 0000000000..541f2cf38d --- /dev/null +++ b/src/grp-journal/systemd-journald/systemd-journald-audit.socket @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Audit Socket +Documentation=man:systemd-journald.service(8) man:journald.conf(5) +DefaultDependencies=no +Before=sockets.target +ConditionSecurity=audit +ConditionCapability=CAP_AUDIT_READ + +[Socket] +Service=systemd-journald.service +ReceiveBuffer=128M +ListenNetlink=audit 1 +PassCredentials=yes diff --git a/src/grp-journal/systemd-journald/systemd-journald-dev-log.socket b/src/grp-journal/systemd-journald/systemd-journald-dev-log.socket new file mode 100644 index 0000000000..ffd44bb507 --- /dev/null +++ b/src/grp-journal/systemd-journald/systemd-journald-dev-log.socket @@ -0,0 +1,32 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Socket (/dev/log) +Documentation=man:systemd-journald.service(8) man:journald.conf(5) +DefaultDependencies=no +Before=sockets.target + +# Mount and swap units need this. If this socket unit is removed by an +# isolate request the mount and swap units would be removed too, +# hence let's exclude this from isolate requests. +IgnoreOnIsolate=yes + +[Socket] +Service=systemd-journald.service +ListenDatagram=/run/systemd/journal/dev-log +Symlinks=/dev/log +SocketMode=0666 +PassCredentials=yes +PassSecurity=yes + +# Increase both the send and receive buffer, so that things don't +# block early. Note that journald internally uses the this socket both +# for receiving syslog messages, and for forwarding them to any other +# syslog, hence we bump both values. +ReceiveBuffer=8M +SendBuffer=8M diff --git a/src/grp-journal/systemd-journald/systemd-journald.service.in b/src/grp-journal/systemd-journald/systemd-journald.service.in new file mode 100644 index 0000000000..41bfde5be3 --- /dev/null +++ b/src/grp-journal/systemd-journald/systemd-journald.service.in @@ -0,0 +1,32 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Service +Documentation=man:systemd-journald.service(8) man:journald.conf(5) +DefaultDependencies=no +Requires=systemd-journald.socket +After=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket syslog.socket +Before=sysinit.target + +[Service] +Type=notify +Sockets=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket +ExecStart=@rootlibexecdir@/systemd-journald +Restart=always +RestartSec=0 +NotifyAccess=all +StandardOutput=null +CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE +WatchdogSec=3min +FileDescriptorStoreMax=1024 + +# Increase the default a bit in order to allow many simultaneous +# services being run since we keep one fd open per service. Also, when +# flushing journal files to disk, we might need a lot of fds when many +# journal files are combined. +LimitNOFILE=16384 diff --git a/src/grp-journal/systemd-journald/systemd-journald.socket b/src/grp-journal/systemd-journald/systemd-journald.socket new file mode 100644 index 0000000000..71737014ca --- /dev/null +++ b/src/grp-journal/systemd-journald/systemd-journald.socket @@ -0,0 +1,26 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Journal Socket +Documentation=man:systemd-journald.service(8) man:journald.conf(5) +DefaultDependencies=no +Before=sockets.target + +# Mount and swap units need this. If this socket unit is removed by an +# isolate request the mount and swap units would be removed too, +# hence let's exclude this from isolate requests. +IgnoreOnIsolate=yes + +[Socket] +ListenStream=/run/systemd/journal/stdout +ListenDatagram=/run/systemd/journal/socket +SocketMode=0666 +PassCredentials=yes +PassSecurity=yes +ReceiveBuffer=8M +Service=systemd-journald.service diff --git a/src/grp-journal/systemd-journald/systemd-journald.tmpfiles.m4 b/src/grp-journal/systemd-journald/systemd-journald.tmpfiles.m4 new file mode 100644 index 0000000000..2e8bd8cbef --- /dev/null +++ b/src/grp-journal/systemd-journald/systemd-journald.tmpfiles.m4 @@ -0,0 +1,55 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +d /run/log 0755 root root - + +z /run/log/journal 2755 root systemd-journal - - +Z /run/log/journal/%m ~2750 root systemd-journal - - +m4_ifdef(`HAVE_ACL',`m4_dnl +m4_ifdef(`ENABLE_ADM_GROUP',`m4_dnl +m4_ifdef(`ENABLE_WHEEL_GROUP',`` +a+ /run/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x +a+ /run/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x +a+ /run/log/journal/%m/*.journal* - - - - group:adm:r--,group:wheel:r-- +'',`` +a+ /run/log/journal/%m - - - - d:group:adm:r-x +a+ /run/log/journal/%m - - - - group:adm:r-x +a+ /run/log/journal/%m/*.journal* - - - - group:adm:r-- +'')',`m4_dnl +m4_ifdef(`ENABLE_WHEEL_GROUP',`` +a+ /run/log/journal/%m - - - - d:group:wheel:r-x +a+ /run/log/journal/%m - - - - group:wheel:r-x +a+ /run/log/journal/%m/*.journal* - - - - group:wheel:r-- +'')')')m4_dnl + +z /var/log/journal 2755 root systemd-journal - - +z /var/log/journal/%m 2755 root systemd-journal - - +z /var/log/journal/%m/system.journal 0640 root systemd-journal - - +m4_ifdef(`HAVE_ACL',`m4_dnl +m4_ifdef(`ENABLE_ADM_GROUP',`m4_dnl +m4_ifdef(`ENABLE_WHEEL_GROUP',`` +a+ /var/log/journal - - - - d:group:adm:r-x,d:group:wheel:r-x +a+ /var/log/journal - - - - group:adm:r-x,group:wheel:r-x +a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x +a+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x +a+ /var/log/journal/%m/system.journal - - - - group:adm:r--,group:wheel:r-- +'', `` +a+ /var/log/journal - - - - d:group:adm:r-x +a+ /var/log/journal - - - - group:adm:r-x +a+ /var/log/journal/%m - - - - d:group:adm:r-x +a+ /var/log/journal/%m - - - - group:adm:r-x +a+ /var/log/journal/%m/system.journal - - - - group:adm:r-- +'')',`m4_dnl +m4_ifdef(`ENABLE_WHEEL_GROUP',`` +a+ /var/log/journal - - - - d:group:wheel:r-x +a+ /var/log/journal - - - - group:wheel:r-x +a+ /var/log/journal/%m - - - - d:group:wheel:r-x +a+ /var/log/journal/%m - - - - group:wheel:r-x +a+ /var/log/journal/%m/system.journal - - - - group:wheel:r-- +'')')')m4_dnl diff --git a/src/grp-locale/systemd-localed/systemd-localed.service.in b/src/grp-locale/systemd-localed/systemd-localed.service.in new file mode 100644 index 0000000000..9b13f901a3 --- /dev/null +++ b/src/grp-locale/systemd-localed/systemd-localed.service.in @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Locale Service +Documentation=man:systemd-localed.service(8) man:locale.conf(5) man:vconsole.conf(5) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/localed + +[Service] +ExecStart=@rootlibexecdir@/systemd-localed +BusName=org.freedesktop.locale1 +CapabilityBoundingSet= +WatchdogSec=3min +PrivateTmp=yes +PrivateDevices=yes +PrivateNetwork=yes +ProtectSystem=yes +ProtectHome=yes diff --git a/src/grp-login/Makefile b/src/grp-login/Makefile index 381d653166..be6adc4880 100644 --- a/src/grp-login/Makefile +++ b/src/grp-login/Makefile @@ -56,60 +56,9 @@ tests += \ test-login-tables \ test-login-shared - -nodist_systemunit_DATA += \ - units/systemd-logind.service - -dist_systemunit_DATA += \ - units/user.slice - -dist_systemunit_DATA_busnames += \ - units/org.freedesktop.login1.busname - -dist_dbussystemservice_DATA += \ - src/login/org.freedesktop.login1.service - -dist_dbuspolicy_DATA += \ - src/login/org.freedesktop.login1.conf - -nodist_pkgsysconf_DATA += \ - src/login/logind.conf - -polkitpolicy_files += \ - src/login/org.freedesktop.login1.policy - -INSTALL_DIRS += \ - $(systemdstatedir) - -MULTI_USER_TARGET_WANTS += \ - systemd-logind.service - -SYSTEM_UNIT_ALIASES += \ - systemd-logind.service dbus-org.freedesktop.login1.service - -BUSNAMES_TARGET_WANTS += \ - org.freedesktop.login1.busname - -dist_udevrules_DATA += \ - src/login/70-uaccess.rules \ - src/login/70-power-switch.rules - -nodist_udevrules_DATA += \ - src/login/71-seat.rules \ - src/login/73-seat-late.rules +nested.subdirs += loginctl systemd-logind +nested.subdirs += pam_systemd systemd-inhibit endif # ENABLE_LOGIND -polkitpolicy_in_files += \ - src/login/org.freedesktop.login1.policy.in - -gperf_gperf_sources += \ - src/login/logind-gperf.gperf - -EXTRA_DIST += \ - src/login/71-seat.rules.in \ - src/login/73-seat-late.rules.in \ - units/systemd-logind.service.in \ - src/login/logind.conf.in - include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-login/liblogind-core/Makefile b/src/grp-login/liblogind-core/Makefile deleted file mode 100644 index 1575518aec..0000000000 --- a/src/grp-login/liblogind-core/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -*- Mode: makefile; indent-tabs-mode: t -*- -# -# This file is part of systemd. -# -# Copyright 2010-2012 Lennart Poettering -# Copyright 2010-2012 Kay Sievers -# Copyright 2013 Zbigniew Jędrzejewski-Szmek -# Copyright 2013 David Strauss -# Copyright 2016 Luke Shumaker -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk -include $(topsrcdir)/build-aux/Makefile.head.mk - -liblogind_core_la_SOURCES = \ - src/login/logind-core.c \ - src/login/logind-device.c \ - src/login/logind-device.h \ - src/login/logind-button.c \ - src/login/logind-button.h \ - src/login/logind-action.c \ - src/login/logind-action.h \ - src/login/logind-seat.c \ - src/login/logind-seat.h \ - src/login/logind-session.c \ - src/login/logind-session.h \ - src/login/logind-session-device.c \ - src/login/logind-session-device.h \ - src/login/logind-user.c \ - src/login/logind-user.h \ - src/login/logind-inhibit.c \ - src/login/logind-inhibit.h \ - src/login/logind-dbus.c \ - src/login/logind-session-dbus.c \ - src/login/logind-seat-dbus.c \ - src/login/logind-user-dbus.c \ - src/login/logind-utmp.c \ - src/login/logind-acl.h - -liblogind_core_la_LIBADD = \ - libshared.la - -ifneq ($(HAVE_ACL),) -liblogind_core_la_SOURCES += \ - src/login/logind-acl.c -endif # HAVE_ACL - -noinst_LTLIBRARIES += \ - liblogind-core.la - -include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-login/70-power-switch.rules b/src/grp-login/systemd-logind/70-power-switch.rules index e2855b50f7..e2855b50f7 100644 --- a/src/grp-login/70-power-switch.rules +++ b/src/grp-login/systemd-logind/70-power-switch.rules diff --git a/src/grp-login/70-uaccess.rules b/src/grp-login/systemd-logind/70-uaccess.rules index 50dcd2e275..50dcd2e275 100644 --- a/src/grp-login/70-uaccess.rules +++ b/src/grp-login/systemd-logind/70-uaccess.rules diff --git a/src/grp-login/71-seat.rules.in b/src/grp-login/systemd-logind/71-seat.rules.in index de55c9a4ec..de55c9a4ec 100644 --- a/src/grp-login/71-seat.rules.in +++ b/src/grp-login/systemd-logind/71-seat.rules.in diff --git a/src/grp-login/73-seat-late.rules.in b/src/grp-login/systemd-logind/73-seat-late.rules.in index 901df750fd..901df750fd 100644 --- a/src/grp-login/73-seat-late.rules.in +++ b/src/grp-login/systemd-logind/73-seat-late.rules.in diff --git a/src/grp-login/systemd-logind/Makefile b/src/grp-login/systemd-logind/Makefile index 9dd5855e88..18b18a1683 100644 --- a/src/grp-login/systemd-logind/Makefile +++ b/src/grp-login/systemd-logind/Makefile @@ -23,7 +23,38 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +_liblogind_core_la_SOURCES = \ + src/login/logind-core.c \ + src/login/logind-device.c \ + src/login/logind-device.h \ + src/login/logind-button.c \ + src/login/logind-button.h \ + src/login/logind-action.c \ + src/login/logind-action.h \ + src/login/logind-seat.c \ + src/login/logind-seat.h \ + src/login/logind-session.c \ + src/login/logind-session.h \ + src/login/logind-session-device.c \ + src/login/logind-session-device.h \ + src/login/logind-user.c \ + src/login/logind-user.h \ + src/login/logind-inhibit.c \ + src/login/logind-inhibit.h \ + src/login/logind-dbus.c \ + src/login/logind-session-dbus.c \ + src/login/logind-seat-dbus.c \ + src/login/logind-user-dbus.c \ + src/login/logind-utmp.c \ + src/login/logind-acl.h + +ifneq ($(HAVE_ACL),) +_liblogind_core_la_SOURCES += \ + src/login/logind-acl.c +endif # HAVE_ACL + systemd_logind_SOURCES = \ + $(_liblogind_core_la_SOURCES) \ src/login/logind.c \ src/login/logind.h @@ -31,9 +62,67 @@ nodist_systemd_logind_SOURCES = \ src/login/logind-gperf.c systemd_logind_LDADD = \ - liblogind-core.la + libshared.la rootlibexec_PROGRAMS += \ systemd-logind + +nodist_systemunit_DATA += \ + units/systemd-logind.service + +dist_systemunit_DATA += \ + units/user.slice + +dist_systemunit_DATA_busnames += \ + units/org.freedesktop.login1.busname + +dist_dbussystemservice_DATA += \ + src/login/org.freedesktop.login1.service + +dist_dbuspolicy_DATA += \ + src/login/org.freedesktop.login1.conf + +nodist_pkgsysconf_DATA += \ + src/login/logind.conf + +polkitpolicy_files += \ + src/login/org.freedesktop.login1.policy + +INSTALL_DIRS += \ + $(systemdstatedir) + +MULTI_USER_TARGET_WANTS += \ + systemd-logind.service + +SYSTEM_UNIT_ALIASES += \ + systemd-logind.service dbus-org.freedesktop.login1.service + +BUSNAMES_TARGET_WANTS += \ + org.freedesktop.login1.busname + +dist_udevrules_DATA += \ + src/login/70-uaccess.rules \ + src/login/70-power-switch.rules + +nodist_udevrules_DATA += \ + src/login/71-seat.rules \ + src/login/73-seat-late.rules + + +polkitpolicy_in_files += \ + src/login/org.freedesktop.login1.policy.in + +gperf_gperf_sources += \ + src/login/logind-gperf.gperf + +EXTRA_DIST += \ + src/login/71-seat.rules.in \ + src/login/73-seat-late.rules.in \ + units/systemd-logind.service.in \ + src/login/logind.conf.in + +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" +sd.CPPFLAGS += -DKEXEC=\"$(KEXEC)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-login/liblogind-core/logind-acl.c b/src/grp-login/systemd-logind/logind-acl.c index 44e49c1dad..44e49c1dad 100644 --- a/src/grp-login/liblogind-core/logind-acl.c +++ b/src/grp-login/systemd-logind/logind-acl.c diff --git a/src/grp-login/liblogind-core/logind-acl.h b/src/grp-login/systemd-logind/logind-acl.h index 7d324ea90a..7d324ea90a 100644 --- a/src/grp-login/liblogind-core/logind-acl.h +++ b/src/grp-login/systemd-logind/logind-acl.h diff --git a/src/grp-login/liblogind-core/logind-action.c b/src/grp-login/systemd-logind/logind-action.c index 0cfeab3fdb..0cfeab3fdb 100644 --- a/src/grp-login/liblogind-core/logind-action.c +++ b/src/grp-login/systemd-logind/logind-action.c diff --git a/src/grp-login/liblogind-core/logind-action.h b/src/grp-login/systemd-logind/logind-action.h index 39ba3cf0f6..39ba3cf0f6 100644 --- a/src/grp-login/liblogind-core/logind-action.h +++ b/src/grp-login/systemd-logind/logind-action.h diff --git a/src/grp-login/liblogind-core/logind-button.c b/src/grp-login/systemd-logind/logind-button.c index 81c82117fc..81c82117fc 100644 --- a/src/grp-login/liblogind-core/logind-button.c +++ b/src/grp-login/systemd-logind/logind-button.c diff --git a/src/grp-login/liblogind-core/logind-button.h b/src/grp-login/systemd-logind/logind-button.h index f30cba2959..f30cba2959 100644 --- a/src/grp-login/liblogind-core/logind-button.h +++ b/src/grp-login/systemd-logind/logind-button.h diff --git a/src/grp-login/liblogind-core/logind-core.c b/src/grp-login/systemd-logind/logind-core.c index 1d6475f8d7..1d6475f8d7 100644 --- a/src/grp-login/liblogind-core/logind-core.c +++ b/src/grp-login/systemd-logind/logind-core.c diff --git a/src/grp-login/liblogind-core/logind-dbus.c b/src/grp-login/systemd-logind/logind-dbus.c index cb51e43a5c..cb51e43a5c 100644 --- a/src/grp-login/liblogind-core/logind-dbus.c +++ b/src/grp-login/systemd-logind/logind-dbus.c diff --git a/src/grp-login/liblogind-core/logind-device.c b/src/grp-login/systemd-logind/logind-device.c index 6165a9ea6e..6165a9ea6e 100644 --- a/src/grp-login/liblogind-core/logind-device.c +++ b/src/grp-login/systemd-logind/logind-device.c diff --git a/src/grp-login/liblogind-core/logind-device.h b/src/grp-login/systemd-logind/logind-device.h index 9e2678d801..9e2678d801 100644 --- a/src/grp-login/liblogind-core/logind-device.h +++ b/src/grp-login/systemd-logind/logind-device.h diff --git a/src/grp-login/systemd-logind/logind-gperf.c b/src/grp-login/systemd-logind/logind-gperf.c new file mode 100644 index 0000000000..9cac645686 --- /dev/null +++ b/src/grp-login/systemd-logind/logind-gperf.c @@ -0,0 +1,144 @@ +/* ANSI-C code produced by gperf version 3.0.4 */ +/* Command-line: gperf */ +/* Computed positions: -k'10' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + +#include <stddef.h> +#include "shared/conf-parser.h" +#include "logind.h" +#include <string.h> + +#define TOTAL_KEYWORDS 23 +#define MIN_WORD_LENGTH 14 +#define MAX_WORD_LENGTH 33 +#define MIN_HASH_VALUE 14 +#define MAX_HASH_VALUE 44 +/* maximum key range = 31, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +logind_gperf_hash (register const char *str, register unsigned int len) +{ + static const unsigned char asso_values[] = + { + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 0, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 0, 0, 45, 45, 45, 20, 45, 45, 15, 45, + 45, 10, 0, 45, 0, 0, 0, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45 + }; + return len + asso_values[(unsigned char)str[9]]; +} + +#ifdef __GNUC__ +__inline +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +__attribute__ ((__gnu_inline__)) +#endif +#endif +const struct ConfigPerfItem * +logind_gperf_lookup (register const char *str, register unsigned int len) +{ + static const struct ConfigPerfItem wordlist[] = + { + {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, + {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, + {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, + {(char*)0}, {(char*)0}, + {"Login.NAutoVTs", config_parse_unsigned, 0, offsetof(Manager, n_autovts)}, + {"Login.ReserveVT", config_parse_unsigned, 0, offsetof(Manager, reserve_vt)}, + {"Login.IdleAction", config_parse_handle_action, 0, offsetof(Manager, idle_action)}, + {"Login.SessionsMax", config_parse_uint64, 0, offsetof(Manager, sessions_max)}, + {"Login.UserTasksMax", config_parse_uint64, 0, offsetof(Manager, user_tasks_max)}, + {"Login.IdleActionSec", config_parse_sec, 0, offsetof(Manager, idle_action_usec)}, + {"Login.HandlePowerKey", config_parse_handle_action, 0, offsetof(Manager, handle_power_key)}, + {"Login.HandleLidSwitch", config_parse_handle_action, 0, offsetof(Manager, handle_lid_switch)}, + {"Login.HandleSuspendKey", config_parse_handle_action, 0, offsetof(Manager, handle_suspend_key)}, + {"Login.HoldoffTimeoutSec", config_parse_sec, 0, offsetof(Manager, holdoff_timeout_usec)}, + {"Login.HandleHibernateKey", config_parse_handle_action, 0, offsetof(Manager, handle_hibernate_key)}, + {"Login.RemoveIPC", config_parse_bool, 0, offsetof(Manager, remove_ipc)}, + {"Login.RuntimeDirectorySize", config_parse_tmpfs_size, 0, offsetof(Manager, runtime_dir_size)}, + {"Login.HandleLidSwitchDocked", config_parse_handle_action, 0, offsetof(Manager, handle_lid_switch_docked)}, + {(char*)0}, + {"Login.PowerKeyIgnoreInhibited", config_parse_bool, 0, offsetof(Manager, power_key_ignore_inhibited)}, + {"Login.LidSwitchIgnoreInhibited", config_parse_bool, 0, offsetof(Manager, lid_switch_ignore_inhibited)}, + {"Login.SuspendKeyIgnoreInhibited", config_parse_bool, 0, offsetof(Manager, suspend_key_ignore_inhibited)}, + {(char*)0}, + {"Login.HibernateKeyIgnoreInhibited", config_parse_bool, 0, offsetof(Manager, hibernate_key_ignore_inhibited)}, + {"Login.KillOnlyUsers", config_parse_strv, 0, offsetof(Manager, kill_only_users)}, + {(char*)0}, {(char*)0}, + {"Login.KillExcludeUsers", config_parse_strv, 0, offsetof(Manager, kill_exclude_users)}, + {"Login.KillUserProcesses", config_parse_bool, 0, offsetof(Manager, kill_user_processes)}, + {"Login.InhibitorsMax", config_parse_uint64, 0, offsetof(Manager, inhibitors_max)}, + {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0}, + {"Login.InhibitDelayMaxSec", config_parse_sec, 0, offsetof(Manager, inhibit_delay_max)} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = logind_gperf_hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + { + register const char *s = wordlist[key].section_and_lvalue; + + if (s && *str == *s && !strcmp (str + 1, s + 1)) + return &wordlist[key]; + } + } + return 0; +} diff --git a/src/grp-login/liblogind-core/logind-gperf.gperf b/src/grp-login/systemd-logind/logind-gperf.gperf index 6d5c484439..6d5c484439 100644 --- a/src/grp-login/liblogind-core/logind-gperf.gperf +++ b/src/grp-login/systemd-logind/logind-gperf.gperf diff --git a/src/grp-login/liblogind-core/logind-inhibit.c b/src/grp-login/systemd-logind/logind-inhibit.c index 8a35db0dc8..8a35db0dc8 100644 --- a/src/grp-login/liblogind-core/logind-inhibit.c +++ b/src/grp-login/systemd-logind/logind-inhibit.c diff --git a/src/grp-login/liblogind-core/logind-inhibit.h b/src/grp-login/systemd-logind/logind-inhibit.h index 70de199c60..70de199c60 100644 --- a/src/grp-login/liblogind-core/logind-inhibit.h +++ b/src/grp-login/systemd-logind/logind-inhibit.h diff --git a/src/grp-login/liblogind-core/logind-seat-dbus.c b/src/grp-login/systemd-logind/logind-seat-dbus.c index fbebe6fcff..fbebe6fcff 100644 --- a/src/grp-login/liblogind-core/logind-seat-dbus.c +++ b/src/grp-login/systemd-logind/logind-seat-dbus.c diff --git a/src/grp-login/liblogind-core/logind-seat.c b/src/grp-login/systemd-logind/logind-seat.c index 6525ad5d7b..6525ad5d7b 100644 --- a/src/grp-login/liblogind-core/logind-seat.c +++ b/src/grp-login/systemd-logind/logind-seat.c diff --git a/src/grp-login/liblogind-core/logind-seat.h b/src/grp-login/systemd-logind/logind-seat.h index 7fbeb5a727..7fbeb5a727 100644 --- a/src/grp-login/liblogind-core/logind-seat.h +++ b/src/grp-login/systemd-logind/logind-seat.h diff --git a/src/grp-login/liblogind-core/logind-session-dbus.c b/src/grp-login/systemd-logind/logind-session-dbus.c index 76228d4474..76228d4474 100644 --- a/src/grp-login/liblogind-core/logind-session-dbus.c +++ b/src/grp-login/systemd-logind/logind-session-dbus.c diff --git a/src/grp-login/liblogind-core/logind-session-device.c b/src/grp-login/systemd-logind/logind-session-device.c index 99528488c0..99528488c0 100644 --- a/src/grp-login/liblogind-core/logind-session-device.c +++ b/src/grp-login/systemd-logind/logind-session-device.c diff --git a/src/grp-login/liblogind-core/logind-session-device.h b/src/grp-login/systemd-logind/logind-session-device.h index 4a22decb1d..4a22decb1d 100644 --- a/src/grp-login/liblogind-core/logind-session-device.h +++ b/src/grp-login/systemd-logind/logind-session-device.h diff --git a/src/grp-login/liblogind-core/logind-session.c b/src/grp-login/systemd-logind/logind-session.c index 928f4a6314..928f4a6314 100644 --- a/src/grp-login/liblogind-core/logind-session.c +++ b/src/grp-login/systemd-logind/logind-session.c diff --git a/src/grp-login/liblogind-core/logind-session.h b/src/grp-login/systemd-logind/logind-session.h index 23ff6576c9..23ff6576c9 100644 --- a/src/grp-login/liblogind-core/logind-session.h +++ b/src/grp-login/systemd-logind/logind-session.h diff --git a/src/grp-login/liblogind-core/logind-user-dbus.c b/src/grp-login/systemd-logind/logind-user-dbus.c index d82ced605e..d82ced605e 100644 --- a/src/grp-login/liblogind-core/logind-user-dbus.c +++ b/src/grp-login/systemd-logind/logind-user-dbus.c diff --git a/src/grp-login/liblogind-core/logind-user.c b/src/grp-login/systemd-logind/logind-user.c index 015276efc8..015276efc8 100644 --- a/src/grp-login/liblogind-core/logind-user.c +++ b/src/grp-login/systemd-logind/logind-user.c diff --git a/src/grp-login/liblogind-core/logind-user.h b/src/grp-login/systemd-logind/logind-user.h index b23c59fa1d..b23c59fa1d 100644 --- a/src/grp-login/liblogind-core/logind-user.h +++ b/src/grp-login/systemd-logind/logind-user.h diff --git a/src/grp-login/liblogind-core/logind-utmp.c b/src/grp-login/systemd-logind/logind-utmp.c index c5dc137d61..c5dc137d61 100644 --- a/src/grp-login/liblogind-core/logind-utmp.c +++ b/src/grp-login/systemd-logind/logind-utmp.c diff --git a/src/grp-login/logind.conf.in b/src/grp-login/systemd-logind/logind.conf.in index 32c0844cb6..32c0844cb6 100644 --- a/src/grp-login/logind.conf.in +++ b/src/grp-login/systemd-logind/logind.conf.in diff --git a/src/grp-login/liblogind-core/logind.h b/src/grp-login/systemd-logind/logind.h index effc498118..effc498118 100644 --- a/src/grp-login/liblogind-core/logind.h +++ b/src/grp-login/systemd-logind/logind.h diff --git a/src/grp-login/org.freedesktop.login1.conf b/src/grp-login/systemd-logind/org.freedesktop.login1.conf index c89e40457e..c89e40457e 100644 --- a/src/grp-login/org.freedesktop.login1.conf +++ b/src/grp-login/systemd-logind/org.freedesktop.login1.conf diff --git a/src/grp-login/org.freedesktop.login1.policy.in b/src/grp-login/systemd-logind/org.freedesktop.login1.policy.in index 1fa6441629..1fa6441629 100644 --- a/src/grp-login/org.freedesktop.login1.policy.in +++ b/src/grp-login/systemd-logind/org.freedesktop.login1.policy.in diff --git a/src/grp-login/org.freedesktop.login1.service b/src/grp-login/systemd-logind/org.freedesktop.login1.service index 762dae2bb3..762dae2bb3 100644 --- a/src/grp-login/org.freedesktop.login1.service +++ b/src/grp-login/systemd-logind/org.freedesktop.login1.service diff --git a/src/grp-login/systemd-logind/systemd-logind.service.in b/src/grp-login/systemd-logind/systemd-logind.service.in new file mode 100644 index 0000000000..ff049134ee --- /dev/null +++ b/src/grp-login/systemd-logind/systemd-logind.service.in @@ -0,0 +1,31 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Login Service +Documentation=man:systemd-logind.service(8) man:logind.conf(5) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/logind +Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat +Wants=user.slice +After=nss-user-lookup.target user.slice + +# Ask for the dbus socket. If running over kdbus, the socket will +# not be actually used. +Wants=dbus.socket +After=dbus.socket + +[Service] +ExecStart=@rootlibexecdir@/systemd-logind +Restart=always +RestartSec=0 +BusName=org.freedesktop.login1 +CapabilityBoundingSet=CAP_SYS_ADMIN CAP_MAC_ADMIN CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG +WatchdogSec=3min + +# Increase the default a bit in order to allow many simultaneous +# logins since we keep one fd open per session. +LimitNOFILE=16384 diff --git a/src/grp-login/systemd-user.m4 b/src/grp-login/systemd-logind/systemd-user.pam.m4 index f188a8e548..f188a8e548 100644 --- a/src/grp-login/systemd-user.m4 +++ b/src/grp-login/systemd-logind/systemd-user.pam.m4 diff --git a/src/grp-login/systemd-logind/user.slice b/src/grp-login/systemd-logind/user.slice new file mode 100644 index 0000000000..9fa6284c12 --- /dev/null +++ b/src/grp-login/systemd-logind/user.slice @@ -0,0 +1,11 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=User and Session Slice +Documentation=man:systemd.special(7) +Before=slices.target diff --git a/src/grp-machine/grp-import/systemd-importd/systemd-importd.service.in b/src/grp-machine/grp-import/systemd-importd/systemd-importd.service.in new file mode 100644 index 0000000000..b74ad72cdc --- /dev/null +++ b/src/grp-machine/grp-import/systemd-importd/systemd-importd.service.in @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Virtual Machine and Container Download Service +Documentation=man:systemd-importd.service(8) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/importd + +[Service] +ExecStart=@rootlibexecdir@/systemd-importd +BusName=org.freedesktop.import1 +CapabilityBoundingSet=CAP_CHOWN CAP_FOWNER CAP_FSETID CAP_MKNOD CAP_SETFCAP CAP_SYS_ADMIN CAP_SETPCAP CAP_DAC_OVERRIDE +NoNewPrivileges=yes +WatchdogSec=3min +KillMode=mixed diff --git a/src/grp-machine/systemd-machined/machine.slice b/src/grp-machine/systemd-machined/machine.slice new file mode 100644 index 0000000000..3d40dfd73b --- /dev/null +++ b/src/grp-machine/systemd-machined/machine.slice @@ -0,0 +1,11 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Virtual Machine and Container Slice +Documentation=man:systemd.special(7) +Before=slices.target diff --git a/src/grp-machine/systemd-machined/systemd-machined.service.in b/src/grp-machine/systemd-machined/systemd-machined.service.in new file mode 100644 index 0000000000..685baab21d --- /dev/null +++ b/src/grp-machine/systemd-machined/systemd-machined.service.in @@ -0,0 +1,23 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Virtual Machine and Container Registration Service +Documentation=man:systemd-machined.service(8) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/machined +Wants=machine.slice +After=machine.slice + +[Service] +ExecStart=@rootlibexecdir@/systemd-machined +BusName=org.freedesktop.machine1 +CapabilityBoundingSet=CAP_KILL CAP_SYS_PTRACE CAP_SYS_ADMIN CAP_SETGID CAP_SYS_CHROOT CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_CHOWN CAP_FOWNER CAP_FSETID CAP_MKNOD +WatchdogSec=3min + +# Note that machined cannot be placed in a mount namespace, since it +# needs access to the host's mount namespace in order to implement the +# "machinectl bind" operation. diff --git a/src/grp-network/Makefile b/src/grp-network/Makefile index 7cbd9142d0..54f06b1822 100644 --- a/src/grp-network/Makefile +++ b/src/grp-network/Makefile @@ -23,7 +23,8 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -dist_network_DATA = \ +# TODO +_dist_network_DATA = \ network/99-default.link \ network/80-container-host0.network \ network/80-container-ve.network \ @@ -65,33 +66,6 @@ tests += \ test-network \ test-network-tables -dist_systemunit_DATA += \ - units/systemd-networkd.socket - -nodist_systemunit_DATA += \ - units/systemd-networkd.service \ - units/systemd-networkd-wait-online.service - -dist_systemunit_DATA_busnames += \ - units/org.freedesktop.network1.busname - -dist_dbussystemservice_DATA += \ - src/network/org.freedesktop.network1.service - -dist_dbuspolicy_DATA += \ - src/network/org.freedesktop.network1.conf - -GENERAL_ALIASES += \ - $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \ - $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \ - $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service - -SYSTEM_UNIT_ALIASES += \ - systemd-networkd.service dbus-org.freedesktop.network1.service - -BUSNAMES_TARGET_WANTS += \ - org.freedesktop.network1.busname - endif # ENABLE_NETWORKD gperf_gperf_sources += \ diff --git a/src/grp-network/.gitignore b/src/grp-network/libnetworkd-core/.gitignore index aca55206b7..aca55206b7 100644 --- a/src/grp-network/.gitignore +++ b/src/grp-network/libnetworkd-core/.gitignore diff --git a/src/grp-network/network/network.target b/src/grp-network/network/network.target new file mode 100644 index 0000000000..61ebdcadd0 --- /dev/null +++ b/src/grp-network/network/network.target @@ -0,0 +1,13 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Network +Documentation=man:systemd.special(7) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget +After=network-pre.target +RefuseManualStart=yes diff --git a/src/grp-network/systemd-networkd-wait-online/Makefile b/src/grp-network/systemd-networkd-wait-online/Makefile index 12aa13c48f..8d1870c862 100644 --- a/src/grp-network/systemd-networkd-wait-online/Makefile +++ b/src/grp-network/systemd-networkd-wait-online/Makefile @@ -41,4 +41,13 @@ systemd_networkd_wait_online_LDADD = \ libsystemd-network.la \ libshared.la +nodist_systemunit_DATA += \ + units/systemd-networkd-wait-online.service + +GENERAL_ALIASES += \ + $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service + +EXTRA_DIST += \ + units/systemd-networkd-wait-online.service.in + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in new file mode 100644 index 0000000000..a9bad7aa8f --- /dev/null +++ b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in @@ -0,0 +1,23 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Wait for Network to be Configured +Documentation=man:systemd-networkd-wait-online.service(8) +DefaultDependencies=no +Conflicts=shutdown.target +Requisite=systemd-networkd.service +After=systemd-networkd.service +Before=network-online.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-networkd-wait-online +RemainAfterExit=yes + +[Install] +WantedBy=network-online.target diff --git a/src/grp-network/systemd-networkd/Makefile b/src/grp-network/systemd-networkd/Makefile index 8b7e44062b..764b51a2ba 100644 --- a/src/grp-network/systemd-networkd/Makefile +++ b/src/grp-network/systemd-networkd/Makefile @@ -37,4 +37,35 @@ systemd_networkd_LDADD += \ libfirewall.la endif # HAVE_LIBIPTC +dist_systemunit_DATA += \ + units/systemd-networkd.socket + +nodist_systemunit_DATA += \ + units/systemd-networkd.service \ + units/systemd-networkd-wait-online.service + +dist_systemunit_DATA_busnames += \ + units/org.freedesktop.network1.busname + +dist_dbussystemservice_DATA += \ + src/network/org.freedesktop.network1.service + +dist_dbuspolicy_DATA += \ + src/network/org.freedesktop.network1.conf + +GENERAL_ALIASES += \ + $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \ + $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \ + $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service + +SYSTEM_UNIT_ALIASES += \ + systemd-networkd.service dbus-org.freedesktop.network1.service + +BUSNAMES_TARGET_WANTS += \ + org.freedesktop.network1.busname + +EXTRA_DIST += \ + units/systemd-networkd.service.m4.in \ + test/networkd-test.py + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-network/org.freedesktop.network1.conf b/src/grp-network/systemd-networkd/org.freedesktop.network1.conf index 52dad33668..52dad33668 100644 --- a/src/grp-network/org.freedesktop.network1.conf +++ b/src/grp-network/systemd-networkd/org.freedesktop.network1.conf diff --git a/src/grp-network/org.freedesktop.network1.service b/src/grp-network/systemd-networkd/org.freedesktop.network1.service index bea885fe53..bea885fe53 100644 --- a/src/grp-network/org.freedesktop.network1.service +++ b/src/grp-network/systemd-networkd/org.freedesktop.network1.service diff --git a/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in b/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in new file mode 100644 index 0000000000..27d4d58962 --- /dev/null +++ b/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in @@ -0,0 +1,37 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Network Service +Documentation=man:systemd-networkd.service(8) +ConditionCapability=CAP_NET_ADMIN +DefaultDependencies=no +# dbus.service can be dropped once on kdbus, and systemd-udevd.service can be +# dropped once tuntap is moved to netlink +After=systemd-udevd.service dbus.service network-pre.target systemd-sysusers.service systemd-sysctl.service +Before=network.target multi-user.target shutdown.target +Conflicts=shutdown.target +Wants=network.target + +# On kdbus systems we pull in the busname explicitly, because it +# carries policy that allows the daemon to acquire its name. +Wants=org.freedesktop.network1.busname +After=org.freedesktop.network1.busname + +[Service] +Type=notify +Restart=on-failure +RestartSec=0 +ExecStart=@rootlibexecdir@/systemd-networkd +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER +ProtectSystem=full +ProtectHome=yes +WatchdogSec=3min + +[Install] +WantedBy=multi-user.target +Also=systemd-networkd.socket diff --git a/src/grp-network/systemd-networkd/systemd-networkd.socket b/src/grp-network/systemd-networkd/systemd-networkd.socket new file mode 100644 index 0000000000..9e4e9dd338 --- /dev/null +++ b/src/grp-network/systemd-networkd/systemd-networkd.socket @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Network Service Netlink Socket +Documentation=man:systemd-networkd.service(8) man:rtnetlink(7) +ConditionCapability=CAP_NET_ADMIN +DefaultDependencies=no +Before=sockets.target + +[Socket] +ReceiveBuffer=8M +ListenNetlink=route 1361 +PassCredentials=yes + +[Install] +WantedBy=sockets.target diff --git a/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles b/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles new file mode 100644 index 0000000000..24197555ee --- /dev/null +++ b/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles @@ -0,0 +1,12 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +d /run/systemd/netif 0755 systemd-network systemd-network - +d /run/systemd/netif/links 0755 systemd-network systemd-network - +d /run/systemd/netif/leases 0755 systemd-network systemd-network - diff --git a/src/grp-resolve/systemd-resolved/systemd-resolved.service.m4.in b/src/grp-resolve/systemd-resolved/systemd-resolved.service.m4.in new file mode 100644 index 0000000000..8e1c1dea79 --- /dev/null +++ b/src/grp-resolve/systemd-resolved/systemd-resolved.service.m4.in @@ -0,0 +1,32 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Network Name Resolution +Documentation=man:systemd-resolved.service(8) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/resolved +Documentation=http://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers +Documentation=http://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients +After=systemd-networkd.service network.target + +# On kdbus systems we pull in the busname explicitly, because it +# carries policy that allows the daemon to acquire its name. +Wants=org.freedesktop.resolve1.busname +After=org.freedesktop.resolve1.busname + +[Service] +Type=notify +Restart=always +RestartSec=0 +ExecStart=@rootlibexecdir@/systemd-resolved +CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER +ProtectSystem=full +ProtectHome=yes +WatchdogSec=3min + +[Install] +WantedBy=multi-user.target diff --git a/src/grp-resolve/systemd-resolved/systemd-resolved.tmpfiles b/src/grp-resolve/systemd-resolved/systemd-resolved.tmpfiles new file mode 100644 index 0000000000..3160f5cf7e --- /dev/null +++ b/src/grp-resolve/systemd-resolved/systemd-resolved.tmpfiles @@ -0,0 +1,10 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf diff --git a/src/grp-system/systemd/Makefile b/src/grp-system/systemd/Makefile index 4637b39de6..dc2eaba720 100644 --- a/src/grp-system/systemd/Makefile +++ b/src/grp-system/systemd/Makefile @@ -35,6 +35,10 @@ systemd_CFLAGS = \ systemd_LDADD = \ libcore.la +dist_tmpfiles_DATA = \ + tmpfiles.d/systemd.conf \ + systemd-tmp.conf + dist_pkgsysconf_DATA += \ src/core/system.conf \ src/core/user.conf @@ -68,8 +72,6 @@ dist_systemunit_DATA_busnames += \ BUSNAMES_TARGET_WANTS += \ org.freedesktop.systemd1.busname -sd.sed_files += $(notdir $(patsubst %.in,%,$(filter %.in,$(EXTRA_DIST)))) - sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" diff --git a/src/grp-system/systemd/systemd-tmp.tmpfiles b/src/grp-system/systemd/systemd-tmp.tmpfiles new file mode 100644 index 0000000000..52f6743d56 --- /dev/null +++ b/src/grp-system/systemd/systemd-tmp.tmpfiles @@ -0,0 +1,16 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +# Clear tmp directories separately, to make them easier to override + +# Exclude namespace mountpoints created with PrivateTmp=yes +x /tmp/systemd-private-%b-* +X /tmp/systemd-private-%b-*/tmp +x /var/tmp/systemd-private-%b-* +X /var/tmp/systemd-private-%b-*/tmp diff --git a/src/grp-system/systemd/systemd.tmpfiles b/src/grp-system/systemd/systemd.tmpfiles new file mode 100644 index 0000000000..00951c92c9 --- /dev/null +++ b/src/grp-system/systemd/systemd.tmpfiles @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +d /run/user 0755 root root - +F! /run/utmp 0664 root utmp - + +d /run/systemd/ask-password 0755 root root - +d /run/systemd/seats 0755 root root - +d /run/systemd/sessions 0755 root root - +d /run/systemd/users 0755 root root - +d /run/systemd/machines 0755 root root - +d /run/systemd/shutdown 0755 root root - + +d /var/lib/systemd 0755 root root - diff --git a/src/grp-timedate/systemd-timedated/systemd-timedated.service.in b/src/grp-timedate/systemd-timedated/systemd-timedated.service.in new file mode 100644 index 0000000000..0c9599db20 --- /dev/null +++ b/src/grp-timedate/systemd-timedated/systemd-timedated.service.in @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Time & Date Service +Documentation=man:systemd-timedated.service(8) man:localtime(5) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/timedated + +[Service] +ExecStart=@rootlibexecdir@/systemd-timedated +BusName=org.freedesktop.timedate1 +CapabilityBoundingSet=CAP_SYS_TIME +WatchdogSec=3min +PrivateTmp=yes +ProtectSystem=yes +ProtectHome=yes diff --git a/src/grp-udev/rules/50-udev-default.rules b/src/grp-udev/50-udev-default.rules index e9eeb8518e..e9eeb8518e 100644 --- a/src/grp-udev/rules/50-udev-default.rules +++ b/src/grp-udev/50-udev-default.rules diff --git a/src/grp-udev/rules/60-block.rules b/src/grp-udev/60-block.rules index c74caca49f..c74caca49f 100644 --- a/src/grp-udev/rules/60-block.rules +++ b/src/grp-udev/60-block.rules diff --git a/src/grp-udev/rules/60-drm.rules b/src/grp-udev/60-drm.rules index 1ed3e445f2..1ed3e445f2 100644 --- a/src/grp-udev/rules/60-drm.rules +++ b/src/grp-udev/60-drm.rules diff --git a/src/grp-udev/rules/60-evdev.rules b/src/grp-udev/60-evdev.rules index ade7e7f646..ade7e7f646 100644 --- a/src/grp-udev/rules/60-evdev.rules +++ b/src/grp-udev/60-evdev.rules diff --git a/src/grp-udev/rules/60-persistent-alsa.rules b/src/grp-udev/60-persistent-alsa.rules index 8154e2dbb5..8154e2dbb5 100644 --- a/src/grp-udev/rules/60-persistent-alsa.rules +++ b/src/grp-udev/60-persistent-alsa.rules diff --git a/src/grp-udev/rules/60-persistent-input.rules b/src/grp-udev/60-persistent-input.rules index 0e33e68384..0e33e68384 100644 --- a/src/grp-udev/rules/60-persistent-input.rules +++ b/src/grp-udev/60-persistent-input.rules diff --git a/src/grp-udev/rules/60-persistent-storage-tape.rules b/src/grp-udev/60-persistent-storage-tape.rules index f2eabd92a8..f2eabd92a8 100644 --- a/src/grp-udev/rules/60-persistent-storage-tape.rules +++ b/src/grp-udev/60-persistent-storage-tape.rules diff --git a/src/grp-udev/rules/60-persistent-storage.rules b/src/grp-udev/60-persistent-storage.rules index 408733915c..408733915c 100644 --- a/src/grp-udev/rules/60-persistent-storage.rules +++ b/src/grp-udev/60-persistent-storage.rules diff --git a/src/grp-udev/rules/60-serial.rules b/src/grp-udev/60-serial.rules index f303e27fd5..f303e27fd5 100644 --- a/src/grp-udev/rules/60-serial.rules +++ b/src/grp-udev/60-serial.rules diff --git a/src/grp-udev/rules/64-btrfs.rules b/src/grp-udev/64-btrfs.rules index fe0100131e..fe0100131e 100644 --- a/src/grp-udev/rules/64-btrfs.rules +++ b/src/grp-udev/64-btrfs.rules diff --git a/src/grp-udev/rules/70-mouse.rules b/src/grp-udev/70-mouse.rules index 3ea743aff9..3ea743aff9 100644 --- a/src/grp-udev/rules/70-mouse.rules +++ b/src/grp-udev/70-mouse.rules diff --git a/src/grp-udev/rules/75-net-description.rules b/src/grp-udev/75-net-description.rules index 7e62f8b26b..7e62f8b26b 100644 --- a/src/grp-udev/rules/75-net-description.rules +++ b/src/grp-udev/75-net-description.rules diff --git a/src/grp-udev/rules/78-sound-card.rules b/src/grp-udev/78-sound-card.rules index 04740e8b97..04740e8b97 100644 --- a/src/grp-udev/rules/78-sound-card.rules +++ b/src/grp-udev/78-sound-card.rules diff --git a/src/grp-udev/rules/80-drivers.rules b/src/grp-udev/80-drivers.rules index 8551f47a4b..8551f47a4b 100644 --- a/src/grp-udev/rules/80-drivers.rules +++ b/src/grp-udev/80-drivers.rules diff --git a/src/grp-udev/rules/80-net-setup-link.rules b/src/grp-udev/80-net-setup-link.rules index 6e411a91f0..6e411a91f0 100644 --- a/src/grp-udev/rules/80-net-setup-link.rules +++ b/src/grp-udev/80-net-setup-link.rules diff --git a/src/grp-udev/rules/99-systemd.rules.in b/src/grp-udev/99-systemd.rules.in index fb4517606d..fb4517606d 100644 --- a/src/grp-udev/rules/99-systemd.rules.in +++ b/src/grp-udev/99-systemd.rules.in diff --git a/src/grp-udev/Makefile b/src/grp-udev/Makefile index 67e20c65a2..965c9b2f22 100644 --- a/src/grp-udev/Makefile +++ b/src/grp-udev/Makefile @@ -42,6 +42,11 @@ dist_udevrules_DATA += \ rules/78-sound-card.rules \ rules/80-net-setup-link.rules +ifneq ($(HAVE_KMOD),) +dist_udevrules_DATA += \ + rules/80-drivers.rules +endif # HAVE_KMOD + nodist_udevrules_DATA += \ rules/99-systemd.rules @@ -69,7 +74,6 @@ SYSINIT_TARGET_WANTS += \ systemd-udevd.service \ systemd-udev-trigger.service -sd.sed_files += $(notdir $(patsubst %.in,%,$(filter %.in,$(EXTRA_DIST)))) nested.subdirs += systemd-udevd udevadm nested.subdirs += ata_id cdrom_id collect mtd_probe scsi_id v4l_id diff --git a/src/grp-udev/rules/60-cdrom_id.rules b/src/grp-udev/cdrom_id/60-cdrom_id.rules index 5c3b52ebb9..5c3b52ebb9 100644 --- a/src/grp-udev/rules/60-cdrom_id.rules +++ b/src/grp-udev/cdrom_id/60-cdrom_id.rules diff --git a/src/grp-udev/libudev-core/Makefile b/src/grp-udev/libudev-core/Makefile index da72594005..36aaa55431 100644 --- a/src/grp-udev/libudev-core/Makefile +++ b/src/grp-udev/libudev-core/Makefile @@ -80,9 +80,6 @@ libudev_core_la_LIBADD = \ ifneq ($(HAVE_KMOD),) libudev_core_la_SOURCES += \ src/udev/udev-builtin-kmod.c - -dist_udevrules_DATA += \ - rules/80-drivers.rules endif # HAVE_KMOD ifneq ($(HAVE_BLKID),) diff --git a/src/grp-udev/libudev-core/logind-acl.c b/src/grp-udev/libudev-core/logind-acl.c index 9dd626440f..dd15b7973f 120000 --- a/src/grp-udev/libudev-core/logind-acl.c +++ b/src/grp-udev/libudev-core/logind-acl.c @@ -1 +1 @@ -../../grp-login/liblogind-core/logind-acl.c
\ No newline at end of file +../../grp-login/systemd-logind/logind-acl.c
\ No newline at end of file diff --git a/src/grp-udev/libudev-core/logind-acl.h b/src/grp-udev/libudev-core/logind-acl.h index 60f96cbe0a..6065dde301 120000 --- a/src/grp-udev/libudev-core/logind-acl.h +++ b/src/grp-udev/libudev-core/logind-acl.h @@ -1 +1 @@ -../../grp-login/liblogind-core/logind-acl.h
\ No newline at end of file +../../grp-login/systemd-logind/logind-acl.h
\ No newline at end of file diff --git a/src/grp-udev/rules/75-probe_mtd.rules b/src/grp-udev/mtd_probe/75-probe_mtd.rules index 8848aeeaed..8848aeeaed 100644 --- a/src/grp-udev/rules/75-probe_mtd.rules +++ b/src/grp-udev/mtd_probe/75-probe_mtd.rules diff --git a/src/grp-udev/systemd-udevd/systemd-udevd.service.in b/src/grp-udev/systemd-udevd/systemd-udevd.service.in new file mode 100644 index 0000000000..79f28c87c6 --- /dev/null +++ b/src/grp-udev/systemd-udevd/systemd-udevd.service.in @@ -0,0 +1,26 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=udev Kernel Device Manager +Documentation=man:systemd-udevd.service(8) man:udev(7) +DefaultDependencies=no +Wants=systemd-udevd-control.socket systemd-udevd-kernel.socket +After=systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-sysusers.service +Before=sysinit.target +ConditionPathIsReadWrite=/sys + +[Service] +Type=notify +OOMScoreAdjust=-1000 +Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket +Restart=always +RestartSec=0 +ExecStart=@rootlibexecdir@/systemd-udevd +MountFlags=slave +KillMode=mixed +WatchdogSec=3min diff --git a/src/grp-udev/rules/60-persistent-v4l.rules b/src/grp-udev/v4l_id/60-persistent-v4l.rules index 93c5ee8c27..93c5ee8c27 100644 --- a/src/grp-udev/rules/60-persistent-v4l.rules +++ b/src/grp-udev/v4l_id/60-persistent-v4l.rules diff --git a/src/libbasic/include/basic/basic.target b/src/libbasic/include/basic/basic.target new file mode 100644 index 0000000000..3e3527f894 --- /dev/null +++ b/src/libbasic/include/basic/basic.target @@ -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 Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Basic System +Documentation=man:systemd.special(7) +Requires=sysinit.target +Wants=sockets.target timers.target paths.target slices.target +After=sysinit.target sockets.target paths.target slices.target tmp.mount + +# We support /var, /tmp, /var/tmp, being on NFS, but we don't pull in +# remote-fs.target by default, hence pull them in explicitly here. Note that we +# require /var and /var/tmp, but only add a Wants= type dependency on /tmp, as +# we support that unit being masked, and this should not be considered an error. +RequiresMountsFor=/var /var/tmp +Wants=tmp.mount diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile index 5c5d03a51d..5c26912ef1 100644 --- a/src/libsystemd/Makefile +++ b/src/libsystemd/Makefile @@ -119,6 +119,5 @@ $(DESTDIR)$(pkgincludedir)/%.h: $(srcdir)/include/systemd/%.h files.sys.all += $(addprefix $(pkgincludedir)/,$(notdir $(_pkginclude_HEADERS))) $(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym nested.subdirs += src -sd.sed_files += libsystemd.pc include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libudev/Makefile b/src/libudev/Makefile index b4c91d1738..0ca3d15841 100644 --- a/src/libudev/Makefile +++ b/src/libudev/Makefile @@ -57,8 +57,6 @@ test_libudev_sym_CFLAGS = \ test_libudev_sym_LDADD = \ libudev.la -sd.sed_files += libudev.pc - nested.subdirs += src include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-cryptsetup/cryptsetup-pre.target b/src/systemd-cryptsetup/cryptsetup-pre.target new file mode 100644 index 0000000000..65353419fc --- /dev/null +++ b/src/systemd-cryptsetup/cryptsetup-pre.target @@ -0,0 +1,11 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Encrypted Volumes (Pre) +Documentation=man:systemd.special(7) +RefuseManualStart=yes diff --git a/src/systemd-cryptsetup/cryptsetup.target b/src/systemd-cryptsetup/cryptsetup.target new file mode 100644 index 0000000000..25d3e33f6a --- /dev/null +++ b/src/systemd-cryptsetup/cryptsetup.target @@ -0,0 +1,10 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Encrypted Volumes +Documentation=man:systemd.special(7) diff --git a/src/systemd-dbus1-generator/Makefile b/src/systemd-dbus1-generator/Makefile index e2c8ca1efc..8a4193621a 100644 --- a/src/systemd-dbus1-generator/Makefile +++ b/src/systemd-dbus1-generator/Makefile @@ -40,7 +40,8 @@ dbus1-generator-install-hook: dbus1-generator-uninstall-hook: rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator -dist_xinitrc_SCRIPTS = \ +# TODO +_dist_xinitrc_SCRIPTS = \ xorg/50-systemd-user.sh INSTALL_EXEC_HOOKS += dbus1-generator-install-hook diff --git a/src/systemd-initctl/systemd-initctl.service.in b/src/systemd-initctl/systemd-initctl.service.in new file mode 100644 index 0000000000..27e663c8dc --- /dev/null +++ b/src/systemd-initctl/systemd-initctl.service.in @@ -0,0 +1,15 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=/dev/initctl Compatibility Daemon +Documentation=man:systemd-initctl.service(8) +DefaultDependencies=no + +[Service] +ExecStart=@rootlibexecdir@/systemd-initctl +NotifyAccess=all diff --git a/src/systemd-initctl/systemd-initctl.socket b/src/systemd-initctl/systemd-initctl.socket new file mode 100644 index 0000000000..f628c2e867 --- /dev/null +++ b/src/systemd-initctl/systemd-initctl.socket @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=/dev/initctl Compatibility Named Pipe +Documentation=man:systemd-initctl.service(8) +DefaultDependencies=no +Before=sockets.target + +[Socket] +ListenFIFO=/run/systemd/initctl/fifo +Symlinks=/dev/initctl +SocketMode=0600 diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile index 15db3ca3b2..2fe9bcc143 100644 --- a/src/systemd-nspawn/Makefile +++ b/src/systemd-nspawn/Makefile @@ -82,6 +82,9 @@ test_patch_uid_LDADD = \ manual_tests += \ test-patch-uid +dist_tmpfiles_DATA = \ + tmpfiles.d/systemd-nspawn.conf + sd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-nspawn/systemd-nspawn.tmpfiles b/src/systemd-nspawn/systemd-nspawn.tmpfiles new file mode 100644 index 0000000000..9fa3878d6b --- /dev/null +++ b/src/systemd-nspawn/systemd-nspawn.tmpfiles @@ -0,0 +1,23 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +Q /var/lib/machines 0700 - - - + +# Remove old temporary snapshots, but only at boot. Ideally we'd have +# "self-destroying" btrfs snapshots that go away if the last last +# reference to it does. To mimic a scheme like this at least remove +# the old snapshots on fresh boots, where we know they cannot be +# referenced anymore. Note that we actually remove all temporary files +# in /var/lib/machines/ at boot, which should be safe since the +# directory has defined semantics. In the root directory (where +# systemd-nspawn --ephemeral places snapshots) we are more strict, to +# avoid removing unrelated temporary files. + +R! /var/lib/machines/.#* +R! /.#machine.* diff --git a/src/systemd-nspawn/systemd-nspawn@.service.in b/src/systemd-nspawn/systemd-nspawn@.service.in new file mode 100644 index 0000000000..ea28941507 --- /dev/null +++ b/src/systemd-nspawn/systemd-nspawn@.service.in @@ -0,0 +1,46 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Container %i +Documentation=man:systemd-nspawn(1) +PartOf=machines.target +Before=machines.target +After=network.target + +[Service] +ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth -U --settings=override --machine=%i +KillMode=mixed +Type=notify +RestartForceExitStatus=133 +SuccessExitStatus=133 +Slice=machine.slice +Delegate=yes +TasksMax=8192 + +# Enforce a strict device policy, similar to the one nspawn configures +# when it allocates its own scope unit. Make sure to keep these +# policies in sync if you change them! +DevicePolicy=strict +DeviceAllow=/dev/null rwm +DeviceAllow=/dev/zero rwm +DeviceAllow=/dev/full rwm +DeviceAllow=/dev/random rwm +DeviceAllow=/dev/urandom rwm +DeviceAllow=/dev/tty rwm +DeviceAllow=/dev/net/tun rwm +DeviceAllow=/dev/pts/ptmx rw +DeviceAllow=char-pts rw + +# nspawn itself needs access to /dev/loop-control and /dev/loop, to +# implement the --image= option. Add these here, too. +DeviceAllow=/dev/loop-control rw +DeviceAllow=block-loop rw +DeviceAllow=block-blkext rw + +[Install] +WantedBy=machines.target diff --git a/src/systemd-remount-fs/systemd-remount-fs.service.in b/src/systemd-remount-fs/systemd-remount-fs.service.in new file mode 100644 index 0000000000..8d9daacaa5 --- /dev/null +++ b/src/systemd-remount-fs/systemd-remount-fs.service.in @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Remount Root and Kernel File Systems +Documentation=man:systemd-remount-fs.service(8) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-fsck-root.service +Before=local-fs-pre.target local-fs.target shutdown.target +Wants=local-fs-pre.target +ConditionPathExists=/etc/fstab + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@rootlibexecdir@/systemd-remount-fs diff --git a/src/systemd-timesyncd/systemd-timesyncd.service.in b/src/systemd-timesyncd/systemd-timesyncd.service.in new file mode 100644 index 0000000000..a856dad709 --- /dev/null +++ b/src/systemd-timesyncd/systemd-timesyncd.service.in @@ -0,0 +1,33 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Network Time Synchronization +Documentation=man:systemd-timesyncd.service(8) +ConditionCapability=CAP_SYS_TIME +ConditionVirtualization=!container +DefaultDependencies=no +RequiresMountsFor=/var/lib/systemd/clock +After=systemd-remount-fs.service systemd-tmpfiles-setup.service systemd-sysusers.service +Before=time-sync.target sysinit.target shutdown.target +Conflicts=shutdown.target +Wants=time-sync.target + +[Service] +Type=notify +Restart=always +RestartSec=0 +ExecStart=@rootlibexecdir@/systemd-timesyncd +CapabilityBoundingSet=CAP_SYS_TIME CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER +PrivateTmp=yes +PrivateDevices=yes +ProtectSystem=full +ProtectHome=yes +WatchdogSec=3min + +[Install] +WantedBy=sysinit.target |