|
Panu Matilainen |
af9bdc |
From 8390fa8515f499994646cf3bd113423744dc7bd9 Mon Sep 17 00:00:00 2001
|
|
Panu Matilainen |
af9bdc |
From: Florian Festi <ffesti@redhat.com>
|
|
Panu Matilainen |
af9bdc |
Date: Fri, 30 Nov 2018 11:02:52 +0100
|
|
Panu Matilainen |
af9bdc |
Subject: [PATCH] Add RPMTAG_MODULARITYLABEL to distinguish packages build for
|
|
Panu Matilainen |
af9bdc |
modularity
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
Tag can be set with a ModularityLabel: statement in the spec file preamble or
|
|
Panu Matilainen |
af9bdc |
via the modularitylabel macro
|
|
Panu Matilainen |
af9bdc |
---
|
|
Panu Matilainen |
af9bdc |
build/parsePreamble.c | 4 ++++
|
|
Panu Matilainen |
af9bdc |
build/parseSpec.c | 1 +
|
|
Panu Matilainen |
af9bdc |
lib/rpmtag.h | 1 +
|
|
Panu Matilainen |
af9bdc |
macros.in | 5 +++++
|
|
Panu Matilainen |
af9bdc |
tests/rpmgeneral.at | 1 +
|
|
Panu Matilainen |
af9bdc |
5 files changed, 12 insertions(+)
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
|
|
Panu Matilainen |
af9bdc |
index f5e06bac8..e340e5c7a 100644
|
|
Panu Matilainen |
af9bdc |
--- a/build/parsePreamble.c
|
|
Panu Matilainen |
af9bdc |
+++ b/build/parsePreamble.c
|
|
Panu Matilainen |
af9bdc |
@@ -43,6 +43,7 @@ static const rpmTagVal copyTagsDuringParse[] = {
|
|
Panu Matilainen |
af9bdc |
RPMTAG_DISTTAG,
|
|
Panu Matilainen |
af9bdc |
RPMTAG_BUGURL,
|
|
Panu Matilainen |
af9bdc |
RPMTAG_GROUP,
|
|
Panu Matilainen |
af9bdc |
+ RPMTAG_MODULARITYLABEL,
|
|
Panu Matilainen |
af9bdc |
0
|
|
Panu Matilainen |
af9bdc |
};
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
@@ -526,6 +527,7 @@ static struct optionalTag {
|
|
Panu Matilainen |
af9bdc |
{ RPMTAG_DISTURL, "%{disturl}" },
|
|
Panu Matilainen |
af9bdc |
{ RPMTAG_DISTTAG, "%{disttag}" },
|
|
Panu Matilainen |
af9bdc |
{ RPMTAG_BUGURL, "%{bugurl}" },
|
|
Panu Matilainen |
af9bdc |
+ { RPMTAG_MODULARITYLABEL, "%{modularitylabel}"},
|
|
Panu Matilainen |
af9bdc |
{ -1, NULL }
|
|
Panu Matilainen |
af9bdc |
};
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
@@ -779,6 +781,7 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
|
|
Panu Matilainen |
af9bdc |
case RPMTAG_URL:
|
|
Panu Matilainen |
af9bdc |
case RPMTAG_DISTTAG:
|
|
Panu Matilainen |
af9bdc |
case RPMTAG_BUGURL:
|
|
Panu Matilainen |
af9bdc |
+ case RPMTAG_MODULARITYLABEL:
|
|
Panu Matilainen |
af9bdc |
/* XXX TODO: validate format somehow */
|
|
Panu Matilainen |
af9bdc |
case RPMTAG_VCS:
|
|
Panu Matilainen |
af9bdc |
SINGLE_TOKEN_ONLY;
|
|
Panu Matilainen |
af9bdc |
@@ -1018,6 +1021,7 @@ static struct PreambleRec_s const preambleList[] = {
|
|
Panu Matilainen |
af9bdc |
{RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")},
|
|
Panu Matilainen |
af9bdc |
{RPMTAG_ORDERNAME, 2, 0, LEN_AND_STR("orderwithrequires")},
|
|
Panu Matilainen |
af9bdc |
{RPMTAG_REMOVEPATHPOSTFIXES,0, 0, LEN_AND_STR("removepathpostfixes")},
|
|
Panu Matilainen |
af9bdc |
+ {RPMTAG_MODULARITYLABEL, 0, 0, LEN_AND_STR("modularitylabel")},
|
|
Panu Matilainen |
af9bdc |
{0, 0, 0, 0}
|
|
Panu Matilainen |
af9bdc |
};
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
diff --git a/build/parseSpec.c b/build/parseSpec.c
|
|
Panu Matilainen |
af9bdc |
index bf4789942..c80802baf 100644
|
|
Panu Matilainen |
af9bdc |
--- a/build/parseSpec.c
|
|
Panu Matilainen |
af9bdc |
+++ b/build/parseSpec.c
|
|
Panu Matilainen |
af9bdc |
@@ -517,6 +517,7 @@ static const rpmTagVal sourceTags[] = {
|
|
Panu Matilainen |
af9bdc |
RPMTAG_BUGURL,
|
|
Panu Matilainen |
af9bdc |
RPMTAG_HEADERI18NTABLE,
|
|
Panu Matilainen |
af9bdc |
RPMTAG_VCS,
|
|
Panu Matilainen |
af9bdc |
+ RPMTAG_MODULARITYLABEL,
|
|
Panu Matilainen |
af9bdc |
0
|
|
Panu Matilainen |
af9bdc |
};
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
diff --git a/lib/rpmtag.h b/lib/rpmtag.h
|
|
Panu Matilainen |
af9bdc |
index 973a6b69d..b9623ef24 100644
|
|
Panu Matilainen |
af9bdc |
--- a/lib/rpmtag.h
|
|
Panu Matilainen |
af9bdc |
+++ b/lib/rpmtag.h
|
|
Panu Matilainen |
af9bdc |
@@ -368,6 +368,7 @@
|
|
Panu Matilainen |
af9bdc |
RPMTAG_FILESIGNATURELENGTH = 5091, /* i */
|
|
Panu Matilainen |
af9bdc |
RPMTAG_PAYLOADDIGEST = 5092, /* s[] */
|
|
Panu Matilainen |
af9bdc |
RPMTAG_PAYLOADDIGESTALGO = 5093, /* i */
|
|
Panu Matilainen |
af9bdc |
+ RPMTAG_MODULARITYLABEL = 5096, /* s */
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
RPMTAG_FIRSTFREE_TAG /*!< internal */
|
|
Panu Matilainen |
af9bdc |
} rpmTag;
|
|
Panu Matilainen |
af9bdc |
diff --git a/macros.in b/macros.in
|
|
Panu Matilainen |
af9bdc |
index e0a1aea4e..cb4929c10 100644
|
|
Panu Matilainen |
af9bdc |
--- a/macros.in
|
|
Panu Matilainen |
af9bdc |
+++ b/macros.in
|
|
Panu Matilainen |
af9bdc |
@@ -357,6 +357,11 @@ package or when debugging this package.\
|
|
Panu Matilainen |
af9bdc |
%_javadir %{_datadir}/java
|
|
Panu Matilainen |
af9bdc |
%_javadocdir %{_datadir}/javadoc
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
af9bdc |
+
|
|
Panu Matilainen |
af9bdc |
+# Set ModularityLabel: for packages being build
|
|
Panu Matilainen |
af9bdc |
+#
|
|
Panu Matilainen |
af9bdc |
+#%modularitylabel
|
|
Panu Matilainen |
af9bdc |
+
|
|
Panu Matilainen |
af9bdc |
# A colon separated list of paths where files should *not* be installed.
|
|
Panu Matilainen |
af9bdc |
# Usually, these are network file system mount points.
|
|
Panu Matilainen |
af9bdc |
#
|
|
Panu Matilainen |
af9bdc |
diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at
|
|
Panu Matilainen |
af9bdc |
index 509277f2c..45d38698b 100644
|
|
Panu Matilainen |
af9bdc |
--- a/tests/rpmgeneral.at
|
|
Panu Matilainen |
af9bdc |
+++ b/tests/rpmgeneral.at
|
|
Panu Matilainen |
af9bdc |
@@ -150,6 +150,7 @@ LONGARCHIVESIZE
|
|
Panu Matilainen |
af9bdc |
LONGFILESIZES
|
|
Panu Matilainen |
af9bdc |
LONGSIGSIZE
|
|
Panu Matilainen |
af9bdc |
LONGSIZE
|
|
Panu Matilainen |
af9bdc |
+MODULARITYLABEL
|
|
Panu Matilainen |
af9bdc |
N
|
|
Panu Matilainen |
af9bdc |
NAME
|
|
Panu Matilainen |
af9bdc |
NEVR
|
|
Panu Matilainen |
af9bdc |
--
|
|
Panu Matilainen |
af9bdc |
2.17.2
|
|
Panu Matilainen |
af9bdc |
|
|
Panu Matilainen |
52b5a9 |
diff -up rpm-4.14.2.1/tests/rpmtests.zzz rpm-4.14.2.1/tests/rpmtests
|
|
Panu Matilainen |
52b5a9 |
--- rpm-4.14.2.1/tests/rpmtests.zzz 2018-12-19 15:30:40.536065873 +0200
|
|
Panu Matilainen |
52b5a9 |
+++ rpm-4.14.2.1/tests/rpmtests 2018-12-19 15:29:38.368156769 +0200
|
|
Panu Matilainen |
52b5a9 |
@@ -2682,6 +2682,7 @@ LONGARCHIVESIZE
|
|
Panu Matilainen |
52b5a9 |
LONGFILESIZES
|
|
Panu Matilainen |
52b5a9 |
LONGSIGSIZE
|
|
Panu Matilainen |
52b5a9 |
LONGSIZE
|
|
Panu Matilainen |
52b5a9 |
+MODULARITYLABEL
|
|
Panu Matilainen |
52b5a9 |
N
|
|
Panu Matilainen |
52b5a9 |
NAME
|
|
Panu Matilainen |
52b5a9 |
NEVR
|