mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-16 18:35:01 -06:00
Karl MacMillan wrote:
> > This largish patch makes the build and installation work on 64bit > > machines. The only catch here is that to get a 64bit build you need to > > set LIBDIR on make: > > > > make install LIBDIR=/usr/lib64 > > > > The spec file does this correctly. I couldn't find any reliable way to > > guess this that works both on real systems and in the almost entirely > > empty rpm build root (you can't, for example, check for the existence > > of /usr/lib64).
This commit is contained in:
parent
aaa992b744
commit
d2a19b2009
9
Makefile
9
Makefile
@ -4,9 +4,6 @@ PRJ_PREFIX=freeipa
|
||||
|
||||
RPMBUILD ?= $(PWD)/rpmbuild
|
||||
|
||||
# set to 1 to produce a debug build of all subprojects
|
||||
#DEBUG=1
|
||||
|
||||
# Version numbers - this is for the entire server. After
|
||||
# updating this you should run the version-update
|
||||
# target.
|
||||
@ -38,12 +35,6 @@ CLI_VERSION=$(CLI_MAJOR).$(CLI_MINOR).$(CLI_RELEASE)
|
||||
CLI_TARBALL_PREFIX=$(PRJ_PREFIX)-client-$(CLI_VERSION)
|
||||
CLI_TARBALL=$(CLI_TARBALL_PREFIX).tgz
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
export CFLAGS = -g -Wall -Wshadow
|
||||
export LDFLAGS = -g
|
||||
endif
|
||||
|
||||
|
||||
all:
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
(cd $$subdir && $(MAKE) $@) || exit 1; \
|
||||
|
@ -1,10 +1,7 @@
|
||||
include Makefile.common
|
||||
|
||||
SUBDIRS=ipa-install xmlrpc-server ipa-kpasswd ipa-slapi-plugins ipa-gui
|
||||
|
||||
SHAREDIR=$(DESTDIR)/usr/share/ipa
|
||||
PYTHONDIR=$(SHAREDIR)/ipaserver
|
||||
SBINDIR=$(DESTDIR)/usr/sbin
|
||||
|
||||
|
||||
all:
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
(cd $$subdir && $(MAKE) $@) || exit 1; \
|
||||
|
21
ipa-server/Makefile.common
Normal file
21
ipa-server/Makefile.common
Normal file
@ -0,0 +1,21 @@
|
||||
# set to 1 to produce a debug build of all subprojects
|
||||
#export DEBUG=1
|
||||
|
||||
# set to 1 to build for 64bit
|
||||
#export BUILD64=0
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
export CFLAGS = -g -Wall -Wshadow
|
||||
export LDFLAGS = -g
|
||||
else
|
||||
export CFLAGS = -O2 -Wall -Wshadow
|
||||
endif
|
||||
|
||||
DIRSRV=dirsrv
|
||||
PREFIX?=$(DESTDIR)/usr
|
||||
LIBDIR?=$(DESTDIR)/usr/lib
|
||||
SHAREDIR?=$(PREFIX)/share/ipa
|
||||
PLUGINDIR?=$(LIBDIR)/$(DIRSRV)/plugins
|
||||
SBINDIR?=$(PREFIX)/sbin
|
||||
INITDIR?=$(DESTDIR)/etc/rc.d/init.d
|
||||
PYTHONDIR?=$(SHAREDIR)/ipaserver
|
@ -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
|
||||
|
||||
%define httpd_conf /etc/httpd/conf.d
|
||||
%define plugin_dir /usr/lib/dirsrv/plugins
|
||||
%define plugin_dir %{_libdir}/dirsrv/plugins
|
||||
|
||||
%description
|
||||
FreeIPA is a server for identity, policy, and audit.
|
||||
@ -31,7 +31,7 @@ rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
mkdir -p %{buildroot}%{plugin_dir}
|
||||
|
||||
make install DESTDIR=%{buildroot}
|
||||
make install DESTDIR=%{buildroot} LIBDIR=%{buildroot}%{_libdir}
|
||||
|
||||
|
||||
%clean
|
||||
|
@ -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
|
||||
|
||||
%define httpd_conf /etc/httpd/conf.d
|
||||
%define plugin_dir /usr/lib/dirsrv/plugins
|
||||
%define plugin_dir %{_libdir}/dirsrv/plugins
|
||||
|
||||
%description
|
||||
FreeIPA is a server for identity, policy, and audit.
|
||||
@ -31,7 +31,7 @@ rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
mkdir -p %{buildroot}%{plugin_dir}
|
||||
|
||||
make install DESTDIR=%{buildroot}
|
||||
make install DESTDIR=%{buildroot} LIBDIR=%{buildroot}%{_libdir}
|
||||
|
||||
|
||||
%clean
|
||||
|
@ -1,8 +1,6 @@
|
||||
SHAREDIR=$(DESTDIR)/usr/share/ipa
|
||||
SBINDIR=$(DESTDIR)/usr/sbin
|
||||
INITDIR = $(DESTDIR)/etc/rc.d/init.d
|
||||
include ../Makefile.common
|
||||
|
||||
IPAGUI_SUBDIRS=config forms helpers templates
|
||||
IPAGUI_SUBDIRS=config forms helpers templates subcontrollers
|
||||
STATIC_SUBDIRS=css images javascript
|
||||
|
||||
all: ;
|
||||
@ -20,6 +18,7 @@ install:
|
||||
done
|
||||
|
||||
install -m 644 ipagui/config/*.cfg $(SHAREDIR)/ipagui/config
|
||||
install -m 644 ipagui/templates/*.kid $(SHAREDIR)/ipagui/templates
|
||||
|
||||
-mkdir -p $(SHAREDIR)/ipagui/static
|
||||
@for subdir in $(STATIC_SUBDIRS); do \
|
||||
|
@ -1,5 +1,4 @@
|
||||
SHAREDIR=$(DESTDIR)/usr/share/ipa
|
||||
SBINDIR=$(DESTDIR)/usr/sbin
|
||||
include ../Makefile.common
|
||||
|
||||
all: ;
|
||||
|
||||
@ -7,9 +6,13 @@ install:
|
||||
-mkdir $(SBINDIR)
|
||||
install -m 755 ipa-server-install $(SBINDIR)
|
||||
install -m 755 ipa-server-setupssl $(SHAREDIR)
|
||||
$(MAKE) -C share $@
|
||||
|
||||
-mkdir -p $(SHAREDIR)
|
||||
install -m 644 share/*.ldif $(SHAREDIR)
|
||||
install -m 644 share/*.template $(SHAREDIR)
|
||||
|
||||
$(MAKE) -C test $@
|
||||
|
||||
clean:
|
||||
$(MAKE) -C share $@
|
||||
rm -f *~ *.pyc
|
||||
rm -f share/*~
|
||||
|
@ -128,10 +128,15 @@ def check_existing_installation():
|
||||
yesno = raw_input("Do you wish to remove it and create a new one? [no]: ")
|
||||
if not yesno or yesno.lower()[0] != "y":
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
run(["/sbin/service", "dirsrv", "stop"])
|
||||
except:
|
||||
pass
|
||||
for d in dirs:
|
||||
serverid = os.path.basename(d).split("slapd-", 1)[1]
|
||||
if serverid:
|
||||
erase_ds_instance_data (serverid)
|
||||
erase_ds_instance_data(serverid)
|
||||
|
||||
def get_fqdn():
|
||||
fqdn = ""
|
||||
@ -531,4 +536,7 @@ def main():
|
||||
|
||||
return 0
|
||||
|
||||
main()
|
||||
try:
|
||||
main()
|
||||
except Exception, e:
|
||||
print "Unexpected error - see ipaserver-install.log for details:\n %s" % str(e)
|
||||
|
@ -1,9 +0,0 @@
|
||||
SHAREDIR = $(DESTDIR)/usr/share/ipa
|
||||
|
||||
install:
|
||||
-mkdir -p $(SHAREDIR)
|
||||
install -m 644 *.ldif $(SHAREDIR)
|
||||
install -m 644 *.template $(SHAREDIR)
|
||||
|
||||
clean:
|
||||
rm -f *~
|
@ -1,9 +1,6 @@
|
||||
PREFIX ?= $(DESTDIR)/usr
|
||||
SBIN = $(PREFIX)/sbin
|
||||
INITDIR = $(DESTDIR)/etc/rc.d/init.d
|
||||
include ../Makefile.common
|
||||
|
||||
LDFLAGS +=-lkrb5 -llber -lldap
|
||||
CFLAGS ?= -g -Wall -Wshadow
|
||||
|
||||
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
|
||||
|
||||
@ -14,8 +11,9 @@ all: $(OBJS)
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
install:
|
||||
-mkdir -p $(SBIN)
|
||||
install -m 755 ipa_kpasswd $(SBIN)
|
||||
echo $(SBINDIR)
|
||||
-mkdir -p $(SBINDIR)
|
||||
install -m 755 ipa_kpasswd $(SBINDIR)
|
||||
-mkdir -p $(INITDIR)
|
||||
install -m 755 ipa-kpasswd.init $(INITDIR)/ipa-kpasswd
|
||||
|
||||
|
@ -1,12 +1,7 @@
|
||||
DIRSRV ?= dirsrv
|
||||
PREFIX ?= $(DESTDIR)/usr
|
||||
LIBDIR ?= $(PREFIX)/lib/$(DIRSRV)/plugins
|
||||
LIB64DIR ?= $(PREFIX)/lib64/$(DIRSRV)/plugins
|
||||
SHAREDIR = $(DESTDIR)/usr/share/ipa
|
||||
include ../../Makefile.common
|
||||
|
||||
SONAME = libipa-dna-plugin.so
|
||||
LDFLAGS += -llber
|
||||
CFLAGS ?= -g -Wall -Wshadow
|
||||
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))
|
||||
@ -18,12 +13,8 @@ all: $(OBJS)
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
install:
|
||||
-mkdir -p $(LIBDIR)
|
||||
if [ -e $(PREFIX)/lib/$(DIRSRV) ]; then \
|
||||
install -m 644 $(SONAME) $(LIBDIR); \
|
||||
else \
|
||||
install -m 644 $(SONAME) $(LIB64DIR); \
|
||||
fi
|
||||
mkdir -p $(PLUGINDIR); \
|
||||
install -m 644 $(SONAME) $(PLUGINDIR); \
|
||||
install -m 644 *.ldif $(SHAREDIR)
|
||||
|
||||
clean:
|
||||
|
@ -1,12 +1,7 @@
|
||||
DIRSRV ?= dirsrv
|
||||
PREFIX ?= $(DESTDIR)/usr
|
||||
LIBDIR ?= $(PREFIX)/lib/$(DIRSRV)/plugins
|
||||
LIB64DIR ?= $(PREFIX)/lib64/$(DIRSRV)/plugins
|
||||
SHAREDIR = $(DESTDIR)/usr/share/ipa
|
||||
include ../../Makefile.common
|
||||
|
||||
SONAME = libipa-memberof-plugin.so
|
||||
LDFLAGS += -llber
|
||||
CFLAGS ?= -g -Wall -Wshadow
|
||||
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))
|
||||
@ -18,12 +13,8 @@ all: $(OBJS)
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
install:
|
||||
-mkdir -p $(LIBDIR)
|
||||
if [ -e $(PREFIX)/lib/$(DIRSRV) ]; then \
|
||||
install -m 644 $(SONAME) $(LIBDIR); \
|
||||
else \
|
||||
install -m 644 $(SONAME) $(LIB64DIR); \
|
||||
fi
|
||||
mkdir -p $(PLUGINDIR); \
|
||||
install -m 644 $(SONAME) $(PLUGINDIR); \
|
||||
install -m 644 *.ldif $(SHAREDIR)
|
||||
|
||||
clean:
|
||||
|
@ -1,12 +1,7 @@
|
||||
DIRSRV ?= dirsrv
|
||||
PREFIX ?= $(DESTDIR)/usr
|
||||
LIBDIR = $(PREFIX)/lib/$(DIRSRV)/plugins
|
||||
LIB64DIR ?= $(PREFIX)/lib64/$(DIRSRV)/plugins
|
||||
SHAREDIR = $(DESTDIR)/usr/share/ipa
|
||||
include ../../Makefile.common
|
||||
|
||||
SONAME = libipa_pwd_extop.so
|
||||
LDFLAGS += -lkrb5 -llber -lldap -llber -lssl
|
||||
CFLAGS ?= -g -Wall -Wshadow
|
||||
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))
|
||||
@ -18,12 +13,8 @@ all: $(OBJS)
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
install:
|
||||
-mkdir -p $(LIBDIR)
|
||||
if [ -e $(PREFIX)/lib/$(DIRSRV) ]; then \
|
||||
install -m 644 $(SONAME) $(LIBDIR); \
|
||||
else \
|
||||
install -m 644 $(SONAME) $(LIB64DIR); \
|
||||
fi
|
||||
mkdir -p $(PLUGINDIR); \
|
||||
install -m 644 $(SONAME) $(PLUGINDIR); \
|
||||
install -m 644 *.ldif $(SHAREDIR)
|
||||
|
||||
clean:
|
||||
|
@ -214,7 +214,11 @@ class DsInstance:
|
||||
def change_admin_password(self, password):
|
||||
logging.debug("Changing admin password")
|
||||
dirname = self.config_dirname()
|
||||
args = ["/usr/lib/mozldap/ldappasswd",
|
||||
if dir_exists("/usr/lib64/mozldap"):
|
||||
app = "/usr/lib64/mozldap/ldappasswd"
|
||||
else:
|
||||
app = "/usr/lib/mozldap/ldappasswd"
|
||||
args = [app,
|
||||
"-D", "cn=Directory Manager", "-w", self.dm_password,
|
||||
"-P", dirname+"/cert8.db", "-ZZZ", "-s", password,
|
||||
"uid=admin,cn=sysaccounts,cn=etc,"+self.suffix]
|
||||
|
@ -202,7 +202,7 @@ class KrbInstance:
|
||||
def __create_ds_keytab(self):
|
||||
try:
|
||||
os.remove("/etc/dirsrv/ds.keytab")
|
||||
except os.OSError:
|
||||
except os.error :
|
||||
print "Failed to remove /etc/dirsrv/ds.keytab."
|
||||
(kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local")
|
||||
kwrite.write("addprinc -randkey ldap/"+self.fqdn+"@"+self.realm+"\n")
|
||||
@ -257,7 +257,7 @@ class KrbInstance:
|
||||
def __create_http_keytab(self):
|
||||
try:
|
||||
os.remove("/etc/httpd/conf/ipa.keytab")
|
||||
except os.OSError:
|
||||
except os.error:
|
||||
print "Failed to remove /etc/httpd/conf/ipa.keytab."
|
||||
(kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local")
|
||||
kwrite.write("addprinc -randkey HTTP/"+self.fqdn+"@"+self.realm+"\n")
|
||||
|
@ -1,13 +1,13 @@
|
||||
SHAREDIR = $(DESTDIR)/usr/share/ipa/ipaserver
|
||||
include ../Makefile.common
|
||||
|
||||
all: ;
|
||||
|
||||
install:
|
||||
-mkdir -p $(SHAREDIR)
|
||||
-mkdir -p $(SHAREDIR)/../html
|
||||
install -m 644 *.py $(SHAREDIR)
|
||||
install -m 644 ipa.conf $(SHAREDIR)/..
|
||||
install -m 644 *.html $(SHAREDIR)/../html
|
||||
-mkdir -p $(SHAREDIR)/html
|
||||
install -m 644 *.py $(SHAREDIR)/ipaserver
|
||||
install -m 644 ipa.conf $(SHAREDIR)
|
||||
install -m 644 *.html $(SHAREDIR)/html
|
||||
|
||||
clean:
|
||||
rm -f *~ *.pyc
|
||||
|
Loading…
Reference in New Issue
Block a user