cc49efc
Name:           systemd
cc49efc
Url:            http://www.freedesktop.org/wiki/Software/systemd
cc49efc
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Lennart Poettering f58b3d0
Version:        5
Lennart Poettering f58b3d0
Release:        1%{?dist}
cc49efc
License:        GPLv2+
cc49efc
Group:          System Environment/Base
cc49efc
Summary:        A System and Session Manager
25a5a12
BuildRequires:  libudev-devel >= 160
cc49efc
BuildRequires:  libcap-devel
cc49efc
BuildRequires:  tcp_wrappers-devel
cc49efc
BuildRequires:  pam-devel
7f4dce3
BuildRequires:  libselinux-devel
cc49efc
BuildRequires:  libxslt
cc49efc
BuildRequires:  docbook-style-xsl
cc49efc
BuildRequires:  dbus-glib-devel
25a5a12
BuildRequires:  vala >= 0.9
cc49efc
BuildRequires:  pkgconfig
cc49efc
BuildRequires:  gtk2-devel
cc49efc
BuildRequires:  automake
cc49efc
BuildRequires:  autoconf
1a88657
BuildRequires:  libtool
fdaca21
Requires:       systemd-units = %{version}-%{release}
b93a367
Requires:       dbus >= 1.3.2
b93a367
Requires:       udev >= 160
aee1397
Requires:       libudev >= 160
cc49efc
Requires:       initscripts
aee1397
Requires:       selinux-policy >= 3.8.7
5a28ec9
Source0:        http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2
cc49efc
cc49efc
%description
cc49efc
systemd is a system and session manager for Linux, compatible with
cc49efc
SysV and LSB init scripts. systemd provides aggressive parallelization
cc49efc
capabilities, uses socket and D-Bus activation for starting services,
cc49efc
offers on-demand starting of daemons, keeps track of processes using
cc49efc
Linux cgroups, supports snapshotting and restoring of the system
cc49efc
state, maintains mount and automount points and implements an
cc49efc
elaborate transactional dependency-based service control logic. It can
cc49efc
work as a drop-in replacement for sysvinit.
cc49efc
4372adb
%package units
4372adb
Group:          System Environment/Base
4372adb
Summary:        Configuration files, directories and installation tool for systemd
5a28ec9
Requires:       pkgconfig
4372adb
4372adb
%description units
4372adb
Basic configuration files, directories and installation tool for the systemd
4372adb
system and session manager.
4372adb
cc49efc
%package gtk
cc49efc
Group:          System Environment/Base
cc49efc
Summary:        Graphical frontend for systemd
cc49efc
Requires:       %{name} = %{version}-%{release}
cc49efc
cc49efc
%description gtk
cc49efc
Graphical front-end for systemd.
cc49efc
cc49efc
%package sysvinit
cc49efc
Group:          System Environment/Base
cc49efc
Summary:        systemd System V init tools
cc49efc
Requires:       %{name} = %{version}-%{release}
4372adb
Obsoletes:      SysVinit < 2.86-24, sysvinit < 2.86-24
4372adb
Provides:       SysVinit = 2.86-24, sysvinit = 2.86-24
3fb2ea4
Provides:	sysvinit-userspace
25a5a12
Obsoletes:      upstart < 0.6.5-6.fc14
25a5a12
Conflicts:      upstart-sysvinit
25a5a12
25a5a12
# For now, require upstart installed, so that people can rely that
25a5a12
# they can emergency boot into upstart with init=/sbin/upstart
25a5a12
Requires:       upstart >= 0.6.5-6.fc14
cc49efc
cc49efc
%description sysvinit
cc49efc
Drop-in replacement for the System V init tools of systemd.
cc49efc
cc49efc
%prep
fdaca21
%setup -q
7a392d6
cc49efc
%build
cc49efc
%configure --with-rootdir= --with-distro=fedora
7a392d6
make %{?_smp_mflags}
cc49efc
cc49efc
%install
cc49efc
rm -rf %{buildroot}
cc49efc
make DESTDIR=%{buildroot} install
cc49efc
find %{buildroot} \( -name '*.a' -o -name '*.la' \) -exec rm {} \;
25a5a12
25a5a12
# Create SysV compatibility symlinks. systemctl/systemd are smart
25a5a12
# enough to detect in which way they are called.
cc49efc
mkdir -p %{buildroot}/sbin
5a28ec9
ln -s ../bin/systemd %{buildroot}/sbin/init
5a28ec9
ln -s ../bin/systemctl %{buildroot}/sbin/reboot
5a28ec9
ln -s ../bin/systemctl %{buildroot}/sbin/halt
5a28ec9
ln -s ../bin/systemctl %{buildroot}/sbin/poweroff
5a28ec9
ln -s ../bin/systemctl %{buildroot}/sbin/shutdown
5a28ec9
ln -s ../bin/systemctl %{buildroot}/sbin/telinit
5a28ec9
ln -s ../bin/systemctl %{buildroot}/sbin/runlevel
cc49efc
25a5a12
# We create all wants links manually at installation time to make sure
25a5a12
# they are not owned and hence overriden by rpm after the used deleted
25a5a12
# them.
25a5a12
rm -r %{buildroot}/etc/systemd/system/*.target.wants
25a5a12
25a5a12
# And the default symlink we generate automatically based on inittab
25a5a12
rm %{buildroot}/etc/systemd/system/default.target
25a5a12
cc49efc
%clean
cc49efc
rm -rf $RPM_BUILD_ROOT
cc49efc
25a5a12
%post units
25a5a12
if [ $1 -eq 1 ] ; then
25a5a12
        # Try to read default runlevel from the old inittab if it exists
25a5a12
        runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
25a5a12
        if [ -z "$runlevel" ] ; then
25a5a12
                target="/lib/systemd/system/graphical.target"
25a5a12
        else
25a5a12
                target="/etc/systemd/system/runlevel$runlevel.target"
25a5a12
        fi
25a5a12
25a5a12
        # And symlink what we found to the new-style default.target
25a5a12
        /bin/ln -sf "$target" /etc/systemd/system/default.target 2>&1 || :
25a5a12
25a5a12
        # Enable the services we install by default.
25a5a12
        /bin/systemctl enable \
25a5a12
                getty@.service \
25a5a12
                prefdm.service \
25a5a12
                getty.target \
25a5a12
                rc-local.service \
25a5a12
                remote-fs.target 2>&1 || :
Lennart Poettering f58b3d0
Lennart Poettering f58b3d0
	# Temporary fix for broken upgrades between older F14 rawhide to newer F14 rawhide. Should be removed eventually.
Lennart Poettering f58b3d0
	/bin/systemctl enable \
Lennart Poettering f58b3d0
		dbus.service \
Lennart Poettering f58b3d0
		dbus.socket 2>&1 || :
25a5a12
fi
25a5a12
25a5a12
%preun units
25a5a12
if [ $1 -eq 0 ] ; then
25a5a12
        /bin/systemctl disable \
25a5a12
                getty@.service \
25a5a12
                prefdm.service \
25a5a12
                getty.target \
25a5a12
                rc-local.service \
25a5a12
                remote-fs.target 2>&1 || :
25a5a12
25a5a12
        /bin/rm -f /etc/systemd/system/default.target 2>&1 || :
25a5a12
fi
25a5a12
25a5a12
%postun units
25a5a12
if [ $1 -ge 1 ] ; then
25a5a12
        /bin/systemctl daemon-reload 2>&1 || :
25a5a12
fi
25a5a12
cc49efc
%files
cc49efc
%defattr(-,root,root,-)
1e979b1
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
cc49efc
%{_sysconfdir}/rc.d/init.d/reboot
25a5a12
%dir %{_sysconfdir}/systemd/session
25a5a12
%{_sysconfdir}/xdg/systemd
cc49efc
/bin/systemd
cc49efc
/bin/systemd-notify
4372adb
/lib/systemd/systemd-*
cc49efc
/lib/udev/rules.d/*.rules
1e979b1
/%{_lib}/security/pam_systemd.so
5a28ec9
%{_bindir}/systemd-cgls
4372adb
%{_mandir}/man1/systemd.*
4372adb
%{_mandir}/man1/systemd-notify.*
5a28ec9
%{_mandir}/man1/systemd-cgls.*
4372adb
%{_mandir}/man3/*
4372adb
%{_mandir}/man5/*
4372adb
%{_mandir}/man7/*
4372adb
%{_mandir}/man8/pam_systemd.*
cc49efc
%{_datadir}/systemd
7a392d6
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
7a392d6
%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
cc49efc
%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
cc49efc
%{_docdir}/systemd
cc49efc
85eb5fd
# Joint ownership with libcgroup
85eb5fd
%dir /cgroup
85eb5fd
4372adb
%files units
4372adb
%defattr(-,root,root,-)
25a5a12
%dir %{_sysconfdir}/systemd
25a5a12
%dir %{_sysconfdir}/systemd/system
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system.conf
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system/ctrl-alt-del.target
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system/display-manager.service
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system/kbrequest.target
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target
25a5a12
%config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target
4372adb
%dir /lib/systemd
4372adb
/lib/systemd/system
25a5a12
/bin/systemctl
25a5a12
%{_mandir}/man1/systemctl.*
5a28ec9
%{_datadir}/pkgconfig/systemd.pc
5a28ec9
%{_docdir}/systemd/LICENSE
4372adb
cc49efc
%files gtk
cc49efc
%defattr(-,root,root,-)
cc49efc
%{_bindir}/systemadm
4372adb
%{_mandir}/man1/systemadm.*
cc49efc
cc49efc
%files sysvinit
cc49efc
%defattr(-,root,root,-)
cc49efc
/sbin/init
cc49efc
/sbin/reboot
cc49efc
/sbin/halt
cc49efc
/sbin/poweroff
cc49efc
/sbin/shutdown
cc49efc
/sbin/telinit
cc49efc
/sbin/runlevel
4372adb
%{_mandir}/man1/init.*
4372adb
%{_mandir}/man8/halt.*
4372adb
%{_mandir}/man8/reboot.*
4372adb
%{_mandir}/man8/shutdown.*
4372adb
%{_mandir}/man8/poweroff.*
4372adb
%{_mandir}/man8/telinit.*
4372adb
%{_mandir}/man8/runlevel.*
cc49efc
7a392d6
%changelog
Lennart Poettering f58b3d0
* Wed Aug  4 2010 Lennart Poettering <lpoetter@redhat.com> - 5-1
Lennart Poettering f58b3d0
- Prepare release 5
Lennart Poettering f58b3d0
3fb2ea4
* Tue Jul 27 2010 Bill Nottingham <notting@redhat.com> - 4-4
3fb2ea4
- Add 'sysvinit-userspace' provide to -sysvinit package to fix upgrade/install (#618537)
3fb2ea4
7f4dce3
* Sat Jul 24 2010 Lennart Poettering <lpoetter@redhat.com> - 4-3
7f4dce3
- Add libselinux to build dependencies
7f4dce3
2f1a574
* Sat Jul 24 2010 Lennart Poettering <lpoetter@redhat.com> - 4-2
2f1a574
- Use the right tarball
2f1a574
25a5a12
* Sat Jul 24 2010 Lennart Poettering <lpoetter@redhat.com> - 4-1
25a5a12
- New upstream release, and make default
25a5a12
d348ae7
* Tue Jul 13 2010 Lennart Poettering <lennart@poettering.net> - 3-3
d348ae7
- Used wrong tarball
d348ae7
85eb5fd
* Tue Jul 13 2010 Lennart Poettering <lennart@poettering.net> - 3-2
85eb5fd
- Own /cgroup jointly with libcgroup, since we don't dpend on it anymore
85eb5fd
b93a367
* Tue Jul 13 2010 Lennart Poettering <lpoetter@redhat.com> - 3-1
b93a367
- New upstream release
b93a367
5a28ec9
* Fri Jul 9 2010 Lennart Poettering <lpoetter@redhat.com> - 2-0
5a28ec9
- New upstream release
5a28ec9
fdaca21
* Wed Jul 7 2010 Lennart Poettering <lpoetter@redhat.com> - 1-0
fdaca21
- First upstream release
fdaca21
caa30f8
* Tue Jun 29 2010 Lennart Poettering <lpoetter@redhat.com> - 0-0.7.20100629git4176e5
4372adb
- New snapshot
4372adb
- Split off -units package where other packages can depend on without pulling in the whole of systemd
4372adb
1a88657
* Tue Jun 22 2010 Lennart Poettering <lpoetter@redhat.com> - 0-0.6.20100622gita3723b
1a88657
- Add missing libtool dependency.
1a88657
1e979b1
* Tue Jun 22 2010 Lennart Poettering <lpoetter@redhat.com> - 0-0.5.20100622gita3723b
4372adb
- Update snapshot
1e979b1
1e979b1
* Mon Jun 14 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0-0.4.20100614git393024
ab31d04
- Pull the latest snapshot that fixes a segfault. Resolves rhbz#603231
ab31d04
7a392d6
* Thu Jun 11 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0-0.3.20100610git2f198e
7a392d6
- More minor fixes as per review
7a392d6
7a392d6
* Thu Jun 10 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0-0.2.20100610git2f198e
7a392d6
- Spec improvements from David Hollis
7a392d6
7a392d6
* Wed Jun 09 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0-0.1.20090609git2f198e
7a392d6
- Address review comments
ab31d04
7a392d6
* Tue Jun 01 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0-0.0.git2010-06-02
7a392d6
- Initial spec (adopted from Kay Sievers)