Bug 221915 - graphics/gpu-firmware-kmod: fails to stage without root (build-as-user)
Summary: graphics/gpu-firmware-kmod: fails to stage without root (build-as-user)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Johannes M Dieterich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-08-29 17:20 UTC by Jan Beich
Modified: 2017-08-30 12:09 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jmd)


Attachments
v1 (383 bytes, patch)
2017-08-29 17:20 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-08-29 17:20:19 UTC
Created attachment 185885 [details]
v1

$ make
===>  Staging for gpu-firmware-kmod-g20170822_1
===>   Generating temporary packing list
===> i915kmsfw (install)
===> i915kmsfw/kblguc (install)
install -T release -o root -g wheel -m 555   i915_kbl_guc_ver9_14_bin.ko /usr/ports/graphics/gpu-firmware-kmod/work/stage/boot/modules/
install: DONTSTRIP set - will not strip installed binaries
install: /usr/ports/graphics/gpu-firmware-kmod/work/stage/boot/modules/i915_kbl_guc_ver9_14_bin.ko: chown/chgrp: Operation not permitted
*** Error code 71
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-08-29 17:22:08 UTC
pkg-fallout@ appears to build-as-user only on 10.3 i386 but this port is limited to 12.0-CURRENT.
Comment 2 Johannes M Dieterich freebsd_committer freebsd_triage 2017-08-29 17:28:43 UTC
Thanks. An update for this port including uidfix is in process to solve the open licensing issue so that it may be packaged.
Comment 3 Ben Woods freebsd_committer freebsd_triage 2017-08-29 23:45:21 UTC
Hi Johannes,
I think we should be patching the ${WRKSRC}/Makefile to install the kernel modules into ${STAGEDIR}/${KMODDIR} so that it can be packaged with poudriere.

For me, I would like to build the package with poudriere and then install the package from my pkg repo on that same machine. So I do not plan on distributing the binary package.

We could keep the NO_PACKAGE in the port Makefile to prevent the main FreeBSD build cluster from packaging and distributing it for now.
Comment 4 Johannes M Dieterich freebsd_committer freebsd_triage 2017-08-29 23:57:41 UTC
Hi Ben,

I think we are allowed to package them according to the licenses. The problem is just that the licenses have "no disassembly" clauses and are not standard ones we already support in the ports system. I will need to get back to read the licenses in detail and add them formally to the ports system.

Concerning the STAGEDIR: the port does stage (at least for me) the firmwares to the correct directory (i.e., for me: /usr/ports/graphics/gpu-firmware-kmod/work/stage/boot/modules/ ). Is this different for you?
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-08-30 00:10:52 UTC
A commit references this bug:

Author: jmd
Date: Wed Aug 30 00:10:13 UTC 2017
New revision: 448945
URL: https://svnweb.freebsd.org/changeset/ports/448945

Log:
  graphics/gpu-firmware-kmod: Fix build as user, install more radeonkms firmware.

  Add uidfix (originally suggested by kwm, noted later independently by jbeich in PR 221915 and jkim) and install more radeonkms firmware files as by drm-next pull request from jkim.

  PR:		221915
  Reviewed by:	swills (mentor)
  Approved by:	swills (mentor)
  Obtained from:	https://github.com/FreeBSDDesktop/freebsd-base-graphics [jkim] , kwm
  Differential Revision:	https://reviews.freebsd.org/D12158

Changes:
  head/graphics/gpu-firmware-kmod/Makefile
  head/graphics/gpu-firmware-kmod/distinfo
  head/graphics/gpu-firmware-kmod/pkg-plist
Comment 6 Johannes M Dieterich freebsd_committer freebsd_triage 2017-08-30 01:26:55 UTC
uidfix is applied now and license terms are explicitly specified which should allow packaging the port. Please close if this works for you now.
Comment 7 Ben Woods freebsd_committer freebsd_triage 2017-08-30 12:08:19 UTC
Works for me now.
Comment 8 Ben Woods freebsd_committer freebsd_triage 2017-08-30 12:09:11 UTC
I should add, thanks Jan and Johannes!