Skip to content

Kernel models are VERSION_MINOR specific #617

@dlangille

Description

@dlangille

@grahamperrin & @EHWV - I think I've fixed it. Are there any issues here?

Thanks for the quickly implemented solution.


After fixing a kmod issue, [...]

Yes, I was was about to make a remark about that (you beat me to it); someting along the line of 'if it would be worth implementing', because it's a temporary and sliding window. Indeed, you're table has be expanded for the (small) number of 'kmods' specials. Thank you for taking the additional effort.

Which means special-casing code:

# kmod is special on the url
if [ $package_set == "kmod" ]
then
  url_package_set="kmods_latest_2"
else
  url_package_set=$package_set
fi

I realise that you cannot use the FreeBSD environment (you are targeting packages beyond on what host Freshports actually happens to run of course), but (instead of the hardcoded '2' in "kmods_latest_2") perhaps consider the 'special-casing' code with some (python I presume) variable, that would be in the spririt of (copy from my forum post):

T-Aoki said:
If you're tracking quarterly, replace kmods_latest_2 to kmods_quarterly_2.

Just to be clear: the output of pkg -vv is parsed.The appropriate (=future proof) way to specify it
in a .conf file (e.g. /usr/local/etc/pkg/repos/FreeBSD.conf like shown in message #34) is:

  • url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}, for the latest package repositories
  • url: pkg+https://pkg.freebsd.org/${ABI}/kmods_quarterly_${VERSION_MINOR}, for the quarterly package repositories

I'm not sure how precisely the repositories wil change (and if) when 14.0R goes EoL. At least when 14.3-RELEASE is released, expect kmods_latest_3 to appear.

Currently, for amd64, latest, my host shows (drm-61-kmod highlighted as example):

[0-0] # date -u
Sat Feb  1 20:33:32 UTC 2025
[1-0] # pkg sea '^drm-61-kmod'
drm-61-kmod-6.1.92.1401000_3   DRM drivers modules
drm-61-kmod-6.1.92.1402000_3   DRM drivers modules
[2-0] # pkg sea '\.1402' | wc -l
      43
[3-0] #

re:
[...]
* https://github.com/FreshPorts/packages-import/blob/main/get_packagesite.txz_date

As an alternative with only one pipe, you might consider something like:

[1-0] # curl -sI https://pkg.freebsd.org/FreeBSD:14:amd64/latest/packagesite.txz | sed -n -e ' s/Last-modified: //ip'
Wed, 22 Jan 2025 03:35:49 GMT
[2-0] #

(The combination of 'ip' (or 'Ip') is standard; it works equally well with textproc/gsed/)

Originally posted by @EHWV in #616

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions