public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Fabio Valentini <decathorpe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-effective-limits] epel10: Initial import (#2247957)
Date: Wed, 18 Nov 2026 18:42:19 GMT [thread overview]
Message-ID: <179502733990.1.11910112978829986206.rpms-rust-effective-limits-2c852b90b9b2@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rust-effective-limits
Branch : epel10
Commit : 2c852b90b9b2a1943eac094ce16a4c217f267d4d
Author : Fabio Valentini <decathorpe@gmail.com>
Date : 2023-11-07T18:49:54+01:00
Stats : +156/-3 in 8 file(s)
URL : https://src.fedoraproject.org/rpms/rust-effective-limits/c/2c852b90b9b2a1943eac094ce16a4c217f267d4d?branch=epel10
Log:
Initial import (#2247957)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fe817b9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/effective-limits-0.5.5.crate
diff --git a/0001-fix-compilation-of-tests-on-32-bit-architectures.patch b/0001-fix-compilation-of-tests-on-32-bit-architectures.patch
new file mode 100644
index 0000000..57fe6ab
--- /dev/null
+++ b/0001-fix-compilation-of-tests-on-32-bit-architectures.patch
@@ -0,0 +1,25 @@
+From a201f7b3937790ca4eb846ca589e83bcbf4c6720 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Sun, 5 Nov 2023 01:33:17 +0100
+Subject: [PATCH] fix compilation of tests on 32-bit architectures
+
+---
+ src/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib.rs b/src/lib.rs
+index f7fda6f..dab9586 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -377,7 +377,7 @@ mod tests {
+ unsafe {
+ cmd.pre_exec(move || {
+ let lim = libc::rlimit {
+- rlim_cur: ulimit,
++ rlim_cur: ulimit as _,
+ rlim_max: libc::RLIM_INFINITY,
+ };
+ match libc::setrlimit(rlimit_as, &lim as *const libc::rlimit) {
+--
+2.41.0
+
diff --git a/README.md b/README.md
deleted file mode 100644
index 35309ee..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-effective-limits
-
-The rust-effective-limits package
diff --git a/effective-limits-fix-metadata-auto.diff b/effective-limits-fix-metadata-auto.diff
new file mode 100644
index 0000000..e3dc43c
--- /dev/null
+++ b/effective-limits-fix-metadata-auto.diff
@@ -0,0 +1,32 @@
+--- effective-limits-0.5.5/Cargo.toml 1970-01-01T00:00:01+00:00
++++ effective-limits-0.5.5/Cargo.toml 2023-11-04T23:42:30.310391+00:00
+@@ -41,29 +41,3 @@
+ [target."cfg(unix)".dependencies.libc]
+ version = "0.2.78"
+
+-[target."cfg(windows)".dependencies.winapi]
+-version = "0.3.9"
+-features = [
+- "combaseapi",
+- "errhandlingapi",
+- "fileapi",
+- "handleapi",
+- "impl-default",
+- "ioapiset",
+- "jobapi",
+- "jobapi2",
+- "minwindef",
+- "processthreadsapi",
+- "psapi",
+- "shlobj",
+- "shtypes",
+- "synchapi",
+- "sysinfoapi",
+- "tlhelp32",
+- "userenv",
+- "winbase",
+- "winerror",
+- "winioctl",
+- "winnt",
+- "winuser",
+-]
diff --git a/effective-limits-fix-metadata.diff b/effective-limits-fix-metadata.diff
new file mode 100644
index 0000000..66535f3
--- /dev/null
+++ b/effective-limits-fix-metadata.diff
@@ -0,0 +1,11 @@
+--- effective-limits-0.5.5/Cargo.toml 1970-01-01T00:00:01+00:00
++++ effective-limits-0.5.5/Cargo.toml 2023-11-04T23:43:17.485568+00:00
+@@ -28,6 +28,8 @@
+ ]
+ license = "Apache-2.0"
+ repository = "https://github.com/rbtcollins/effective-limits.rs"
++exclude = ["/ci/"]
++autobins = false
+
+ [dependencies.cfg-if]
+ version = "0.1.10"
diff --git a/rust-effective-limits.spec b/rust-effective-limits.spec
new file mode 100644
index 0000000..cae4288
--- /dev/null
+++ b/rust-effective-limits.spec
@@ -0,0 +1,78 @@
+# Generated by rust2rpm 25
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate effective-limits
+
+Name: rust-effective-limits
+Version: 0.5.5
+Release: %autorelease
+Summary: Estimate effective resource limits for a process
+
+License: Apache-2.0
+URL: https://crates.io/crates/effective-limits
+Source: %{crates_source}
+# Automatically generated patch to strip dependencies and normalize metadata
+Patch: effective-limits-fix-metadata-auto.diff
+# Manually created patch for downstream crate metadata changes
+# * prevent test-only executable from being built and shipped
+# * exclude files that are only useful for upstream development
+Patch: effective-limits-fix-metadata.diff
+# https://github.com/rbtcollins/effective-limits.rs/pull/46
+Patch: 0001-fix-compilation-of-tests-on-32-bit-architectures.patch
+
+BuildRequires: cargo-rpm-macros >= 24
+
+%global _description %{expand:
+Estimate effective resource limits for a process e.g. how much RAM is
+available for use.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license %{crate_instdir}/LICENSE-APACHE.txt
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+# * skip tests that require running the dropped test executable
+%cargo_test -- -- --exact --skip tests::test_no_ulimit --skip tests::test_ulimit
+%endif
+
+%changelog
+%autochangelog
diff --git a/rust2rpm.toml b/rust2rpm.toml
new file mode 100644
index 0000000..48d682f
--- /dev/null
+++ b/rust2rpm.toml
@@ -0,0 +1,8 @@
+[package]
+summary = "Estimate effective resource limits for a process"
+
+[tests]
+skip = ["tests::test_no_ulimit", "tests::test_ulimit"]
+skip-exact = true
+comments = ["skip tests that require running the dropped test executable"]
+
diff --git a/sources b/sources
new file mode 100644
index 0000000..64ed67d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (effective-limits-0.5.5.crate) = 71c7683910bdc43fc259028dddc2ead4343ed9f35b7071b0ce24fb145f7308fb726d15fc35be9e88b16b523e29731466c7dc965d5655b6bfd210e602e5aff67c
reply other threads:[~2026-11-18 18:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179502733990.1.11910112978829986206.rpms-rust-effective-limits-2c852b90b9b2@fedoraproject.org \
--to=decathorpe@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox