Rollup merge of #41600 - ranma42:xz-dist, r=alexcrichton
Generate XZ-compressed tarballs Integrate the new `rust-installer` and extend manifests with keys for xz-compressed tarballs. One of the steps required for https://github.com/rust-lang/rust/issues/21724
This commit is contained in:
commit
10fde3393b
15
.travis.yml
15
.travis.yml
|
@ -95,7 +95,10 @@ matrix:
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.7
|
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode7
|
osx_image: xcode7
|
||||||
install: *osx_install_sccache
|
install:
|
||||||
|
- travis_retry brew update
|
||||||
|
- travis_retry brew install xz
|
||||||
|
- *osx_install_sccache
|
||||||
- env: >
|
- env: >
|
||||||
RUST_CHECK_TARGET=dist
|
RUST_CHECK_TARGET=dist
|
||||||
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended --enable-sanitizers"
|
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended --enable-sanitizers"
|
||||||
|
@ -106,7 +109,10 @@ matrix:
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.7
|
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode7
|
osx_image: xcode7
|
||||||
install: *osx_install_sccache
|
install:
|
||||||
|
- travis_retry brew update
|
||||||
|
- travis_retry brew install xz
|
||||||
|
- *osx_install_sccache
|
||||||
|
|
||||||
# "alternate" deployments, these are "nightlies" but don't have assertions
|
# "alternate" deployments, these are "nightlies" but don't have assertions
|
||||||
# turned on, they're deployed to a different location primarily for projects
|
# turned on, they're deployed to a different location primarily for projects
|
||||||
|
@ -123,7 +129,10 @@ matrix:
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.7
|
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode7
|
osx_image: xcode7
|
||||||
install: *osx_install_sccache
|
install:
|
||||||
|
- travis_retry brew update
|
||||||
|
- travis_retry brew install xz
|
||||||
|
- *osx_install_sccache
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4f994850808a572e2cc8d43f968893c8e942e9bf
|
Subproject commit 4cf7397fb0566e745f0bce4c5b009cfeb5d12c53
|
|
@ -116,10 +116,26 @@ struct Target {
|
||||||
available: bool,
|
available: bool,
|
||||||
url: Option<String>,
|
url: Option<String>,
|
||||||
hash: Option<String>,
|
hash: Option<String>,
|
||||||
|
xz_url: Option<String>,
|
||||||
|
xz_hash: Option<String>,
|
||||||
components: Option<Vec<Component>>,
|
components: Option<Vec<Component>>,
|
||||||
extensions: Option<Vec<Component>>,
|
extensions: Option<Vec<Component>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Target {
|
||||||
|
fn unavailable() -> Target {
|
||||||
|
Target {
|
||||||
|
available: false,
|
||||||
|
url: None,
|
||||||
|
hash: None,
|
||||||
|
xz_url: None,
|
||||||
|
xz_hash: None,
|
||||||
|
components: None,
|
||||||
|
extensions: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(RustcEncodable)]
|
#[derive(RustcEncodable)]
|
||||||
struct Component {
|
struct Component {
|
||||||
pkg: String,
|
pkg: String,
|
||||||
|
@ -242,16 +258,12 @@ impl Builder {
|
||||||
let digest = match self.digests.remove(&filename) {
|
let digest = match self.digests.remove(&filename) {
|
||||||
Some(digest) => digest,
|
Some(digest) => digest,
|
||||||
None => {
|
None => {
|
||||||
pkg.target.insert(host.to_string(), Target {
|
pkg.target.insert(host.to_string(), Target::unavailable());
|
||||||
available: false,
|
|
||||||
url: None,
|
|
||||||
hash: None,
|
|
||||||
components: None,
|
|
||||||
extensions: None,
|
|
||||||
});
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
let xz_filename = filename.replace(".tar.gz", ".tar.xz");
|
||||||
|
let xz_digest = self.digests.remove(&xz_filename);
|
||||||
let mut components = Vec::new();
|
let mut components = Vec::new();
|
||||||
let mut extensions = Vec::new();
|
let mut extensions = Vec::new();
|
||||||
|
|
||||||
|
@ -293,8 +305,10 @@ impl Builder {
|
||||||
|
|
||||||
pkg.target.insert(host.to_string(), Target {
|
pkg.target.insert(host.to_string(), Target {
|
||||||
available: true,
|
available: true,
|
||||||
url: Some(self.url("rust", host)),
|
url: Some(self.url(&filename)),
|
||||||
hash: Some(digest),
|
hash: Some(digest),
|
||||||
|
xz_url: xz_digest.as_ref().map(|_| self.url(&xz_filename)),
|
||||||
|
xz_hash: xz_digest,
|
||||||
components: Some(components),
|
components: Some(components),
|
||||||
extensions: Some(extensions),
|
extensions: Some(extensions),
|
||||||
});
|
});
|
||||||
|
@ -312,21 +326,17 @@ impl Builder {
|
||||||
let filename = self.filename(pkgname, name);
|
let filename = self.filename(pkgname, name);
|
||||||
let digest = match self.digests.remove(&filename) {
|
let digest = match self.digests.remove(&filename) {
|
||||||
Some(digest) => digest,
|
Some(digest) => digest,
|
||||||
None => {
|
None => return (name.to_string(), Target::unavailable()),
|
||||||
return (name.to_string(), Target {
|
|
||||||
available: false,
|
|
||||||
url: None,
|
|
||||||
hash: None,
|
|
||||||
components: None,
|
|
||||||
extensions: None,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
let xz_filename = filename.replace(".tar.gz", ".tar.xz");
|
||||||
|
let xz_digest = self.digests.remove(&xz_filename);
|
||||||
|
|
||||||
(name.to_string(), Target {
|
(name.to_string(), Target {
|
||||||
available: true,
|
available: true,
|
||||||
url: Some(self.url(pkgname, name)),
|
url: Some(self.url(&filename)),
|
||||||
hash: Some(digest),
|
hash: Some(digest),
|
||||||
|
xz_url: xz_digest.as_ref().map(|_| self.url(&xz_filename)),
|
||||||
|
xz_hash: xz_digest,
|
||||||
components: None,
|
components: None,
|
||||||
extensions: None,
|
extensions: None,
|
||||||
})
|
})
|
||||||
|
@ -338,11 +348,11 @@ impl Builder {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn url(&self, component: &str, target: &str) -> String {
|
fn url(&self, filename: &str) -> String {
|
||||||
format!("{}/{}/{}",
|
format!("{}/{}/{}",
|
||||||
self.s3_address,
|
self.s3_address,
|
||||||
self.date,
|
self.date,
|
||||||
self.filename(component, target))
|
filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn filename(&self, component: &str, target: &str) -> String {
|
fn filename(&self, component: &str, target: &str) -> String {
|
||||||
|
|
Loading…
Reference in New Issue