CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#581 - use xz for package-compression

Attached to Project: CRUX
Opened by Juergen Daubert (jue) - Thursday, 08 April 2010, 18:41 GMT
Last edited by Tilman Sauerbeck (tilman) - Monday, 24 May 2010, 12:04 GMT
Task Type Feature Request
Category tools → pkgutils
Status Closed
Assigned To Juergen Daubert (jue)
Operating System CRUX
Severity Low
Priority Low
Reported Version Development
Due in Version 2.7
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This task depends upon

Closed by  Tilman Sauerbeck (tilman)
Monday, 24 May 2010, 12:04 GMT
Reason for closing:  Implemented
Comment by Juergen Daubert (jue) - Saturday, 10 April 2010, 08:09 GMT
Proposed patch attached. New pkgmk.conf variable PKGMK_COMPRESSION_MODE to select the utility to be used for compression of the CRUX packages (gz, bz2 or xz). Defaults to gz.
Comment by Juergen Daubert (jue) - Monday, 17 May 2010, 06:58 GMT
We forgot prt-get. Looks like much more effort to add support for that, because the package name is, of course, hard-coded. See installtransaction.cpp line 347.

I've added Johannes to the notification list, maybe he has the time and feels like helping us here :)
Comment by Juergen Daubert (jue) - Monday, 17 May 2010, 07:45 GMT
pkginfo -i is affected as well, see PKG_EXT in pkgutil.{h,cc}. Maybe other functions of pkgadd too.
Comment by Tilman Sauerbeck (tilman) - Monday, 17 May 2010, 16:37 GMT
To clarify for those who follow along at home:

"pkginfo -i" is affected because pkgadd is affected because opening of packages in general is affected: the version number of the package is extracted by looking for the ".tar.gz" suffix.
Comment by Tilman Sauerbeck (tilman) - Monday, 17 May 2010, 16:43 GMT
The version number retrieval can be fixed by:

-#define PKG_EXT ".pkg.tar.gz"
+#define PKG_EXT ".pkg.tar."

AFAICS pkgutil.cc never made sure that there are no characters following PKG_EXT, so I don't feel to bad going with this patch.

I agree that fixing prt-get looks like "fun" :)
Comment by Johannes Winkelmann (jw) - Tuesday, 18 May 2010, 12:28 GMT
well, at this point in time prt-get's installtransaction.cpp executes the pkgadd command via /bin/sh, so from what I can see it would be enough to change line 347ff from ".pkg.tar.gz" to ".pkg.tar.*", however this might of course match more than one file; then again, the same will be true for pkgmk, right?
Comment by Johannes Winkelmann (jw) - Tuesday, 18 May 2010, 12:43 GMT
err, 's/pkgmk/pkginfo/g'

a cleaner solution would be to add a getPkgCompressionMode(), similar to getPkgDest(); should be rather simple :-). I can have a look, but probalby not today nor tomorrow :-)
Comment by Tilman Sauerbeck (tilman) - Tuesday, 18 May 2010, 17:10 GMT
Thanks for your time Johannes :)

Can you elaborate your point about pkginfo? I didn't get that. We're not calling pkginfo with wildcards. Or did you refer to the PKG_EXT change?

I'll give adding getPkgCompressionMode() a try.
Comment by Tilman Sauerbeck (tilman) - Tuesday, 18 May 2010, 17:23 GMT
There. prt-get works for me with that.
Comment by Johannes Winkelmann (jw) - Tuesday, 18 May 2010, 19:04 GMT
Here's my suggestion; didn't do a lot of testing, since I have no patched pkgutils :-)

my comment on pkginfo was related to the PKG_EXT diff in your earlier comment; just ignore that one
Comment by Juergen Daubert (jue) - Thursday, 20 May 2010, 19:24 GMT
Many thanks Johannes, works fine for me :-) Looks like we have all pieces together now and the new feature can be added with CRUX 2.7. Would you mind releasing a new version of prt-get ?
Comment by Johannes Winkelmann (jw) - Friday, 21 May 2010, 06:22 GMT
Thanks for testing. I'll push these, along with another patch I have lying around (to fix compilation on FreeBSD) and create a new tarball this weekend
Comment by Tilman Sauerbeck (tilman) - Friday, 21 May 2010, 18:06 GMT
I guess I'm not going to Cut&Paste hell after all -- thank you for providing better patches :)

FWIW, I pushed out Juergen's pkgutils patch.
Comment by Anonymous Submitter - Monday, 24 May 2010, 11:35 GMT
@tilman if you pushed it, why not close the task?

we also could think about packaging the binary packages for the crux 2.7 installation CD as .tar.xz since the packages are smaller, and thus make the CD smaller, saving bandwith on every site and making everyone happier as far as I can see...
Comment by Tilman Sauerbeck (tilman) - Monday, 24 May 2010, 12:03 GMT
That's why we did the whole compression mode thing :)

Loading...