[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
facilitate making xz-compressed distribution tarballs
From: |
Jim Meyering |
Subject: |
facilitate making xz-compressed distribution tarballs |
Date: |
Sat, 23 May 2009 12:09:51 +0200 |
Hi,
Following up on this message,
http://thread.gmane.org/gmane.emacs.devel/110963
I've included the trivially-rebased patch below, with a fixed log entry.
Also, in case you're interested in offering XZ-compressed tarballs,
I've included a small patch to teach "make-dist" about XZ.
The decrease in size is striking:
34M emacs-23.0.93.tar.bz2
26M emacs-23.0.93.tar.xz
In addition, unpacking with xz takes about 1/3 the time, here:
$ env time tar xf ../.new/emacs-23.0.93.tar.xz
2.55user 0.83system 0:03.40elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+309000outputs (0major+17044minor)pagefaults 0swaps
$ rm -rf emacs-23.0.93
$ env time tar xf ../emacs-23.0.93.tar.bz2
5.36user 0.83system 0:09.64elapsed 64%CPU (0avgtext+0avgdata 0maxresident)k
67912inputs+309000outputs (0major+1448minor)pagefaults 0swaps
I admit that when I first compressed with xz, the resulting size was
27MiB, but when I reordered files in the tarball (placing like suffixes
together), xz was able to compress to one full MiB smaller.
>From faa98d33239195f42c732f8886f1db378846553c Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 18 May 2009 11:33:03 +0200
Subject: [PATCH] automatically handle .xz suffix (XZ-compressed files), too
* jka-cmpr-hook.el (jka-compr-compression-info-list): Add xz.
XZ is the successor to LZMA: <http://tukaani.org/xz/>
---
lisp/jka-cmpr-hook.el | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el
index 96e9513..fa2fd40 100644
--- a/lisp/jka-cmpr-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -219,6 +219,10 @@ options through Custom does this automatically."
"compressing" "gzip" ("-c" "-q")
"uncompressing" "gzip" ("-c" "-q" "-d")
t t "\037\213"]
+ ["\\.xz\\(~\\|\\.~[0-9]+~\\)?\\'"
+ "XZ compressing" "xz" ("-c" "-q")
+ "XZ uncompressing" "xz" ("-c" "-q" "-d")
+ t t "\3757zXZ\0"]
;; dzip is gzip with random access. Its compression program can't
;; read/write stdin/out, so .dz files can only be viewed without
;; saving, having their contents decompressed with gzip.
--
1.6.3.1.149.gbc70c
>From ed71ebcb7acb709057979beb3d039e35d7accd1f Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 17 May 2009 10:21:19 +0200
Subject: [PATCH] * make-dist: Honor --xz option.
Mark --lzma as deprecated and undocument it.
---
make-dist | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/make-dist b/make-dist
index 0eb2b9a..9aa5a8e 100755
--- a/make-dist
+++ b/make-dist
@@ -84,10 +84,15 @@ while [ $# -gt 0 ]; do
"--bzip2")
default_gzip="bzip2"
;;
- ## Same with lzma.
+ ## lzma is deprecated; use its successor, xz, instead
"--lzma")
default_gzip="lzma"
;;
+ ## Same with xz.
+ "--xz")
+ default_gzip="xz"
+ export XZ_OPT=-9ev
+ ;;
"--snapshot")
clean_up=yes
@@ -102,7 +107,7 @@ while [ $# -gt 0 ]; do
echo " --bzip2 use bzip2 instead of gzip"
echo " --clean-up delete staging directories when done"
echo " --compress use compress instead of gzip"
- echo " --lzma use lzma instead of gzip"
+ echo " --xz use xz instead of gzip"
echo " --newer=TIME don't include files older than TIME"
echo " --no-check don't check for bad file names etc."
echo " --no-update don't recompile or do analogous things"
@@ -753,6 +758,7 @@ if [ "${make_tar}" = yes ]; then
bzip2) gzip_extension=.bz2 ;;
compress* ) gzip_extension=.Z ;;
lzma) gzip_extension=.lzma ;;
+ xz) gzip_extension=.xz ;;
* ) gzip_extension=.gz ;;
esac
echo "Creating tar file"
--
1.6.3.1.172.gaa20
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- facilitate making xz-compressed distribution tarballs,
Jim Meyering <=