You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2012/07/18 02:21:41 UTC

[8/13] git commit: TS-1295 Don't assume root privileges during make install. Author: Jan-Frode Myklebust Review and minor changes: Leif

TS-1295 Don't assume root privileges during make install.
Author: Jan-Frode Myklebust
Review and minor changes: Leif

Conflicts:
	CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/99eed9c5
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/99eed9c5
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/99eed9c5

Branch: refs/heads/3.2.x
Commit: 99eed9c55128aa7d0d0eff9875357b27a3a1da82
Parents: 5ad6c7e
Author: Jan-Frode Myklebust <ja...@transo.net>
Authored: Tue Jun 12 15:27:45 2012 -0600
Committer: Igor Galić <i....@brainsware.org>
Committed: Tue Jul 17 16:20:49 2012 -0700

----------------------------------------------------------------------
 CHANGES           |    3 +++
 STATUS            |    5 -----
 proxy/Makefile.am |   23 +++++++++++++++++++----
 3 files changed, 22 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/99eed9c5/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index a991e91..f097f20 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache Traffic Server 3.2.1
   *) [TS-1358] Don't link libreadline with all binaries and plugins.
 
+  *) [TS-1295] Don't assume root privileges during make install.
+   Author: Jan-Frode Myklebust
+
   *) [TS-1357] Don't link libz / liblmza with all binaries and plugins.
 
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/99eed9c5/STATUS
----------------------------------------------------------------------
diff --git a/STATUS b/STATUS
index b6790f4..03155e6 100644
--- a/STATUS
+++ b/STATUS
@@ -82,11 +82,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ New patches should be added at the end of the list ]
 
-  *) Don't assume root privileges during make install
-   Trunk patch: https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;a=commit;h=a862e283734c86d46a57624f9a05f09cfbbee175
-   Jira: https://issues.apache.org/jira/browse/TS-1295
-   +1: zwoop, jpeach, amc
-
   *) Fix WCCP build issues on FBSD.
    Trunk patch: a423c3fb44f56145060d35c3092a71577e6f5c74
    Jira: https://issues.apache.org/jira/browse/TS-1306

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/99eed9c5/proxy/Makefile.am
----------------------------------------------------------------------
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 69c9c2a..39a9df8 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -283,15 +283,30 @@ test_xml_parser_SOURCES = test_xml_parser.cc InkXml.cc DiagsConfig.cc
 versiondir = $(pkgsysconfdir)
 
 install-data-local:
-	$(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) $(DESTDIR)$(pkgruntimedir) $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(pkgcachedir)
+	if [ `id -un` != "root" ]; then \
+		$(INSTALL) -d $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) $(DESTDIR)$(pkgruntimedir) \
+				$(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) \
+				$(DESTDIR)$(pkgcachedir); \
+	else \
+		 $(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) \
+				$(DESTDIR)$(pkgruntimedir) $(DESTDIR)$(pkgsysconfdir) \
+				$(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(pkgcachedir); \
+	fi
 
 install-data-hook:
-	-chown -R $(pkgsysuser):$(pkgsysgroup) $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgdatadir)
+	if [ `id -un` == "root" ]; then \
+		chown -R $(pkgsysuser):$(pkgsysgroup) $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgdatadir);\
+	fi
 	-echo "<TS_VERSION> $(PACKAGE_VERSION)" > $(DESTDIR)$(pkgsysconfdir)/trafficserver-release
 
 install-exec-local:
-	$(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkglibexecdir)
+	if [ `id -un` != "root" ]; then \
+		$(INSTALL) -d $(DESTDIR)$(pkglibexecdir); \
+	else \
+		$(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkglibexecdir); fi
 
 install-exec-hook:
-	-chown -R $(pkgsysuser):$(pkgsysgroup) $(DESTDIR)$(pkglibexecdir)
+	if [ `id -un` == "root" ]; then \
+		chown -R $(pkgsysuser):$(pkgsysgroup) $(DESTDIR)$(pkglibexecdir); \
+	fi