]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - systemd/systemd.nm
systemd: Update to 195.
[people/stevee/ipfire-3.x.git] / systemd / systemd.nm
CommitLineData
c8ef6def 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
c8ef6def
SS
4###############################################################################
5
802ea3af 6name = systemd
c04bf094 7version = 195
4990bf7f 8release = 1
c8ef6def 9
802ea3af
MT
10maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
11groups = System/Base
12url = http://www.freedesktop.org/wiki/Software/systemd
13license = GPLv2+
14summary = A System and Service Manager.
c8ef6def 15
802ea3af
MT
16description
17 systemd is a system and service manager for Linux, compatible with
c8ef6def 18 SysV and LSB init scripts.
802ea3af
MT
19end
20
5e38e9bb 21source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/
802ea3af
MT
22
23build
6793fec1
MT
24 unitdir = %{prefix}/lib/systemd/system
25
802ea3af
MT
26 requires
27 audit-devel
28 automake
29 autoconf
2d01364a 30 cryptsetup-luks-devel >= 1.4.2
802ea3af 31 dbus-devel
fe6e3719
SS
32 docbook-utils
33 docbook-xsl
bfabb323 34 gettext-devel
2d01364a
SS
35 glib2-devel
36 gobject-introspection-devel >= 1.31
37 gperf
38 hwdata
802ea3af 39 intltool
6793fec1 40 kmod-devel >= 5
2a824e90 41 libacl-devel
2d01364a 42 libblkid-devel
802ea3af 43 libcap-devel
4990bf7f 44 libgcrypt-devel
802ea3af
MT
45 libselinux-devel
46 libtool
4990bf7f 47 libuuid-devel
802ea3af 48 pam-devel
2d01364a
SS
49 pciutils-devel
50 usbutils
53a325cb 51 vala
6793fec1 52 xz-devel
802ea3af
MT
53 end
54
55 configure_options += \
2d01364a
SS
56 --with-distro=ipfire \
57 --disable-static
802ea3af
MT
58
59 prepare_cmds
60 ./autogen.sh ac
61 end
62
802ea3af 63 install_cmds
755fe986
SS
64 # Create folder in log to store the journal.
65 mkdir -pv %{BUILDROOT}/var/log/journal
66
802ea3af 67 # Create sysv compatible symlinks.
6793fec1
MT
68 mkdir -pv %{BUILDROOT}%{sbindir}
69 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
70 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
71 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
72 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
73 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
74 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
802ea3af
MT
75
76 # Create empty machine-id file.
77 touch %{BUILDROOT}/etc/machine-id
78
79 # Copy locale and console settings
6793fec1
MT
80 mkdir -pv %{BUILDROOT}%{sysconfdir}
81 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
802ea3af
MT
82
83 # Recreate all targets
0976fbe4
SS
84 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
85 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
86 multi-user.target.wants syslog.target.wants; do
87 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
6793fec1 88 done
802ea3af
MT
89
90 # Remove runlevel targets and graphical.target
6793fec1
MT
91 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
92 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
802ea3af 93
2d01364a
SS
94 # Remove service files for utmp update.
95 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
96 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
97
802ea3af 98 # Set default target to multi-user
6793fec1 99 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
802ea3af
MT
100
101 # Replace absolute symlinks by relative ones.
6793fec1
MT
102 cd %{BUILDROOT}%{unitdir}/../user
103 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
104 ln -svf ../system/${i}.target ${i}.target || exit 1
105 done
106
802ea3af
MT
107 # Remove tmpfile for X11
108 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
109
110 # Remove unneeded symlink for xdg
111 rm -rfv %{BUILDROOT}/etc/xdg/systemd
755fe986
SS
112
113 # Use journald. Enable the import of kernel messages.
114 # Stop forwarding to a syslog daemon.
115 sed \
116 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
117 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
118 -i %{BUILDROOT}/etc/systemd/journald.conf
802ea3af
MT
119 end
120end
121
122packages
123 package %{name}
2d01364a
SS
124 groups += Base
125
6793fec1
MT
126 prerequires += authconfig
127
514357ad
SS
128 requires
129 dbus
2d01364a 130 hwdata
514357ad 131 python-cairo
1d40b321 132 python-dbus
214d8f27 133 %{name}-units=%{thisver}
514357ad
SS
134 util-linux>=2.19
135 end
1d40b321 136
216fde50
SS
137 provides
138 /bin/systemd
139 /sbin/halt
140 /sbin/init
141 /sbin/poweroff
142 /sbin/reboot
143 /sbin/shutdown
2d01364a 144
755fe986 145 syslog
2d01364a 146 udev = %{thisver}
216fde50
SS
147 end
148
6793fec1 149 conflicts
2d01364a 150 dracut < 019
6793fec1 151 filesystem < 002
755fe986 152 rsyslog < 5.8.6-4
6793fec1
MT
153 upstart
154 end
ef438375 155
2d01364a
SS
156 obsoletes
157 udev < 183
158 end
159
160 configfiles
161 /etc/locale.conf
162 /etc/machine-id
163 /etc/systemd/journald.conf
164 /etc/systemd/logind.conf
165 /etc/systemd/system.conf
166 /etc/systemd/user.conf
167 /etc/udev/udev.conf
168 /etc/vconsole.conf
169 end
170
171 script prein
172 # Create groups for udev.
173 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
174 getent group tape >/dev/null || groupadd -g 33 tape || :
175 getent group dialout >/dev/null || groupadd -g 18 dialout || :
176 getent group floppy >/dev/null || groupadd -g 19 floppy || :
177 end
178
1d40b321
SS
179 script postin
180 # Generate Machine ID.
6793fec1 181 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
1d40b321
SS
182
183 # Reexec systemd daemon.
6793fec1 184 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
1d40b321
SS
185
186 # Make sure pam_systemd is enabled
6793fec1
MT
187 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
188 authconfig --update --nostart >/dev/null 2>&1 || :
1d40b321
SS
189
190 # Try harder
6793fec1 191 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
1d40b321 192 fi
5e462903
MT
193
194 /usr/bin/systemctl enable \
195 getty@.service \
50affca1 196 remote-fs.target \
5e462903
MT
197 systemd-readahead-replay.service \
198 systemd-readahead-collect.service \
199 >/dev/null 2>&1 || :
1d40b321
SS
200 end
201
2d01364a
SS
202 script preup
203 # Be sure to stop the old udev before updating.
204 /usr/bin/systemctl stop udev.service udev-trigger.service \
205 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
206 end
207
1d40b321
SS
208 script postup
209 # Restart login service after update
5e462903 210 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
6793fec1 211 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
755fe986
SS
212
213 # Use the new journald configuration file and restart the service.
214 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
215 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
216 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
217 fi
1d40b321 218 end
2d01364a
SS
219
220 # Be sure to start the new udev after everything is done.
221 script posttransup
222 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
223 end
802ea3af 224 end
1f9bc2f0 225
802ea3af
MT
226 # Package information for systemd-units
227 package %{name}-units
228 summary = Configuration files, directories and installation tool for systemd.
229 description
230 This package contains all needed configuration files, directories
231 and installation / configuration tool for systemd.
232 end
1f9bc2f0 233
5e38e9bb
SS
234 prerequires
235 /bin/sh
236 coreutils
237 end
238
6793fec1 239 provides
802ea3af 240 /bin/systemctl
802ea3af 241 end
1d40b321 242
6793fec1
MT
243 conflicts
244 filesystem < 002
1d40b321
SS
245 end
246
6793fec1
MT
247 files
248 %{sysconfdir}/etc/systemd/system
249 %{sysconfdir}/tmpfiles.d
250 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
251 %{unitdir}
252 %{bindir}/systemctl
253 %{bindir}/systemd-tmpfiles
254 %{mandir}/man1/systemctl.*
1d40b321
SS
255 end
256
257 script postup
258 # Reload service files
6793fec1 259 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
1d40b321 260 end
802ea3af 261 end
1f9bc2f0 262
802ea3af
MT
263 package %{name}-devel
264 template DEVEL
6793fec1
MT
265
266 files += %{prefix}/lib/pakfire/macros/
802ea3af 267 end
1f9bc2f0 268
2d01364a
SS
269 package libudev
270 summary = Libraries for adding libudev support to applications.
271 description
272 This package contains the libraries that make it easier to use libudev
273 functionality from applications.
274 end
275 license = LGPLv2+
276
277 conflicts
278 filesystem < 002
279 end
280
281 files
282 %{libdir}/libgudev*.so.*
283 %{libidr}/girepository*/
284 end
285 end
286
287 package libudev-devel
288 summary = Header files for adding libudev support to applications.
289 description
290 This package contains the header and pkg-config files for developing
291 applications using libudev functionality.
292 end
293 license = LGPLv2+
294
295 conflicts
296 filesystem < 002
297 end
298
299 files
a8aa3ead 300 %{libdir}/lib*udev*.so
73eb4724 301 %{libdir}/pkgconfig/lib*udev.pc
2d01364a 302 %{libdir}/pkgconfig/gudev*
a8aa3ead 303 %{includedir}/lib*udev.h
2d01364a
SS
304 %{includedir}/gudev*
305 %{datadir}/gir-*
306 %{datadir}/gtk-doc/html/gudev
307 end
308 end
309
1f9bc2f0
MT
310 package %{name}-debuginfo
311 template DEBUGINFO
312 end
802ea3af 313end