Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 2014 12:56:15 -0600 (MDT)
From:      John Hein <john.hein@microsemi.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        doceng@freebsd.org
Subject:   ports/188770: [patch] print/ghostcript9 - remove unecessary chown & fix stage as non-root
Message-ID:  <201404181856.s3IIuF6t049232@gromit.timing.com>
Resent-Message-ID: <201404181900.s3IJ00cm054594@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         188770
>Category:       ports
>Synopsis:       [patch] print/ghostcript9 - remove unecessary chown & fix stage as non-root
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 18 19:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     John Hein
>Release:        
>Organization:
>Environment:

>Description:

The ${CHOWN} in the post-install in print/ghostscript9/Makefile is not
needed - the created package specifies @owner root for packages that
have been created via the staging process.

I also moved the strip from post-install to 'install -s' in the make
infrastructure.  This allows 'make stage' as a regular user (otherwise,
you get 'permission denied' trying to strip a read-only file - noticed
when using portmaster with PM_SU_CMD=/usr/local/bin/sudo).

I didn't add a strip for the shared lib since we usually don't do
that for ports and that would be a change of behavior.


>How-To-Repeat:

>Fix:

No need to bump portrevision.

Index: Makefile
===================================================================
--- Makefile	(revision 351530)
+++ Makefile	(working copy)
@@ -162,8 +162,6 @@
 		( cd ${STAGEDIR}${DOCSDIR} && ${TAR} -xof - )
 
 post-install:
-	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DATADIR}/${PORTVERSION}
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gsc ${STAGEDIR}${PREFIX}/bin/gsx
 	${LN} -sf gsc ${STAGEDIR}${PREFIX}/bin/gs
 	${LN} -s -f ${LOCALBASE}/share/fonts/CIDFont \
 		${STAGEDIR}${DATADIR}/${PORTVERSION}/Resource/CIDFont/fonts
Index: files/patch-base-unix-dll.mak
===================================================================
--- files/patch-base-unix-dll.mak	(revision 0)
+++ files/patch-base-unix-dll.mak	(working copy)
@@ -0,0 +1,13 @@
+--- base/unix-dll.mak.orig	2012-08-08 02:01:36.000000000 -0600
++++ base/unix-dll.mak	2014-04-18 12:12:34.000000000 -0600
+@@ -162,8 +162,8 @@
+ 	-mkdir -p $(DESTDIR)$(bindir)
+ 	-mkdir -p $(DESTDIR)$(libdir)
+ 	-mkdir -p $(DESTDIR)$(gsincludedir)
+-	$(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
+-	$(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
++	$(INSTALL_PROGRAM) -s $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
++	$(INSTALL_PROGRAM) -s $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
+ 	$(INSTALL_PROGRAM) $(BINDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
+ 	$(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
+ 	ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404181856.s3IIuF6t049232>