Discussion:
[PATCH] build: Distribute tarball compressed with xz instead of bzip2
Guillem Jover
2018-11-06 01:47:53 UTC
Permalink
* Makefile (dist): Change bz2 to xz.
(%.xz): Add target.
(%.bz2): Remove target.
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index c0aa59a0e..6288a1573 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ dist-version := $(shell cd $(top_srcdir)/ && $(git_describe))

.PHONY: dist
ifdef configured
-dist: $(foreach Z,bz2 gz,$(dist-version).tar.$(Z))
+dist: $(foreach Z,xz gz,$(dist-version).tar.$(Z))
else
dist:
@echo >&2 'Cannot build a distribution from an unconfigured tree.'
@@ -238,8 +238,8 @@ install-headers: $(addsuffix -install-headers,$(lib-subdirs) \
TAGS: $(addsuffix -TAGS,$(working-prog-subdirs) $(lib-subdirs))
etags -o $@ $(patsubst %-TAGS,-i %/TAGS,$^)

-%.bz2: %
- bzip2 -9 < $< > $@
+%.xz: %
+ xz < $< > $@

%.gz: %
gzip -9n < $< > $@
--
2.19.1.1182.g4ecb1133ce
Samuel Thibault
2018-11-06 02:32:29 UTC
Permalink
Post by Guillem Jover
* Makefile (dist): Change bz2 to xz.
(%.xz): Add target.
(%.bz2): Remove target.
Applied, thanks!
Post by Guillem Jover
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index c0aa59a0e..6288a1573 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ dist-version := $(shell cd $(top_srcdir)/ && $(git_describe))
.PHONY: dist
ifdef configured
-dist: $(foreach Z,bz2 gz,$(dist-version).tar.$(Z))
+dist: $(foreach Z,xz gz,$(dist-version).tar.$(Z))
else
@echo >&2 'Cannot build a distribution from an unconfigured tree.'
@@ -238,8 +238,8 @@ install-headers: $(addsuffix -install-headers,$(lib-subdirs) \
TAGS: $(addsuffix -TAGS,$(working-prog-subdirs) $(lib-subdirs))
-%.bz2: %
+%.xz: %
%.gz: %
--
2.19.1.1182.g4ecb1133ce
--
Samuel
<b> j'en ai parlé à xavier, il n'est pas interdit qu'il le change un jour
-+- #sos - a le bras long vers le chameau -+-
Thomas Schwinge
2018-11-06 09:47:02 UTC
Permalink
Hi!
Post by Guillem Jover
* Makefile (dist): Change bz2 to xz.
(%.xz): Add target.
(%.bz2): Remove target.
Curious: why a) use "xz" instead of what we got before, b) move from
"bz2" to "xz" instead of offering both (like we continue to do for "gz")?


Grüße
Thomas
Post by Guillem Jover
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index c0aa59a0e..6288a1573 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ dist-version := $(shell cd $(top_srcdir)/ && $(git_describe))
.PHONY: dist
ifdef configured
-dist: $(foreach Z,bz2 gz,$(dist-version).tar.$(Z))
+dist: $(foreach Z,xz gz,$(dist-version).tar.$(Z))
else
@echo >&2 'Cannot build a distribution from an unconfigured tree.'
@@ -238,8 +238,8 @@ install-headers: $(addsuffix -install-headers,$(lib-subdirs) \
TAGS: $(addsuffix -TAGS,$(working-prog-subdirs) $(lib-subdirs))
-%.bz2: %
+%.xz: %
%.gz: %
--
2.19.1.1182.g4ecb1133ce
Guillem Jover
2018-11-06 12:21:41 UTC
Permalink
Hi!
Post by Thomas Schwinge
Post by Guillem Jover
* Makefile (dist): Change bz2 to xz.
(%.xz): Add target.
(%.bz2): Remove target.
Curious: why a) use "xz" instead of what we got before, b) move from
"bz2" to "xz" instead of offering both (like we continue to do for "gz")?
Sorry, should have added some rationale, thought it was obvious! :)

xz compresses much better than gzip and bzip2. gzip is very universal
in the availability sense, it's also pretty fast, and even though
takes more space it uses less memory. bzip2 OTOH is not widely
available, it's slow and takes more space, so it seems superfluous,
and providing three compressed tarballs, seems like a waste of space
on the server. :)

Thanks,
Guillem

Loading...