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. > > > >https://fedorahosted.org/freeipa/ticket/1849 > > 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 /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 | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 318364ad2980580764908cd73801f47d80569ba7..baf6eee5c151a88e9a668b3e4c3da3b3b2687886 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,15 @@ 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 ; \ + 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" ; \ + fi + lint: ./make-lint $(LINT_OPTIONS) -- 1.7.7.2
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel