From 4ebe39ba25e44fb4059f7b984927d99252833ff5 Mon Sep 17 00:00:00 2001 From: Gleb Fotengauer-Malinovskiy Date: Fri, 16 May 2014 16:45:38 +0400 Subject: [PATCH] Backport Disttag: syntax to spec file parser and header content. Original commit by jbj@ (10336f1): - add Disttag: syntax to spec file parser and header content. --- build/parsePreamble.c | 4 ++++ lib/rpmlib.h | 1 + 2 files changed, 5 insertions(+) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 1e1e84f..1341f37 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -30,6 +30,7 @@ static rpmTag copyTagsDuringParse[] = { RPMTAG_CHANGELOGTEXT, RPMTAG_PREFIXES, RPMTAG_BUILDHOST, + RPMTAG_DISTTAG, 0 }; @@ -322,6 +323,7 @@ static struct optionalTag { { RPMTAG_DISTRIBUTION, "%{?distribution}" }, { RPMTAG_DISTURL, "%{?disturl}" }, { RPMTAG_BUILDHOST, "%{?buildhost}" }, + { RPMTAG_DISTTAG, "%{?disttag}"}, { -1, NULL } }; @@ -505,6 +507,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro, case RPMTAG_VERSION: case RPMTAG_RELEASE: case RPMTAG_URL: + case RPMTAG_DISTTAG: SINGLE_TOKEN_ONLY; /* These macros are for backward compatibility */ if (tag == RPMTAG_VERSION) { @@ -747,6 +750,7 @@ static struct PreambleRec_s preambleList[] = { {RPMTAG_AUTOREQ, 0, 0, "autoreq"}, {RPMTAG_AUTOPROV, 0, 0, "autoprov"}, {RPMTAG_DOCDIR, 0, 0, "docdir"}, + {RPMTAG_DISTTAG, 0, 0, "disttag"}, /*@-nullassign@*/ /* LCL: can't add null annotation */ {0, 0, 0, 0} /*@=nullassign@*/ diff --git a/lib/rpmlib.h b/lib/rpmlib.h index e11a1b3..52b93f1 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -416,6 +416,7 @@ typedef enum rpmTag_e { RPMTAG_FILEDEPENDSN = 1144, RPMTAG_DEPENDSDICT = 1145, RPMTAG_SOURCEPKGID = 1146, + RPMTAG_DISTTAG = 1155, /* s */ /*@-enummemuse@*/ RPMTAG_FIRSTFREE_TAG /*!< internal */ /*@=enummemuse@*/