Bug 190128 - [patch] devel/dmalloc install exec, take maintainer
Summary: [patch] devel/dmalloc install exec, take maintainer
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-23 00:30 UTC by mjl
Modified: 2014-05-30 20:30 UTC (History)
0 users

See Also:


Attachments
patch-dmalloc-exec (1.03 KB, text/plain)
2014-05-23 00:30 UTC, mjl
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mjl 2014-05-23 00:30:00 UTC
bin/dmalloc is not installed executable, so it cannot be run.
fix this, take maintainer, silence strip warning.

How-To-Repeat: N/A
Comment 1 Dmitry Marakasov freebsd_committer 2014-05-27 18:34:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 2 dfilter service freebsd_committer 2014-05-30 18:16:37 UTC
Author: amdmi3
Date: Fri May 30 17:16:33 2014
New Revision: 355876
URL: http://svnweb.freebsd.org/changeset/ports/355876
QAT: https://qat.redports.org/buildarchive/r355876/

Log:
  - Fix installation from plain user
  - Fix executable permissions
  - Strip binary
  - Pass maintainership to submitter
  
  PR:		190128
  Submitted by:	Matthew Luckie <mjl@luckie.org.nz>

Modified:
  head/devel/dmalloc/Makefile
  head/devel/dmalloc/files/patch-Makefile.in

Modified: head/devel/dmalloc/Makefile
==============================================================================
--- head/devel/dmalloc/Makefile	Fri May 30 17:14:44 2014	(r355875)
+++ head/devel/dmalloc/Makefile	Fri May 30 17:16:33 2014	(r355876)
@@ -3,12 +3,13 @@
 
 PORTNAME=	dmalloc
 PORTVERSION=	5.5.2
+PORTREVISION=	1
 CATEGORIES=	devel
 # Version 5.5.2 is only available at this URL
 MASTER_SITES=	http://dmalloc.com/releases/
 EXTRACT_SUFX=	.tgz
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	mjl@luckie.org.nz
 COMMENT=	Portable debug memory allocation library
 
 HAS_CONFIGURE=	yes
@@ -29,17 +30,20 @@ OPTIONS_DEFINE=	DOCS
 INSTALL_TARGET+=installdocs
 .endif
 
-pre-patch:
-	@${REINPLACE_CMD} -e 's|\.@shlibext@|\.@shlibext@.1|' ${WRKSRC}/Makefile.in
-
 post-install:
+	${CHMOD} 755 ${STAGEDIR}${PREFIX}/bin/dmalloc
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dmalloc
 	@(cd ${STAGEDIR}${PREFIX}/lib; \
+		${CHMOD} 644 libdmalloc.so.1; \
 		${STRIP_CMD} libdmalloc.so.1; \
 		${LN} -sf libdmalloc.so.1 libdmalloc.so; \
+		${CHMOD} 644 libdmallocxx.so.1; \
 		${STRIP_CMD} libdmallocxx.so.1; \
 		${LN} -sf libdmallocxx.so.1 libdmallocxx.so; \
+		${CHMOD} 644 libdmallocth.so.1; \
 		${STRIP_CMD} libdmallocth.so.1; \
 		${LN} -sf libdmallocth.so.1 libdmallocth.so; \
+		${CHMOD} 644 libdmallocthcxx.so.1; \
 		${STRIP_CMD} libdmallocthcxx.so.1; \
 		${LN} -sf libdmallocthcxx.so.1 libdmallocthcxx.so)
 

Modified: head/devel/dmalloc/files/patch-Makefile.in
==============================================================================
--- head/devel/dmalloc/files/patch-Makefile.in	Fri May 30 17:14:44 2014	(r355875)
+++ head/devel/dmalloc/files/patch-Makefile.in	Fri May 30 17:16:33 2014	(r355876)
@@ -1,6 +1,50 @@
---- Makefile.in	Fri Jul  6 19:20:21 2007
-+++ Makefile.in.new	Fri Jul  6 19:20:46 2007
-@@ -257,7 +257,7 @@
+--- Makefile.in	2014-05-27 11:10:16.000000000 -0700
++++ Makefile.in.3	2014-05-27 11:12:56.000000000 -0700
+@@ -41,7 +41,7 @@
+ 
+ # thread version of the library
+ LIB_TH	= lib$(MODULE)th.a
+-LIB_TH_SL = lib$(MODULE)th.@shlibext@
++LIB_TH_SL = lib$(MODULE)th.@shlibext@.1
+ @TH_ON@BUILD_ALL_1 = threads
+ @TH_ON@INSTALL_LIB_1 = installth
+ @SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL)
+@@ -51,7 +51,7 @@
+ 
+ # C++ version of the library
+ LIB_CXX	= lib$(MODULE)xx.a
+-LIB_CXX_SL = lib$(MODULE)xx.@shlibext@
++LIB_CXX_SL = lib$(MODULE)xx.@shlibext@.1
+ @CXX_ON@BUILD_ALL_3 = $(LIB_CXX)
+ @CXX_ON@INSTALL_LIB_3 = installcxx
+ @SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL)
+@@ -61,7 +61,7 @@
+ 
+ # threads + C++
+ LIB_TH_CXX = lib$(MODULE)thcxx.a
+-LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@
++LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@.1
+ @TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX)
+ @TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx
+ @TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX)
+@@ -76,7 +76,7 @@
+ @CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl
+ 
+ # shared versions of the libraries
+-LIB_SL = lib$(MODULE).@shlibext@
++LIB_SL = lib$(MODULE).@shlibext@.1
+ @SL_ON@BUILD_ALL_7 = $(LIB_SL)
+ @SL_ON@INSTALL_LIB_7 = installsl
+ @SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL)
+@@ -218,7 +218,6 @@
+ installlib : $(INSTALL_LIB)
+ 	$(srcdir)/mkinstalldirs $(libdir)
+ 	$(INSTALL_PROGRAM) $(LIBRARY) $(libdir)
+-	@RANLIB@ $(libdir)/$(LIBRARY)
+ @SL_OFF@	@echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
+ @CXX_OFF@	@echo "Enter 'make installcxx' to install the C++ library"
+ @TH_OFF@	@echo "Enter 'make installth' to install thread library"
+@@ -257,7 +256,7 @@
  # via: http://256.com/gray/email.html
  $(LIB_SL) : $(LIBRARY)
  	rm -f $@ $@.t
@@ -9,7 +53,7 @@
  	mv $@.t $@
  
  $(LIBRARY) : $(OBJS) $(NORMAL_OBJS)
-@@ -270,7 +270,7 @@
+@@ -270,7 +269,7 @@
  
  $(LIB_TH_SL) : $(LIB_TH)
  	rm -f $@ $@.t
@@ -18,7 +62,7 @@
  	mv $@.t $@
  
  $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
-@@ -279,7 +279,7 @@
+@@ -279,7 +278,7 @@
  
  $(LIB_CXX_SL) : $(LIB_CXX)
  	rm -f $@ $@.t
@@ -27,7 +71,7 @@
  	mv $@.t $@
  
  $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
-@@ -288,7 +288,7 @@
+@@ -288,7 +287,7 @@
  
  $(LIB_TH_CXX_SL) : $(LIB_TH_CXX)
  	rm -f $@ $@.t
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Dmitry Marakasov freebsd_committer 2014-05-30 18:16:50 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 Dmitry Marakasov 2014-05-30 20:29:09 UTC
Attaching email with updated patch and reasoning behind it to the PR.

----- Forwarded message from Matthew Luckie <mjl@luckie.org.nz> -----

Date: Tue, 27 May 2014 11:31:18 -0700
From: Matthew Luckie <mjl@luckie.org.nz>
To: Dmitry Marakasov <amdmi3@amdmi3.ru>
Subject: Re: ports/189732: [patch] net/libbgpdump staging support

T2hanks for letting me know the problem with the port.

I've attached a revised patch.  The ranlib problem is described at the
bottom of:

https://wiki.freebsd.org/ports/StageDir

I could not get the reinplace magic to work, and i noticed that there
was both a patch-Makefile.in and a pre-patch target, so i decided to
just use the patch-Makefile.in approach and drop pre-patch while I was
there.

Thanks again

Matthew

On 05/27/14 10:38, Dmitry Marakasov wrote:
> * Matthew Luckie (mjl@luckie.org.nz) wrote:
> 
>> Could you please take a look at:
>>
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=190128
> 
> It doesn't build as a plain user:
> 
> ---
> ===>  Staging for dmalloc-5.5.2_1
> ===>   Generating temporary packing list
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/include
> install   -m 444 dmalloc.h /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/include
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmallocth.so.1 /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmallocthcxx.so.1 /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmallocthcxx.a /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmallocth.a /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmallocxx.so.1 /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmallocxx.a /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmalloc.so.1 /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ./mkinstalldirs /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> install   -m 444 libdmalloc.a /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib
> ranlib /usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib/libdmalloc.a
> ranlib: fatal: Failed to open '/usr/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/work/stage/home/amdmi3/projects/freebsd/batchports-mem/devel/dmalloc/prefix/lib/libdmalloc.a'
> ---
> 
> because libdmalloc.a is not writable. Needs either ${CHMOD} call or NEEDS_ROOT.
> 


diff -uNr dmalloc/Makefile dmalloc-new/Makefile
--- dmalloc/Makefile	2014-01-22 09:00:46.000000000 -0800
+++ dmalloc-new/Makefile	2014-05-27 11:27:16.000000000 -0700
@@ -3,12 +3,13 @@
 
 PORTNAME=	dmalloc
 PORTVERSION=	5.5.2
+PORTREVISION=	1
 CATEGORIES=	devel
 # Version 5.5.2 is only available at this URL
 MASTER_SITES=	http://dmalloc.com/releases/
 EXTRACT_SUFX=	.tgz
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	mjl@luckie.org.nz
 COMMENT=	Portable debug memory allocation library
 
 HAS_CONFIGURE=	yes
@@ -29,17 +30,20 @@
 INSTALL_TARGET+=installdocs
 .endif
 
-pre-patch:
-	@${REINPLACE_CMD} -e 's|\.@shlibext@|\.@shlibext@.1|' ${WRKSRC}/Makefile.in
-
 post-install:
+	${CHMOD} 755 ${STAGEDIR}${PREFIX}/bin/dmalloc
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/dmalloc
 	@(cd ${STAGEDIR}${PREFIX}/lib; \
+		${CHMOD} 644 libdmalloc.so.1; \
 		${STRIP_CMD} libdmalloc.so.1; \
 		${LN} -sf libdmalloc.so.1 libdmalloc.so; \
+		${CHMOD} 644 libdmallocxx.so.1; \
 		${STRIP_CMD} libdmallocxx.so.1; \
 		${LN} -sf libdmallocxx.so.1 libdmallocxx.so; \
+		${CHMOD} 644 libdmallocth.so.1; \
 		${STRIP_CMD} libdmallocth.so.1; \
 		${LN} -sf libdmallocth.so.1 libdmallocth.so; \
+		${CHMOD} 644 libdmallocthcxx.so.1; \
 		${STRIP_CMD} libdmallocthcxx.so.1; \
 		${LN} -sf libdmallocthcxx.so.1 libdmallocthcxx.so)
 
diff -uNr dmalloc/files/patch-Makefile.in dmalloc-new/files/patch-Makefile.in
--- dmalloc/files/patch-Makefile.in	2014-01-22 09:40:44.000000000 -0800
+++ dmalloc-new/files/patch-Makefile.in	2014-05-27 11:21:30.000000000 -0700
@@ -1,6 +1,50 @@
---- Makefile.in	Fri Jul  6 19:20:21 2007
-+++ Makefile.in.new	Fri Jul  6 19:20:46 2007
-@@ -257,7 +257,7 @@
+--- Makefile.in	2014-05-27 11:10:16.000000000 -0700
++++ Makefile.in.3	2014-05-27 11:12:56.000000000 -0700
+@@ -41,7 +41,7 @@
+ 
+ # thread version of the library
+ LIB_TH	= lib$(MODULE)th.a
+-LIB_TH_SL = lib$(MODULE)th.@shlibext@
++LIB_TH_SL = lib$(MODULE)th.@shlibext@.1
+ @TH_ON@BUILD_ALL_1 = threads
+ @TH_ON@INSTALL_LIB_1 = installth
+ @SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL)
+@@ -51,7 +51,7 @@
+ 
+ # C++ version of the library
+ LIB_CXX	= lib$(MODULE)xx.a
+-LIB_CXX_SL = lib$(MODULE)xx.@shlibext@
++LIB_CXX_SL = lib$(MODULE)xx.@shlibext@.1
+ @CXX_ON@BUILD_ALL_3 = $(LIB_CXX)
+ @CXX_ON@INSTALL_LIB_3 = installcxx
+ @SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL)
+@@ -61,7 +61,7 @@
+ 
+ # threads + C++
+ LIB_TH_CXX = lib$(MODULE)thcxx.a
+-LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@
++LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@.1
+ @TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX)
+ @TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx
+ @TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX)
+@@ -76,7 +76,7 @@
+ @CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl
+ 
+ # shared versions of the libraries
+-LIB_SL = lib$(MODULE).@shlibext@
++LIB_SL = lib$(MODULE).@shlibext@.1
+ @SL_ON@BUILD_ALL_7 = $(LIB_SL)
+ @SL_ON@INSTALL_LIB_7 = installsl
+ @SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL)
+@@ -218,7 +218,6 @@
+ installlib : $(INSTALL_LIB)
+ 	$(srcdir)/mkinstalldirs $(libdir)
+ 	$(INSTALL_PROGRAM) $(LIBRARY) $(libdir)
+-	@RANLIB@ $(libdir)/$(LIBRARY)
+ @SL_OFF@	@echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
+ @CXX_OFF@	@echo "Enter 'make installcxx' to install the C++ library"
+ @TH_OFF@	@echo "Enter 'make installth' to install thread library"
+@@ -257,7 +256,7 @@
  # via: http://256.com/gray/email.html
  $(LIB_SL) : $(LIBRARY)
  	rm -f $@ $@.t
@@ -9,7 +53,7 @@
  	mv $@.t $@
  
  $(LIBRARY) : $(OBJS) $(NORMAL_OBJS)
-@@ -270,7 +270,7 @@
+@@ -270,7 +269,7 @@
  
  $(LIB_TH_SL) : $(LIB_TH)
  	rm -f $@ $@.t
@@ -18,7 +62,7 @@
  	mv $@.t $@
  
  $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
-@@ -279,7 +279,7 @@
+@@ -279,7 +278,7 @@
  
  $(LIB_CXX_SL) : $(LIB_CXX)
  	rm -f $@ $@.t
@@ -27,7 +71,7 @@
  	mv $@.t $@
  
  $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
-@@ -288,7 +288,7 @@
+@@ -288,7 +287,7 @@
  
  $(LIB_TH_CXX_SL) : $(LIB_TH_CXX)
  	rm -f $@ $@.t




----- End forwarded message -----

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru