summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/parsePreamble.c12
-rw-r--r--lib/rpmtag.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 523e452e3..c3370538a 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -837,6 +837,7 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
break;
}
case RPMTAG_COLLECTIONS:
+ case RPMTAG_BUILDINFO:
if (addOrAppendListEntry(pkg->header, tag, field))
goto exit;
break;
@@ -920,6 +921,7 @@ static struct PreambleRec_s const preambleList[] = {
{RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildsupplements")},
{RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildenhances")},
{RPMTAG_SECMANIFEST, 0, 0, LEN_AND_STR("manifest")},
+ {RPMTAG_BUILDINFO, 0, 0, LEN_AND_STR("buildinfo")},
{0, 0, 0, 0}
};
@@ -1058,7 +1060,15 @@ int parsePreamble(rpmSpec spec, int initialPackage)
}
}
- /*
+ {
+ /*
+ * Add system-wide Tizen build information
+ */
+ char *value = rpmExpand("%{?_buildinfo}", NULL);
+ addOrAppendListEntry(pkg->header, RPMTAG_BUILDINFO, value);
+ }
+
+ /*
* Expand buildroot one more time to get %{version} and the like
* from the main package, validate sanity. The spec->buildRoot could
* still contain unexpanded macros but it cannot be empty or '/', and it
diff --git a/lib/rpmtag.h b/lib/rpmtag.h
index 025a0a415..51691018e 100644
--- a/lib/rpmtag.h
+++ b/lib/rpmtag.h
@@ -307,6 +307,8 @@ typedef enum rpmTag_e {
RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */
RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */
RPMTAG_FILENLINKS = 5045, /* i[] extension */
+ /* Skip numbers which might be used in new RPM versions */
+ RPMTAG_BUILDINFO = 7000, /* s[] information about build */
RPMTAG_FIRSTFREE_TAG /*!< internal */
} rpmTag;