[Rpm-maint] [rpm-software-management/rpm] RFE: rpmbuild -br --i-really-want-src-rpm (#760)

Igor Gnatenko notifications at github.com
Thu Jun 20 20:59:53 UTC 2019


I have some scripts which operate on packages to generate their (build)dependency tree for Fedora Modularity stuff. It relies on normal binary and source RPMs for dependency information. However, with dynamic BuildRequires, I need a way to rebuild sourcerpms with some macros defined. And I found out that there is no way to get src.rpm with dynamic buildrequires without installing them.

So I had to do something like

```diff
diff --git a/build/build.c b/build/build.c
index dec7d9608..c1f28b8f5 100644
--- a/build/build.c
+++ b/build/build.c
@@ -213,10 +213,12 @@ static int doBuildRequires(rpmSpec spec, int test)
        *packageDependencies(spec->sourcePackage, RPMTAG_REQUIRENAME),
        spec->sourcePackage->header);
 
+#if 0
     parseRCPOT(spec, spec->sourcePackage,
               "rpmlib(DynamicBuildRequires) = 4.15.0-1",
               RPMTAG_PROVIDENAME, 0, RPMSENSE_FIND_PROVIDES | RPMSENSE_RPMLIB,
               addReqProvPkg, NULL);
+#endif
     rc = RPMRC_MISSINGBUILDREQUIRES;
 
  exit:
@@ -305,6 +307,8 @@ static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what)
                (rc == RPMRC_MISSINGBUILDREQUIRES))
            rc = doCheckBuildRequires(ts, spec, test);
        if (rc == RPMRC_MISSINGBUILDREQUIRES) {
+           rc = RPMRC_OK;
+#if 0
            if (what & RPMBUILD_DUMPBUILDREQUIRES) {
                /* Create buildreqs package */
                char *nvr = headerGetAsString(spec->packages->header, RPMTAG_NVR);
@@ -318,6 +322,7 @@ static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what)
            } else {
                rc = RPMRC_OK;
            }
+#endif
        } else if (rc) {
            goto exit;
        }
```

and use `rpmbuild -rr -D "_module_build 1" --nodeps /path/to/srpm` and it does what I need.

So what I want is to say "I am expert, I know src.rpm will have all dynamic dependencies, just give me src.rpm and not buildreqs.nosrc.rpm.".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/760
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190620/feebc5ad/attachment.html>


More information about the Rpm-maint mailing list