summaryrefslogtreecommitdiff
path: root/build/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'build/files.c')
-rw-r--r--build/files.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/build/files.c b/build/files.c
index d12e3248f..63cac8bc3 100644
--- a/build/files.c
+++ b/build/files.c
@@ -826,6 +826,7 @@ static VFA_t const virtualAttrs[] = {
{ "%readme", RPMFILE_README },
{ "%license", RPMFILE_LICENSE },
{ "%pubkey", RPMFILE_PUBKEY },
+ { "%manifest", RPMFILE_SECMANIFEST },
{ NULL, 0 }
};
@@ -840,7 +841,7 @@ static rpmRC parseForSimple(char * buf, FileEntry cur, ARGV_t * fileNames)
{
char *s, *t;
rpmRC res = RPMRC_OK;
- int allow_relative = (RPMFILE_PUBKEY|RPMFILE_DOC|RPMFILE_LICENSE);
+ int allow_relative = (RPMFILE_PUBKEY|RPMFILE_DOC|RPMFILE_LICENSE|RPMFILE_SECMANIFEST);
t = buf;
while ((s = strtokWithQuotes(t, " \t\n")) != NULL) {
@@ -1554,6 +1555,15 @@ static rpmRC processMetadataFile(Package pkg, FileList fl,
apkt = pgpArmorWrap(PGPARMOR_PUBKEY, pkt, pktlen);
break;
}
+ case RPMTAG_SECMANIFEST: {
+ if ((xx = rpmioSlurp(fn, &pkt, &pktlen)) != 0 || pkt == NULL) {
+ rpmlog(RPMLOG_ERR, _("%s: Security manifest file read failed.\n"), fn);
+ goto exit;
+ }
+ apkt = rpmBase64Encode(pkt, pktlen, -1);
+ rpmlog(RPMLOG_INFO, _("Aptk: %s\n"), apkt);
+ break;
+ }
}
if (!apkt) {
@@ -1896,6 +1906,8 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
argvAdd(&(fl.docDirs), *fn);
} else if (fl.cur.attrFlags & RPMFILE_PUBKEY) {
(void) processMetadataFile(pkg, &fl, *fn, RPMTAG_PUBKEYS);
+ } else if (fl.cur.attrFlags & RPMFILE_SECMANIFEST) {
+ (void) processMetadataFile(pkg, &fl, *fn, RPMTAG_SECMANIFEST);
} else {
if (fl.cur.attrFlags & RPMFILE_DIR)
fl.cur.isDir = 1;