summaryrefslogtreecommitdiffstats
path: root/freeipa.spec.in
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-10-17 12:21:40 +0300
committerAlexander Bokovoy <abokovoy@redhat.com>2011-10-24 10:36:58 +0300
commite165c6f846a6cd1017b76fe31387f097b8b8202d (patch)
tree4bddf4d06641e2acc4a556161610fb3d63441d18 /freeipa.spec.in
parent628b19f7671b0bd4519c3cf097e876259eef67f2 (diff)
downloadfreeipa-systemd-ipa-2-1.tar.gz
freeipa-systemd-ipa-2-1.tar.xz
freeipa-systemd-ipa-2-1.zip
Update spec file to F-16systemd-ipa-2-1
Diffstat (limited to 'freeipa.spec.in')
-rw-r--r--freeipa.spec.in78
1 files changed, 77 insertions, 1 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in
index c5a5e745b..3305fda55 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -28,6 +28,9 @@ BuildRequires: 389-ds-base-devel >= 1.2.9
BuildRequires: svrcore-devel
BuildRequires: /usr/share/selinux/devel/Makefile
BuildRequires: policycoreutils >= %{POLICYCOREUTILSVER}
+%if 0%{?fedora} >= 16
+BuildRequires: systemd-units
+%endif
%endif
BuildRequires: nspr-devel
BuildRequires: nss-devel
@@ -89,7 +92,11 @@ Requires(pre): 389-ds-base >= 1.2.10-0.4.a4
Requires: openldap-clients
Requires: nss
Requires: nss-tools
+%if 0%{?fedora} >= 16
+Requires: krb5-server >= 1.9.1-15
+%else
Requires: krb5-server
+%endif
Requires: krb5-server-ldap
Requires: krb5-pkinit-openssl
Requires: cyrus-sasl-gssapi%{?_isa}
@@ -102,6 +109,11 @@ Requires: python-ldap
Requires: python-krbV
Requires: acl
Requires: python-pyasn1 >= 0.0.9a
+%if 0%{?fedora} >= 16
+Requires: systemd-units >= 36-3
+Requires(pre): systemd-units
+Requires(post): systemd-units
+%endif
%if 0%{?fedora} >= 15
Requires: selinux-policy >= 3.9.16-18
%else
@@ -109,6 +121,12 @@ Requires: selinux-policy >= 3.9.7-27
%endif
Requires(post): selinux-policy-base
Requires: slapi-nis >= 0.21
+%if 0%{?fedora} >= 16
+Requires: pki-ca >= 9.0.15
+Requires: pki-silent >= 9.0.15
+# Only tomcat6 greater than this version provides proper systemd support
+Requires: tomcat6 >= 6.0.32-17
+%else
%if 0%{?fedora} >= 15
Requires: pki-ca >= 9.0.15
Requires: pki-silent >= 9.0.15
@@ -117,13 +135,19 @@ Requires: pki-setup >= 9.0.15
Requires: pki-ca >= 9.0.5
Requires: pki-silent >= 9.0.5
%endif
+%endif
Requires: dogtag-pki-common-theme
Requires: dogtag-pki-ca-theme
%if 0%{?rhel}
Requires: subscription-manager
%endif
+%if 0%{?fedora} >= 16
+Requires(preun): python systemd-units
+Requires(postun): python systemd-units
+%else
Requires(preun): python initscripts chkconfig
Requires(postun): python initscripts chkconfig
+%endif
# We have a soft-requires on bind. It is an optional part of
# IPA but if it is configured we need a way to require versions
@@ -252,6 +276,11 @@ package.
%build
export CFLAGS="$CFLAGS %{optflags}"
export CPPFLAGS="$CPPFLAGS %{optflags}"
+%if 0%{?fedora} >= 16
+export SUPPORTED_PLATFORM=fedora16
+# Force re-generate of platform support
+rm -f ipapython/services.py
+%endif
make version-update
cd ipa-client; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
%if ! %{ONLY_CLIENT}
@@ -271,6 +300,11 @@ make IPA_VERSION_IS_GIT_SNAPSHOT=no %{?_smp_mflags} client
%install
rm -rf %{buildroot}
%if ! %{ONLY_CLIENT}
+%if 0%{?fedora} >= 16
+export SUPPORTED_PLATFORM=fedora16
+# Force re-generate of platform support
+rm -f ipapython/services.py
+%endif
make install DESTDIR=%{buildroot}
cd selinux
make install DESTDIR=%{buildroot}
@@ -313,7 +347,16 @@ mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
/bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa.conf
/bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-pki-proxy.conf
/bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-rewrite.conf
-install -m755 ipa.init %{buildroot}%{_initrddir}/ipa
+%if 0%{?fedora} >= 16
+# Default to systemd initscripts for F16 and above
+mkdir -p %{buildroot}%{_unitdir}
+for i in ipa.service ipa_kpasswd.service ; do
+ install -m 644 init/systemd/$i %{buildroot}%{_unitdir}/$i
+done
+rm -f %{buildroot}%{_initrddir}/ipa_kpasswd
+%else
+install -m755 init/SystemV/ipa.init %{buildroot}%{_initrddir}/ipa
+%endif
%endif
mkdir -p %{buildroot}%{_sysconfdir}/ipa/
@@ -332,10 +375,16 @@ rm -rf %{buildroot}
%if ! %{ONLY_CLIENT}
%post server
+%if 0%{?fedora} >= 16
+# Use systemd scheme
+ /bin/systemctl --system daemon-reload 2>&1 || :
+%else
+# Use SystemV scheme only before F16
if [ $1 = 1 ]; then
/sbin/chkconfig --add ipa
/sbin/chkconfig --add ipa_kpasswd
fi
+%endif
if [ $1 -gt 1 ] ; then
/usr/sbin/ipa-upgradeconfig || :
/usr/sbin/ipa-ldap-updater --upgrade >/dev/null 2>&1 || :
@@ -343,14 +392,28 @@ fi
%preun server
if [ $1 = 0 ]; then
+%if 0%{?fedora} >= 16
+# Use systemd scheme
+ /bin/systemctl --quiet stop ipa.service || :
+ /bin/systemctl --quiet disable ipa.service || :
+%else
+# Use SystemV scheme only before F16
/sbin/chkconfig --del ipa
/sbin/chkconfig --del ipa_kpasswd
/sbin/service ipa stop >/dev/null 2>&1 || :
+%endif
fi
%postun server
if [ "$1" -ge "1" ]; then
+%if 0%{?fedora} >= 16
+# Use systemd scheme
+ /bin/systemctl --quiet is-active ipa.service >/dev/null && \
+ /bin/systemctl try-restart ipa.service >/dev/null 2>&1 || :
+%else
+# Use SystemV scheme only before F16
/sbin/service ipa condrestart >/dev/null 2>&1 || :
+%endif
fi
%pre server-selinux
@@ -419,8 +482,15 @@ fi
%{_sbindir}/ipa-upgradeconfig
%{_sbindir}/ipa-compliance
%{_sysconfdir}/cron.d/ipa-compliance
+%if 0%{?fedora} >= 16
+# Use systemd scheme
+%attr(644,root,root) %{_unitdir}/ipa.service
+%attr(644,root,root) %{_unitdir}/ipa_kpasswd.service
+%else
+# Use SystemV scheme only before F16
%attr(755,root,root) %{_initrddir}/ipa
%attr(755,root,root) %{_initrddir}/ipa_kpasswd
+%endif
%dir %{python_sitelib}/ipaserver
%{python_sitelib}/ipaserver/*
%dir %{_usr}/share/ipa
@@ -551,6 +621,12 @@ fi
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/default.conf
%changelog
+* Tue Oct 18 2011 Alexander Bokovoy <abokovoy@redhat.com> - 2.1.3-1
+- 2.1.3
+
+* Mon Oct 17 2011 Alexander Bokovoy <abokovoy@redhat.com> - 2.1.2-1
+- Default to systemd for Fedora 16 and onwards
+
* Fri Oct 14 2011 Rob Crittenden <rcritten@redhat.com> - 2.1.1-3
- Set min nvr of 389-ds-base to 1.2.10-0.4.a4 for limits fixes (740942, 742324)