debian/0000755000000000000000000000000012213613656007173 5ustar debian/bdii.docs0000644000000000000000000000000712122507026010741 0ustar README debian/control0000644000000000000000000000166012163350314010572 0ustar Source: bdii Section: net Priority: optional Maintainer: Mattias Ellert Build-Depends: debhelper (>= 5), python Standards-Version: 3.9.4 Homepage: http://gridinfo.web.cern.ch/ Vcs-Browser: http://svn.nordugrid.org/trac/packaging/browser/debian/bdii Vcs-Svn: http://svn.nordugrid.org/repos/packaging/debian/bdii Package: bdii Architecture: all Replaces: bdii4 Depends: slapd, ldap-utils, glue-schema (>= 2.0.10), whois, ucf, ${misc:Depends}, ${python:Depends} Pre-Depends: dpkg (>= 1.15.7.2~) Suggests: logrotate Description: Berkeley Database Information Index (BDII) The Berkeley Database Information Index (BDII) consists of a standard LDAP database which is updated by an external process. The update process obtains LDIF from a number of sources and merges them. It then compares this to the contents of the database and creates an LDIF file of the differences. This is then used to update the database. debian/rules0000755000000000000000000000445212213612701010246 0ustar #!/usr/bin/make -f configure: configure-stamp configure-stamp: dh_testdir touch $@ build: build-indep build-arch build-indep: build-stamp build-arch: build-stamp: configure-stamp dh_testdir touch $@ clean: dh_testdir dh_testroot rm -f debian/bdii.init rm -f debian/bdii.default rm -f build-stamp configure-stamp dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) install prefix=debian/bdii mv debian/bdii/etc/init.d/bdii debian/bdii.init mv debian/bdii/etc/sysconfig/bdii debian/bdii.default slapd_modulepath="modulepath /usr/lib/ldap" ; \ slapd_moduleload="moduleload back_hdb" ; \ sed -e "/allow bind_v2/i$${slapd_modulepath}\n$${slapd_moduleload}" \ -e "s!etc/openldap/schema!etc/ldap/schema!" \ -i debian/bdii/etc/bdii/bdii-slapd.conf \ debian/bdii/etc/bdii/bdii-top-slapd.conf sed "s/BDII_USER=.*/BDII_USER=openldap/" \ -i debian/bdii/etc/bdii/bdii.conf rmdir debian/bdii/var/run/bdii rmdir debian/bdii/var/run # Move bdii slapd config files out of /etc mkdir debian/bdii/usr/share/bdii mv debian/bdii/etc/bdii/bdii-slapd.conf debian/bdii/usr/share/bdii mv debian/bdii/etc/bdii/bdii-top-slapd.conf debian/bdii/usr/share/bdii # Move default datafile out of /var mv debian/bdii/var/lib/bdii/gip/ldif/default.ldif \ debian/bdii/usr/share/bdii ln -s /usr/share/bdii/default.ldif debian/bdii/var/lib/bdii/gip/ldif binary: binary-indep binary-arch binary-arch: binary-indep: install dh_testdir dh_testroot dh_installdocs dh_installchangelogs dh_install dh_installman dh_installinit dh_compress dh_fixperms dh_python2 dh_link dh_installdeb dh_gencontrol dh_md5sums dh_builddeb get-orig-source: if [ -r ../bdii_5.2.22.orig.tar.gz ] ; then \ echo "bdii_5.2.22.orig.tar.gz already exists." ; \ else \ if [ -d "bdii-5.2.22" ]; then \ echo "Please remove existing directory 'bdii-5.2.22'" ; \ exit -1 ; \ fi ; \ echo "Fetching upstream svn version" ; \ svn export http://svnweb.cern.ch/guest/gridinfo/bdii/tags/R_5_2_22_1 \ bdii-5.2.22 ; \ echo "Packing it up." ; \ tar -z -c -f ../bdii_5.2.22.orig.tar.gz bdii-5.2.22 ; \ echo "Cleaning up." ; \ rm -rf bdii-5.2.22 ; \ fi .PHONY: binary binary-arch binary-indep build build-arch build-indep clean configure get-orig-source install debian/copyright0000644000000000000000000000205312120446017011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: bdii Source: http://svnweb.cern.ch/guest/gridinfo/bdii/ Files: * Copyright: © 2004, Members of the EGEE Collaboration as defined on http://www.eu-egee.org/partners License: Apache-2.0 Files: debian/* Copyright: © 2010-2013, Mattias Ellert License: Apache-2.0 License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . On Debian and Ubuntu systems the Apache license is available on /usr/share/common-licenses/Apache-2.0. debian/bdii.preinst0000644000000000000000000000066012024446516011511 0ustar #!/bin/sh set -e # Old versions with slapd configs listed in conffiles dpkg-maintscript-helper rm_conffile \ /etc/bdii/bdii-slapd.conf 5.2.5-2+wheezy1~ bdii -- "$@" dpkg-maintscript-helper rm_conffile \ /etc/bdii/bdii-top-slapd.conf 5.2.5-2+wheezy1~ bdii -- "$@" # Remove obsolete cron script left behind by dpkg dpkg-maintscript-helper rm_conffile \ /etc/cron.d/bdii-proxy 5.2.5-2+wheezy1~ bdii -- "$@" #DEBHELPER# debian/compat0000644000000000000000000000000211575652226010377 0ustar 5 debian/bdii.postinst0000644000000000000000000000445212121626714011711 0ustar #!/bin/sh set -e confhandler () { conffile=$1 template=$2 if [ -r $conffile ] ; then pwd=`grep '^rootpw ' $conffile | head -1 | sed 's/rootpw *//'` fi if [ -z "$pwd" -o "$pwd" = "secret" ] ; then pwd=`mkpasswd -s 0 | tr '/' 'x'` fi tempfile=`mktemp` sed "s/\(rootpw *\)secret/\1$pwd/" $template > $tempfile ucf $tempfile $conffile rm $tempfile chown openldap:openldap $conffile } if [ "$1" = "configure" ] ; then confhandler /etc/bdii/bdii-slapd.conf /usr/share/bdii/bdii-slapd.conf confhandler /etc/bdii/bdii-top-slapd.conf /usr/share/bdii/bdii-top-slapd.conf chown openldap:openldap /var/lib/bdii chown openldap:openldap /var/lib/bdii/gip chown openldap:openldap /var/lib/bdii/gip/ldif chown openldap:openldap /var/lib/bdii/gip/provider chown openldap:openldap /var/lib/bdii/gip/plugin chown openldap:openldap /var/log/bdii fi # Old versions with slapd configs listed in conffiles dpkg-maintscript-helper rm_conffile \ /etc/bdii/bdii-slapd.conf 5.2.5-2+wheezy1~ bdii -- "$@" dpkg-maintscript-helper rm_conffile \ /etc/bdii/bdii-top-slapd.conf 5.2.5-2+wheezy1~ bdii -- "$@" # Remove obsolete cron script left behind by dpkg dpkg-maintscript-helper rm_conffile \ /etc/cron.d/bdii-proxy 5.2.5-2+wheezy1~ bdii -- "$@" if [ "$1" = "configure" ] ; then APP_PROFILE=/etc/apparmor.d/usr.sbin.slapd LOCAL_APP_PROFILE=/etc/apparmor.d/local/usr.sbin.slapd if [ ! -r "$LOCAL_APP_PROFILE" ] ; then # Create the local profile if it does not yet exist tmp=`mktemp` cat < "$tmp" # Site-specific additions and overrides for usr.sbin.slapd. # For more details, please see /etc/apparmor.d/local/README. EOM mkdir -p `dirname $LOCAL_APP_PROFILE` 2>/dev/null || true mv -f "$tmp" "$LOCAL_APP_PROFILE" chmod 644 "$LOCAL_APP_PROFILE" fi grep -q "AppArmor profile for bdii" "$LOCAL_APP_PROFILE" || \ cat <> "$LOCAL_APP_PROFILE" # AppArmor profile for bdii START #include /etc/bdii/* r, /var/lib/bdii/db/** rwk, /{,var/}run/bdii/db/* w, # AppArmor profile for bdii END EOM if [ -r "$APP_PROFILE" ] ; then # Reload the profile if aa-status --enabled 2>/dev/null ; then apparmor_parser -r -T -W "$APP_PROFILE" || true fi fi fi #DEBHELPER# debian/patches/0000755000000000000000000000000012024446153010616 5ustar debian/patches/series0000644000000000000000000000007412024442606012033 0ustar # Use debian defaults in the init script bdii-default.patch debian/patches/bdii-default.patch0000644000000000000000000000564512041726633014205 0ustar diff -ur bdii-5.2.13.orig/etc/init.d/bdii bdii-5.2.13/etc/init.d/bdii --- bdii-5.2.13.orig/etc/init.d/bdii 2012-08-15 15:08:26.000000000 +0200 +++ bdii-5.2.13/etc/init.d/bdii 2012-10-24 10:56:38.545657608 +0200 @@ -2,7 +2,7 @@ # # BDII system startup script # $Id: bdii,v 1.9 2009/06/18 14:26:52 lfield Exp $ -# chkconfig: - 95 5 +# chkconfig: 2345 95 5 # description: BDII Service # config: /etc/bdii/bdii.conf @@ -10,31 +10,20 @@ # Provides: bdii # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog -# Default-Stop: 0 1 2 3 4 5 6 +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 # Short-Description: BDII # Description: Berkeley Database Information Index ### END INIT INFO shopt -s expand_aliases -if [ -f /etc/init.d/functions ]; then - . /etc/init.d/functions +if [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions else - echo "Error: Cannot source /etc/init.d/functions" + echo "Error: Cannot source /lib/lsb/init-functions" fi -log_success_msg () -{ - success - echo -} - -log_failure_msg() -{ - failure - echo -} - prog=bdii # Debian does not have /var/lock/subsys @@ -123,21 +112,26 @@ mkdir -p ${SLAPD_DB_DIR}/grid mkdir -p ${BDII_VAR_DIR}/archive - chown -R ${BDII_USER}:${BDII_USER} ${BDII_VAR_DIR} - chown -R ${BDII_USER}:${BDII_USER} ${SLAPD_DB_DIR} - [ -x /sbin/restorecon ] && /sbin/restorecon -R ${BDII_VAR_DIR} + chown ${BDII_USER}:${BDII_USER} ${BDII_VAR_DIR} + chown ${BDII_USER}:${BDII_USER} ${BDII_VAR_DIR}/archive + chown ${BDII_USER}:${BDII_USER} ${SLAPD_DB_DIR} + chown ${BDII_USER}:${BDII_USER} ${SLAPD_DB_DIR}/stats + chown ${BDII_USER}:${BDII_USER} ${SLAPD_DB_DIR}/glue + chown ${BDII_USER}:${BDII_USER} ${SLAPD_DB_DIR}/grid + [ -x /sbin/restorecon ] && /sbin/restorecon -R ${SLAPD_DB_DIR} mkdir -p /var/run/bdii/db - chown -R ${BDII_USER}:${BDII_USER} /var/run/bdii + chown ${BDII_USER}:${BDII_USER} /var/run/bdii + chown ${BDII_USER}:${BDII_USER} /var/run/bdii/db [ -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}/glue/* 2>/dev/null" $RUNUSER -s /bin/sh ${BDII_USER} -c "rm -f ${SLAPD_DB_DIR}/grid/* 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 "ln -sf ${DB_CONFIG} ${SLAPD_DB_DIR}/grid/" $RUNUSER -s /bin/sh ${BDII_USER} -c "ln -sf ${DB_CONFIG} ${SLAPD_DB_DIR}/stats/" $RUNUSER -s /bin/sh ${BDII_USER} -c "ln -sf ${DB_CONFIG} ${SLAPD_DB_DIR}/glue/" + $RUNUSER -s /bin/sh ${BDII_USER} -c "ln -sf ${DB_CONFIG} ${SLAPD_DB_DIR}/grid/" if [ ${SLAPD_CONF} = "/etc/bdii/bdii-top-slapd.conf" ] ; then $RUNUSER -s /bin/sh ${BDII_USER} -c "ln -sf ${DB_CONFIG}_top ${SLAPD_DB_DIR}/grid/DB_CONFIG" debian/changelog0000644000000000000000000001072612213613450011043 0ustar bdii (5.2.22-1) unstable; urgency=low * New upstream version 5.2.22 -- Mattias Ellert Tue, 10 Sep 2013 14:56:47 +0200 bdii (5.2.21-1) unstable; urgency=low * New upstream version 5.2.21 -- Mattias Ellert Tue, 13 Aug 2013 16:38:57 +0200 bdii (5.2.20-1) unstable; urgency=low * New upstream version 5.2.20 -- Mattias Ellert Fri, 28 Jun 2013 20:02:24 +0200 bdii (5.2.17-4) unstable; urgency=low * Improve purging - fixes piuparts warnings * Update Homepage URL -- Mattias Ellert Wed, 20 Mar 2013 15:52:48 +0100 bdii (5.2.17-3) unstable; urgency=low * Add missing -p flag to mkdir in postinst script (Closes: #703171) -- Mattias Ellert Mon, 18 Mar 2013 16:04:40 +0100 bdii (5.2.17-2) unstable; urgency=low * Depend on glue-schema >= 2.0.10 -- Mattias Ellert Thu, 14 Mar 2013 23:12:47 +0100 bdii (5.2.17-1) unstable; urgency=low * New upstream release * Add apparmor profile modification (LP: #1045295, #1154056) -- Mattias Ellert Thu, 14 Mar 2013 14:29:59 +0100 bdii (5.2.13-2) unstable; urgency=low * Don't use recursive chown * Don't install files in /var -- Mattias Ellert Wed, 24 Oct 2012 09:32:39 +0200 bdii (5.2.13-1) unstable; urgency=low * New upstream release * Use ucf to keep track of conf file changes (Closes: #687534) -- Mattias Ellert Thu, 13 Sep 2012 22:44:51 +0200 bdii (5.2.12-2) unstable; urgency=low * Use dpkg-maintscript-helper to remove configuration files -- Mattias Ellert Tue, 31 Jul 2012 13:34:43 +0200 bdii (5.2.12-1) unstable; urgency=high * New upstream release * Move bdii slapd config files out of /etc (Closes: #663444) * Urgency high due to fixing RC bug -- Mattias Ellert Sat, 28 Jul 2012 11:35:19 +0200 bdii (5.2.5-2) unstable; urgency=low * Remove obsolete cron script left behind by dpkg (Closes: #642589) -- Mattias Ellert Tue, 27 Sep 2011 07:44:09 +0200 bdii (5.2.5-1) unstable; urgency=low * New upstream release (Closes: #630493) -- Mattias Ellert Sun, 04 Sep 2011 19:58:45 +0200 bdii (5.2.4-1) unstable; urgency=low * New upstream release * Drop patch accepted upstream: bdii-mdsvo.patch * Move large files away from /var/run in order not to fill /run partition -- Mattias Ellert Mon, 15 Aug 2011 09:08:56 +0200 bdii (5.2.3-2) unstable; urgency=low * Revert upstream hack that breaks ARC infosys -- Mattias Ellert Mon, 27 Jun 2011 12:04:04 +0200 bdii (5.2.3-1) unstable; urgency=low * New upstream release * Drop patches accepted upstream: bdii-paths.patch, bdii-runuser.patch, bdii-context.patch, bdii-shadowerr.patch, bdii-sysconfig.patch -- Mattias Ellert Tue, 14 Jun 2011 11:09:13 +0200 bdii (5.1.13-1) unstable; urgency=low * New upstream release -- Mattias Ellert Sat, 01 Jan 2011 21:29:30 +0100 bdii (5.1.9-1) unstable; urgency=low * New upstream release -- Mattias Ellert Thu, 23 Sep 2010 19:46:28 +0200 bdii (5.1.8-2) unstable; urgency=low * Forgot to update the get-orig-source script -- Mattias Ellert Mon, 06 Sep 2010 20:15:29 +0200 bdii (5.1.8-1) unstable; urgency=low * New upstream release -- Mattias Ellert Thu, 02 Sep 2010 14:15:40 +0200 bdii (5.1.7-1) unstable; urgency=low * New upstream release -- Mattias Ellert Sat, 19 Jun 2010 02:45:47 +0200 bdii (5.0.8+460-1) unstable; urgency=low * Update - svn revision 436 (Closes: #571732) -- Mattias Ellert Thu, 25 Mar 2010 11:42:52 +0100 bdii (5.0.8+443-1) UNRELEASED; urgency=low * Updated packaging etc - svn revision 443 -- Daniel Johansson Thu, 25 Feb 2010 16:58:51 +0100 bdii (5.0.8+436-1) UNRELEASED; urgency=low * Update - svn revision 436 -- Mattias Ellert Wed, 24 Feb 2010 09:07:50 +0100 bdii (5.0.8+375-1) UNRELEASED; urgency=low * Initial release - svn revision 375 -- Mattias Ellert Mon, 08 Feb 2010 16:27:40 +0100 debian/bdii.postrm0000644000000000000000000000255212122445140011342 0ustar #!/bin/sh set -e if [ "$1" = "purge" ] ; then rm -f /etc/bdii/bdii-slapd.conf ucf --purge /etc/bdii/bdii-slapd.conf || : rm -f /etc/bdii/bdii-top-slapd.conf ucf --purge /etc/bdii/bdii-top-slapd.conf || : fi # Old versions with slapd configs listed in conffiles dpkg-maintscript-helper rm_conffile \ /etc/bdii/bdii-slapd.conf 5.2.5-2+wheezy1~ bdii -- "$@" dpkg-maintscript-helper rm_conffile \ /etc/bdii/bdii-top-slapd.conf 5.2.5-2+wheezy1~ bdii -- "$@" # Remove obsolete cron script left behind by dpkg dpkg-maintscript-helper rm_conffile \ /etc/cron.d/bdii-proxy 5.2.5-2+wheezy1~ bdii -- "$@" #DEBHELPER# if [ "$1" = "purge" ] ; then APP_PROFILE=/etc/apparmor.d/usr.sbin.slapd LOCAL_APP_PROFILE=/etc/apparmor.d/local/usr.sbin.slapd if [ -r "$LOCAL_APP_PROFILE" ] ; then sed '/# AppArmor profile for bdii START/,/# AppArmor profile for bdii END/d' -i "$LOCAL_APP_PROFILE" fi if [ ! -r "$APP_PROFILE" ] ; then if [ -r "$LOCAL_APP_PROFILE" ] ; then if [ -z "`sed '/^#/d' $LOCAL_APP_PROFILE`" ] ; then rm -f "$LOCAL_APP_PROFILE" || true fi fi rmdir /etc/apparmor.d/local 2>/dev/null || true rmdir /etc/apparmor.d 2>/dev/null || true fi if [ -r "$APP_PROFILE" ] ; then # Reload the profile if aa-status --enabled 2>/dev/null ; then apparmor_parser -r -T -W "$APP_PROFILE" || true fi fi fi debian/source/0000755000000000000000000000000011774541333010476 5ustar debian/source/format0000644000000000000000000000001411575652226011707 0ustar 3.0 (quilt)