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