On 10/24/2012 08:25 PM, Rob Crittenden wrote:
> Martin Kosek wrote:
>> Requires(pre) only guarantees that package will be present before
>> package scriptlets are run. However, the package can be removed
>> after installation is finished without removing also IPA. Add
>> standard Requires for these dependencies.
>>
>> Remove PRE version number from VERSION. This update and following
>> is done on a top of IPA 3.0.0 GA.
>>
>> https://fedorahosted.org/freeipa/ticket/3189
> 
> IIRC we used pre because older versions of 389-ds-base (RHEL-5 and older
> Fedora) provided its own SELinux policy and we needed this to be available
> before our own policy was installed.
> 
> I have hte feeling that pre can be removed altogether.

Good to know - I removed the pre Requires for 389-ds-base.

> 
> While you're updating the VERSION you may as well change the whole value to
> 3.0.99 or something unique.
> 
> rob
> 

Ok. Since master branch will be IPA 3.1 in future, and ipa-3-0 branch will be
IPA 3.0.1 I created a patch for each branch separately to update the VERSION
respectively (I chose IPA 3.0.1-pre1 for 3.0.1).

Martin
From 3da0d5b740efd39494816f1ddfdef129b5a6f79a Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Wed, 24 Oct 2012 12:35:36 +0200
Subject: [PATCH] Avoid uninstalling dependencies during package lifetime

Requires(pre) only guarantees that package will be present before
package scriptlets are run. However, the package can be removed
after installation is finished without removing also IPA. Add
standard Requires for these dependencies.

Remove PRE version number from VERSION. This update and following
is done on a top of IPA 3.0.0 GA.

https://fedorahosted.org/freeipa/ticket/3189
---
 VERSION         | 4 ++--
 freeipa.spec.in | 7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/VERSION b/VERSION
index c1f1bceffe53b3fcfa6526448f6aebca475073b2..6e2696047dd0636ef3343b955e8cb7ae5b4acd0a 100644
--- a/VERSION
+++ b/VERSION
@@ -20,7 +20,7 @@
 ########################################################
 IPA_VERSION_MAJOR=3
 IPA_VERSION_MINOR=0
-IPA_VERSION_RELEASE=0
+IPA_VERSION_RELEASE=99
 
 ########################################################
 # For 'pre' releases the version will be               #
@@ -30,7 +30,7 @@ IPA_VERSION_RELEASE=0
 # e.g. IPA_VERSION_PRE_RELEASE=1                       #
 #  ->  "1.0.0pre1"                                     #
 ########################################################
-IPA_VERSION_PRE_RELEASE=2
+IPA_VERSION_PRE_RELEASE=
 
 ########################################################
 # For 'rc' releases the version will be                #
diff --git a/freeipa.spec.in b/freeipa.spec.in
index 916630029f6dfac8ef32dabb00f338052cbbf08e..a4efd9c37b674a56be79b11ecce4393f6299be17 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -106,7 +106,7 @@ Requires: %{name}-python = %{version}-%{release}
 Requires: %{name}-client = %{version}-%{release}
 Requires: %{name}-admintools = %{version}-%{release}
 Requires: %{name}-server-selinux = %{version}-%{release}
-Requires(pre): 389-ds-base >= 1.2.11.14-1
+Requires: 389-ds-base >= 1.2.11.14-1
 Requires: openldap-clients
 Requires: nss
 Requires: nss-tools
@@ -175,6 +175,7 @@ Requires(postun): python initscripts chkconfig
 Requires: python-dns
 Requires: keyutils
 Requires: zip
+Requires: policycoreutils >= %{POLICYCOREUTILSVER}
 
 # 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
@@ -815,6 +816,10 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
 
 %changelog
+* Wed Oct 24 2012 Martin Kosek <mko...@redhat.com> - 3.0.99-1
+- Add strict Requires for 389-ds-base and policycoreutils to avoid user
+  removing them during package lifetime
+
 * Wed Oct 17 2012 Martin Kosek <mko...@redhat.com> - 2.99.0-51
 - Print ipa-upgradeconfig errors during RPM update
 
-- 
1.7.11.7

From c090fca75276a800a1cc3509a66625af96caf07b Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Thu, 25 Oct 2012 08:57:49 +0200
Subject: [PATCH] Avoid uninstalling dependencies during package lifetime

Requires(pre) only guarantees that package will be present before
package scriptlets are run. However, the package can be removed
after installation is finished without removing also IPA. Add
standard Requires for these dependencies.

Remove PRE version number from VERSION. This update and following
is done on a top of IPA 3.0.0 GA.
---
 VERSION         | 4 ++--
 freeipa.spec.in | 7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/VERSION b/VERSION
index 07b759babda3ea8791bbf02c5c0cf995a0eb1e7e..4d09f06a69a55991dae9004d92291030c589f607 100644
--- a/VERSION
+++ b/VERSION
@@ -20,7 +20,7 @@
 ########################################################
 IPA_VERSION_MAJOR=3
 IPA_VERSION_MINOR=0
-IPA_VERSION_RELEASE=0
+IPA_VERSION_RELEASE=1
 
 ########################################################
 # For 'pre' releases the version will be               #
@@ -30,7 +30,7 @@ IPA_VERSION_RELEASE=0
 # e.g. IPA_VERSION_PRE_RELEASE=1                       #
 #  ->  "1.0.0pre1"                                     #
 ########################################################
-IPA_VERSION_PRE_RELEASE=
+IPA_VERSION_PRE_RELEASE=1
 
 ########################################################
 # For 'rc' releases the version will be                #
diff --git a/freeipa.spec.in b/freeipa.spec.in
index 916630029f6dfac8ef32dabb00f338052cbbf08e..a4efd9c37b674a56be79b11ecce4393f6299be17 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -106,7 +106,7 @@ Requires: %{name}-python = %{version}-%{release}
 Requires: %{name}-client = %{version}-%{release}
 Requires: %{name}-admintools = %{version}-%{release}
 Requires: %{name}-server-selinux = %{version}-%{release}
-Requires(pre): 389-ds-base >= 1.2.11.14-1
+Requires: 389-ds-base >= 1.2.11.14-1
 Requires: openldap-clients
 Requires: nss
 Requires: nss-tools
@@ -175,6 +175,7 @@ Requires(postun): python initscripts chkconfig
 Requires: python-dns
 Requires: keyutils
 Requires: zip
+Requires: policycoreutils >= %{POLICYCOREUTILSVER}
 
 # 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
@@ -815,6 +816,10 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
 
 %changelog
+* Wed Oct 24 2012 Martin Kosek <mko...@redhat.com> - 3.0.0-1
+- Add strict Requires for 389-ds-base and policycoreutils to avoid user
+  removing them during package lifetime
+
 * Wed Oct 17 2012 Martin Kosek <mko...@redhat.com> - 2.99.0-51
 - Print ipa-upgradeconfig errors during RPM update
 
-- 
1.7.11.7

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to