From c7a946905f80b560ad09ba22fbcc02e29a14bd92 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 10 2020 05:39:05 +0000 Subject: Apply patch rpm-4.14.2-RPMTAG_MODULARITYLABEL.patch patch_name: rpm-4.14.2-RPMTAG_MODULARITYLABEL.patch present_in_specfile: true location_in_specfile: 7 --- diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 0d13385..c4145d2 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -43,6 +43,7 @@ static const rpmTagVal copyTagsDuringParse[] = { RPMTAG_DISTTAG, RPMTAG_BUGURL, RPMTAG_GROUP, + RPMTAG_MODULARITYLABEL, 0 }; @@ -521,6 +522,7 @@ static struct optionalTag { { RPMTAG_DISTURL, "%{disturl}" }, { RPMTAG_DISTTAG, "%{disttag}" }, { RPMTAG_BUGURL, "%{bugurl}" }, + { RPMTAG_MODULARITYLABEL, "%{modularitylabel}"}, { -1, NULL } }; @@ -774,6 +776,7 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag, case RPMTAG_URL: case RPMTAG_DISTTAG: case RPMTAG_BUGURL: + case RPMTAG_MODULARITYLABEL: /* XXX TODO: validate format somehow */ case RPMTAG_VCS: SINGLE_TOKEN_ONLY; @@ -1013,6 +1016,7 @@ static struct PreambleRec_s const preambleList[] = { {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")}, {RPMTAG_ORDERNAME, 2, 0, LEN_AND_STR("orderwithrequires")}, {RPMTAG_REMOVEPATHPOSTFIXES,0, 0, LEN_AND_STR("removepathpostfixes")}, + {RPMTAG_MODULARITYLABEL, 0, 0, LEN_AND_STR("modularitylabel")}, {0, 0, 0, 0} }; diff --git a/build/parseSpec.c b/build/parseSpec.c index 606a0d8..51f7ee2 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -517,6 +517,7 @@ static const rpmTagVal sourceTags[] = { RPMTAG_BUGURL, RPMTAG_HEADERI18NTABLE, RPMTAG_VCS, + RPMTAG_MODULARITYLABEL, 0 }; diff --git a/lib/rpmtag.h b/lib/rpmtag.h index 8c718b3..57b10a7 100644 --- a/lib/rpmtag.h +++ b/lib/rpmtag.h @@ -368,6 +368,7 @@ typedef enum rpmTag_e { RPMTAG_FILESIGNATURELENGTH = 5091, /* i */ RPMTAG_PAYLOADDIGEST = 5092, /* s[] */ RPMTAG_PAYLOADDIGESTALGO = 5093, /* i */ + RPMTAG_MODULARITYLABEL = 5096, /* s */ RPMTAG_FIRSTFREE_TAG /*!< internal */ } rpmTag; diff --git a/macros.in b/macros.in index 1646003..aee2771 100644 --- a/macros.in +++ b/macros.in @@ -362,6 +362,11 @@ package or when debugging this package.\ %_javadir %{_datadir}/java %_javadocdir %{_datadir}/javadoc + +# Set ModularityLabel: for packages being build +# +#%modularitylabel + # A colon separated list of paths where files should *not* be installed. # Usually, these are network file system mount points. # diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at index 509277f..45d3869 100644 --- a/tests/rpmgeneral.at +++ b/tests/rpmgeneral.at @@ -150,6 +150,7 @@ LONGARCHIVESIZE LONGFILESIZES LONGSIGSIZE LONGSIZE +MODULARITYLABEL N NAME NEVR