diff options
author | Stanislav Brabec <sbrabec@suse.cz> | 2022-04-30 14:59:08 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-06-28 14:51:02 +0300 |
commit | 5399b8586d54beec9f707f8e61b7fdceadf4c411 (patch) | |
tree | 86532047d577ed894b4ef913487a1610a6e7b19d | |
parent | f0d640d64a978722e4e5bc0bd4e14bcb87bf409a (diff) | |
download | rpm-5399b8586d54beec9f707f8e61b7fdceadf4c411.tar.gz |
Add UpstreamReleases tag
Create a new optional UpstreamReleases tag that allows to specify an URL
of the location, where the source code could be downloaded. In
contrast to the URL part of the Source tag, this is intended for
the referrer of the sorce code, e. g. download top dir or the
sub-page of the web that contains references to the source files.
Third party tools or the package maintainer can use this tag and
find the latest version of the source code.
Co-authoredby: Florian Festi <ffesti@redhat.com>
(cherry picked from commit c0b417f572d2450f060f8cde901a8edb4f9a3b33)
-rw-r--r-- | build/parsePreamble.c | 4 | ||||
-rw-r--r-- | build/parseSpec.c | 1 | ||||
-rw-r--r-- | docs/manual/tags.md | 1 | ||||
-rw-r--r-- | include/rpm/rpmtag.h | 1 | ||||
-rw-r--r-- | tests/rpmgeneral.at | 1 |
5 files changed, 8 insertions, 0 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c index d5cc4b45a..a76fc2da4 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -42,6 +42,7 @@ static const rpmTagVal copyTagsDuringParse[] = { RPMTAG_DISTTAG, RPMTAG_BUGURL, RPMTAG_TRANSLATIONURL, + RPMTAG_UPSTREAMRELEASES, RPMTAG_GROUP, RPMTAG_MODULARITYLABEL, 0 @@ -535,6 +536,7 @@ static struct optionalTag { { RPMTAG_DISTTAG, "%{disttag}" }, { RPMTAG_BUGURL, "%{bugurl}" }, { RPMTAG_TRANSLATIONURL, "%{translationurl}" }, + { RPMTAG_UPSTREAMRELEASES, "%{upstreamreleases}" }, { RPMTAG_MODULARITYLABEL, "%{modularitylabel}"}, { -1, NULL } }; @@ -810,6 +812,7 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag, SINGLE_TOKEN_ONLY; /* fallthrough */ case RPMTAG_TRANSLATIONURL: + case RPMTAG_UPSTREAMRELEASES: headerPutString(pkg->header, tag, field); break; case RPMTAG_GROUP: @@ -1042,6 +1045,7 @@ static struct PreambleRec_s const preambleList[] = { {RPMTAG_DISTTAG, 0, 0, 1, LEN_AND_STR("disttag")}, {RPMTAG_BUGURL, 0, 0, 1, LEN_AND_STR("bugurl")}, {RPMTAG_TRANSLATIONURL, 0, 0, 1, LEN_AND_STR("translationurl")}, + {RPMTAG_UPSTREAMRELEASES, 0, 0, 1, LEN_AND_STR("upstreamreleases")}, {RPMTAG_ORDERNAME, 2, 0, 0, LEN_AND_STR("orderwithrequires")}, {RPMTAG_REMOVEPATHPOSTFIXES,0, 0, 1, LEN_AND_STR("removepathpostfixes")}, {RPMTAG_MODULARITYLABEL, 0, 0, 1, LEN_AND_STR("modularitylabel")}, diff --git a/build/parseSpec.c b/build/parseSpec.c index 714ebc375..18c480d6e 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -639,6 +639,7 @@ static const rpmTagVal sourceTags[] = { RPMTAG_URL, RPMTAG_BUGURL, RPMTAG_TRANSLATIONURL, + RPMTAG_UPSTREAMRELEASES, RPMTAG_HEADERI18NTABLE, RPMTAG_VCS, RPMTAG_MODULARITYLABEL, diff --git a/docs/manual/tags.md b/docs/manual/tags.md index 666a1eff3..80cb157be 100644 --- a/docs/manual/tags.md +++ b/docs/manual/tags.md @@ -76,6 +76,7 @@ Rpmversion | 1064 | string | Version of rpm used to build the pack Sourcepkgid | 1146 | bin Sourcerpm | 1044 | string | Package source rpm file name. Translationurl | 5100 | string | URL of upstream translation service/repository +UpstreamReleases | 5101 | string | URL to check for newer releases from upstream e.g. for build systems to check for newer upstream releases and then to notify the packager. Url | 1020 | string | Package URL, typically project upstream website. Vcs | 5034 | string | (Public) upstream source code VCS location. Format `<vcs>:<address>` with `<vcs>` being the VCS command used (e.g. `git`, `svn`, `hg`, ...) and `<address>` being the location of the repository as used by the VCS tool to clone/checkout the repository (e.g. `https://github.com/rpm-software-management/rpm.git`). Vendor | 1011 | string | Package vendor contact information. diff --git a/include/rpm/rpmtag.h b/include/rpm/rpmtag.h index c57ef04da..acec753ca 100644 --- a/include/rpm/rpmtag.h +++ b/include/rpm/rpmtag.h @@ -379,6 +379,7 @@ typedef enum rpmTag_e { RPMTAG_ARCHSUFFIX = 5098, /* s extension */ RPMTAG_SPEC = 5099, /* s */ RPMTAG_TRANSLATIONURL = 5100, /* s */ + RPMTAG_UPSTREAMRELEASES = 5101, /* s */ RPMTAG_FIRSTFREE_TAG /*!< internal */ } rpmTag; diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at index 43984babe..755ebce1b 100644 --- a/tests/rpmgeneral.at +++ b/tests/rpmgeneral.at @@ -302,6 +302,7 @@ TRIGGERSCRIPTPROG TRIGGERSCRIPTS TRIGGERTYPE TRIGGERVERSION +UPSTREAMRELEASES URL V VCS |