Created attachment 218399 [details] the update --fix build on -CURRENT --incorporate MK_PROFILE conversion from r518434 directly into Makefile
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/195763067
Created attachment 218400 [details] the update
^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!
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.
^Triage: Maintainer-feedback flag (+) not required unless requested (?) first
Should a ports committer review the patch? I only have a src commit bit.
(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...
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}
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>
Created attachment 218525 [details] update with fixes for binary stripping
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.
(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
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.
Created attachment 218532 [details] update with uidfix Looks like uidfix is the answer; patch updated.
(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) ...
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.
Q/A: Builds fine in {11.4,12.1}{amd64,i386} and 13-current amd64. Consumer multimedia/cx88 does too. LGTM!
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/
Committed, thanks for testing!