in F7 all directory names have changed from fedora-ds to dirsrv

which should also be the name used in DS 8.0, change all occurences
This commit is contained in:
Simo Sorce 2007-08-15 19:45:18 -04:00
parent 9faa5ce77e
commit 1e59adbe45
9 changed files with 32 additions and 30 deletions

View File

@ -14,7 +14,7 @@ BuildRequires: fedora-ds-base-devel openldap-devel krb5-devel nss-devel mozldap-
Requires: python fedora-ds-base krb5-server krb5-server-ldap nss-tools openldap-clients httpd mod_python mod_auth_kerb python-ldap freeipa-python ntp cyrus-sasl-gssapi nss TurboGears Requires: python fedora-ds-base krb5-server krb5-server-ldap nss-tools openldap-clients httpd mod_python mod_auth_kerb python-ldap freeipa-python ntp cyrus-sasl-gssapi nss TurboGears
%define httpd_conf /etc/httpd/conf.d %define httpd_conf /etc/httpd/conf.d
%define plugin_dir /usr/lib/fedora-ds/plugins %define plugin_dir /usr/lib/dirsrv/plugins
%description %description
FreeIPA is a server for identity, policy, and audit. FreeIPA is a server for identity, policy, and audit.

View File

@ -123,7 +123,7 @@ def main():
run(["/sbin/chkconfig", "httpd", "on"]) run(["/sbin/chkconfig", "httpd", "on"])
# Set fedora-ds to start on boot # Set fedora-ds to start on boot
run(["/sbin/chkconfig", "fedora-ds", "on"]) run(["/sbin/chkconfig", "dirsrv", "on"])
# Set the KDC to start on boot # Set the KDC to start on boot
run(["/sbin/chkconfig", "krb5kdc", "on"]) run(["/sbin/chkconfig", "krb5kdc", "on"])

View File

@ -10,7 +10,7 @@ fi
if [ "$2" -a -d "$2" ] ; then if [ "$2" -a -d "$2" ] ; then
secdir="$2" secdir="$2"
else else
secdir=/etc/fedora-ds/slapd-localhost secdir=/etc/dirsrv/slapd-localhost
fi fi
if [ "$3" ] ; then if [ "$3" ] ; then

View File

@ -1,11 +1,11 @@
--- /etc/init.d/fedora-ds.orig 2007-07-06 18:21:30.000000000 -0400 --- /etc/init.d/dirsrv.orig 2007-07-06 18:21:30.000000000 -0400
+++ /etc/init.d/fedora-ds 2007-05-18 19:36:24.000000000 -0400 +++ /etc/init.d/dirsrv 2007-05-18 19:36:24.000000000 -0400
@@ -10,6 +10,9 @@ @@ -10,6 +10,9 @@
# datadir: /var/lib/fedora-ds/slapd-<instance name> # datadir: /var/lib/dirsrv/slapd-<instance name>
# #
+# Get config. +# Get config.
+[ -r /etc/sysconfig/fedora-ds ] && . /etc/sysconfig/fedora-ds +[ -r /etc/sysconfig/dirsrv ] && . /etc/sysconfig/dirsrv
+ +
# Source function library. # Source function library.
if [ -f /etc/rc.d/init.d/functions ] ; then if [ -f /etc/rc.d/init.d/functions ] ; then

View File

@ -1,12 +1,13 @@
DIRSRV ?= dirsrv
PREFIX ?= $(DESTDIR)/usr PREFIX ?= $(DESTDIR)/usr
LIBDIR ?= $(PREFIX)/lib/fedora-ds/plugins LIBDIR ?= $(PREFIX)/lib/$(DIRSRV)/plugins
LIB64DIR ?= $(PREFIX)/lib64/fedora-ds/plugins LIB64DIR ?= $(PREFIX)/lib64/$(DIRSRV)/plugins
SHAREDIR = $(DESTDIR)/usr/share/ipa SHAREDIR = $(DESTDIR)/usr/share/ipa
SONAME = libipa-memberof-plugin.so SONAME = libipa-memberof-plugin.so
LDFLAGS += -llber LDFLAGS += -llber
CFLAGS ?= -Wall -Wshadow -O2 CFLAGS ?= -Wall -Wshadow -O2
CFLAGS += -I/usr/include/fedora-ds -I/usr/include/nss3 -I/usr/include/mozldap -I/usr/include/nspr4 -fPIC -DPIC CFLAGS += -I/usr/include/$(DIRSRV) -I/usr/include/nss3 -I/usr/include/mozldap -I/usr/include/nspr4 -fPIC -DPIC
OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
@ -18,7 +19,7 @@ all: $(OBJS)
install: install:
-mkdir -p $(LIBDIR) -mkdir -p $(LIBDIR)
if [ -e $(PREFIX)/lib/fedora-ds ]; then \ if [ -e $(PREFIX)/lib/$(DIRSRV) ]; then \
install -m 644 $(SONAME) $(LIBDIR); \ install -m 644 $(SONAME) $(LIBDIR); \
else \ else \
install -m 644 $(SONAME) $(LIB64DIR); \ install -m 644 $(SONAME) $(LIB64DIR); \

View File

@ -1,12 +1,13 @@
DIRSRV ?= dirsrv
PREFIX ?= $(DESTDIR)/usr PREFIX ?= $(DESTDIR)/usr
LIBDIR = $(PREFIX)/lib/fedora-ds/plugins LIBDIR = $(PREFIX)/lib/$(DIRSRV)/plugins
LIB64DIR ?= $(PREFIX)/lib64/fedora-ds/plugins LIB64DIR ?= $(PREFIX)/lib64/$(DIRSRV)/plugins
SHAREDIR = $(DESTDIR)/usr/share/ipa SHAREDIR = $(DESTDIR)/usr/share/ipa
SONAME = libipa_pwd_extop.so SONAME = libipa_pwd_extop.so
LDFLAGS += -lkrb5 -llber -lldap -lmhash -llber -lssl LDFLAGS += -lkrb5 -llber -lldap -lmhash -llber -lssl
CFLAGS ?= -Wall -Wshadow -O2 CFLAGS ?= -Wall -Wshadow -O2
CFLAGS += -I/usr/include/fedora-ds -I/usr/include/nss3 -I/usr/include/mozldap -I/usr/include/nspr4 -fPIC -DPIC CFLAGS += -I/usr/include/$(DIRSRV) -I/usr/include/nss3 -I/usr/include/mozldap -I/usr/include/nspr4 -fPIC -DPIC
OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
@ -18,7 +19,7 @@ all: $(OBJS)
install: install:
-mkdir -p $(LIBDIR) -mkdir -p $(LIBDIR)
if [ -e $(PREFIX)/lib/fedora-ds ]; then \ if [ -e $(PREFIX)/lib/$(DIRSRV) ]; then \
install -m 644 $(SONAME) $(LIBDIR); \ install -m 644 $(SONAME) $(LIBDIR); \
else \ else \
install -m 644 $(SONAME) $(LIB64DIR); \ install -m 644 $(SONAME) $(LIB64DIR); \

View File

@ -61,7 +61,7 @@
#include <prio.h> #include <prio.h>
#include <ssl.h> #include <ssl.h>
#include <slapi-plugin.h> #include <dirsrv/slapi-plugin.h>
#include <krb5.h> #include <krb5.h>
#include <lber.h> #include <lber.h>
#include <time.h> #include <time.h>

View File

@ -28,8 +28,8 @@ from util import *
SHARE_DIR = "/usr/share/ipa/" SHARE_DIR = "/usr/share/ipa/"
SERVER_ROOT_64 = "/usr/lib64/fedora-ds-base" SERVER_ROOT_64 = "/usr/lib64/dirsrv"
SERVER_ROOT_32 = "/usr/lib/fedora-ds-base" SERVER_ROOT_32 = "/usr/lib/dirsrv"
def generate_serverid(): def generate_serverid():
@ -96,19 +96,19 @@ class DsInstance:
def config_dirname(self): def config_dirname(self):
if not self.serverid: if not self.serverid:
raise RuntimeError("serverid not set") raise RuntimeError("serverid not set")
return "/etc/fedora-ds/slapd-" + self.serverid + "/" return "/etc/dirsrv/slapd-" + self.serverid + "/"
def schema_dirname(self): def schema_dirname(self):
return self.config_dirname() + "/schema/" return self.config_dirname() + "/schema/"
def stop(self): def stop(self):
run(["/sbin/service", "fedora-ds", "stop"]) run(["/sbin/service", "dirsrv", "stop"])
def start(self): def start(self):
run(["/sbin/service", "fedora-ds", "start"]) run(["/sbin/service", "dirsrv", "start"])
def restart(self): def restart(self):
run(["/sbin/service", "fedora-ds", "restart"]) run(["/sbin/service", "dirsrv", "restart"])
def __setup_sub_dict(self): def __setup_sub_dict(self):
suffix = realm_to_suffix(self.realm_name) suffix = realm_to_suffix(self.realm_name)
@ -124,7 +124,7 @@ class DsInstance:
logging.debug("ds user %s exists" % self.ds_user) logging.debug("ds user %s exists" % self.ds_user)
except KeyError: except KeyError:
logging.debug("adding ds user %s" % self.ds_user) logging.debug("adding ds user %s" % self.ds_user)
args = ["/usr/sbin/useradd", "-c", "DS System User", "-d", "/var/lib/fedora-ds", "-M", "-r", "-s", "/sbin/nologin", self.ds_user] args = ["/usr/sbin/useradd", "-c", "DS System User", "-d", "/var/lib/dirsrv", "-M", "-r", "-s", "/sbin/nologin", self.ds_user]
run(args) run(args)
logging.debug("done adding user") logging.debug("done adding user")

View File

@ -173,17 +173,17 @@ class KrbInstance:
(kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local") (kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local")
kwrite.write("addprinc -randkey ldap/"+self.fqdn+"@"+self.realm+"\n") kwrite.write("addprinc -randkey ldap/"+self.fqdn+"@"+self.realm+"\n")
kwrite.flush() kwrite.flush()
kwrite.write("ktadd -k /etc/fedora-ds/ds.keytab ldap/"+self.fqdn+"@"+self.realm+"\n") kwrite.write("ktadd -k /etc/dirsrv/ds.keytab ldap/"+self.fqdn+"@"+self.realm+"\n")
kwrite.flush() kwrite.flush()
kwrite.close() kwrite.close()
kread.close() kread.close()
kerr.close() kerr.close()
cfg_fd = open("/etc/sysconfig/fedora-ds", "a") cfg_fd = open("/etc/sysconfig/dirsrv", "a")
cfg_fd.write("export KRB5_KTNAME=/etc/fedora-ds/ds.keytab\n") cfg_fd.write("export KRB5_KTNAME=/etc/dirsrv/ds.keytab\n")
cfg_fd.close() cfg_fd.close()
pent = pwd.getpwnam(self.ds_user) pent = pwd.getpwnam(self.ds_user)
os.chown("/etc/sysconfig/fedora-ds", pent.pw_uid, pent.pw_gid) os.chown("/etc/sysconfig/dirsrv", pent.pw_uid, pent.pw_gid)
def __export_kadmin_changepw_keytab(self): def __export_kadmin_changepw_keytab(self):
(kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local") (kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local")
@ -200,10 +200,10 @@ class KrbInstance:
kread.close() kread.close()
kerr.close() kerr.close()
cfg_fd = open("/etc/sysconfig/ipa-kpasswd", "a") cfg_fd = open("/etc/sysconfig/ipa-kpasswd", "a")
cfg_fd.write("export KRB5_KTNAME=/var/kerberos/krb5kdc/kpasswd.keytab\n") cfg_fd.write("export KRB5_KTNAME=/var/kerberos/krb5kdc/kpasswd.keytab\n")
cfg_fd.close() cfg_fd.close()
pent = pwd.getpwnam(self.ds_user) pent = pwd.getpwnam(self.ds_user)
os.chown("/etc/sysconfig/ipa-kpasswd", pent.pw_uid, pent.pw_gid) os.chown("/etc/sysconfig/ipa-kpasswd", pent.pw_uid, pent.pw_gid)
def __create_http_keytab(self): def __create_http_keytab(self):