Commit 932fbcc0 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[bug] "make install" with unprivileged user fails with nonexisting "/bin/true".

- Some platforms (at releast macOS) has only "/usr/bin/true".
parent 84df8d33
...@@ -94,9 +94,9 @@ authorcheck: ...@@ -94,9 +94,9 @@ authorcheck:
install-data-hook: installdir installconfig nextstep importantchanges install-data-hook: installdir installconfig nextstep importantchanges
if SMTPC if SMTPC
-chown $(USER) $(DESTDIR)$(libexecdir)/sympa_smtpc -@chown $(USER) $(DESTDIR)$(libexecdir)/sympa_smtpc
-chgrp $(GROUP) $(DESTDIR)$(libexecdir)/sympa_smtpc -@chgrp $(GROUP) $(DESTDIR)$(libexecdir)/sympa_smtpc
-chmod 750 $(DESTDIR)$(libexecdir)/sympa_smtpc -@chmod 750 $(DESTDIR)$(libexecdir)/sympa_smtpc
endif endif
installdir: installdir:
...@@ -108,7 +108,7 @@ installdir: ...@@ -108,7 +108,7 @@ installdir:
fi; \ fi; \
done done
@echo "Creating writable directories" @echo "Creating writable directories"
@for dir in $(expldir) $(spooldir) $(spooldir)/msg $(spooldir)/digest \ -@for dir in $(expldir) $(spooldir) $(spooldir)/msg $(spooldir)/digest \
$(spooldir)/moderation $(spooldir)/auth \ $(spooldir)/moderation $(spooldir)/auth \
$(spooldir)/outgoing $(spooldir)/tmp $(spooldir)/task \ $(spooldir)/outgoing $(spooldir)/tmp $(spooldir)/task \
$(spooldir)/bulk \ $(spooldir)/bulk \
...@@ -117,8 +117,8 @@ installdir: ...@@ -117,8 +117,8 @@ installdir:
echo "Creating $(DESTDIR)$$dir"; \ echo "Creating $(DESTDIR)$$dir"; \
$(INSTALL) -d -m 755 $(DESTDIR)$$dir; \ $(INSTALL) -d -m 755 $(DESTDIR)$$dir; \
fi; \ fi; \
chown $(USER) $(DESTDIR)$$dir || /bin/true; \ chown $(USER) $(DESTDIR)$$dir; \
chgrp $(GROUP) $(DESTDIR)$$dir || /bin/true; \ chgrp $(GROUP) $(DESTDIR)$$dir; \
done done
sympa_wizard.pl.inst: $(top_srcdir)/src/sbin/sympa_wizard.pl.in Makefile sympa_wizard.pl.inst: $(top_srcdir)/src/sbin/sympa_wizard.pl.in Makefile
...@@ -129,38 +129,37 @@ sympa_wizard.pl.inst: $(top_srcdir)/src/sbin/sympa_wizard.pl.in Makefile ...@@ -129,38 +129,37 @@ sympa_wizard.pl.inst: $(top_srcdir)/src/sbin/sympa_wizard.pl.in Makefile
installconfig: installdir sympa_wizard.pl.inst installconfig: installdir sympa_wizard.pl.inst
@echo "Installing basic configuration ..." @echo "Installing basic configuration ..."
export PERL5LIB=$(DESTDIR)$(modulesdir); \ -@export PERL5LIB=$(DESTDIR)$(modulesdir); \
if [ ! -f $(DESTDIR)$(confdir)/sympa.conf ]; then \ if [ ! -f $(DESTDIR)$(confdir)/sympa.conf ]; then \
echo "This looks like your first Sympa installation. The following wizard will assist you to create your first Sympa configuration.";\ echo "This looks like your first Sympa installation. The following wizard will assist you to create your first Sympa configuration.";\
if [ ! -d $(DESTDIR)$(confdir) ]; then \ if [ ! -d $(DESTDIR)$(confdir) ]; then \
$(INSTALL) -d -m 755 $(DESTDIR)$(confdir); \ $(INSTALL) -d -m 755 $(DESTDIR)$(confdir); \
fi; \ fi; \
chown $(USER) $(DESTDIR)$(confdir) || /bin/true; \ chown $(USER) $(DESTDIR)$(confdir); \
chgrp $(GROUP) $(DESTDIR)$(confdir) || /bin/true; \ chgrp $(GROUP) $(DESTDIR)$(confdir); \
$(PERL) sympa_wizard.pl.inst \ $(PERL) sympa_wizard.pl.inst \
--create sympa.conf \ --create sympa.conf \
--target $(DESTDIR)$(confdir)/sympa.conf \ --target $(DESTDIR)$(confdir)/sympa.conf; \
|| /bin/true; \ chown $(USER) $(DESTDIR)$(confdir)/sympa.conf; \
chown $(USER) $(DESTDIR)$(confdir)/sympa.conf || /bin/true; \ chgrp $(GROUP) $(DESTDIR)$(confdir)/sympa.conf; \
chgrp $(GROUP) $(DESTDIR)$(confdir)/sympa.conf || /bin/true; \ fi
fi; \ -@if [ ! -f $(DESTDIR)$(sysconfdir)/data_structure.version ]; then \
if [ ! -f $(DESTDIR)$(sysconfdir)/data_structure.version ]; then \
cd $(DESTDIR)$(sysconfdir); \ cd $(DESTDIR)$(sysconfdir); \
echo "# automatically created file" >> data_structure.version; \ echo "# automatically created file" >> data_structure.version; \
echo "# you should not modify it" >> data_structure.version; \ echo "# you should not modify it" >> data_structure.version; \
echo $(VERSION) >> data_structure.version; \ echo $(VERSION) >> data_structure.version; \
chown $(USER) data_structure.version || /bin/true; \ chown $(USER) data_structure.version; \
chgrp $(GROUP) data_structure.version || /bin/true; \ chgrp $(GROUP) data_structure.version; \
fi fi
@for dir in create_list_templates custom_actions custom_conditions \ -@for dir in create_list_templates custom_actions custom_conditions \
data_sources families global_task_models list_task_models \ data_sources families global_task_models list_task_models \
mail_tt2 scenari search_filters web_tt2; do \ mail_tt2 scenari search_filters web_tt2; do \
if [ ! -d $(DESTDIR)$(sysconfdir)/$$dir ] ; then \ if [ ! -d $(DESTDIR)$(sysconfdir)/$$dir ] ; then \
echo "Creating $(DESTDIR)$(sysconfdir)/$$dir"; \ echo "Creating $(DESTDIR)$(sysconfdir)/$$dir"; \
$(INSTALL) -d -m 755 $(DESTDIR)$(sysconfdir)/$$dir; \ $(INSTALL) -d -m 755 $(DESTDIR)$(sysconfdir)/$$dir; \
fi; \ fi; \
chown $(USER) $(DESTDIR)$(sysconfdir)/$$dir || /bin/true; \ chown $(USER) $(DESTDIR)$(sysconfdir)/$$dir; \
chgrp $(GROUP) $(DESTDIR)$(sysconfdir)/$$dir || /bin/true; \ chgrp $(GROUP) $(DESTDIR)$(sysconfdir)/$$dir; \
done done
@if [ ! -e $(DESTDIR)$(sysconfdir)/README ]; then \ @if [ ! -e $(DESTDIR)$(sysconfdir)/README ]; then \
echo "Creating $(DESTDIR)$(sysconfdir)/README"; \ echo "Creating $(DESTDIR)$(sysconfdir)/README"; \
...@@ -192,7 +191,7 @@ nextstep: ...@@ -192,7 +191,7 @@ nextstep:
@echo "#######################################################" @echo "#######################################################"
importantchanges: importantchanges:
if test -f $(top_srcdir)/previous_sympa_version; then \ @if test -f $(top_srcdir)/previous_sympa_version; then \
export PREVIOUS=`$(CAT) $(top_srcdir)/previous_sympa_version`; \ export PREVIOUS=`$(CAT) $(top_srcdir)/previous_sympa_version`; \
fi; \ fi; \
$(PERL) $(top_srcdir)/important_changes.pl \ $(PERL) $(top_srcdir)/important_changes.pl \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment