diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-26 10:34:31 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-26 10:34:31 +0200 |
| commit | 7bf0929fd4e8204f54d3ae576b3f1c5a2d6ab887 (patch) | |
| tree | 955bfafd03f95a92c8496004ff52398aa95acb58 | |
| parent | 119dd5335a35c28a2acf65ccaac2a4526d3b9c75 (diff) | |
| download | my-slackbuilds-7bf0929fd4e8204f54d3ae576b3f1c5a2d6ab887.tar.gz my-slackbuilds-7bf0929fd4e8204f54d3ae576b3f1c5a2d6ab887.zip | |
cargo-vendor-filterer: remove, now in -current basemain
Slackware -current ships cargo-vendor-filterer in the system packages,
so this SlackBuild is no longer needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| -rw-r--r-- | .extras/nvchecker.toml | 6 | ||||
| -rw-r--r-- | cargo-vendor-filterer/README | 14 | ||||
| -rw-r--r-- | cargo-vendor-filterer/cargo-mkvendored.sh | 151 | ||||
| -rw-r--r-- | cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild | 132 | ||||
| -rw-r--r-- | cargo-vendor-filterer/cargo-vendor-filterer.info | 12 | ||||
| -rw-r--r-- | cargo-vendor-filterer/slack-desc | 19 |
6 files changed, 0 insertions, 334 deletions
diff --git a/.extras/nvchecker.toml b/.extras/nvchecker.toml index c13be74..c4365f3 100644 --- a/.extras/nvchecker.toml +++ b/.extras/nvchecker.toml @@ -106,9 +106,3 @@ use_max_tag = true [playwright-cli] source = "npm" npm = "@playwright/cli" - -[cargo-vendor-filterer] -source = "github" -github = "coreos/cargo-vendor-filterer" -use_max_tag = true -prefix = "v" diff --git a/cargo-vendor-filterer/README b/cargo-vendor-filterer/README deleted file mode 100644 index db6af5c..0000000 --- a/cargo-vendor-filterer/README +++ /dev/null @@ -1,14 +0,0 @@ -cargo-vendor-filterer (Vendor rust libraries based on filters) - -cargo-vendor-filterer works like "cargo vendor", but supports filters -that allow excluding libraries one isn't interested in, like -libraries only needed on other platforms, etc. - -NOTE: -I've included a "cargo-mkvendored.sh" script to generate filtered -vendored sources for a rust or python/rust slackbuild. It needs to be -run from within a slackbuild directory. - -This is the SlackBuilds.org package; it builds and runs on Slackware --current with the system Rust toolchain (rust-opt is only required on --stable, whose system Rust is too old). diff --git a/cargo-vendor-filterer/cargo-mkvendored.sh b/cargo-vendor-filterer/cargo-mkvendored.sh deleted file mode 100644 index 8ba7aa2..0000000 --- a/cargo-vendor-filterer/cargo-mkvendored.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/bash - -# Create $PRGNAM-vendored-sources-$VERSION-$VSBUILD.tar.xz -# Requires network access, but does not require root privilege. -# Requires that $PRGNAM's REQUIRES need to be installed first (rust-opt) -# and cargo-vendor-filterer installed to include just the linux deps -# -# Expects to be run within a slackbuild dir with the source archive -# already downloaded. -# -# Variables to use in your SlackBuild: -# VSBUILD # same use as BUILD but for vendored sources -# VSDIR=/sub/dir/ # (optional) alternate location in src for vendor dir -# -# Vendors sources for the following targets -# i686-unknown-linux-gnu -# x86_64-unknown-linux-gnu -# arm-unknown-linux-gnueabihf -# aarch64-unknown-linux-gnu - -SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}" - -INFO="$( echo *.info )" -if [ ! -e "$INFO" ]; then - echo "No (or multiple) .info file in current dir" 1>&2 - exit 1 -fi - -SBUILD="$( echo *.SlackBuild )" -if [ ! -e "$SBUILD" ]; then - echo "No (or multiple) .SlackBuild file in current dir" 1>&2 - exit 1 -fi - -CWD=$(pwd) -source ./$INFO - -INFOERR="variable not set, are you sure you have a valid *.info file?" -echo ${PRGNAM:?$INFOERR} -echo VERSION=${VERSION:?$INFOERR} - -set -e -WORKDIR=$( mktemp -d ) -cd $WORKDIR - -# don't depend on user's ~/.cargo -mkdir -p cargohome -export CARGO_HOME=$(pwd)/cargohome - -egrep "^BUILD=|^VSBUILD=|^VSDIR=|^SRCNAM=" $CWD/$SBUILD > sbvars -source ./sbvars - -# if no SRCNAM in slackbuild set to PRGNAM -SRCNAM=${SRCNAM:-$PRGNAM} - -tar xvf $CWD/$SRCNAM-$VERSION.tar.?z -cd $SRCNAM-$VERSION/$VSDIR || exit 1 - -if [ ! -e "Cargo.toml" ]; then - echo "No Cargo.toml file in $SRCNAM-$VERSION dir" 1>&2 - exit 1 -elif [ -e "$CWD/Cargo-toml.patch" ]; then - echo "INFO: Applying Cargo.toml patch" - patch -Np1 < $CWD/Cargo-toml.patch -elif [ -e "$CWD/no-git-patch-builds.patch" ]; then - echo "INFO: Applying no-git-patch-builds.patch patch" - patch -Np1 < $CWD/no-git-patch-builds.patch -fi - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i686 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -elif [ "$ARCH" = "aarch64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -# check if rust-opt is installed -if [ ! -d /opt/rust/bin ]; then - echo "ERROR: The rust-opt slackbuild is required to be installed" - exit 1 -else - export PATH="/opt/rust/bin:$PATH" - if [ -z "$LD_LIBRARY_PATH" ]; then - export LD_LIBRARY_PATH="/opt/rust/lib$LIBDIRSUFFIX" - else - export LD_LIBRARY_PATH="/opt/rust/lib$LIBDIRSUFFIX:$LD_LIBRARY_PATH" - fi -fi - -# Configure cargo-vendor-filterer -if [ "$(grep -c "^\[package\]$" Cargo.toml)" -eq 1 ]; then - echo "This is a normal cargo package." - SRCTYPE="package" -elif [ "$(grep -c "^\[workspace\]$" Cargo.toml)" -eq 1 ]; then - echo "This is a cargo workspace." - SRCTYPE="workspace" -else - echo "Cargo.toml does not contain [package] or [workspace], exiting." - exit 1 -fi - - cat << EOF >> Cargo.toml -[$SRCTYPE.metadata.vendor-filter] -platforms = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabihf"] -all-features = true -EOF - -if [ -f /usr/bin/cargo-vendor-filterer ]; then - echo "INFO: Creating filtered vendor libs tarball..." - /usr/bin/cargo-vendor-filterer | tee $WORKDIR/tmpconfig.toml -else - echo "WARNING: Creating unfiltered vendor libs tarball!" - cargo vendor | tee $WORKDIR/tmpconfig.toml -fi - -# build would fail if the .a files were removed -#find vendor -type f -a -name \*.a -print0 | xargs -0 rm -f - -# add vendored-sources section generated by cargo-vendor-filterer -mkdir -p .cargo -cat $WORKDIR/tmpconfig.toml >> .cargo/config.toml -cd - - -cd $WORKDIR -echo "Creating vendored tar file..." -tar --totals --checkpoint=100 --checkpoint-action=dot \ - --sort=name --mtime="@0" --owner=0 --group=0 --numeric-owner \ - --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ - -cJf $CWD/$SRCNAM-vendored-sources-$VERSION-$VSBUILD.tar.xz \ - $SRCNAM-$VERSION/$VSDIR/{vendor,.cargo} -md5sum $CWD/$SRCNAM-vendored-sources-$VERSION-$VSBUILD.tar.xz -cd $CWD -rm -rf $WORKDIR diff --git a/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild b/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild deleted file mode 100644 index fd4349b..0000000 --- a/cargo-vendor-filterer/cargo-vendor-filterer.SlackBuild +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/bash - -# Copyright 2023-2025 fourtysixandtwo <fourtysixandtwo@sliderr.net> -# Copyright 2022 Patrick J. Volkerding, Sebeka, MN, USA -# Copyright 2022 Heinz Wiesinger, Amsterdam, The Netherlands -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# 20230925 46and2: Bump build, changes to mkvendored script. -# 20230927 46and2: 32-bit fix thanks to Eugene Carlson. Min ARCH=i686. -# 20240102 46and2: modify to use VSBUILD instead of BUILD for vendored sources -# above requested by Andrew Clemons to avoid CI issues -# -also added VSDIR option to included script, see cargo-mkvendored.sh -# 20240213 46and2: Fix FTB on arm - -cd $(dirname $0) ; CWD=$(pwd) - -PRGNAM=cargo-vendor-filterer -VERSION=${VERSION:-0.5.18} -BUILD=${BUILD:-3} -TAG=${TAG:-_SBo} -PKGTYPE=${PKGTYPE:-tgz} -VSBUILD=${VSBUILD:-1} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i686 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" - exit 0 -fi - -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -elif [ "$ARCH" = "aarch64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -if [ "$ARCH" = "arm" ]; then - TRIPLET="$ARCH-unknown-linux-gnueabihf" -else - TRIPLET="$ARCH-unknown-linux-gnu" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.?z -tar xvf $CWD/$PRGNAM-vendored-sources-$VERSION-$VSBUILD.tar.?z -cd $PRGNAM-$VERSION - -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \+ -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ - -export PATH="/opt/rust/bin:$PATH" -if [ -z "$LD_LIBRARY_PATH" ]; then - export LD_LIBRARY_PATH="/opt/rust/lib$LIBDIRSUFFIX" -else - export LD_LIBRARY_PATH="/opt/rust/lib$LIBDIRSUFFIX:$LD_LIBRARY_PATH" -fi - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -OPENSSL_NO_VENDOR=1 \ -cargo build \ - --offline \ - --release \ - --target $TRIPLET - -mkdir -p $PKG/usr/bin -install -m 755 target/$TRIPLET/release/cargo-vendor-filterer \ - $PKG/usr/bin/ - -# add script to generate filtered vendor sources -install -m 755 $CWD/cargo-mkvendored.sh $PKG/usr/bin/ - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a *.md LICENSE \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/cargo-vendor-filterer/cargo-vendor-filterer.info b/cargo-vendor-filterer/cargo-vendor-filterer.info deleted file mode 100644 index e3f294f..0000000 --- a/cargo-vendor-filterer/cargo-vendor-filterer.info +++ /dev/null @@ -1,12 +0,0 @@ -PRGNAM="cargo-vendor-filterer" -VERSION="0.5.18" -HOMEPAGE="https://github.com/coreos/cargo-vendor-filterer" -DOWNLOAD="https://github.com/coreos/cargo-vendor-filterer/archive/v0.5.18/cargo-vendor-filterer-0.5.18.tar.gz \ - https://slackware.uk/~fourtysixandtwo/src/cargo-vendor-filterer-vendored-sources-0.5.18-1.tar.xz" -MD5SUM="fa5e8e4c56ba81b12adf70bcb984e855 \ - 85e04b08ba9625051f98c1967beccdc7" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="rust-opt" -MAINTAINER="fourtysixandtwo" -EMAIL="fourtysixandtwo@sliderr.net" diff --git a/cargo-vendor-filterer/slack-desc b/cargo-vendor-filterer/slack-desc deleted file mode 100644 index 1c8d67c..0000000 --- a/cargo-vendor-filterer/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -cargo-vendor-filterer: cargo-vendor-filterer (Vendor rust libraries based on filters) -cargo-vendor-filterer: -cargo-vendor-filterer: cargo-vendor-filterer works like "cargo vendor", but supports filters -cargo-vendor-filterer: that allow excluding libraries one isn't interested in, like -cargo-vendor-filterer: libraries only needed on other platforms, etc. -cargo-vendor-filterer: -cargo-vendor-filterer: Homepage: https://github.com/coreos/cargo-vendor-filterer -cargo-vendor-filterer: -cargo-vendor-filterer: -cargo-vendor-filterer: -cargo-vendor-filterer: |
