From 48b986c6e7b51dc206d1c1fe9293f37f5862564f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 11 Jan 2022 13:06:24 -0500 Subject: [PATCH] import rust-1.56.1-2.el9 --- .gitignore | 5 +- .rust.metadata | 5 +- SOURCES/rust-openssl-300.patch | 36 ----- ...patch => rustc-1.56.0-disable-http2.patch} | 32 ++--- ...tch => rustc-1.56.0-disable-libssh2.patch} | 16 +-- SPECS/rust.spec | 124 +++++++++++++----- 6 files changed, 119 insertions(+), 99 deletions(-) delete mode 100644 SOURCES/rust-openssl-300.patch rename SOURCES/{rustc-1.53.0-disable-http2.patch => rustc-1.56.0-disable-http2.patch} (67%) rename SOURCES/{rustc-1.48.0-disable-libssh2.patch => rustc-1.56.0-disable-libssh2.patch} (66%) diff --git a/.gitignore b/.gitignore index c524d22..70f2cb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -SOURCES/openssl-0.10.35.crate -SOURCES/openssl-sys-0.9.65.crate -SOURCES/rustc-1.54.0-src.tar.xz +SOURCES/rustc-1.56.1-src.tar.xz +SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz diff --git a/.rust.metadata b/.rust.metadata index be90ce5..f4d02f1 100644 --- a/.rust.metadata +++ b/.rust.metadata @@ -1,3 +1,2 @@ -30b1d249820fb830ab1fbd0910c39dbd8976f3de SOURCES/openssl-0.10.35.crate -c4f319fbe5ce983a1b958f7df6b572a1b2752784 SOURCES/openssl-sys-0.9.65.crate -1577242bee41fe6c1aee17d47ae791f4bfc1f8c3 SOURCES/rustc-1.54.0-src.tar.xz +a79516231c4391e37990bdda0efdafdc51697fab SOURCES/rustc-1.56.1-src.tar.xz +b8865d1192852214d6d9b0a0957d4b36c16832aa SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz diff --git a/SOURCES/rust-openssl-300.patch b/SOURCES/rust-openssl-300.patch deleted file mode 100644 index a8df668..0000000 --- a/SOURCES/rust-openssl-300.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- rustc-1.54.0-src/Cargo.lock.orig 2021-07-26 07:43:01.000000000 -0700 -+++ rustc-1.54.0-src/Cargo.lock 2021-08-04 16:01:15.723167826 -0700 -@@ -2408,9 +2408,9 @@ dependencies = [ - - [[package]] - name = "openssl" --version = "0.10.33" -+version = "0.10.35" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577" -+checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885" - dependencies = [ - "bitflags", - "cfg-if 1.0.0", -@@ -2437,9 +2437,9 @@ dependencies = [ - - [[package]] - name = "openssl-sys" --version = "0.9.61" -+version = "0.9.65" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f" -+checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d" - dependencies = [ - "autocfg", - "cc", ---- /dev/null 2021-06-21 12:38:51.028538978 -0700 -+++ rustc-1.53.0-src/vendor/openssl-0.10.35/.cargo-checksum.json 2021-06-22 13:02:26.569703262 -0700 -@@ -0,0 +1 @@ -+{"files":{"CHANGELOG.md":"621727e374f71be92d94fa64bceb2a0d02715588c41002a81347703963540e29","Cargo.lock":"9ba46c2617d38d7202e4e2ac7bd3a53de884afc38aa6490bbe749581ff7f0e5c","Cargo.toml":"efdbc3060829e8b295c3de0155aa6f6841e8af4b99814f2b022e889935fa74a1","LICENSE":"f3d4287b4a21c5176fea2f9bd4ae800696004e2fb8e05cbc818be513f188a941","README.md":"c5ddde25c2756a1115daaa671fb4297cdc83bf23009c8356ba65b5311d0dd30d","build.rs":"575bf9996eb60039fbe26705983f8ea5f20978308d0bfde8e27f99ed734a162d","examples/mk_certs.rs":"4e45b618298bf9ce736830f860e382e98add8ba9200c14fee6243a73098b3aaf","src/aes.rs":"8031a9f9cf29d71ed8da8318ed6f9e315f65462db2c9db5850c8f8a7f4840a84","src/asn1.rs":"557f70ff01b991e1ab6bb717b02f666733a67bd55e0829faf38c7931e21a9c2b","src/base64.rs":"48a3e924b3b5c17df63f88210d88e726b95da7b825af867f2e2010381194ba72","src/bio.rs":"a8b0d600bd350ffdbf037ce1e293aad8e01eb870697e8776cc720490637da51f","src/bn.rs":"29cc5b26954f24fc5262f0eb708a1030b0fcb81ad184c4476b59fe916cf16f2b","src/cms.rs":"c8fb1c390c2bfc0d46695a5c6e47edb39c70d175a5afb9aee71d779078749620","src/conf.rs":"ba6aca357b1f31114dcf8f05dedc8e143edacad3a05e4e9d5f3aeaa00bbbcf34","src/derive.rs":"e70c2a49e4e32eb1523c7b6c5bfdb9c5c17c284bd5a8a5cec4c26206c0e8fd49","src/dh.rs":"c54a2ffb78b6431c931fa3093f021428d3e6c2e9553547ec379b67ee1f6aa8f9","src/dsa.rs":"cd75a78af674bdd2a570fc87bf5fc68b68432881f2a31e1e92e9e9de14c10b59","src/ec.rs":"5229f2e335be3f77b8701dc5090d2cd5dcb05a1c6db4c40fb7e7ed723b66c367","src/ecdsa.rs":"0e30beee5fff7b681c969554d2860e7f2300b7364ed102e0a3fd48dda8e3ddfb","src/encrypt.rs":"e70efe35edfff0cacf063f0cad31eaaa2a29d73c58629deb77c880cdd12e5959","src/envelope.rs":"e176f98f26b9da7e7fc1716be7d0fcda4bcc100bdf0121b1d1fdc96883cf69a7","src/error.rs":"cced1c5e348c1e3fced8262c3758e3b5afc4154a9f35e427bfea3798f4456875","src/ex_data.rs":"0a58a3a274a4ef2251dadb64cbcd44b43710d252201b137ecfb91cf14373c04f","src/fips.rs":"406722ff95f933af3e862b937f3b51f705a049a7b4a8515a9d8311cc74b1a3de","src/hash.rs":"02bc290edf034baf778fced4adcac83700247d0ffea39fac84e49181b4616045","src/lib.rs":"da51832c9eb768d2b3b6bac81e3895eee651997bba2b2aeed63f1042c83d4a84","src/macros.rs":"29751b6f9b40c8667128cd46ee780b6544c54a34738f1d587042db9de6f24b12","src/memcmp.rs":"2bbdd7d6be3c60e9e3ce44a28b44698e176ce5baaf7be08618d1de63afa3396a","src/nid.rs":"49ee73b89292a93f5d9c9f005b6c0bc5e46c23f00e9d1af3989680eef62131f4","src/ocsp.rs":"e9c36fb63d3a9b9a2d52a11be4123688710e0d126c0c1eb09512be37fed6aaf1","src/pkcs12.rs":"764dbb1a67b09e2da4c326653e9ceeba18591d732f8f0ab1b8228b3e392742ec","src/pkcs5.rs":"2948a418a9218d0347b3072998d01b0b5c5263b5fef69716e9c69fca548ed77c","src/pkcs7.rs":"a0e96577c25af824255e0d40d617a0d0723c2955429b90da7d29e2ed1080261c","src/pkey.rs":"1def26f9af8973b2a2fccd54d15880046a86bd39b3ce348fb901c2d9cab3b509","src/rand.rs":"c7b3fed0d322af7ea950b249430ec2163d2b57fa1b7a3864c9e0a8c8365ad997","src/rsa.rs":"ca2dacc55531088f29465d13a2c5b8f76481f7e0d32488783e3d2cb8cb9440d8","src/sha.rs":"28e6d9205b6e4c8be024de2cc1913cb62d0f0592239a5f97648bd3fa929db62d","src/sign.rs":"7b3211990a07f1b60d2dfc5c60a113ca3bb7eb150368d5eaf8526807f5fd960e","src/srtp.rs":"29a726ed8269567d1a8dcc7ac256501e255a0536d5ce03740ea2274d098218ec","src/ssl/bio.rs":"7d11afcf22b0a6023eaaad953cb392ef8da651c4b4ceaa94b793789792291a96","src/ssl/callbacks.rs":"1f2514a6149347c3df4add8cbae8c74a8f2a255f580a2fa4a62586b4250335c8","src/ssl/connector.rs":"dc1147f2b16de747c15ff9bdab44fc02fe18dcc1b6abe6acba56b69bec99013b","src/ssl/error.rs":"f39ac3e1037a35ae5cccbf5cf5976044614a6368c9ffe3f1b96bead63c0c4231","src/ssl/mod.rs":"7e215ba04963400a82d8c72b0036e97d7ac6d38f6986e4b27c231759de18015e","src/ssl/test/mod.rs":"48ecde6dbb4bf280dcdbba12969ca72a73b472d4b4173c2ed64920026635ee61","src/ssl/test/server.rs":"4276ba970a0fac5c9cae21d7df7af36389c377472f3546ce597678ffc6ad5b38","src/stack.rs":"a7b92ca9208a0190e6dbebf372347639d2058f518a7b637811e2122522952444","src/string.rs":"9cf0c69c03b091b186a846f46698c17c75e55d747fd4154cc9950e8aca54c0dd","src/symm.rs":"cf3a65146434bfb90506bbd766b791943317e97899cace5fc745feb0349454c7","src/util.rs":"76eaa375361e305e020d11b51c6e3adaa68ee2b531b253bbac92eb1bfd03180d","src/version.rs":"ea890383758bbe9a92fab8ee27def2ad759a2346481199e1af30940b25d8aae1","src/x509/extension.rs":"772861b6725c2524911521c0ae4fd58657b739209d6cd9a697d97652d6aadb15","src/x509/mod.rs":"7850e07bef15318c777890d21818ff038334c5600e5e883982ff1b07ed572019","src/x509/store.rs":"7cdcb33018006b3063375cfb87dcc319ac28d200c03d94e281cefb74e2a78879","src/x509/tests.rs":"c92a5a385887d389184daba1e827fbb7203a7f984e8782dfe55485852f0f5937","src/x509/verify.rs":"ad00a223cd1d008fb6fdfe470bb473b5a47a1375ba92cd302aa14790d7e3e58f","test/aia_test_cert.pem":"9eaf52b5d0023f3be7911938d937ed16fc75d43d14dbe41557a800b0a82f4b1b","test/alt_name_cert.pem":"f3cc0a1d21657164918dffab0dac8f1c499fc1cf5717805420a0134b3aee128c","test/cert.pem":"53c8b338be254490c71a6b13da90dc5a59ba596587c548be5673657e04824afb","test/certs.pem":"106d5d22c86e26c3db619b9525567f22333d22de82e4d2850ed379150c638008","test/cms.p12":"d33fc5edd6b9caa672e7570b869135235bb2583580a273f6e88c6a6c68fd5a8a","test/cms_pubkey.der":"03682a732e1fd861f5fa687915a8e6f5c935d10273b0f6f73f3db52a8d71fc6d","test/dhparams.pem":"14d9461949d9ae8ca50a393b008ee2168254f14342b0e17b56c0a62d2905b963","test/dsa.pem":"826d513234205fd3dee0bbbf844f0b6fea501145bdf05ea3b14e14df98cbe090","test/dsa.pem.pub":"721677bebf9ab28b8650f98a0cd27658de0c1acd867a4b6e985fe1df95a8bd37","test/dsaparam.pem":"94a1284bdd7d7566151cfde0c7f245e84f7b99ba840f202e3f27ea0160f82988","test/identity.p12":"aceeb3e5516471bd5af9a44bbeffc9559c4f228f67c677d29f36a4b368e2779f","test/key.der":"e8842cd6674b5c77a83e0283cd876a91de404561dfc86d79ce525f6e55b28197","test/key.der.pub":"e559d56bb6ec57ad743dbf972bbcaf263a9fa7d320433baa71b04f849d987060","test/key.pem":"12d9105a92bf39b615ccb4820c5c1e38c61905483cd30be13f9ab99b98af64ed","test/key.pem.pub":"f5d030df843ddbaba5bf316ae18f1434de5a63a955be66442429dd4f16f161ef","test/keystore-empty-chain.p12":"bbea280f6fe10556d7470df7072ef0e4ee3997e2c0b3666197f423430c0e6b61","test/nid_test_cert.pem":"7047e8d317e284c6b698eee4a0f1a629d50cd4615ad7da85fe90a2ffb6c21611","test/nid_uid_test_cert.pem":"a735211f3b40edbde7084337138fb0aea06aea6c78369c52015253e4b7a17d83","test/pkcs1.pem.pub":"4d446864b63c4178ec2c7dc8df9b7121d9271851c1f4701231fccb8b07c94918","test/pkcs8-nocrypt.der":"5590d03cc0d037c6c27d78fafc937f48defb226e9a52cde84d54df68086d0575","test/pkcs8.der":"8719fc002d59313fb97e46e068ae40db4d9acc0e2debd308ac9eb46329bea487","test/root-ca.key":"b37cf88614980c38e43c4329cdf7162bae48cc8af1fafd54db2fe0d17e458e1d","test/root-ca.pem":"59b9200c35e818bf21be4aaa97ba87bb6a18fd780527a9f9c51cc74212c631a0","test/rsa-encrypted.pem":"ea41b0f1816056672de6abbab43d0e8089da047c329ceed14aace5a5bde713f1","test/rsa.pem":"f866a5506ea9a37ed2f73f62f503e1aff32f7e4145be62b023535f4da1c24416","test/rsa.pem.pub":"2c5eeea39708e90396f9f09d920f2af8b7e9f84ace963c1319072224dd3d302b"},"package":"549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885"} -\ No newline at end of file ---- /dev/null 2021-06-21 12:38:51.028538978 -0700 -+++ rustc-1.53.0-src/vendor/openssl-sys-0.9.65/.cargo-checksum.json 2021-06-22 13:02:26.570703241 -0700 -@@ -0,0 +1 @@ -+{"files":{"CHANGELOG.md":"6ee4e524e49a4e8cd3164701bf18fbc641c7a014b756b5de6b3ccc11fa588c70","Cargo.toml":"1a6b84bb11588fb0fa8d28741ab548726cef34e546de3dd2280be1d8139f292d","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"c5ddde25c2756a1115daaa671fb4297cdc83bf23009c8356ba65b5311d0dd30d","build/cfgs.rs":"193f81ffdf211f056599072e8910d59c2134d3df85fed9ca693bc59f82cb73d4","build/expando.c":"d6f6f9f7d9f79d03b96740fe378e6d4fd38e9447abf7839e62a5fae3eea49c14","build/find_normal.rs":"b6bc74f91a52bb592e14c085061b477722d7f72eaa33a7590fb01da46cd35b7c","build/find_vendored.rs":"7bf0e59c5646d72ee5a4392ad970fdf5c20288ddaf54dd86a8caff49583b38f5","build/main.rs":"c6e1ba232c3334a726707561c7cb0c87c841c75b1848880ce03c689f5d9b2b69","src/aes.rs":"822bf666db351fe6ef9607c918081d6ad378fc1cedb05290bb746f86980c6088","src/asn1.rs":"801c254afc76b0c29b756bd86a149361609f82ec33c1f1fad39a512fbe4e87ee","src/bio.rs":"3aac4e38ccf8d832b4156908cd3f1ff9c56f84c05d2f07ed7a3e3fccabe965e9","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"1e1500367732915e756ba7dcee4a0691ba4fab770e0cef88267b74111e99e127","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"fa513478e5c4a1e9d54081a9c79d48400f726c7047e776aa3f1adc023d6600be","src/dh.rs":"fb3b539eec4434b448b30df19e2e2ac5ffc3bd11bb817c7fb9090186ec3b0146","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"0477022d5bcf2b7a620c70ece4da08a2958be3eca5a57127c89d79525c692ebd","src/ec.rs":"018a2ab377804bb735206e88d0561ab16098e29007d1a1fd0d565c8e492544c2","src/err.rs":"9e6c84a170dce46db74414a64b9e1855845afbd8180100a2d9412f7509f69284","src/evp.rs":"c947ddf745e4fc761f2b4b7886246f96163f41ff8ccc3c822e46ad38169d2c94","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"19ddf11d94bf469abb3f453a6b38886f6ccea4bc6004477f36b200516f5fee44","src/macros.rs":"7ed99c00c53ee12ea92634d4ace0af84845ebf98819869746e7896c8eaff23db","src/obj_mac.rs":"42019b142e523d7695d8c14ee7f72fa4b5702c07dee98fa12e70ab7dfcc95459","src/object.rs":"9ec1a26968e3efc87b24f287b92331fa38eaca048a3919e6514f48d38c7df9a6","src/ocsp.rs":"614492810c5fadd0c1c4bb5eda165fb7e744eed7b04ae61d582446f5013e733a","src/ossl_typ.rs":"0d8dd0f82ef08672ab3c5059d2335b7eaad2d5afc0a20dbf26c2476c99dcae8e","src/pem.rs":"c92d1d31e6f70f6704f148e370a8b4228d6305b51fd3be907c49014a8bfe14ba","src/pkcs12.rs":"4c3c1cf2e716454c5fc94c3d5e1174922c57b9de796253799437dc13303a68d1","src/pkcs7.rs":"726614946784f919db88fd5282ec66d5b9df2edafc98ade9614758e109176b31","src/rand.rs":"c771057f37c64406aa750f36397fa877caf330a8c725e49356c7081c2b2fdd67","src/rsa.rs":"d45d421339b903b0d33817e93be5e939964431f9caed343e5c4490382cfad5b1","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"16a4c77cbc38926b8f8eee07b0beae8dc12cbdc8cfa599d4db66fa84a7b3871d","src/srtp.rs":"1c4dee9e6c139cc70416207786e385f199321624fb9fbf3cbf39a8160c0c405d","src/ssl.rs":"f0dd56aef28630ba8359e49538664160b54f58e255cca1f5c239f23aa820de1b","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/types.rs":"0b9bafc6f5fd373ec8c01e49339f7fe7ef1d76e44d60cda59f60c06982b4070e","src/x509.rs":"785bcb26166b8f39e616e5ab9a0358814773e96de51b40fd5ae62b45a2edcda6","src/x509_vfy.rs":"e530e2fd91e959715265b40fba95576bb53ddcb4e2c6586c2192098e0e8b1cc1","src/x509v3.rs":"520253195097d134e553c6378c1db2510eae6ccfcab6f6fb08919697bc0f023b"},"package":"7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d"} -\ No newline at end of file diff --git a/SOURCES/rustc-1.53.0-disable-http2.patch b/SOURCES/rustc-1.56.0-disable-http2.patch similarity index 67% rename from SOURCES/rustc-1.53.0-disable-http2.patch rename to SOURCES/rustc-1.56.0-disable-http2.patch index 94040b3..3b3d0c8 100644 --- a/SOURCES/rustc-1.53.0-disable-http2.patch +++ b/SOURCES/rustc-1.56.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-beta-src/Cargo.lock.orig 2021-06-04 15:56:04.141227630 -0700 -+++ rustc-beta-src/Cargo.lock 2021-06-04 16:03:04.461396826 -0700 -@@ -885,7 +885,6 @@ +--- rustc-1.56.0-src/Cargo.lock.orig 2021-10-19 18:03:53.928187581 -0700 ++++ rustc-1.56.0-src/Cargo.lock 2021-10-19 18:05:41.443522980 -0700 +@@ -877,7 +877,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1904,16 +1903,6 @@ +@@ -1907,16 +1906,6 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] @@ -23,22 +23,22 @@ - -[[package]] name = "libz-sys" - version = "1.1.2" + version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2021-06-04 15:56:04.143227587 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2021-06-04 15:57:56.931857927 -0700 +--- rustc-1.56.0-src/src/tools/cargo/Cargo.toml.orig 2021-10-19 18:03:53.930187532 -0700 ++++ rustc-1.56.0-src/src/tools/cargo/Cargo.toml 2021-10-19 18:05:13.663211469 -0700 @@ -25,7 +25,7 @@ - cargo-util = { path = "crates/cargo-util", version = "0.1.0" } + cargo-util = { path = "crates/cargo-util", version = "0.1.1" } crates-io = { path = "crates/crates-io", version = "0.33.0" } crossbeam-utils = "0.8" --curl = { version = "0.4.23", features = ["http2"] } -+curl = { version = "0.4.23", features = [] } - curl-sys = "0.4.22" - env_logger = "0.8.1" +-curl = { version = "0.4.38", features = ["http2"] } ++curl = { version = "0.4.38", features = [] } + curl-sys = "0.4.48" + env_logger = "0.9.0" pretty_env_logger = { version = "0.4", optional = true } ---- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-05-22 15:22:31.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2021-06-04 16:00:03.903190293 -0700 -@@ -416,14 +416,8 @@ +--- rustc-1.56.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-10-18 02:52:56.000000000 -0700 ++++ rustc-1.56.0-src/src/tools/cargo/src/cargo/core/package.rs 2021-10-19 18:03:53.931187507 -0700 +@@ -417,14 +417,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP // proxies. @@ -55,7 +55,7 @@ Ok(PackageSet { packages: package_ids -@@ -596,7 +590,7 @@ +@@ -653,7 +647,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { let result = $e; diff --git a/SOURCES/rustc-1.48.0-disable-libssh2.patch b/SOURCES/rustc-1.56.0-disable-libssh2.patch similarity index 66% rename from SOURCES/rustc-1.48.0-disable-libssh2.patch rename to SOURCES/rustc-1.56.0-disable-libssh2.patch index 6916e74..4d9331b 100644 --- a/SOURCES/rustc-1.48.0-disable-libssh2.patch +++ b/SOURCES/rustc-1.56.0-disable-libssh2.patch @@ -1,6 +1,6 @@ ---- rustc-1.48.0-src/Cargo.lock.orig 2020-11-16 06:01:53.000000000 -0800 -+++ rustc-1.48.0-src/Cargo.lock 2020-11-16 09:27:44.425104404 -0800 -@@ -1676,7 +1676,6 @@ +--- rustc-1.56.0-src/Cargo.lock.orig 2021-10-18 02:52:36.000000000 -0700 ++++ rustc-1.56.0-src/Cargo.lock 2021-10-19 18:00:47.999793566 -0700 +@@ -1895,7 +1895,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1693,20 +1692,6 @@ +@@ -1918,20 +1917,6 @@ ] [[package]] @@ -27,11 +27,11 @@ - -[[package]] name = "libz-sys" - version = "1.1.2" + version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.48.0-src/vendor/git2/Cargo.toml.orig 2020-11-16 06:27:49.000000000 -0800 -+++ rustc-1.48.0-src/vendor/git2/Cargo.toml 2020-11-16 09:27:44.425104404 -0800 -@@ -49,7 +49,7 @@ +--- rustc-1.56.0-src/vendor/git2/Cargo.toml.orig 2021-10-18 04:05:54.000000000 -0700 ++++ rustc-1.56.0-src/vendor/git2/Cargo.toml 2021-10-19 17:57:37.960500359 -0700 +@@ -52,7 +52,7 @@ version = "0.1.39" [features] diff --git a/SPECS/rust.spec b/SPECS/rust.spec index 4e29def..29a9bb6 100644 --- a/SPECS/rust.spec +++ b/SPECS/rust.spec @@ -1,6 +1,6 @@ # Only x86_64 and i686 are Tier 1 platforms at this time. # https://doc.rust-lang.org/nightly/rustc/platform-support.html -%global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x +%global rust_arches x86_64 i686 aarch64 ppc64le s390x # The channel can be stable, beta, or nightly %{!?channel: %global channel stable} @@ -9,10 +9,10 @@ # e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 # or nightly wants some beta-YYYY-MM-DD # Note that cargo matches the program version here, not its crate version. -%global bootstrap_rust 1.53.0 -%global bootstrap_cargo 1.53.0 -%global bootstrap_channel 1.53.0 -%global bootstrap_date 2021-06-17 +%global bootstrap_rust 1.55.0 +%global bootstrap_cargo 1.55.0 +%global bootstrap_channel 1.55.0 +%global bootstrap_date 2021-09-09 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -22,10 +22,19 @@ # reproducible between hosts, so only x86_64 actually builds it. %ifarch x86_64 %if 0%{?fedora} || 0%{?rhel} >= 8 -%global cross_targets wasm32-unknown-unknown +%global cross_targets wasm32-unknown-unknown wasm32-wasi %endif %endif +# We need CRT files for *-wasi targets, at least as new as the commit in +# src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh +%global forgeurl1 https://github.com/WebAssembly/wasi-libc +%global commit1 ad5133410f66b93a2381db5b542aad5e0964db96 +%forgemeta -z 1 +%undefine distprefix1 +%global wasi_libc_source %{forgesource1} +%global wasi_libc_dir %{_builddir}/%{extractdir1} + # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases. %bcond_with llvm_static @@ -61,7 +70,7 @@ %endif Name: rust -Version: 1.54.0 +Version: 1.56.1 Release: 2%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -75,8 +84,11 @@ ExclusiveArch: %{rust_arches} %global rustc_package rustc-%{channel}-src %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz +Source1: %{wasi_libc_source} +# Sources for bootstrap_arches are inserted by lua below -# This internal rust-abi change broke s390x -- revert for now. +# An internal rust-abi change broke s390x, but it's fixed in LLVM 12.0.1. +# We'll revert the change on Fedora 33 that has an unpatched LLVM 11. # https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032 Patch1: 0001-Revert-Auto-merge-of-79547.patch @@ -86,24 +98,16 @@ Patch2: 0001-Use-lld-provided-by-system-for-wasm.patch ### RHEL-specific patches below ### # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.48.0-disable-libssh2.patch +Patch100: rustc-1.56.0-disable-libssh2.patch # libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch101: rustc-1.53.0-disable-http2.patch +Patch101: rustc-1.56.0-disable-http2.patch # kernel rh1410097 causes too-small stacks for PIE. # (affects RHEL6 kernels when building for RHEL7) Patch102: rustc-1.51.0-no-default-pie.patch -# Add support for OpenSSL 3.0.0 -# https://github.com/rust-lang/rust/pull/86529/ -# https://github.com/sfackler/rust-openssl/pull/1264 -Patch103: rust-openssl-300.patch -Source103: https://crates.io/api/v1/crates/openssl/0.10.35/download#/openssl-0.10.35.crate -Source104: https://crates.io/api/v1/crates/openssl-sys/0.9.65/download#/openssl-sys-0.9.65.crate - - # Get the Rust triple for any arch. %{lua: function rust_triple(arch) local abi = "gnu" @@ -134,6 +138,7 @@ end} .."/rust-%{bootstrap_channel}") local target_arch = rpm.expand("%{_target_cpu}") for i, arch in ipairs(bootstrap_arches) do + i = 100 + i print(string.format("Source%d: %s-%s.tar.xz\n", i, base, rust_triple(arch))) if arch == target_arch then @@ -184,7 +189,8 @@ BuildRequires: %{python} %if %with bundled_llvm BuildRequires: cmake3 >= 3.13.4 -Provides: bundled(llvm) = 12.0.0 +BuildRequires: ninja-build +Provides: bundled(llvm) = 13.0.0 %else BuildRequires: cmake >= 2.8.11 %if 0%{?epel} == 7 @@ -263,10 +269,11 @@ BuildRequires: %{devtoolset_name}-gcc-c++ %global rustlibdir %{common_libdir}/rustlib %if %defined cross_targets +BuildRequires: clang # brp-strip-static-archive breaks the archive index for wasm %global __os_install_post \ %__os_install_post \ -find %{buildroot}%{rustlibdir} -type f -path '*/wasm*/lib/*.rlib' -exec ranlib '{}' ';' \ +find '%{buildroot}%{rustlibdir}' -type f -path '*/wasm*/lib/*.rlib' -print -exec '%{llvm_root}/bin/llvm-ranlib' '{}' ';' \ %{nil} %endif @@ -287,23 +294,29 @@ written in Rust. %if %defined cross_targets %{lua: do for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do - local requires = rpm.expand("Requires: rust = %{version}-%{release}") - if string.sub(triple, 1, 4) == "wasm" then - requires = requires .. "\nRequires: lld >= 8.0" - end local subs = { triple = triple, - requires = requires, + verrel = rpm.expand("%{version}-%{release}"), + wasm = string.sub(triple, 1, 4) == "wasm" and 1 or 0, + wasi = string.find(triple, "-wasi") and 1 or 0, } local s = string.gsub([[ + %package std-static-{{triple}} Summary: Standard library for Rust BuildArch: noarch -{{requires}} +Requires: rust = {{verrel}} +%if {{wasm}} +Requires: lld >= 8.0 +%endif +%if {{wasi}} +Provides: bundled(wasi-libc) +%endif %description std-static-{{triple}} This package includes the standard libraries for building applications written in Rust for the {{triple}} target. + ]], "{{(%w+)}}", subs) print(s) end @@ -464,9 +477,17 @@ test -f '%{local_rust_root}/bin/cargo' test -f '%{local_rust_root}/bin/rustc' %endif +%if %defined cross_targets +%forgesetup -z 1 +%endif + %setup -q -n %{rustc_package} +%if 0%{?fedora} == 33 +# revert only for LLVM 11 %patch1 -p1 +%endif + %patch2 -p1 %if %with disabled_libssh2 @@ -509,12 +530,6 @@ rm -rf vendor/libgit2-sys/libgit2/ rm -rf vendor/libssh2-sys/ %endif -# Add support for OpenSSL 3.0.0 -rm -rf vendor/openssl{,-sys}/ -tar -xf %{SOURCE103} -C vendor/ -tar -xf %{SOURCE104} -C vendor/ -%patch103 -p1 - # This only affects the transient rust-installer, but let it use our dynamic xz-libs sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/tool.rs @@ -581,6 +596,22 @@ if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then ncpus="$max_cpus" fi +%if %defined cross_targets +%make_build -C %{wasi_libc_dir} +%{lua: do + local wasi_root = rpm.expand("%{wasi_libc_dir}") .. "/sysroot" + local set_wasi_root = "" + for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do + if string.find(triple, "-wasi") then + set_wasi_root = set_wasi_root .. " --set target." .. triple .. ".wasi-root=" .. wasi_root + end + end + if wasi_root ~= "" then + rpm.define("set_wasi_root "..set_wasi_root) + end +end} +%endif + %configure --disable-option-checking \ --libdir=%{common_libdir} \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ @@ -599,7 +630,8 @@ fi --tools=analysis,cargo,clippy,rls,rustfmt,src \ --enable-vendor \ --enable-verbose-tests \ - %{?codegen_units_std} \ + %{?set_wasi_root} \ + --dist-compression-formats=gz \ --release-channel=%{channel} \ --release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}" @@ -696,6 +728,12 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll* %check export %{rust_env} +# Sanity-check the installed binaries, debuginfo-stripped and all. +%{buildroot}%{_bindir}/cargo new build/hello-world +env RUSTC=%{buildroot}%{_bindir}/rustc \ + LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \ + %{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml + # The results are not stable on koji, so mask errors and just log it. # Some of the larger test artifacts are manually cleaned to save space. %{python} ./x.py test --no-fail-fast --stage 2 || : @@ -705,7 +743,10 @@ rm -rf "./build/%{rust_triple}/test/" rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/" %{python} ./x.py test --no-fail-fast --stage 2 clippy || : + +env RLS_TEST_WAIT_FOR_AGES=1 \ %{python} ./x.py test --no-fail-fast --stage 2 rls || : + %{python} ./x.py test --no-fail-fast --stage 2 rustfmt || : @@ -739,13 +780,20 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/" local subs = { triple = triple, rustlibdir = rpm.expand("%{rustlibdir}"), + wasi = string.find(triple, "-wasi") and 1 or 0, } local s = string.gsub([[ + %files std-static-{{triple}} %dir {{rustlibdir}} %dir {{rustlibdir}}/{{triple}} %dir {{rustlibdir}}/{{triple}}/lib {{rustlibdir}}/{{triple}}/lib/*.rlib +%if {{wasi}} +%dir {{rustlibdir}}/{{triple}}/lib/self-contained +{{rustlibdir}}/{{triple}}/lib/self-contained/crt*.o +%endif + ]], "{{(%w+)}}", subs) print(s) end @@ -836,6 +884,16 @@ end} %changelog +* Wed Dec 01 2021 Josh Stone - 1.56.1-2 +- Add rust-std-static-wasm32-wasi + Resolves: rhbz#1980082 + +* Thu Nov 04 2021 Josh Stone - 1.56.1-1 +- Update to 1.56.1. + +* Fri Oct 29 2021 Josh Stone - 1.55.0-1 +- Update to 1.55.0. + * Tue Aug 10 2021 Mohan Boddu - 1.54.0-2 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688