RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [email protected] Module: rpm Date: 29-Feb-2012 05:22:27 Branch: rpm-5_4 Handle: 2012022904222601 Added files: (Branch: rpm-5_4) rpm/rpmio tgit.c tsvn.c Modified files: (Branch: rpm-5_4) rpm CHANGES configure.ac devtool.conf rpm/rpmio .cvsignore Makefile.am rpmgit.c rpmgit.h rpmsvn.c rpmsvn.h Log: - stub-in autofu for svn/git objects. Summary: Revision Changes Path 1.3501.2.215+1 -0 rpm/CHANGES 2.472.2.42 +27 -1 rpm/configure.ac 2.365.2.25 +3 -0 rpm/devtool.conf 1.41.2.1 +2 -0 rpm/rpmio/.cvsignore 1.293.2.5 +10 -4 rpm/rpmio/Makefile.am 2.1.2.1 +19 -0 rpm/rpmio/rpmgit.c 2.1.2.1 +48 -0 rpm/rpmio/rpmgit.h 2.1.2.1 +14 -1 rpm/rpmio/rpmsvn.c 2.1.2.1 +7 -1 rpm/rpmio/rpmsvn.h 1.1.2.1 +34 -0 rpm/rpmio/tgit.c 1.1.2.1 +31 -0 rpm/rpmio/tsvn.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3501.2.214 -r1.3501.2.215 CHANGES --- rpm/CHANGES 28 Feb 2012 21:45:58 -0000 1.3501.2.214 +++ rpm/CHANGES 29 Feb 2012 04:22:26 -0000 1.3501.2.215 @@ -1,4 +1,5 @@ 5.4.6 -> 5.4.7: + - jbj: stub-in autofu for svn/git objects. - jbj: ispras: upgrade to abi-sanity.checker.pl to 1.12.9. - jbj: macosx: permit (custom built) libtomcrypt in buildbot's. - jbj: devtool: stanza for Fedorable 16. @@ . patch -p0 <<'@@ .' Index: rpm/configure.ac ============================================================================ $ cvs diff -u -r2.472.2.41 -r2.472.2.42 configure.ac --- rpm/configure.ac 27 Feb 2012 01:19:51 -0000 2.472.2.41 +++ rpm/configure.ac 29 Feb 2012 04:22:26 -0000 2.472.2.42 @@ -1419,7 +1419,7 @@ dnl # Libsepol RPM_CHECK_LIB( [Libsepol], [sepol], - [sepol], [sepol], [sepol/sepol.h], + [sepol], [sepol_policydb_create], [sepol/sepol.h], [no,external:none], [], [ AC_DEFINE(WITH_SEPOL, 1, [Define if building with Libsepol]) ], []) @@ -1482,6 +1482,32 @@ fi ], [ AC_MSG_WARN([No Neon library found, using unsupported configuration]) ]) +# Libgit2 +RPM_CHECK_LIB( + [Libgit2], [libgit2], + [git2], [git_repository_open], [git2.h], + [no,external:none], [], + [ AC_DEFINE(WITH_LIBGIT2, 1, [Define if building with Libgit2]) + ], []) + +# APR +RPM_CHECK_LIB( + [Apr], [apr], + [apr-1], [apr_initialize], [apr-1/apr.h], + [no,external:none], [], + [ AC_DEFINE(WITH_APR, 1, [Define if building with Apr]) + CPPFLAGS="$CPPFLAGS -I$prefix/include/apr-1" + ], []) + +# Subversion +RPM_CHECK_LIB( + [Subversion], [subversion], + [svn_client-1], [svn_client_create_context], [subversion-1/svn_client.h], + [no,external:none], [], + [ AC_DEFINE(WITH_SUBVERSION, 1, [Define if building with Subversion]) + CPPFLAGS="$CPPFLAGS -I$prefix/include/subversion-1" + ], []) + dnl # File (magic) WITH_FILE_INTERNAL=false RPM_CHECK_LIB( @@ . patch -p0 <<'@@ .' Index: rpm/devtool.conf ============================================================================ $ cvs diff -u -r2.365.2.24 -r2.365.2.25 devtool.conf --- rpm/devtool.conf 28 Feb 2012 22:18:01 -0000 2.365.2.24 +++ rpm/devtool.conf 29 Feb 2012 04:22:26 -0000 2.365.2.25 @@ -456,6 +456,9 @@ --with-selinux \ --with-sepol \ --with-semanage \ + --with-libgit2 \ + --with-apr \ + --with-subversion \ --without-squirrel \ --with-build-extlibdep \ --with-build-maxextlibdep \ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore ============================================================================ $ cvs diff -u -r1.41 -r1.41.2.1 .cvsignore --- rpm/rpmio/.cvsignore 12 Aug 2010 13:39:55 -0000 1.41 +++ rpm/rpmio/.cvsignore 29 Feb 2012 04:22:27 -0000 1.41.2.1 @@ -38,6 +38,7 @@ tdir tfts tget +tgit tglob thkp tinv @@ -53,6 +54,7 @@ trpmio truby tsexp +tsvn tsw ttcl ttpm @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am ============================================================================ $ cvs diff -u -r1.293.2.4 -r1.293.2.5 Makefile.am --- rpm/rpmio/Makefile.am 15 Aug 2011 20:33:16 -0000 1.293.2.4 +++ rpm/rpmio/Makefile.am 29 Feb 2012 04:22:27 -0000 1.293.2.5 @@ -11,15 +11,15 @@ fnmatch_loop.c getdate.y rpmcpio.c rpmcpio.h \ rpmgenbasedir.c rpmgenpkglist.c rpmgensrclist.c \ rpmjsio.msg rpmtar.c rpmtar.h \ - tdir.c tfts.c tget.c tglob.c thkp.c thtml.c tinv.c tkey.c tmire.c \ - tput.c trpmio.c tsexp.c tsw.c lookup3.c tpw.c \ + tdir.c tfts.c tget.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c \ + tmire.c tput.c trpmio.c tsexp.c tsvn.c tsw.c lookup3.c tpw.c \ librpmio.vers testit.sh EXTRA_PROGRAMS = bsdiff bspatch rpmborg rpmcpio rpmcurl rpmdpkg \ rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \ rpmpbzip2 rpmpigz rpmtar rpmz \ - tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic tmire \ - tperl tpython tput tpw trpmio tsexp tsw ttcl \ + tasn tdir tfts tget tgit tglob thkp thtml tinv tkey tmacro tmagic \ + tmire tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \ dumpasn1 lookup3 if WITH_TPM @@ -329,6 +329,9 @@ tget_SOURCES = tget.c tget_LDADD = $(RPMIO_LDADD_COMMON) +tgit_SOURCES = tgit.c +tgit_LDADD = $(RPMIO_LDADD_COMMON) + tglob_SOURCES = tglob.c tglob_LDADD = $(RPMIO_LDADD_COMMON) @@ -377,6 +380,9 @@ tsexp_SOURCES = tsexp.c tsexp_LDFLAGS = $(RPMIO_LDADD_COMMON) +tsvn_SOURCES = tsvn.c +tsvn_LDADD = $(RPMIO_LDADD_COMMON) + tsw_SOURCES = tsw.c tsw_LDFLAGS = $(RPMIO_LDADD_COMMON) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmgit.c ============================================================================ $ cvs diff -u -r2.1 -r2.1.2.1 rpmgit.c --- rpm/rpmio/rpmgit.c 12 Aug 2010 13:39:55 -0000 2.1 +++ rpm/rpmio/rpmgit.c 29 Feb 2012 04:22:27 -0000 2.1.2.1 @@ -8,7 +8,12 @@ #include <rpmio.h> /* for *Pool methods */ #include <rpmlog.h> #include <rpmurl.h> + +#if defined(HAVE_GIT2_H) +#include <git2.h> #define _RPMGIT_INTERNAL +#endif + #include <rpmgit.h> #include "debug.h" @@ -22,6 +27,13 @@ { rpmgit git = _git; +#if defined(WITH_LIBGIT2) + if (git->repo) { + git_repository_free(git->repo); + git->repo = NULL; + } +#endif + git->fn = _free(git->fn); } @@ -46,11 +58,18 @@ rpmgit rpmgitNew(const char * fn, int flags) { + static const char _gitfn[] = "/var/tmp/rpm/.git"; rpmgit git = rpmgitGetPool(_rpmgitPool); int xx; + if (fn == NULL) + fn = _gitfn; if (fn) git->fn = xstrdup(fn); +#if defined(WITH_LIBGIT2) + git_repository_open(&git->repo, fn); +#endif + return rpmgitLink(git); } @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmgit.h ============================================================================ $ cvs diff -u -r2.1 -r2.1.2.1 rpmgit.h --- rpm/rpmio/rpmgit.h 12 Aug 2010 13:39:55 -0000 2.1 +++ rpm/rpmio/rpmgit.h 29 Feb 2012 04:22:27 -0000 2.1.2.1 @@ -21,6 +21,54 @@ struct rpmgit_s { struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */ const char * fn; + + git_repository * repo; + git_oid oid; + git_odb * odb; + git_odb_object * obj; + git_otype otype; + git_commit * commit; + git_signature * author; + git_signature * cmtter; + const char * message; + time_t ctime; + unsigned int parents; + unsigned int p; + + git_oid tree_id; + git_oid parent_id; + git_oid commit_id; + git_tree * tree; + git_commit * parent; + + git_tag * tag; + const char * tmessage; + const char * tname; + git_otype ttype; + + git_tree_entry * entry; + git_object * objt; + + git_blob * blob; + git_revwalk * walk; + git_commit * wcommit; + + git_signature * cauth; + const char * cmsg; + + git_index * index; + unsigned int i; + unsigned int ecount; + git_index_entry * e; + + git_strarray ref_list; + const char * refname; + git_reference * ref; + + const char * email; + int32_t j; + git_config * cfg; + #if defined(__LCLINT__) /*@refs@*/ int nrefs; /*!< (unused) keep splint happy */ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsvn.c ============================================================================ $ cvs diff -u -r2.1 -r2.1.2.1 rpmsvn.c --- rpm/rpmio/rpmsvn.c 12 Aug 2010 13:39:55 -0000 2.1 +++ rpm/rpmio/rpmsvn.c 29 Feb 2012 04:22:27 -0000 2.1.2.1 @@ -8,7 +8,15 @@ #include <rpmio.h> /* for *Pool methods */ #include <rpmlog.h> #include <rpmurl.h> -#define _RPMSVN_INTERNAL + +#if defined(WITH_SUBVERSION) +#include "svn_pools.h" +#include "svn_client.h" +#include "svn_repos.h" +#include "svn_subst.h" +#define _RPMSVN_INTERNAL +#endif + #include <rpmsvn.h> #include "debug.h" @@ -22,7 +30,10 @@ { rpmsvn svn = _svn; +#if defined(WITH_SUBVERSION) svn->fn = _free(svn->fn); +#endif + } /*@unchecked@*/ /*@only@*/ /*@null@*/ @@ -49,8 +60,10 @@ rpmsvn svn = rpmsvnGetPool(_rpmsvnPool); int xx; +#if defined(WITH_SUBVERSION) if (fn) svn->fn = xstrdup(fn); +#endif return rpmsvnLink(svn); } @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmsvn.h ============================================================================ $ cvs diff -u -r2.1 -r2.1.2.1 rpmsvn.h --- rpm/rpmio/rpmsvn.h 12 Aug 2010 13:39:55 -0000 2.1 +++ rpm/rpmio/rpmsvn.h 29 Feb 2012 04:22:27 -0000 2.1.2.1 @@ -15,12 +15,18 @@ typedef /*@refcounted@*/ struct rpmsvn_s * rpmsvn; #if defined(_RPMSVN_INTERNAL) - /** \ingroup rpmio */ struct rpmsvn_s { struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */ const char * fn; + + apr_pool_t * pool; + svn_repos_t * repos; + svn_revnum_t committed_rev; + svn_fs_txn_t *txn; + svn_fs_root_t *txn_root; + #if defined(__LCLINT__) /*@refs@*/ int nrefs; /*!< (unused) keep splint happy */ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/tgit.c ============================================================================ $ cvs diff -u -r0 -r1.1.2.1 tgit.c --- /dev/null 2012-02-29 05:22:00.000000000 +0100 +++ tgit.c 2012-02-29 05:22:27.843374139 +0100 @@ -0,0 +1,34 @@ +#include "system.h" + +#include <git2.h> + +#include <poptIO.h> + +#define _RPMGIT_INTERNAL +#include <rpmgit.h> + +#include "debug.h" + +static struct poptOption rpmgitOptionsTable[] = { + { "debug", 'd', POPT_ARG_VAL, &_rpmmg_debug, -1, NULL, NULL }, + POPT_AUTOHELP + POPT_TABLEEND +}; + +int +main(int argc, char *argv[]) +{ + poptContext con = rpmioInit(argc, argv, rpmgitOptionsTable); + rpmgit git; + int rc = 0; + +_rpmgit_debug = -1; + + git = rpmgitNew(NULL, 0); + + git = rpmgitFree(git); + +/*@i@*/ urlFreeCache(); + + return rc; +} @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/tsvn.c ============================================================================ $ cvs diff -u -r0 -r1.1.2.1 tsvn.c --- /dev/null 2012-02-29 05:22:00.000000000 +0100 +++ tsvn.c 2012-02-29 05:22:27.863375193 +0100 @@ -0,0 +1,31 @@ +#include "system.h" + +#include <poptIO.h> + +#include <rpmsvn.h> + +#include "debug.h" + +static struct poptOption rpmsvnOptionsTable[] = { + { "debug", 'd', POPT_ARG_VAL, &_rpmmg_debug, -1, NULL, NULL }, + POPT_AUTOHELP + POPT_TABLEEND +}; + +int +main(int argc, char *argv[]) +{ + poptContext con = rpmioInit(argc, argv, rpmsvnOptionsTable); + rpmsvn svn; + int rc = 0; + +_rpmsvn_debug = -1; + + svn = rpmsvnNew(NULL, 0); + + svn = rpmsvnFree(svn); + +/*@i@*/ urlFreeCache(); + + return rc; +} @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository [email protected]
