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.
Comment by Tim Biermann (tb) - Friday, 15 October 2021, 19:32 GMT
I am not pro adding that to pkgmk. CRUX is a source based distro.
However, there is https://crux.nu/gitweb/?p=tools/pkg-get.git;a=summary for those that need it, whats wrong with that @fun?
Comment by Fun (fun) - Saturday, 16 October 2021, 08:20 GMT
@tb, if you put it this way, then what is wrong with the other source based distributions? :)

Once built, a program is packed to a "shared" directory, which can be shared between local systems or to help those in need (as Romster does/did). That is where this patch could help.

But, I don't rely on changes to pkgmk, as I can patch it on-the-fly with https://gitlab.com/therealfun/crux-ports/-/tree/master/port-on-rails or https://gitlab.com/therealfun/crux-ports/-/tree/master/pkgmk.conf
So, I guess you can close it, as there are not too many votes for this issue :)

Not to mention that the reason to propose these patches wasn't to have a "better" support for binary packages with CRUX, but I was trying to understand why do people leave CRUX (once they like it) and find ways to prevent this (including for myself). Having to build compilers every 2-3 weeks or to rebuild huge package just because a tiny library was "improved" gets the fun out of a source based distribution, if you are asking me :)
Comment by Tim Biermann (tb) - Saturday, 16 October 2021, 09:34 GMT
Well, I don't need to close this as this could lead to an interesting discussion. But that might be better suited on the mailing list but there is not much going on there either.

I can tell why I feel people might leave again:

1. not enough ports (that work!) - many things aren't easily available in contrib that people might need to feel home.
There are a few people willing to whip together a repository, often one timers, they then abandon those ports and feel like they did something good.
There is way less people that actually sign up long term, and lesser that want to help out in contrib to make up a good ecosystem. Everybody "just expects things".

2. we don't have people that actually sign up to care about our core tools, and thus, we are lacking a few features that we need as maintainers (git support in pkgmk, an no extract logic to prevent certain files from being unpacked, but also user experience is lacking, for example that one ticket that wants to introduce a depupdate function to prt-get to automatically install new dependencies

3. they are not helped properly. instead of getting to learn our system tools, you can watch people getting told to use wrapper scripts, patch prt-get themselves or whatever.
The explenation is actually pretty simple as soon as the concept gets clear to users and instead of letting them wrap their heads around that they are suggested to use whacky bash scripts.. Like yeah, I'd probably leave as a new user at that point too.

But I also have to add:
This is CRUX, not Kindergarten. I can live with all of that just fine, even though I'd like to help to make it better for people.
And this leads me to my standpoint that I don't want that in pkgmk directly.
It's perfectly fine to add binary packages with something like pkg-get for the faint of heart (and old computers that should probably be exchanged anyway) and thats where my idea to have some form of CI for CRUX git repos comes into play. If we'd use gitlabs CI for example we could add those artifacts for big packages where it makes sense.. e.g. clang, firefox, libreoffice, llvm, rust.. from a clean, transperent and trusted source/environment. But: that might just cost us money, too, and right now, I am not aware of any money stream incoming for CRUX.

Without that, as a maintainer of so many ports, I am not willing to go the extra mile _again_ and provide/host/care for that as well. CRUX is already taking a lot of my time and it doesn't pay for any bills here. Truth is, however, if it were cease to exist, I would keep using it just the same for myself.

So how do we actually get users to stay on CRUX?
Well, maybe if we were to provide the ports that are expected. It's weird to me as well, but people actually like gnome, cinammon, whatthehellever, but these things you won't find on here.

We need maintainers that can provide clean Pkgfiles that will work.
We need people (imo, like you, fun) that can take care of prt-get/prt-utils/.. in a way that it stays consistent to the ground work laid out by Johannes Winkelmann!
We need to adapt to an changing environment because we don't write the software we use, e.g. firefox depending on rust, chromium likes to depend on the llvm-toolchain.. people need to get over it, thats just how it is.
Comment by Tim Biermann (tb) - Saturday, 16 October 2021, 09:45 GMT
> Having to build compilers every 2-3 weeks or to rebuild huge package just because a tiny library was "improved" gets the fun out of a source based distribution, if you are asking me :)

Commenting on that part directly, yes, sure, there are situations where you might wish that it wouldn't have to be this way, granted. I see much more use for CRUX-ARM imo, but sure. But personally, I don't mind too much. I got the stuff I need set up and that barely failed me.
It's also valid to make educated choices about what to update and what not, you know? It just needs to be common knowledge that poppler might destroy certain apps for you, like inkscape. Maybe it needs to be laid out in the manual more, but people also leave because they can barely read that from start to end anyway (makes you wonder how they got CRUX installed in the first place..).

Loading...