On Oct 19, 2008, at 4:09 PM, Bernhard Rosenkraenzer wrote:

On Sunday 19 October 2008 22:03:09 Robert Scheck wrote:
On Sun, 19 Oct 2008, Jeff Johnson wrote:
Nothing wrong with the patch __BUT__

As you saw, the LZMA guy does __NOT__ wish the ".lzma" suffix
convention to survive the year 2009.

Possible. But then he needs to get rid about the current issues ASAP;
ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.12.tar.lzma exists for now and as long as *.lzma lifes for bleeding edge releases, I'll keep this
patch, to get things work.

This is how we're solving it in Ark for the time being:

--- rpm-5.1.6/build/parsePrep.c.ark 2008-06-06 23:35:17.000000000 +0200
+++ rpm-5.1.6/build/parsePrep.c 2008-06-06 23:36:30.000000000 +0200
@@ -272,7 +272,7 @@ _rpmmg_debug = 0;
    if (strcmp(tar, "%{__tar}") == 0)
        tar = xstrdup("tar");

-    if (compressed != COMPRESSED_NOT) {
+    if (compressed == COMPRESSED_ZIP) { // This is "if (compressed !=
COMPRESSED_NOT) {" in stock sources -- but we want to leave compression detection up to GNU tar, it does a better job in particular in telling lzma
apart from lzmash... We still need to support zip though
       const char *zipper;
       int needtar = 1;


The idea is that we use GNU tar, and that does detection of all compression formats it supports (including lzma, with a small patch) anyway, so rpm just
running

tar xf whatever.tar.*

in %setup does the trick nicely.


Clever.

Note the existence of rpmtar/rpmz, currently staged in rpmio "make check",
that have predictable arguments that don't randomly and capriciously
change, like --widlcards or whatever letter of the alphabet adds LZMA
handling "just like gzip/bzip2" to GNU tar ...

Note that the option sets for both rpmtar and rpmz are quite complete
and portable. Even if the rpmtar/rpmz tools do nothing more than exec
some distro-peculier rewritten command line to get the job done, then my goal,
removing tool option churn out of *.spec parsing and rpmbuild
building has already been achieved.

Not very portable though. ;)

These days its easier (for me anyways) to rewrite some CUSP
(Commonly Used System Program, a term invented by Debian to
demonstrate how superior dpkg is to rpm, and the raison d'etre
for rpm2cpio.sh, perhaps the most wildly popular piece of
code I've ever written in my life. But I digress ...) than
it is to try and figger out how to use vendor & GNU fiddled
executables portably.

YMMV

73 de Jeff
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to