On Thu, 17 Nov 2011, Rob Crittenden wrote:
> Alexander Bokovoy wrote:
> >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.
> I wonder if we should @echo something about DESTDIR not set so we
> aren't creating the directories.
How about attached variant?
/ Alexander Bokovoy
>From b685d68ba19d6f9a328e8984a65982d6ca300e2a Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <aboko...@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
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
Makefile | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
@@ -68,7 +68,7 @@ install: all server-install
(cd $$subdir && $(MAKE) $@) || exit 1; \
+client-install: client client-dirs
@for subdir in $(CLIENTDIRS); do \
(cd $$subdir && $(MAKE) install) || exit 1; \
@@ -79,6 +79,15 @@ client-install: client
python setup-client.py install --root $(DESTDIR); \
+ @if [ "$(DESTDIR)" != "" ] ; then \
+ mkdir -p $(DESTDIR)/etc/ipa ; \
+ mkdir -p $(DESTDIR)/var/lib/ipa-client/sysrestore ; \
+ else \
+ echo "DESTDIR was not set, please create /etc/ipa and
/var/lib/ipa-client/sysrestore" ; \
+ echo "Without those directories ipa-client-install will fail" ;
Freeipa-devel mailing list