[Rpm-maint] [PATCH 2/6] Remove the existing %policy directive
Steve Lawrence
slawrence at tresys.com
Mon Aug 30 20:32:28 UTC 2010
Remove the existing %policy directive, to be replaced with a new
%sepolicy section with more configurable options.
---
build/files.c | 14 ++------------
lib/rpmfi.h | 1 -
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/build/files.c b/build/files.c
index cf5e804..3f3fc58 100644
--- a/build/files.c
+++ b/build/files.c
@@ -864,7 +864,6 @@ static VFA_t virtualFileAttributes[] = {
{ "%readme", 0, RPMFILE_README },
{ "%license", 0, RPMFILE_LICENSE },
{ "%pubkey", 0, RPMFILE_PUBKEY },
- { "%policy", 0, RPMFILE_POLICY },
{ NULL, 0, 0 }
};
@@ -932,7 +931,7 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
if (fl->currentFlags & RPMFILE_DOC) {
rstrscat(&specialDocBuf, " ", s, NULL);
} else
- if (fl->currentFlags & (RPMFILE_POLICY|RPMFILE_PUBKEY))
+ if (fl->currentFlags & RPMFILE_PUBKEY)
{
*fileName = s;
} else {
@@ -1587,7 +1586,7 @@ static rpmRC recurseDir(FileList fl, const char * diskPath)
}
/**
- * Add a pubkey/policy/icon to a binary package.
+ * Add a pubkey/icon to a binary package.
* @param pkg
* @param fl package file tree walk data
* @param fileName path to file, relative is builddir, absolute buildroot.
@@ -1630,13 +1629,6 @@ static rpmRC processMetadataFile(Package pkg, FileList fl,
apkt = pgpArmorWrap(PGPARMOR_PUBKEY, pkt, pktlen);
break;
}
- case RPMTAG_POLICIES:
- if ((xx = rpmioSlurp(fn, &pkt, &pktlen)) != 0 || pkt == NULL) {
- rpmlog(RPMLOG_ERR, _("%s: policy file read failed.\n"), fn);
- goto exit;
- }
- apkt = b64encode(pkt, pktlen, -1);
- break;
}
if (!apkt) {
@@ -1889,8 +1881,6 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg,
dupAttrRec(&fl.cur_ar, specialDocAttrRec);
} else if (fl.currentFlags & RPMFILE_PUBKEY) {
(void) processMetadataFile(pkg, &fl, fileName, RPMTAG_PUBKEYS);
- } else if (fl.currentFlags & RPMFILE_POLICY) {
- (void) processMetadataFile(pkg, &fl, fileName, RPMTAG_POLICIES);
} else {
(void) processBinaryFile(pkg, &fl, fileName);
}
diff --git a/lib/rpmfi.h b/lib/rpmfi.h
index 2e2910b..d4123d0 100644
--- a/lib/rpmfi.h
+++ b/lib/rpmfi.h
@@ -60,7 +60,6 @@ typedef enum rpmfileAttrs_e {
RPMFILE_EXCLUDE = (1 << 9), /*!< from %%exclude, internal */
RPMFILE_UNPATCHED = (1 << 10), /*!< placeholder (SuSE) */
RPMFILE_PUBKEY = (1 << 11), /*!< from %%pubkey */
- RPMFILE_POLICY = (1 << 12) /*!< from %%policy */
} rpmfileAttrs;
#define RPMFILE_ALL ~(RPMFILE_NONE)
--
1.6.2.5
More information about the Rpm-maint
mailing list