Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux/make-bootstrap-tools: Add support for a real XZ and HTTPS in curl #8081

Closed
wants to merge 10 commits into from

Conversation

wkennington
Copy link
Contributor

This change makes bootstrap-tools.tar.xz 500k larger which should be inconsequential given that bootstrap-tools is already 26MB. It also reduces the overall size of the bootstrap-tools tarball by dynamically determining what libraries it needs to include at build time. Note this is the first of 2 PR's

@wkennington
Copy link
Contributor Author

This is the first set of patches in two PR's, the steps for migration are:

  • Merge this pr into master
  • Merge master into staging
  • Build a bootstrap-tools tarball in staging
  • Replace the bootstrap-tools tarballs in staging and then apply the second patchset when building stdenv.
  • Merge staging back into master once everything builds.

@wkennington
Copy link
Contributor Author

cc @edolstra @vcunat

cp -d ${openssl}/lib/*.dylib $out/lib

# Add ca-certs for curl verification
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought bootstrap only uses fetchurl, which doesn't use certificates AFAIK (--insecure).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at the next PR.

On Sun, May 31, 2015, 00:35 Vladimír Čunát [email protected] wrote:

In pkgs/stdenv/darwin/make-bootstrap-tools.nix
#8081 (comment):

   cp -d ${openssl}/lib/*.dylib $out/lib
  •  # Add ca-certs for curl verification
    

I thought bootstrap only uses fetchurl, which doesn't use certificates
AFAIK (--insecure).


Reply to this email directly or view it on GitHub
https://github.com/NixOS/nixpkgs/pull/8081/files#r31387744.

@vcunat
Copy link
Member

vcunat commented May 31, 2015

In general, I believe we should replace (most) usages of bz2 by xz. It's supposed to be significantly superior in both compression ratio and resources needed for decompression. We might even drop bzip2 from the bootstrap tarball, but there would be little gain (~150 kB).

@wkennington
Copy link
Contributor Author

Agreed but we have to change all of those sources first. I think it's worth
just leaving it in.

On Sun, May 31, 2015, 00:45 Vladimír Čunát [email protected] wrote:

In general, I believe we should replace (most) usages of bz2 by xz. It's
supposed to be significantly superior in both compression ratio and
resources needed for decompression. We might even drop bzip2 from the
bootstrap tarball, but there would be little gain (~150 kB).


Reply to this email directly or view it on GitHub
#8081 (comment).

@wkennington wkennington force-pushed the master.bootstrap1 branch 2 times, most recently from 8f1c2f4 to 127184d Compare May 31, 2015 21:37
@wkennington
Copy link
Contributor Author

This will now need to be merged into staging as the fixes for grep require a mass rebuild.

@vcunat vcunat added the 1.severity: mass-rebuild This PR causes a large number of packages to rebuild label Jun 2, 2015
@dezgeg
Copy link
Contributor

dezgeg commented Jun 3, 2015

I built this and the 2nd PR on my ARMv7 board. Here's one more patch that's needed for the cross tools to build correctly: dezgeg@6d0f474.

@vcunat vcunat modified the milestones: 15.10, 15.06 Jun 11, 2015
@vcunat vcunat mentioned this pull request Jun 22, 2015
@edolstra
Copy link
Member

edolstra commented Jul 7, 2015

This PR is unreviewable like this, since it contains 158 commits, most of which seem unrelated to the bootstrap tools...

@wkennington
Copy link
Contributor Author

It was a bad rebase after I Cherry picked in some stuff. I'll fix this soon.

On Tue, Jul 7, 2015, 06:33 Eelco Dolstra [email protected] wrote:

This PR is unreviewable like this, since it contains 158 commits, most of
which seem unrelated to the bootstrap tools...


Reply to this email directly or view it on GitHub
#8081 (comment).

…ols inside of bootstrap tools

This makes it easier to add tools in the future and helps to minimize
the amount of included libraries to the minimum without breaking
executables.
This will open up options for sourcing tarballs from repositories like
github as they only serve tarballs over ssl. It will also allow us to
eventually verify all tls connections made by fetchurl.
@domenkozar
Copy link
Member

This won't make it into 15.09

@domenkozar domenkozar modified the milestones: 16.03, 15.09 Sep 9, 2015
@bjornfor
Copy link
Contributor

Any news here? (I'm looking for HTTPS in fetchurl for bootstrapping perl-cross.)

@vcunat
Copy link
Member

vcunat commented Oct 20, 2015

IMO, using/supporting HTTPS down to bootstrapping level is rather superfluous. All fetches have checked hashes, so the only use case is when you update by invalidating hash and using the one from the error message, but we would better improve that workflow instead....

@wkennington
Copy link
Contributor Author

No, checking certs may be superfluous but it is becoming the trend to only
host tarballs over https. Just look at any project hosted on github as an
example. If they don't do any third party hosting it will only be available
over https. This was a problem for supporting http2 in curl as the project
needed was only hosted on GitHub but the bootstrap couldn't pull the
binaries directly.
On Tue, Oct 20, 2015 at 12:15 PM Vladimír Čunát [email protected]
wrote:

IMO, using/supporting HTTPS down to bootstrapping level is rather
superfluous. All fetches have checked hashes, so the only use case is when
you update by invalidating hash and using the one from the error message,
but we would better improve that workflow instead....


Reply to this email directly or view it on GitHub
#8081 (comment).

@bjornfor
Copy link
Contributor

Yes, exactly. perl-cross tarballs are only available over HTTPS on github. (My long-term plan is to build a small cross-system with nix, boot it in Qemu and native compile from there.)

@vcunat
Copy link
Member

vcunat commented Oct 20, 2015

Oh, I see. I know some people want to completely abolish unencrypted transfers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.severity: mass-rebuild This PR causes a large number of packages to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants