Add RPMTAG_MODULARITYLABEL to distinguish packages build for modularity

Tag can be set with a ModularityLabel: statement in the spec file preamble or
via the modularitylabel macro
This commit is contained in:
Florian Festi 2018-11-30 11:02:52 +01:00
parent ad8c12c5d9
commit 8390fa8515
5 changed files with 12 additions and 0 deletions

View File

@ -43,6 +43,7 @@ static const rpmTagVal copyTagsDuringParse[] = {
RPMTAG_DISTTAG,
RPMTAG_BUGURL,
RPMTAG_GROUP,
RPMTAG_MODULARITYLABEL,
0
};
@ -526,6 +527,7 @@ static struct optionalTag {
{ RPMTAG_DISTURL, "%{disturl}" },
{ RPMTAG_DISTTAG, "%{disttag}" },
{ RPMTAG_BUGURL, "%{bugurl}" },
{ RPMTAG_MODULARITYLABEL, "%{modularitylabel}"},
{ -1, NULL }
};
@ -779,6 +781,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;
@ -1018,6 +1021,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}
};

View File

@ -517,6 +517,7 @@ static const rpmTagVal sourceTags[] = {
RPMTAG_BUGURL,
RPMTAG_HEADERI18NTABLE,
RPMTAG_VCS,
RPMTAG_MODULARITYLABEL,
0
};

View File

@ -372,6 +372,7 @@ typedef enum rpmTag_e {
RPMTAG_PAYLOADDIGESTALGO = 5093, /* i */
RPMTAG_AUTOINSTALLED = 5094, /* i reservation (unimplemented) */
RPMTAG_IDENTITY = 5095, /* s reservation (unimplemented) */
RPMTAG_MODULARITYLABEL = 5096, /* s */
RPMTAG_FIRSTFREE_TAG /*!< internal */
} rpmTag;

View File

@ -357,6 +357,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.
#

View File

@ -150,6 +150,7 @@ LONGARCHIVESIZE
LONGFILESIZES
LONGSIGSIZE
LONGSIZE
MODULARITYLABEL
N
NAME
NEVR