Skip to content

Commit

Permalink
fix: bandwhich youki (#768)
Browse files Browse the repository at this point in the history
* fix: bandwhich

* fix: youki
  • Loading branch information
madonuko authored Nov 12, 2023
1 parent ec3e3e9 commit 227ca08
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 42 deletions.
8 changes: 4 additions & 4 deletions anda/rust/bandwhich/bandwhich-fix-metadata-auto.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- bandwhich-0.21.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ bandwhich-0.21.0/Cargo.toml 2023-09-21T07:50:16.506970+00:00
@@ -104,17 +104,3 @@
--- bandwhich-0.21.1/Cargo.toml 1970-01-01T00:00:01+00:00
+++ bandwhich-0.21.1/Cargo.toml 2023-10-30T06:12:20.956389+00:00
@@ -119,17 +119,3 @@
[target."cfg(target_os=\"linux\")".dependencies.procfs]
version = "0.15.1"

Expand All @@ -14,7 +14,7 @@
-version = "1.0.75"
-
-[target."cfg(target_os=\"windows\")".build-dependencies.http_req]
-version = "0.9.3"
-version = "0.10.0"
-
-[target."cfg(target_os=\"windows\")".build-dependencies.zip]
-version = "0.6.6"
17 changes: 8 additions & 9 deletions anda/rust/bandwhich/rust-bandwhich.spec
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Generated by rust2rpm 24
# Generated by rust2rpm 25
#bcond_without check

%global crate bandwhich

Name: rust-bandwhich
Version: 0.21.1
Release: 1%{?dist}
Release: %autorelease
Summary: Display current network utilization by process, connection and remote IP/hostname

License: MIT
URL: https://crates.io/crates/bandwhich
Source: %{crates_source}
# Automatically generated patch to strip foreign dependencies
# Automatically generated patch to strip dependencies and normalize metadata
Patch: bandwhich-fix-metadata-auto.diff

BuildRequires: anda-srpm-macros rust-packaging >= 23
BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24

%global _description %{expand:
Display current network utilization by process, connection and remote
Expand All @@ -30,25 +30,24 @@ License: MIT

%files -n %{crate}
%license LICENSE.md
%license LICENSE.dependencies
#license LICENSE.dependencies
%doc CHANGELOG.md
%doc CODE_OF_CONDUCT.md
%doc CONTRIBUTING.md
%doc README.md
%{_bindir}/bandwhich

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%autosetup -n %{crate}-%{version} -p1
%cargo_prep_online

%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
#{cargo_license_summary}
#{cargo_license} > LICENSE.dependencies

%install
%cargo_install
rm %{buildroot}/.cargo -rf

%if %{with check}
%check
Expand Down
25 changes: 25 additions & 0 deletions anda/rust/oxipng/oxipng-fix-metadata-auto.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- oxipng-9.0.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ oxipng-9.0.0/Cargo.toml 2023-10-30T06:36:01.294365+00:00
@@ -116,7 +116,6 @@
[features]
binary = [
"clap",
- "glob",
"env_logger",
]
default = [
@@ -133,13 +132,10 @@
]
sanity-checks = ["image"]

-[target."cfg(windows)".dependencies.glob]
-version = "0.3.1"
-optional = true
-
[badges.maintenance]
status = "actively-developed"

[badges.travis-ci]
branch = "master"
repository = "shssoichiro/oxipng"
+
78 changes: 55 additions & 23 deletions anda/rust/oxipng/rust-oxipng.spec
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
# Generated by rust2rpm 23
# Generated by rust2rpm 25
%bcond_without check

%global crate oxipng

Name: rust-oxipng
Version: 9.0.0
Release: 1%{?dist}
Release: %autorelease
Summary: Lossless PNG compression optimizer

License: MIT
URL: https://crates.io/crates/oxipng
Source: %{crates_source}
# Automatically generated patch to strip dependencies and normalize metadata
Patch: oxipng-fix-metadata-auto.diff

BuildRequires: anda-srpm-macros rust-packaging >= 21
BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24

%global _description %{expand:
Lossless PNG compression optimizer.}
A lossless PNG compression optimizer.}

%description %{_description}

%package -n %{crate}
Summary: %{summary}
# FIXME: paste output of %%cargo_license_summary here
License: # FIXME
# LICENSE.dependencies contains a full license breakdown

%description -n %{crate} %{_description}

%files -n %{crate}
%license LICENSE
#license LICENSE.dependencies
%doc CHANGELOG.md
%doc MANUAL.txt
%doc README.md
%doc README.template.md
%{_bindir}/oxipng

%package devel
Expand All @@ -43,8 +49,8 @@ use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/MANUAL.txt
%doc %{crate_instdir}/README.md
%doc %{crate_instdir}/README.template.md
%{crate_instdir}/

%package -n %{name}+default-devel
Expand Down Expand Up @@ -83,6 +89,30 @@ use the "clap" feature of the "%{crate}" crate.
%files -n %{name}+clap-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+crossbeam-channel-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+crossbeam-channel-devel %{_description}

This package contains library source intended for building other packages which
use the "crossbeam-channel" feature of the "%{crate}" crate.

%files -n %{name}+crossbeam-channel-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+env_logger-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+env_logger-devel %{_description}

This package contains library source intended for building other packages which
use the "env_logger" feature of the "%{crate}" crate.

%files -n %{name}+env_logger-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+filetime-devel
Summary: %{summary}
BuildArch: noarch
Expand All @@ -107,52 +137,52 @@ use the "freestanding" feature of the "%{crate}" crate.
%files -n %{name}+freestanding-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+parallel-devel
%package -n %{name}+image-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+parallel-devel %{_description}
%description -n %{name}+image-devel %{_description}

This package contains library source intended for building other packages which
use the "parallel" feature of the "%{crate}" crate.
use the "image" feature of the "%{crate}" crate.

%files -n %{name}+parallel-devel
%files -n %{name}+image-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+rayon-devel
%package -n %{name}+parallel-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+rayon-devel %{_description}
%description -n %{name}+parallel-devel %{_description}

This package contains library source intended for building other packages which
use the "rayon" feature of the "%{crate}" crate.
use the "parallel" feature of the "%{crate}" crate.

%files -n %{name}+rayon-devel
%files -n %{name}+parallel-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+stderrlog-devel
%package -n %{name}+rayon-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+stderrlog-devel %{_description}
%description -n %{name}+rayon-devel %{_description}

This package contains library source intended for building other packages which
use the "stderrlog" feature of the "%{crate}" crate.
use the "rayon" feature of the "%{crate}" crate.

%files -n %{name}+stderrlog-devel
%files -n %{name}+rayon-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+wild-devel
%package -n %{name}+sanity-checks-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+wild-devel %{_description}
%description -n %{name}+sanity-checks-devel %{_description}

This package contains library source intended for building other packages which
use the "wild" feature of the "%{crate}" crate.
use the "sanity-checks" feature of the "%{crate}" crate.

%files -n %{name}+wild-devel
%files -n %{name}+sanity-checks-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+zopfli-devel
Expand All @@ -168,11 +198,13 @@ use the "zopfli" feature of the "%{crate}" crate.
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%autosetup -n %{crate}-%{version} -p1
%cargo_prep_online

%build
%cargo_build
#{cargo_license_summary}
#{cargo_license} > LICENSE.dependencies

%install
%cargo_install
Expand Down
2 changes: 1 addition & 1 deletion anda/rust/rnote/rnote.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License: GPL-3.0
URL: https://github.com/flxzt/rnote
Source0: %{url}/archive/refs/tags/v%version.tar.gz
Requires: gtk4
BuildRequires: cargo meson cmake libappstream-glib gcc-c++ pkgconfig(alsa) alsa-lib clang-devel python
BuildRequires: cargo meson cmake libappstream-glib gcc-c++ pkgconfig(alsa) alsa-lib clang-devel python desktop-file-utils
BuildRequires: pkgconfig(glib-2.0) >= 2.66
BuildRequires: pkgconfig(gtk4) >= 4.7
BuildRequires: pkgconfig(libadwaita-1) >= 1.2
Expand Down
12 changes: 12 additions & 0 deletions anda/rust/youki/dep-protobuf.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/crates/youki/Cargo.toml b/crates/youki/Cargo.toml
index b494cf1..e415f15 100644
--- a/crates/youki/Cargo.toml
+++ b/crates/youki/Cargo.toml
@@ -49,6 +49,7 @@ wasmtime-wasi = {version = "10.0.2", optional = true }
tracing = { version = "0.1.37", features = ["attributes"]}
tracing-subscriber = { version = "0.3.16", features = ["json", "env-filter"] }
tracing-journald = "0.3.0"
+protobuf = "= 3.2.0"

[dev-dependencies]
serial_test = "2.0.0"
2 changes: 1 addition & 1 deletion anda/rust/youki/update.rhai
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rpm.version(gh("containers/youki"));
rpm.version(crates("youki"));
14 changes: 10 additions & 4 deletions anda/rust/youki/youki.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Summary: A container runtime written in Rust
License: Apache-2.0
URL: https://github.com/containers/youki
Source0: https://github.com/containers/youki/archive/refs/tags/v%{version}.tar.gz
Patch0: dep-protobuf.diff

BuildRequires: pkg-config
BuildRequires: rust-packaging
Expand All @@ -22,10 +23,15 @@ BuildRequires: fdupes
youki is an implementation of the OCI runtime-spec in Rust, similar to runc.

%prep
%autosetup -n youki-%{version} -S git -v -p0
%setup -q -n youki-%{version}

git init .
git remote add origin https://github.com/containers/youki
git fetch origin
git config user.name "username"
git config user.email "[email protected]"
git add * .*
git commit -a -m "idk"
git checkout v%{version}

# add host key for github
Expand All @@ -38,17 +44,17 @@ git submodule sync
# download git submodules
git submodule update --init --recursive

%patch 0 -p1
%cargo_prep_online


%build

pushd crates/
%cargo_build


%install
install -D -m 0755 target/release/youki %{buildroot}%{_bindir}/youki
ls target/*
install -D -m 0755 target/rpm/youki %{buildroot}%{_bindir}/youki
%fdupes docs/

%files
Expand Down

0 comments on commit 227ca08

Please sign in to comment.