[Pkg-fedora-ds-maintainers] 389-ds-base: Changes to 'master'
Timo Aaltonen
tjaalton at moszumanska.debian.org
Thu Mar 17 06:19:27 UTC 2016
debian/389-ds-base.dirsrv.init | 162 --------------------------------------
debian/389-ds-base.postinst | 3
debian/389-ds-base.postrm | 1
debian/changelog | 11 ++
debian/patches/series | 1
debian/patches/use-perl-move.diff | 58 +++++++++++++
debian/rules | 4
7 files changed, 75 insertions(+), 165 deletions(-)
New commits:
commit f3f1c4c6177b8b74c53286094268e2eda19ce319
Author: Timo Aaltonen <tjaalton at debian.org>
Date: Thu Mar 17 08:13:52 2016 +0200
releasing package 389-ds-base version 1.3.4.8-2
diff --git a/debian/changelog b/debian/changelog
index b5a2915..74fd0b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-389-ds-base (1.3.4.8-2) UNRELEASED; urgency=medium
+389-ds-base (1.3.4.8-2) unstable; urgency=medium
* postinst: Silence ls and adduser.
* Drop the init file, we depend on systemd anyway.
@@ -7,7 +7,7 @@
* user-perl-move.diff: Use move instead of rename during upgrade.
(Closes: #775550)
- -- Timo Aaltonen <tjaalton at debian.org> Thu, 17 Mar 2016 07:15:06 +0200
+ -- Timo Aaltonen <tjaalton at debian.org> Thu, 17 Mar 2016 08:13:38 +0200
389-ds-base (1.3.4.8-1) unstable; urgency=medium
commit 26de66b5488f9d0ad0453b8474065bee3943be5d
Author: Timo Aaltonen <tjaalton at debian.org>
Date: Thu Mar 17 08:13:33 2016 +0200
user-perl-move.diff: Use move instead of rename during upgrade. (Closes: #775550)
diff --git a/debian/changelog b/debian/changelog
index 66050a9..b5a2915 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@
* Drop the init file, we depend on systemd anyway.
* rules: Don't enable dirsrv-snmp.service by default.
* postrm: Clean up /var/lib/dirsrv/scripts-* on purge.
+ * user-perl-move.diff: Use move instead of rename during upgrade.
+ (Closes: #775550)
-- Timo Aaltonen <tjaalton at debian.org> Thu, 17 Mar 2016 07:15:06 +0200
diff --git a/debian/patches/series b/debian/patches/series
index f2b5082..55f8505 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ fix-obsolete-target.diff
fix-saslpath.diff
reproducible-build.diff
fix-systemctl-path.diff
+use-perl-move.diff
diff --git a/debian/patches/use-perl-move.diff b/debian/patches/use-perl-move.diff
new file mode 100644
index 0000000..9542581
--- /dev/null
+++ b/debian/patches/use-perl-move.diff
@@ -0,0 +1,58 @@
+--- a/ldap/admin/src/scripts/60upgradeconfigfiles.pl
++++ b/ldap/admin/src/scripts/60upgradeconfigfiles.pl
+@@ -31,7 +31,7 @@ sub runinst {
+ next if (! -f $oldname); # does not exist - skip - already (re)moved
+ my $newname = "$bakdir/$file";
+ $! = 0; # clear
+- rename $oldname, $newname;
++ move $oldname, $newname;
+ if ($!) {
+ push @errs, ["error_renaming_config", $oldname, $newname, $!];
+ }
+@@ -57,7 +57,7 @@ sub runinst {
+ next if (! -f $oldname); # does not exist - not backed up
+ my $newname = $inf->{slapd}->{config_dir} . "/" . $file;
+ next if (-f $newname); # not removed
+- rename $oldname, $newname;
++ move $oldname, $newname;
+ }
+ return @errs;
+ }
+diff --git a/ldap/admin/src/scripts/60upgradeschemafiles.pl b/ldap/admin/src/scripts/60upgradeschemafiles.pl
+index 5a2c019..ef13e24 100644
+--- a/ldap/admin/src/scripts/60upgradeschemafiles.pl
++++ b/ldap/admin/src/scripts/60upgradeschemafiles.pl
+@@ -39,7 +39,7 @@ sub runinst {
+ next if (! -f $oldname); # does not exist - skip - already (re)moved
+ my $newname = "$bakdir/$file";
+ $! = 0; # clear
+- rename $oldname, $newname;
++ move $oldname, $newname;
+ if ($!) {
+ push @errs, ["error_renaming_schema", $oldname, $newname, $!];
+ }
+@@ -140,7 +140,7 @@ sub runinst {
+
+ # Backup the original 99user.ldif
+ $! = 0; # clear
+- rename $inf->{slapd}->{schema_dir} . "/99user.ldif", "$bakdir/99user.ldif";
++ move $inf->{slapd}->{schema_dir} . "/99user.ldif", "$bakdir/99user.ldif";
+ if ($!) {
+ push @errs, ["error_renaming_schema", $inf->{slapd}->{schema_dir} . "/99user.ldif", "$bakdir/99user.ldif", $!];
+ }
+@@ -171,13 +171,13 @@ sub runinst {
+ next if (! -f $oldname); # does not exist - not backed up
+ my $newname = $inf->{slapd}->{schema_dir} . "/" . $file;
+ next if (-f $newname); # not removed
+- rename $oldname, $newname;
++ move $oldname, $newname;
+ }
+
+ # Restore 99user.ldif. We overwrite whatever is there since
+ # it is possible that we have modified it.
+ if (-f "$bakdir/99user.ldif") {
+- rename "$bakdir/99user.ldif", $inf->{slapd}->{schema_dir} . "/99user.ldif";
++ move "$bakdir/99user.ldif", $inf->{slapd}->{schema_dir} . "/99user.ldif";
+ }
+
+ return @errs;
commit ae5e360f529c32a818b123d554e3c9847ab16037
Author: Timo Aaltonen <tjaalton at debian.org>
Date: Thu Mar 17 07:57:30 2016 +0200
postrm: Clean up /var/lib/dirsrv/scripts-* on purge.
diff --git a/debian/389-ds-base.postrm b/debian/389-ds-base.postrm
index 01dd1a8..629db37 100644
--- a/debian/389-ds-base.postrm
+++ b/debian/389-ds-base.postrm
@@ -9,6 +9,7 @@ if [ "$1" = "purge" ]; then
deluser --system dirsrv || true
fi
rm -f /etc/systemd/system/dirsrv.target.wants/dirsrv@*.service
+ rm -rf /var/lib/dirsrv/scripts-*
fi
#DEBHELPER#
diff --git a/debian/changelog b/debian/changelog
index 8bb5738..66050a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@
* postinst: Silence ls and adduser.
* Drop the init file, we depend on systemd anyway.
* rules: Don't enable dirsrv-snmp.service by default.
+ * postrm: Clean up /var/lib/dirsrv/scripts-* on purge.
-- Timo Aaltonen <tjaalton at debian.org> Thu, 17 Mar 2016 07:15:06 +0200
commit d6de84ee44c28b188c6f967e1d623e5dcaf938cd
Author: Timo Aaltonen <tjaalton at debian.org>
Date: Thu Mar 17 07:49:13 2016 +0200
fix a whitespace typo in postinst
diff --git a/debian/389-ds-base.postinst b/debian/389-ds-base.postinst
index a46f5e3..3955570 100644
--- a/debian/389-ds-base.postinst
+++ b/debian/389-ds-base.postinst
@@ -13,7 +13,7 @@ if [ "$1" = configure ]; then
adduser --quiet --system --home /var/lib/dirsrv \
--disabled-password --group \
--gecos "389 Directory Server user" \
- --no-create-home \
+ --no-create-home \
dirsrv > $OUT
fi
commit ac57a8ea24a1e59fb80334d6b96e01bc0aca393a
Author: Timo Aaltonen <tjaalton at debian.org>
Date: Thu Mar 17 07:28:31 2016 +0200
rules: Don't enable dirsrv-snmp.service by default.
diff --git a/debian/changelog b/debian/changelog
index a96b855..8bb5738 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@
* postinst: Silence ls and adduser.
* Drop the init file, we depend on systemd anyway.
+ * rules: Don't enable dirsrv-snmp.service by default.
-- Timo Aaltonen <tjaalton at debian.org> Thu, 17 Mar 2016 07:15:06 +0200
diff --git a/debian/rules b/debian/rules
index 7318b16..c6e32d7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -85,6 +85,9 @@ override_dh_install:
dh_install --fail-missing
+override_dh_systemd_enable:
+ dh_systemd_enable -p389-ds-base --no-enable dirsrv-snmp.service
+
override_dh_strip:
dh_strip -p389-ds-base-libs --dbg-package=389-ds-base-libs-dbg
dh_strip -p389-ds-base --dbg-package=389-ds-base-dbg
commit 19af99bf9de6cd7fb93d7206d0f471f75aded6b2
Author: Timo Aaltonen <tjaalton at debian.org>
Date: Thu Mar 17 07:17:11 2016 +0200
Drop the init file, we depend on systemd anyway.
diff --git a/debian/389-ds-base.dirsrv.init b/debian/389-ds-base.dirsrv.init
deleted file mode 100644
index ba15cc0..0000000
--- a/debian/389-ds-base.dirsrv.init
+++ /dev/null
@@ -1,162 +0,0 @@
-#!/bin/sh
-
-### BEGIN INIT INFO
-# Provides: dirsrv
-# Required-Start: $remote_fs
-# Required-Stop: $remote_fs
-# Should-Start: $network
-# Should-Stop: $network
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Start and stop 389 Directory Server
-# Description: dirsrv is the 389 LDAP Directory Server
-### END INIT INFO
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-test -f /etc/default/dirsrv && . /etc/default/dirsrv
-
-. /lib/lsb/init-functions
-
-DISTRO=$(lsb_release -is 2>/dev/null || echo Debian)
-CONFDIR="/etc/dirsrv"
-BASEEXEC="ns-slapd"
-EXEC="/usr/sbin/$BASEEXEC"
-PROG="dirsrv"
-PIDDIR="/var/run/dirsrv"
-LOCKDIR="/var/lock/dirsrv"
-
-check_network() {
- if [ -z "$(/sbin/ifconfig)" ]; then
- log_action_msg "No networks configured."
- return 1
- fi
- return 0
-}
-
-fix_pid_dir_ownership()
-{
- if [ ! -d $PIDDIR ] ; then
- mkdir -p $PIDDIR
- owner=`grep \^nsslapd-localuser $1/dse.ldif | awk '{print $2}'`
- if [ -n "$owner" ] ; then
- chown $owner $PIDDIR 2>&1 > /dev/null
- chmod 700 $PIDDIR 2>&1 > /dev/null
- fi
- fi
-}
-
-fix_lock_dir_ownership()
-{
- if [ ! -d $LOCKDIR/slapd-$2 ] ; then
- mkdir -p $LOCKDIR/slapd-$2
- owner=`grep \^nsslapd-localuser $1/dse.ldif | awk '{print $2}'`
- if [ -n "$owner" ] ; then
- chown -R $owner $LOCKDIR/slapd-$2 2>&1 > /dev/null
- chmod -R 700 $LOCKDIR/slapd-$2 2>&1 > /dev/null
- fi
- fi
-}
-
-INSTANCES=""
-
-# Ignore instances that have been removed
-for FILE in `/bin/ls -d $CONFDIR/slapd-* 2>/dev/null | sed -n '/\.removed$/!p'`; do
- if [ -d "$FILE" ] ; then
- inst=`echo "$FILE" | sed -e "s|$CONFDIR/slapd-||"`
- INSTANCES="$INSTANCES $inst"
- fi
-done
-
-if [ -z "$INSTANCES" ]; then
- log_action_msg "no $PROG instances configured so not starting 389 DS"
- exit 0
-fi
-
-if [ -n "$2" ]; then
- for I in $INSTANCES; do
- if [ "$2" = "$I" ]; then
- INSTANCES="$2"
- fi
- done
- if [ "$2" != "$INSTANCES" ]; then
- echo -n "$2 is an invalid dirsrv instance"
- log_action_msg "$2 is an invalid dirsrv instance"
- log_end_msg 1
- exit 1
- fi
-fi
-
-if [ ! -x $EXEC ]; then
- log_action_msg "$EXEC binary missing - not doing anything"
- log_end_msg 1
- exit 1
-fi
-
-start() {
- for INSTANCE in $INSTANCES; do
- log_action_begin_msg "Starting 389 DS instance $INSTANCE: "
- PIDFILE=$PIDDIR/slapd-$INSTANCE.pid
- fix_pid_dir_ownership $CONFDIR/slapd-$INSTANCE
- fix_lock_dir_ownership $CONFDIR/slapd-$INSTANCE $INSTANCE
- # start the directory server in a subshell so that the instance specific
- # init config environment will not apply to any other instance
- (
- [ -f /etc/default/dirsrv-$INSTANCE ] && . /etc/default/dirsrv-$INSTANCE
- start-stop-daemon -S --oknodo -x $EXEC -p $PIDFILE -b -- \
- -D $CONFIG_DIR -i $PIDFILE
- )
- log_end_msg $?
- done
-}
-
-stop() {
- for INSTANCE in $INSTANCES; do
- PIDFILE=$PIDDIR/slapd-$INSTANCE.pid
- if [ -f $PIDFILE ]; then
- log_action_begin_msg "Shutting down 389 DS instance $INSTANCE: "
- start-stop-daemon -K -p $PIDFILE -x $EXEC
- PID=`cat $PIDFILE`
- RETVAL=0
- while [ $RETVAL -eq 0 ]; do
- sleep 0.5
- kill -0 $PID > /dev/null 2>&1
- RETVAL=$?
- done
- rm -f $PIDFILE
- log_end_msg $?
- fi
- done
-}
-
-restart() {
- stop
- start
-}
-
-
-case "$1" in
- start|stop|restart)
- $1
- ;;
-
- status)
- status_of_proc $BASEEXEC "dirsrv"
- ;;
- # FIXME: implement proper force-reload
- force-reload)
- if ! check_network; then
- exit 1
- fi
-
- stop
- sleep 2
- start
- ;;
-
- *)
- log_action_msg "Usage: /etc/init.d/dirsrv {start|stop|restart|force-reload} [instance-name]"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/changelog b/debian/changelog
index f222bf4..a96b855 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
389-ds-base (1.3.4.8-2) UNRELEASED; urgency=medium
* postinst: Silence ls and adduser.
+ * Drop the init file, we depend on systemd anyway.
-- Timo Aaltonen <tjaalton at debian.org> Thu, 17 Mar 2016 07:15:06 +0200
diff --git a/debian/rules b/debian/rules
index f70eacd..7318b16 100755
--- a/debian/rules
+++ b/debian/rules
@@ -85,9 +85,6 @@ override_dh_install:
dh_install --fail-missing
-override_dh_installinit:
- dh_installinit --name dirsrv --error-handler=invoke_failure -- defaults 15 85
-
override_dh_strip:
dh_strip -p389-ds-base-libs --dbg-package=389-ds-base-libs-dbg
dh_strip -p389-ds-base --dbg-package=389-ds-base-dbg
commit dae69fa50ade055d6bff3a24d65428d447f19afd
Author: Timo Aaltonen <tjaalton at debian.org>
Date: Thu Mar 17 07:15:14 2016 +0200
postinst: Silence ls and adduser.
diff --git a/debian/389-ds-base.postinst b/debian/389-ds-base.postinst
index 100fb59..a46f5e3 100644
--- a/debian/389-ds-base.postinst
+++ b/debian/389-ds-base.postinst
@@ -5,7 +5,7 @@ set -e
CONFIG_DIR=/etc/dirsrv
OUT=/dev/null
-INSTANCES=`ls -d /etc/dirsrv/slapd-* | grep -v removed | sed 's/.*-//'`
+INSTANCES=`ls -d /etc/dirsrv/slapd-* 2>/dev/null | grep -v removed | sed 's/.*-//'`
if [ "$1" = configure ]; then
# lets give them a user/group in all cases.
@@ -13,6 +13,7 @@ if [ "$1" = configure ]; then
adduser --quiet --system --home /var/lib/dirsrv \
--disabled-password --group \
--gecos "389 Directory Server user" \
+ --no-create-home \
dirsrv > $OUT
fi
diff --git a/debian/changelog b/debian/changelog
index e0973d2..f222bf4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+389-ds-base (1.3.4.8-2) UNRELEASED; urgency=medium
+
+ * postinst: Silence ls and adduser.
+
+ -- Timo Aaltonen <tjaalton at debian.org> Thu, 17 Mar 2016 07:15:06 +0200
+
389-ds-base (1.3.4.8-1) unstable; urgency=medium
* New upstream release.
More information about the Pkg-fedora-ds-maintainers
mailing list