Bug 107630 - Distribute source code using .tar.xz archives
Summary: Distribute source code using .tar.xz archives
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: low enhancement
Assignee: Simon McVittie
QA Contact: D-Bus Maintainers
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-08-20 19:08 UTC by Francesco Turco
Modified: 2018-08-29 18:02 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xz.patch (398 bytes, patch)
2018-08-21 16:20 UTC, Francesco Turco
Details | Splinter Review
hacking.patch (544 bytes, patch)
2018-08-22 11:43 UTC, Francesco Turco
Details | Splinter Review
doc.patch (947 bytes, patch)
2018-08-22 11:43 UTC, Francesco Turco
Details | Splinter Review
build: Don't ship detailed changelogs for releases over 10 years old (731 bytes, patch)
2018-08-23 18:19 UTC, Simon McVittie
Details | Splinter Review
Remove old changelogs from git (814 bytes, patch)
2018-08-23 18:21 UTC, Simon McVittie
Details | Splinter Review
build: Don't install a ChangeLog that we don't update (1.15 KB, patch)
2018-08-23 18:21 UTC, Simon McVittie
Details | Splinter Review
Distribute source code using .tar.xz archives (2.77 KB, patch)
2018-08-23 18:23 UTC, Simon McVittie
Details | Splinter Review

Description Francesco Turco 2018-08-20 19:08:06 UTC
Currently dbus source code is distributed using .tar.gz archives. In my opinion dbus (along with dbus-glib and dbus-python) should use .tar.xz archives instead.

On my system:

> $ du -k dbus-1.12.10.tar.??
> 2028    dbus-1.12.10.tar.gz
> 1388    dbus-1.12.10.tar.xz

By using the XZ format we can save about 32% of disk space and bandwidth.

What do you think?
Comment 1 Simon McVittie 2018-08-21 15:07:39 UTC
dbus is not a large package, so saving a few K of disk space and bandwidth for people who build it from source is not a particularly high priority. You'd save more disk space and bandwidth by using a binary distribution.

If this is important to you, perhaps you could contribute a patch for configure.ac that makes "make dist" produce an xz archive instead of a gzip archive? I think that change would be OK on the master (1.13.x) branch.

I don't want to release source code for the same release in multiple formats, so if we produce xz archives, we should *only* produce xz archives from that point onward.

I think the stable branches (1.12.x, 1.10.x etc.) should continue to use the same source format as 1.12.0 and 1.10.0, because stable branches are meant to be predictable. If 1.13.x switches to xz, then a future 1.14.x stable branch would continue to use xz.

Not distributing ChangeLog.pre-* would probably be another easy way to save an amount of archive size comparable to what you save by using xz.
Comment 2 Francesco Turco 2018-08-21 16:20:03 UTC
Created attachment 141221 [details] [review]
xz.patch
Comment 3 Francesco Turco 2018-08-21 16:21:28 UTC
With my patch the "make dist" command now produces a xz tarball instead of a gz one.
Comment 4 Philip Withnall 2018-08-22 09:31:54 UTC
Comment on attachment 141221 [details] [review]
xz.patch

Review of attachment 141221 [details] [review]:
-----------------------------------------------------------------

If you’re going to change the distribution format, you might as well also change the dbus-docs.tar.gz target in doc/Makefile.am, and the scp instructions in HACKING.
Comment 5 Francesco Turco 2018-08-22 11:43:00 UTC
Created attachment 141240 [details] [review]
hacking.patch
Comment 6 Francesco Turco 2018-08-22 11:43:21 UTC
Created attachment 141241 [details] [review]
doc.patch
Comment 7 Simon McVittie 2018-08-23 18:19:28 UTC
Created attachment 141257 [details] [review]
build: Don't ship detailed changelogs for releases over 10 years old

---

I wouldn't be surprised if this saved an amount of space comparable to using xz.
Comment 8 Simon McVittie 2018-08-23 18:21:11 UTC
Created attachment 141258 [details] [review]
Remove old changelogs from git

The changelogs (and the commits themselves, converted to git format)
are still in the git history if anyone needs them.

---

I used git format-patch --irreversible-delete for this, because uploading the diff would be ridiculous. Here's the diffstat:

 ChangeLog.pre-1-0 | 15146 --------------------------------------------
 ChangeLog.pre-1-2 |  2027 ------
 2 files changed, 17173 deletions(-)
 delete mode 100644 ChangeLog.pre-1-0
 delete mode 100644 ChangeLog.pre-1-2
Comment 9 Simon McVittie 2018-08-23 18:21:39 UTC
Created attachment 141259 [details] [review]
build: Don't install a ChangeLog that we don't update
Comment 10 Simon McVittie 2018-08-23 18:23:49 UTC
Created attachment 141260 [details] [review]
Distribute source code using .tar.xz archives

From: Francesco Turco <fturco fastmail fm>                               

This saves around 32% of the size of the archive.

---

This combines Attachment #141221 [details], Attachment #141240 [details] and Attachment #141241 [details], rebased onto current git master (and Attachment #141259 [details]) in which HACKING has been renamed to CONTRIBUTING.

If you would prefer a different commit message or attribution, please attach a git commit formatted with `git format-patch`.
Comment 11 Simon McVittie 2018-08-23 18:24:43 UTC
(In reply to Simon McVittie from comment #1)
> Not distributing ChangeLog.pre-* would probably be another easy way to save
> an amount of archive size comparable to what you save by using xz.

I took the opportunity to do this: they're just dead weight.
Comment 12 Philip Withnall 2018-08-23 23:18:57 UTC
Comment on attachment 141257 [details] [review]
build: Don't ship detailed changelogs for releases over 10 years old

Review of attachment 141257 [details] [review]:
-----------------------------------------------------------------

r+
Comment 13 Philip Withnall 2018-08-23 23:19:03 UTC
Comment on attachment 141259 [details] [review]
build: Don't install a ChangeLog that we don't update

Review of attachment 141259 [details] [review]:
-----------------------------------------------------------------

r+
Comment 14 Philip Withnall 2018-08-23 23:19:06 UTC
Comment on attachment 141260 [details] [review]
Distribute source code using .tar.xz archives

Review of attachment 141260 [details] [review]:
-----------------------------------------------------------------

r+
Comment 15 Philip Withnall 2018-08-23 23:19:32 UTC
r+ on everything including the deletion of the old ChangeLogs (which Splinter doesn’t let me review individually).
Comment 16 Simon McVittie 2018-08-29 18:02:18 UTC
Fixed in git for 1.13.8, thanks


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.