diff --git a/apt-0.5.15lorg3.94-makebuild.patch b/apt-0.5.15lorg3.94-makebuild.patch new file mode 100644 index 0000000..0baec59 --- /dev/null +++ b/apt-0.5.15lorg3.94-makebuild.patch @@ -0,0 +1,361 @@ +diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.cc apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.cc +--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.cc 2008-01-11 19:09:30.000000000 +0000 ++++ apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.cc 2008-08-01 11:02:07.000000000 +0100 +@@ -1,5 +1,6 @@ + #include + #include ++#define _RPM_4_4_COMPAT + #include + #include + +@@ -36,8 +37,8 @@ + void * rpmCallback(const void * arg, + #endif + const rpmCallbackType what, +- const rpmCallbackSize_t amount, +- const rpmCallbackSize_t total, ++ const rpm_loff_t amount, ++ const rpm_loff_t total, + const void * pkgKey, void * data) + + { +diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.h apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.h +--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.h 2008-01-11 19:09:30.000000000 +0000 ++++ apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.h 2008-08-01 11:01:32.000000000 +0100 +@@ -16,8 +16,8 @@ + void * rpmCallback(const void * arg, + #endif + const rpmCallbackType what, +- const rpmCallbackSize_t amount, +- const rpmCallbackSize_t total, ++ const rpm_loff_t amount, ++ const rpm_loff_t total, + const void * pkgKey, void * data); + + #endif /* _APTRPM_RPMCALLBACK_H */ +diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.cc apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.cc +--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.cc 2008-01-11 19:09:34.000000000 +0000 ++++ apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.cc 2008-07-28 12:06:19.000000000 +0100 +@@ -53,13 +53,7 @@ + #include + #include + +-// XXX we'd need to include rpmsq.h but it's not valid C++ in many +-// existing rpm versions so just declare rpmsqCaught extern.. sigh. +-#if 1 +-extern sigset_t rpmsqCaught; +-#else + #include +-#endif + + #define rpmxxInitIterator(a,b,c,d) rpmtsInitIterator(a,(rpmTag)b,c,d) + #else +@@ -138,7 +132,7 @@ + return false; + } + +-bool RPMHandler::InternalDep(const char *name, const char *ver, int_32 flag) ++bool RPMHandler::InternalDep(const char *name, const char *ver, rpmsenseFlags flag) + { + if (strncmp(name, "rpmlib(", strlen("rpmlib(")) == 0) { + #if RPM_VERSION >= 0x040100 +@@ -247,7 +241,7 @@ + return false; + } + +-bool RPMHandler::PutDep(const char *name, const char *ver, int_32 flags, ++bool RPMHandler::PutDep(const char *name, const char *ver, rpmsenseFlags flags, + unsigned int Type, vector &Deps) + { + if (InternalDep(name, ver, flags) == true) { +@@ -283,7 +277,7 @@ + { + char str[512] = ""; + rpm_count_t count; +- rpm_tagtype_t type; ++ rpmTagType type; + rpm_data_t val; + int_32 *epoch; + assert(HeaderP != NULL); +@@ -298,7 +292,7 @@ + off_t RPMHdrHandler::GetITag(rpmTag Tag) + { + rpm_count_t count; +- rpm_tagtype_t type; ++ rpmTagType type; + rpm_data_t val; + int_32 *num; + assert(HeaderP != NULL); +@@ -313,7 +307,7 @@ + const char *str; + rpm_data_t val; + rpm_count_t count; +- rpm_tagtype_t type; ++ rpmTagType type; + assert(HeaderP != NULL); + int rc = headerGetEntry(HeaderP, Tag, + &type, &val, &count); +@@ -462,7 +456,7 @@ + char **authorl = NULL; + char **entryl = NULL; + rpm_data_t timeval, authorval, entryval; +- rpm_tagtype_t type; ++ rpmTagType type; + rpm_count_t count; + int res; + +@@ -870,11 +864,11 @@ + * There's a WTF involved as rpmCheckSignals() actually calls exit() + * so we shouldn't even get here really?! + */ +- if (sigismember(&rpmsqCaught, SIGINT) || +- sigismember(&rpmsqCaught, SIGQUIT) || +- sigismember(&rpmsqCaught, SIGHUP) || +- sigismember(&rpmsqCaught, SIGTERM) || +- sigismember(&rpmsqCaught, SIGPIPE)) { ++ if (rpmsqIsCaught(SIGINT) || ++ rpmsqIsCaught(SIGQUIT) || ++ rpmsqIsCaught(SIGHUP) || ++ rpmsqIsCaught(SIGTERM) || ++ rpmsqIsCaught(SIGPIPE)) { + /* do nothing */ + } else if (Handler != NULL) { + rpmtsFree(Handler); +@@ -1265,7 +1259,7 @@ + return true; + } + for (xmlNode *n = prco->children; n; n = n->next) { +- int_32 RpmOp = 0; ++ int32_t RpmOp = 0; + string deptype, depver; + xmlChar *depname, *flags; + if ((depname = xmlGetProp(n, (xmlChar*)"name")) == NULL) continue; +@@ -1318,7 +1312,7 @@ + xmlFree(pre); + } + } +- PutDep((char*)depname, depver.c_str(), RpmOp, Type, Deps); ++ PutDep((char*)depname, depver.c_str(), (rpmsenseFlags)RpmOp, Type, Deps); + xmlFree(depname); + } + return true; +@@ -1741,7 +1735,7 @@ + } + } + string depname = prco->GetCol("name"); +- PutDep(depname.c_str(), depver.c_str(), RpmOp, Type, Deps); ++ PutDep(depname.c_str(), depver.c_str(), (rpmsenseFlags)RpmOp, Type, Deps); + } + delete prco; + return true; +diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.h apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.h +--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.h 2008-01-11 19:09:30.000000000 +0000 ++++ apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.h 2008-07-28 12:06:20.000000000 +0100 +@@ -21,6 +21,7 @@ + #include "sqlite.h" + #endif + ++#define _RPM_4_4_COMPAT + #include + #include + +@@ -63,8 +64,8 @@ + string ID; + + unsigned int DepOp(int_32 rpmflags); +- bool InternalDep(const char *name, const char *ver, int_32 flag); +- bool PutDep(const char *name, const char *ver, int_32 flags, ++ bool InternalDep(const char *name, const char *ver, rpmsenseFlags flag); ++ bool PutDep(const char *name, const char *ver, rpmsenseFlags flags, + unsigned int type, vector &Deps); + + public: +diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmversion.cc apt-0.5.15lorg3.94/apt-pkg/rpm/rpmversion.cc +--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmversion.cc 2008-01-11 19:09:34.000000000 +0000 ++++ apt-0.5.15lorg3.94/apt-pkg/rpm/rpmversion.cc 2008-07-28 12:06:19.000000000 +0100 +@@ -165,7 +165,7 @@ + bool rpmVersioningSystem::CheckDep(const char *PkgVer, + int Op,const char *DepVer) + { +- int PkgFlags = RPMSENSE_EQUAL; ++ rpmsenseFlags PkgFlags = RPMSENSE_EQUAL; + int DepFlags = 0; + bool invert = false; + int rc; +@@ -204,7 +204,7 @@ + + #if RPM_VERSION >= 0x040100 + rpmds pds = rpmdsSingle(RPMTAG_PROVIDENAME, "", PkgVer, PkgFlags); +- rpmds dds = rpmdsSingle(RPMTAG_REQUIRENAME, "", DepVer, DepFlags); ++ rpmds dds = rpmdsSingle(RPMTAG_REQUIRENAME, "", DepVer, (rpmsenseFlags)DepFlags); + #if RPM_VERSION >= 0x040201 + rpmdsSetNoPromote(pds, _rpmds_nopromote); + rpmdsSetNoPromote(dds, _rpmds_nopromote); +@@ -213,7 +213,7 @@ + rpmdsFree(pds); + rpmdsFree(dds); + #else +- rc = rpmRangesOverlap("", PkgVer, PkgFlags, "", DepVer, DepFlags); ++ rc = rpmRangesOverlap("", PkgVer, PkgFlags, "", DepVer, (rpmsenseFlags)DepFlags); + #endif + + return (!invert && rc) || (invert && !rc); +diff -ru apt-0.5.15lorg3.94.orig/tools/cached_md5.cc apt-0.5.15lorg3.94/tools/cached_md5.cc +--- apt-0.5.15lorg3.94.orig/tools/cached_md5.cc 2008-07-28 12:06:28.000000000 +0100 ++++ apt-0.5.15lorg3.94/tools/cached_md5.cc 2008-07-28 12:06:19.000000000 +0100 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#define _RPM_4_4_COMPAT + #include + #include + #include +diff -ru apt-0.5.15lorg3.94.orig/tools/genpkglist.cc apt-0.5.15lorg3.94/tools/genpkglist.cc +--- apt-0.5.15lorg3.94.orig/tools/genpkglist.cc 2008-07-28 12:06:28.000000000 +0100 ++++ apt-0.5.15lorg3.94/tools/genpkglist.cc 2008-07-28 12:06:19.000000000 +0100 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#define _RPM_4_4_COMPAT + #include + #include + #include +@@ -32,12 +33,11 @@ + #ifndef RPM_HAVE_DATA_T + typedef void * rpm_data_t; + typedef int_32 rpm_count_t; +-typedef int_32 rpm_tagtype_t; + #endif + + #define CRPMTAG_TIMESTAMP 1012345 + +-int tags[] = { ++rpmTag tags[] = { + RPMTAG_NAME, + RPMTAG_EPOCH, + RPMTAG_VERSION, +@@ -52,7 +52,7 @@ + + RPMTAG_DESCRIPTION, + RPMTAG_SUMMARY, +- /*RPMTAG_HEADERI18NTABLE*/ HEADER_I18NTABLE, ++ RPMTAG_HEADERI18NTABLE, + + RPMTAG_REQUIREFLAGS, + RPMTAG_REQUIRENAME, +@@ -72,7 +72,7 @@ + + RPMTAG_FILEFLAGS + }; +-int numTags = sizeof(tags) / sizeof(int); ++int numTags = sizeof(tags) / sizeof(rpmTag); + + + +@@ -105,7 +105,7 @@ + { + rpm_count_t i, i1, i2; + +- rpm_tagtype_t type1, type2, type3; ++ rpmTagType type1, type2, type3; + rpm_count_t count1, count2, count3; + char **dirnames = NULL, **basenames = NULL; + int_32 *dirindexes = NULL; +@@ -230,8 +230,8 @@ + #if RPM_VERSION >= 0x040000 + // No prototype from rpm after 4.0. + extern "C" { +-int headerGetRawEntry(Header h, int_32 tag, int_32 * type, +- void *p, int_32 *c); ++int headerGetRawEntry(Header h, rpmTag tag, rpmTagType* type, ++ void *p, rpm_count_t *c); + } + #endif + +@@ -247,7 +247,8 @@ + + // the std tags + for (i = 0; i < numTags; i++) { +- int_32 type, count; ++ rpmTagType type; ++ rpm_count_t count; + void *data; + int res; + +@@ -260,7 +261,7 @@ + } + + if (fullFileList) { +- rpm_tagtype_t type1, type2, type3; ++ rpmTagType type1, type2, type3; + rpm_count_t count1, count2, count3; + char **dnames, **bnames, **dindexes; + rpm_data_t dnameval, bnameval, dindexval; +@@ -288,7 +289,7 @@ + + // update index of srpms + if (idxfile) { +- rpm_tagtype_t type; ++ rpmTagType type; + rpm_count_t count; + rpm_data_t srpmval, nameval; + char *srpm, *name; +diff -ru apt-0.5.15lorg3.94.orig/tools/gensrclist.cc apt-0.5.15lorg3.94/tools/gensrclist.cc +--- apt-0.5.15lorg3.94.orig/tools/gensrclist.cc 2008-07-28 12:06:28.000000000 +0100 ++++ apt-0.5.15lorg3.94/tools/gensrclist.cc 2008-07-28 12:06:19.000000000 +0100 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#define _RPM_4_4_COMPAT + #include + #include + #include +@@ -32,7 +33,7 @@ + + using namespace std; + +-int tags[] = { ++rpmTag tags[] = { + RPMTAG_NAME, + RPMTAG_EPOCH, + RPMTAG_VERSION, +@@ -47,13 +48,13 @@ + + RPMTAG_DESCRIPTION, + RPMTAG_SUMMARY, +- /*RPMTAG_HEADERI18NTABLE*/ HEADER_I18NTABLE, ++ RPMTAG_HEADERI18NTABLE, + + RPMTAG_REQUIREFLAGS, + RPMTAG_REQUIRENAME, + RPMTAG_REQUIREVERSION + }; +-int numTags = sizeof(tags) / sizeof(int); ++int numTags = sizeof(tags) / sizeof(rpmTag); + + #if defined(__APPLE__) || defined(__FREEBSD__) + int selectDirent(struct dirent *ent) +@@ -139,8 +140,8 @@ + #if RPM_VERSION >= 0x040000 + extern "C" { + // No prototype from rpm after 4.0. +-int headerGetRawEntry(Header h, int_32 tag, int_32 * type, +- void *p, int_32 *c); ++int headerGetRawEntry(Header h, rpmTag tag, rpmTagType* type, ++ void *p, rpm_count_t* c); + } + #endif + +@@ -334,7 +335,8 @@ + + // the std tags + for (i = 0; i < numTags; i++) { +- int type, count; ++ rpmTagType type; ++ rpm_count_t count; + void *data; + int res; + diff --git a/apt.spec b/apt.spec index 42e1af5..f077955 100644 --- a/apt.spec +++ b/apt.spec @@ -6,7 +6,7 @@ Summary: Debian's Advanced Packaging Tool with RPM support Name: apt Version: 0.5.15lorg3.94 -Release: 3%{?dist} +Release: 4%{?dist} Group: System Environment/Base URL: http://apt-rpm.org/ # SourceLicense: GPLv2+ except lua/ which is MIT @@ -38,6 +38,8 @@ Patch0: apt-0.5.15lorg3.2-ppc.patch Patch1: apt-0.5.15lorg3.x-cache-corruption.patch Patch2: apt-0.5.15lorg3.94-tool-headers.patch Patch3: apt-0.5.15lorg3.94-gcc43.patch +# for rpm 4.6 +Patch4: apt-0.5.15lorg3.94-makebuild.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -124,6 +126,7 @@ RHL/RHEL/FC distributions. %patch1 -p0 -b .mmap %patch2 -p1 -b .toolheader %patch3 -p1 -b .gcc43 +%patch4 -p1 -b .rpm46 install -pm 644 %{SOURCE19} comps2prio.xsl @@ -289,6 +292,9 @@ fi %changelog +* Fri Aug 1 2008 Axel Thimm - 0.5.15lorg3.94-4 +- Support for rpm 4.6 (Caolan McNamara ). + * Fri Feb 22 2008 Panu Matilainen 0.5.15lorg3.94-3 - add missing include for gcc 4.3 (#433982) - remove bogus build dependencies from ancient times