[Freeipa-devel] [PATCH] 0036 make install doesn't create needed directories

Alexander Bokovoy abokovoy at redhat.com
Thu Nov 17 09:20:29 UTC 2011


When installing client from source with 'make client-install'
some essential directories are not created which makes 
ipa-client-install to fail.

I have opted to allow creating /etc/ipa and 
/var/lib/ipa-client/sysrestore only if DESTDIR is specified.
Distributing ipa-client in source form is defeating purpose of 
FreeIPA, in most cases proper packaging should be preferred. What's 
important is to hint to packagers what directories should be 
essential, and thus created in $(DESTDIR). Even source-based 
distributions have one or another form of packaging that makes this 
issue less problematic.

https://fedorahosted.org/freeipa/ticket/1849
-- 
/ Alexander Bokovoy
-------------- next part --------------
>From 3bc661f7fdc8309600fbfd4b946d78c716258172 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy at redhat.com>
Date: Thu, 17 Nov 2011 10:45:15 +0200
Subject: [PATCH 3/3] Create directories for client install

When ``make client-install`` is called, create /etc/ipa and /var/lib/ipa-client/sysrestore
directories required for successful use of ipa-client-install.
Do it only if DESTDIR is set to help packagers to notice that these directories have to exist

https://fedorahosted.org/freeipa/ticket/1849
---
 Makefile |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 318364ad2980580764908cd73801f47d80569ba7..36fe5def8b13bb6d1bb104b250af18906ffe7ad8 100644
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ install: all server-install
 		(cd $$subdir && $(MAKE) $@) || exit 1; \
 	done
 
-client-install: client
+client-install: client client-dirs
 	@for subdir in $(CLIENTDIRS); do \
 		(cd $$subdir && $(MAKE) install) || exit 1; \
 	done
@@ -79,6 +79,12 @@ client-install: client
 		python setup-client.py install --root $(DESTDIR); \
 	fi
 
+client-dirs:
+	if [ "$(DESTDIR)" != "" ] ; then \
+		mkdir -p $(DESTDIR)/etc/ipa ; \
+		mkdir -p $(DESTDIR)/var/lib/ipa-client/sysrestore ; \
+	fi
+
 lint:
 	./make-lint $(LINT_OPTIONS)
 
-- 
1.7.7.2



More information about the Freeipa-devel mailing list