]>
Commit | Line | Data |
---|---|---|
9c4bd736 | 1 | # TODO: |
2 | # - gtk BRs: libnotify 0.7 and gtk+3 | |
3 | # - subpackages: bash-autocompletion, dbus(?), gtk, others? | |
4 | # - more BRs | |
5 | # | |
c3037397 | 6 | # Conditional build: |
9c0b975d | 7 | %bcond_with gtk # build gtk tools |
8 | ||
c3037397 | 9 | Summary: A System and Service Manager |
ede8d3e5 | 10 | Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa |
11 | Name: systemd | |
c3037397 | 12 | Version: 18 |
ede8d3e5 | 13 | Release: 0.1 |
14 | License: GPL v2+ | |
15 | Group: Base | |
16 | Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2 | |
c3037397 | 17 | # Source0-md5: 42a47d6fa60b7f3fe92fa22027713b32 |
ede8d3e5 | 18 | URL: http://www.freedesktop.org/wiki/Software/systemd |
c3037397 | 19 | BuildRequires: audit-libs-devel |
ede8d3e5 | 20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
b82d0bf2 | 22 | BuildRequires: cryptsetup-luks-devel |
9c0b975d | 23 | BuildRequires: dbus-devel |
c3037397 ER |
24 | BuildRequires: docbook-style-xsl |
25 | BuildRequires: gtk+2-devel | |
b82d0bf2 | 26 | BuildRequires: libcap-devel |
c3037397 | 27 | %{?with_gtk:BuildRequires: libnotify-devel >= 0.7} |
b82d0bf2 | 28 | BuildRequires: libselinux-devel |
ede8d3e5 | 29 | BuildRequires: libtool |
b82d0bf2 | 30 | BuildRequires: libwrap-devel |
c3037397 | 31 | BuildRequires: libxslt |
b82d0bf2 | 32 | BuildRequires: pam-devel |
c3037397 | 33 | BuildRequires: pkgconfig |
ede8d3e5 | 34 | BuildRequires: udev-devel >= 160 |
eb2fda66 | 35 | BuildRequires: vala >= 0.11 |
c3037397 ER |
36 | Requires: %{name}-units = %{version}-%{release} |
37 | Requires: dbus >= 1.3.2 | |
38 | Requires: rc-scripts | |
39 | Requires: udev-core >= 160 | |
b8651d75 | 40 | Provides: SysVinit = 2.86-23 |
c3037397 | 41 | Provides: readahead = 1:1.5.7-3 |
1dcb74bb | 42 | Provides: virtual(init-daemon) |
c3037397 ER |
43 | Obsoletes: SysVinit < 2.86-23 |
44 | Obsoletes: readahead < 1:1.5.7-3 | |
1dcb74bb | 45 | Obsoletes: virtual(init-daemon) |
ede8d3e5 | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
1c239f8b | 49 | systemd is a system and service manager for Linux, compatible with |
ede8d3e5 | 50 | SysV and LSB init scripts. systemd provides aggressive parallelization |
51 | capabilities, uses socket and D-Bus activation for starting services, | |
52 | offers on-demand starting of daemons, keeps track of processes using | |
53 | Linux cgroups, supports snapshotting and restoring of the system | |
54 | state, maintains mount and automount points and implements an | |
55 | elaborate transactional dependency-based service control logic. It can | |
1c239f8b | 56 | work as a drop-in replacement for sysvinit. |
ede8d3e5 | 57 | |
58 | %description -l pl.UTF-8 | |
59 | systemd jest zarządcą systemu i usług dla Linuksa, kompatybilny ze | |
60 | skryptami SysV i LSB. systemd udostępnia rozbudowane zdolności | |
61 | paralelizacji, do uruchamiania usług używa socketów oraz D-Busa, | |
62 | oferuje uruchamianie usług na życzenie, monitoruje procesy używając | |
63 | linuksowych cgroups, wspomaga zapisywanie (snapshot) i odczytywanie | |
64 | (restore) stanu systemu, zarządza (auto)mount pointami oraz | |
65 | implementuje starannie opracowaną transakcjonalną, bazującą na | |
d45dfc3a | 66 | zależnościach logikę kontroli usług. Może pracować jako zastępca dla |
ede8d3e5 | 67 | sysvinit. |
68 | ||
c3037397 ER |
69 | %package units |
70 | Summary: Configuration files, directories and installation tool for systemd | |
71 | Group: Base | |
72 | Requires: pkgconfig | |
73 | Requires(post): coreutils | |
74 | Requires(post): gawk | |
75 | ||
76 | %description units | |
77 | Basic configuration files, directories and installation tool for the | |
78 | systemd system and service manager. | |
79 | ||
80 | %package gtk | |
81 | Summary: Graphical frontend for systemd | |
82 | Group: Base | |
83 | Requires: %{name} = %{version}-%{release} | |
84 | Requires: polkit | |
85 | ||
86 | %description gtk | |
87 | Graphical front-end for systemd. | |
88 | ||
ede8d3e5 | 89 | %prep |
90 | %setup -q | |
91 | ||
92 | %build | |
ede8d3e5 | 93 | %{__autoconf} |
94 | %{__automake} | |
9c0b975d | 95 | %configure \ |
e1d9cc15 | 96 | --with-distro=other \ |
97 | --%{?with_gtk:en}%{!?with_gtk:dis}able-gtk \ | |
98 | --with-syslog-service=syslog-ng \ | |
99 | --with-sysvinit-path=/etc/rc.d/init.d \ | |
1c239f8b | 100 | --with-sysvrcd-path=/etc/rc.d \ |
1dcb74bb | 101 | --with-rootdir= |
e1d9cc15 | 102 | |
ede8d3e5 | 103 | %{__make} |
104 | ||
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
ede8d3e5 | 107 | %{__make} install \ |
108 | DESTDIR=$RPM_BUILD_ROOT | |
109 | ||
c3037397 ER |
110 | find $RPM_BUILD_ROOT '(' -name '*.a' -o -name '*.la' ')' | xargs rm -v |
111 | ||
112 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
113 | ||
114 | # no -devel (yet) | |
115 | rm -f $RPM_BUILD_ROOT%{_npkgconfigdir}/systemd.pc | |
116 | ||
117 | %if %{without gtk} | |
118 | # to shut up check-files | |
119 | rm -f $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy | |
120 | rm -f $RPM_BUILD_ROOT%{_bindir}/systemadm | |
121 | rm -f $RPM_BUILD_ROOT%{_bindir}/systemd-gnome-ask-password-agent | |
122 | rm -f $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy | |
123 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/systemadm.1* | |
124 | %endif | |
125 | ||
1dcb74bb | 126 | # Create SysV compatibility symlinks. systemctl/systemd are smart |
127 | # enough to detect in which way they are called. | |
128 | install -d $RPM_BUILD_ROOT/sbin | |
129 | ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init | |
130 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot | |
131 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt | |
132 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff | |
133 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown | |
134 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit | |
135 | ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel | |
136 | ||
c3037397 ER |
137 | # We create all wants links manually at installation time to make sure |
138 | # they are not owned and hence overriden by rpm after the used deleted | |
139 | # them. | |
140 | rm -r $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/*.target.wants | |
141 | ||
ede8d3e5 | 142 | %clean |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
9638c72f | 145 | %post |
146 | /bin/systemctl daemon-reexec > /dev/null 2>&1 || : | |
c3037397 ER |
147 | |
148 | %post units | |
149 | if [ $1 -ne 1 ]; then | |
150 | exit 0 | |
9638c72f | 151 | fi |
152 | ||
c3037397 ER |
153 | # Try to read default runlevel from the old inittab if it exists |
154 | runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null) | |
155 | if [ -z "$runlevel" ] ; then | |
156 | runlevel=3 | |
9638c72f | 157 | fi |
c3037397 ER |
158 | target="/lib/systemd/system/runlevel$runlevel.target" |
159 | ||
160 | # And symlink what we found to the new-style default.target | |
161 | ln -sf "$target" %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || : | |
162 | #/bin/systemctl enable SERVICES > /dev/null 2>&1 || : | |
163 | ||
164 | %preun units | |
165 | if [ $1 -ne 0 ]; then | |
166 | exit 0 | |
167 | fi | |
168 | #/bin/systemctl disable SERVICES > /dev/null 2>&1 || : | |
169 | rm -f %{_sysconfdir}/systemd/system/default.target > /dev/null 2>&1 || : | |
9638c72f | 170 | |
171 | %postun | |
172 | if [ $1 -ge 1 ] ; then | |
173 | /bin/systemctl daemon-reload > /dev/null 2>&1 || : | |
174 | fi | |
175 | ||
ede8d3e5 | 176 | %files |
177 | %defattr(644,root,root,755) | |
1c239f8b | 178 | %doc DISTRO_PORTING README TODO |
c3037397 ER |
179 | /etc/dbus-1/system.d/org.freedesktop.systemd1.conf |
180 | %dir %{_sysconfdir}/systemd | |
181 | %{_sysconfdir}/tmpfiles.d/systemd.conf | |
182 | %{_sysconfdir}/tmpfiles.d/x11.conf | |
183 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemd/system.conf | |
184 | %dir /etc/xdg/systemd | |
185 | /etc/xdg/systemd/user | |
1dcb74bb | 186 | %attr(755,root,root) /bin/systemd |
187 | %attr(755,root,root) /bin/systemd-ask-password | |
1dcb74bb | 188 | %attr(755,root,root) /bin/systemd-notify |
189 | %attr(755,root,root) /bin/systemd-tty-ask-password-agent | |
c3037397 ER |
190 | %attr(755,root,root) %{_bindir}/systemd-cgls |
191 | %attr(755,root,root) /sbin/halt | |
192 | %attr(755,root,root) /sbin/init | |
193 | %attr(755,root,root) /sbin/poweroff | |
194 | %attr(755,root,root) /sbin/reboot | |
195 | %attr(755,root,root) /sbin/runlevel | |
196 | %attr(755,root,root) /sbin/shutdown | |
197 | %attr(755,root,root) /sbin/telinit | |
198 | %dir /lib/systemd | |
199 | /lib/systemd/systemd-* | |
200 | %dir /lib/systemd/system-generators | |
201 | /lib/systemd/system-generators/systemd-cryptsetup-generator | |
1c239f8b | 202 | /lib/udev/rules.d/99-systemd.rules |
a2d47a49 | 203 | %attr(755,root,root) /%{_lib}/security/pam_systemd.so |
c3037397 | 204 | %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml |
1c239f8b | 205 | %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service |
206 | %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service | |
c3037397 | 207 | %{_datadir}/systemd |
1c239f8b | 208 | %{_mandir}/man1/init.1 |
1c239f8b | 209 | %{_mandir}/man1/systemd-cgls.1* |
210 | %{_mandir}/man1/systemd-notify.1* | |
211 | %{_mandir}/man1/systemd.1* | |
212 | %{_mandir}/man3/sd_booted.3* | |
213 | %{_mandir}/man3/sd_is_fifo.3* | |
214 | %{_mandir}/man3/sd_is_socket.3 | |
215 | %{_mandir}/man3/sd_is_socket_inet.3 | |
216 | %{_mandir}/man3/sd_is_socket_unix.3 | |
217 | %{_mandir}/man3/sd_listen_fds.3* | |
218 | %{_mandir}/man3/sd_notify.3* | |
219 | %{_mandir}/man3/sd_notifyf.3 | |
220 | %{_mandir}/man3/sd_readahead.3* | |
221 | %{_mandir}/man5/hostname.5* | |
222 | %{_mandir}/man5/locale.conf.5* | |
223 | %{_mandir}/man5/modules-load.d.5* | |
224 | %{_mandir}/man5/os-release.5* | |
225 | %{_mandir}/man5/systemd.automount.5* | |
226 | %{_mandir}/man5/systemd.conf.5* | |
227 | %{_mandir}/man5/systemd.device.5* | |
228 | %{_mandir}/man5/systemd.exec.5* | |
229 | %{_mandir}/man5/systemd.mount.5* | |
230 | %{_mandir}/man5/systemd.path.5* | |
231 | %{_mandir}/man5/systemd.service.5* | |
232 | %{_mandir}/man5/systemd.snapshot.5* | |
233 | %{_mandir}/man5/systemd.socket.5* | |
234 | %{_mandir}/man5/systemd.swap.5* | |
235 | %{_mandir}/man5/systemd.target.5* | |
236 | %{_mandir}/man5/systemd.timer.5* | |
237 | %{_mandir}/man5/systemd.unit.5* | |
1c239f8b | 238 | %{_mandir}/man5/vconsole.conf.5* |
239 | %{_mandir}/man7/daemon.7* | |
240 | %{_mandir}/man7/sd-daemon.7* | |
241 | %{_mandir}/man7/sd-readahead.7* | |
242 | %{_mandir}/man7/systemd.special.7* | |
243 | %{_mandir}/man8/halt.8* | |
244 | %{_mandir}/man8/pam_systemd.8* | |
245 | %{_mandir}/man8/poweroff.8 | |
246 | %{_mandir}/man8/reboot.8 | |
247 | %{_mandir}/man8/runlevel.8* | |
248 | %{_mandir}/man8/shutdown.8* | |
249 | %{_mandir}/man8/telinit.8* | |
c3037397 ER |
250 | |
251 | %files units | |
252 | %defattr(644,root,root,755) | |
253 | %dir %{_sysconfdir}/systemd | |
254 | %dir %{_sysconfdir}/systemd/system | |
255 | %dir %{_sysconfdir}/tmpfiles.d | |
256 | %dir /lib/systemd | |
257 | /lib/systemd/system | |
258 | %attr(755,root,root) /bin/systemctl | |
259 | %attr(755,root,root) /bin/systemd-tmpfiles | |
260 | %{_mandir}/man5/tmpfiles.d.5* | |
261 | %{_mandir}/man1/systemctl.1* | |
262 | %{_mandir}/man8/systemd-tmpfiles.8* | |
263 | ||
264 | %if %{with gtk} | |
265 | %files gtk | |
266 | %defattr(644,root,root,755) | |
267 | %attr(755,root,root) %{_bindir}/systemadm | |
268 | %attr(755,root,root) %{_bindir}/systemd-gnome-ask-password-agent | |
1c239f8b | 269 | %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy |
c3037397 ER |
270 | %{_mandir}/man1/systemadm.1* |
271 | %endif |