Bug 249980 - multimedia/libtuner: update to 1.1.5
Summary: multimedia/libtuner: update to 1.1.5
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jason A. Harmening
URL:
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2020-09-29 08:59 UTC by Jason A. Harmening
Modified: 2020-10-07 01:50 UTC (History)
2 users (show)

See Also:


Attachments
the update (1.42 KB, text/plain)
2020-09-29 08:59 UTC, Jason A. Harmening
no flags Details
the update (1.57 KB, patch)
2020-09-29 09:06 UTC, Jason A. Harmening
no flags Details | Diff
update with fixes for binary stripping (1.78 KB, patch)
2020-10-04 20:49 UTC, Jason A. Harmening
no flags Details | Diff
update with uidfix (1.79 KB, patch)
2020-10-05 08:46 UTC, Jason A. Harmening
no flags Details | Diff
update with DIRS removed (1.79 KB, patch)
2020-10-05 17:16 UTC, Jason A. Harmening
jah: maintainer-approval? (fernape)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason A. Harmening freebsd_committer freebsd_triage 2020-09-29 08:59:22 UTC
Created attachment 218399 [details]
the update

--fix build on -CURRENT
--incorporate MK_PROFILE conversion from r518434 directly into Makefile
Comment 1 Automation User 2020-09-29 09:03:48 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/195763067
Comment 2 Jason A. Harmening freebsd_committer freebsd_triage 2020-09-29 09:06:47 UTC
Created attachment 218400 [details]
the update
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-30 06:10:05 UTC
^Triage: Reporter is committer, assign accordingly.

^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field.


Thanks!
Comment 4 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-03 18:08:48 UTC
No changelog URL.

Validated the fix on 12-STABLE and -CURRENT, portlint passes.
Also I'm changing the maintainer email from my private gmail to my FreeBSD.org email, so maintainer feedback not actually required.
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-03 18:12:06 UTC
^Triage: Maintainer-feedback flag (+) not required unless requested (?) first
Comment 6 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-03 23:45:29 UTC
Should a ports committer review the patch?  I only have a src commit bit.
Comment 7 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-04 08:56:05 UTC
(In reply to Jason A. Harmening from comment #6)
Yes,

Committers may obtain review via a Differential in Phabricator, adding the "Contributor Reviewers ($Repository)" group as a Reviewer, reaching out to other committers; directly or via mailing lists, or setting the attachment flag to: maintainer-approval ? <person-youd-like-to-review>

I can help you here. The patch looks OK, but USE_LDCONFIG should appear earlier, just before the MAKE_* block and after LICENSE block.

Build testing now...
Comment 8 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-04 09:28:50 UTC
Builds fine in {11.4,12.1}{amd64,i386} and 13-current amd64. Consumer multimedia/cx88 does too.

The installed library should be stripped unless there is a strong reason not to do it:

Warning: 'lib/libtuner/libtuner.so.1' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Comment 9 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-04 12:02:02 UTC
With this we should be good

+USE_LDCONFIG=  ${PREFIX}/lib/libtuner
+
 MAKE_ARGS+=    INSTALLDIR=${STAGEDIR}${PREFIX}
 MAKE_ARGS+=    -D LIBTUNER_ENABLE_IIC
-USE_LDCONFIG=  ${PREFIX}/lib/libtuner

+post-install:
+       @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtuner/libtuner.so.1
+
 .include <bsd.port.mk>
Comment 10 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-04 20:49:35 UTC
Created attachment 218525 [details]
update with fixes for binary stripping
Comment 11 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-04 20:54:04 UTC
Ah, thanks for catching the unstripped binaries.

I'd like to fix this in a slightly different way: I've changed the internal makefile in the source distribution so that it no longer needlessly overrides the install step performed by bsd.lib.mk.   That should allow stripping, respect DESTDIR, and eliminate the need for a custom INSTALLDIR setting for the port build.
Comment 12 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-05 05:45:21 UTC
(In reply to Jason A. Harmening from comment #11)

This fails to stage for me:

===>  Staging for libtuner-1.1.5
===>   Generating temporary packing list
mkdir -p /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner
mkdir -p /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/include/libtuner
mkdir -p /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/share/libtuner
install  -C -o root -g wheel -m 444   libtuner_static.a /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner/
install: /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner/libtuner_static.a: chown/chgrp: Operation not permitted
*** Error code 71
Comment 13 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-05 06:03:55 UTC
It looks like you were running the build as non-root.
Previously the libtuner makefile was overriding bsd.lib.mk's install target with its own, which used 'cp' instead of 'install'.  Now it's using bsd.lib.mk's install target:

_libinstall:
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
	${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
	    ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/


...where LIBOWN defaults to BINOWN which defaults to root (bsd.own.mk).

So how is non-root staging dealt with for other ports that use bsd.lib.mk?  I find it hard to believe that bsd.lib.mk's default install action is just broken for these cases.
Comment 14 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-05 08:46:44 UTC
Created attachment 218532 [details]
update with uidfix

Looks like uidfix is the answer; patch updated.
Comment 15 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-05 11:37:39 UTC
(In reply to Jason A. Harmening from comment #14)

This last patch breaks the build in 11.4:

===>  Staging for libtuner-1.1.5
===>   Generating temporary packing list
make[1]: don't know how to make installdirs. Stop

make[1]: stopped in /wrkdirs/usr/ports/multimedia/libtuner/work/libtuner-1.1.5
*** Error code 2

Stop.
make: stopped in /usr/ports/multimedia/libtuner

It does work in 12.1 though:

===>  Staging for libtuner-1.1.5
===>   Generating temporary packing list
installing DIRS FIRMWAREDIR
install  -d -m 0755 -o root  -g wheel  /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/share/libtuner
install: chown 0:0 /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/share/libtuner: Operation not permitted
installing DIRS INCSDIR
install  -d -m 0755 -o root  -g wheel  /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/include/libtuner
install: chown 0:0 /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/include/libtuner: Operation not permitted
installing DIRS LIBDIR
install  -d -m 0755 -o root  -g wheel  /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner
install: chown 0:0 /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner: Operation not permitted
install  -C -o 65534 -g 65534 -m 444   libtuner_static.a /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner/
install  -s -o 65534 -g 65534 -m 444   -S  libtuner.so.1 /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner/
install -l rs -o 65534 -g 65534 -m 755  libtuner.so.1 /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/lib/libtuner/libtune
r.so
install  -C -o 65534 -g 65534 -m 444  xc5000.h tda8295.h s5h1411.h tuner_driver.h xc3028.h tda9887.h pll_driver.h avb_driver.h fmd1216
me.h lg3303.h tuner_firmware.h cx24227.h tuner_devnode_device.h cx22702.h dtt7612.h dtt7579.h tuner_config.h tuv1236d.h nxt2004.h or51
132.h tda18271.h dtt75105.h tuner_iic_device.h dvb_driver.h tuner_device.h mt2131.h lgh064f.h /wrkdirs/usr/ports/multimedia/libtuner/w
ork/stage/usr/local/include/libtuner/
install  -C -o 65534 -g 65534 -m 444  firmware/or51132_qam.fw firmware/xc3028-v27.fw firmware/nxt2004.fw firmware/license.txt firmware
/xc5000-1.6.114.fw firmware/or51132_vsb.fw /wrkdirs/usr/ports/multimedia/libtuner/work/stage/usr/local/share/libtuner/
====> Compressing man pages (compress-man)
...
Comment 16 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-05 17:16:16 UTC
Created attachment 218544 [details]
update with DIRS removed

Oops, that's because I used DIRS as part of the internal makefile cleanup, but DIRS was only added in 12.   Should be ok to just use mkdir in a beforeinstall step.
Comment 17 Fernando Apesteguía freebsd_committer freebsd_triage 2020-10-05 18:24:09 UTC
Q/A: Builds fine in {11.4,12.1}{amd64,i386} and 13-current amd64. Consumer multimedia/cx88 does too.

LGTM!
Comment 18 commit-hook freebsd_committer freebsd_triage 2020-10-06 07:13:09 UTC
A commit references this bug:

Author: jah
Date: Tue Oct  6 07:12:13 UTC 2020
New revision: 551561
URL: https://svnweb.freebsd.org/changeset/ports/551561

Log:
  multimedia/libtuner: update to 1.1.5

  --Fix build on -CURRENT
  --Various cleanups and fixes to port and source distribution makefiles
  --Update maintainer email

  PR:		249980
  Approved by:	fernape

Changes:
  head/multimedia/libtuner/Makefile
  head/multimedia/libtuner/distinfo
  head/multimedia/libtuner/files/
Comment 19 Jason A. Harmening freebsd_committer freebsd_triage 2020-10-07 01:50:37 UTC
Committed, thanks for testing!