Commit 1664db82 authored by Vincent Ma's avatar Vincent Ma

Fixed bug#729, change files installed owned by user fossy.

git-svn-id: http://svn.code.sf.net/p/fossology/code/trunk/fossology@5938 a5643f74-2041-0410-a2b9-94ffef304a07
parent 32cfa338
......@@ -48,6 +48,10 @@ install: all $(INSTALLDIRS)
$(INSTALLDIRS):
$(INSTALL) -m 666 VERSION $(DESTDIR)$(CONFPATH)/VERSION
$(MAKE) -C $(@:install-%=%) install
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(CONFPATH)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(LIBEXECDIR)
uninstall: $(UNINSTALLDIRS)
$(UNINSTALLDIRS):
......
......@@ -88,7 +88,7 @@ PHPDIR=$(MODDIR)/php
#####################################################################
SHELL = /bin/sh
CC=gcc
INSTALL = /usr/bin/install -D
INSTALL = /usr/bin/install -D -g $(PROJECTGROUP) -o $(PROJECTUSER)
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = ${INSTALL} -m 644
......
......@@ -39,13 +39,16 @@ install: all
echo "Making configuration directories"; \
if [ ! -e $(DESTDIR)$(CONFPATH) ] ; then \
mkdir -p $(DESTDIR)$(CONFPATH); \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(CONFPATH); \
fi
if [ ! -e $(DESTDIR)$(CONFPATH)/mods-enabled ] ; then \
mkdir -p $(DESTDIR)$(CONFPATH)/mods-enabled; \
/bin/chmod 775 $(DESTDIR)$(CONFPATH)/mods-enabled; \
/bin/chmod 775 $(DESTDIR)$(CONFPATH)/mods-enabled; \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(CONFPATH)/mods-enabled; \
fi
if [ ! -e $(DESTDIR)$(CONFPATH)/conf ] ; then \
mkdir -p $(DESTDIR)$(CONFPATH)/conf; \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(CONFPATH)/conf; \
fi
echo "Installing configuration files..."
if [ ! -f $(DESTDIR)$(CONFPATH)/Db.conf -o "$(OVERWRITE)" ] ; then \
......
......@@ -35,7 +35,9 @@ $(FOLIB):
install: all
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent/
@mkdir -p $(CONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(CONFDIR)/mods-enabled
@if test ! -e $(CONFDIR)/mods-enabled/$(EXE); then \
ln -s $(MODDIR)/$(EXE) $(CONFDIR)/mods-enabled ; fi;
......
......@@ -27,6 +27,8 @@ all:
install: all
@echo "make $(MOD_NAME)/$(MOD_SUBDIR) install"
mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
uninstall:
......
......@@ -25,6 +25,8 @@ all:
install:
echo "make $(MOD_NAME)/$(MOD_SUBDIR) install"
mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
uninstall:
......
......@@ -43,6 +43,7 @@ install: all
$(INSTALL_DATA) VERSION $(DESTDIR)$(MODDIR)/$(MOD_NAME)/VERSION
$(INSTALL_DATA) $(MOD_NAME).conf $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_NAME).conf
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@if test ! -e $(DESTDIR)$(SYSCONFDIR)/mods-enabled/$(MOD_NAME); then \
ln -s $(MODDIR)/$(MOD_NAME) $(DESTDIR)$(SYSCONFDIR)/mods-enabled ; fi;
......
......@@ -64,6 +64,7 @@ $(FOLIB):
install: all
@echo "make buckets agent install"
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent
uninstall:
@echo "make buckets agent uninstall"
......
......@@ -38,6 +38,8 @@ install:
@echo "make install in $(DIR)"
mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)
uninstall:
@echo "make uninstall in $(DIR)"
......
......@@ -42,6 +42,7 @@ install: all
$(INSTALL_DATA) VERSION $(DESTDIR)$(MODDIR)/$(MOD_NAME)/VERSION
$(INSTALL_DATA) $(MOD_NAME).conf $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_NAME).conf
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@if test ! -e $(DESTDIR)$(SYSCONFDIR)/mods-enabled/$(MOD_NAME); then \
ln -s $(MODDIR)/$(MOD_NAME) $(DESTDIR)$(SYSCONFDIR)/mods-enabled ; fi;
......
......@@ -79,7 +79,7 @@ install: $(EXE)
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
$(INSTALL_DATA) copyright.dic $(DESTDIR)$(MODDIR)/$(EXE)/agent/
$(INSTALL_DATA) names.dic $(DESTDIR)$(MODDIR)/$(EXE)/agent/
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent/
uninstall:
@echo "make copyright agent uninstall"
......
......@@ -25,6 +25,8 @@ all:
install:
echo "make copyright ui install"
mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
uninstall:
......
......@@ -37,6 +37,8 @@ coverage:
install:
@echo "make install in $(DIR)"
@mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
uninstall:
......
......@@ -43,6 +43,7 @@ install: all
$(INSTALL_PROGRAM) mod_deps $(DESTDIR)$(MODDIR)/$(MOD_NAME)/mod_deps
$(INSTALL_DATA) $(MOD_NAME).conf $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_NAME).conf
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@if test ! -e $(DESTDIR)$(SYSCONFDIR)/mods-enabled/$(MOD_NAME); then \
ln -s $(MODDIR)/$(MOD_NAME) $(DESTDIR)$(SYSCONFDIR)/mods-enabled ; fi;
......
......@@ -40,7 +40,8 @@ delagent.o: util.c $(HDRS)
install: all
@echo "make delagent agent install"
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent
uninstall:
@echo "make delagent agent uninstall"
......
......@@ -24,6 +24,8 @@ all:
install:
@echo "make delagent ui install"
mkdir -p $(DESTDIR)$(MODDIR)/delagent/ui
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/delagent/ui
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/delagent
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/delagent/ui/
uninstall:
......
......@@ -35,6 +35,8 @@ install: all
mkdir -p $(DESTDIR)$(MODDIR)/lib/php; \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/lib/php; \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/lib; \
for file in $(FILES); do \
$(INSTALL_DATA) $$file $(DESTDIR)$(MODDIR)/lib/php/$$file; \
......
......@@ -44,6 +44,7 @@ install: all
$(INSTALL_PROGRAM) mod_deps $(DESTDIR)$(MODDIR)/$(MOD_NAME)/mod_deps
$(INSTALL_DATA) $(MOD_NAME).conf $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_NAME).conf
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@if test ! -e $(DESTDIR)$(SYSCONFDIR)/mods-enabled/$(MOD_NAME); then \
ln -s $(MODDIR)/$(MOD_NAME) $(DESTDIR)$(SYSCONFDIR)/mods-enabled ; fi;
......
......@@ -22,6 +22,7 @@ $(EXE): mimetype.c $(FOLIB) libmimetype.a $(DB) $(REPO) $(VARS)
install: all
@echo "make $(EXE) install"
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent
uninstall:
@echo "make $(EXE) uninstall"
......
......@@ -27,6 +27,8 @@ all:
install: all
@echo "make $(MOD_NAME)/$(MOD_SUBDIR) install"
mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
uninstall:
......
......@@ -47,6 +47,7 @@ install: all
$(INSTALL_DATA) VERSION $(DESTDIR)$(MODDIR)/$(MOD_NAME)/VERSION
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@if test ! -e $(DESTDIR)$(SYSCONFDIR)/mods-enabled/$(MOD_NAME); then \
ln -s $(MODDIR)/$(MOD_NAME) $(DESTDIR)$(SYSCONFDIR)/mods-enabled ; fi;
......
......@@ -62,6 +62,7 @@ _autodefs.h _autodata.c: $(SPEC) $(LICFIX)
install: all
@echo "make nomos agent install"
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent/
# $(INSTALL_PROGRAM) encode $(DESTDIR)$(AGENTDIR)/encode
uninstall:
......
......@@ -26,6 +26,8 @@ all:
install:
@echo "make nomos ui install"
mkdir -p $(DESTDIR)$(MODDIR)/nomos/ui
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/nomos/ui/
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/nomos/
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/nomos/ui/
uninstall:
......
......@@ -43,6 +43,7 @@ install: all
$(INSTALL_PROGRAM) mod_deps $(DESTDIR)$(MODDIR)/$(MOD_NAME)/mod_deps
$(INSTALL_DATA) -D $(MOD_NAME).conf $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_NAME).conf
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@if test ! -e $(DESTDIR)$(SYSCONFDIR)/mods-enabled/$(MOD_NAME); then \
ln -s $(MODDIR)/$(MOD_NAME) $(DESTDIR)$(SYSCONFDIR)/mods-enabled ; fi;
......
......@@ -44,6 +44,7 @@ pkgagent.o: pkgagent.c pkgagent.h
install: all
@echo "make pkgagent agent install"
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent
uninstall:
@echo "make pkgagent agent uninstall"
......
......@@ -27,6 +27,8 @@ all:
install:
@echo "make $(DESTDIR)$(MOD_NAME)/$(MOD_SUBDIR) install"
$(INSTALL_DATA) agent-pkgagent.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/agent-pkgagent.php
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)
uninstall:
@echo "make $(MOD_NAME)/$(MOD_SUBDIR) uninstall"
......
......@@ -124,7 +124,9 @@ install: all install-conf
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/scheduler/agent/$(EXE)
$(INSTALL_PROGRAM) $(CLI) $(DESTDIR)$(MODDIR)/scheduler/agent/$(CLI)
$(INSTALL_PROGRAM) defconf/$(INITFILE) $(DESTDIR)$(INITDIR)/$(INITFILE)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/scheduler/agent
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/scheduler
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(CONFDIR)/mods-enabled
@if test ! -e $(CONFDIR)/mods-enabled/scheduler; then \
ln -s $(MODDIR)/scheduler $(CONFDIR)/mods-enabled ; fi;
......
......@@ -31,9 +31,11 @@ install: all $(VARS)
rm -f $(DESTDIR)$(MODDIR)/ununpack/agent/departition; \
fi
@mkdir -p $(CONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(CONFDIR)/mods-enabled
$(INSTALL_PROGRAM) departition $(DESTDIR)$(MODDIR)/ununpack/agent/departition
$(INSTALL_PROGRAM) ununpack $(DESTDIR)$(MODDIR)/ununpack/agent/ununpack
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/ununpack/agent
@if test ! -e $(CONFDIR)/mods-enabled/ununpack; then \
ln -s $(MODDIR)/ununpack $(CONFDIR)/mods-enabled ; fi;
......
......@@ -27,6 +27,8 @@ all:
install: all
@echo "make $(MOD_NAME)/$(MOD_SUBDIR) install"
mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
uninstall:
......
......@@ -44,6 +44,7 @@ install: all
$(INSTALL_PROGRAM) mod_deps $(DESTDIR)$(MODDIR)/$(MOD_NAME)/mod_deps
$(INSTALL_DATA) $(MOD_NAME).conf $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_NAME).conf
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(SYSCONFDIR)/mods-enabled
@if test ! -e $(DESTDIR)$(SYSCONFDIR)/mods-enabled/$(MOD_NAME); then \
ln -s $(MODDIR)/$(MOD_NAME) $(DESTDIR)$(SYSCONFDIR)/mods-enabled ; fi;
......
......@@ -37,7 +37,7 @@ $(EXE): main.c $(FOLIB) libwget_agent.a $(CHKHDR) $(CHKSRC) $(DB) $(REPO) $(VARS
install: all
@echo "make wget_agent install"
$(INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(MODDIR)/$(EXE)/agent/$(EXE)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(EXE)/agent
uninstall:
@echo "make wget_agent uninstall"
......
......@@ -27,6 +27,8 @@ all:
install: all
@echo "make $(MOD_NAME)/$(MOD_SUBDIR) install"
mkdir -p $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(MODDIR)/$(MOD_NAME)
$(INSTALL_DATA) ./*.php $(DESTDIR)$(MODDIR)/$(MOD_NAME)/$(MOD_SUBDIR)/
uninstall:
......
......@@ -36,8 +36,11 @@ all:
install: all
mkdir -p $(DESTDIR)$(WEBDIR)/ui; \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(WEBDIR)/ui; \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(WEBDIR)
for dir in $(DIRS); do \
mkdir -p $(DESTDIR)$(WEBDIR)/ui/$$dir; \
/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(DESTDIR)$(WEBDIR)/ui/$$dir; \
done
for file in $(UIFILES); do \
......@@ -49,6 +52,7 @@ install: all
@echo $(SYSCONFDIR) > $(DESTDIR)$(WEBDIR)/ui/fossology.rc
@mkdir -p $(CONFDIR)/mods-enabled
@/bin/chown $(PROJECTUSER):$(PROJECTGROUP) $(CONFDIR)/mods-enabled
@if test ! -e $(CONFDIR)/mods-enabled/www; then \
ln -s $(MODDIR)/www $(CONFDIR)/mods-enabled/ ; fi;
......
Markdown is supported
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