From 526d24fb5fe2505ede860bd4118e10008938da1f Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Thu, 13 Apr 2023 00:46:12 -0400 Subject: [PATCH 1/3] common/environment/setup: add CRATES_SITE should make it easier to use the proper crates.io url for distfiles --- common/environment/setup/misc.sh | 1 + common/environment/setup/sourcepkg.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/environment/setup/misc.sh b/common/environment/setup/misc.sh index 3f2cc09461de..313ddb7d18fa 100644 --- a/common/environment/setup/misc.sh +++ b/common/environment/setup/misc.sh @@ -18,5 +18,6 @@ GNU_SITE="https://ftp.gnu.org/gnu" FREEDESKTOP_SITE="https://freedesktop.org/software" KDE_SITE="https://download.kde.org/stable" VIDEOLAN_SITE="https://download.videolan.org/pub/videolan" +CRATES_SITE="https://static.crates.io/crates" set +a diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index 4e3b4e98ba43..baf42e83d8dd 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -12,7 +12,7 @@ for var in $(awk 'BEGIN{for (i in ENVIRON) {print i}}' Date: Thu, 13 Apr 2023 00:46:45 -0400 Subject: [PATCH 2/3] Manual.md: add CRATES_SITE, clean up _SITE table formatting --- Manual.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Manual.md b/Manual.md index 0b6b5ab645fc..eac833a69acf 100644 --- a/Manual.md +++ b/Manual.md @@ -491,20 +491,21 @@ Example: | Variable | Value | |------------------|-------------------------------------------------| - | CPAN_SITE | https://cpan.perl.org/modules/by-module | + | CPAN_SITE | https://cpan.perl.org/modules/by-module | + | CRATES_SITE | https://static.crates.io/crates | | DEBIAN_SITE | http://ftp.debian.org/debian/pool | - | FREEDESKTOP_SITE | https://freedesktop.org/software | - | GNOME_SITE | https://ftp.gnome.org/pub/GNOME/sources | - | GNU_SITE | https://ftp.gnu.org/gnu | - | KERNEL_SITE | https://www.kernel.org/pub/linux | - | MOZILLA_SITE | https://ftp.mozilla.org/pub | - | NONGNU_SITE | https://download.savannah.nongnu.org/releases | + | FREEDESKTOP_SITE | https://freedesktop.org/software | + | GNOME_SITE | https://ftp.gnome.org/pub/GNOME/sources | + | GNU_SITE | https://ftp.gnu.org/gnu | + | KDE_SITE | https://download.kde.org/stable | + | KERNEL_SITE | https://www.kernel.org/pub/linux | + | MOZILLA_SITE | https://ftp.mozilla.org/pub | + | NONGNU_SITE | https://download.savannah.nongnu.org/releases | | PYPI_SITE | https://files.pythonhosted.org/packages/source | - | SOURCEFORGE_SITE | https://downloads.sourceforge.net/sourceforge | + | SOURCEFORGE_SITE | https://downloads.sourceforge.net/sourceforge | | UBUNTU_SITE | http://archive.ubuntu.com/ubuntu/pool | - | XORG_SITE | https://www.x.org/releases/individual | - | KDE_SITE | https://download.kde.org/stable | | VIDEOLAN_SITE | https://download.videolan.org/pub/videolan | + | XORG_SITE | https://www.x.org/releases/individual | - `checksum` The `sha256` digests matching `${distfiles}`. Multiple files can be separated by blanks. Please note that the order must be the same than From e12e756b2b096431229622fe45ccbba9a4980d26 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Thu, 13 Apr 2023 00:47:10 -0400 Subject: [PATCH 3/3] srcpkgs/: convert crates.io distfiles to CRATES_SITE --- srcpkgs/difftastic/template | 2 +- srcpkgs/pijul/template | 2 +- srcpkgs/rav1e/template | 2 +- srcpkgs/rooster/template | 2 +- srcpkgs/rust-cargo-audit/template | 2 +- srcpkgs/rust-cargo-bloat/template | 2 +- srcpkgs/rust-sccache/template | 2 +- srcpkgs/sigi/template | 2 +- srcpkgs/tmplgen/template | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/srcpkgs/difftastic/template b/srcpkgs/difftastic/template index d9a93ff6e812..4ce437cb4a16 100644 --- a/srcpkgs/difftastic/template +++ b/srcpkgs/difftastic/template @@ -8,7 +8,7 @@ maintainer="icp " license="MIT" homepage="https://difftastic.wilfred.me.uk" changelog="https://raw.githubusercontent.com/Wilfred/difftastic/master/CHANGELOG.md" -distfiles="https://static.crates.io/crates/difftastic/difftastic-${version}.crate" +distfiles="${CRATES_SITE}/difftastic/difftastic-${version}.crate" checksum=1e443445ea9d68d1538b6ad00d9eadfe5c382392b32c78034714ef7f6a3463ce if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then diff --git a/srcpkgs/pijul/template b/srcpkgs/pijul/template index a6a6d048b1ec..c74760e7d348 100644 --- a/srcpkgs/pijul/template +++ b/srcpkgs/pijul/template @@ -11,7 +11,7 @@ short_desc="Distributed version control system based on patches" maintainer="Toyam Cox " license="GPL-2.0-only" homepage="https://pijul.org/" -distfiles="https://crates.io/api/v1/crates/pijul/${version}/download>pijul-${version}.tar.gz +distfiles="${CRATES_SITE}/pijul/pijul-${version}.crate https://gitlab.com/sequoia-pgp/sequoia/-/archive/v${_sequoia_ver}/sequoia-v${_sequoia_ver}.tar.gz" checksum="f92a3f4063e780ca45c161ceb0f42baf34dfeddf3359ebf6c2e0442d9abb5889 71823c88b9666611f3cfa6b1d923bd66fda92fa6a53368b195bd2f962fdf7f4b" diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template index e4589a60170e..07759f4d9029 100644 --- a/srcpkgs/rav1e/template +++ b/srcpkgs/rav1e/template @@ -8,7 +8,7 @@ short_desc="Fastest and safest AV1 encoder" maintainer="oreo639 " license="BSD-2-Clause" homepage="https://crates.io/crates/rav1e" -distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate" +distfiles="${CRATES_SITE}/rav1e/rav1e-${version}.crate" checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945 if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then diff --git a/srcpkgs/rooster/template b/srcpkgs/rooster/template index 2dcfca0af324..de912aad13d5 100644 --- a/srcpkgs/rooster/template +++ b/srcpkgs/rooster/template @@ -9,5 +9,5 @@ short_desc="Simple password manager for geeks" maintainer="Ulf " license="Apache-2.0" homepage="https://crates.io/crates/rooster" -distfiles="https://static.crates.io/crates/rooster/rooster-${version}.crate" +distfiles="${CRATES_SITE}/rooster/rooster-${version}.crate" checksum=2e35ae6aab681c1dbca7cf429c068ec37f43faf5ef81f0fd76fb0291ea2db1a4 diff --git a/srcpkgs/rust-cargo-audit/template b/srcpkgs/rust-cargo-audit/template index a6cbc08a63dd..9d2af7cc8cbc 100644 --- a/srcpkgs/rust-cargo-audit/template +++ b/srcpkgs/rust-cargo-audit/template @@ -10,7 +10,7 @@ maintainer="Enno Boland " license="Apache-2.0, MIT" homepage="https://rustsec.org" changelog="https://github.com/rustsec/rustsec/raw/main/cargo-audit/CHANGELOG.md" -distfiles="https://static.crates.io/crates/cargo-audit/cargo-audit-${version}.crate" +distfiles="${CRATES_SITE}/cargo-audit/cargo-audit-${version}.crate" checksum=9687fb6e8e2217aac2e72955ffb03d2d93b987f5f36a806787a5c64b38db0d13 if [ "$XBPS_TARGET_WORDSIZE" = "32" -a "$XBPS_TARGET_ENDIAN" = "be" ]; then diff --git a/srcpkgs/rust-cargo-bloat/template b/srcpkgs/rust-cargo-bloat/template index 80dd68981450..9081dc5f7c60 100644 --- a/srcpkgs/rust-cargo-bloat/template +++ b/srcpkgs/rust-cargo-bloat/template @@ -8,7 +8,7 @@ maintainer="Enno Boland " license="MIT" homepage="https://crates.io/crates/cargo-bloat" changelog="https://raw.githubusercontent.com/RazrFalcon/cargo-bloat/master/CHANGELOG.md" -distfiles="https://static.crates.io/crates/cargo-bloat/cargo-bloat-${version}.crate" +distfiles="${CRATES_SITE}/cargo-bloat/cargo-bloat-${version}.crate" checksum=ac0d2f3bae7849957392be201f47a0f70409a2e1b335b17a7c85e3ce48a6e092 post_install() { diff --git a/srcpkgs/rust-sccache/template b/srcpkgs/rust-sccache/template index 413008d37623..19ef8f7cf020 100644 --- a/srcpkgs/rust-sccache/template +++ b/srcpkgs/rust-sccache/template @@ -13,7 +13,7 @@ maintainer="Enno Boland " license="Apache-2.0" homepage="https://crates.io/crates/sccache" changelog="https://github.com/mozilla/sccache/releases" -distfiles="https://static.crates.io/crates/sccache/sccache-${version}.crate" +distfiles="${CRATES_SITE}/sccache/sccache-${version}.crate" checksum=c2651cae8522bfad07ab58f8cd44886a4b47232c6e2b2e3be007825176b213b4 case "$XBPS_TARGET_MACHINE" in diff --git a/srcpkgs/sigi/template b/srcpkgs/sigi/template index e3c03b47a4a8..bdd64847aac7 100644 --- a/srcpkgs/sigi/template +++ b/srcpkgs/sigi/template @@ -7,7 +7,7 @@ short_desc="Organization tool for people who hate organization" maintainer="J.R. Hill " license="GPL-2.0-only" homepage="https://github.com/sigi-cli/sigi" -distfiles="https://static.crates.io/crates/sigi/sigi-${version}.crate" +distfiles="${CRATES_SITE}/sigi/sigi-${version}.crate" checksum=ecbd9b1fd005710a457d003dfb0e678fc747e2d8abff486b27ff16d3341ac35d post_install() { diff --git a/srcpkgs/tmplgen/template b/srcpkgs/tmplgen/template index f352a5f3fd60..ed0ded5e40d1 100644 --- a/srcpkgs/tmplgen/template +++ b/srcpkgs/tmplgen/template @@ -9,7 +9,7 @@ short_desc="Void Linux template generator for language-specific package managers maintainer="Enno Boland " license="GPL-3.0-or-later" homepage="https://github.com/Cogitri/tmplgen" -distfiles="https://static.crates.io/crates/tmplgen/tmplgen-${version}.crate" +distfiles="${CRATES_SITE}/tmplgen/tmplgen-${version}.crate" checksum=5e5dc4b3e50f4f2dc87f510bb3d1547a86ecd5a52c0f33305a0a7a3dca40bee9 post_install() {