commit b22eb0e9e86e54170d85d0d0acd806ad970cd923bf3fc5f7a6f0876b7542e830 Author: Adrian Schröter Date: Fri May 3 11:30:45 2024 +0200 Sync from SUSE:SLFO:Main cargo-c revision bc8763a912aa1202c4cde36d049d2c50 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/README.suse-maint b/README.suse-maint new file mode 100644 index 0000000..b4535ea --- /dev/null +++ b/README.suse-maint @@ -0,0 +1,25 @@ +# How to update the cargo-c package + +## Prerequisites: +You need the download_files and cargo_vendor obs services installed: + zypper in obs-service-download_files obs-service-cargo_vendor + +## Updating to a new version from upstream + +Edit the spec file and update the version variable. + +Download the new source file by running: + osc service ra download_files + +Uncompress the cargo-c-%{version}.tar.gz file: + tar xvfz cargo-c-%{version}.tar.gz + +This will create a cargo-c-%{version} directory + +Edit the _service file and set the srcdir param +to the extracted directory. + +Run the cargo_vendor service with: + osc service disabledrun + +Update the changelog file with the upstream release notes. diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..a275540 --- /dev/null +++ b/_constraints @@ -0,0 +1,8 @@ + + + + + 10 + + + diff --git a/_service b/_service new file mode 100644 index 0000000..4b645f6 --- /dev/null +++ b/_service @@ -0,0 +1,26 @@ + + + https://github.com/lu-zero/cargo-c.git + @PARENT_TAG@~git@TAG_OFFSET@.%h + git + v0.9.27 + * + v(\d+\.\d+\.\d+) + \1 + enable + + + + *.tar + xz + + + + cargo-c + xz + true + + + cargo-c + + diff --git a/cargo-c-0.9.27~git0.54774e0.tar.xz b/cargo-c-0.9.27~git0.54774e0.tar.xz new file mode 100644 index 0000000..c1ed3de --- /dev/null +++ b/cargo-c-0.9.27~git0.54774e0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a862cc9c8ce1d286bc98b0e142e1db0a648942c2c0e8e1bd5295d84b67691a4b +size 26136 diff --git a/cargo-c.changes b/cargo-c.changes new file mode 100644 index 0000000..4e5e25e --- /dev/null +++ b/cargo-c.changes @@ -0,0 +1,221 @@ +------------------------------------------------------------------- +Tue Oct 17 10:43:31 UTC 2023 - bjorn.lie@gmail.com + +- Update to version 0.9.27~git0.54774e0: + * Complete the soversion granularity + * Bump cbindgen + * Make sure the version variables are consistent + * Fix sover detection for 0-based versioning + * Bump cargo version + * Bump cbindgen + * Do not pass the token to clippy-check +- Switch _service to manual. + +------------------------------------------------------------------- +Tue Mar 14 09:29:01 UTC 2023 - Dirk Müller + +- add constraints to avoid out of disk space errors + +------------------------------------------------------------------- +Mon Jan 02 15:45:48 UTC 2023 - asn@cryptomilk.org + +- Update to version 0.9.15~git0.2d3044b: + * Prepare for release + * Update to cargo-0.67 and clap-4 + * macos: Allow larger install_name entries + * Fix the new clippy lints + * Don't include version in soname ELF header if versioning is disabled + * Use get_many instead of values_of_lossy + * Use macos-12 for the macos runner + * Add job deps + * Generate paths relative to ${prefix} in the pkg-config file even if --libdir or --includedir are given + * Compact the main CI + * Fix more warnings in the main CI + * Use a custom release profile to strip binaries + * ci(deploy): Use musl abi for aarch64 linux binary, add i686 linux + * Remove msys2 test + * Update the example-project CI + * Make sure the supported rustc version is evident + * Use the default compiler to build a static binary for musl + * Save all the linux binaries + * Prepare for release + * Add pre-built ppc64le and aarch64 linux binaries + * Simplify the deploy script + * Fix new clippy lints + * Update to cargo-0.66 + * Use dtolnay/rust-toolchain + * Remove actions-rs/cargo + * Prepare for release + * add support for illumos + * Bump cargo version + * Prepare for release + * Bump cargo to 0.64 + * Install the windows DLL in the libdir if it is custom + * Fix typo on readme + * Bump the codecov action + * Add sonames on musl + +------------------------------------------------------------------- +Mon Jul 04 07:41:55 UTC 2022 - asn@cryptomilk.org + +- Update to version 0.9.11~git0.41f5562: + * Prepare for release + * Fix clippy warnings + * Versions bump + * Add back the deps.rs badge + * Increase the regex requirement + * Prepare for release + * Bump cargo + * Add support for Haiku Operating System + * Add udbserver to users + * Extend the coverage further + * Fix the code coverage script + * Fix subcommand fallback support + * Print the issued commands + * Fix testing cross compilation + * Bump cargo-metadata + * Bump cbindgen + * Support rustc-1.60 and following + * Update to clap-3.1 and cargo-0.61 + * Prepare for release + * Do not use the patch version in macOS -install_name + * Add Android to the build targets supported by LibType + * Make nightly clippy happy + * Simplify a writln + * Prepare for release + * Bump cargo version + * Remove newlines from the description + * Make the default destdir None + * CI: use MSYS2 cargo package for example project + * Print the PKG_CONFIG_PATH in verbose mode + +------------------------------------------------------------------- +Wed Mar 2 04:12:51 UTC 2022 - William Brown + +- Update vendored libraries to resolve security issues. + +------------------------------------------------------------------- +Mon Jan 10 10:12:10 UTC 2022 - asn@cryptomilk.org + +- Update to version 0.9.6~git0.68e65ad: + * Prepare for release + * Bump cargo + * Support custom paths for data files as it is available for includes + * Fix the datadir description + * Change the configuration paths for datadir + * Add datadir destination path customization + * Suppress warning about dead code for Common + * Add datadir support + * Make sure the right rust is used on deploy + * Bump the edition in the examples + +------------------------------------------------------------------- +Thu Jan 06 06:58:06 UTC 2022 - william.brown@suse.com + +- resolve bsc#1194113 (CVE-2018-25023) +- resolve bsc#1194119 (CVE-2021-45710) + +------------------------------------------------------------------- +Wed Jun 02 05:40:32 UTC 2021 - william.brown@suse.com + +- Update to version 0.8.1~git0.cce1b08: + * Prepare for release + * Set the capi.library.rustflags + * Add a simple way to set the RUSTFLAGS from Cargo.toml + * CI: test example project in Windows/MSYS2 (#191) + * Update cargo requirement from 0.52 to 0.53 + * Upgrade to GitHub-native Dependabot + * Default to nightly + * Use codecov + * Move the code coverage in a stand-alone script + * Enable colored help + +------------------------------------------------------------------- +Tue Apr 6 02:21:28 UTC 2021 - William Brown + +- Add README.suse-maint to fix OBS warning. + +------------------------------------------------------------------- +Mon Apr 5 07:52:23 UTC 2021 - Antonio Larrosa + +- Update to version 0.8.0 + * cbindgen 0.18 + * provide a cli option to have fully static builds. + * cargo cinstall and cargo capi install now imply --release + to match the behavior of cargo install. + +------------------------------------------------------------------- +Wed Jan 13 16:32:44 UTC 2021 - Andreas Schneider + +- Update to version 0.7.0 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.7.0 + +------------------------------------------------------------------- +Sun Oct 18 13:21:10 UTC 2020 - Andreas Schneider + +- Update to version 0.6.15 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.15 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.14 +- Removed 123.patch + +------------------------------------------------------------------- +Tue Oct 13 11:53:19 UTC 2020 - Andreas Schneider + +- Added 123.patch + * Save the include subdir to a specific field + +------------------------------------------------------------------- +Wed Sep 9 10:33:48 UTC 2020 - Andreas Schneider + +- Update to version 0.6.13 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.13 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.12 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.11 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.10 + +------------------------------------------------------------------- +Mon Jul 13 15:32:40 UTC 2020 - Andreas Schneider + +- Update to version 0.6.9 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.9 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.8 + +------------------------------------------------------------------- +Mon Jun 8 06:56:21 UTC 2020 - Andreas Schneider + +- Update to version 0.6.7 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.7 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.6 + +------------------------------------------------------------------- +Tue Jun 2 10:45:00 UTC 2020 - Andreas Schneider + +- Update to version 0.6.5 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.5 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.4 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.3 + +------------------------------------------------------------------- +Thu Apr 2 13:57:21 UTC 2020 - Andreas Schneider + +- Update to version 0.6.2 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.2 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.1 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.0 + +------------------------------------------------------------------- +Sun Dec 15 13:13:58 UTC 2019 - Andreas Schneider + +- Update to version 0.5.0 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.5.0 + * https://github.com/lu-zero/cargo-c/releases/tag/v0.4.0 + +------------------------------------------------------------------- +Mon Dec 9 16:03:39 UTC 2019 - Andreas Schneider + +- Set rust compiler and rust flags + +------------------------------------------------------------------- +Wed Nov 20 18:36:44 UTC 2019 - Andreas Schneider + +- Initial package version 0.3.1 diff --git a/cargo-c.spec b/cargo-c.spec new file mode 100644 index 0000000..ea52174 --- /dev/null +++ b/cargo-c.spec @@ -0,0 +1,72 @@ +# +# spec file for package cargo-c +# +# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2019 Andreas Schneider . +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global rustflags -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2 + +Name: cargo-c +Version: 0.9.27~git0.54774e0 +Release: 0 +Summary: Helper to build and install c-like libraries from Rust +License: MIT +Group: Development/Languages/Rust + +URL: https://crates.io/crates/cargo-c +Source0: %{name}-%{version}.tar.xz +Source1: vendor.tar.xz +Source2: cargo_config + +Source1000: README.suse-maint +BuildRequires: cargo +BuildRequires: pkgconfig(openssl) + +%description +The is a cargo applet to build and install C-ABI compatibile dynamic and static +libraries from Rust. + +It produces and installs a correct pkg-config file, a static library and a +dynamic library, and a C header to be used by any C (and C-compatible) +software. + +%prep +%autosetup -a1 -p1 + +install -d -m 0755 .cargo +cp %{SOURCE2} .cargo/config + +%build +export RUSTFLAGS="%{rustflags}" +cargo build --offline --release + +%install +export RUSTFLAGS="%{rustflags}" +cargo install --offline --root=%{buildroot}%{_prefix} --path . + +find %{buildroot} -name .crates2.json -delete +rm -rf %{buildroot}%{_datadir}/cargo/registry +rm %{buildroot}%{_prefix}/.crates.toml + +%files +%license LICENSE +%doc README.md +%{_bindir}/cargo-capi +%{_bindir}/cargo-cbuild +%{_bindir}/cargo-cinstall +%{_bindir}/cargo-ctest + +%changelog diff --git a/cargo_config b/cargo_config new file mode 100644 index 0000000..6fb4ff4 --- /dev/null +++ b/cargo_config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" \ No newline at end of file diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..044bf09 --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c40ec1bc87894b8408f3d32c102e52f7d0cac6fced38c37341238485b23e6d7 +size 43869584