Skip to content

Conversation

@ppisar
Copy link
Contributor

@ppisar ppisar commented Jul 22, 2025

Building against rpm-5.99.91 failed:

/home/test/createrepo_c/src/parsehdr.c: In function ‘cr_package_from_header’:
/home/test/createrepo_c/src/parsehdr.c:669:71: error: ‘RPMTAG_HDRID’ undeclared (first use in this function); did you mean ‘RPMTAG_CVSID’?
  669 |                                                  headerGetString(hdr, RPMTAG_HDRID));
  |                                                                       ^~~~~~~~~~~~
  |                                                                       RPMTAG_CVSID

RPM intentionally removed RPMTAG_HDRID tag alias in commit 79ba4a3c41702e46edd5a4ce7e17a1f3361eb0e7 ("Drop irrepairable pkgid and hdrid tag aliases, rename SOURCEPKGID to go").

This patch fixes building against RPMv6 by using RPMTAG_SHA1HEADER which RPMTAG_HDRID was aliased to. RPMTAG_SHA1HEADER has existed in RPM since the year 2001. RPMTAG_HDRID was an alias to RPMTAG_SHA1HEADER all the time RPMTAG_HDRID existed.

In the features we should look for another digest header RPMv6 packages will use.

Building against rpm-5.99.91 failed:

    /home/test/createrepo_c/src/parsehdr.c: In function ‘cr_package_from_header’:
    /home/test/createrepo_c/src/parsehdr.c:669:71: error: ‘RPMTAG_HDRID’ undeclared (first use in this function); did you mean ‘RPMTAG_CVSID’?
      669 |                                                  headerGetString(hdr, RPMTAG_HDRID));
	  |                                                                       ^~~~~~~~~~~~
	  |                                                                       RPMTAG_CVSID

RPM intentionally removed RPMTAG_HDRID tag alias in commit
79ba4a3c41702e46edd5a4ce7e17a1f3361eb0e7 ("Drop irrepairable pkgid and
hdrid tag aliases, rename SOURCEPKGID to go").

This patch fixes building against RPMv6 by using RPMTAG_SHA1HEADER
which RPMTAG_HDRID was aliased to. RPMTAG_SHA1HEADER has existed in
RPM since the year 2001. RPMTAG_HDRID was an alias to
RPMTAG_SHA1HEADER all the time RPMTAG_HDRID existed.

In the features we should look for another digest header RPMv6
packages will use.
@ppisar ppisar requested a review from pkratoch July 22, 2025 13:41
@ppisar ppisar merged commit 4e37bc5 into rpm-software-management:master Jul 23, 2025
7 checks passed
@dralley
Copy link
Contributor

dralley commented Aug 27, 2025

Note that future packages built against the RPMv6 standard may not have the SHA1HEADER at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants