diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-11-05 17:57:44 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-11-18 20:49:48 +0100 |
commit | f9ac9aa5760210b8bbd3d4e667dff5f101f99d62 (patch) | |
tree | e6b24e7c844b08b4630f20e50b4842a65e17f1be /Makefile.am | |
parent | 35b4b217fa2b91bfc8d58c47024faf41c95fc807 (diff) | |
download | sssd-f9ac9aa5760210b8bbd3d4e667dff5f101f99d62.tar.gz sssd-f9ac9aa5760210b8bbd3d4e667dff5f101f99d62.tar.xz sssd-f9ac9aa5760210b8bbd3d4e667dff5f101f99d62.zip |
BUILD: Use separate chown to make changing ownership to the sssd user non-fatal
When the SSSD is built in the build system using a non-root user, the
user doesn't exist in the build system and file ownership will be
maintained by the downstream packaging instead.
We need to make sure that setting the ownership to the sssd user is a
separate step from creating the directories in this case in order to
make failure to set the ownership non-fatal.
Related:
https://fedorahosted.org/sssd/ticket/2370
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am index 5325d51e7..6ce3a42f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -82,11 +82,6 @@ INSTALL = @INSTALL@ SSSD_USER = @SSSD_USER@ -INSTALL_USER_DIR_FLAGS = -d -if SSSD_USER -INSTALL_USER_DIR_FLAGS += -o $(SSSD_USER) -g $(SSSD_USER) -endif - AM_CFLAGS = if WANT_AUX_INFO AM_CFLAGS += -aux-info $@.X @@ -2798,6 +2793,18 @@ src/sysv/systemd/journal.conf: src/sysv/systemd/journal.conf.in Makefile @$(MKDIR_P) src/sysv/systemd/ $(replace_script) +SSSD_USER_DIRS = \ + $(DESTDIR)$(dbpath) \ + $(DESTDIR)$(mcpath) \ + $(DESTDIR)$(pipepath) \ + $(DESTDIR)$(pipepath)/private \ + $(DESTDIR)$(pubconfpath) \ + $(DESTDIR)$(pubconfpath)/krb5.include.d \ + $(DESTDIR)$(gpocachepath) \ + $(DESTDIR)$(sssdconfdir) \ + $(DESTDIR)$(logpath) \ + $(NULL) + installsssddirs:: $(MKDIR_P) \ $(DESTDIR)$(includedir) \ @@ -2815,18 +2822,12 @@ installsssddirs:: $(DESTDIR)$(sssddatadir) \ $(DESTDIR)$(sudolibdir) \ $(DESTDIR)$(autofslibdir) \ - $(NULL); \ - $(INSTALL) $(INSTALL_USER_DIR_FLAGS) \ - $(DESTDIR)$(dbpath) \ - $(DESTDIR)$(mcpath) \ - $(DESTDIR)$(pipepath) \ - $(DESTDIR)$(pipepath)/private \ - $(DESTDIR)$(pubconfpath) \ - $(DESTDIR)$(pubconfpath)/krb5.include.d \ - $(DESTDIR)$(gpocachepath) \ - $(DESTDIR)$(sssdconfdir) \ - $(DESTDIR)$(logpath) \ - $(NULL) + $(SSSD_USER_DIRS) \ + $(NULL); +if SSSD_USER + -chown $(SSSD_USER):$(SSSD_USER) \ + $(SSSD_USER_DIRS) +endif if HAVE_DOXYGEN docs: |