Compare commits

...

101 Commits
f30 ... rawhide

Author SHA1 Message Date
Josh Stone 6fff218b19 Update to 1.70.0. 2023-06-01 12:46:43 -07:00
Josh Stone ff66501ce9 Apply set_build_flags on rhel 2023-05-24 08:58:17 -07:00
Jesus Checa Hidalgo 8745dbe4c6 Add rpminspect.yaml config file
Added suppresion for reduced debuginfo in i386 builds.
2023-05-08 11:47:54 +00:00
Josh Stone 777115da9e Fix debuginfo with LLVM 16 2023-05-05 13:28:08 -07:00
Josh Stone 41fd9d7898 Build with LLVM 15 on Fedora 38+ 2023-05-01 10:07:31 -07:00
Josh Stone 77613da92c Update to 1.69.0.
Obsolete rust-analysis.
2023-04-20 09:47:54 -07:00
Josh Stone 7ac7a42b5e Update to 1.68.2. 2023-03-28 10:11:01 -07:00
Josh Stone b4bb093ae0 Update to 1.68.1. 2023-03-23 08:42:27 -07:00
Josh Stone a07799699f Update to 1.68.0. 2023-03-09 08:52:34 -08:00
David Michael b85b429e00 Add a virtual Provides to rust-std-static with the target triple
This supports depending on a variable target using something like
the following since the other target stdlib subpackages are named
by this convention.

    BuildRequires:  rust-std-static-%{cargo_target}
2023-03-07 10:34:35 -08:00
Orion Poplawski 7f5b9608ec Make rust-toolset noarch 2023-03-06 15:11:28 -08:00
Orion Poplawski 375b75425b Ship rust-toolset for EPEL7 2023-03-06 15:11:28 -08:00
Josh Stone f50b7f0c26 fedpkg new-sources 2023-02-09 16:56:40 -08:00
Josh Stone 752fe3bcd2 Update to 1.67.1. 2023-02-09 16:52:15 -08:00
Josh Stone d8cb2d0d2e Unbundle libgit2 on Fedora 38. 2023-02-03 14:44:01 -08:00
Adam Williamson de19464425 Drop private build tag inadvertently left in release 2023-01-27 15:02:29 -08:00
Adam Williamson 23df2b257f Backport a couple of fixes from upstream
One fix to a problem that broke mesa build, and one fix to a
problem that broke rust bootstrap.
2023-01-27 15:00:45 -08:00
Josh Stone d90cdf5795 Update to 1.67.0. 2023-01-26 12:09:44 -08:00
Fedora Release Engineering 4ee64c64a1 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 21:24:34 +00:00
Jesus Checa Hidalgo dbc2fd6f22 rpmbuild-librsvg2: Get deps from srpm instead spec file to generate the dynamic dependencies 2023-01-11 19:29:09 +01:00
Josh Stone 256f31f182 fedpkg new-sources 2023-01-10 18:30:35 -08:00
Josh Stone 5a745388ed Update to 1.66.1.
Security fix for CVE-2022-46176
2023-01-10 18:05:07 -08:00
Josh Stone 1f0d4ff0a2 Update CI plan to tmt 2023-01-04 10:51:03 -08:00
Josh Stone 5379ac25ac Update to 1.66.0. 2022-12-15 09:12:22 -08:00
Josh Stone f5bf4afaf1 Update to 1.65.0.
rust-analyzer now obsoletes rls.
2022-11-03 11:11:45 -07:00
Josh Stone fbf19ab00e Update to 1.64.0.
Add rust-analyzer.
2022-09-22 13:06:42 -07:00
Josh Stone f4ffb080ba Update to 1.63.0. 2022-08-11 09:02:28 -07:00
Fedora Release Engineering f8bc0ed0d9 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 02:34:28 +00:00
Josh Stone 329f0aa507 Update to 1.62.1. 2022-07-19 09:10:30 -07:00
Josh Stone 9079a8b665 Prevent unsound coercions from functions with opaque return types. 2022-07-13 12:50:50 -07:00
Josh Stone da6e6dd42c Update to 1.62.0. 2022-06-30 09:43:59 -07:00
Josh Stone f2eed3dd39 Add missing target_feature to the list of well known cfg names 2022-05-23 15:42:58 -07:00
Josh Stone 3c34da705b Update to 1.61.0.
Add rust-toolset for ELN.
2022-05-19 16:19:51 -07:00
Josh Stone 70748e85ce re-add a broken patch rename 2022-04-07 10:33:38 -07:00
Josh Stone 04da44cfe0 Update to 1.60.0. 2022-04-07 10:16:05 -07:00
Josh Stone 2732633a74 split up the bootstrap downloads 2022-03-25 14:27:29 -07:00
Josh Stone 96205271fc Fix the archive index for wasm32-wasi's libc.a 2022-03-25 13:32:40 -07:00
Stephen Gallagher 58058fcf89
Rebuild against the bootstrapped build
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2022-03-04 16:54:46 -05:00
Stephen Gallagher eb8a9d02cd
Bootstrapping for Fedora ELN
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2022-03-04 11:39:28 -05:00
Josh Stone ca44879840 Fix s390x hangs, rhbz#2058803 2022-03-01 17:32:36 -08:00
Josh Stone e605359b2b Update to 1.59.0.
Revert to libgit2 1.3.x
2022-02-24 11:40:26 -08:00
Igor Raits a929a38db9
Rebuild for libgit2 1.4.x
Signed-off-by: Igor Raits <igor.raits@gmail.com>
2022-02-20 19:43:35 +01:00
Josh Stone 820e900bd0 Update to 1.58.1. 2022-01-20 16:08:45 -08:00
Josh Stone 26168805e8 Update to 1.58.0. 2022-01-13 11:41:45 -08:00
Josh Stone 36c3018948 Add MinGW targets
- Add `rust-std-static-i686-pc-windows-gnu`, which also provides `mingw32-rust`.
- Add `rust-std-static-x86_64-pc-windows-gnu`, which also provides `mingw64-rust`.
2022-01-06 12:51:58 -08:00
Josh Stone b4ce4e3b09 Update to 1.57.0, fixes rhbz#2028675.
Backport rust#91070, fixes rhbz#1990657
Add rust-std-static-wasm32-wasi
2021-12-02 15:05:01 -08:00
Igor Raits 7b8811c5df
De-bootstrap
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2021-11-28 22:24:16 +01:00
Igor Raits b71ab25d58
fixup! Bootstrap
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2021-11-28 16:01:43 +01:00
Igor Raits 7ece76136b
Bootstrap
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2021-11-28 15:38:29 +01:00
Igor Raits 87168d10f5
Rebuild for libgit2 1.3.x
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2021-11-28 15:36:49 +01:00
Josh Stone a30f744cc0 Update to 1.56.1. 2021-11-01 10:13:10 -07:00
Josh Stone 917b223b5e Update to 1.56.0. 2021-10-21 12:29:34 -07:00
Jesus Checa Hidalgo d0d893f8a2 Ensure that rust don't break other packages
Added two tests that build stratisd and librsvg2. Rust is listed
as BuildRequires in those packages, so the aim of these tests is to
detect upfront if rust breaks depending packages builds.
2021-10-19 10:15:25 +02:00
Sahana Prasad 59cd56ee37 Rebuilt with OpenSSL 3.0.0 2021-09-14 19:14:06 +02:00
Jesus Checa Hidalgo 2513da263a Add wasm target smoke test 2021-09-10 16:08:01 +00:00
Jesus Checa Hidalgo 02dbc18c83 Add missing .fmf directory for CI tests 2021-09-10 16:08:01 +00:00
Josh Stone 8107b9011e unset bootstrap_arches 2021-09-09 16:51:23 -07:00
Josh Stone e675755a18 Update to 1.55.0.
Use llvm-ranlib for wasm rlibs; Fixes rhbz#2002612
2021-09-09 16:42:58 -07:00
Jesus Checa Hidalgo ffcb56b1e5 Added basic CI gating tests 2021-09-07 17:38:53 +02:00
Josh Stone 8df8326f7e Build with LLVM 12 on Fedora 35+ 2021-08-24 11:33:19 -07:00
Josh Stone 9e24510b77 Update to 1.54.0. 2021-07-29 09:14:40 -07:00
Fedora Release Engineering c2603b2286 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 12:57:15 +00:00
Josh Stone 9e0cdcfa93 Clean some temporary files to reduce total disk space 2021-07-21 09:44:42 -07:00
Josh Stone bb1cdb7330 noarch+ExcludeArch doesn't work on subpackages 2021-07-15 13:52:24 -07:00
Josh Stone e9feea05d7 Exclude wasm on s390x for lack of lld 2021-07-08 17:13:17 -07:00
Josh Stone 2104887fc0 Use llvm11 and devtoolset-9 for epel7 2021-06-18 09:41:37 -07:00
Josh Stone 1cf4ed42e3 Merge branch 'f34' into rawhide 2021-06-17 11:10:32 -07:00
Josh Stone d498bc15d8 Update to 1.53.0. 2021-06-17 10:45:34 -07:00
Josh Stone ebd24b3917 Add rust-std-static-wasm32-unknown-unknown.
This change is partly based on an older pull request:
https://src.fedoraproject.org/rpms/rust/pull-request/6

Co-authored-by: Ivan Mironov <mironov.ivan@gmail.com>
2021-06-02 15:27:34 -07:00
Josh Stone fa5bf8c598 Set rust.codegen-units-std=1 for all targets again. 2021-06-02 15:27:05 -07:00
Josh Stone 078a6925f5 Rebuild f34 with LLVM 12. 2021-05-14 12:49:12 -07:00
Josh Stone a8550e8fec Update to 1.52.1. 2021-05-10 10:39:06 -07:00
Josh Stone 6231b0ba09 Fall back to LLVM 11 on f34 for now... 2021-05-07 11:20:45 -07:00
Josh Stone 3458295682 Update to 1.52.0. 2021-05-06 09:24:31 -07:00
Josh Stone 1cb0a34c53 Security fixes for CVE-2020-36323, CVE-2021-31162 2021-04-16 13:45:09 -07:00
Josh Stone 5789d99323 Fix bootstrap for stage0 rust 1.51 2021-04-14 18:43:41 -07:00
Josh Stone 546915fc9c Security fixes for CVE-2021-28876, CVE-2021-28878, CVE-2021-28879 2021-04-14 17:28:06 -07:00
Josh Stone 85a5f3ae28 Update to 1.51.0. 2021-03-25 11:38:09 -07:00
Josh Stone 8148cbf678 Update to 1.50.0. 2021-02-19 10:25:21 -08:00
Fedora Release Engineering 259615dcc0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 16:44:01 +00:00
Josh Stone 3aadadbd4b Update to 1.49.0. 2021-01-05 16:07:24 -08:00
Igor Raits 35653afd8f
Revert "Bootstrap"
This reverts commit f6db939d0c.
2020-12-29 08:43:23 +01:00
Igor Raits f6db939d0c
Bootstrap
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-12-28 19:54:38 +01:00
Igor Raits 28e90c2b9d
fixup! Build with bundled libgit2 (to avoid re-bootstrap)
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-12-28 19:38:13 +01:00
Igor Raits 8d20a2058a
Build with bundled libgit2 (to avoid re-bootstrap)
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-12-28 19:37:47 +01:00
Igor Raits e3b256c65f
Rebuild for libgit2 1.1.x
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
2020-12-28 19:00:26 +01:00
Josh Stone 6c5b725759 Never bundle libssh2 2020-12-01 17:28:02 -08:00
Josh Stone 457f56dd25 Update to 1.48.0. 2020-11-19 10:47:24 -08:00
Jeff Law f92bb2f31c Re-enable LTO 2020-10-10 20:06:02 -06:00
Josh Stone 8efa6f4d09 Make tests explicitly use stage 2 2020-10-10 10:00:19 -07:00
Josh Stone 51a2a836f9 Fix the doc link to raw::stat on s390x 2020-10-09 20:31:11 -07:00
Josh Stone aac4471f40 Update to 1.47.0. 2020-10-09 16:13:53 -07:00
Fabio Valentini aacb4980d2
fix LTO with doctests (backported cargo PR#8657) 2020-08-28 23:45:56 +02:00
Josh Stone 105a7c0012 Update to 1.46.0.
I've unbundled libgit2 for fedora >= 32, where we have libgit2-1.0.1.

I've also pulled in some RHEL config and patches I had in other
branches, but these should end up as no-ops for Fedora.
2020-08-27 10:49:15 -07:00
Josh Stone 99cf40c754 Update to 1.45.2. 2020-08-03 10:33:21 -07:00
Josh Stone d2688a5518 Update to 1.45.1. 2020-07-30 11:41:32 -07:00
Fedora Release Engineering 2023d1f6b7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 07:19:49 +00:00
Josh Stone d62a20a4de Update to 1.45.0. 2020-07-16 11:04:22 -07:00
Jeff Law bd38d989dc Disable LTO 2020-07-01 15:31:23 -06:00
Josh Stone 560777dfc7 Update to 1.44.1. 2020-06-18 09:47:06 -07:00
Josh Stone d921e9b0a9 Update to 1.44.0. 2020-06-04 11:59:31 -07:00
36 changed files with 1809 additions and 747 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

150
.gitignore vendored
View File

@ -270,3 +270,153 @@
/rust-1.42.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.42.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.43.1-src.tar.xz
/rustc-1.44.0-src.tar.xz
/rust-1.43.1-aarch64-unknown-linux-gnu.tar.xz
/rust-1.43.1-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.43.1-i686-unknown-linux-gnu.tar.xz
/rust-1.43.1-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.43.1-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.43.1-s390x-unknown-linux-gnu.tar.xz
/rust-1.43.1-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.44.1-src.tar.xz
/rustc-1.45.0-src.tar.xz
/rust-1.44.0-x86_64-unknown-linux-gnu.tar.xz
/rust-1.44.0-i686-unknown-linux-gnu.tar.xz
/rust-1.44.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.44.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.44.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.44.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.44.0-s390x-unknown-linux-gnu.tar.xz
/rustc-1.45.1-src.tar.xz
/rustc-1.45.2-src.tar.xz
/rustc-1.46.0-src.tar.xz
/rust-1.45.2-aarch64-unknown-linux-gnu.tar.xz
/rust-1.45.2-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.45.2-i686-unknown-linux-gnu.tar.xz
/rust-1.45.2-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.45.2-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.45.2-s390x-unknown-linux-gnu.tar.xz
/rust-1.45.2-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.47.0-src.tar.xz
/rust-1.46.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.46.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.46.0-i686-unknown-linux-gnu.tar.xz
/rust-1.46.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.46.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.46.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.48.0-src.tar.xz
/rust-1.47.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.47.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.47.0-i686-unknown-linux-gnu.tar.xz
/rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.47.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.49.0-src.tar.xz
/rust-1.48.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.48.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.48.0-i686-unknown-linux-gnu.tar.xz
/rust-1.48.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.48.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.50.0-src.tar.xz
/rust-1.49.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.49.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.49.0-i686-unknown-linux-gnu.tar.xz
/rust-1.49.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.49.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.49.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.51.0-src.tar.xz
/rust-1.50.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.50.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.50.0-i686-unknown-linux-gnu.tar.xz
/rust-1.50.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.50.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.50.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.52.0-src.tar.xz
/rust-1.51.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.51.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.51.0-i686-unknown-linux-gnu.tar.xz
/rust-1.51.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.51.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.51.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.52.1-src.tar.xz
/rustc-1.53.0-src.tar.xz
/rust-1.52.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.52.0-i686-unknown-linux-gnu.tar.xz
/rust-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.52.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.52.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.54.0-src.tar.xz
/rust-1.53.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.53.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.53.0-i686-unknown-linux-gnu.tar.xz
/rust-1.53.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.53.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.53.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.53.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.55.0-src.tar.xz
/rust-1.54.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.54.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.54.0-i686-unknown-linux-gnu.tar.xz
/rust-1.54.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.54.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.54.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.54.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.56.0-src.tar.xz
/rust-1.55.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.55.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.55.0-i686-unknown-linux-gnu.tar.xz
/rust-1.55.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.55.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.55.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.56.1-src.tar.xz
/rustc-1.57.0-src.tar.xz
/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
/rust-1.56.1-aarch64-unknown-linux-gnu.tar.xz
/rust-1.56.1-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.56.1-i686-unknown-linux-gnu.tar.xz
/rust-1.56.1-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.56.1-s390x-unknown-linux-gnu.tar.xz
/rust-1.56.1-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.58.0-src.tar.xz
/rust-1.57.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.57.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.57.0-i686-unknown-linux-gnu.tar.xz
/rust-1.57.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.57.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.57.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.58.1-src.tar.xz
/rustc-1.59.0-src.tar.xz
/rust-1.58.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.58.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.58.0-i686-unknown-linux-gnu.tar.xz
/rust-1.58.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.58.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.58.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.60.0-src.tar.xz
/rustc-1.61.0-src.tar.xz
/wasi-libc-9886d3d6200fcc3726329966860fc058707406cd.tar.gz
/rustc-1.62.0-src.tar.xz
/rustc-1.62.1-src.tar.xz
/rustc-1.63.0-src.tar.xz
/rustc-1.64.0-src.tar.xz
/rustc-1.65.0-src.tar.xz
/wasi-libc-wasi-sdk-16.tar.gz
/rustc-1.66.0-src.tar.xz
/wasi-libc-wasi-sdk-17.tar.gz
/rustc-1.66.1-src.tar.xz
/rustc-1.67.0-src.tar.xz
/rustc-1.67.1-src.tar.xz
/rustc-1.68.0-src.tar.xz
/wasi-libc-wasi-sdk-19.tar.gz
/rustc-1.68.1-src.tar.xz
/rustc-1.68.2-src.tar.xz
/rustc-1.69.0-src.tar.xz
/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz
/rustc-1.70.0-src.tar.xz
/wasi-libc-wasi-sdk-20.tar.gz

View File

@ -0,0 +1,26 @@
From 37cb177eb53145103ae72b67562884782dde01c3 Mon Sep 17 00:00:00 2001
From: Ivan Mironov <mironov.ivan@gmail.com>
Date: Sun, 8 Dec 2019 17:23:08 +0500
Subject: [PATCH] Use lld provided by system for wasm
---
compiler/rustc_target/src/spec/wasm_base.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
index 528a84a8b37c..353d742161d1 100644
--- a/compiler/rustc_target/src/spec/wasm_base.rs
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
@@ -89,8 +89,7 @@ macro_rules! args {
// arguments just yet
limit_rdylib_exports: false,
- // we use the LLD shipped with the Rust toolchain by default
- linker: Some("rust-lld".into()),
+ linker: Some("lld".into()),
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
pre_link_args,
--
2.38.1

19
gating.yaml Normal file
View File

@ -0,0 +1,19 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

51
macros.rust-toolset Normal file
View File

@ -0,0 +1,51 @@
# Explicitly use bindir tools, in case others are in the PATH,
# like the rustup shims in a user's ~/.cargo/bin/.
#
# Since cargo 1.31, install only uses $CARGO_HOME/config, ignoring $PWD.
# https://github.com/rust-lang/cargo/issues/6397
# But we can set CARGO_HOME locally, which is a good idea anyway to make sure
# it never writes to ~/.cargo during rpmbuild.
%__cargo %{_bindir}/env CARGO_HOME=.cargo %{_bindir}/cargo
%__rustc %{_bindir}/rustc
%__rustdoc %{_bindir}/rustdoc
# Enable optimization, debuginfo, and link hardening.
%__global_rustflags -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now
%__global_rustflags_toml [%{lua:
for arg in string.gmatch(rpm.expand("%{__global_rustflags}"), "%S+") do
print('"' .. arg .. '", ')
end}]
%cargo_prep(V:) (\
%{__mkdir} -p .cargo \
cat > .cargo/config << EOF \
[build]\
rustc = "%{__rustc}"\
rustdoc = "%{__rustdoc}"\
rustflags = %{__global_rustflags_toml}\
\
[install]\
root = "%{buildroot}%{_prefix}"\
\
[term]\
verbose = true\
EOF\
%if 0%{-V:1}\
%{__tar} -xoaf %{S:%{-V*}}\
cat >> .cargo/config << EOF \
\
[source.crates-io]\
replace-with = "vendored-sources"\
\
[source.vendored-sources]\
directory = "./vendor"\
EOF\
%endif\
)
%cargo_build %__cargo build --release %{?_smp_mflags}
%cargo_test %__cargo test --release %{?_smp_mflags} --no-fail-fast
%cargo_install %__cargo install --no-track --path .

5
plans/ci.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: CI Gating Plan
discover:
how: fmf
execute:
how: tmt

8
rpminspect.yaml Normal file
View File

@ -0,0 +1,8 @@
---
debuginfo:
ignore:
# i686 has limited debuginfo. From rust.spec
# full debuginfo is exhausting memory; just do libstd for now
# https://github.com/rust-lang/rust/issues/45854
- /usr/lib/debug/usr/bin/rustc-*.i386.debug

View File

@ -1,32 +0,0 @@
commit ab998a2eeb2bcdc69ce70c814af97f0d1302a404 (from d17f62d857c70508efbf60be41135880bcd2e062)
Merge: d17f62d857c7 9452a8dfa3ba
Author: Mazdak Farrokhzad <twingoow@gmail.com>
Date: Thu Jan 24 00:20:00 2019 +0100
Rollup merge of #57840 - tromey:fix-issue-57762, r=nikic
Fix issue 57762
against a stock LLVM 7. LLVM 7 was released without a necessary fix
for a bug in the DWARF discriminant code.
This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.
Closes #57762
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
index 6deedd0b5ea3..9f63038c3623 100644
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -1164,7 +1164,10 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
// On MSVC we have to use the fallback mode, because LLVM doesn't
// lower variant parts to PDB.
return cx.sess().target.target.options.is_like_msvc
- || llvm_util::get_major_version() < 7;
+ // LLVM version 7 did not release with an important bug fix;
+ // but the required patch is in the LLVM 8. Rust LLVM reports
+ // 8 as well.
+ || llvm_util::get_major_version() < 8;
}
// FIXME(eddyb) maybe precompute this? Right now it's computed once

View File

@ -1,210 +0,0 @@
commit 9423c4f0dda638ec2a925140850b85e8d3e6d455 (from bee074f032970fd1b59650c04a70e75eeee9c63b)
Merge: bee074f03297 3a2a4429a288
Author: Mazdak Farrokhzad <twingoow@gmail.com>
Date: Mon Mar 23 10:29:13 2020 +0100
Rollup merge of #70123 - cuviper:library-path, r=Mark-Simulacrum
Ensure LLVM is in the link path for rustc tools
The build script for `rustc_llvm` outputs LLVM information in `cargo:rustc-link-lib` and `cargo:rustc-link-search` so the compiler can be linked correctly. However, while the lib is carried along in metadata, the search paths are not. So when cargo is invoked again later for rustc _tools_, they'll also try to link with LLVM, but the necessary paths may be left out.
Rustbuild can use the environment to set the LLVM link path for tools -- `LIB` for MSVC toolchains and `LIBRARY_PATH` for everyone else.
Fixes #68714.
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 602e4511ea58..dd519506d42a 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -11,7 +11,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::{Duration, Instant};
-use build_helper::t;
+use build_helper::{output, t};
use crate::cache::{Cache, Interned, INTERNER};
use crate::check;
@@ -23,7 +23,7 @@ use crate::install;
use crate::native;
use crate::test;
use crate::tool;
-use crate::util::{self, add_lib_path, exe, libdir};
+use crate::util::{self, add_dylib_path, add_link_lib_path, exe, libdir};
use crate::{Build, DocTests, GitRepo, Mode};
pub use crate::Compiler;
@@ -660,7 +660,7 @@ impl<'a> Builder<'a> {
return;
}
- add_lib_path(vec![self.rustc_libdir(compiler)], &mut cmd.command);
+ add_dylib_path(vec![self.rustc_libdir(compiler)], &mut cmd.command);
}
/// Gets a path to the compiler specified.
@@ -698,6 +698,20 @@ impl<'a> Builder<'a> {
cmd
}
+ /// Return the path to `llvm-config` for the target, if it exists.
+ ///
+ /// Note that this returns `None` if LLVM is disabled, or if we're in a
+ /// check build or dry-run, where there's no need to build all of LLVM.
+ fn llvm_config(&self, target: Interned<String>) -> Option<PathBuf> {
+ if self.config.llvm_enabled() && self.kind != Kind::Check && !self.config.dry_run {
+ let llvm_config = self.ensure(native::Llvm { target });
+ if llvm_config.is_file() {
+ return Some(llvm_config);
+ }
+ }
+ None
+ }
+
/// Prepares an invocation of `cargo` to be run.
///
/// This will create a `Command` that represents a pending execution of
@@ -1034,6 +1048,17 @@ impl<'a> Builder<'a> {
.env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler));
}
+ // Tools that use compiler libraries may inherit the `-lLLVM` link
+ // requirement, but the `-L` library path is not propagated across
+ // separate Cargo projects. We can add LLVM's library path to the
+ // platform-specific environment variable as a workaround.
+ if mode == Mode::ToolRustc {
+ if let Some(llvm_config) = self.llvm_config(target) {
+ let llvm_libdir = output(Command::new(&llvm_config).arg("--libdir"));
+ add_link_lib_path(vec![llvm_libdir.trim().into()], &mut cargo);
+ }
+ }
+
if self.config.incremental {
cargo.env("CARGO_INCREMENTAL", "1");
} else {
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 65a00db33949..ad494b88b3af 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -451,44 +451,6 @@ impl Step for Rustc {
false,
);
- // We used to build librustc_codegen_llvm as a separate step,
- // which produced a dylib that the compiler would dlopen() at runtime.
- // This meant that we only needed to make sure that libLLVM.so was
- // installed by the time we went to run a tool using it - since
- // librustc_codegen_llvm was effectively a standalone artifact,
- // other crates were completely oblivious to its dependency
- // on `libLLVM.so` during build time.
- //
- // However, librustc_codegen_llvm is now built as an ordinary
- // crate during the same step as the rest of the compiler crates.
- // This means that any crates depending on it will see the fact
- // that it uses `libLLVM.so` as a native library, and will
- // cause us to pass `-llibLLVM.so` to the linker when we link
- // a binary.
- //
- // For `rustc` itself, this works out fine.
- // During the `Assemble` step, we call `dist::maybe_install_llvm_dylib`
- // to copy libLLVM.so into the `stage` directory. We then link
- // the compiler binary, which will find `libLLVM.so` in the correct place.
- //
- // However, this is insufficient for tools that are build against stage0
- // (e.g. stage1 rustdoc). Since `Assemble` for stage0 doesn't actually do anything,
- // we won't have `libLLVM.so` in the stage0 sysroot. In the past, this wasn't
- // a problem - we would copy the tool binary into its correct stage directory
- // (e.g. stage1 for a stage1 rustdoc built against a stage0 compiler).
- // Since libLLVM.so wasn't resolved until runtime, it was fine for it to
- // not exist while we were building it.
- //
- // To ensure that we can still build stage1 tools against a stage0 compiler,
- // we explicitly copy libLLVM.so into the stage0 sysroot when building
- // the stage0 compiler. This ensures that tools built against stage0
- // will see libLLVM.so at build time, making the linker happy.
- if compiler.stage == 0 {
- builder.info(&format!("Installing libLLVM.so to stage 0 ({})", compiler.host));
- let sysroot = builder.sysroot(compiler);
- dist::maybe_install_llvm_dylib(builder, compiler.host, &sysroot);
- }
-
builder.ensure(RustcLink {
compiler: builder.compiler(compiler.stage, builder.config.build),
target_compiler: compiler,
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 67e0ed5c5802..c8ccba467e50 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -12,7 +12,7 @@ use crate::channel;
use crate::channel::GitInfo;
use crate::compile;
use crate::toolstate::ToolState;
-use crate::util::{add_lib_path, exe, CiEnv};
+use crate::util::{add_dylib_path, exe, CiEnv};
use crate::Compiler;
use crate::Mode;
@@ -388,7 +388,7 @@ pub struct ErrorIndex {
impl ErrorIndex {
pub fn command(builder: &Builder<'_>, compiler: Compiler) -> Command {
let mut cmd = Command::new(builder.ensure(ErrorIndex { compiler }));
- add_lib_path(
+ add_dylib_path(
vec![PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))],
&mut cmd,
);
@@ -689,7 +689,7 @@ impl<'a> Builder<'a> {
}
}
- add_lib_path(lib_paths, &mut cmd);
+ add_dylib_path(lib_paths, &mut cmd);
cmd
}
}
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index eac790fe504b..2bc6f1939d97 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -40,7 +40,7 @@ pub fn libdir(target: &str) -> &'static str {
}
/// Adds a list of lookup paths to `cmd`'s dynamic library lookup path.
-pub fn add_lib_path(path: Vec<PathBuf>, cmd: &mut Command) {
+pub fn add_dylib_path(path: Vec<PathBuf>, cmd: &mut Command) {
let mut list = dylib_path();
for path in path {
list.insert(0, path);
@@ -72,6 +72,31 @@ pub fn dylib_path() -> Vec<PathBuf> {
env::split_paths(&var).collect()
}
+/// Adds a list of lookup paths to `cmd`'s link library lookup path.
+pub fn add_link_lib_path(path: Vec<PathBuf>, cmd: &mut Command) {
+ let mut list = link_lib_path();
+ for path in path {
+ list.insert(0, path);
+ }
+ cmd.env(link_lib_path_var(), t!(env::join_paths(list)));
+}
+
+/// Returns the environment variable which the link library lookup path
+/// resides in for this platform.
+fn link_lib_path_var() -> &'static str {
+ if cfg!(target_env = "msvc") { "LIB" } else { "LIBRARY_PATH" }
+}
+
+/// Parses the `link_lib_path_var()` environment variable, returning a list of
+/// paths that are members of this lookup path.
+fn link_lib_path() -> Vec<PathBuf> {
+ let var = match env::var_os(link_lib_path_var()) {
+ Some(v) => v,
+ None => return vec![],
+ };
+ env::split_paths(&var).collect()
+}
+
/// `push` all components to `buf`. On windows, append `.exe` to the last component.
pub fn push_exe_path(mut buf: PathBuf, components: &[&str]) -> PathBuf {
let (&file, components) = components.split_last().expect("at least one component required");

View File

@ -1,175 +0,0 @@
commit 374ab25585f0a817fe7bd6986737f12347b12d0b (from 1add455ec6f81045e7651c6225902823f5d4fbfa)
Merge: 1add455ec6f8 497f879b1e24
Author: bors <bors@rust-lang.org>
Date: Tue Mar 24 12:42:54 2020 +0000
Auto merge of #70163 - nikic:llvm-10-preparation, r=cuviper
Prepare for LLVM 10 upgrade
This is #67759 minus the submodule update.
* Fix two compatibility issues in the rustllvm wrapper.
* Update data layout strings in tests.
* Fix LLVM version comparison (this become a problem because the major version has two digits now).
r? @cuviper
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index aa1d1b7c4241..b52fbe4666eb 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1141,6 +1141,8 @@ impl Step for Compiletest {
let llvm_config = builder.ensure(native::Llvm { target: builder.config.build });
if !builder.config.dry_run {
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
+ // Remove trailing newline from llvm-config output.
+ let llvm_version = llvm_version.trim_end();
cmd.arg("--llvm-version").arg(llvm_version);
}
if !builder.is_rust_llvm(target) {
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 90d24d20737d..9e8614e3b6d3 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -67,7 +67,11 @@ extern "C" void LLVMInitializePasses() {
}
extern "C" void LLVMTimeTraceProfilerInitialize() {
-#if LLVM_VERSION_GE(9, 0)
+#if LLVM_VERSION_GE(10, 0)
+ timeTraceProfilerInitialize(
+ /* TimeTraceGranularity */ 0,
+ /* ProcName */ "rustc");
+#elif LLVM_VERSION_GE(9, 0)
timeTraceProfilerInitialize();
#endif
}
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 25cfee3373dc..799adb418822 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -1333,8 +1333,13 @@ extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
LLVMValueRef Dst, unsigned DstAlign,
LLVMValueRef Val,
LLVMValueRef Size, bool IsVolatile) {
+#if LLVM_VERSION_GE(10, 0)
+ return wrap(unwrap(B)->CreateMemSet(
+ unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
+#else
return wrap(unwrap(B)->CreateMemSet(
unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
+#endif
}
extern "C" LLVMValueRef
diff --git a/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json b/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json
index 8d028280a8da..00de3de05f07 100644
--- a/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json
+++ b/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json
@@ -1,5 +1,5 @@
{
- "data-layout": "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128",
+ "data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
"linker-flavor": "gcc",
"llvm-target": "i686-unknown-linux-gnu",
"target-endian": "little",
diff --git a/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json b/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json
index 48040ae3da0e..6d5e964ed4fe 100644
--- a/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json
+++ b/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json
@@ -1,6 +1,6 @@
{
"pre-link-args": {"gcc": ["-m64"]},
- "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
+ "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
"linker-flavor": "gcc",
"llvm-target": "x86_64-unknown-linux-gnu",
"target-endian": "little",
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index 2a24a8c3c948..cb648db8830e 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -191,6 +191,7 @@ impl EarlyProps {
return true;
}
if let Some(ref actual_version) = config.llvm_version {
+ let actual_version = version_to_int(actual_version);
if line.starts_with("min-llvm-version") {
let min_version = line
.trim_end()
@@ -199,7 +200,7 @@ impl EarlyProps {
.expect("Malformed llvm version directive");
// Ignore if actual version is smaller the minimum required
// version
- &actual_version[..] < min_version
+ actual_version < version_to_int(min_version)
} else if line.starts_with("min-system-llvm-version") {
let min_version = line
.trim_end()
@@ -208,7 +209,7 @@ impl EarlyProps {
.expect("Malformed llvm version directive");
// Ignore if using system LLVM and actual version
// is smaller the minimum required version
- config.system_llvm && &actual_version[..] < min_version
+ config.system_llvm && actual_version < version_to_int(min_version)
} else if line.starts_with("ignore-llvm-version") {
// Syntax is: "ignore-llvm-version <version1> [- <version2>]"
let range_components = line
@@ -219,15 +220,15 @@ impl EarlyProps {
.take(3) // 3 or more = invalid, so take at most 3.
.collect::<Vec<&str>>();
match range_components.len() {
- 1 => &actual_version[..] == range_components[0],
+ 1 => actual_version == version_to_int(range_components[0]),
2 => {
- let v_min = range_components[0];
- let v_max = range_components[1];
+ let v_min = version_to_int(range_components[0]);
+ let v_max = version_to_int(range_components[1]);
if v_max < v_min {
panic!("Malformed LLVM version range: max < min")
}
// Ignore if version lies inside of range.
- &actual_version[..] >= v_min && &actual_version[..] <= v_max
+ actual_version >= v_min && actual_version <= v_max
}
_ => panic!("Malformed LLVM version directive"),
}
@@ -238,6 +239,20 @@ impl EarlyProps {
false
}
}
+
+ fn version_to_int(version: &str) -> u32 {
+ let version_without_suffix = version.split('-').next().unwrap();
+ let components: Vec<u32> = version_without_suffix
+ .split('.')
+ .map(|s| s.parse().expect("Malformed version component"))
+ .collect();
+ match components.len() {
+ 1 => components[0] * 10000,
+ 2 => components[0] * 10000 + components[1] * 100,
+ 3 => components[0] * 10000 + components[1] * 100 + components[2],
+ _ => panic!("Malformed version"),
+ }
+ }
}
}
diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs
index 6c478f7e29da..31d991e0c2f8 100644
--- a/src/tools/compiletest/src/header/tests.rs
+++ b/src/tools/compiletest/src/header/tests.rs
@@ -122,9 +122,8 @@ fn llvm_version() {
config.llvm_version = Some("9.3.1-rust-1.43.0-dev".to_owned());
assert!(!parse_rs(&config, "// min-llvm-version 9.2").ignore);
- // FIXME.
- // config.llvm_version = Some("10.0.0-rust".to_owned());
- // assert!(!parse_rs(&config, "// min-llvm-version 9.0").ignore);
+ config.llvm_version = Some("10.0.0-rust".to_owned());
+ assert!(!parse_rs(&config, "// min-llvm-version 9.0").ignore);
}
#[test]

View File

@ -1,40 +0,0 @@
commit 6067315d58ff3d49b305ae3c99810656856c8e21
Author: Josh Stone <jistone@redhat.com>
Date: Mon Mar 30 14:03:39 2020 -0700
Ensure LLVM is in the link path for "fulldeps" tests
This is a follow-up to #70123, which added `llvm-config --libdir` to the
`LIBRARY_PATH` for rustc tools. We need the same for "run-make-fulldeps"
and "ui-fulldeps" tests which depend on compiler libraries, implicitly
needing to link to `-lLLVM` as well.
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 5b946b05735d..2499856235f1 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -21,7 +21,7 @@ use crate::flags::Subcommand;
use crate::native;
use crate::tool::{self, SourceType, Tool};
use crate::toolstate::ToolState;
-use crate::util::{self, dylib_path, dylib_path_var};
+use crate::util::{self, add_link_lib_path, dylib_path, dylib_path_var};
use crate::Crate as CargoCrate;
use crate::{envify, DocTests, GitRepo, Mode};
@@ -1178,6 +1178,15 @@ impl Step for Compiletest {
cmd.arg("--system-llvm");
}
+ // Tests that use compiler libraries may inherit the `-lLLVM` link
+ // requirement, but the `-L` library path is not propagated across
+ // separate compilations. We can add LLVM's library path to the
+ // platform-specific environment variable as a workaround.
+ if !builder.config.dry_run && suite.ends_with("fulldeps") {
+ let llvm_libdir = output(Command::new(&llvm_config).arg("--libdir"));
+ add_link_lib_path(vec![llvm_libdir.trim().into()], &mut cmd);
+ }
+
// Only pass correct values for these flags for the `run-make` suite as it
// requires that a C++ compiler was configured which isn't always the case.
if !builder.config.dry_run && suite == "run-make-fulldeps" {

View File

@ -1,56 +0,0 @@
From fbd3fbdb24563a9d8fd3651f6bdc90bbbbd81d3e Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 1 May 2020 16:50:10 -0700
Subject: [PATCH] Use a non-existent test path instead of clobbering /dev/null
---
src/test/ui/non-ice-error-on-worker-io-fail.rs | 10 +++++++---
src/test/ui/non-ice-error-on-worker-io-fail.stderr | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/test/ui/non-ice-error-on-worker-io-fail.rs b/src/test/ui/non-ice-error-on-worker-io-fail.rs
index 8af17742850d..30779fc65c0f 100644
--- a/src/test/ui/non-ice-error-on-worker-io-fail.rs
+++ b/src/test/ui/non-ice-error-on-worker-io-fail.rs
@@ -4,8 +4,12 @@
//
// An attempt to `-o` into a directory we cannot write into should indeed
// be an error; but not an ICE.
+//
+// However, some folks run tests as root, which can write `/dev/` and end
+// up clobbering `/dev/null`. Instead we'll use a non-existent path, which
+// also used to ICE, but even root can't magically write there.
-// compile-flags: -o /dev/null
+// compile-flags: -o /does-not-exist/output
// The error-pattern check occurs *before* normalization, and the error patterns
// are wildly different between build environments. So this is a cop-out (and we
@@ -15,10 +19,10 @@
// error-pattern: error
// On Mac OS X, we get an error like the below
-// normalize-stderr-test "failed to write bytecode to /dev/null.non_ice_error_on_worker_io_fail.*" -> "io error modifying /dev/"
+// normalize-stderr-test "failed to write bytecode to /does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying /does-not-exist/"
// On Linux, we get an error like the below
-// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /dev/"
+// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
// ignore-tidy-linelength
// ignore-windows - this is a unix-specific test
diff --git a/src/test/ui/non-ice-error-on-worker-io-fail.stderr b/src/test/ui/non-ice-error-on-worker-io-fail.stderr
index f732abc52b71..edadecf273a7 100644
--- a/src/test/ui/non-ice-error-on-worker-io-fail.stderr
+++ b/src/test/ui/non-ice-error-on-worker-io-fail.stderr
@@ -1,6 +1,6 @@
warning: ignoring --out-dir flag due to -o flag
-error: io error modifying /dev/
+error: io error modifying /does-not-exist/
error: aborting due to previous error
--
2.26.2

1005
rust.spec

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,92 @@
--- rustc-beta-src/Cargo.lock.orig 2023-05-24 16:49:05.242510531 -0700
+++ rustc-beta-src/Cargo.lock 2023-05-24 16:51:11.741865603 -0700
@@ -1197,7 +1197,6 @@ checksum = "14d05c10f541ae6f3bc5b3d923c2
dependencies = [
"cc",
"libc",
- "libnghttp2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2989,16 +2988,6 @@ source = "registry+https://github.com/ru
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.4+1.41.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
-dependencies = [
- "cc",
- "libc",
-]
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-05-24 16:49:05.244510489 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-05-24 16:51:04.683013189 -0700
@@ -23,7 +23,7 @@ cargo-platform = { path = "crates/cargo-
cargo-util = { path = "crates/cargo-util", version = "0.2.4" }
clap = "4.2.0"
crates-io = { path = "crates/crates-io", version = "0.36.0" }
-curl = { version = "0.4.44", features = ["http2"] }
+curl = { version = "0.4.44", features = [] }
curl-sys = "0.4.61"
env_logger = "0.10.0"
filetime = "0.2.9"
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-05-24 16:49:05.244510489 -0700
@@ -407,16 +407,9 @@ impl<'cfg> PackageSet<'cfg> {
sources: SourceMap<'cfg>,
config: &'cfg Config,
) -> CargoResult<PackageSet<'cfg>> {
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
- // failures here as fatal as it would indicate a build-time problem.
- let mut multi = Multi::new();
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
- multi
- .pipelining(false, multiplexing)
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
-
- // let's not flood crates.io with connections
- multi.set_max_host_connections(2)?;
+ // Multiplexing is disabled because the system libcurl doesn't support it.
+ let multi = Multi::new();
+ let multiplexing = false;
Ok(PackageSet {
packages: package_ids
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-05-24 16:49:05.245510468 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-05-24 16:51:57.916900146 -0700
@@ -229,16 +229,8 @@ impl<'cfg> HttpRegistry<'cfg> {
}
self.fetch_started = true;
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
- // failures here as fatal as it would indicate a build-time problem.
- self.multiplexing = self.config.http_config()?.multiplexing.unwrap_or(true);
-
- self.multi
- .pipelining(false, self.multiplexing)
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
-
- // let's not flood the server with connections
- self.multi.set_max_host_connections(2)?;
+ // Multiplexing is disabled because the system libcurl doesn't support it.
+ self.multiplexing = false;
if !self.quiet {
self.config
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-05-24 16:49:05.245510468 -0700
@@ -25,7 +25,7 @@ impl<T> PollExt<T> for Poll<T> {
macro_rules! try_old_curl {
($e:expr, $msg:expr) => {
let result = $e;
- if cfg!(target_os = "macos") {
+ if cfg!(any(target_os = "linux", target_os = "macos")) {
if let Err(e) = result {
warn!("ignoring libcurl {} error: {}", $msg, e);
}

View File

@ -0,0 +1,43 @@
--- rustc-beta-src/Cargo.lock.orig 2023-05-19 19:02:31.000000000 -0700
+++ rustc-beta-src/Cargo.lock 2023-05-24 16:36:33.312232441 -0700
@@ -2967,7 +2967,6 @@
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -3000,20 +2999,6 @@
]
[[package]]
-name = "libssh2-sys"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
-dependencies = [
- "cc",
- "libc",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
- "vcpkg",
-]
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/vendor/git2/Cargo.toml.orig 2023-05-19 21:16:57.000000000 -0700
+++ rustc-beta-src/vendor/git2/Cargo.toml 2023-05-24 16:33:42.043813439 -0700
@@ -55,9 +55,7 @@
[features]
default = [
- "ssh",
"https",
- "ssh_key_from_memory",
]
https = [
"libgit2-sys/https",

View File

@ -0,0 +1,21 @@
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index 9abed30ea6f7..e4bf55df3688 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -13,8 +13,6 @@ fi
# Find out where the pretty printer Python module is
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-# Get the commit hash for path remapping
-RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
# Run GDB with the additional arguments that load the pretty printers
# Set the environment variable `RUST_GDB` to overwrite the call to a
@@ -23,6 +21,6 @@ RUST_GDB="${RUST_GDB:-gdb}"
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
--directory="$GDB_PYTHON_MODULE_DIRECTORY" \
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
- -iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \
+ -iex "set substitute-path @BUILDDIR@ $RUSTC_SYSROOT/lib/rustlib/src/rust" \
"$@"

View File

@ -1 +1,2 @@
SHA512 (rustc-1.43.1-src.tar.xz) = 24bb01237b1f3f5412109290bb4406b9742cf8956162f4090a98ed3a59a6e2e8dda399452bec1c93c8afdcf5effd98e4825e7f218238e0e88735c1ff4a5b385f
SHA512 (rustc-1.70.0-src.tar.xz) = 21b35185fdcc35a059ee5ef6dca2b68f5f1d199e97f425a571cfc318a852c36a57bccf68e7673b4cb7cd83128f30d0b3eb93009a978f3ba3909b7eee50d40631
SHA512 (wasi-libc-wasi-sdk-20.tar.gz) = e264240dc7dbcf6398c8ca09bc108298f4a8aa955af22de5a3015fbcde81cb09dd83cd48349090082d5de0e8a3dbcf746c7b14657c67657b3f2f1ab28bb9cf05

View File

@ -1,8 +0,0 @@
SHA512 (rustc-1.43.1-src.tar.xz) = 24bb01237b1f3f5412109290bb4406b9742cf8956162f4090a98ed3a59a6e2e8dda399452bec1c93c8afdcf5effd98e4825e7f218238e0e88735c1ff4a5b385f
SHA512 (rust-1.42.0-aarch64-unknown-linux-gnu.tar.xz) = 691a11e279efdcafa6bdafacb7fb48ccf653e180e0e85909b6031105a297d47538efb36d63216f6185427f818483a51aa827f351ca2123840d72caf60079fe13
SHA512 (rust-1.42.0-armv7-unknown-linux-gnueabihf.tar.xz) = 26768ec530506e20fed8f9ef2c1ca85eec155fc90949f2063836b6109b296a976c8430a698971a8b1c11e8f6ad043d854a36e9f0e849417178411dc5cbd30e59
SHA512 (rust-1.42.0-i686-unknown-linux-gnu.tar.xz) = 7376be5abed573bbf68f73ed5609fa8e22dfa3ead19a3f3d78d553347e3ae01604ab9906f5317f1687a8ab3f9ad9c38cde44ef6f56d7da65a788a74aee9df057
SHA512 (rust-1.42.0-powerpc64le-unknown-linux-gnu.tar.xz) = e1db9bbef45e88e7d1d5b905379c04786a015c90d0d9de6a6c16276a3e91c342a8231dda7a4d46ecc7adc969d07fd7dd8595975647b9ab69f8997fee74401219
SHA512 (rust-1.42.0-powerpc64-unknown-linux-gnu.tar.xz) = 668d1d353bdaf676043ab7f4baad464b202e8ae1be7713e3481b8e9fb5fabd1020e10e178d69d099541cb1b23362b50b826790740156f1c96efa3d2a7457e404
SHA512 (rust-1.42.0-s390x-unknown-linux-gnu.tar.xz) = 85b1331a9a71cc43a2fa628b8510590ff072e409c2c38ebfd9089ab7a245182e23b52f6221b25c63f6048e1bf4ada0f561dd8f3f810680c9727040bc8a0d8d46
SHA512 (rust-1.42.0-x86_64-unknown-linux-gnu.tar.xz) = 87c06d4503e7ba12bd3dfc8dd279a3bdf33a24d2c22eec1378b79b2c17ccdad9b4c8dbd0d4704eae1f3476aec5639d3ba143e8c74a296d631b17b57da7447e70

View File

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/rust/Sanity/basic-smoke
# Description: basic-smoke
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/rust/Sanity/basic-smoke
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Martin Cermak <mcermak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: basic-smoke" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: rust" >> $(METADATA)
@echo "Requires: rust" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/rust/Sanity/basic-smoke
Description: basic-smoke
Author: Martin Cermak <mcermak@redhat.com>

View File

@ -0,0 +1,13 @@
summary: basic-smoke
description: ''
contact:
- Jesus Checa Hidalgo <jcheca@redhat.com>
component:
- rust
test: ./runtest.sh
framework: beakerlib
recommend:
- rust
duration: 10m
extra-summary: /tools/rust/Sanity/basic-smoke
extra-task: /tools/rust/Sanity/basic-smoke

View File

@ -0,0 +1,55 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/rust/Sanity/basic-smoke
# Description: basic-smoke
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which rustc))"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
HELLO_SRC=$( mktemp )
HELLO_BIN=$( mktemp )
echo 'fn main() { println!("hello"); }' > $HELLO_SRC
rlRun "which rustc"
rlRun "rustc -V"
rlRun "rustc -o $HELLO_BIN $HELLO_SRC"
rlRun "$HELLO_BIN"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/rust/Sanity/build-stratisd
# Description: rpmbuild stratisd
# Author: Edjunior Machado <emachado@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/rust/Sanity/build-stratisd
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Edjunior Machado <emachado@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: rpmbuild stratisd" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 1h" >> $(METADATA)
@echo "RunFor: rust" >> $(METADATA)
@echo "Requires: rust rpm-build yum-utils stratisd" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: RHEL8 RHEL9" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/rust/Sanity/build-stratisd
Description: rpmbuild stratisd
Author: Edjunior Machado <emachado@redhat.com>

View File

@ -0,0 +1,17 @@
summary: rpmbuild stratisd
description:
- 'Ensure that rust does not break stratisd rpmbuild'
contact:
- Jesus Checa Hidalgo <jcheca@redhat.com>
component:
- rust
test: ./runtest.sh
framework: beakerlib
recommend:
- rust
- rpm-build
- yum-utils
- stratisd
duration: 1h
extra-summary: /tools/rust/Sanity/build-stratisd
extra-task: /tools/rust/Sanity/build-stratisd

View File

@ -0,0 +1,65 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/rust/Sanity/build-stratisd
# Description: rpmbuild stratisd
# Author: Edjunior Machado <emachado@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which rustc))"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE || rlDie "rustc not found. Aborting testcase..."
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
PKG_TO_BUILD=stratisd
rlPhaseStart FAIL ${PKG_TO_BUILD}FetchSrcAndInstallBuildDeps
if ! rlCheckRpm $PKG_TO_BUILD; then
rlRun "yum install -y $PKG_TO_BUILD"
rlAssertRpm $PKG_TO_BUILD
fi
rlFetchSrcForInstalled $PKG_TO_BUILD
rlRun SRPM=$(ls -1 ${PKG_TO_BUILD}*src.rpm)
rlRun "rpm -ivh $SRPM"
rlRun SPECDIR="$(rpm -E '%{_specdir}')"
rlRun "yum-builddep -y ${SRPM}"
rlPhaseEnd
rlPhaseStartTest
set -o pipefail
rlRun "rpmbuild -bb ${SPECDIR}/${PKG_TO_BUILD}.spec |& tee ${SRPM}_rpmbuild.log"
rlFileSubmit "${SRPM}_rpmbuild.log"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,65 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/rust/Sanity/rpmbuild-librsvg2
# Description: rpmbuild librsvg2
# Author: Edjunior Machado <emachado@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/rust/Sanity/rpmbuild-librsvg2
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Edjunior Machado <emachado@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: rpmbuild librsvg2" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 1h" >> $(METADATA)
@echo "RunFor: rust" >> $(METADATA)
# Due to bz1980717 librsvg2 requires git to build the srpm, but it's missing
# from the BuildRequires
@echo "Requires: rust rpm-build yum-utils librsvg2 git" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: RHEL8 RHEL9" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/rust/Sanity/rpmbuild-librsvg2
Description: rpmbuild librsvg2
Author: Edjunior Machado <emachado@redhat.com>

View File

@ -0,0 +1,18 @@
summary: rpmbuild librsvg2
description:
- 'Ensure that rust does not break librsvg2 rpmbuild'
contact:
- Jesus Checa Hidalgo <jcheca@redhat.com>
component:
- rust
test: ./runtest.sh
framework: beakerlib
recommend:
- rust
- rpm-build
- yum-utils
- librsvg2
- git
duration: 1h
extra-summary: /tools/rust/Sanity/rpmbuild-librsvg2
extra-task: /tools/rust/Sanity/rpmbuild-librsvg2

View File

@ -0,0 +1,68 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/rust/Sanity/rpmbuild-librsvg2
# Description: rpmbuild librsvg2
# Author: Edjunior Machado <emachado@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="$(rpm -qf $(which rustc))"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE || rlDie "rustc not found. Aborting testcase..."
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
PKG_TO_BUILD=librsvg2
rlPhaseStart FAIL ${PKG_TO_BUILD}FetchSrcAndInstallBuildDeps
if ! rlCheckRpm $PKG_TO_BUILD; then
rlRun "yum install -y $PKG_TO_BUILD ${YUM_SWITCHES}"
rlAssertRpm $PKG_TO_BUILD
fi
rlFetchSrcForInstalled $PKG_TO_BUILD
rlRun SRPM=$(ls -1 ${PKG_TO_BUILD}*src.rpm)
rlRun "rpm -ivh $SRPM"
rlRun SPECDIR="$(rpm -E '%{_specdir}')"
# librsvg2 contains dynamic dependencies. builddep needs to be run
# from the srpm (not the spec file) to be able to generate them:
# https://fedoraproject.org/wiki/Changes/DynamicBuildRequires#rpmbuild
rlRun "yum-builddep -y ${SRPM} ${YUM_SWITCHES}"
rlPhaseEnd
rlPhaseStartTest
set -o pipefail
rlRun "rpmbuild -bb ${SPECDIR}/${PKG_TO_BUILD}.spec |& tee ${SRPM}_rpmbuild.log"
rlFileSubmit "${SRPM}_rpmbuild.log"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/rust/Sanity/rust-wasm-smoke-test
# Description: Test that the rust wasm target is enabled and can compile correctly
# Author: Jesus Checa <jcheca@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/rust/Sanity/rust-wasm-smoke-test
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE lib.rs test.js
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Jesus Checa <jcheca@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test that the rust wasm target is enabled and can compile correctly" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: rust" >> $(METADATA)
@echo "Requires: rust rust-std-static-wasm32-unknown-unknown nodejs" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL7" >> $(METADATA)
@echo "Architectures: aarch64 ppc64le x86_64" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/rust/Sanity/rust-wasm-smoke-test
Description: Test that the rust wasm target is enabled and can compile correctly
Author: Jesus Checa <jcheca@redhat.com>

View File

@ -0,0 +1,12 @@
#[no_mangle]
pub fn fib(index: u32) -> u32 {
let mut nminus2;
let mut nminus1 = 1;
let mut n = 0;
for _ in 0..index {
nminus2 = nminus1;
nminus1 = n;
n = nminus2 + nminus1;
}
n
}

View File

@ -0,0 +1,15 @@
summary: Test that the rust wasm target is enabled and can compile correctly
description: ''
contact:
- Jesus Checa <jcheca@redhat.com>
component:
- rust
test: ./runtest.sh
framework: beakerlib
recommend:
- rust
- rust-std-static-wasm32-unknown-unknown
- nodejs
duration: 5m
extra-summary: /tools/rust/Sanity/rust-wasm-smoke-test
extra-task: /tools/rust/Sanity/rust-wasm-smoke-test

View File

@ -0,0 +1,53 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/rust/Sanity/rust-wasm-smoke-test
# Description: Test that the rust wasm target is enabled and can compile correctly
# Author: Jesus Checa <jcheca@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGES="$(rpm -qf $(which rustc)) rust-std-static-wasm32-unknown-unknown"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm --all
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp lib.rs $TmpDir"
rlRun "cp test.js $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "rustc --target wasm32-unknown-unknown --crate-type=cdylib lib.rs -o fib.wasm" 0 "Building WASM binary"
rlRun "node test.js" 0 "Testing WASM binary"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,28 @@
function js_fibonacci(index) {
let nminus2 = 0;
let nminus1 = 1;
let n = 0;
for(let i = 0; i < index; ++i) {
nminus2 = nminus1;
nminus1 = n;
n = nminus1 + nminus2;
}
return n;
}
const fs = require('fs');
const buf = fs.readFileSync('./fib.wasm');
const lib = WebAssembly.instantiate(new Uint8Array(buf)).
then(res => {
var fib = res.instance.exports.fib;
for (var i=1; i<=10; i++) {
if(fib(i) != js_fibonacci(i)){
console.log("Mismatch between wasm and JS functions");
process.exit(1);
}
}
}).catch(e => {
console.log(e);
process.exit(1);
}
);