]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - systemd/systemd.nm
json-glib: New package.
[people/ms/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 = 3
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
121 # Install legacy tmpfile to autocreate /run/lock on startup.
122 install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/
123 end
124 end
125
126 packages
127 package %{name}
128 groups += Base
129
130 prerequires += authconfig
131
132 requires
133 dbus
134 hwdata
135 python-cairo
136 python-dbus
137 %{name}-units=%{thisver}
138 util-linux>=2.19
139 end
140
141 provides
142 /bin/systemd
143 /sbin/halt
144 /sbin/init
145 /sbin/poweroff
146 /sbin/reboot
147 /sbin/shutdown
148
149 syslog
150 udev = %{thisver}
151 end
152
153 conflicts
154 dracut < 019
155 filesystem < 002
156 rsyslog < 5.8.6-4
157 upstart
158 end
159
160 obsoletes
161 udev < 183
162 end
163
164 configfiles
165 /etc/locale.conf
166 /etc/machine-id
167 /etc/systemd/journald.conf
168 /etc/systemd/logind.conf
169 /etc/systemd/system.conf
170 /etc/systemd/user.conf
171 /etc/udev/udev.conf
172 /etc/vconsole.conf
173 end
174
175 script prein
176 # Create groups for udev.
177 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
178 getent group tape >/dev/null || groupadd -g 33 tape || :
179 getent group dialout >/dev/null || groupadd -g 18 dialout || :
180 getent group floppy >/dev/null || groupadd -g 19 floppy || :
181 end
182
183 script postin
184 # Generate Machine ID.
185 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
186
187 # Reexec systemd daemon.
188 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
189
190 # Make sure pam_systemd is enabled
191 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
192 authconfig --update --nostart >/dev/null 2>&1 || :
193
194 # Try harder
195 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
196 fi
197
198 /usr/bin/systemctl enable \
199 getty@.service \
200 remote-fs.target \
201 systemd-readahead-replay.service \
202 systemd-readahead-collect.service \
203 >/dev/null 2>&1 || :
204 end
205
206 script preup
207 # Be sure to stop the old udev before updating.
208 /usr/bin/systemctl stop udev.service udev-trigger.service \
209 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
210 end
211
212 script postup
213 # Restart login service after update
214 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
215 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
216
217 # Use the new journald configuration file and restart the service.
218 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
219 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
220 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
221 fi
222 end
223
224 # Be sure to start the new udev after everything is done.
225 script posttransup
226 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
227 end
228 end
229
230 # Package information for systemd-units
231 package %{name}-units
232 summary = Configuration files, directories and installation tool for systemd.
233 description
234 This package contains all needed configuration files, directories
235 and installation / configuration tool for systemd.
236 end
237
238 prerequires
239 /bin/sh
240 coreutils
241 end
242
243 provides
244 /bin/systemctl
245 end
246
247 conflicts
248 filesystem < 002
249 end
250
251 files
252 %{sysconfdir}/etc/systemd/system
253 %{sysconfdir}/tmpfiles.d
254 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
255 %{unitdir}
256 %{bindir}/systemctl
257 %{bindir}/systemd-tmpfiles
258 %{mandir}/man1/systemctl.*
259 end
260
261 script postup
262 # Reload service files
263 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
264 end
265 end
266
267 package %{name}-libs
268 template LIBS
269 end
270
271 package %{name}-devel
272 template DEVEL
273
274 files += %{prefix}/lib/pakfire/macros/
275 end
276
277 package libudev
278 summary = Libraries for adding libudev support to applications.
279 description
280 This package contains the libraries that make it easier to use libudev
281 functionality from applications.
282 end
283 license = LGPLv2+
284
285 conflicts
286 filesystem < 002
287 end
288
289 files
290 %{libdir}/lib*udev*.so.*
291 %{libidr}/girepository*/
292 end
293 end
294
295 package libudev-devel
296 summary = Header files for adding libudev support to applications.
297 description
298 This package contains the header and pkg-config files for developing
299 applications using libudev functionality.
300 end
301 license = LGPLv2+
302
303 conflicts
304 filesystem < 002
305 end
306
307 files
308 %{libdir}/lib*udev*.so
309 %{libdir}/pkgconfig/lib*udev.pc
310 %{libdir}/pkgconfig/gudev*
311 %{includedir}/lib*udev.h
312 %{includedir}/gudev*
313 %{datadir}/gir-*
314 %{datadir}/gtk-doc/html/gudev
315 end
316 end
317
318 package %{name}-debuginfo
319 template DEBUGINFO
320 end
321 end