[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm archive.c, 1.11, 1.12
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10894
Modified Files:
archive.c
Log Message:
Resolves: #232050
Summary: Change format of DBVERSION and guardian files (comment #10)
Index: archive.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/archive.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- archive.c 10 Nov 2006 23:45:39 -0000 1.11
+++ archive.c 26 Mar 2007 23:04:17 -0000 1.12
@@ -71,11 +71,11 @@
/* check the current idl format vs backup DB version */
if (idl_get_idl_new())
{
- char dbversion[LDBM_VERSION_MAXBUF];
- char dataversion[LDBM_VERSION_MAXBUF];
+ char *dbversion = NULL;
+ char *dataversion = NULL;
int value = 0;
- if (dbversion_read(li, directory, dbversion, dataversion) != 0)
+ if (dbversion_read(li, directory, &dbversion, &dataversion) != 0)
{
LDAPDebug(LDAP_DEBUG_ANY, "Warning: Unable to read dbversion "
"file in %s\n", directory, 0, 0);
@@ -85,6 +85,8 @@
{
is_old_to_new = 1;
}
+ slapi_ch_free_string(&dbversion);
+ slapi_ch_free_string(&dataversion);
}
/* No ldbm be's exist until we process the config information. */
17 years, 1 month
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-db2ldif.in, 1.6, 1.7
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31073
Modified Files:
template-db2ldif.in
Log Message:
Resolves: #233027
Summary: make db2bak.pl & db2ldif.pl user more user-friendly (Comment #8)
Fixed problem: the command line fails to generate an output file name
when an empty suffix is passed like this: db2ldif -s ""
Index: template-db2ldif.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2ldif.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-db2ldif.in 20 Mar 2007 01:15:32 -0000 1.6
+++ template-db2ldif.in 24 Mar 2007 00:51:11 -0000 1.7
@@ -14,14 +14,14 @@
make_ldiffile()
{
- nobe=0
+ be=""
while [ "$1" != "" ]
do
- if [ "$1" = '-a' ]; then
+ if [ "$1" = "-a" ]; then
shift
echo $1
return 1
- elif [ "$1" = '-n' ]; then
+ elif [ "$1" = "-n" ]; then
shift
if [ "$be" = "" ]; then
be="$1"
@@ -29,26 +29,28 @@
tmpbe="$be"
be="${tmpbe}-$1"
fi
- elif [ "$1" = '-s' ]; then
+ elif [ "$1" = "-s" ]; then
shift
- rdn=`echo $1 | awk -F, '{print $1}'`
- rdnval=`echo $rdn | awk -F= '{print $2}'`
- if [ "$be" = "" ]; then
- be="$rdnval"
- else
- tmpbe="$be"
- be="${tmpbe}-$rdnval"
+ if [ "$1" != "" ]; then
+ rdn=`echo $1 | awk -F, '{print $1}'`
+ rdnval=`echo $rdn | awk -F= '{print $2}'`
+ if [ "$be" = "" ]; then
+ be="$rdnval"
+ else
+ tmpbe="$be"
+ be="${tmpbe}-$rdnval"
+ fi
fi
- elif [ "$1" = '-M' ]; then
- nobe=1
+ elif [ "$1" = "-M" ]; then
+ be=""
fi
shift
done
- if [ $nobe -eq 0 ]; then
- echo {{LDIF-DIR}}/{{SERV-ID}}-${be}-`date +%Y_%m_%d_%H%M%S`.ldif
- else
+ if [ "$be" = "" ]; then
echo {{LDIF-DIR}}/{{SERV-ID}}-`date +%Y_%m_%d_%H%M%S`.ldif
+ else
+ echo {{LDIF-DIR}}/{{SERV-ID}}-${be}-`date +%Y_%m_%d_%H%M%S`.ldif
fi
return 0
}
17 years, 1 month
[Fedora-directory-commits] ldapserver Makefile.am, 1.34, 1.35 aclocal.m4, 1.28, 1.29 configure, 1.37, 1.38 missing, 1.22, 1.23 install-sh, 1.22, 1.23 depcomp, 1.22, 1.23 compile, 1.22, 1.23 Makefile.in, 1.40, 1.41 config.sub, 1.21, 1.22 config.guess, 1.21, 1.22
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29722
Modified Files:
Makefile.am aclocal.m4 configure missing install-sh depcomp
compile Makefile.in config.sub config.guess
Log Message:
Resolves: bug 233410
Description: version 1.1.0: bugs in build system (linking)
Fix Description: libds_admin needs to link with LDAPSDK_LINK and the server needs to link with SVRCORE
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- Makefile.am 16 Mar 2007 23:06:57 -0000 1.34
+++ Makefile.am 22 Mar 2007 15:16:26 -0000 1.35
@@ -262,7 +262,7 @@
ldap/admin/lib/dsalib_util.c
libds_admin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/ldap/admin/include @ldapsdk_inc@ @nss_inc@ @nspr_inc@
-libds_admin_la_LIBADD = $(NSS_LINK) $(NSPR_LINK)
+libds_admin_la_LIBADD = $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK)
#------------------------
# libns-dshttpd
@@ -416,7 +416,7 @@
$(libavl_a_SOURCES)
libslapd_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) @db_inc@ @svrcore_inc@
-libslapd_la_LIBADD = $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK)
+libslapd_la_LIBADD = $(LDAPSDK_LINK) $(SVRCORE_LINK) $(NSS_LINK) $(NSPR_LINK)
#////////////////////////////////////////////////////////////////
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- Makefile.in 20 Mar 2007 18:46:45 -0000 1.40
+++ Makefile.in 22 Mar 2007 15:16:26 -0000 1.41
@@ -239,7 +239,7 @@
libdna_plugin_la_OBJECTS = $(am_libdna_plugin_la_OBJECTS)
@enable_dna_TRUE@am_libdna_plugin_la_rpath = -rpath $(serverplugindir)
libds_admin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libds_admin_la_OBJECTS = \
ldap/admin/lib/libds_admin_la-dsalib_conf.lo \
ldap/admin/lib/libds_admin_la-dsalib_confs.lo \
@@ -432,7 +432,7 @@
ldap/servers/plugins/roles/libroles_plugin_la-roles_plugin.lo
libroles_plugin_la_OBJECTS = $(am_libroles_plugin_la_OBJECTS)
libslapd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am__objects_2 = ldap/libraries/libavl/libslapd_la-avl.lo
am_libslapd_la_OBJECTS = ldap/servers/slapd/libslapd_la-add.lo \
ldap/servers/slapd/libslapd_la-agtmmap.lo \
@@ -1169,7 +1169,7 @@
ldap/admin/lib/dsalib_util.c
libds_admin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/ldap/admin/include @ldapsdk_inc@ @nss_inc@ @nspr_inc@
-libds_admin_la_LIBADD = $(NSS_LINK) $(NSPR_LINK)
+libds_admin_la_LIBADD = $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK)
#------------------------
# libns-dshttpd
@@ -1323,7 +1323,7 @@
$(libavl_a_SOURCES)
libslapd_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) @db_inc@ @svrcore_inc@
-libslapd_la_LIBADD = $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK)
+libslapd_la_LIBADD = $(LDAPSDK_LINK) $(SVRCORE_LINK) $(NSS_LINK) $(NSPR_LINK)
#////////////////////////////////////////////////////////////////
#
17 years, 1 month
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-verify-db.pl.in, 1.6, 1.7
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19769
Modified Files:
template-verify-db.pl.in
Log Message:
Resolves: #233215
Summary: verify-db.pl still assumes the db dir is always in the instance dir
Changes:
0) eliminated the "current directory" from the utility. Now, it can be run
from any location.
1) updated to take a new option [-a <fullpath_to_db_dir> ] to allow specifying
the db dir/changelog dir; by default the start point is "db_dir"
(nsslapd-directory in cn=config,cn=ldbm database,cn=plugins,cn=config)
2) instead of assuming the db dir structure (e.g.,
db/<backend_instance>/<db_files>), now it checks all the db files found under
the specified path. This allows to run the utility against the backup files,
as well.
Index: template-verify-db.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-verify-db.pl.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-verify-db.pl.in 12 Feb 2007 19:55:10 -0000 1.6
+++ template-verify-db.pl.in 21 Mar 2007 17:42:58 -0000 1.7
@@ -38,68 +38,121 @@
# END COPYRIGHT BLOCK
#
+sub usage
+{
+ print "Usage: $0 [ -a <fullpath_to_db_dir> ]\n";
+}
+
+# getDbDir checks up to 4 levels of db dirs
+# e.g., <server_inst_dir>/db/<backend_instance_dir>/<subdir>
sub getDbDir
{
- (my $here) = @_;
- my @dbdirs = ();
+ (my $here) = @_;
+ my @dbdirs = ();
- opendir(DIR, $here) or die "can't opendir $here : $!";
- while (defined($dir = readdir(DIR)))
+ opendir(DIR0, $here) or die "can't opendir $here : $!";
+ while (defined(my $file0 = readdir(DIR0)))
+ {
+ if ( "$file0" eq "\." || "$file0" eq "\.\." )
+ {
+ ;
+ }
+ elsif ( "$file0" eq "DBVERSION" )
+ {
+ $#dbdirs++;
+ $dbdirs[$#dbdirs] = $here;
+ }
+ elsif ( -d $here . "{{SEP}}" . $file0 )
{
- my $thisdir;
- if ("$here" eq ".")
+ opendir(DIR1, $here . "{{SEP}}" . $file0) or die "can't opendir $file0 : $!";
+ while (defined(my $file1 = readdir(DIR1)))
+ {
+ if ( "$file1" eq "\." || "$file1" eq "\.\." )
{
- $thisdir = $dir;
+ ;
}
- else
+ elsif ( "$file1" eq "DBVERSION" )
{
- $thisdir = $here . "{{SEP}}" . $dir;
+ $#dbdirs++;
+ $dbdirs[$#dbdirs] = $here . "{{SEP}}" . $file0;
}
- if (-d $thisdir)
+ elsif ( -d $here . "{{SEP}}" . $file0 . "{{SEP}}" . $file1 )
{
- if (!($thisdir =~ /\./))
+ opendir(DIR2, $here . "{{SEP}}" . $file0 . "{{SEP}}" . $file1) or die "can't opendir $file1 : $!";
+ while (defined(my $file2 = readdir(DIR2)))
+ {
+ if ( "$file2" eq "\." || "$file2" eq "\.\." )
{
- opendir(SUBDIR, "$thisdir") or die "can't opendir $thisdir : $!";
- while (defined($file = readdir(SUBDIR)))
+ ;
+ }
+ elsif ("$file2" eq "DBVERSION")
+ {
+ $#dbdirs++;
+ $dbdirs[$#dbdirs] = $here . "{{SEP}}" . $file0 . "{{SEP}}" . $file1;
+ }
+ elsif ( -d $here . "{{SEP}}" . $file0 . "{{SEP}}" . $file1 . "{{SEP}}" . $file2 )
+ {
+ opendir(DIR3, $here . "{{SEP}}" . $file0 . "{{SEP}}" . $file1 . "{{SEP}}" . $file2) or die "can't opendir $file1 : $!";
+ while (defined(my $file3 = readdir(DIR3)))
+ {
+ if ( "$file3" eq "\." || "$file3" eq "\.\." )
+ {
+ ;
+ }
+ elsif ("$file3" eq "DBVERSION")
{
- if ($file eq "DBVERSION")
- {
- $#dbdirs++;
- $dbdirs[$#dbdirs] = $thisdir;
- }
+ $#dbdirs++;
+ $dbdirs[$#dbdirs] = $here . "{{SEP}}" . $file0 . "{{SEP}}" . $file1 . "{{SEP}}" . $file2;
}
- closedir(SUBDIR);
+ }
+ closedir(DIR3);
}
+ }
+ closedir(DIR2);
}
+ }
+ closedir(DIR1);
}
- closedir(DIR);
+ }
+ closedir(DIR0);
- return \@dbdirs;
+ return \@dbdirs;
}
sub getLastLogfile
{
- (my $here) = @_;
- my $logfile = "";
+ (my $here) = @_;
+ my $logfile = "";
- opendir(DIR, $here) or die "can't opendir $here : $!";
- while (defined($file = readdir(DIR)))
+ opendir(DIR, $here) or die "can't opendir $here : $!";
+ while (defined($file = readdir(DIR)))
+ {
+ if ($file =~ /log./)
{
- if ($file =~ /log./)
- {
- $logfile = $file;
- }
+ $logfile = $file;
}
- closedir(DIR);
+ }
+ closedir(DIR);
- return \$logfile;
+ return \$logfile;
}
$isWin = -d '\\';
if ($isWin) {
- $NULL = "nul";
+ $NULL = "nul";
} else {
- $NULL = "/dev/null";
+ $NULL = "/dev/null";
+}
+
+my $i = 0;
+$startpoint = "";
+while ($i <= $#ARGV) {
+ if ( "$ARGV[$i]" eq "-a" ) { # path to search the db files
+ $i++; $startpoint = $ARGV[$i];
+ } else {
+ &usage; exit(1);
+ }
+ $i++;
}
print("*****************************************************************\n");
@@ -109,16 +162,24 @@
"false errors.\n");
print("*****************************************************************\n");
+if ( "$startpoint" eq "" ) {
+ $startpoint = "{{DB-DIR}}";
+}
# get dirs having DBVERSION
-my $dbdirs = getDbDir(".");
+my $dbdirs = getDbDir($startpoint);
my $prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@db_bindir@:$prefix/usr/bin:@db_bindir@:/usr/bin";
$ENV{'LD_LIBRARY_PATH'} = "@db_libdir@:@libdir@";
$ENV{'SHLIB_PATH'} = "@db_libdir@:@libdir@";
-for (my $i = 0; $i < @$dbdirs; $i++)
+# Check transaction logs by db_printlog
+for (my $i = 0; "$$dbdirs[$i]" ne ""; $i++)
{
+ my $logfile = getLastLogfile($$dbdirs[$i]);
+
+ if ( "$$logfile" ne "" )
+ {
# run db_printlog -h <dbdir> for each <dbdir>
print "Verify log files in $$dbdirs[$i] ... ";
open(PRINTLOG, "db_printlog -h $$dbdirs[$i] 2>&1 1> $NULL |");
@@ -126,115 +187,65 @@
my $haserr = 0;
while ($l = <PRINTLOG>)
{
- if ("$l" ne "")
- {
- if ($haserr == 0)
- {
- print "\n";
- }
- print "LOG ERROR: $l";
- $haserr++;
- }
+ if ("$l" ne "")
+ {
+ if ($haserr == 0)
+ {
+ print "\n";
+ }
+ print "LOG ERROR: $l";
+ $haserr++;
+ }
}
close(PRINTLOG);
if ($haserr == 0 && $? == 0)
{
- print "Good\n";
+ print "Good\n";
}
else
{
- my $logfile = getLastLogfile($$dbdirs[$i]);
- print "Log file(s) in $$dbdirs[$i] could be corrupted.\n";
- print "Please delete a log file $$logfile, and try restarting the server.\n";
+ print "Log file(s) in $$dbdirs[$i] could be corrupted.\n";
+ print "Please delete a log file $$logfile, and try restarting the server.\n";
}
+ }
}
-for (my $i = 0; $i < @$dbdirs; $i++)
+# Check db files by db_verify
+for (my $i = 0; "$$dbdirs[$i]" ne ""; $i++)
{
- # changelog
- opendir(DB, $$dbdirs[$i]) or die "can't opendir $$dbdirs[$i] : $!";
- while (defined($db = readdir(DB)))
- {
- if ($db =~ /\.db/)
- {
- my $thisdb = $$dbdirs[$i] . "{{SEP}}" . $db;
- print "Verify $thisdb ... ";
- open(DBVERIFY, "db_verify $thisdb 2>&1 1> $NULL |");
- sleep 1;
- my $haserr = 0;
- while ($l = <DBVERIFY>)
- {
- if ($haserr == 0)
- {
- print "\n";
- }
- if ("$l" ne "")
- {
- $haserr++;
- print "DB ERROR: $l";
- }
- }
- close(DBVERIFY);
- if ($haserr == 0 && $? == 0)
- {
- print "Good\n";
- }
- else
- {
- print "changelog file $db in $$dbdirs[$i] is corrupted.\n";
- print "Please restore your backup and recover the database.\n";
- }
+ opendir(DB, $$dbdirs[$i]) or die "can't opendir $$dbdirs[$i] : $!";
+ while (defined($db = readdir(DB)))
+ {
+ if ($db =~ /\.db/)
+ {
+ my $thisdb = $$dbdirs[$i] . "/" . $db;
+ print "Verify $thisdb ... ";
+ open(DBVERIFY, "db_verify $thisdb 2>&1 1> $NULL |");
+ sleep 1;
+ my $haserr = 0;
+ while ($l = <DBVERIFY>)
+ {
+ if ($haserr == 0)
+ {
+ print "\n";
}
- }
- closedir(DB);
-
- # backend: get instance dirs under <dbdir>
- my $instdirs = getDbDir($$dbdirs[$i]);
-
- for (my $j = 0; $j < @$instdirs; $j++)
- {
- opendir(DIR, $$instdirs[$j]) or die "can't opendir $here : $!";
- while (defined($db = readdir(DIR)))
+ if ("$l" ne "")
{
- if ($db =~ /\.db/)
- {
- my $thisdb = $$instdirs[$j] . "{{SEP}}" . $db;
- print "Verify $thisdb ... ";
- open(DBVERIFY, "db_verify $thisdb 2>&1 1> $NULL |");
- sleep 1;
- my $haserr = 0;
- while ($l = <DBVERIFY>)
- {
- if ($haserr == 0)
- {
- print "\n";
- }
- if ("$l" ne "")
- {
- $haserr++;
- print "DB ERROR: $l";
- }
- }
- close(DBVERIFY);
- if ($haserr == 0 && $? == 0)
- {
- print "Good\n";
- }
- else
- {
- if ("$db" =~ /id2entry.db/)
- {
- print "Primary db file $db in $$instdirs[$j] is corrupted.\n";
- print "Please restore your backup and recover the database.\n";
- }
- else
- {
- print "Secondary index file $db in $$instdirs[$j] is corrupted.\n";
- print "Please run db2index(.pl) for reindexing.\n";
- }
- }
- }
+ $haserr++;
+ print "DB ERROR: $l";
}
- closedir(DIR);
+ }
+ close(DBVERIFY);
+ if ($haserr == 0 && $? == 0)
+ {
+ print "Good\n";
+ }
+ else
+ {
+ print "db file $db in $$dbdirs[$i] is corrupted.\n";
+ print "Please restore your backup and recover the database.\n";
+ }
}
+ }
+ closedir(DB);
}
17 years, 1 month
[Fedora-directory-commits] ldapserver configure.ac, 1.24, 1.25 aclocal.m4, 1.27, 1.28 configure, 1.36, 1.37 missing, 1.21, 1.22 install-sh, 1.21, 1.22 depcomp, 1.21, 1.22 compile, 1.21, 1.22 Makefile.in, 1.39, 1.40 config.sub, 1.20, 1.21 config.guess, 1.20, 1.21 ltmain.sh, 1.12, 1.13
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25493
Modified Files:
configure.ac aclocal.m4 configure missing install-sh depcomp
compile Makefile.in config.sub config.guess ltmain.sh
Log Message:
Bump version to 1.1.0 alpha 3 (1.1.0a3)
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- configure.ac 27 Feb 2007 02:57:24 -0000 1.24
+++ configure.ac 20 Mar 2007 18:46:45 -0000 1.25
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
# This version is the version returned by ns-slapd -v
-AC_INIT([fedora-ds], [1.1.0a2], [http://bugzilla.redhat.com/])
+AC_INIT([fedora-ds], [1.1.0a3], [http://bugzilla.redhat.com/])
# AC_CONFIG_HEADER must be called right after AC_INIT.
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- configure 16 Mar 2007 23:06:57 -0000 1.36
+++ configure 20 Mar 2007 18:46:45 -0000 1.37
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for fedora-ds 1.1.0a2.
+# Generated by GNU Autoconf 2.59 for fedora-ds 1.1.0a3.
#
# Report bugs to <http://bugzilla.redhat.com/>.
#
@@ -423,8 +423,8 @@
# Identity of this package.
PACKAGE_NAME='fedora-ds'
PACKAGE_TARNAME='fedora-ds'
-PACKAGE_VERSION='1.1.0a2'
-PACKAGE_STRING='fedora-ds 1.1.0a2'
+PACKAGE_VERSION='1.1.0a3'
+PACKAGE_STRING='fedora-ds 1.1.0a3'
PACKAGE_BUGREPORT='http://bugzilla.redhat.com/'
# Factoring default headers for most tests.
@@ -954,7 +954,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures fedora-ds 1.1.0a2 to adapt to many kinds of systems.
+\`configure' configures fedora-ds 1.1.0a3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1020,7 +1020,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of fedora-ds 1.1.0a2:";;
+ short | recursive ) echo "Configuration of fedora-ds 1.1.0a3:";;
esac
cat <<\_ACEOF
@@ -1197,7 +1197,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-fedora-ds configure 1.1.0a2
+fedora-ds configure 1.1.0a3
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1211,7 +1211,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by fedora-ds $as_me 1.1.0a2, which was
+It was created by fedora-ds $as_me 1.1.0a3, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1857,7 +1857,7 @@
# Define the identity of the package.
PACKAGE='fedora-ds'
- VERSION='1.1.0a2'
+ VERSION='1.1.0a3'
cat >>confdefs.h <<_ACEOF
@@ -25527,7 +25527,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by fedora-ds $as_me 1.1.0a2, which was
+This file was extended by fedora-ds $as_me 1.1.0a3, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25590,7 +25590,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-fedora-ds config.status 1.1.0a2
+fedora-ds config.status 1.1.0a3
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Index: ltmain.sh
===================================================================
RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ltmain.sh 27 Feb 2007 02:57:24 -0000 1.12
+++ ltmain.sh 20 Mar 2007 18:46:45 -0000 1.13
@@ -46,10 +46,16 @@
VERSION=1.5.22
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
# Check that we have a working $echo.
@@ -105,12 +111,14 @@
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ fi"
+done
# Make sure IFS has a sensible default
lt_nl='
@@ -136,6 +144,8 @@
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
#####################################
# Shell function definitions:
@@ -327,7 +337,17 @@
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ extracted_serial=`expr $extracted_serial + 1`
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
@@ -758,6 +778,7 @@
*.f90) xform=f90 ;;
*.for) xform=for ;;
*.java) xform=java ;;
+ *.obj) xform=obj ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -1138,8 +1159,9 @@
for arg
do
case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
@@ -1147,12 +1169,20 @@
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
- else
+ ;;
+ -static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
- fi
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
build_libtool_libs=no
build_old_libs=yes
break
@@ -1712,7 +1742,7 @@
continue
;;
- -static)
+ -static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -2490,7 +2520,9 @@
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -3186,7 +3218,7 @@
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows)
+ darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3410,11 +3442,11 @@
fi
# Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
- deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
- done
+# for path in $notinst_path; do
+# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+# done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3515,13 +3547,12 @@
int main() { return 0; }
EOF
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
+ if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3560,9 +3591,7 @@
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3594,7 +3623,7 @@
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -4239,12 +4268,14 @@
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4692,16 +4723,16 @@
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
else
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
fi
;;
* )
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
;;
esac
;;
@@ -4716,13 +4747,13 @@
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
@@ -4809,7 +4840,7 @@
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
@@ -4846,7 +4877,7 @@
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
@@ -5253,6 +5284,18 @@
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5395,7 +5438,7 @@
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ \$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
@@ -5581,7 +5624,7 @@
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5926,9 +5969,9 @@
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6137,7 +6180,7 @@
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -6413,12 +6456,15 @@
fi
# Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6775,9 +6821,9 @@
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6791,9 +6837,11 @@
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
17 years, 1 month
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-db2bak.in, 1.5, 1.6 template-db2bak.pl.in, 1.6, 1.7 template-db2ldif.in, 1.5, 1.6 template-db2ldif.pl.in, 1.5, 1.6
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8852
Modified Files:
template-db2bak.in template-db2bak.pl.in template-db2ldif.in
template-db2ldif.pl.in
Log Message:
Resolves: #233027
Summary: make db2bak.pl & db2ldif.pl user more user-friendly (Comment #4)
Changes:
1) Found db2bak, db2bak.pl, and db2ldif do not backup/export into the dir/file
which do not start with the <server-id> string. It could cause the difficulty
to find out which server instance does the backup/exported file belongs to.
Also, to make them consistent with db2ldif.pl, added the "server id" string to
the back up dir name/exported ldif file name.
2) db2ldif[.pl] takes -M option. With the -M option, the server adds backend
name to the ldif file name. To reduce the redundancy, stopped adding the
backend name if -M is set.
3) made the ldif file name db2ldif generates consistent with the one db2ldif.pl
generates.
Index: template-db2bak.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2bak.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-db2bak.in 12 Feb 2007 19:55:10 -0000 1.5
+++ template-db2bak.in 20 Mar 2007 01:15:32 -0000 1.6
@@ -17,7 +17,8 @@
then
bak_dir=$1
else
- bak_dir={{BAK-DIR}}/`date +%Y_%m_%d_%H_%M_%S`
+ bak_dir={{BAK-DIR}}/{{SERV-ID}}-`date +%Y_%m_%d_%H_%M_%S`
fi
+echo "Back up directory: $bak_dir"
./ns-slapd db2archive -D {{CONFIG-DIR}} -a $bak_dir
Index: template-db2bak.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2bak.pl.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-db2bak.pl.in 19 Mar 2007 23:01:39 -0000 1.6
+++ template-db2bak.pl.in 20 Mar 2007 01:15:32 -0000 1.7
@@ -105,7 +105,7 @@
$mn++; $yr += 1900;
$taskname = "backup_${yr}_${mn}_${dy}_${h}_${m}_${s}";
if ($archivedir eq "") {
- $archivedir = "${mybakdir}{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}";
+ $archivedir = "${mybakdir}{{SEP}}{{SERV-ID}}-${yr}_${mn}_${dy}_${h}_${m}_${s}";
}
$dn = "dn: cn=$taskname, cn=backup, cn=tasks, cn=config\n";
$misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n";
Index: template-db2ldif.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2ldif.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-db2ldif.in 12 Feb 2007 19:55:10 -0000 1.5
+++ template-db2ldif.in 20 Mar 2007 01:15:32 -0000 1.6
@@ -12,34 +12,62 @@
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
+make_ldiffile()
+{
+ nobe=0
+ while [ "$1" != "" ]
+ do
+ if [ "$1" = '-a' ]; then
+ shift
+ echo $1
+ return 1
+ elif [ "$1" = '-n' ]; then
+ shift
+ if [ "$be" = "" ]; then
+ be="$1"
+ else
+ tmpbe="$be"
+ be="${tmpbe}-$1"
+ fi
+ elif [ "$1" = '-s' ]; then
+ shift
+ rdn=`echo $1 | awk -F, '{print $1}'`
+ rdnval=`echo $rdn | awk -F= '{print $2}'`
+ if [ "$be" = "" ]; then
+ be="$rdnval"
+ else
+ tmpbe="$be"
+ be="${tmpbe}-$rdnval"
+ fi
+ elif [ "$1" = '-M' ]; then
+ nobe=1
+ fi
+ shift
+ done
+
+ if [ $nobe -eq 0 ]; then
+ echo {{LDIF-DIR}}/{{SERV-ID}}-${be}-`date +%Y_%m_%d_%H%M%S`.ldif
+ else
+ echo {{LDIF-DIR}}/{{SERV-ID}}-`date +%Y_%m_%d_%H%M%S`.ldif
+ fi
+ return 0
+}
+
cd {{SERVERBIN-DIR}}
if [ "$#" -lt 2 ];
then
- echo "Usage: db2ldif {-n backend_instance}* | {-s includesuffix}*"
- echo " [{-x excludesuffix}*] [-a outputfile]"
- echo " [-N] [-r] [-C] [-u] [-U] [-m] [-M] [-1]"
- echo "Note: either \"-n backend_instance\" or \"-s includesuffix\" is required."
- exit 1
+ echo "Usage: db2ldif {-n backend_instance}* | {-s includesuffix}*"
+ echo " [{-x excludesuffix}*] [-a outputfile]"
+ echo " [-N] [-r] [-C] [-u] [-U] [-m] [-M] [-1]"
+ echo "Note: either \"-n backend_instance\" or \"-s includesuffix\" is required."
+ exit 1
fi
-set_ldif=0
-ldif_file="mydummy"
-for arg in "$@"
-do
- if [ "$arg" = '-a' ];
- then
- set_ldif=1
- elif [ $set_ldif -eq 1 ];
- then
- ldif_file=$arg
- set_ldif=2
- fi
-done
-if [ $ldif_file = "mydummy" ]
-then
- ldif_file={{LDIF-DIR}}/`date +%Y_%m_%d_%H%M%S`.ldif
-fi
-if [ $set_ldif -eq 2 ]
+ldif_file=`make_ldiffile $@`
+rn=$?
+
+echo "Exported ldif file: $ldif_file"
+if [ $rn -eq 1 ]
then
./ns-slapd db2ldif -D {{CONFIG-DIR}} "$@"
else
Index: template-db2ldif.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2ldif.pl.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-db2ldif.pl.in 19 Mar 2007 23:01:39 -0000 1.5
+++ template-db2ldif.pl.in 20 Mar 2007 01:15:32 -0000 1.6
@@ -230,7 +230,11 @@
$i++;
}
if ($ldiffile eq "") {
- $ldiffile = "${ldifdir}{{SEP}}${servid}-${be}-${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
+ if ($onefile == 0) {
+ $ldiffile = "${ldifdir}{{SEP}}${servid}-${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
+ } else {
+ $ldiffile = "${ldifdir}{{SEP}}${servid}-${be}-${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
+ }
}
$nsreplica = "";
if ($doreplica != 0) { $nsreplica = "nsExportReplica: true\n"; }
17 years, 1 month
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-db2bak.pl.in, 1.5, 1.6 template-db2ldif.pl.in, 1.4, 1.5
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19867
Modified Files:
template-db2bak.pl.in template-db2ldif.pl.in
Log Message:
Resolves: #233027
Summary: make db2bak.pl & db2ldif.pl user more user-friendly
Index: template-db2bak.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2bak.pl.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-db2bak.pl.in 19 Mar 2007 17:49:53 -0000 1.5
+++ template-db2bak.pl.in 19 Mar 2007 23:01:39 -0000 1.6
@@ -118,6 +118,7 @@
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+print("Back up directory: $archivedir\n");
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
Index: template-db2ldif.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2ldif.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-db2ldif.pl.in 12 Feb 2007 19:55:10 -0000 1.4
+++ template-db2ldif.pl.in 19 Mar 2007 23:01:39 -0000 1.5
@@ -195,22 +195,32 @@
($s, $m, $h, $dy, $mn, $yr, $wdy, $ydy, $r) = localtime(time);
$mn++; $yr += 1900;
$taskname = "export_${yr}_${mn}_${dy}_${h}_${m}_${s}";
-if ($ldiffile eq "") {
- $ldiffile = "${ldifdir}{{SEP}}${servid}-${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
-}
$dn = "dn: cn=$taskname, cn=export, cn=tasks, cn=config\n";
$misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n";
$cn = "cn: $taskname\n";
$i = 0;
+$be = "";
$nsinstance = "";
while ("" ne "$instances[$i]") {
$nsinstance = "${nsinstance}nsInstance: $instances[$i]\n";
+ if ( "" eq "$be" ) {
+ $be = "$instances[$i]";
+ } else {
+ $be = "${be}-$instances[$i]";
+ }
$i++;
}
$i = 0;
$nsincluded = "";
while ("" ne "$included[$i]") {
$nsincluded = "${nsincluded}nsIncludeSuffix: $included[$i]\n";
+ my ($rdn, $rest) = split(/,/, $included[$i]);
+ my ($rest, $tmpbe) = split(/=/, $rdn);
+ if ( "" eq "$be" ) {
+ $be = "$tmpbe";
+ } else {
+ $be = "${be}-$tmpbe";
+ }
$i++;
}
$i = 0;
@@ -219,6 +229,9 @@
$nsexcluded = "${nsexcluded}nsExcludeSuffix: $excluded[$i]\n";
$i++;
}
+if ($ldiffile eq "") {
+ $ldiffile = "${ldifdir}{{SEP}}${servid}-${be}-${yr}_${mn}_${dy}_${h}_${m}_${s}.ldif";
+}
$nsreplica = "";
if ($doreplica != 0) { $nsreplica = "nsExportReplica: true\n"; }
$nsnobase64 = "";
@@ -245,6 +258,7 @@
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+print("Exported ldif file: ${ldiffile}\n");
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
17 years, 1 month
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-db2bak.pl.in, 1.4, 1.5
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20172
Modified Files:
template-db2bak.pl.in
Log Message:
Resolves: 232746
Summary: template file for db2bak.pl fails due to variable/path mismatches
Index: template-db2bak.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-db2bak.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-db2bak.pl.in 12 Feb 2007 19:55:10 -0000 1.4
+++ template-db2bak.pl.in 19 Mar 2007 17:49:53 -0000 1.5
@@ -105,7 +105,7 @@
$mn++; $yr += 1900;
$taskname = "backup_${yr}_${mn}_${dy}_${h}_${m}_${s}";
if ($archivedir eq "") {
- $archivedir = "${bakdir}{{SEP}}bak{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}";
+ $archivedir = "${mybakdir}{{SEP}}${yr}_${mn}_${dy}_${h}_${m}_${s}";
}
$dn = "dn: cn=$taskname, cn=backup, cn=tasks, cn=config\n";
$misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n";
17 years, 1 month
[Fedora-directory-commits] ldapserver/ldap/admin/src create_instance.c, 1.50, 1.51
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13898
Modified Files:
create_instance.c
Log Message:
The line to create db2bak.pl was missing...
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- create_instance.c 2 Mar 2007 22:37:25 -0000 1.50
+++ create_instance.c 17 Mar 2007 00:07:09 -0000 1.51
@@ -1918,6 +1918,9 @@
t = CREATE_DB2LDIF();
if(t) return t;
+ t = CREATE_DB2BAK();
+ if(t) return t;
+
t = CREATE_BAK2DB();
if(t) return t;
17 years, 1 month
[Fedora-directory-commits] ldapserver/wrappers initscript.in, 1.4, 1.5
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/wrappers
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9059/ldapserver/wrappers
Modified Files:
initscript.in
Log Message:
Resolves: bug 232684
Description: need initscripts for Solaris
Fix Description: I messed up the linux init script - turns out linux echo doesn't like \c, so I created a echo_n() function which is stolen from configure. I had to add @ECHO_N@ and @ECHO_C@ to Makefile.am and have them replaced in initscript.in.
Index: initscript.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/wrappers/initscript.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- initscript.in 16 Mar 2007 20:29:57 -0000 1.4
+++ initscript.in 16 Mar 2007 23:06:58 -0000 1.5
@@ -26,18 +26,24 @@
exit 0
fi
+# Solaris echo cannot use -n - linux echo by default cannot use \c
+echo_n()
+{
+ echo @ECHO_N@ "$*@ECHO_C@"
+}
+
# failure and success are not defined on some platforms
type failure > /dev/null 2>&1 || {
failure()
{
- echo " FAILED\c"
+ echo_n " FAILED"
}
}
type success > /dev/null 2>&1 || {
success()
{
- echo " SUCCESS\c"
+ echo_n " SUCCESS"
}
}
@@ -96,7 +102,7 @@
fi
done
if [ "$2" != "$INSTANCES" ]; then
- echo "$2 is an invalid @package_name@ instance\c"
+ echo_n "$2 is an invalid @package_name@ instance"
failure; echo
exit 1
fi
@@ -111,7 +117,7 @@
errors=0
successes=0
for instance in $INSTANCES; do
- echo " $instance...\c"
+ echo_n " $instance..."
# the server creates pidfile and writes the pid to it when it is fully
# started and available to serve clients
pidfile=$piddir/slapd-$instance.pid
@@ -123,12 +129,12 @@
if [ -f $pidfile ]; then
pid=`cat $pidfile`
if kill -0 $pid > /dev/null 2>&1 ; then
- echo " already running\c"
+ echo_n " already running"
success; echo
successes=`expr $successes + 1`
server_running=1
else
- echo " not running, but pid file exists - attempt to start anyway...\c"
+ echo_n " not running, but pid file exists - attempt to start anyway..."
rm -f $pidfile
fi
fi
@@ -136,7 +142,7 @@
if [ $server_running -eq 0 ] ; then
rm -f $pidfile
rm -f $startpidfile
- fix_pid_dir_ownership $instbase/slapd-$instance
+ fix_pid_dir_ownership $instbase/slapd-$instance
$exec -D $instbase/slapd-$instance -i $pidfile -w $startpidfile
if [ $? -eq 0 ]; then
server_started=1 # well, perhaps not running, but started ok
@@ -212,7 +218,7 @@
pidfile=$piddir/slapd-$instance.pid
if [ -f $pidfile ]; then
pid=`cat $pidfile`
- echo " $instance...\c"
+ echo_n " $instance..."
server_stopped=0
if kill -0 $pid > /dev/null 2>&1 ; then
kill $pid
@@ -249,7 +255,7 @@
fi
done
if [ $errors -ge 1 ]; then
- echo "*** Error: $errors instance(s) unsuccessfully stopped\c"
+ echo_n "*** Error: $errors instance(s) unsuccessfully stopped"
failure; echo
else
rm -f $lockfile
@@ -286,7 +292,7 @@
[ ! -f $lockfile ] || restart
;;
*)
- echo Unknown command $1
+ echo Unknown command $1
echo "Usage: $0 {start|stop|status|restart|condrestart} [instance-name]"
exit 2
esac
17 years, 1 month