]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - systemd/systemd.nm
ccache: Fix testsuite error with GCC 4.8.
[people/ms/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
1b81106b 7version = 204
df49f089 8release = 4
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 26 requires
b329a155 27 attr-devel
802ea3af
MT
28 audit-devel
29 automake
30 autoconf
2d01364a 31 cryptsetup-luks-devel >= 1.4.2
802ea3af 32 dbus-devel
fe6e3719
SS
33 docbook-utils
34 docbook-xsl
bfabb323 35 gettext-devel
2d01364a
SS
36 glib2-devel
37 gobject-introspection-devel >= 1.31
38 gperf
39 hwdata
802ea3af 40 intltool
6793fec1 41 kmod-devel >= 5
2a824e90 42 libacl-devel
2d01364a 43 libblkid-devel
802ea3af 44 libcap-devel
4990bf7f 45 libgcrypt-devel
802ea3af
MT
46 libselinux-devel
47 libtool
4990bf7f 48 libuuid-devel
802ea3af 49 pam-devel
2d01364a
SS
50 pciutils-devel
51 usbutils
53a325cb 52 vala
6793fec1 53 xz-devel
802ea3af
MT
54 end
55
56 configure_options += \
7f84cbd5
SS
57 --with-sysvinit-path= \
58 --with-sysvrcnd-path= \
59 --enable-introspection=yes \
2d01364a 60 --disable-static
802ea3af
MT
61
62 prepare_cmds
63 ./autogen.sh ac
64 end
65
802ea3af 66 install_cmds
755fe986
SS
67 # Create folder in log to store the journal.
68 mkdir -pv %{BUILDROOT}/var/log/journal
69
802ea3af 70 # Create sysv compatible symlinks.
6793fec1
MT
71 mkdir -pv %{BUILDROOT}%{sbindir}
72 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
73 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
74 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
75 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
76 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
77 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
802ea3af
MT
78
79 # Create empty machine-id file.
80 touch %{BUILDROOT}/etc/machine-id
81
82 # Copy locale and console settings
6793fec1
MT
83 mkdir -pv %{BUILDROOT}%{sysconfdir}
84 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
802ea3af
MT
85
86 # Recreate all targets
0976fbe4
SS
87 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
88 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
89 multi-user.target.wants syslog.target.wants; do
90 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
6793fec1 91 done
802ea3af
MT
92
93 # Remove runlevel targets and graphical.target
6793fec1
MT
94 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
95 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
802ea3af 96
2d01364a
SS
97 # Remove service files for utmp update.
98 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
99 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
100
802ea3af 101 # Set default target to multi-user
6793fec1 102 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
802ea3af
MT
103
104 # Replace absolute symlinks by relative ones.
6793fec1 105 cd %{BUILDROOT}%{unitdir}/../user
7f84cbd5 106 for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do
6793fec1
MT
107 ln -svf ../system/${i}.target ${i}.target || exit 1
108 done
109
802ea3af
MT
110 # Remove tmpfile for X11
111 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
112
7f84cbd5
SS
113 # Remove unneeded stuff for xdg
114 rm -rfv %{BUILDROOT}/etc/xdg
115
116 # Remove unneeded stuff for rpm.
117 rm -rvf %{BUILDROOT}/etc/rpm
755fe986
SS
118
119 # Use journald. Enable the import of kernel messages.
120 # Stop forwarding to a syslog daemon.
121 sed \
122 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
123 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
124 -i %{BUILDROOT}/etc/systemd/journald.conf
f2ada565
SS
125
126 # Install legacy tmpfile to autocreate /run/lock on startup.
127 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
802ea3af
MT
128 end
129end
130
131packages
132 package %{name}
2d01364a
SS
133 groups += Base
134
6793fec1
MT
135 prerequires += authconfig
136
514357ad
SS
137 requires
138 dbus
2d01364a 139 hwdata
514357ad 140 python-cairo
1d40b321 141 python-dbus
7f84cbd5 142 python-gobject3
519776fd 143 %{name}-libs=%{thisver}
214d8f27 144 %{name}-units=%{thisver}
514357ad
SS
145 util-linux>=2.19
146 end
1d40b321 147
216fde50
SS
148 provides
149 /bin/systemd
150 /sbin/halt
151 /sbin/init
152 /sbin/poweroff
153 /sbin/reboot
154 /sbin/shutdown
2d01364a 155
755fe986 156 syslog
2d01364a 157 udev = %{thisver}
216fde50
SS
158 end
159
6793fec1 160 conflicts
7f84cbd5 161 bash-completion < 2.1
2d01364a 162 dracut < 019
6793fec1 163 filesystem < 002
755fe986 164 rsyslog < 5.8.6-4
6793fec1
MT
165 upstart
166 end
ef438375 167
2d01364a
SS
168 obsoletes
169 udev < 183
170 end
171
172 configfiles
173 /etc/locale.conf
174 /etc/machine-id
175 /etc/systemd/journald.conf
176 /etc/systemd/logind.conf
177 /etc/systemd/system.conf
178 /etc/systemd/user.conf
179 /etc/udev/udev.conf
180 /etc/vconsole.conf
181 end
182
183 script prein
184 # Create groups for udev.
185 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
186 getent group tape >/dev/null || groupadd -g 33 tape || :
187 getent group dialout >/dev/null || groupadd -g 18 dialout || :
188 getent group floppy >/dev/null || groupadd -g 19 floppy || :
189 end
190
1d40b321
SS
191 script postin
192 # Generate Machine ID.
6793fec1 193 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
1d40b321
SS
194
195 # Reexec systemd daemon.
6793fec1 196 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
1d40b321
SS
197
198 # Make sure pam_systemd is enabled
6793fec1
MT
199 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
200 authconfig --update --nostart >/dev/null 2>&1 || :
1d40b321
SS
201
202 # Try harder
6793fec1 203 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
1d40b321 204 fi
5e462903
MT
205
206 /usr/bin/systemctl enable \
207 getty@.service \
50affca1 208 remote-fs.target \
5e462903
MT
209 systemd-readahead-replay.service \
210 systemd-readahead-collect.service \
211 >/dev/null 2>&1 || :
1d40b321
SS
212 end
213
2d01364a
SS
214 script preup
215 # Be sure to stop the old udev before updating.
216 /usr/bin/systemctl stop udev.service udev-trigger.service \
217 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
218 end
219
1d40b321
SS
220 script postup
221 # Restart login service after update
5e462903 222 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
6793fec1 223 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
755fe986
SS
224
225 # Use the new journald configuration file and restart the service.
226 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
227 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
228 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
229 fi
1d40b321 230 end
2d01364a
SS
231
232 # Be sure to start the new udev after everything is done.
233 script posttransup
234 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
235 end
802ea3af 236 end
1f9bc2f0 237
802ea3af
MT
238 # Package information for systemd-units
239 package %{name}-units
240 summary = Configuration files, directories and installation tool for systemd.
241 description
242 This package contains all needed configuration files, directories
243 and installation / configuration tool for systemd.
244 end
1f9bc2f0 245
5e38e9bb
SS
246 prerequires
247 /bin/sh
248 coreutils
249 end
250
6793fec1 251 provides
802ea3af 252 /bin/systemctl
802ea3af 253 end
1d40b321 254
6793fec1
MT
255 conflicts
256 filesystem < 002
1d40b321
SS
257 end
258
6793fec1
MT
259 files
260 %{sysconfdir}/etc/systemd/system
261 %{sysconfdir}/tmpfiles.d
262 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
263 %{unitdir}
264 %{bindir}/systemctl
265 %{bindir}/systemd-tmpfiles
266 %{mandir}/man1/systemctl.*
1d40b321
SS
267 end
268
269 script postup
270 # Reload service files
6793fec1 271 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
1d40b321 272 end
802ea3af 273 end
1f9bc2f0 274
1191e383
SS
275 package %{name}-libs
276 template LIBS
519776fd
SS
277
278 groups += Base
279
280 prerequires
281 /etc/nsswitch.conf
282 end
283
284 provides
285 nss-myhostname = %{thisver}
286 end
287
288 obsoletes
289 nss-myhostname <= 0.3-3
290 end
291
292 conflicts
519776fd
SS
293 # Ensure that the version of systemd matches systemd-libs.
294 systemd > %{thisver}
295 systemd < %{thisver}
296 end
297
298 # Add myhostname to the hosts line of /etc/nsswitch.conf
299 script postin
300 if [ -f "/etc/nsswitch.conf" ]; then
301 sed -i.bak -e '
302 /^hosts:/ !b
303 /\<myhostname\>/ b
304 s/[[:blank:]]*$/ myhostname/
305 ' /etc/nsswitch.conf
306 fi
307 end
308
309 # Remove myhostname from the hosts line of /etc/nsswitch.conf
310 script postun
311 if [ -f "/etc/nsswitch.conf" ]; then
312 sed -i.bak -e '
313 /^hosts:/ !b
314 s/[[:blank:]]\+myhostname\>//
315 ' /etc/nsswitch.conf
316 fi
317 end
1191e383
SS
318 end
319
802ea3af
MT
320 package %{name}-devel
321 template DEVEL
6793fec1
MT
322
323 files += %{prefix}/lib/pakfire/macros/
802ea3af 324 end
1f9bc2f0 325
2d01364a
SS
326 package libudev
327 summary = Libraries for adding libudev support to applications.
328 description
329 This package contains the libraries that make it easier to use libudev
330 functionality from applications.
331 end
332 license = LGPLv2+
333
334 conflicts
335 filesystem < 002
336 end
337
338 files
1191e383 339 %{libdir}/lib*udev*.so.*
2d01364a
SS
340 %{libidr}/girepository*/
341 end
342 end
343
344 package libudev-devel
345 summary = Header files for adding libudev support to applications.
346 description
347 This package contains the header and pkg-config files for developing
348 applications using libudev functionality.
349 end
350 license = LGPLv2+
351
352 conflicts
353 filesystem < 002
354 end
355
356 files
a8aa3ead 357 %{libdir}/lib*udev*.so
73eb4724 358 %{libdir}/pkgconfig/lib*udev.pc
2d01364a 359 %{libdir}/pkgconfig/gudev*
a8aa3ead 360 %{includedir}/lib*udev.h
2d01364a
SS
361 %{includedir}/gudev*
362 %{datadir}/gir-*
363 %{datadir}/gtk-doc/html/gudev
364 end
365 end
366
1f9bc2f0
MT
367 package %{name}-debuginfo
368 template DEBUGINFO
369 end
802ea3af 370end