summaryrefslogtreecommitdiffstats
path: root/RPM4
diff options
context:
space:
mode:
Diffstat (limited to 'RPM4')
-rw-r--r--RPM4/MANIFEST1
-rw-r--r--RPM4/src/Makefile.PL2
-rw-r--r--RPM4/src/RPM4.h2
-rw-r--r--RPM4/src/RPM4.xs21
-rw-r--r--RPM4/src/RPM4sign.c35
5 files changed, 22 insertions, 39 deletions
diff --git a/RPM4/MANIFEST b/RPM4/MANIFEST
index 73d2269..9022fb6 100644
--- a/RPM4/MANIFEST
+++ b/RPM4/MANIFEST
@@ -5,7 +5,6 @@ ChangeLog
src/Makefile.PL
src/RPM4.h
src/RPM4.xs
-src/RPM4sign.c
src/rpmconstant.c
src/rpmconstant.h
src/rpmconstant_internal.c
diff --git a/RPM4/src/Makefile.PL b/RPM4/src/Makefile.PL
index c9be8d8..28a6f59 100644
--- a/RPM4/src/Makefile.PL
+++ b/RPM4/src/Makefile.PL
@@ -87,7 +87,7 @@ RPMCONSTTBL
WriteMakefile(
NAME => 'RPM4',
VERSION_FROM => '../lib/RPM4.pm',
- OBJECT => "RPM4.o RPM4sign.o $obj",
+ OBJECT => "RPM4.o $obj",
INC => "-I$rpmheaderlocation",
LIBS => "-lrpmsign -lrpm -lrpmio -lrpmbuild -lpopt -lz -lbz2 $ldd",
'CCFLAGS' => "-Wall $fl",
diff --git a/RPM4/src/RPM4.h b/RPM4/src/RPM4.h
index ffa08c8..31abb5d 100644
--- a/RPM4/src/RPM4.h
+++ b/RPM4/src/RPM4.h
@@ -8,8 +8,6 @@
/* Hdlistsign.c: imported but modified functions */
-int rpmsign(char *passphrase, const char *rpm);
-
int rpmchecksig(rpmts ts, const char * filename, int flags);
/* rpmlib does not export some usefull functions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index a2002ea..e2ee589 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -84,6 +84,10 @@
#include <rpm/rpmlog.h>
#include <rpm/rpmpgp.h>
#include <rpm/rpmtag.h>
+#include <rpm/rpmcli.h>
+#ifdef RPM4_9_0
+#include <rpm/rpmsign.h>
+#endif
#ifdef HAVE_RPMCONSTANT
#include <rpmconstant/rpmconstant.h>
@@ -489,6 +493,23 @@ int _headername_vs_dep(Header h, rpmds dep, int nopromote) {
/* return 1 if match */
}
+/* Hight level function */
+int rpmsign(char *passphrase, const char *rpm) {
+#ifdef RPM4_9_0
+ return rpmPkgSign(rpm, NULL, passphrase);
+#else
+ QVA_t qva = &rpmQVKArgs;
+ ARGV_t file = NULL;
+
+ argvAdd(&file, rpm);
+
+ qva->qva_mode = RPMSIGN_ADD_SIGNATURE;
+ qva->passPhrase = passphrase;
+
+ return rpmcliSign(NULL, qva, file);
+#endif
+}
+
MODULE = RPM4 PACKAGE = RPM4
BOOT:
diff --git a/RPM4/src/RPM4sign.c b/RPM4/src/RPM4sign.c
deleted file mode 100644
index 13f4fad..0000000
--- a/RPM4/src/RPM4sign.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $Id$ */
-
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-#include "rpmversion.h"
-
-#undef Fflush
-#undef Mkdir
-#undef Stat
-
-#include <rpm/rpmcli.h>
-#ifdef RPM4_9_0
-#include <rpm/rpmsign.h>
-#endif
-
-#include "RPM4.h"
-
-/* Hight level function */
-int rpmsign(char *passphrase, const char *rpm) {
-#ifdef RPM4_9_0
- return rpmPkgSign(rpm, NULL, passphrase);
-#else
- QVA_t qva = &rpmQVKArgs;
- ARGV_t file = NULL;
-
- argvAdd(&file, rpm);
-
- qva->qva_mode = RPMSIGN_ADD_SIGNATURE;
- qva->passPhrase = passphrase;
-
- return rpmcliSign(NULL, qva, file);
-#endif
-}
-