aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarat Safin <jeizsm@gmail.com>2018-12-13 15:01:50 +0300
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-02 12:11:38 +0000
commit7f3d8cb8bbe5e6fbccdbc140664dcc6f042e6857 (patch)
treebbbd629bebef405f70e59917798e463589952570
parent26265d18308a746432aa6415ac98c3d700c1ff01 (diff)
downloadaports-7f3d8cb8bbe5e6fbccdbc140664dcc6f042e6857.tar.bz2
aports-7f3d8cb8bbe5e6fbccdbc140664dcc6f042e6857.tar.xz
community/rust: upgrade to 1.31.1
-rw-r--r--community/rust/APKBUILD10
-rw-r--r--community/rust/cargo-tests-fix-package-include-exclude.patch92
-rw-r--r--community/rust/static-pie.patch17
3 files changed, 108 insertions, 11 deletions
diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD
index c36a992f31..7ebf039679 100644
--- a/community/rust/APKBUILD
+++ b/community/rust/APKBUILD
@@ -3,10 +3,10 @@
# Contributor: Jeizsm <jeizsm@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=rust
-pkgver=1.30.0
+pkgver=1.31.1
# TODO: bump to 6 as soon as we add llvm6
_llvmver=5
-_bootver=1.29.0
+_bootver=1.30.0
pkgrel=1
pkgdesc="The Rust Programming Language"
url="http://www.rust-lang.org"
@@ -70,6 +70,7 @@ source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz
install-template-shebang.patch
bootstrap-tool-respect-tool-config.patch
cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch
+ cargo-tests-fix-package-include-exclude.patch
check-rustc
"
builddir="$srcdir/rustc-$pkgver-src"
@@ -269,11 +270,11 @@ _mv() {
mv $@
}
-sha512sums="a4737727818397a26974449e9e7ddc09ae7430a08102ae05729317b19675fa89ad82a8f5bc5b7c913d894866a30dfe3c539c80e29c2b0ade6ecde06db8216981 rustc-1.30.0-src.tar.gz
+sha512sums="76ca238c40694abab4982f4b788a0da34bbb3d8a6e4adb50b0b9138876407ac2cb4fc39cde057b8fa32729c543c5977d392167e96b82f76a01af31eaafe463cf rustc-1.31.1-src.tar.gz
6713d0d0ccac6b17ed47e486c6d74d1f913887bf88d42527576188fa98063a33a1ea903967847d52126b996f965577f1311344d6e57063b1625221847290a0ed musl-fix-static-linking.patch
3615b815cfb4eae60f3291dc07a292e1be6048eeddcb21c595bddbe8cca6a622e5b76be72a76f6b65b4d33abdc34a792ce010b024b2818a4d73bce3f85b3eb2b musl-fix-linux_musl_base.patch
e40d41a6dc5d400d6672f1836cd5b9e00391f7beb52e872d87db76bc95a606ce6aaae737a0256a1e5fba77c83bb223818d214dbe87028d47be65fb43c101595c llvm-with-ffi.patch
-9fe4c230165a29ffc5557952d20e62b42e0c384a874e2584fa227239b44d20079878a740e525a51a1262d5a2194b2efe0b4e2e846fe317ea4c496d5fc1834671 static-pie.patch
+820e5dbeaea157859d0fb735f0bf9419cad1e148b074aea4ba84fdd4c2c0e1ce7e097b4fd6a2a5797299ecb918a4f9dbb57ce05e71638b31ccae415c256a9a66 static-pie.patch
487d479a15b43c3e1ee28c111206a4f488be933309f3c6571be7ec33da4e955cc1ee907b7729b4228cb292ca7b3324eb6ba4f32a01abc3d04573a0d96982569a need-rpath.patch
5e8557e72b250b8726b821541dc7d0e40d8179220cfdacd6d74ed19c756ffb214d9f882e82856acb4fbfbfe5c70f1c6de6813db3ba92a2c0e2e425bb5eb620ba minimize-rpath.patch
35e0619672843d9dd41df4a086404a59b57c12fa014e42d06102bc3856a96ed021e716f9d581ec5c89444acbaedd3edcd2b8a85576df3bb4451c0edde3afbba5 alpine-move-py-scripts-to-share.patch
@@ -282,4 +283,5 @@ a69b2ae7ffddbacee4b400645a829fbc7f5313f2ebf796c2a5aa4f93d5f2eb62993c201fc0241684
7d59258d4462eba0207739a5c0c8baf1f19d9a396e5547bb4d59d700eb94d50ba6add2e523f3e94e29e993821018594625ea4ac86304fb58f7f8c82622a26ab0 install-template-shebang.patch
c2ccab15d48c11cc3af549a3944ca0d29cb3790345468f4f3779e5ac931554dea603e5523281fc391ba4a555ee468b516961c4cb8ecee007eadacf114f3d8758 bootstrap-tool-respect-tool-config.patch
3d6f027088e1ec189ce864bf5ed150ccad8be5d9fc0973f1b4d202eec6eab865834403335a9f0765bbfa54638aed7f5d5f2183ba9dfeab9f5bc4ef48111a8427 cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch
+41ae208a8c06be8c65e3e95529c9298e0fc094607e25d60f5055f217f96a5382ece4b0c4d580a44bf86a50272377a9924637341ec1d9848fb297e8200a598d8f cargo-tests-fix-package-include-exclude.patch
c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125 check-rustc"
diff --git a/community/rust/cargo-tests-fix-package-include-exclude.patch b/community/rust/cargo-tests-fix-package-include-exclude.patch
new file mode 100644
index 0000000000..4cdf21314b
--- /dev/null
+++ b/community/rust/cargo-tests-fix-package-include-exclude.patch
@@ -0,0 +1,92 @@
+From dd998a096b0e04bea7d84a8e975d84d820b725f0 Mon Sep 17 00:00:00 2001
+From: Ximin Luo <infinity0@pwned.gg>
+Date: Sun, 4 Nov 2018 08:59:20 -0800
+Subject: [PATCH] Fix package::include/exclude tests so they work even if
+ running them not in cargo.git
+
+---
+ src/tools/cargo/tests/testsuite/package.rs | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/src/tools/cargo/tests/testsuite/package.rs b/src/tools/cargo/tests/testsuite/package.rs
+index b9c1cae045..d34951f89b 100644
+--- a/src/tools/cargo/tests/testsuite/package.rs
++++ b/src/tools/cargo/tests/testsuite/package.rs
+@@ -285,7 +285,8 @@ dependency `bar` does not specify a version.
+
+ #[test]
+ fn exclude() {
+- let p = project()
++ let root = paths::root().join("exclude");
++ let repo = git::repo(&root)
+ .file("Cargo.toml", r#"
+ [project]
+ name = "foo"
+@@ -348,7 +349,8 @@ fn exclude() {
+ .file("some_dir/dir_deep_5/some_dir/file", "")
+ .build();
+
+- p.cargo("package --no-verify -v")
++ cargo_process("package --no-verify -v")
++ .cwd(repo.root())
+ .with_stdout("")
+ .with_stderr(
+ "\
+@@ -366,7 +368,6 @@ See [..]
+ See [..]
+ [WARNING] [..] file `some_dir/file_deep_1` WILL be excluded [..]
+ See [..]
+-[WARNING] No (git) Cargo.toml found at `[..]` in workdir `[..]`
+ [PACKAGING] foo v0.0.1 ([..])
+ [ARCHIVING] [..]
+ [ARCHIVING] [..]
+@@ -386,14 +387,17 @@ See [..]
+ [ARCHIVING] [..]
+ [ARCHIVING] [..]
+ [ARCHIVING] [..]
++[ARCHIVING] .cargo_vcs_info.json
+ ",
+ ).run();
+
+- assert!(p.root().join("target/package/foo-0.0.1.crate").is_file());
++ assert!(repo.root().join("target/package/foo-0.0.1.crate").is_file());
+
+- p.cargo("package -l")
++ cargo_process("package -l")
++ .cwd(repo.root())
+ .with_stdout(
+ "\
++.cargo_vcs_info.json
+ Cargo.toml
+ dir_root_1/some_dir/file
+ dir_root_2/some_dir/file
+@@ -418,7 +422,8 @@ src/main.rs
+
+ #[test]
+ fn include() {
+- let p = project()
++ let root = paths::root().join("include");
++ let repo = git::repo(&root)
+ .file("Cargo.toml", r#"
+ [project]
+ name = "foo"
+@@ -432,16 +437,17 @@ fn include() {
+ .file("src/bar.txt", "") // should be ignored when packaging
+ .build();
+
+- p.cargo("package --no-verify -v")
++ cargo_process("package --no-verify -v")
++ .cwd(repo.root())
+ .with_stderr(
+ "\
+ [WARNING] manifest has no description[..]
+ See http://doc.crates.io/manifest.html#package-metadata for more info.
+-[WARNING] No (git) Cargo.toml found at `[..]` in workdir `[..]`
+ [PACKAGING] foo v0.0.1 ([..])
+ [ARCHIVING] [..]
+ [ARCHIVING] [..]
+ [ARCHIVING] [..]
++[ARCHIVING] .cargo_vcs_info.json
+ ",
+ ).run();
+ }
diff --git a/community/rust/static-pie.patch b/community/rust/static-pie.patch
index 8a3a9b9b36..437a95ebe7 100644
--- a/community/rust/static-pie.patch
+++ b/community/rust/static-pie.patch
@@ -53,20 +53,21 @@ library, just like static binaries, but more secure.
}
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
-@@ -388,6 +388,8 @@
+@@ -576,6 +576,8 @@
/// the functions in the executable are not randomized and can be used
/// during an exploit of a vulnerability in any code.
pub position_independent_executables: bool,
+ /// As above, but also support for static position independent executables.
+ pub static_position_independent_executables: bool,
- /// Either partial, full, or off. Full RELRO makes the dynamic linker
- /// resolve all symbols at startup and marks the GOT read-only before
- /// starting the program, preventing overwriting the GOT.
-@@ -519,7 +519,8 @@
+ /// Determines if the target always requires using the PLT for indirect
+ /// library calls or not. This controls the default value of the `-Z plt` flag.
+ pub needs_plt: bool,
+@@ -729,8 +729,9 @@
has_rpath: false,
no_default_libraries: true,
position_independent_executables: false,
+ static_position_independent_executables: false,
+ needs_plt: false,
relro_level: RelroLevel::None,
pre_link_objects_exe: Vec::new(),
pre_link_objects_dll: Vec::new(),
@@ -91,20 +92,22 @@ library, just like static binaries, but more secure.
}
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
-@@ -778,7 +778,8 @@
+@@ -1023,8 +1023,9 @@
key!(has_rpath, bool);
key!(no_default_libraries, bool);
key!(position_independent_executables, bool);
+ key!(static_position_independent_executables, bool);
+ key!(needs_plt, bool);
try!(key!(relro_level, RelroLevel));
key!(archive_format);
key!(allow_asm, bool);
key!(custom_unwind_resume, bool);
-@@ -981,7 +981,8 @@
+@@ -1233,8 +1233,9 @@
target_option_val!(has_rpath);
target_option_val!(no_default_libraries);
target_option_val!(position_independent_executables);
+ target_option_val!(static_position_independent_executables);
+ target_option_val!(needs_plt);
target_option_val!(relro_level);
target_option_val!(archive_format);
target_option_val!(allow_asm);