Your message dated Thu, 27 Sep 2018 20:39:27 +0000
with message-id <e1g5d4j-0007vr...@fasolo.debian.org>
and subject line Bug#905184: fixed in 389-ds-base 1.4.0.16-1
has caused the Debian Bug report #905184,
regarding upgrade of 389-ds-base fails if /var/lib/dirsrv is on different 
partition as /etc
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
905184: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905184
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: 389-ds-base
Version: 1.3.5.17-2
Severity: serious

Upgrade to newer version of 389-ds-base fails with dpkg configuration
error on postinstall script /var/lib/dpkg/info/389-ds-base.postinst

After getting full log of postinstall I saw:

[18/08/01:10:33:37] - [Setup] Info Could not rename config file
'/etc/dirsrv/slapd-INSTANCE/slapd-collations.conf' to
'/var/lib/dirsrv/slapd-INSTANCE/bak.bak/slapd-collations.conf'.  Error:
Invalid cross-device link

This is caused by line 24:

setup-ds -l $OUT -u -s General.UpdateMode=offline > $OUT 2>&1

calling this directly we got the same failure.

The reason is that the script tries to make a backup of configuration
files in /var/lib/dirsrv/INSTANCE/bak.bak:


    # these files are obsolete, or we want to replace
    # them with newer versions
    my @toremove = qw(slapd-collations.conf);

    # make a backup directory to store the deleted config file, then
    # don't really delete it, just move it to that directory
    my $mode = (stat($inf->{slapd}->{config_dir}))[2];
    my $bakdir = $inf->{slapd}->{bak_dir} . ".bak";
    if (! -d $bakdir) {
        $! = 0; # clear
        mkdir $bakdir, $mode;
        if ($!) {
            return ('error_creating_directory', $bakdir, $!);
        }
    }

    my @errs;
    for my $file (@toremove) {
        my $oldname = $inf->{slapd}->{config_dir} . "/" . $file;
        next if (! -f $oldname); # does not exist - skip - already (re)moved
        my $newname = "$bakdir/$file";
        $! = 0; # clear
        rename $oldname, $newname;
        if ($!) {
            push @errs, ["error_renaming_config", $oldname, $newname, $!];
        }
    }


According to
https://www.unix.com/shell-programming-and-scripting/27747-perl-rename-failed.html
the perl rename call can cause this error.

My workaround was to create the directories in /etc and make symlinks in
/var/lib/dirsrv/...

  mkdir /etc/dirsrv/slapd-INSTANCE/bak
  ln -s /etc/dirsrv/slapd-INSTANCE/bak /var/lib/dirsrv/slapd-INSTANCE/bak
  mkdir /etc/dirsrv/slapd-INSTANCE/bak.bak
  ln -s /etc/dirsrv/slapd-INSTANCE/bak.bak
/var/lib/dirsrv/slapd-INSTANCE/bak.bak


Upgrade succeeded now.

I originally encountered this problem while upgrading 389-ds-base on
jessie from 1.3.3.5-4 to 1.3.3.5-4+deb8u1. Since upgrade scripts didn't
change this should be still valid for the actual version.

--- End Message ---
--- Begin Message ---
Source: 389-ds-base
Source-Version: 1.4.0.16-1

We believe that the bug you reported is fixed in the latest version of
389-ds-base, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 905...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Timo Aaltonen <tjaal...@debian.org> (supplier of updated 389-ds-base package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 27 Sep 2018 22:39:34 +0300
Source: 389-ds-base
Binary: 389-ds 389-ds-base-libs 389-ds-base-dev 389-ds-base python3-lib389 
python3-dirsrvtests cockpit-389-ds
Architecture: source
Version: 1.4.0.16-1
Distribution: unstable
Urgency: medium
Maintainer: Debian FreeIPA Team <pkg-freeipa-de...@alioth-lists.debian.net>
Changed-By: Timo Aaltonen <tjaal...@debian.org>
Description:
 389-ds     - 389 Directory Server suite - metapackage
 389-ds-base - 389 Directory Server suite - server
 389-ds-base-dev - 389 Directory Server suite - development files
 389-ds-base-libs - 389 Directory Server suite - libraries
 cockpit-389-ds - Cockpit user interface for 389 Directory Server
 python3-dirsrvtests - Python3 module for 389 Directory Server Continuous 
Integration te
 python3-lib389 - Python3 module for accessing and configuring the 389 
Directory Se
Closes: 905184 907140
Changes:
 389-ds-base (1.4.0.16-1) unstable; urgency=medium
 .
   * New upstream release.
   * control: 389-ds-base-dev provides libsvrcore-dev. (Closes: #907140)
   * perl-use-move-instead-of-rename.diff: Fix upgrade on systems where
     /var is on a separate partition: (Closes: #905184)
Checksums-Sha1:
 1915edd964027fd7c7e6f47beab9068085ac4b21 2874 389-ds-base_1.4.0.16-1.dsc
 a312c34d68a699978453c76b3870b707e95f1baf 5670761 
389-ds-base_1.4.0.16.orig.tar.bz2
 b342d2f566421908153b08d7bcfa9e0cebca294e 444016 
389-ds-base_1.4.0.16-1.debian.tar.xz
 439665bee63bc6733cd824a5978205b6bdf59d3a 7606 
389-ds-base_1.4.0.16-1_source.buildinfo
Checksums-Sha256:
 eb2a94d629508f338902763d0b16795485e4049ab7499c8abf2331d31b398889 2874 
389-ds-base_1.4.0.16-1.dsc
 0fed48ee82ca3890a9d232373c3b2da9134efc466767b78b0b389cf4a57a39a8 5670761 
389-ds-base_1.4.0.16.orig.tar.bz2
 80121cc492e1add56bee0904d1fe24baf5e2a79bf610ead57f9481224b40ebbf 444016 
389-ds-base_1.4.0.16-1.debian.tar.xz
 d0978cf31ca7804e98a4db1d4ad84189812a3fbb65d25bfe7798985361907ad0 7606 
389-ds-base_1.4.0.16-1_source.buildinfo
Files:
 3a1a574216d9828ab5ba99bdc1842bb8 2874 net optional 389-ds-base_1.4.0.16-1.dsc
 97d523793acb1a625aa1647721938ee8 5670761 net optional 
389-ds-base_1.4.0.16.orig.tar.bz2
 cd67fd81badac50219d76f5da89dd3d8 444016 net optional 
389-ds-base_1.4.0.16-1.debian.tar.xz
 6bc26bbd6e591263f37c86b90c332c82 7606 net optional 
389-ds-base_1.4.0.16-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEdS3ifE3rFwGbS2Yjy3AxZaiJhNwFAlutM5cACgkQy3AxZaiJ
hNzeABAAnYD4SMEIBWVAqeNHRSGouLk5tuv2r/n2S7eCCKfh/dJrZGAgnrAjv3ic
17Mx/ntS3rChco6zL4+Qq53D38jiZ89bKIPvjoO90T2dl9ZTtuhA7O70PpUgT3YO
w1J4DIwpc1lLDLsbWwhNCeEx949RvmYdIjzDiiAzCHHePZavH/THnskJv1VcwpiU
OZmg+yY4ORgjkkWcL4SPq9zQQgdR6EpiHcGT6rrS+JjxGQK4ERBtP3tqDLDWAa7Y
mxxXJkFI934ukAI7QRI7UF0QvggcDriT87puRYTfxRwRrGfFPXmuKwTOhKzBy3j2
cen9lxzt9XUqVfujlOQDh4u/6RJKuFU/l02faWWD7d58xPSpDQLTddjCXLp/CWGv
fFng34P1ZKLV7QCsvZ+A9s2pSwk/w2vb0wxrzbu9z9OypjivXhuLyumwIvSKbcHe
VAqrElYvU5aTHJ3P0YfzG14vZObf07n1+I5GZ7Z69+JUpiMVAHR5ECiNcZ/RM3A4
/AI5aqvbgrSOYB7xiarVPPj94Dd13Ch03icDu+I5qlL79eyoNfCrUDa9U3shaH/M
+w7FteOopGdEvZnyjR8ntFcgm2kh87jVTkMjsgeXVbUbUFLrLXLWTO5uygbkoxTV
LMuVYIooW1Oa5UraGLq+69Ec9t/t5vdnMv8GJWdVWlBbuXSAY9E=
=4muA
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to