Author: glen                         Date: Fri Jun  2 21:18:55 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %openldap_schema_{un,}register macros

---- Files affected:
SPECS:
   courier-authlib.spec (1.42 -> 1.43) , evolution-data-server.spec (1.75 -> 
1.76) , horde-turba.spec (1.74 -> 1.75) , horde.spec (1.148 -> 1.149) , 
openldap-schema-mozillaorgperson.spec (1.2 -> 1.3) , pam-pam_ldap.spec (1.30 -> 
1.31) , samba.spec (1.323 -> 1.324) 

---- Diffs:

================================================================
Index: SPECS/courier-authlib.spec
diff -u SPECS/courier-authlib.spec:1.42 SPECS/courier-authlib.spec:1.43
--- SPECS/courier-authlib.spec:1.42     Mon Mar 27 14:41:36 2006
+++ SPECS/courier-authlib.spec  Fri Jun  2 23:18:49 2006
@@ -23,7 +23,7 @@
 BuildRequires: openldap-devel >= 2.3.0
 BuildRequires: pam-devel
 BuildRequires: postgresql-devel
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.304
 BuildRequires: sed >= 4.0
 BuildRequires: sysconftool
 BuildRequires: zlib-devel
@@ -361,32 +361,12 @@
 %service -q courier-authlib restart
 
 %post -n openldap-schema-courier
-if ! grep -q %{schemadir}/courier.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/courier.schema
-               }
-
-               # enable dependant schemas: nis.schema, cosine.schema
-               /^#include.*\(nis\|cosine\)\.schema/{
-                       s/^#//
-               }
-       ' /etc/openldap/slapd.conf
-fi
+%openldap_schema_register %{schemadir}/courier.schema -d nis,cosine
 %service -q ldap restart
 
 %postun -n openldap-schema-courier
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/courier.schema /etc/openldap/slapd.conf; then
-               sed -i -e '
-               /^include.*\/usr\/share\/openldap\/schema\/courier.schema/d
-
-               # for symmetry it would be nice if we disable enabled schemas 
in post,
-               # but we really can not do that, it would break something else.
-               ' /etc/openldap/slapd.conf
-       fi
-
+       %openldap_schema_unregister %{schemadir}/courier.schema
        %service -q ldap restart
 fi
 
@@ -626,6 +606,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.43  2006/06/02 21:18:49  glen
+- use %openldap_schema_{un,}register macros
+
 Revision 1.42  2006/03/27 12:41:36  glen
 - rel 5 (libmysqlclient_15)
 

================================================================
Index: SPECS/evolution-data-server.spec
diff -u SPECS/evolution-data-server.spec:1.75 
SPECS/evolution-data-server.spec:1.76
--- SPECS/evolution-data-server.spec:1.75       Sat May 27 02:25:04 2006
+++ SPECS/evolution-data-server.spec    Fri Jun  2 23:18:50 2006
@@ -40,7 +40,7 @@
 BuildRequires: nss-devel
 %{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.197
+BuildRequires: rpmbuild(macros) >= 1.304
 Requires(post,postun): scrollkeeper
 Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -187,30 +187,13 @@
 %postun        libs -p /sbin/ldconfig
 
 %post -n openldap-schema-evolutionperson
-if ! grep -q %{schemadir}/evolutionperson.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/evolutionperson.schema
-               }
-       ' /etc/openldap/slapd.conf
-fi
-
-if [ -f /var/lock/subsys/ldap ]; then
-       /etc/rc.d/init.d/ldap restart >&2
-fi
+%openldap_schema_register %{schemadir}/evolutionperson.schema
+%service -q ldap restart
 
 %postun -n openldap-schema-evolutionperson
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/evolutionperson.schema 
/etc/openldap/slapd.conf; then
-               sed -i -e '
-               
/^include.*\/usr\/share\/openldap\/schema\/evolutionperson.schema/d
-               ' /etc/openldap/slapd.conf
-       fi
-
-       if [ -f /var/lock/subsys/ldap ]; then
-               /etc/rc.d/init.d/ldap restart >&2 || :
-       fi
+       %openldap_schema_unregister %{schemadir}/evolutionperson.schema
+       %service -q ldap restart
 fi
 
 %files -f %{name}.lang
@@ -264,6 +247,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.76  2006/06/02 21:18:50  glen
+- use %openldap_schema_{un,}register macros
+
 Revision 1.75  2006/05/27 00:25:04  qboosh
 - merged deps update from AC-branch
 

================================================================
Index: SPECS/horde-turba.spec
diff -u SPECS/horde-turba.spec:1.74 SPECS/horde-turba.spec:1.75
--- SPECS/horde-turba.spec:1.74 Tue May  2 22:27:58 2006
+++ SPECS/horde-turba.spec      Fri Jun  2 23:18:50 2006
@@ -20,7 +20,7 @@
 Source2:       %{_hordeapp}-trans.mo
 URL:           http://www.horde.org/turba/
 BuildRequires: rpm-php-pearprov >= 4.0.2-98
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.304
 BuildRequires: tar >= 1:1.15.1
 Requires(triggerpostun):       sed >= 4.0
 Requires:      horde >= 3.0
@@ -136,25 +136,12 @@
 fi
 
 %post -n openldap-schema-rfc2739
-if ! grep -q %{schemadir}/rfc2739.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/rfc2739.schema
-               }
-       ' /etc/openldap/slapd.conf
-fi
-
+%openldap_schema_register %{schemadir}/rfc2739.schema
 %service -q ldap restart
 
 %postun -n openldap-schema-rfc2739
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/rfc2739.schema /etc/openldap/slapd.conf; then
-               sed -i -e '
-               /^include.*\/''usr\/share\/openldap\/schema\/rfc2739.schema/d
-               ' /etc/openldap/slapd.conf
-       fi
-
+       %openldap_schema_unregister %{schemadir}/rfc2739.schema
        %service -q ldap restart
 fi
 
@@ -238,6 +225,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.75  2006/06/02 21:18:50  glen
+- use %openldap_schema_{un,}register macros
+
 Revision 1.74  2006/05/02 20:27:58  paszczus
 - updated to 2.1.1 ; release 1
 

================================================================
Index: SPECS/horde.spec
diff -u SPECS/horde.spec:1.148 SPECS/horde.spec:1.149
--- SPECS/horde.spec:1.148      Tue Apr  4 22:55:58 2006
+++ SPECS/horde.spec    Fri Jun  2 23:18:50 2006
@@ -42,7 +42,7 @@
 Patch100:      %{name}-branch.diff
 URL:           http://www.horde.org/
 BuildRequires: rpm-php-pearprov >= 4.0.2-98
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.304
 BuildRequires: tar >= 1:1.15.1
 %if %{with autodeps}
 BuildRequires: php-pear-Crypt_Rc4
@@ -237,32 +237,12 @@
 fi
 
 %post -n openldap-schema-horde
-if ! grep -q %{schemadir}/horde.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/horde.schema
-               }
-               # enable dependant schemas: core.schema
-               /^#include.*\(core\)\.schema/{
-                       s/^#//
-               }
-       ' /etc/openldap/slapd.conf
-fi
-
+%openldap_schema_register %{schemadir}/horde.schema -d core
 %service -q ldap restart
 
 %postun -n openldap-schema-horde
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/horde.schema /etc/openldap/slapd.conf; then
-               sed -i -e '
-               /^include.*\/''usr\/share\/openldap\/schema\/horde.schema/d
-
-               # for symmetry it would be nice if we disable enabled schemas 
in post,
-               # but we really can not do that, it would break something else.
-               ' /etc/openldap/slapd.conf
-       fi
-
+       %openldap_schema_unregister %{schemadir}/horde.schema
        %service -q ldap restart
 fi
 
@@ -351,6 +331,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.149  2006/06/02 21:18:50  glen
+- use %openldap_schema_{un,}register macros
+
 Revision 1.148  2006/04/04 20:55:58  glen
 - add cve refs to 3.1.1 version
 

================================================================
Index: SPECS/openldap-schema-mozillaorgperson.spec
diff -u SPECS/openldap-schema-mozillaorgperson.spec:1.2 
SPECS/openldap-schema-mozillaorgperson.spec:1.3
--- SPECS/openldap-schema-mozillaorgperson.spec:1.2     Sat Aug 27 12:04:13 2005
+++ SPECS/openldap-schema-mozillaorgperson.spec Fri Jun  2 23:18:50 2006
@@ -9,6 +9,7 @@
 Group:         Networking/Daemons
 Source0:       mozillaOrgPerson.schema
 URL:           https://bugzilla.mozilla.org/show_bug.cgi?id=116692
+BuildRequires: rpmbuild(macros) >= 1.304
 Requires(post,postun): sed >= 4.0
 Requires:      openldap-servers
 BuildArch:     noarch
@@ -38,38 +39,13 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if ! grep -q %{schemadir}/mozillaOrgPerson.schema /etc/openldap/slapd.conf; 
then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/mozillaOrgPerson.schema
-               }
-
-               # enable dependant schemas: cosine, inetorgperson and core
-               /^#include.*\(cosine\|inetorgperson\|core\)\.schema/{
-                       s/^#//
-               }
-       ' /etc/openldap/slapd.conf
-fi
-
-if [ -f /var/lock/subsys/ldap ]; then
-       /etc/rc.d/init.d/ldap restart >&2 || :
-fi
+%openldap_schema_register %{schemadir}/mozillaOrgPerson.schema -d 
cosine,inetorgperson,core
+%service -q ldap restart
 
 %postun
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/mozillaOrgPerson.schema 
/etc/openldap/slapd.conf; then
-               sed -i -e '
-               
/^include.*\/usr\/share\/openldap\/schema\/mozillaOrgPerson\.schema/d
-
-               # for symmetry it would be nice if we disable enabled schemas 
in post,
-               # but we really can not do that, it would break something else.
-               ' /etc/openldap/slapd.conf
-       fi
-
-       if [ -f /var/lock/subsys/ldap ]; then
-               /etc/rc.d/init.d/ldap restart >&2 || :
-       fi
+       %openldap_schema_unregister %{schemadir}/mozillaOrgPerson.schema
+       %service -q ldap restart
 fi
 
 %files
@@ -82,6 +58,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2006/06/02 21:18:50  glen
+- use %openldap_schema_{un,}register macros
+
 Revision 1.2  2005/08/27 10:04:13  qboosh
 - pl
 

================================================================
Index: SPECS/pam-pam_ldap.spec
diff -u SPECS/pam-pam_ldap.spec:1.30 SPECS/pam-pam_ldap.spec:1.31
--- SPECS/pam-pam_ldap.spec:1.30        Wed May 10 23:01:33 2006
+++ SPECS/pam-pam_ldap.spec     Fri Jun  2 23:18:50 2006
@@ -8,7 +8,6 @@
 Version:       182
 Release:       1
 Epoch:         1
-Vendor:                Luke Howard <[EMAIL PROTECTED]>
 License:       LGPL
 Group:         Base
 Source0:       http://www.padl.com/download/%{modulename}-%{version}.tar.gz
@@ -22,6 +21,7 @@
 BuildRequires: automake
 BuildRequires: openldap-devel >= 2.3.0
 BuildRequires: pam-devel
+BuildRequires: rpmbuild(macros) >= 1.304
 Obsoletes:     pam_ldap
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -95,45 +95,13 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post -n openldap-schema-pam_ldap
-if ! grep -q %{schemadir}/pam_ldap-ns.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/pam_ldap-ns.schema
-               }
-       ' /etc/openldap/slapd.conf
-fi
-if ! grep -q %{schemadir}/ns-pwd-policy.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/ns-pwd-policy.schema
-               }
-       ' /etc/openldap/slapd.conf
-fi
-
-
-if [ -f /var/lock/subsys/ldap ]; then
-       /etc/rc.d/init.d/ldap restart >&2
-fi
+%openldap_schema_register %{schemadir}/{pam_ldap-ns,ns-pwd-policy}.schema
+%service -q ldap restart
 
 %postun -n openldap-schema-pam_ldap
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/pam_ldap-ns.schema /etc/openldap/slapd.conf; 
then
-               sed -i -e '
-               /^include.*\/usr\/share\/openldap\/schema\/pam_ldap-ns.schema/d
-               ' /etc/openldap/slapd.conf
-       fi
-
-       if grep -q %{schemadir}/ns-pwd-policy.schema /etc/openldap/slapd.conf; 
then
-               sed -i -e '
-               
/^include.*\/usr\/share\/openldap\/schema\/ns-pwd-policy.schema/d
-               ' /etc/openldap/slapd.conf
-       fi
-
-       if [ -f /var/lock/subsys/ldap ]; then
-               /etc/rc.d/init.d/ldap restart >&2 || :
-       fi
+       %openldap_schema_unregister 
%{schemadir}/{pam_ldap-ns,ns-pwd-policy}.schema
+       %service -q ldap restart
 fi
 
 %files
@@ -152,6 +120,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.31  2006/06/02 21:18:50  glen
+- use %openldap_schema_{un,}register macros
+
 Revision 1.30  2006/05/10 21:01:33  hawk
 - updated to 182
 

================================================================
Index: SPECS/samba.spec
diff -u SPECS/samba.spec:1.323 SPECS/samba.spec:1.324
--- SPECS/samba.spec:1.323      Wed Apr 12 23:19:58 2006
+++ SPECS/samba.spec    Fri Jun  2 23:18:50 2006
@@ -82,7 +82,7 @@
 BuildRequires: rpm-pythonprov
 %endif
 BuildRequires: readline-devel >= 4.2
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.304
 BuildRequires: xfsprogs-devel
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
@@ -1140,33 +1140,13 @@
 fi
 
 %post -n openldap-schema-samba
-if ! grep -q %{schemadir}/samba.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/samba.schema
-               }
-
-               # enable dependant schemas: cosine(uid) 
inetorgperson(displayName) nis(gidNumber)
-               /^#include.*\(cosine\|inetorgperson\|nis\)\.schema/{
-                       s/^#//
-               }
-       ' /etc/openldap/slapd.conf
-fi
-
+# dependant schemas: cosine(uid) inetorgperson(displayName) nis(gidNumber)
+%openldap_schema_register %{schemadir}/samba.schema -d cosine,inetorgperson,nis
 %service -q ldap restart
 
 %postun -n openldap-schema-samba
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/samba.schema /etc/openldap/slapd.conf; then
-               sed -i -e '
-               /^include.*\/usr\/share\/openldap\/schema\/samba.schema/d
-
-               # for symmetry it would be nice if we disable enabled schemas 
in post,
-               # but we really can not do that, it would break something else.
-               ' /etc/openldap/slapd.conf
-       fi
-
+       %openldap_schema_unregister %{schemadir}/samba.schema
        %service -q ldap restart
 fi
 
@@ -1505,6 +1485,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.324  2006/06/02 21:18:50  glen
+- use %openldap_schema_{un,}register macros
+
 Revision 1.323  2006/04/12 21:19:58  zawadaa
 - up to 3.0.22, security - CAN_2006-1059
 - STBR
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/courier-authlib.spec?r1=1.42&r2=1.43&f=u
    
http://cvs.pld-linux.org/SPECS/evolution-data-server.spec?r1=1.75&r2=1.76&f=u
    http://cvs.pld-linux.org/SPECS/horde-turba.spec?r1=1.74&r2=1.75&f=u
    http://cvs.pld-linux.org/SPECS/horde.spec?r1=1.148&r2=1.149&f=u
    
http://cvs.pld-linux.org/SPECS/openldap-schema-mozillaorgperson.spec?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/SPECS/pam-pam_ldap.spec?r1=1.30&r2=1.31&f=u
    http://cvs.pld-linux.org/SPECS/samba.spec?r1=1.323&r2=1.324&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to