ports/188770: [patch] print/ghostcript9 - remove unecessary chown & fix stage as non-root

John Hein john.hein at microsemi.com
Fri Apr 18 19:00:00 UTC 2014


>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:


More information about the freebsd-ports-bugs mailing list