public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/folly-rpm-macros] epel10: Let the macros work on EPEL, where licensecheck does not exist
@ 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 : 022759f484399abc207c2fff5b3e79d5a6b8b79d
            Author : Michel Lind <salimma@fedoraproject.org>
            Date   : 2026-10-07T17:49:27+01:00
            Stats  : +13/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/folly-rpm-macros/c/022759f484399abc207c2fff5b3e79d5a6b8b79d?branch=epel10

            Log:
            Let the macros work on EPEL, where licensecheck does not exist

- Require licensecheck only on Fedora, so the package is installable on EPEL
- The check helper reports it as unavailable and falls back to the
  license-file scan instead of failing

licensecheck is packaged for Fedora only, in no EPEL release, and the
sha512 gate in a consumer's spec cannot know which distro the build is on:
a new vendor tarball turns the -f pass on everywhere. EPEL builds therefore
verify the License tag against the license files alone, which is also why
cachelib and mcrouter have their per-file pass run on Fedora.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Michel Lind <salimma@fedoraproject.org>

---
diff --git a/AGENTS.md b/AGENTS.md
index fd9c491..fb15998 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -51,7 +51,7 @@ 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-9`, which cachelib and mcrouter both do. Ask
+folly-rpm-macros >= 46-10`, 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

diff --git a/folly-rpm-macros.spec b/folly-rpm-macros.spec
index 7362ed1..6788854 100644
--- a/folly-rpm-macros.spec
+++ b/folly-rpm-macros.spec
@@ -19,7 +19,12 @@ Requires:       python3
 Requires:       cmake-rpm-macros
 # the %%getdeps_vendor_license_* macros wrap go_vendor_license and licensecheck
 Requires:       go-vendor-tools
+# licensecheck is Fedora-only (no EPEL build of it); without it the check
+# macro's -f pass reports that it is unavailable and verifies the License tag
+# against the license files alone, which is what EPEL builds get.
+%if 0%{?fedora}
 Requires:       licensecheck
+%endif
 # the %%folly_toolchain macro and its subpackage were dropped in 46; nothing used them
 Obsoletes:      folly-srpm-macros < 46
 

diff --git a/getdeps_vendor_license_check b/getdeps_vendor_license_check
index a545197..c80ae39 100755
--- a/getdeps_vendor_license_check
+++ b/getdeps_vendor_license_check
@@ -20,6 +20,7 @@ enough. Exit 1 with the missing identifiers and example files otherwise.
 import argparse
 import os
 import re
+import shutil
 import subprocess
 import sys
 import tomllib
@@ -72,6 +73,12 @@ def excluded(config):
 
 
 def scan(root, skip):
+    if shutil.which("licensecheck") is None:
+        # licensecheck is packaged for Fedora only; on EPEL the caller still
+        # asks for the full pass (the spec's sha512 gate cannot know that),
+        # so say so plainly and fall back to the license-file scan alone.
+        print("licensecheck is not installed; skipping the per-file pass")
+        return {}
     cmd = ["licensecheck", "--recursive", "--machine", "--shortname-scheme=spdx"]
     if skip:
         # licensecheck prints paths as ./a/b; match the excluded directories

^ 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: Let the macros work on EPEL, where licensecheck does not exist Michel Lind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox