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