public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/folly-rpm-macros] epel10: Never install an RPATH into the executables
@ 2026-10-07 17:18 Michel Lind
0 siblings, 0 replies; only message in thread
From: Michel Lind @ 2026-10-07 17:18 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/folly-rpm-macros
Branch : epel10
Commit : 075f90ad8f059355d17b4e931d7a62b02a867f0e
Author : Michel Lind <salimma@fedoraproject.org>
Date : 2026-09-29T16:25:55+01:00
Stats : +23/-6 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/folly-rpm-macros/c/075f90ad8f059355d17b4e931d7a62b02a867f0e?branch=epel10
Log:
Never install an RPATH into the executables
- Pass CMAKE_SKIP_INSTALL_RPATH=ON to every getdeps build, so a project's
relocatable-tarball RPATH stays out of the installed binaries
- Document that the release comes from fedpkg verrel, not from builds
cachelib's CMakeLists sets an install RPATH of "$ORIGIN/../lib:
$ORIGIN/../lib64:$ORIGIN/../lib-os" for the relocatable tarball
contrib/prepare-rpath-dist.sh builds, and forces it into the binaries at
build time. In the package those directories do not exist and nothing needs
them, since the vendored stack is static. rpminspect fails on it twice, in
the runpath inspection and as the only annocheck hardening failure (the
run-path test objects to ".." in the tag), on every architecture.
Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
---
diff --git a/AGENTS.md b/AGENTS.md
index 8f234a1..fd9c491 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -51,9 +51,14 @@ folly-rpm-macros' Version is the Fedora release number current when it was
last touched (46 today), not a version of its own, so a macro change usually
only moves the *release*: 46-2, 46-3. A dependent that needs the new
behaviour must therefore require the release too, `BuildRequires:
-folly-rpm-macros >= 46-3`, which cachelib and mcrouter both do. A bare
-`>= 46` would be satisfied by a macros build that predates the change and
-the package would fail in a way that points at the wrong file. Bump the
+folly-rpm-macros >= 46-9`, which cachelib and mcrouter both do. Ask
+`fedpkg verrel` for the number rather than counting builds: rpmautospec
+counts the commits since the last version change, one release each, so
+commits that were never built still raise it. On a clean tree it reports
+what a build of HEAD would get; with uncommitted changes it already counts
+them as one more commit, so the number does not move when you then commit.
+A bare `>= 46` would be satisfied by a macros build that predates the change
+and the package would fail in a way that points at the wrong file. Bump the
dependents whenever a macro change is meaningful to them, in the same round
as the macros build.
@@ -141,7 +146,9 @@ Read `cachelib.spec` as the reference. The pieces, in order:
`getdeps_scratch_dir` (defaults under `%_builddir`; never `/tmp`, a tmpfs),
`getdeps_job_weight_mib` (3072, fed to `%limit_build`),
`getdeps_extra_cmake_defines` (JSON *contents* without braces, applies to
- every project getdeps builds; cachelib uses it for `LIB_INSTALL_DIR`,
+ every project getdeps builds, after the macros' own
+ `CMAKE_SKIP_INSTALL_RPATH=ON`, which keeps a project's relocatable-tarball
+ RPATH out of the executables and rpminspect quiet; cachelib uses it for `LIB_INSTALL_DIR`,
`CACHELIB_MAJOR_VERSION`, `CONFIGS_INSTALL_DIR`; mcrouter for
`MCROUTER_PACKAGE_VERSION`, which upstream's CMake conversion left at
"0.1.0-dev").
diff --git a/README.md b/README.md
index c8b81d5..80521e6 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,8 @@ Other knobs, all overridable with `%global` before use: `%getdeps_project`
requires that name), `%getdeps_scratch_dir`, `%getdeps_job_weight_mib` (3072,
fed to `%limit_build`) and `%getdeps_extra_cmake_defines` (the contents of a
JSON object without the outer braces, e.g. `"FOO": "ON"`; applies to every
-project getdeps builds). `%getdeps_build -t` also builds the project's
+project getdeps builds, after the defines the macros always pass, today
+`CMAKE_SKIP_INSTALL_RPATH=ON`). `%getdeps_build -t` also builds the project's
tests, which `%getdeps_test` then runs in `%check`.
### Licenses of the vendored tree
diff --git a/macros.folly-rpm b/macros.folly-rpm
index 9296a1e..2a71b78 100644
--- a/macros.folly-rpm
+++ b/macros.folly-rpm
@@ -77,9 +77,18 @@
--vendor-dir %{getdeps_vendor_dir}
--scratch-path %{getdeps_scratch_dir}
--num-jobs %{__getdeps_num_jobs}
- %{?getdeps_extra_cmake_defines:--extra-cmake-defines '{%{getdeps_extra_cmake_defines}}'}
+ --extra-cmake-defines '{%{__getdeps_policy_cmake_defines}%{?getdeps_extra_cmake_defines:, %{getdeps_extra_cmake_defines}}}'
}
+# Defines every getdeps package wants, prepended to the spec's own.
+# CMAKE_SKIP_INSTALL_RPATH: projects that ship a relocatable tarball set an
+# install RPATH for it (cachelib: "$ORIGIN/../lib:$ORIGIN/../lib64:
+# $ORIGIN/../lib-os"), which ends up in the installed executables. Nothing
+# here needs it, since the vendored stack is linked statically, and rpminspect
+# fails a DT_RUNPATH containing ".." (its annocheck run-path test, and the
+# runpath inspection). Fedora's own %%cmake macro passes the same define.
+%__getdeps_policy_cmake_defines "CMAKE_SKIP_INSTALL_RPATH": "ON"
+
# getdeps_generate_buildrequires: for %%generate_buildrequires. Emits the
# distro packages getdeps would take from the system for %%getdeps_project,
# so the BuildRequires follow the manifests instead of being copied by hand.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-07 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 17:18 [rpms/folly-rpm-macros] epel10: Never install an RPATH into the executables Michel Lind
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox