[Fedora-directory-commits] ldapserver/ldap/admin/src create_instance.c, 1.41, 1.42 create_instance.h, 1.13, 1.14 ds_newinst.pl, 1.11, 1.12 ds_newinst.pl.in, 1.1, 1.2
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Wed Feb 7 23:57:42 UTC 2007
- Previous message (by thread): [Fedora-directory-commits] ldapserver/m4 db.m4,1.6,1.7
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-bak2db, 1.1, 1.2 template-bak2db.in, 1.3, 1.4 template-db2bak, 1.1, 1.2 template-db2bak.in, 1.3, 1.4 template-db2index, 1.1, 1.2 template-db2index.in, 1.3, 1.4 template-db2ldif, 1.1, 1.2 template-db2ldif.in, 1.3, 1.4 template-ldif2db, 1.1, 1.2 template-ldif2db.in, 1.3, 1.4 template-restoreconfig, 1.1, 1.2 template-restoreconfig.in, 1.3, 1.4 template-saveconfig, 1.1, 1.2 template-saveconfig.in, 1.3, 1.4 template-start-slapd, 1.2, 1.3 template-start-slapd.in, 1.5, 1.6 template-stop-slapd, 1.2, 1.3 template-stop-slapd.in, 1.5, 1.6 template-suffix2instance, 1.1, 1.2 template-suffix2instance.in, 1.3, 1.4 template-upgradedb.in, 1.3, 1.4 template-vlvindex, 1.1, 1.2 template-vlvindex.in, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15984/ldapserver/ldap/admin/src
Modified Files:
create_instance.c create_instance.h ds_newinst.pl
ds_newinst.pl.in
Log Message:
esolves: bug 227618
Bug Description: FHS: move exes to _bindir; move ns-slapd to _sbindir
Reviewed by: many people (Thanks!)
Fix Description: In order to be more FHS compliant, we need to make the following changes:
1) move files executable by end users to _bindir (e.g. /usr/bin) - this means logconv.pl, ds_newinst, dbscan, etc.
2) move the server executable ns-slapd to _sbindir (e.g. /usr/sbin)
And, to be more packaging friendly, the additional changes:
3) move libback-ldbm to the plugins dir - it is a plugin
4) use the libtool -avoid-version flag with plugins - we don't need the .so.0.0.0 for plugins
I had to add support for sbindir and SBINDIR to create_instance and ds_newinst. We were using serverdir for 3 things - command line programs, server specific shared libs, and the server executable itself. These are now in 3 different places. The biggest change was to the scripts. I kept serverdir and SERVER-DIR to be the location of the server shared libs to avoid changing even more stuff. I had to add SERVERBIN-DIR to the scripts - this is the location of ns-slapd and is set by sbindir in create_instance (which defaults to SBINDIR from Makefile.am which defaults to $prefix/sbin in configure - whew).
I've tested instance creation with these diffs - everything seems to work fine.
5) reorder files in alphabetical order - suggested by nkinder
6) add $LDFLAGS to test in db.m4
7) touch all template/wrapper .in files to make them newer than their corresponding files
Platforms tested: RHEL4, FC6
Flag Day: no
Doc impact: Yes, but the docs will have to change quite a bit for all of the FHS related changes.
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- create_instance.c 26 Jan 2007 20:00:40 -0000 1.41
+++ create_instance.c 7 Feb 2007 23:57:39 -0000 1.42
@@ -312,6 +312,7 @@
conf->bak_dir = NULL;
conf->config_dir = NULL;
+ conf->sbindir = NULL;
conf->datadir = NULL;
conf->db_dir = NULL;
conf->docdir = NULL;
@@ -700,7 +701,7 @@
{
char myperl[PATH_SIZE];
char fn[PATH_SIZE], ofn[PATH_SIZE];
- const char *table[16][2];
+ const char *table[17][2];
if (PR_FAILURE == PR_Access(cs_path, PR_ACCESS_EXISTS)) {
printf("Notice: %s does not exist, skipping %s . . .\n", cs_path, name);
@@ -756,7 +757,9 @@
table[13][1] = cf->run_dir;
table[14][0] = "PRODUCT-NAME";
table[14][1] = PRODUCT_NAME;
- table[15][0] = table[15][1] = NULL;
+ table[15][0] = "SERVERBIN-DIR";
+ table[15][1] = cf->sbindir;
+ table[16][0] = table[16][1] = NULL;
if (generate_script(ofn, fn, NEWSCRIPT_MODE, table) != 0) {
return make_error("Could not write %s to %s (%s).", ofn, fn,
@@ -3219,7 +3222,7 @@
fprintf(f, "objectclass: nsSlapdPlugin\n");
fprintf(f, "objectclass: extensibleObject\n");
fprintf(f, "cn: ldbm database\n");
- fprintf(f, "nsslapd-pluginpath: %s/libback-ldbm%s\n", cf->sroot, shared_lib);
+ fprintf(f, "nsslapd-pluginpath: %s/libback-ldbm%s\n", cf->plugin_dir, shared_lib);
fprintf(f, "nsslapd-plugininitfunc: ldbm_back_init\n");
fprintf(f, "nsslapd-plugintype: database\n");
fprintf(f, "nsslapd-pluginenabled: on\n");
@@ -4229,6 +4232,7 @@
* cf->localstatedir: %{_localstatedir}
* cf->sysconfdir: %{_sysconfdir}
* cf->bindir: %{_bindir}
+ * cf->sbindir: %{_sbindir}
* cf->datadir: %{_datadir}
* cf->docdir: %{_docdir}
* cf->inst_dir: <sroot>/slapd-<servid>
@@ -4461,6 +4465,7 @@
cf->localstatedir = set_path_attribute("localstatedir", LOCALSTATEDIR, prefix);
cf->sysconfdir = set_path_attribute("sysconfdir", SYSCONFDIR, prefix);
cf->bindir = set_path_attribute("bindir", BINDIR, prefix);
+ cf->sbindir = set_path_attribute("sbindir", SBINDIR, prefix);
cf->datadir = set_path_attribute("datadir", DATADIR, prefix);
cf->docdir = set_path_attribute("docdir", DOCDIR, prefix);
Index: create_instance.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- create_instance.h 15 Nov 2006 17:17:39 -0000 1.13
+++ create_instance.h 7 Feb 2007 23:57:40 -0000 1.14
@@ -74,6 +74,9 @@
#ifndef BINDIR
#define BINDIR "/usr/bin"
#endif
+#ifndef SBINDIR
+#define SBINDIR "/usr/sbin"
+#endif
#ifndef DATADIR
#define DATADIR "/usr/share"
#endif
@@ -87,6 +90,9 @@
#ifndef BINDIR
#define BINDIR "/bin"
#endif
+#ifndef SBINDIR
+#define SBINDIR "/sbin"
+#endif
#ifndef DATADIR
#define DATADIR "/share"
#endif
@@ -101,6 +107,7 @@
#define SYSCONFDIR "\\etc"
#define LIBDIR "\\usr\\lib"
#define BINDIR "\\usr\\bin"
+#define SBINDIR "\\usr\\sbin"
#define DATADIR "\\usr\\share"
#define DOCDIR "\\usr\\doc"
#endif
@@ -110,6 +117,7 @@
char *localstatedir;
char *sysconfdir;
char *bindir;
+ char *sbindir;
char *datadir;
char *docdir;
Index: ds_newinst.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ds_newinst.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ds_newinst.pl 10 Nov 2006 04:24:25 -0000 1.11
+++ ds_newinst.pl 7 Feb 2007 23:57:40 -0000 1.12
@@ -190,6 +190,7 @@
$cgiargs{"localstatedir"} = $table{"slapd"}->{"localstatedir"};
$cgiargs{"sysconfdir"} = $table{"slapd"}->{"sysconfdir"};
$cgiargs{"bindir"} = $table{"slapd"}->{"bindir"};
+$cgiargs{"sbindir"} = $table{"slapd"}->{"sbindir"};
$cgiargs{"datadir"} = $table{"slapd"}->{"datadir"};
$cgiargs{"docdir"} = $table{"slapd"}->{"docdir"};
$cgiargs{"inst_dir"} = $table{"slapd"}->{"inst_dir"};
@@ -253,9 +254,13 @@
my $sroot = $cgiargs{sroot};
+my $prog = "/usr/bin/ds_newinst";
+if (! -x $prog) {
+ $prog = "/usr/lib/$brand_ds/ds_newinst";
+}
+
my $rc = &cgiFake($sroot, $verbose,
- $prefix . "/usr/lib/$brand_ds/ds_newinst",
- \%cgiargs);
+ $prog, \%cgiargs);
if (!$rc) {
print "Success! Your new directory server instance was created\n";
Index: ds_newinst.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/ds_newinst.pl.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ds_newinst.pl.in 13 Nov 2006 23:45:44 -0000 1.1
+++ ds_newinst.pl.in 7 Feb 2007 23:57:40 -0000 1.2
@@ -190,6 +190,7 @@
$cgiargs{"localstatedir"} = $table{"slapd"}->{"localstatedir"};
$cgiargs{"sysconfdir"} = $table{"slapd"}->{"sysconfdir"};
$cgiargs{"bindir"} = $table{"slapd"}->{"bindir"};
+$cgiargs{"sbindir"} = $table{"slapd"}->{"sbindir"};
$cgiargs{"datadir"} = $table{"slapd"}->{"datadir"};
$cgiargs{"docdir"} = $table{"slapd"}->{"docdir"};
$cgiargs{"inst_dir"} = $table{"slapd"}->{"inst_dir"};
@@ -253,9 +254,13 @@
my $sroot = $cgiargs{sroot};
+my $prog = "@bindir@/ds_newinst";
+if (! -x $prog) {
+ $prog = "@libdir@/$brand_ds/ds_newinst";
+}
+
my $rc = &cgiFake($sroot, $verbose,
- "@libdir@/$brand_ds/ds_newinst",
- \%cgiargs);
+ $prog, \%cgiargs);
if (!$rc) {
print "Success! Your new directory server instance was created\n";
- Previous message (by thread): [Fedora-directory-commits] ldapserver/m4 db.m4,1.6,1.7
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-bak2db, 1.1, 1.2 template-bak2db.in, 1.3, 1.4 template-db2bak, 1.1, 1.2 template-db2bak.in, 1.3, 1.4 template-db2index, 1.1, 1.2 template-db2index.in, 1.3, 1.4 template-db2ldif, 1.1, 1.2 template-db2ldif.in, 1.3, 1.4 template-ldif2db, 1.1, 1.2 template-ldif2db.in, 1.3, 1.4 template-restoreconfig, 1.1, 1.2 template-restoreconfig.in, 1.3, 1.4 template-saveconfig, 1.1, 1.2 template-saveconfig.in, 1.3, 1.4 template-start-slapd, 1.2, 1.3 template-start-slapd.in, 1.5, 1.6 template-stop-slapd, 1.2, 1.3 template-stop-slapd.in, 1.5, 1.6 template-suffix2instance, 1.1, 1.2 template-suffix2instance.in, 1.3, 1.4 template-upgradedb.in, 1.3, 1.4 template-vlvindex, 1.1, 1.2 template-vlvindex.in, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list