Bug 182693 - multimedia/libvpx: wrong file ownership
multimedia/libvpx: wrong file ownership
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Ashish SHUKLA
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 16:00 UTC by Christian Weisgerber
Modified: 2013-10-25 08:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Weisgerber freebsd_committer 2013-10-05 16:00:00 UTC
The multimedia/libvpx port installs files that are owned by the
build user rather than ${BINOWN}.

$ ls -l /usr/local/bin | grep naddy
-rwxr-xr-x  1 naddy  wheel      15876 Oct  5 16:35 vp8_scalable_patterns
-rwxr-xr-x  1 naddy  wheel      60658 Oct  5 16:35 vpxdec
-rwxr-xr-x  1 naddy  wheel      67203 Oct  5 16:35 vpxenc

Looking at the tail end of the install log...

[...]
mkdir -p /usr/local/bin/
cp -p vpxdec /usr/local/bin/vpxdec
mkdir -p /usr/local/bin/
cp -p vpxenc /usr/local/bin/vpxenc
mkdir -p /usr/local/bin/
cp -p vp8_scalable_patterns /usr/local/bin/vp8_scalable_patterns

... we see that the install step erroneously uses cp(1) instead of the
INSTALL_* macros.

This affects all files installed by the port.
Comment 1 Edwin Groothuis freebsd_committer 2013-10-05 16:00:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ashish

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Christian Weisgerber freebsd_committer 2013-10-21 16:25:00 UTC
Ashish SHUKLA:

> Attached is a diff which aims to fix the problem, in addition to another
> problem reported by another user.
> 
> Could you please check if it fixes your problem as well ?

Yes, converting the port to staging incidentally fixes the file
ownership, too.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de
Comment 3 Ashish SHUKLA freebsd_committer 2013-10-21 19:49:29 UTC
On Mon, 21 Oct 2013 17:25:00 +0200, Christian Weisgerber <naddy@FreeBSD.org> said:
> Ashish SHUKLA:


>> Attached is a diff which aims to fix the problem, in addition to another
>> problem reported by another user.
>> 
>> Could you please check if it fixes your problem as well ?


> Yes, converting the port to staging incidentally fixes the file
> ownership, too.


Thanks for the confirmation.

I'll get it committed by this weekend after some build testing.

-- 
Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
Sent from my Emacs
Comment 4 dfilter freebsd_committer 2013-10-25 08:11:31 UTC
Author: ashish
Date: Fri Oct 25 07:11:22 2013
New Revision: 331559
URL: http://svnweb.freebsd.org/changeset/ports/331559

Log:
  - Add staging support
  - Fix ownership of installed files[0]
  - Fix building on systems with non UTF-8 locale[1]
  - Fix building on 10.x and later
  
  PR:		ports/182693[0], ports/169369[1]
  Submitted by:	Herbert J. Skuhra <h.skuhra@gmail.com> (via private mail)[1]

Added:
  head/multimedia/libvpx/files/patch-build_make_Makefile   (contents, props changed)
Deleted:
  head/multimedia/libvpx/files/patch-build_make_rtcd.sh
Modified:
  head/multimedia/libvpx/Makefile
  head/multimedia/libvpx/distinfo   (contents, props changed)
  head/multimedia/libvpx/files/patch-libs.mk   (contents, props changed)
  head/multimedia/libvpx/pkg-plist   (contents, props changed)

Modified: head/multimedia/libvpx/Makefile
==============================================================================
--- head/multimedia/libvpx/Makefile	Fri Oct 25 06:28:14 2013	(r331558)
+++ head/multimedia/libvpx/Makefile	Fri Oct 25 07:11:22 2013	(r331559)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	libvpx
-PORTVERSION=	1.1.0
+PORTVERSION=	1.2.0
 CATEGORIES=	multimedia
 MASTER_SITES=	GOOGLE_CODE
 DISTNAME=	${PORTNAME}-v${PORTVERSION}
@@ -10,6 +10,9 @@ DISTNAME=	${PORTNAME}-v${PORTVERSION}
 MAINTAINER=	ashish@FreeBSD.org
 COMMENT=	VP8 Codec SDK
 
+LICENSE=	BSD
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
 BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash \
 		yasm:${PORTSDIR}/devel/yasm
 
@@ -20,9 +23,6 @@ HAS_CONFIGURE=	yes
 USE_PERL5=	build
 USE_LDCONFIG=	yes
 
-LICENSE=	BSD
-LICENSE_FILE=	${WRKSRC}/LICENSE
-
 OPTIONS_DEFINE=	DEBUG POSTPROC RUNTIME THREADS SHARED
 OPTIONS_DEFAULT=	POSTPROC RUNTIME THREADS SHARED
 POSTPROC_DESC=	Enable postprocessing
@@ -31,11 +31,15 @@ SHARED_DESC=	Enable shared-library suppo
 
 ALL_TARGET=
 CONFIGURE_ARGS+=	--enable-pic --disable-install-srcs --enable-vp8 --disable-install-docs
-MAKE_ARGS+=	DIST_DIR=${PREFIX} verbose=yes
+MAKE_ARGS+=	DIST_DIR=${PREFIX} verbose=yes DESTDIR=${STAGEDIR}
+MAKE_ENV=	LC_ALL=C
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
+.if ${OSVERSION} >= 1000000
+CONFIGURE_ARGS+=	--disable-unit-tests
+.endif
+
 .if ${PORT_OPTIONS:MDEBUG}
 CONFIGURE_ARGS+=	--enable-debug
 .endif
@@ -76,6 +80,8 @@ IGNORE=	no support for ${ARCH} the momen
 post-patch:
 	@${REINPLACE_CMD} 's|\(link_with_cc\)=gcc|\1=$${CC}|' \
 		${WRKSRC}/build/make/configure.sh
+	@${REINPLACE_CMD} -e 's|%%DESTDIR%%|${STAGEDIR}|g' \
+	       	${WRKSRC}/build/make/Makefile ${WRKSRC}/libs.mk
 	@${GREP} -Rl '^#!/bin/bash' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \
 		-e 's,#!/bin/bash,#!/usr/bin/env bash,g'
 	@${GREP} -Rl -- '-l\?pthread' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} -E \

Modified: head/multimedia/libvpx/distinfo
==============================================================================
--- head/multimedia/libvpx/distinfo	Fri Oct 25 06:28:14 2013	(r331558)
+++ head/multimedia/libvpx/distinfo	Fri Oct 25 07:11:22 2013	(r331559)
@@ -1,2 +1,2 @@
-SHA256 (libvpx-v1.1.0.tar.bz2) = 9ce074cf4b3bcd9a49ff93e05485b71c273bfc3685a305e55a0e7fa51beb72c5
-SIZE (libvpx-v1.1.0.tar.bz2) = 1653485
+SHA256 (libvpx-v1.2.0.tar.bz2) = 5ef0c650b2daa62085eb8105a7a4273f3e987db53c5ec97fd51d1b6511e5aa06
+SIZE (libvpx-v1.2.0.tar.bz2) = 1714121

Added: head/multimedia/libvpx/files/patch-build_make_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/libvpx/files/patch-build_make_Makefile	Fri Oct 25 07:11:22 2013	(r331559)
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- build/make/Makefile.orig
++++ build/make/Makefile
+@@ -230,8 +230,8 @@
+ define install_map_template
+ $(DIST_DIR)/$(1): $(2)
+ 	$(if $(quiet),@echo "    [INSTALL] $$@")
+-	$(qexec)mkdir -p $$(dir $$@)
+-	$(qexec)cp -p $$< $$@
++	$(qexec)install -d %%DESTDIR%%$$(dir $$@)
++	$(qexec)install -p $$< %%DESTDIR%%$$(dir $$@)
+ endef
+ 
+ define archive_template

Modified: head/multimedia/libvpx/files/patch-libs.mk
==============================================================================
--- head/multimedia/libvpx/files/patch-libs.mk	Fri Oct 25 06:28:14 2013	(r331558)
+++ head/multimedia/libvpx/files/patch-libs.mk	Fri Oct 25 07:11:22 2013	(r331559)
@@ -3,9 +3,18 @@ $FreeBSD$
 
 --- libs.mk.orig
 +++ libs.mk
-@@ -242,8 +242,8 @@
- 	$(qexec)echo 'Conflicts:' >> $@
+@@ -209,7 +209,7 @@
+     $(addprefix $(BUILD_PFX),$(notdir $(LIBVPX_SO_SYMLINKS))),\
+     $(BUILD_PFX)$(LIBVPX_SO)))
+ $(eval $(call libvpx_symlink_template,\
+-    $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\
++    $(addprefix $(DESTDIR)/$(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\
+     $(DIST_DIR)/$(LIBSUBDIR)/$(LIBVPX_SO)))
+ 
+ INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
+@@ -232,8 +232,8 @@
  	$(qexec)echo 'Libs: -L$${libdir} -lvpx' >> $@
+ 	$(qexec)echo 'Libs.private: -lm -pthread' >> $@
  	$(qexec)echo 'Cflags: -I$${includedir}' >> $@
 -INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc
 -INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc

Modified: head/multimedia/libvpx/pkg-plist
==============================================================================
--- head/multimedia/libvpx/pkg-plist	Fri Oct 25 06:28:14 2013	(r331558)
+++ head/multimedia/libvpx/pkg-plist	Fri Oct 25 07:11:22 2013	(r331559)
@@ -15,6 +15,6 @@ lib/libvpx.a
 libdata/pkgconfig/vpx.pc
 %%SHARED%%lib/libvpx.so
 %%SHARED%%lib/libvpx.so.1
-%%SHARED%%lib/libvpx.so.1.1
-%%SHARED%%lib/libvpx.so.1.1.0
+%%SHARED%%lib/libvpx.so.1.2
+%%SHARED%%lib/libvpx.so.1.2.0
 @dirrm include/vpx
_______________________________________________
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 5 Ashish SHUKLA freebsd_committer 2013-10-25 08:30:31 UTC
State Changed
From-To: open->closed

Committed. Thanks!