Skip to content

bzip2: use autoconf patch and remove in-house patching#11127

Merged
peti merged 1 commit intoNixOS:stagingfrom
mcmtroffaes:feature/bzip2-mingw-3
Nov 20, 2015
Merged

bzip2: use autoconf patch and remove in-house patching#11127
peti merged 1 commit intoNixOS:stagingfrom
mcmtroffaes:feature/bzip2-mingw-3

Conversation

@mcmtroffaes
Copy link
Copy Markdown
Contributor

Replaces #10820; alternative to #11126.

In addition to #11126, this patch uses the autoconf infrastructure not only for the cross build, but also for the native build, allowing most of the hacks to be removed and thereby resulting in a simpler nix expression. This will obviously cause a large mass rebuild.

This patch is obviously a lot more risky, as a lot of core tools depend on native bzip2.

cc @aszlig @peti

@mcmtroffaes
Copy link
Copy Markdown
Contributor Author

Oh in case you wonder why I removed linkStatic: it is nowhere used in the repository. You can check with:

https://github.com/NixOS/nixpkgs/search?utf8=%E2%9C%93&q=linkstatic

I did find some old traces to a linkStatic enabled bzip2 in the git history, and apparently at some point static builds of bzip2 were used for bootstrap purposes. But this got removed, so I thought it made sense to chuck it out with this patch as well.

@mcmtroffaes
Copy link
Copy Markdown
Contributor Author

I've now finished a test against staging as well (i.e. the tree exactly as in this pull request), both the native and cross builds. Maybe it is useful to list the changes from native staging:

  • The native build on staging builds both static and dynamic libraries - I do not know whether this is intentional or not. With this patch, the native build will no longer build the static library, only the dynamic library will be built. If for whichever reason the static library had any use anywhere, we could reinstate it through a configure flag (and include a comment of why it is needed).
  • With this patch, the bzip2 executable is no longer statically linked to libbzip2 (as the static library isn't built), and therefore it is smaller in size.
  • The native build did not include a pkgconfig file. With this patch, it does.

The mingw cross build produced is byte-for-byte identical to the one from patch #11126 (except for reference to the bzip2 lib path the nix store in the pkgconfig file, which obviously has to be different).

Is there anything else I should be testing? For the sake of it, I also built nix; this worked.

Darwin wasn't tested; unfortunately I don't have the hardware to do so. So it would be good if someone with the hardware would test the build before we merge this (at least if this patch is desirable). I checked the macports repository, but they also use an in-house custom patched version of the makefile:

https://svn.macports.org/repository/macports/trunk/dports/archivers/bzip2/Portfile

@peti peti added the 0.kind: enhancement Add something new or improve an existing system. label Nov 20, 2015
peti added a commit that referenced this pull request Nov 20, 2015
bzip2: use autoconf patch and remove in-house patching
@peti peti merged commit 05d4c72 into NixOS:staging Nov 20, 2015
@vcunat
Copy link
Copy Markdown
Member

vcunat commented Nov 20, 2015

I anticipate removing sharedLibrary changes semantics on darwin and cygwin, but maybe they will be OK (Hydra.nixos.org won't tell anytime soon).

@mcmtroffaes
Copy link
Copy Markdown
Contributor Author

Many thanks for merging. Touching wood...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: enhancement Add something new or improve an existing system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants