[26873] trunk/dports/sysutils
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jul 10 01:54:33 PDT 2007
Revision: 26873
http://trac.macosforge.org/projects/macports/changeset/26873
Author: afb at macports.org
Date: 2007-07-10 01:54:32 -0700 (Tue, 10 Jul 2007)
Log Message:
-----------
- new port, APT for RPM (compare "apt")
- functional patches for Darwin/FreeBSD
- using DistroVerPkg "macports-release"
- sample config for a repo with MD data
Added Paths:
-----------
trunk/dports/sysutils/apt-rpm/
trunk/dports/sysutils/apt-rpm/Portfile
trunk/dports/sysutils/apt-rpm/files/
trunk/dports/sysutils/apt-rpm/files/apt.conf
trunk/dports/sysutils/apt-rpm/files/patch-genbasedir.diff
trunk/dports/sysutils/apt-rpm/files/patch-langinfo.diff
trunk/dports/sysutils/apt-rpm/files/patch-ostable.diff
trunk/dports/sysutils/apt-rpm/files/patch-rpmfdigests.diff
trunk/dports/sysutils/apt-rpm/files/patch-rpminclude.diff
trunk/dports/sysutils/apt-rpm/files/patch-rpmpsnum.diff
trunk/dports/sysutils/apt-rpm/files/patch-rpmsense.diff
trunk/dports/sysutils/apt-rpm/files/patch-scandir.diff
trunk/dports/sysutils/apt-rpm/files/rpmpriorities
trunk/dports/sysutils/apt-rpm/files/sources.list
Added: trunk/dports/sysutils/apt-rpm/Portfile
===================================================================
--- trunk/dports/sysutils/apt-rpm/Portfile (rev 0)
+++ trunk/dports/sysutils/apt-rpm/Portfile 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,50 @@
+# $Id$
+
+PortSystem 1.0
+
+name apt-rpm
+version 0.5.15lorg3.91
+platforms darwin freebsd
+categories sysutils
+maintainers afb at macports.org
+description Automatic updater and package installer/remover for RPM
+long_description APT-RPM is a port of Debian's apt tools for RPM based distributions. \
+ It provides the apt-get utility that provides a simple, safe way to \
+ install and upgrade packages. APT features complete installation \
+ ordering, multiple source capability and several other useful \
+ features.
+
+homepage http://apt-rpm.org/
+master_sites ${homepage}testing/
+distname apt-${version}
+use_bzip2 yes
+checksums md5 9af3e42693f494fb619a60542dfa30ca
+
+depends_lib lib:librpm:rpm lib:libxml2:libxml2 lib:libsqlite3:sqlite3
+
+patchfiles patch-ostable.diff patch-genbasedir.diff patch-langinfo.diff patch-scandir.diff \
+ patch-rpminclude.diff patch-rpmsense.diff patch-rpmfdigests.diff patch-rpmpsnum.diff
+
+post-patch {
+ reinplace "s;\"/\";\"${prefix}\";" apt-pkg/init.cc
+ reinplace "s;/bin/rpm;${prefix}/bin/rpm;" apt-pkg/rpm/rpmsystem.cc
+ reinplace "s;/var/cache/apt;${prefix}/var/cache/apt;" tools/cached_md5.cc
+}
+
+post-destroot {
+ copy -force ${filespath}/apt.conf ${destroot}${prefix}/etc/apt/apt.conf
+ reinplace "s|@@ARCH@@|${os.arch}|g" ${destroot}${prefix}/etc/apt/apt.conf
+ copy ${filespath}/sources.list ${destroot}${prefix}/etc/apt/sources.list
+ reinplace "s|@@PLATFORM@@|${os.platform}|g" ${destroot}${prefix}/etc/apt/sources.list
+ copy ${filespath}/rpmpriorities ${destroot}${prefix}/etc/apt/rpmpriorities
+ xinstall -d -m 755 ${destroot}${prefix}/etc/apt/apt.conf.d
+ xinstall -d -m 755 ${destroot}${prefix}/etc/apt/sources.list.d
+ xinstall -d -m 755 ${destroot}${prefix}/etc/apt/vendors.list.d
+ xinstall -d -m 755 ${destroot}${prefix}/var/cache/apt/archives/partial
+ xinstall -d -m 755 ${destroot}${prefix}/var/lib/apt/lists/partial
+ destroot.keepdirs ${destroot}${prefix}/etc/apt/apt.conf.d \
+ ${destroot}${prefix}/etc/apt/sources.list.d \
+ ${destroot}${prefix}/etc/apt/vendors.list.d \
+ ${destroot}${prefix}/var/cache/apt/archives/partial \
+ ${destroot}${prefix}/var/lib/apt/lists/partial
+}
Property changes on: trunk/dports/sysutils/apt-rpm/Portfile
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/dports/sysutils/apt-rpm/files/apt.conf
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/apt.conf (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/apt.conf 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,24 @@
+/* See apt.conf(5) for more information
+*/
+
+// Options for APT in general
+APT
+{
+
+ Architecture "@@ARCH@@";
+
+ DistroVerPkg "macports-release";
+
+ // Options for apt-get
+ Get
+ {
+ Download-Only "false";
+ };
+
+};
+
+// Options for the downloading routines
+Acquire
+{
+ Retries "0";
+};
Added: trunk/dports/sysutils/apt-rpm/files/patch-genbasedir.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-genbasedir.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-genbasedir.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,46 @@
+--- tools/genbasedir.orig 2007-02-23 16:36:43.000000000 +0100
++++ tools/genbasedir 2007-06-20 13:46:53.000000000 +0200
+@@ -46,7 +46,7 @@
+ phashstuff()
+ {
+ size=`getsize $1`
+- md5=`md5sum $1|cut -f1 -d\ `
++ md5=`md5 $1|cut -f4 -d\ `
+ echo " $md5 $size $2"
+ }
+
+@@ -152,7 +152,7 @@
+ exit 1
+ fi
+
+-topdir=`echo $topdir_/$1|tr -s /`
++topdir=`echo $_topdir/$1|tr -s /`
+ shift
+
+ components=$*
+@@ -449,14 +449,14 @@
+ if [ $partial -eq 0 ]; then
+ echo -n "Updating global release file... "
+ sed -n -e "/^MD5Sum:/q" \
+- -e "s/^Date:.*\$/Date: `date -R`/" \
++ -e "s/^Date:.*\$/Date: `date \"+%a, %d %b %Y %T %z\"`/" \
+ -e "s/^Components:.*\$/Components: $components/" \
+ -e "p" $release.old > $release
+ echo "MD5Sum:" >> $release
+ else
+ echo -n "Partially updating global release file... "
+ sed -n -e "/^\$/q" \
+- -e "s/^Date:.*\$/Date: `date -R`/" \
++ -e "s/^Date:.*\$/Date: `date \"+%a, %d %b %Y %T %z\"`/" \
+ -e "p" $release.old > $release.pre
+ for comp in $components; do
+ sed -e "\#^ .* $pkglist_.$comp\(.bz2\)\?\$#d" \
+@@ -477,7 +477,7 @@
+ echo "Label: Unknown" >> $release
+ echo "Suite: Unknown" >> $release
+ echo "Codename: Unknown" >> $release
+- echo "Date: `date -R`" >> $release
++ echo "Date: `date \"+%a, %d %b %Y %T %z\"`" >> $release
+ echo "Architectures: Unknown" >> $release
+ echo "Components: $components" >> $release
+ echo "Description: Not available" >> $release
Added: trunk/dports/sysutils/apt-rpm/files/patch-langinfo.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-langinfo.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-langinfo.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,10 @@
+--- cmdline/cmdline.cc.orig 2007-03-18 20:56:14.000000000 +0100
++++ cmdline/cmdline.cc 2007-06-20 13:50:35.000000000 +0200
+@@ -12,6 +12,7 @@
+ #include <regex.h>
+ #include <sys/stat.h>
+ #include <fnmatch.h>
++#include <langinfo.h>
+
+ using namespace std;
+
Added: trunk/dports/sysutils/apt-rpm/files/patch-ostable.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-ostable.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-ostable.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,13 @@
+--- buildlib/ostable.orig 2007-02-23 16:36:43.000000000 +0100
++++ buildlib/ostable 2007-06-20 09:45:36.000000000 +0200
+@@ -11,6 +11,10 @@
+ [^-]*-kfreebsd.*-gnu freebsd
+ [^-]*-gnu[^-]* hurd
+
++# These are used by MacPorts
++[^-]*-darwin.* darwin
++[^-]*-freebsd.* freebsd
++
+ # These are samples.
+ hp-hpux[^-]* hp-ux
+ sun-solaris[^-]* solaris
Added: trunk/dports/sysutils/apt-rpm/files/patch-rpmfdigests.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-rpmfdigests.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-rpmfdigests.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,19 @@
+--- ./apt-pkg/rpm/rpmpm.cc.orig 2007-05-29 20:59:09.000000000 +0200
++++ ./apt-pkg/rpm/rpmpm.cc 2007-06-20 11:28:44.000000000 +0200
+@@ -951,9 +951,15 @@
+ *tsFlags |= RPMTRANS_FLAG_JUSTDB;
+ else if (Opts->Value == "--test")
+ *tsFlags |= RPMTRANS_FLAG_TEST;
+-#if RPM_VERSION >= 0x040000
++#if RPM_VERSION >= 0x040000 && RPM_VERSION < 0x040400
+ else if (Opts->Value == "--nomd5")
+ *tsFlags |= RPMTRANS_FLAG_NOMD5;
++#endif
++#if RPM_VERSION >= 0x040400
++ else if (Opts->Value == "--nofdigests")
++ *tsFlags |= RPMTRANS_FLAG_NOFDIGESTS;
++#endif
++#if RPM_VERSION >= 0x040000
+ else if (Opts->Value == "--repackage")
+ *tsFlags |= RPMTRANS_FLAG_REPACKAGE;
+ #endif
Added: trunk/dports/sysutils/apt-rpm/files/patch-rpminclude.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-rpminclude.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-rpminclude.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,22 @@
+--- ./configure.ac.orig 2007-06-16 22:45:31.000000000 +0200
++++ ./configure.ac 2007-06-20 09:56:37.000000000 +0200
+@@ -74,7 +74,7 @@
+ [AC_MSG_ERROR([Can't find libz library])])
+ AC_CHECK_HEADERS(db1/db.h)
+
+- CPPFLAGS="$CPPFLAGS -I/usr/include/rpm"
++ CPPFLAGS="$CPPFLAGS -I$includedir/rpm"
+ AC_CHECK_HEADER(rpm/rpmlib.h, [],
+ [AC_MSG_ERROR([Can't find rpmlib.h])])
+
+--- ./configure.orig 2007-06-16 22:46:35.000000000 +0200
++++ ./configure 2007-06-20 09:56:16.000000000 +0200
+@@ -21591,7 +21591,7 @@
+ done
+
+
+- CPPFLAGS="$CPPFLAGS -I/usr/include/rpm"
++ CPPFLAGS="$CPPFLAGS -I$includedir/rpm"
+ if test "${ac_cv_header_rpm_rpmlib_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for rpm/rpmlib.h" >&5
+ echo $ECHO_N "checking for rpm/rpmlib.h... $ECHO_C" >&6; }
Added: trunk/dports/sysutils/apt-rpm/files/patch-rpmpsnum.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-rpmpsnum.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-rpmpsnum.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,20 @@
+--- ./apt-pkg/rpm/rpmpm.cc.orig 2007-06-20 13:16:55.000000000 +0200
++++ ./apt-pkg/rpm/rpmpm.cc 2007-06-20 13:21:31.000000000 +0200
+@@ -850,7 +850,7 @@
+ if (_config->FindB("RPM::NoDeps", false) == false) {
+ rc = rpmtsCheck(TS);
+ probs = rpmtsProblems(TS);
+- if (rc || probs->numProblems > 0) {
++ if (rc || rpmpsNumProblems(probs) > 0) {
+ rpmpsPrint(NULL, probs);
+ rpmpsFree(probs);
+ _error->Error(_("Transaction set check failed"));
+@@ -906,7 +906,7 @@
+
+ if (rc > 0) {
+ _error->Error(_("Error while running transaction"));
+- if (probs->numProblems > 0)
++ if (rpmpsNumProblems(probs) > 0)
+ rpmpsPrint(stderr, probs);
+ } else {
+ Success = true;
Added: trunk/dports/sysutils/apt-rpm/files/patch-rpmsense.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-rpmsense.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-rpmsense.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,46 @@
+--- ./apt-pkg/rpm/rpmhandler.cc.orig 2007-06-04 22:02:52.000000000 +0200
++++ ./apt-pkg/rpm/rpmhandler.cc 2007-06-20 10:58:35.000000000 +0200
+@@ -48,6 +48,11 @@
+ #define rpmxxInitIterator(a,b,c,d) rpmdbInitIterator(a,b,c,d)
+ #endif
+
++#ifndef _RPMEVR_INTERNAL
++// rpmevr.h/evrFlags_e
++#define RPMSENSE_ANY 0
++#endif
++
+ // An attempt to deal with false zero epochs from repomd. With older rpm's we
+ // can only blindly trust the repo admin created the repository with options
+ // suitable for those versions. For rpm >= 4.2.1 this is linked with
+@@ -231,7 +236,7 @@
+ if (Type == pkgCache::Dep::Depends) {
+ if (flags & RPMSENSE_PREREQ)
+ Type = pkgCache::Dep::PreDepends;
+-#if RPM_VERSION >= 0x040403
++#if RPM_VERSION >= 0x040403 && defined(_RPMEVR_INTERNAL)
+ else if (flags & RPMSENSE_MISSINGOK)
+ Type = pkgCache::Dep::Suggests;
+ #endif
+@@ -308,7 +313,7 @@
+ case pkgCache::Dep::Provides:
+ deptype = RPMTAG_PROVIDENAME;
+ break;
+-#if RPM_VERSION >= 0x040403
++#if RPM_VERSION >= 0x040403 && defined(_RPMEVR_INTERNAL)
+ case pkgCache::Dep::Suggests:
+ deptype = RPMTAG_SUGGESTNAME;
+ break;
+--- ./apt-pkg/rpm/rpmversion.cc.orig 2007-05-29 20:59:09.000000000 +0200
++++ ./apt-pkg/rpm/rpmversion.cc 2007-06-20 13:42:04.000000000 +0200
+@@ -32,6 +32,11 @@
+ #include <rpm/rpmds.h>
+ #endif
+
++#ifndef _RPMEVR_INTERNAL
++// rpmevr.h/evrFlags_e
++#define RPMSENSE_ANY 0
++#endif
++
+ rpmVersioningSystem rpmVS;
+
+ // rpmVS::rpmVersioningSystem - Constructor /*{{{*/
Added: trunk/dports/sysutils/apt-rpm/files/patch-scandir.diff
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/patch-scandir.diff (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/patch-scandir.diff 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,28 @@
+--- ./tools/genpkglist.cc.orig 2007-03-18 20:09:42.000000000 +0100
++++ ./tools/genpkglist.cc 2007-06-20 14:02:05.000000000 +0200
+@@ -334,7 +334,11 @@
+ }
+
+
++#if defined(__APPLE__) || defined(__FREEBSD__)
++int selectDirent(struct dirent *ent)
++#else
+ int selectDirent(const struct dirent *ent)
++#endif
+ {
+ int state = 0;
+ const char *p = ent->d_name;
+--- tools//gensrclist.cc.orig 2007-03-18 20:09:42.000000000 +0100
++++ tools//gensrclist.cc 2007-06-20 14:03:32.000000000 +0200
+@@ -55,7 +55,11 @@
+ };
+ int numTags = sizeof(tags) / sizeof(int);
+
++#if defined(__APPLE__) || defined(__FREEBSD__)
++int selectDirent(struct dirent *ent)
++#else
+ int selectDirent(const struct dirent *ent)
++#endif
+ {
+ int state = 0;
+ const char *p = ent->d_name;
Added: trunk/dports/sysutils/apt-rpm/files/rpmpriorities
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/rpmpriorities (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/rpmpriorities 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,2 @@
+Standard:
+ macports-release
Added: trunk/dports/sysutils/apt-rpm/files/sources.list
===================================================================
--- trunk/dports/sysutils/apt-rpm/files/sources.list (rev 0)
+++ trunk/dports/sysutils/apt-rpm/files/sources.list 2007-07-10 08:54:32 UTC (rev 26873)
@@ -0,0 +1,7 @@
+# See sources.list(5) for more information, especially
+# Remember that you can only use http, ftp or file URIs
+# CDROMs are managed through the apt-cdrom tool.
+#repomd http://macports.org/ packages/@@PLATFORM@@/$(ARCH)/RPMS/
+
+# Uncomment if you want the apt-get source function to work
+#repomd-src http://macports.org/ packages/SRPMS/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070710/ae69c1ec/attachment.html
More information about the macports-changes
mailing list