[Rpm-maint] [rpm-software-management/rpm] rpmbuild: make it possible to not include SPEC tag (rpm-4.17 compat behavior) (Issue #2727)

Denys Vlasenko notifications at github.com
Tue Oct 17 14:25:16 UTC 2023


For some packages, expanded specfile is so big, it causes srpm headers to exceed 16 mb, which then can't be extracted by old rpms (pre 4.13) - they throw an error, "headerRead failed: hdr data: BAD, no. of bytes(20966277) out of range".

The code in question is in build/pack.c:

    /* Include spec in parsed and expanded form */
    headerPutString(sourcePkg->header, RPMTAG_SPEC, getStringBuf(spec->parsed));

For my purposes, a magic envvar would work best, a-la

   char *NO_SPEC_TAG = getenv("RPMBUILD_NO_SPEC_TAG");

   if (!NO_SPEC_TAG || atoi(NO_SPEC_TAG) != 1) {
      /* Include spec in parsed and expanded form */
      headerPutString(sourcePkg->header, RPMTAG_SPEC, getStringBuf(spec->parsed));
   }




-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2727
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2727 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20231017/91ce5349/attachment.html>


More information about the Rpm-maint mailing list