[bdii] New upstream version 5.2.4 Drop patch accepted upstream: bdii-mdsvo.patch Move large files away from
Mattias Ellert
ellert at fedoraproject.org
Mon Aug 15 09:37:14 UTC 2011
commit ab650ea8d633c87b9e362ba4f1c9e572c2a91c28
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date: Mon Aug 15 11:29:26 2011 +0200
New upstream version 5.2.4
Drop patch accepted upstream: bdii-mdsvo.patch
Move large files away from /var/run in order not to fill up /run partition
.gitignore | 2 +-
bdii-mdsvo.patch | 12 ---
bdii-run-full.patch | 229 +++++++++++++++++++++++++++++++++++++++++++++++++++
bdii.spec | 29 ++++--
sources | 2 +-
5 files changed, 250 insertions(+), 24 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4b399e6..f6a3a77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/bdii-5.2.3.tar.gz
+/*.tar.gz
diff --git a/bdii-run-full.patch b/bdii-run-full.patch
new file mode 100644
index 0000000..8dfb439
--- /dev/null
+++ b/bdii-run-full.patch
@@ -0,0 +1,229 @@
+diff -ur bdii-5.2.4.orig/bin/bdii-update bdii-5.2.4/bin/bdii-update
+--- bdii-5.2.4.orig/bin/bdii-update 2011-07-26 18:54:26.104512037 +0200
++++ bdii-5.2.4/bin/bdii-update 2011-08-15 10:30:23.888614060 +0200
+@@ -74,6 +74,9 @@
+ if ( not config.has_key('BDII_DAEMON') ):
+ config['BDII_DAEMON'] = False
+
++ if ( not config.has_key('BDII_PID_FILE') ):
++ config['BDII_PID_FILE'] = '/var/run/bdii/bdii-update.pid'
++
+ for parameter in ['BDII_LOG_FILE', 'BDII_LOG_LEVEL', 'BDII_LDIF_DIR',
+ 'BDII_PROVIDER_DIR', 'BDII_PLUGIN_DIR',
+ 'BDII_READ_TIMEOUT']:
+@@ -176,7 +179,7 @@
+ sys.stderr = os.fdopen(2, 'a', 0)
+
+ # Write PID
+- pid_file = open("%s/bdii-update.pid" % (config['BDII_VAR_DIR']),'w')
++ pid_file = open(config['BDII_PID_FILE'],'w')
+ pid_file.write("%s\n" % (str(os.getpid())))
+ pid_file.close()
+
+diff -ur bdii-5.2.4.orig/etc/bdii.conf bdii-5.2.4/etc/bdii.conf
+--- bdii-5.2.4.orig/etc/bdii.conf 2011-07-26 18:54:26.119511842 +0200
++++ bdii-5.2.4/etc/bdii.conf 2011-08-15 10:30:23.889614047 +0200
+@@ -1,4 +1,5 @@
+ BDII_LOG_FILE=/var/log/bdii/bdii-update.log
++BDII_PID_FILE=/var/run/bdii/bdii-update.pid
+ BDII_LOG_LEVEL=ERROR
+ BDII_LDIF_DIR=/var/lib/bdii/gip/ldif
+ BDII_PROVIDER_DIR=/var/lib/bdii/gip/provider
+@@ -9,4 +10,4 @@
+ BDII_ARCHIVE_SIZE=0
+ BDII_DELETE_DELAY=0
+ BDII_USER=ldap
+-BDII_VAR_DIR=/var/run/bdii
++BDII_VAR_DIR=/var/lib/bdii
+diff -ur bdii-5.2.4.orig/etc/bdii-slapd.conf bdii-5.2.4/etc/bdii-slapd.conf
+--- bdii-5.2.4.orig/etc/bdii-slapd.conf 2011-07-26 18:54:26.119511842 +0200
++++ bdii-5.2.4/etc/bdii-slapd.conf 2011-08-15 10:30:23.889614047 +0200
+@@ -13,23 +13,23 @@
+
+ pidfile /var/run/bdii/db/slapd.pid
+ argsfile /var/run/bdii/db/slapd.args
+-loglevel 0
++loglevel 0
+ idletimeout 120
+ sizelimit unlimited
+ timelimit 2400
+
+ #######################################################################
+-# bdb database definitions
++# hdb database definitions
+ #######################################################################
+
+ database hdb
+ cachesize 150000
+ dbnosync
+ suffix "o=grid"
+-checkpoint 131072 60
++checkpoint 131072 60
+ rootdn "o=grid"
+ rootpw secret
+-directory /var/run/bdii/db
++directory /var/lib/bdii/db
+
+ index GlueCEAccessControlBaseRule eq
+ index GlueCESEBindCEUniqueID eq
+@@ -61,7 +61,7 @@
+ suffix "o=glue"
+ rootdn "o=glue"
+ rootpw secret
+-directory /var/run/bdii/db/glue2
++directory /var/lib/bdii/db/glue2
+
+ index GLUE2GroupID eq
+ index GLUE2ExtensionLocalID eq
+@@ -91,8 +91,8 @@
+ cachesize 60
+ dbnosync
+ suffix "o=infosys"
+-checkpoint 131072 60
++checkpoint 131072 60
+ rootdn "o=infosys"
+ rootpw secret
+-directory /var/run/bdii/db/stats
++directory /var/lib/bdii/db/stats
+
+diff -ur bdii-5.2.4.orig/etc/bdii-top-slapd.conf bdii-5.2.4/etc/bdii-top-slapd.conf
+--- bdii-5.2.4.orig/etc/bdii-top-slapd.conf 2011-07-26 18:54:26.119511842 +0200
++++ bdii-5.2.4/etc/bdii-top-slapd.conf 2011-08-15 10:30:23.890614034 +0200
+@@ -13,7 +13,7 @@
+
+ pidfile /var/run/bdii/db/slapd.pid
+ argsfile /var/run/bdii/db/slapd.args
+-loglevel 0
++loglevel 0
+ idletimeout 120
+ sizelimit unlimited
+ timelimit 2400
+@@ -28,13 +28,13 @@
+ database hdb
+ cachesize 300000
+ dncachesize 600000
+-idlcachesize 900000
++idlcachesize 900000
+ dbnosync
+ suffix "o=shadow"
+-checkpoint 1024 10
++checkpoint 1024 10
+ rootdn "o=shadow"
+ rootpw secret
+-directory /var/run/bdii/db
++directory /var/lib/bdii/db
+
+ index GlueCEAccessControlBaseRule eq
+ index GlueCESEBindCEUniqueID eq
+@@ -75,10 +75,10 @@
+ idlcachesize 30000
+ dbnosync
+ suffix "o=glue"
+-checkpoint 1024 10
++checkpoint 1024 10
+ rootdn "o=glue"
+ rootpw secret
+-directory /var/run/bdii/db/glue2
++directory /var/lib/bdii/db/glue2
+
+ index GLUE2GroupID eq
+ index GLUE2ExtensionLocalID eq
+@@ -110,8 +110,8 @@
+ idlcachesize 3000
+ dbnosync
+ suffix "o=infosys"
+-checkpoint 1024 10
++checkpoint 1024 10
+ rootdn "o=infosys"
+ rootpw secret
+-directory /var/run/bdii/db/stats
++directory /var/lib/bdii/db/stats
+
+diff -ur bdii-5.2.4.orig/etc/init.d/bdii bdii-5.2.4/etc/init.d/bdii
+--- bdii-5.2.4.orig/etc/init.d/bdii 2011-08-15 07:54:41.137960054 +0200
++++ bdii-5.2.4/etc/init.d/bdii 2011-08-15 10:30:23.891614021 +0200
+@@ -37,7 +37,15 @@
+ }
+
+ prog=bdii
+-lockfile=/var/lock/subsys/$prog
++
++# Debian does not have /var/lock/subsys
++if [ -d /var/lock/subsys ] ; then
++ LOCK_DIR=/var/lock/subsys
++else
++ LOCK_DIR=/var/lock
++fi
++
++lockfile=${LOCK_DIR}/$prog
+
+ RUN=yes
+
+@@ -60,11 +68,11 @@
+ . "${BDII_CONF}"
+ fi
+
+-UPDATE_LOCK_FILE=${UPDATE_LOCK_FILE:-/var/lock/subsys/bdii-update}
+-SLAPD_LOCK_FILE=${SLAPD_LOCK_FILE:-/var/lock/subsys/bdii-slapd}
+-UPDATE_PID_FILE=${PID_FILE:-/var/run/bdii-update.pid}
++UPDATE_LOCK_FILE=${UPDATE_LOCK_FILE:-${LOCK_DIR}/bdii-update}
++SLAPD_LOCK_FILE=${SLAPD_LOCK_FILE:-${LOCK_DIR}/bdii-slapd}
++UPDATE_PID_FILE=${BDII_PID_FILE:-/var/run/bdii/bdii-update.pid}
+ BDII_USER=${BDII_USER:-ldap}
+-BDII_VAR_DIR=${BDII_VAR_DIR:-/var/run/bdii}
++BDII_VAR_DIR=${BDII_VAR_DIR:-/var/lib/bdii}
+ BDII_UPDATE=${BDII_UPDATE:-/usr/sbin/bdii-update}
+ BDII_PROXY=${BDII_PROXY:-/usr/sbin/bdii-proxy}
+ SLAPD=${SLAPD:-/usr/sbin/slapd}
+@@ -72,7 +80,7 @@
+ SLAPD_HOST=${SLAPD_HOST:-0.0.0.0}
+ SLAPD_PORT=${SLAPD_PORT:-2170}
+ SLAPD_DB_DIR=${SLAPD_DB_DIR:-$BDII_VAR_DIR/db}
+-SLAPD_PID_FILE=${SLAPD_PID_FILE:-$SLAPD_DB_DIR/slapd.pid}
++SLAPD_PID_FILE=${SLAPD_PID_FILE:-/var/run/bdii/db/slapd.pid}
+ DB_CONFIG=${DB_CONFIG:-/etc/bdii/DB_CONFIG}
+
+ if [ -x /sbin/runuser ] ; then
+@@ -107,19 +115,20 @@
+ #Initialize the database directory.
+ mkdir -p ${SLAPD_DB_DIR}/stats
+ mkdir -p ${SLAPD_DB_DIR}/glue2
++ chown -R ${BDII_USER}:${BDII_USER} ${SLAPD_DB_DIR}
++ [ -x /sbin/restorecon ] && /sbin/restorecon -R ${SLAPD_DB_DIR}
+ mkdir -p ${BDII_VAR_DIR}/archive
+- mkdir -p /var/lock/subsys
+ chown -R ${BDII_USER}:${BDII_USER} ${BDII_VAR_DIR}
+- [ -x /sbin/restorecon ] && /sbin/restorecon -R ${BDII_VAR_DIR}
+- chown -R ${BDII_USER}:${BDII_USER} ${SLAPD_DB_DIR}
++ mkdir -p /var/run/bdii/db
++ chown -R ${BDII_USER}:${BDII_USER} /var/run/bdii
++ [ -x /sbin/restorecon ] && /sbin/restorecon -R /var/run/bdii/db
+ $RUNUSER -s /bin/sh ${BDII_USER} -c "rm -f ${SLAPD_DB_DIR}/stats/* 2>/dev/null"
+ $RUNUSER -s /bin/sh ${BDII_USER} -c "rm -f ${SLAPD_DB_DIR}/glue2/* 2>/dev/null"
+ $RUNUSER -s /bin/sh ${BDII_USER} -c "rm -f ${SLAPD_DB_DIR}/* 2>/dev/null"
+ $RUNUSER -s /bin/sh ${BDII_USER} -c "rm -f ${BDII_VAR_DIR}/old.ldif 2>/dev/null"
+ $RUNUSER -s /bin/sh ${BDII_USER} -c "cp ${DB_CONFIG} ${SLAPD_DB_DIR}"
+- $RUNUSER -s /bin/sh ${BDII_USER} -c "cp ${DB_CONFIG} ${SLAPD_DB_DIR}/stats/"
+- $RUNUSER -s /bin/sh ${BDII_USER} -c "cp ${DB_CONFIG} ${SLAPD_DB_DIR}/glue2/"
+-
++ $RUNUSER -s /bin/sh ${BDII_USER} -c "cp ${DB_CONFIG} ${SLAPD_DB_DIR}/stats"
++ $RUNUSER -s /bin/sh ${BDII_USER} -c "cp ${DB_CONFIG} ${SLAPD_DB_DIR}/glue2"
+
+ echo -n "Starting BDII slapd: "
+ COMMAND="${SLAPD} -f ${SLAPD_CONF} -h ldap://${SLAPD_HOST}:${SLAPD_PORT} -u ${BDII_USER}"
+@@ -152,13 +161,10 @@
+ $RUNUSER -s /bin/sh ${BDII_USER} -c "${BDII_UPDATE} -c ${BDII_CONF} -d"
+ touch ${UPDATE_LOCK_FILE}
+
+- if [ ! -f ${BDII_VAR_DIR}/bdii-update.pid ]; then
++ if [ ! -f ${UPDATE_PID_FILE} ]; then
+ sleep 2
+ fi
+- if [ -f ${BDII_VAR_DIR}/bdii-update.pid ]; then
+- touch ${UPDATE_PID_FILE}
+- chown ${BDII_USER} ${UPDATE_PID_FILE}
+- mv ${BDII_VAR_DIR}/bdii-update.pid ${UPDATE_PID_FILE}
++ if [ -f ${UPDATE_PID_FILE} ]; then
+ ps $(cat ${UPDATE_PID_FILE}) >/dev/null 2>&1
+ RETVAL=$?
+ else
diff --git a/bdii.spec b/bdii.spec
index 9c3833f..4516ecb 100644
--- a/bdii.spec
+++ b/bdii.spec
@@ -1,19 +1,19 @@
Name: bdii
-Version: 5.2.3
-Release: 2%{?dist}
+Version: 5.2.4
+Release: 1%{?dist}
Summary: The Berkeley Database Information Index (BDII)
Group: System Environment/Daemons
License: ASL 2.0
URL: https://twiki.cern.ch/twiki/bin/view/EGEE/BDII
# The source tarball is created from a svn checkout:
-# svn co http://svnweb.cern.ch/guest/gridinfo/bdii/tags/R_5_2_3 bdii-5.2.3
-# tar -z -c --exclude .svn -f bdii-5.2.3.tar.gz bdii-5.2.3
+# svn co http://svnweb.cern.ch/guest/gridinfo/bdii/tags/R_5_2_4 bdii-5.2.4
+# tar -z -c --exclude .svn -f bdii-5.2.4.tar.gz bdii-5.2.4
Source: %{name}-%{version}.tar.gz
# Remove lsb dependency
Patch0: %{name}-init.patch
-# Revert upstream hack that breaks ARC infosys
-Patch1: %{name}-mdsvo.patch
+# Move large files away from /var/run in order not to fill /run
+Patch1: %{name}-run-full.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -87,7 +87,10 @@ sed "s/\(rootpw *\)secret/\1$(mkpasswd -s 0 | tr '/' 'x')/" \
/sbin/chkconfig --add %{name}
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
semanage port -a -t ldap_port_t -p tcp 2170 2>/dev/null || :
-semanage fcontext -a -t slapd_db_t "%{_localstatedir}/run/%{name}(/.*)?" 2>/dev/null || :
+semanage fcontext -a -t slapd_db_t "%{_localstatedir}/lib/%{name}/db(/.*)?" 2>/dev/null || :
+semanage fcontext -a -t slapd_var_run_t "%{_localstatedir}/run/%{name}/db(/.*)?" 2>/dev/null || :
+# Remove selinux labels for old bdii var dir
+semanage fcontext -d -t slapd_db_t "%{_localstatedir}/run/%{name}(/.*)?" 2>/dev/null || :
%endif
%preun
@@ -103,7 +106,8 @@ fi
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
if [ $1 -eq 0 ]; then
semanage port -d -t ldap_port_t -p tcp 2170 2>/dev/null || :
- semanage fcontext -d -t slapd_db_t "%{_localstatedir}/run/%{name}(/.*)?" 2>/dev/null || :
+ semanage fcontext -d -t slapd_db_t "%{_localstatedir}/lib/%{name}/db(/.*)?" 2>/dev/null || :
+ semanage fcontext -d -t slapd_var_run_t "%{_localstatedir}/run/%{name}/db(/.*)?" 2>/dev/null || :
fi
%endif
@@ -115,8 +119,8 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/DB_CONFIG
%config(noreplace) %{_sysconfdir}/%{name}/bdii.conf
%config(noreplace) %{_sysconfdir}/%{name}/BDII.schema
-%attr(-,ldap,ldap) %config(noreplace) %{_sysconfdir}/%{name}/bdii-slapd.conf
-%attr(-,ldap,ldap) %config(noreplace) %{_sysconfdir}/%{name}/bdii-top-slapd.conf
+%attr(-,ldap,ldap) %config %{_sysconfdir}/%{name}/bdii-slapd.conf
+%attr(-,ldap,ldap) %config %{_sysconfdir}/%{name}/bdii-top-slapd.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/cron.d/bdii-proxy
@@ -126,6 +130,11 @@ fi
%doc copyright
%changelog
+* Tue Jul 26 2011 Mattias Ellert <mattias.ellert at fysast.uu.se> - 5.2.4-1
+- New upstream version 5.2.4
+- Drop patch accepted upstream: bdii-mdsvo.patch
+- Move large files away from /var/run in order not to fill up /run partition
+
* Mon Jun 27 2011 Mattias Ellert <mattias.ellert at fysast.uu.se> - 5.2.3-2
- Revert upstream hack that breaks ARC infosys
diff --git a/sources b/sources
index 7a4ac8f..29eb776 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-46dd0d7433cf7cf3957c22e50b28d720 bdii-5.2.3.tar.gz
+7fb4406bf8787e7b9e20d3fc25f6d20d bdii-5.2.4.tar.gz
More information about the scm-commits
mailing list