clean up spec file: remove comment out macros and sub packages
[external/systemd.git] / packaging / systemd.spec
old mode 100755 (executable)
new mode 100644 (file)
index 6ec1c6d..ed02506
@@ -2,18 +2,29 @@
 Name:       systemd
 Summary:    System and Session Manager
 Version:    43
-Release:    1
+Release:    2
 Group:      System/System Control
 License:    GPLv2
 URL:        http://www.freedesktop.org/wiki/Software/systemd
 Source0:    http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
 Source1:    pamconsole-tmp.conf
 Source1001: systemd.manifest
+Source1002: max_user_inotify.conf
 Patch1:     0002-systemd-fsck-disable-l-until-linux.patch
 Patch2:     add-tmp.mount-as-tmpfs.patch
 Patch3:     tizen-login-location.patch
 Patch4:     tizen-service-file-workaround.patch
 Patch5:     journal-make-sure-to-refresh-window-position-and-poi.patch
+Patch6:     tizen-preserve-hostname.patch
+Patch7:     util-never-follow-symlinks-in-rm_rf_children.patch
+Patch8:     util-introduce-memdup.patch
+Patch9:     main-allow-system-wide-limits-for-services.patch
+Patch10:    enable-core-dumps-globally.patch
+Patch11:    SMACK-Add-configuration-options.-v3.patch
+Patch12:    reboot_syscall_param.patch
+Patch13:    default_oom_score.patch
+Patch14:    fix-syscall-NR_fanotify_mark-on-arm.patch
+Patch15:    reboot-delay.patch
 
 BuildRequires:  pkgconfig(dbus-1) >= 1.4.0
 BuildRequires:  pkgconfig(dbus-glib-1)
@@ -40,22 +51,10 @@ of the system state, maintains mount and automount points and
 implements an elaborate transactional dependency-based service
 control logic. It can work as a drop-in replacement for sysvinit.
 
-# tools package dislabled because of pycairo package dependency
-# %package tools
-# Summary:    Analyze systemd startup timing
-# Group:      Development/Tools
-# Requires:   pycairo
-# Requires:   python-xml
-# Requires:   %{name} = %{version}-%{release}
-
-# %description tools
-# This package installs the systemd-analyze tool, which allows one to
-# inspect and graph service startup timing in table or graph format.
-
 %package devel
 Summary:    Development tools for systemd
 Group:      Development/Libraries
-Requires:   %{name} = %{version}-%{release}
+Requires:   %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
 Requires(post): %{_sbindir}/ldconfig
 Requires(postun): %{_sbindir}/ldconfig
 
@@ -118,42 +117,12 @@ This package will setup a serial getty for ttySAC2 is desired.
 %package docs
 Summary:   System and session manager man pages
 Group:     Development/Libraries
-Requires:  %{name} = %{version}-%{release}
+Requires:  %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
 
 %description docs
 This package includes the man pages for systemd.
 
 
-# %package sysv-docs
-# Summary:   System and session manager man pages - SysV links
-# Group:     Development/Libraries
-# Requires:  %{name} = %{version}-%{release}
-
-# %description sysv-docs
-# This package provides the manual pages needed for systemd
-# to replace sysvinit.
-
-# %package sysv
-# Summary:   System and session manager - SysV links
-# Group:     System/Startup Services
-# Requires:  %{name} = %{version}-%{release}
-# Obsoletes: sysvinit < 3.0
-# Provides:  sysvinit = 3.0
-
-
- #%description sysv
-# Systemd is a replacement for sysvinit.  It is dependency-based and
-# able to read the LSB init script headers in addition to parsing rcN.d
-# links as hints.
-
-# It also provides process supervision using cgroups and the ability to
-# not only depend on other init script being started, but also
-# availability of a given mount point or dbus service.
-
-# This package provides the links needed for systemd
-# to replace sysvinit.
-
-
 %prep
 %setup -q -n %{name}-%{version}
 %patch1 -p1
@@ -161,15 +130,27 @@ This package includes the man pages for systemd.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
 
 %build
 cp %{SOURCE1001} .
+%autogen
 %configure --disable-static \
     --with-rootdir="" \
     --with-distro=meego \
     --disable-gtk \
     --disable-selinux \
     --disable-tcpwrap \
+    --disable-coredump \
     --enable-split-usr \
     --disable-manpages \
     --with-pamlibdir="/%{_libdir}/security" \
@@ -212,6 +193,10 @@ mkdir -p %{buildroot}/etc/systemd/system/basic.target.wants
 mkdir -p %{buildroot}/etc/systemd/system/getty.target.wants
 mkdir -p %{buildroot}%{_libdir}/systemd/system/getty.target.wants
 
+# Modify inotify max_user_instances
+mkdir -p %{buildroot}/%{_libdir}/sysctl.d
+cp %{SOURCE1002} %{buildroot}%{_libdir}/sysctl.d/
+
 #console-ttyMFD2
 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyMFD2.service
 
@@ -231,10 +216,8 @@ ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.targe
 ln -s ../serial-getty@.service %{buildroot}%{_libdir}/systemd/system/getty.target.wants/serial-getty@ttyO2.service
 
 %post
-if [ "`readlink /etc/mtab`" != "/proc/self/mounts" ]; then
-       rm -f /etc/mtab
-       ln -s /proc/self/mounts /etc/mtab
-fi
+rm -f /etc/mtab
+ln -sf /proc/self/mounts /etc/mtab
 
 /usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || :
 
@@ -253,7 +236,6 @@ fi
 # systemd-analyze is excluded for removing dependency with python-base
 %exclude %{_bindir}/systemd-analyze
 /run
-%config %{_libdir}/sysctl.d/coredump.conf
 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
 %config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
@@ -277,6 +259,7 @@ fi
 %{_libdir}/libsystemd-id128.so.0.0.2
 %{_libdir}/libsystemd-journal.so.0
 %{_libdir}/libsystemd-journal.so.0.0.2
+%{_libdir}/sysctl.d/*
 %{_datadir}/dbus-1/*/org.freedesktop.systemd1.*
 %{_defaultdocdir}/systemd
 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy