Page MenuHomeFreeBSD

WIP to add sysutils/fwupd (if it runs well)
Needs ReviewPublic

Authored by norbert.kaminski_3mdeb.com on Mar 18 2021, 8:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 28, 2:25 AM
Unknown Object (File)
Wed, Dec 11, 3:31 AM
Unknown Object (File)
Thu, Dec 5, 3:18 PM
Unknown Object (File)
Nov 27 2024, 8:19 PM
Unknown Object (File)
Nov 24 2024, 4:34 PM
Unknown Object (File)
Nov 19 2024, 10:34 PM
Unknown Object (File)
Nov 19 2024, 5:04 AM
Unknown Object (File)
Nov 16 2024, 9:39 AM

Details

Reviewers
debdrup
emaste
jrm
Group Reviewers
O5: Ports Framework(Owns No Changed Paths)
portmgr
Summary

PR:
Submitted by:
Reported by:

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 37994
Build 34883: arc lint + arc unit

Event Timeline

jrm requested review of this revision.Mar 18 2021, 8:31 PM
otis added inline comments.
sysutils/fwupd/Makefile
17

meson and pkgconf dependencies are handled by USES.

19

libarchive could be handled by USES as well.

58

did you run portfmt -D, portclippy and portaudit -CA ?

textproc/libxmlb/files/patch-meson.build
9

is this supposed to be fixed to 3.7?

textproc/libxmlb/pkg-plist
62

docs should be hidden behind DOCS knob.

Dependencies fixes

TODO:

  • Add libgusb port
  • Add DOCS option
jrm marked 2 inline comments as done.

WIP to add devel/libgusb, which is a dependency for sysutils/fwupd

Current blocker for this port is that it requires libusb1 >= 1.0.19, but reports that we have 1.0.13 on 12.2

In D29332#656928, @jrm wrote:

WIP to add devel/libgusb, which is a dependency for sysutils/fwupd

Current blocker for this port is that it requires libusb1 >= 1.0.19, but reports that we have 1.0.13 on 12.2

Apply patches from https://github.com/hughsie/libgusb/pull/10 e.g.:

https://github.com/DankBSD/ports/blob/lite/devel/libgusb/files/patch-compatibility

Hi Norbert and Piotr,

Glad to see you here and thanks for your work on the FreeBSD port of fwupd. Norbert, I tentatively added you as a maintainer for the missing sysutil/fwupd dependencies. Please let me know if that's something you're not interested in and I'll change that.

Joe

  • patch devel/libgusb and add it as a dependency of sysutils/fwupd
  • WIP to add textproc/libjcat, another dependency for sysutils/fwupd
In D29332#657003, @greg_unrelenting.technology wrote:
In D29332#656928, @jrm wrote:

WIP to add devel/libgusb, which is a dependency for sysutils/fwupd

Current blocker for this port is that it requires libusb1 >= 1.0.19, but reports that we have 1.0.13 on 12.2

Apply patches from https://github.com/hughsie/libgusb/pull/10 e.g.:

https://github.com/DankBSD/ports/blob/lite/devel/libgusb/files/patch-compatibility

Done. Thanks for the heads-up.

Add missing libjcat to textproc/Makefile

devel/libgusb/Makefile
23

probably a stray line?

devel/libgusb/pkg-plist
23

documentation could be hidden behind %%DOCS%% perhaps?

sysutils/fwupd/Makefile
28

if introspection is only needed for build, then introspection:build might be a better choice.

sysutils/fwupd/pkg-plist
214

again, docs could be hidden behind %%DOCS%% and apropriate OPTIONS could be added?

  • textproc/libjcat: Fix build
  • devel/libgusb: Add DOCS knob and remove cruft
  • textproc/libxmlb: Add DOCS knob and remove cruft
  • sysutils/fwupd: Fix build and clean up
jrm marked 6 inline comments as done.Mar 22 2021, 5:35 PM
In D29332#659038, @jrm wrote:

Bump dependent ports

Pushed to the wrong revision. Will fix this momentarily.

Revert last change that was accidentally pushed to this differential

Thank you all for your amazing work. Currently, the fwupd patches have been merged into main repository.
I have created the update diff, but I am not able to attach the changes to this revision. Should I create the new one,
or is it some permission related problem? I followed this documentation:
https://wiki.freebsd.org/Phabricator#Create_a_Revision_via_Web_Interface ("To submit an updated patch")

Best regards,

Norbert Kamiński
Embedded Systems Engineer
http://3mdeb.com | @3mdeb_com

I have created the update diff, but I am not able to attach the changes to this revision.

You can only upload a new diff if you are listed as the author; you can 'Commandeer' the review first, then upload the diff.

Delete fwupd patches, bump fwupd revision, add GH_TAGNAME for CI purposes.

Fix diff (Add Diff 87710 to Diff 86313)

Make ifdefs in libgusb patches Linux related, not FreeBSD.

Hi Norbert,

After my last update, the fwupd build was completing.

After these changes there are errors:

../libfwupd/fwupd-common.c:1062:7: warning: implicit declaration of function 'memfd_create' is invalid in C99 [-Wimplicit-function-declaration]
        fd = memfd_create ("fwupd", MFD_CLOEXEC);
             ^
../libfwupd/fwupd-common.c:1062:30: error: use of undeclared identifier 'MFD_CLOEXEC'
        fd = memfd_create ("fwupd", MFD_CLOEXEC);
                                    ^

One caveat is that I first tested this in a 12.2 jail, but have since upgrade to 13.0 on the build host. There is a regression related to the switch to OpenZFS in 13.0 that is causing the 12.2 jail to crash, so I can only test on 13.0 at the moment. Unless you can beat me to it, I'll try to look at the cause of the error, but it may take me some time. Looks like it might be a missing #include.

Add uefi-plugin dependencies. Fix problem when building in the FreeBSD 13.0.

Hi Joseph,

Problem has been fixed in the fwupd tree. Also most of the dependencies patches are upstreamed.
There is one patch needed to fix Python version to the 3.8. By default meson is looking for modules
for the 3.7, but py-object3 which is needed for fwupd is built and installed for python3.8.

Best regards,
Norbert Kamiński

Hi Norbert,

I tested the latest updates. The devel/libefiboot port that you added fails to build. http://pkg.awarnach.mathstat.dal.ca/data/13amd64-default/2021-06-03_21h36m23s/logs/errors/libefiboot-0.24_1.log It also looks to be the same repository as a port that is already in the tree, devel/efivar. They both use GH_ACCOUNT=rhboot and GH_PROJECT=efivar. Is the only difference between the two that you pulled in a newer version? If so, could you just update devel/efivar? If we should be pulling in the latest commit, which is long after the last release, we can do this:

PORTNAME=	efivar
DISTVERSION=	37-96
DISTVERSIONSUFFIX=	-gcff88dd
CATEGORIES=	devel

Joe

rene added inline comments.
devel/libefiboot/Makefile
8 ↗(On Diff #90017)

Please do not add new ports with ports@ as maintainer.

I just try to get an idea of the current status and what is needed to test fwupd and get this into the portstree.
So if anyone knows any details about the status (especially about runtime behavior) please share it.

This is a list of open issues I already identified:

  • devel/libefiboot: merge with existing devel/efivar, update to 38 + patches
  • sysutils/fwupd: update from 1.6.1 to 1.9.6
  • sysutils/fwupd-efi: update from 1.0 to 1.4
  • textproc/libjcat: update from 0.1.8 to 0.1.14
  • Portstree updates since 2021 like WWW, USES etc.
  • portlint

The following ports are not needed anymore (already exist):

  • devel/libgusb: port already at 0.3.10
  • textproc/libxmlb: port already at 0.3.14
arved added inline comments.
textproc/libjcat/pkg-plist
24

> Registering installation for libjcat-0.1.6

pkg-static: Unable to access file /usr/home/arved/GIT/ports/textproc/libjcat/work/stage/usr/local/man/man1/jcat-tool.1.gz:No such file or directory

Manpages have been moved to share/man

I worked a bit on this to bring the ports to recent versions and fix the comments.

The dependencies are almost ready:

  • textproc/libjcat: Updated to 0.2.1
  • sysutils/fwupd-efi: Update to 1.5

This leaves us with the main ports devel/libefiboot and sysutils/fwupd but I have a week of hacking ahead in Dublin
so if anyone is interested to team up let me know!

Code is in my repo and I will create a PR or call for testers when it's ready:
https://codeberg.org/decke/ports/src/branch/master

@Norbert Kaminski: Sorry that this stalled for such a long time! Do you still want to maintain these ports once they
are in the portstree or should we find someone from FreeBSD side?