From 611efe552369aad9206476e8abfe85c9e1d9b1db Mon Sep 17 00:00:00 2001 From: Osama Esmail Date: Tue, 11 Feb 2025 18:38:12 -0800 Subject: [PATCH] rebasing package updates in a different commit --- .../ripgrep/generate_source_tarball.sh | 151 ++++++++++++++++++ SPECS-EXTENDED/ripgrep/ripgrep.spec | 5 +- .../rust-cbindgen/generate_source_tarball.sh | 151 ++++++++++++++++++ .../rust-cbindgen/rust-cbindgen.spec | 7 +- SPECS/flux/flux.spec | 7 +- SPECS/flux/generate_source_tarball.sh | 78 ++++++--- SPECS/virtiofsd/generate_source_tarball.sh | 151 ++++++++++++++++++ SPECS/virtiofsd/virtiofsd.spec | 12 +- 8 files changed, 537 insertions(+), 25 deletions(-) create mode 100755 SPECS-EXTENDED/ripgrep/generate_source_tarball.sh create mode 100755 SPECS-EXTENDED/rust-cbindgen/generate_source_tarball.sh create mode 100755 SPECS/virtiofsd/generate_source_tarball.sh diff --git a/SPECS-EXTENDED/ripgrep/generate_source_tarball.sh b/SPECS-EXTENDED/ripgrep/generate_source_tarball.sh new file mode 100755 index 00000000000..2c745954d4c --- /dev/null +++ b/SPECS-EXTENDED/ripgrep/generate_source_tarball.sh @@ -0,0 +1,151 @@ +#!/bin/bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +# Quit on failure +set -e + +PKG_VERSION="" +SRC_TARBALL="" +OUT_FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +VENDOR_VERSION="1" + +# parameters: +# +# --srcTarball : src tarball file +# this file contains the 'initial' source code of the component +# and should be replaced with the new/modified src code +# --outFolder : folder where to copy the new tarball(s) +# --pkgVersion : package version +# --vendorVersion : vendor version + +PARAMS="" +while (( "$#" )); do + case "$1" in + --srcTarball) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + SRC_TARBALL=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --outFolder) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + OUT_FOLDER=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --pkgVersion) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + PKG_VERSION=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --vendorVersion) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + VENDOR_VERSION=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + -*|--*=) # unsupported flags + echo "Error: Unsupported flag $1" >&2 + exit 1 + ;; + *) # preserve positional arguments + PARAMS="$PARAMS $1" + shift + ;; + esac +done + +echo "--srcTarball -> $SRC_TARBALL" +echo "--outFolder -> $OUT_FOLDER" +echo "--pkgVersion -> $PKG_VERSION" +echo "--vendorVersion -> $VENDOR_VERSION" + +if [ -z "$PKG_VERSION" ]; then + echo "--pkgVersion parameter cannot be empty" + exit 1 +fi + +if [ -z "$VENDOR_VERSION" ]; then + echo "--vendorVersion parameter cannot be empty" + exit 1 +fi + +echo "-- create temp folder" +TEMP_DIR=$(mktemp -d) +function cleanup { + echo "+++ cleanup -> remove $TEMP_DIR" + rm -rf $TEMP_DIR +} +trap cleanup EXIT + +pushd $TEMP_DIR > /dev/null + +TARBALL_NAME=$(basename "$SRC_TARBALL") + +NAME_VER=${TARBALL_NAME%.*} +if [[ "$NAME_VER" =~ \.tar$ ]] +then + NAME_VER=${NAME_VER%.*} +fi + +VENDOR_TARBALL="$NAME_VER-cargovendor-v$VENDOR_VERSION.tar.gz" + +if [[ -f "$TARBALL_NAME" ]] +then + cp "$SRC_TARBALL" "$TEMP_DIR" +else + echo "Tarball '$TARBALL_NAME' doesn't exist. Will attempt to download from blobstorage." + if ! wget -q "https://azurelinuxsrcstorage.blob.core.windows.net/sources/core/$TARBALL_NAME" -O "$TEMP_DIR/$TARBALL_NAME" + then + echo "ERROR: failed to download the source tarball." + exit 1 + fi + echo "Download successful." +fi + +echo "Unpacking source tarball..." +tar -xf $SRC_TARBALL + +echo "Vendor cargo ..." +DIRECTORY_NAME=($(ls -d */)) + +# assume there is only one directory in the tarball +DIRECTORY_NAME=${DIRECTORY_NAME[0]%//} + +pushd "$DIRECTORY_NAME" &> /dev/null +echo "Fetching dependencies to a temporary cache in $DIRECTORY_NAME." + +#TODO: installing rust as auto-patcher does not have it installed by default. Possibly remove if auto-patcher will be changed to have rust included. +sudo dnf install -y rust || sudo apt install -y rustc + +# assume there is only one Cargo.toml +TOML_LOCATION=$(find . -maxdepth 2 -name "Cargo.toml" -exec dirname {} \;) +pushd $TOML_LOCATION &> /dev/null +cargo vendor > config.toml + +echo "" +echo "=========================" +echo "Tar vendored tarball" +tar --sort=name \ + --mtime="2021-04-26 00:00Z" \ + --owner=0 --group=0 --numeric-owner \ + --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ + -I pigz -cf "$VENDOR_TARBALL" vendor + +cp $VENDOR_TARBALL $OUT_FOLDER +popd > /dev/null +echo "$NAME_VER vendored modules are available at $VENDOR_TARBALL" diff --git a/SPECS-EXTENDED/ripgrep/ripgrep.spec b/SPECS-EXTENDED/ripgrep/ripgrep.spec index 544c2c754f8..ac6985354d8 100644 --- a/SPECS-EXTENDED/ripgrep/ripgrep.spec +++ b/SPECS-EXTENDED/ripgrep/ripgrep.spec @@ -28,7 +28,7 @@ Distribution: Azure Linux Group: Productivity/Text/Utilities URL: https://github.com/BurntSushi/ripgrep Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -Source1: %{name}-%{version}-vendor.tar.xz +Source1: %{name}-%{version}-cargovendor-v1.tar.gz Source2: cargo_config BuildRequires: cargo BuildRequires: rust >= 1.31 @@ -104,6 +104,9 @@ install -Dm 644 complete/_rg %{buildroot}%{_datadir}/zsh/site-functions/_rg %{_datadir}/zsh %changelog +* Tue Feb 11 2025 Osama Esmail - 13.0.0-6 +- Adding the vendor script and tarball name + * Thu Sep 07 2023 Daniel McIlvaney - 13.0.0-5 - Bump package to rebuild with rust 1.72.0 diff --git a/SPECS-EXTENDED/rust-cbindgen/generate_source_tarball.sh b/SPECS-EXTENDED/rust-cbindgen/generate_source_tarball.sh new file mode 100755 index 00000000000..2c745954d4c --- /dev/null +++ b/SPECS-EXTENDED/rust-cbindgen/generate_source_tarball.sh @@ -0,0 +1,151 @@ +#!/bin/bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +# Quit on failure +set -e + +PKG_VERSION="" +SRC_TARBALL="" +OUT_FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +VENDOR_VERSION="1" + +# parameters: +# +# --srcTarball : src tarball file +# this file contains the 'initial' source code of the component +# and should be replaced with the new/modified src code +# --outFolder : folder where to copy the new tarball(s) +# --pkgVersion : package version +# --vendorVersion : vendor version + +PARAMS="" +while (( "$#" )); do + case "$1" in + --srcTarball) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + SRC_TARBALL=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --outFolder) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + OUT_FOLDER=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --pkgVersion) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + PKG_VERSION=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --vendorVersion) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + VENDOR_VERSION=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + -*|--*=) # unsupported flags + echo "Error: Unsupported flag $1" >&2 + exit 1 + ;; + *) # preserve positional arguments + PARAMS="$PARAMS $1" + shift + ;; + esac +done + +echo "--srcTarball -> $SRC_TARBALL" +echo "--outFolder -> $OUT_FOLDER" +echo "--pkgVersion -> $PKG_VERSION" +echo "--vendorVersion -> $VENDOR_VERSION" + +if [ -z "$PKG_VERSION" ]; then + echo "--pkgVersion parameter cannot be empty" + exit 1 +fi + +if [ -z "$VENDOR_VERSION" ]; then + echo "--vendorVersion parameter cannot be empty" + exit 1 +fi + +echo "-- create temp folder" +TEMP_DIR=$(mktemp -d) +function cleanup { + echo "+++ cleanup -> remove $TEMP_DIR" + rm -rf $TEMP_DIR +} +trap cleanup EXIT + +pushd $TEMP_DIR > /dev/null + +TARBALL_NAME=$(basename "$SRC_TARBALL") + +NAME_VER=${TARBALL_NAME%.*} +if [[ "$NAME_VER" =~ \.tar$ ]] +then + NAME_VER=${NAME_VER%.*} +fi + +VENDOR_TARBALL="$NAME_VER-cargovendor-v$VENDOR_VERSION.tar.gz" + +if [[ -f "$TARBALL_NAME" ]] +then + cp "$SRC_TARBALL" "$TEMP_DIR" +else + echo "Tarball '$TARBALL_NAME' doesn't exist. Will attempt to download from blobstorage." + if ! wget -q "https://azurelinuxsrcstorage.blob.core.windows.net/sources/core/$TARBALL_NAME" -O "$TEMP_DIR/$TARBALL_NAME" + then + echo "ERROR: failed to download the source tarball." + exit 1 + fi + echo "Download successful." +fi + +echo "Unpacking source tarball..." +tar -xf $SRC_TARBALL + +echo "Vendor cargo ..." +DIRECTORY_NAME=($(ls -d */)) + +# assume there is only one directory in the tarball +DIRECTORY_NAME=${DIRECTORY_NAME[0]%//} + +pushd "$DIRECTORY_NAME" &> /dev/null +echo "Fetching dependencies to a temporary cache in $DIRECTORY_NAME." + +#TODO: installing rust as auto-patcher does not have it installed by default. Possibly remove if auto-patcher will be changed to have rust included. +sudo dnf install -y rust || sudo apt install -y rustc + +# assume there is only one Cargo.toml +TOML_LOCATION=$(find . -maxdepth 2 -name "Cargo.toml" -exec dirname {} \;) +pushd $TOML_LOCATION &> /dev/null +cargo vendor > config.toml + +echo "" +echo "=========================" +echo "Tar vendored tarball" +tar --sort=name \ + --mtime="2021-04-26 00:00Z" \ + --owner=0 --group=0 --numeric-owner \ + --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ + -I pigz -cf "$VENDOR_TARBALL" vendor + +cp $VENDOR_TARBALL $OUT_FOLDER +popd > /dev/null +echo "$NAME_VER vendored modules are available at $VENDOR_TARBALL" diff --git a/SPECS-EXTENDED/rust-cbindgen/rust-cbindgen.spec b/SPECS-EXTENDED/rust-cbindgen/rust-cbindgen.spec index a896e1191f3..92f4ccfff46 100644 --- a/SPECS-EXTENDED/rust-cbindgen/rust-cbindgen.spec +++ b/SPECS-EXTENDED/rust-cbindgen/rust-cbindgen.spec @@ -2,7 +2,7 @@ Summary: Tool for generating C bindings to Rust code Name: rust-cbindgen Version: 0.24.3 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Vendor: Microsoft Corporation Distribution: Azure Linux @@ -15,7 +15,7 @@ Source: %{url}/archive/refs/tags/v0.24.3.tar.gz#/%{name}-%{version}.tar. # cargo vendor > config.toml # tar -czf %{name}-%{version}-cargo.tar.gz vendor/ # -Source1: cbindgen-%{version}-cargo.tar.gz +Source1: %{name}-%{version}-cargovendor-v1.tar.gz Source2: cargo_config %global rustflags '-Clink-arg=-Wl,-z,relro,-z,now' %global _description %{expand: @@ -96,6 +96,9 @@ RUSTFLAGS=%{rustflags} cargo test --release %endif %changelog +* Tue Feb 11 2025 Osama Esmail - 0.24.3-2 +- Adding the vendor script and tarball name + * Mon Sep 25 2023 Shweta Bindal - 0.24.3-1 - Initial CBL-Mariner import from Fedora 38 (license: MIT). - License verified diff --git a/SPECS/flux/flux.spec b/SPECS/flux/flux.spec index 460e6e3cefa..0485923cc7d 100644 --- a/SPECS/flux/flux.spec +++ b/SPECS/flux/flux.spec @@ -22,7 +22,7 @@ Summary: Influx data language Name: flux Version: 0.194.5 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Vendor: Microsoft Corporation Distribution: Azure Linux @@ -37,7 +37,7 @@ Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}. # cargo vendor > config.toml # tar -czf %{name}-%{version}-cargo.tar.gz vendor/ # -Source1: %{name}-%{version}-cargo.tar.gz +Source1: %{name}-%{version}-cargovendor-v1.tar.gz Source2: cargo_config Patch1: disable-static-library.patch Patch2: 0001-libflux-unblock-build-by-allowing-warnings.patch @@ -139,6 +139,9 @@ RUSTFLAGS=%{rustflags} cargo test --release %{_includedir}/influxdata/flux.h %changelog +* Tue Feb 11 2025 Osama Esmail - 0.194.5-2 +- Updating the vendor script and tarball name + * Thu Feb 01 2024 Mykhailo Bykhovtsev - 0.194.5-1 - Upgrade to version 0.194.5 diff --git a/SPECS/flux/generate_source_tarball.sh b/SPECS/flux/generate_source_tarball.sh index 7b489aee0a7..2c745954d4c 100755 --- a/SPECS/flux/generate_source_tarball.sh +++ b/SPECS/flux/generate_source_tarball.sh @@ -8,6 +8,7 @@ set -e PKG_VERSION="" SRC_TARBALL="" OUT_FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +VENDOR_VERSION="1" # parameters: # @@ -16,7 +17,8 @@ OUT_FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # and should be replaced with the new/modified src code # --outFolder : folder where to copy the new tarball(s) # --pkgVersion : package version -# +# --vendorVersion : vendor version + PARAMS="" while (( "$#" )); do case "$1" in @@ -47,6 +49,15 @@ while (( "$#" )); do exit 1 fi ;; + --vendorVersion) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + VENDOR_VERSION=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; -*|--*=) # unsupported flags echo "Error: Unsupported flag $1" >&2 exit 1 @@ -58,42 +69,72 @@ while (( "$#" )); do esac done -echo "--srcTarball -> $SRC_TARBALL" -echo "--outFolder -> $OUT_FOLDER" -echo "--pkgVersion -> $PKG_VERSION" +echo "--srcTarball -> $SRC_TARBALL" +echo "--outFolder -> $OUT_FOLDER" +echo "--pkgVersion -> $PKG_VERSION" +echo "--vendorVersion -> $VENDOR_VERSION" if [ -z "$PKG_VERSION" ]; then echo "--pkgVersion parameter cannot be empty" exit 1 fi +if [ -z "$VENDOR_VERSION" ]; then + echo "--vendorVersion parameter cannot be empty" + exit 1 +fi + echo "-- create temp folder" -tmpdir=$(mktemp -d) +TEMP_DIR=$(mktemp -d) function cleanup { - echo "+++ cleanup -> remove $tmpdir" - rm -rf $tmpdir + echo "+++ cleanup -> remove $TEMP_DIR" + rm -rf $TEMP_DIR } trap cleanup EXIT -TARBALL_FOLDER="$tmpdir/tarballFolder" -mkdir -p $TARBALL_FOLDER -cp $SRC_TARBALL $tmpdir +pushd $TEMP_DIR > /dev/null -pushd $tmpdir > /dev/null +TARBALL_NAME=$(basename "$SRC_TARBALL") -PKG_NAME="flux" -NAME_VER="$PKG_NAME-$PKG_VERSION" -VENDOR_TARBALL="$OUT_FOLDER/$NAME_VER-cargo.tar.gz" +NAME_VER=${TARBALL_NAME%.*} +if [[ "$NAME_VER" =~ \.tar$ ]] +then + NAME_VER=${NAME_VER%.*} +fi + +VENDOR_TARBALL="$NAME_VER-cargovendor-v$VENDOR_VERSION.tar.gz" + +if [[ -f "$TARBALL_NAME" ]] +then + cp "$SRC_TARBALL" "$TEMP_DIR" +else + echo "Tarball '$TARBALL_NAME' doesn't exist. Will attempt to download from blobstorage." + if ! wget -q "https://azurelinuxsrcstorage.blob.core.windows.net/sources/core/$TARBALL_NAME" -O "$TEMP_DIR/$TARBALL_NAME" + then + echo "ERROR: failed to download the source tarball." + exit 1 + fi + echo "Download successful." +fi echo "Unpacking source tarball..." tar -xf $SRC_TARBALL echo "Vendor cargo ..." -cd $NAME_VER/libflux +DIRECTORY_NAME=($(ls -d */)) + +# assume there is only one directory in the tarball +DIRECTORY_NAME=${DIRECTORY_NAME[0]%//} + +pushd "$DIRECTORY_NAME" &> /dev/null +echo "Fetching dependencies to a temporary cache in $DIRECTORY_NAME." #TODO: installing rust as auto-patcher does not have it installed by default. Possibly remove if auto-patcher will be changed to have rust included. -sudo apt install -y rustc +sudo dnf install -y rust || sudo apt install -y rustc +# assume there is only one Cargo.toml +TOML_LOCATION=$(find . -maxdepth 2 -name "Cargo.toml" -exec dirname {} \;) +pushd $TOML_LOCATION &> /dev/null cargo vendor > config.toml echo "" @@ -103,7 +144,8 @@ tar --sort=name \ --mtime="2021-04-26 00:00Z" \ --owner=0 --group=0 --numeric-owner \ --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ - -cf "$VENDOR_TARBALL" vendor + -I pigz -cf "$VENDOR_TARBALL" vendor +cp $VENDOR_TARBALL $OUT_FOLDER popd > /dev/null -echo "$PKG_NAME vendored modules are available at $VENDOR_TARBALL and static assets in $STATIC_ASSETS_TARBALL" +echo "$NAME_VER vendored modules are available at $VENDOR_TARBALL" diff --git a/SPECS/virtiofsd/generate_source_tarball.sh b/SPECS/virtiofsd/generate_source_tarball.sh new file mode 100755 index 00000000000..2c745954d4c --- /dev/null +++ b/SPECS/virtiofsd/generate_source_tarball.sh @@ -0,0 +1,151 @@ +#!/bin/bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +# Quit on failure +set -e + +PKG_VERSION="" +SRC_TARBALL="" +OUT_FOLDER="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +VENDOR_VERSION="1" + +# parameters: +# +# --srcTarball : src tarball file +# this file contains the 'initial' source code of the component +# and should be replaced with the new/modified src code +# --outFolder : folder where to copy the new tarball(s) +# --pkgVersion : package version +# --vendorVersion : vendor version + +PARAMS="" +while (( "$#" )); do + case "$1" in + --srcTarball) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + SRC_TARBALL=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --outFolder) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + OUT_FOLDER=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --pkgVersion) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + PKG_VERSION=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + --vendorVersion) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + VENDOR_VERSION=$2 + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; + -*|--*=) # unsupported flags + echo "Error: Unsupported flag $1" >&2 + exit 1 + ;; + *) # preserve positional arguments + PARAMS="$PARAMS $1" + shift + ;; + esac +done + +echo "--srcTarball -> $SRC_TARBALL" +echo "--outFolder -> $OUT_FOLDER" +echo "--pkgVersion -> $PKG_VERSION" +echo "--vendorVersion -> $VENDOR_VERSION" + +if [ -z "$PKG_VERSION" ]; then + echo "--pkgVersion parameter cannot be empty" + exit 1 +fi + +if [ -z "$VENDOR_VERSION" ]; then + echo "--vendorVersion parameter cannot be empty" + exit 1 +fi + +echo "-- create temp folder" +TEMP_DIR=$(mktemp -d) +function cleanup { + echo "+++ cleanup -> remove $TEMP_DIR" + rm -rf $TEMP_DIR +} +trap cleanup EXIT + +pushd $TEMP_DIR > /dev/null + +TARBALL_NAME=$(basename "$SRC_TARBALL") + +NAME_VER=${TARBALL_NAME%.*} +if [[ "$NAME_VER" =~ \.tar$ ]] +then + NAME_VER=${NAME_VER%.*} +fi + +VENDOR_TARBALL="$NAME_VER-cargovendor-v$VENDOR_VERSION.tar.gz" + +if [[ -f "$TARBALL_NAME" ]] +then + cp "$SRC_TARBALL" "$TEMP_DIR" +else + echo "Tarball '$TARBALL_NAME' doesn't exist. Will attempt to download from blobstorage." + if ! wget -q "https://azurelinuxsrcstorage.blob.core.windows.net/sources/core/$TARBALL_NAME" -O "$TEMP_DIR/$TARBALL_NAME" + then + echo "ERROR: failed to download the source tarball." + exit 1 + fi + echo "Download successful." +fi + +echo "Unpacking source tarball..." +tar -xf $SRC_TARBALL + +echo "Vendor cargo ..." +DIRECTORY_NAME=($(ls -d */)) + +# assume there is only one directory in the tarball +DIRECTORY_NAME=${DIRECTORY_NAME[0]%//} + +pushd "$DIRECTORY_NAME" &> /dev/null +echo "Fetching dependencies to a temporary cache in $DIRECTORY_NAME." + +#TODO: installing rust as auto-patcher does not have it installed by default. Possibly remove if auto-patcher will be changed to have rust included. +sudo dnf install -y rust || sudo apt install -y rustc + +# assume there is only one Cargo.toml +TOML_LOCATION=$(find . -maxdepth 2 -name "Cargo.toml" -exec dirname {} \;) +pushd $TOML_LOCATION &> /dev/null +cargo vendor > config.toml + +echo "" +echo "=========================" +echo "Tar vendored tarball" +tar --sort=name \ + --mtime="2021-04-26 00:00Z" \ + --owner=0 --group=0 --numeric-owner \ + --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \ + -I pigz -cf "$VENDOR_TARBALL" vendor + +cp $VENDOR_TARBALL $OUT_FOLDER +popd > /dev/null +echo "$NAME_VER vendored modules are available at $VENDOR_TARBALL" diff --git a/SPECS/virtiofsd/virtiofsd.spec b/SPECS/virtiofsd/virtiofsd.spec index 57879404efc..ea712ecc25b 100644 --- a/SPECS/virtiofsd/virtiofsd.spec +++ b/SPECS/virtiofsd/virtiofsd.spec @@ -22,7 +22,7 @@ Name: virtiofsd # Version to be kept in sync with the `asset.virtiofsd.version` field from # https://github.com/microsoft/kata-containers/blob/msft-main/versions.yaml Version: 1.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: vhost-user virtio-fs device backend written in Rust Group: Development/Libraries/Rust License: Apache-2.0 @@ -37,7 +37,7 @@ Source0: https://gitlab.com/virtio-fs/virtiofsd/-/archive/v%{version}/%{n # cargo vendor # tar -cf %{name}-%{version}-vendor.tar.gz vendor/ # -Source1: %{name}-%{version}-vendor.tar.gz +Source1: %{name}-%{version}-cargovendor-v1.tar.gz Source2: cargo_config BuildRequires: cargo BuildRequires: rust @@ -73,11 +73,15 @@ cargo test --release %{_datadir}/qemu/vhost-user/50-qemu-virtiofsd.json %changelog +* Tue Feb 11 2025 Osama Esmail - 1.8.0-2 +- Adding the vendor script and tarball name + * Wed Feb 07 2024 Kanika Nema - 1.8.0-1 - Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag) - License verified - Remove build dependencies on cargo-packaging - Include vendored sources tarball + * Tue Jan 30 2024 caleb.crane@suse.com - Fix CVE-2023-50711: vmm-sys-util: out of bounds memory accesses (bsc#1218502, bsc#1218500) - Update to version 1.10.1: @@ -89,6 +93,7 @@ cargo test --release * Bump version to v1.9.0 - Spec: switch to using the upstream virtio-fs config file for qemu - Spec: switch back to greedy cargo updates of vendored dependencies + * Thu Aug 31 2023 Caleb Crane - Update to upstream version v1.7.2 (jsc#4980) - Add supplementary group extension support @@ -98,12 +103,15 @@ cargo test --release - Allow to provide the same argument multiple times - Add the -V/--version options - Upgrade vendored dependencies + * Fri Jun 2 2023 Caleb Crane - Add qemu config file to ensure qemu is aware of the virtiofsd executable - https://www.reddit.com/r/suse/comments/13xmote/vm_with_virtiofs_does_not_start_unable_to_find_a/ + * Thu May 25 2023 Caleb Crane - Remove exclusive arch, only disable for 32-bit archs (i586 and armv7l) - Add package conflict with the previous implementation of virtiofsd inside older versions of the qemu-tools package (qemu-tools < 8) + * Tue May 23 2023 Caleb Crane - Initial release of virtiofsd v1.6.1