[Pkg-fedora-ds-maintainers] 389-admin: Changes to 'upstream'

Timo Aaltonen tjaalton at moszumanska.debian.org
Tue Aug 30 22:15:29 UTC 2016


 VERSION.sh                            |    2 +-
 admserv/cgi-src40/ds_remove.in        |    6 ++++++
 admserv/newinst/src/AdminServer.pm.in |   18 +++++++++++++-----
 3 files changed, 20 insertions(+), 6 deletions(-)

New commits:
commit af9de3071795b94560cab711957eaded5cf6bf67
Author: Noriko Hosoi <nhosoi at redhat.com>
Date:   Wed May 11 16:18:11 2016 -0700

    bump version to 1.1.43

diff --git a/VERSION.sh b/VERSION.sh
index bf55ea2..cd76f32 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -11,7 +11,7 @@ vendorurl=http://port389.org
 # PACKAGE_VERSION is constructed from these
 VERSION_MAJOR=1
 VERSION_MINOR=1
-VERSION_MAINT=42
+VERSION_MAINT=43
 # if this is a PRERELEASE, set VERSION_PREREL
 # otherwise, comment it out
 # be sure to include the dot prefix in the prerel

commit e5b5830d74879aa1cc2cea0fe6d1bb1531f1185c
Author: Noriko Hosoi <nhosoi at redhat.com>
Date:   Wed Apr 27 14:26:32 2016 -0700

    Ticket #48429 - running remove-ds-admin.pl multiple times will make it so you cannot install DS
    
    Bug Description: remove-ds-admin.pl resets the files in /etc/dirsrv/admin-
    serv and put it to the original state just after "rpm -i 389-admin" is
    executed.
    
    To recover the original state, remove-ds-admin.pl restores the config
    files backed up by setup-ds-admin.pl.  That is, if remove-ds-admin.pl is
    executed without setup-ds-admin.pl or remove-ds-admin.pl is repeatedly
    run, the config files are failed to restore.  It makes the following
    setup-ds-admin.pl fail.
    
    Fix Description: This patch changes the remove-ds-admin.pl behaviour so
    that the config files are not touched regardless of the existence of the
    back up.  If the back up exists, the files are overridden by the back up.
    But even if it does not exist, the current config files remain in the
    directory, which leads the next setup-ds-admin.pl successfully finish.
    
    https://fedorahosted.org/389/ticket/48429
    
    Reviewed by lkrispen at redhat.com (Thank you, Ludwig!!)

diff --git a/admserv/newinst/src/AdminServer.pm.in b/admserv/newinst/src/AdminServer.pm.in
index 3e31e70..480fb3a 100644
--- a/admserv/newinst/src/AdminServer.pm.in
+++ b/admserv/newinst/src/AdminServer.pm.in
@@ -826,9 +826,9 @@ sub removeAdminServer {
     }
 
     # remove config files
-    my @savefiles = @savesecfiles; # save security files by default
+    my @savefiles = (@savesecfiles, @saveconffiles); # save security and conf files by default
     if ($all) {
-        @savefiles = (); # $all means remove everything, save nothing
+        @savefiles = @saveconffiles; # $all means remove everything, except the files in rpm.
     }
     if (opendir(CONFDIR, $configdir)) {
         while ($file = readdir(CONFDIR)) {

commit edc5dbc514da3aeb6dca5f0a218f3330cea0fce3
Author: Noriko Hosoi <nhosoi at redhat.com>
Date:   Wed Apr 27 11:28:14 2016 -0700

    Ticket #48410 - 389-admin - Unable to remove / unregister a DS instance from admin server
    
    Description: The cgi ds_remove missed to map ServerAdminId.
      NMC_ErrInfo: The map value 'ServerAdminID' for key 'as_uid' did
      not map to a value in any of the given information files.
    This patch adds the mapping using admpw.conf.
    
    https://fedorahosted.org/389/ticket/48410
    
    Reviewed by mreynolds at redhat.com (Thank you, Mark!!)

diff --git a/admserv/cgi-src40/ds_remove.in b/admserv/cgi-src40/ds_remove.in
index cb7abe3..851afde 100755
--- a/admserv/cgi-src40/ds_remove.in
+++ b/admserv/cgi-src40/ds_remove.in
@@ -113,6 +113,12 @@ $inf->{General}->{ConfigDirectoryLdapURL} = $query->param('ldap_url') ||
     $admConf->{ldapurl};
 $inf->{General}->{AdminDomain} = $query->param('admin_domain') ||
     $admConf->{AdminDomain};
+my $admpw = AdminUtil::getAdmpw($admConf);
+if ($admpw && %{$admpw}) {
+    unless (defined($inf->{admin}->{ServerAdminID})) {
+        $inf->{admin}->{ServerAdminID} = $admpw->{ServerAdminID};
+    }
+}
 
 # Unregister the server from the configuration ds
 # get config ds url from input or admconf

commit 9f8398ce98f45f80944de3850e23aeda1a8fc32e
Author: Noriko Hosoi <nhosoi at redhat.com>
Date:   Fri Apr 22 14:20:37 2016 -0700

    Ticket #48409 - RHDS upgrade change Ownership of certificate files upon upgrade.
    
    Description: The fix for the ticket #47891 "Admin Server reconfig
    breaks SSL config" backs up the SSL key/cert db files before the
    upgrade and restores them when the upgrade is done.  In the backup,
    "copy" is used, which does not keep the ownership and mode of the
    files.  This patch uses move instead of copy to preserve them.
    
    https://fedorahosted.org/389/ticket/48409
    
    Reviewed by mreynolds at redhat.com (Thank you, Mark!!)

diff --git a/admserv/newinst/src/AdminServer.pm.in b/admserv/newinst/src/AdminServer.pm.in
index eb80d19..3e31e70 100644
--- a/admserv/newinst/src/AdminServer.pm.in
+++ b/admserv/newinst/src/AdminServer.pm.in
@@ -530,7 +530,8 @@ sub reconfig_backup_secfiles
     }
     foreach my $savefile (@reconfigsavefiles) {
         if ( -e "$configdir/$savefile"){
-            copy ("$configdir/$savefile", "$secfile_backup_dir/$savefile");
+            # To keep the ownership and modes, use move for backup.
+            move ("$configdir/$savefile", "$secfile_backup_dir/$savefile");
             debug(1, "Backing up $configdir/$savefile to $secfile_backup_dir/$savefile\n");
             if (! -e "$secfile_backup_dir/$savefile"){
                 debug(0, "Backup file $secfile_backup_dir/$savefile not found, error $!\n");
@@ -590,6 +591,12 @@ sub createAdminServer {
     if ($reconfig) {
         $setup->msg('begin_reconfig_adminserver');
         if (!reconfig_backup_secfiles($configdir)) {
+            foreach my $savefile (@reconfigsavefiles) {
+                if (-e "$secfile_backup_dir/$savefile") {
+                    move ("$secfile_backup_dir/$savefile" ,"$configdir/$savefile");
+                    debug(1, "Restoring $configdir/$savefile with $secfile_backup_dir/$savefile\n");
+                }
+            }
             return 0;
         }
     } else {

commit 98446b8e5b19da085371ee751f2aed33504657ff
Author: William Brown <wibrown at redhat.com>
Date:   Fri Oct 30 10:54:12 2015 +1000

    Ticket 47840 - Fix setup-ds-admin.pl to create adm.conf with sbin scripts
    https://fedorahosted.org/389/ticket/47840
    
    Bug Description:  Now that https://fedorahosted.org/389/ticket/528 is fixed, the
    next step is to allow building the server with the instance specific scripts
    disabled.
    
    Fix Description:  This corrects the behaviour of setup-ds-admin.pl to write out
    it's adm.conf for the configuration directory, to utilise the sbin scripts with
    an argument to start the dirsrv instances rather than using the per instance
    script.
    
    Author: wibrown
    
    Review by: nhosoi (Thanks!)

diff --git a/admserv/newinst/src/AdminServer.pm.in b/admserv/newinst/src/AdminServer.pm.in
index a141596..eb80d19 100644
--- a/admserv/newinst/src/AdminServer.pm.in
+++ b/admserv/newinst/src/AdminServer.pm.in
@@ -210,8 +210,9 @@ sub makeConfFiles {
 
     my @start_slapd;
     if ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /yes/i) {
-        my $inst_dir = $setup->{inf}->{slapd}->{inst_dir};
-        @start_slapd = ('ldapStart', "$inst_dir/start-slapd");
+        my $sbindir = $setup->{inf}->{slapd}->{sbindir};
+        my $inst_name = $setup->{inf}->{slapd}->{ServerIdentifier};
+        @start_slapd = ('ldapStart', "$sbindir/start-dirsrv $inst_name");
     }
     $setup->msg('updating_admconf');
     my $rc = updateAdmConf({ldapurl => $setup->{inf}->{General}->{ConfigDirectoryLdapURL},



More information about the Pkg-fedora-ds-maintainers mailing list