CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#1410 - pkgmk - add support for binary packages

Attached to Project: CRUX
Opened by Fun (fun) - Monday, 01 May 2017, 16:25 GMT
Last edited by Fun (fun) - Sunday, 18 June 2017, 16:41 GMT
Task Type Feature Request
Category tools → pkgutils
Status New
Assigned To CRUX Developers (crux)
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 90%
Votes 1
Private No

Details

PKGMK_PACKAGE_CACHE_REGEX="(wxgtk|firefox)#"
PKGMK_PACKAGE_CACHE=(http://crux.ster.zone/packages/3.3/)

The best practice for every port update is to rebuild the port (prt-get depinst) in a pristine container, with only core packages, and no sexy CFLAGS. Doing this, the maintainer has "the package", and it will be pity not to put it somewhere, for others to use it, especially when it will take 15min*10 to build it on a slow machine.

From day one I've asked why do people leave CRUX. And I've asked for me, to know what to avoid. While I didn't get a clear answer, I've seen messages like: tired of building packages. Even these days, on the #crux channel.

I've attached the patch 0002 a second time, with a fix to avoid downloading packages when "force build" option is used.

Patch 0003 try all the extensions (gz, bz2, xz) regardless of PKGMK_COMPRESSION_MODE, and use a symlink if needed.
Patch 0004 add signature support.

   0001-pkgmk-refactor-download_... (2.5 KiB)
   0002-pkgmk-add-support-for-bi... (1.8 KiB)
   0002-pkgmk-add-support-for-bi... (1.8 KiB)
   0003-pkgmk-download-packages-... (1.8 KiB)
   0004-pkgmk-add-signature-supp... (2.3 KiB)
This task depends upon

Comment by Fun (fun) - Wednesday, 10 May 2017, 22:04 GMT
Workaround, without patching pkgmk: https://github.com/therealfun/crux-ports/blob/master/pkgmk.conf/FS1410.enabled

I've adapted the above patches to work when sourced from /etc/pkgmk.conf.

This is "binary package support for the masses".
Comment by Fun (fun) - Wednesday, 10 May 2017, 22:26 GMT
If only Romster will use this (just updated) patch with:

PKGMK_MAKE_PACKAGE_SIGNATURE=yes

when doing:

prt-get update firefox --margs="-sk=... -pk=..."

and the masses will have signature support too.
Comment by Fun (fun) - Thursday, 18 May 2017, 18:40 GMT
I've changed the check_package_signature() function to avoid using "set -e" as a way to exit a sub-shell "()", and use an explicit "exit". See https://github.com/therealfun/crux-ports/blob/master/pkgmk.conf/FS1410.orig.

After asking on #bash, it was a surprise to discover that in following two cases, the "set -e" behavior differ:

(set -e; false; true) || echo $?
(set -e; false; true); echo $?

In the first case, true is still executed.


Comment by Fun (fun) - Saturday, 24 June 2017, 22:24 GMT
When these patches will be considered for inclusion in the /usr/bin/pkgmk (if ever), check the "pkgmk.conf" adaptation (most probably it will be better).
Comment by Fun (fun) - Sunday, 08 April 2018, 12:13 GMT
Attached a simpler version, which needs the refactoring from FS#1641

The new variable (PKGMK_PACKAGE_MIRRORS) isn't documented nor initialized, but this shouldn't be a problem for someone interested.

Loading...