]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - systemd/systemd.nm
json-glib: New package.
[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
b329a155 7version = 196
f2ada565 8release = 3
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 += \
2d01364a
SS
57 --with-distro=ipfire \
58 --disable-static
802ea3af
MT
59
60 prepare_cmds
61 ./autogen.sh ac
62 end
63
802ea3af 64 install_cmds
755fe986
SS
65 # Create folder in log to store the journal.
66 mkdir -pv %{BUILDROOT}/var/log/journal
67
802ea3af 68 # Create sysv compatible symlinks.
6793fec1
MT
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
802ea3af
MT
76
77 # Create empty machine-id file.
78 touch %{BUILDROOT}/etc/machine-id
79
80 # Copy locale and console settings
6793fec1
MT
81 mkdir -pv %{BUILDROOT}%{sysconfdir}
82 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
802ea3af
MT
83
84 # Recreate all targets
0976fbe4
SS
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
6793fec1 89 done
802ea3af
MT
90
91 # Remove runlevel targets and graphical.target
6793fec1
MT
92 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
93 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
802ea3af 94
2d01364a
SS
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
802ea3af 99 # Set default target to multi-user
6793fec1 100 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
802ea3af
MT
101
102 # Replace absolute symlinks by relative ones.
6793fec1
MT
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
802ea3af
MT
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
755fe986
SS
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
f2ada565
SS
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/
802ea3af
MT
123 end
124end
125
126packages
127 package %{name}
2d01364a
SS
128 groups += Base
129
6793fec1
MT
130 prerequires += authconfig
131
514357ad
SS
132 requires
133 dbus
2d01364a 134 hwdata
514357ad 135 python-cairo
1d40b321 136 python-dbus
214d8f27 137 %{name}-units=%{thisver}
514357ad
SS
138 util-linux>=2.19
139 end
1d40b321 140
216fde50
SS
141 provides
142 /bin/systemd
143 /sbin/halt
144 /sbin/init
145 /sbin/poweroff
146 /sbin/reboot
147 /sbin/shutdown
2d01364a 148
755fe986 149 syslog
2d01364a 150 udev = %{thisver}
216fde50
SS
151 end
152
6793fec1 153 conflicts
2d01364a 154 dracut < 019
6793fec1 155 filesystem < 002
755fe986 156 rsyslog < 5.8.6-4
6793fec1
MT
157 upstart
158 end
ef438375 159
2d01364a
SS
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
1d40b321
SS
183 script postin
184 # Generate Machine ID.
6793fec1 185 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
1d40b321
SS
186
187 # Reexec systemd daemon.
6793fec1 188 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
1d40b321
SS
189
190 # Make sure pam_systemd is enabled
6793fec1
MT
191 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
192 authconfig --update --nostart >/dev/null 2>&1 || :
1d40b321
SS
193
194 # Try harder
6793fec1 195 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
1d40b321 196 fi
5e462903
MT
197
198 /usr/bin/systemctl enable \
199 getty@.service \
50affca1 200 remote-fs.target \
5e462903
MT
201 systemd-readahead-replay.service \
202 systemd-readahead-collect.service \
203 >/dev/null 2>&1 || :
1d40b321
SS
204 end
205
2d01364a
SS
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
1d40b321
SS
212 script postup
213 # Restart login service after update
5e462903 214 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
6793fec1 215 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
755fe986
SS
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
1d40b321 222 end
2d01364a
SS
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
802ea3af 228 end
1f9bc2f0 229
802ea3af
MT
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
1f9bc2f0 237
5e38e9bb
SS
238 prerequires
239 /bin/sh
240 coreutils
241 end
242
6793fec1 243 provides
802ea3af 244 /bin/systemctl
802ea3af 245 end
1d40b321 246
6793fec1
MT
247 conflicts
248 filesystem < 002
1d40b321
SS
249 end
250
6793fec1
MT
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.*
1d40b321
SS
259 end
260
261 script postup
262 # Reload service files
6793fec1 263 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
1d40b321 264 end
802ea3af 265 end
1f9bc2f0 266
1191e383
SS
267 package %{name}-libs
268 template LIBS
269 end
270
802ea3af
MT
271 package %{name}-devel
272 template DEVEL
6793fec1
MT
273
274 files += %{prefix}/lib/pakfire/macros/
802ea3af 275 end
1f9bc2f0 276
2d01364a
SS
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
1191e383 290 %{libdir}/lib*udev*.so.*
2d01364a
SS
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
a8aa3ead 308 %{libdir}/lib*udev*.so
73eb4724 309 %{libdir}/pkgconfig/lib*udev.pc
2d01364a 310 %{libdir}/pkgconfig/gudev*
a8aa3ead 311 %{includedir}/lib*udev.h
2d01364a
SS
312 %{includedir}/gudev*
313 %{datadir}/gir-*
314 %{datadir}/gtk-doc/html/gudev
315 end
316 end
317
1f9bc2f0
MT
318 package %{name}-debuginfo
319 template DEBUGINFO
320 end
802ea3af 321end