[CVS] RPM: rpm/tools/ Makefile.am dbconvert.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 10-Apr-2011 22:37:00 Branch: HEAD Handle: 201104102037 Modified files: rpm/tools Makefile.am dbconvert.c Log: - dbconvert: rework the indentation. more todo++. Summary: RevisionChanges Path 2.172 +2 -1 rpm/tools/Makefile.am 2.5 +352 -376 rpm/tools/dbconvert.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.171 -r2.172 Makefile.am --- rpm/tools/Makefile.am 27 Jan 2011 00:58:02 - 2.171 +++ rpm/tools/Makefile.am 10 Apr 2011 20:37:00 - 2.172 @@ -57,6 +57,7 @@ pkgbin_PROGRAMS =\ @WITH_AUGEAS_AUGTOOL@ chroot cp @WITH_CUDF_CUDFTOOL@ find mtree \ @WITH_SEMANAGE_SEMODULE@ wget \ + dbconvert \ rpmcache rpmdigest rpmrepo rpmspecdump \ rpmcmp rpmdeps sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ dist_man_MANS = rpmgrep.1 @@ -80,7 +81,7 @@ dbconvert_SOURCES = dbconvert.c dbconvert_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) -dbconvert_LDADD =$(RPMIO_LDADD_COMMON) +dbconvert_LDADD =$(RPM_LDADD_COMMON) debugedit_SOURCES = debugedit.c hashtab.c debugedit_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) @@ . patch -p0 '@@ .' Index: rpm/tools/dbconvert.c $ cvs diff -u -r2.4 -r2.5 dbconvert.c --- rpm/tools/dbconvert.c 10 Apr 2011 18:34:11 - 2.4 +++ rpm/tools/dbconvert.c 10 Apr 2011 20:37:00 - 2.5 @@ -1,22 +1,21 @@ -#include fcntl.h -#include libintl.h -#include glob.h -#include errno.h -#include stdint.h -#include popt.h +#include system.h -#define _RPMDB_INTERNAL -#define _RPMTAG_INTERNAL -#define WITH_DB +#include poptIO.h -#include argv.h #include rpmio.h -#include rpmtag.h -#include rpmdb.h +#include rpmlog.h #include rpmmacro.h +#include argv.h + +#define _RPMTAG_INTERNAL +#define _RPMDB_INTERNAL +#include rpmdb.h + #include rpmts.h -#include rpmlog.h +#include rpmrc.h + +#include debug.h #if BYTE_ORDER == LITTLE_ENDIAN #define bswap32(x) htobe32(x) @@ -24,6 +23,11 @@ #define bswap32(x) htole32(x) #endif +static char *rootPath = NULL; +static int dbType = 0; +static int byteOrder = 0; +static int rebuildDb = 0; + static int disable_fsync(int arg) { return 0; @@ -39,17 +43,17 @@ static int bdb_log_lsn_reset(DB_ENV * dbenv) { -int ret = 0; char **list = NULL; +int ret = 0; + /* Reset log sequence numbers to allow for moving to new environment */ -if (! - (ret = - dbenv-log_archive(dbenv, list, DB_ARCH_DATA | DB_ARCH_ABS))) { +ret = dbenv-log_archive(dbenv, list, DB_ARCH_DATA | DB_ARCH_ABS); +if (!ret) { char **p = list; for (; *p; p++) if (!ret) ret = dbenv-lsn_reset(dbenv, *p, 0); - _free(list); + list = _free(list); } return ret; } @@ -58,23 +62,45 @@ rpmdb_convert(const char *prefix, int dbtype, int swap, int rebuild) { rpmts tsCur = NULL; -int xx, i; -const char *dbpath = NULL; -const char *__dbi_txn = NULL; -const char *_dbi_tags = NULL; -const char *_dbi_config = NULL; -const char *_dbi_config_Packages = NULL; +rpmts tsNew = NULL; +rpmdb rdbNew = NULL; +DB_ENV *dbenvNew = NULL; +struct stat sb; + +const char * dbpath = rpmExpand(%{?_dbpath}, NULL); +const char * __dbi_txn = rpmExpand(%{__dbi_txn}, NULL); +const char * _dbi_tags = rpmExpand(%{_dbi_tags}, NULL); +const char * _dbi_config = rpmExpand(%{_dbi_config}, NULL); +const char * _dbi_config_Packages = + rpmExpand(%{_dbi_config_Packages}, NULL); + const char *fn = NULL; const char *tmppath = NULL; glob_t gl = {.gl_pathc = 0,.gl_pathv = NULL,.gl_offs = 0 }; -unsetenv(TMPDIR); -rpmReadConfigFiles(NULL, NULL); -dbpath = rpmExpand(%{?_dbpath}, NULL); -__dbi_txn = rpmExpand(%{__dbi_txn}, NULL); -_dbi_tags = rpmExpand(%{_dbi_tags}, NULL); -_dbi_config = rpmExpand(%{_dbi_config}, NULL); -_dbi_config_Packages = rpmExpand(%{_dbi_config_Packages}, NULL); +DBC *dbcpCur = NULL; +DBC *dbcpNew = NULL; +dbiIndex dbiCur = NULL; +dbiIndex dbiNew = NULL; +DB_TXN
[CVS] RPM: rpm/tools/ Makefile.am
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Eric Veith Root: /v/rpm/cvs Email: eve...@rpm5.org Module: rpm Date: 16-Sep-2010 20:11:31 Branch: HEAD Handle: 2010091618113000 Modified files: rpm/tools Makefile.am Log: Add dbsql to pkgbin_PROGRAMS only if wanted during configure Summary: RevisionChanges Path 2.167 +1 -1 rpm/tools/Makefile.am patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.166 -r2.167 Makefile.am --- rpm/tools/Makefile.am 28 Aug 2010 20:39:19 - 2.166 +++ rpm/tools/Makefile.am 16 Sep 2010 18:11:30 - 2.167 @@ -54,7 +54,7 @@ pkgbindir = @USRLIBRPM@/bin pkgbin_PROGRAMS =\ - @WITH_AUGEAS_AUGTOOL@ chroot cp @WITH_CUDF_CUDFTOOL@ dbsql find mtree \ + @WITH_AUGEAS_AUGTOOL@ chroot cp @WITH_CUDF_CUDFTOOL@ find mtree \ @WITH_SEMANAGE_SEMODULE@ sqlite3 wget \ rpmcache rpmdigest rpmrepo rpmspecdump \ rpmcmp rpmdeps sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/tools/ Makefile.am dbsql.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Apr-2010 18:24:41 Branch: HEAD Handle: 2010040416244100 Modified files: rpm/tools Makefile.am dbsql.c Log: - dbsql: replace BDB - RPM AutoFu. Summary: RevisionChanges Path 2.161 +1 -2 rpm/tools/Makefile.am 2.2 +55 -124rpm/tools/dbsql.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.160 -r2.161 Makefile.am --- rpm/tools/Makefile.am 4 Apr 2010 16:02:08 - 2.160 +++ rpm/tools/Makefile.am 4 Apr 2010 16:24:41 - 2.161 @@ -277,8 +277,7 @@ if WITH_DBSQL pkgbin_PROGRAMS += dbsql dbsql_SOURCES= dbsql.c -dbsql_CFLAGS = $(CFLAGS) \ - -D_HAVE_SQLITE_CONFIG_H -I../db3/sql -I../db/sql/generated +dbsql_CFLAGS = $(CFLAGS) -I../db3/sql -I../db/sql/generated dbsql_LDFLAGS= @LDFLAGS_STATIC@ $(LDFLAGS) dbsql_LDADD = \ $(top_builddir)/db3/libdb_sql-5.0.la @@ . patch -p0 '@@ .' Index: rpm/tools/dbsql.c $ cvs diff -u -r2.1 -r2.2 dbsql.c --- rpm/tools/dbsql.c 4 Apr 2010 16:02:08 - 2.1 +++ rpm/tools/dbsql.c 4 Apr 2010 16:24:41 - 2.2 @@ -21,37 +21,70 @@ ** Include the configuration header output by 'configure' if we're using the ** autoconf-based build */ -#ifdef _HAVE_SQLITE_CONFIG_H -#include config.h + +#include system.h + +#include stdarg.h + +#define _RPMSQL_INTERNAL +#include rpmsql.h + +/* +** Build options detected by SQLite's configure script but not normally part +** of config.h. Accept what configure detected unless it was overridden on the +** command line. +*/ +#ifndef HAVE_EDITLINE +#define HAVE_EDITLINE 0 +#endif +#if !HAVE_EDITLINE +#undef HAVE_EDITLINE #endif -#ifdef ANDROID -#ifndef NO_ANDROID_FUNCS -#includesqlite3_android.h +#ifndef HAVE_READLINE +#define HAVE_READLINE 0 #endif +#if !HAVE_READLINE +#undef HAVE_READLINE #endif -#include stdlib.h -#include string.h -#include stdio.h -#include assert.h -#include sqlite3.h -#include ctype.h -#include stdarg.h +#ifndef SQLITE_OS_UNIX +#define SQLITE_OS_UNIX 1 +#endif +#if !SQLITE_OS_UNIX +#undef SQLITE_OS_UNIX +#endif -#if !defined(_WIN32) !defined(WIN32) !defined(__OS2__) -# include signal.h -# if !defined(__RTP__) !defined(_WRS_KERNEL) -# include pwd.h -# endif -# include unistd.h -# include sys/types.h +#ifndef SQLITE_OS_WIN +#define SQLITE_OS_WIN 0 +#endif +#if !SQLITE_OS_WIN +#undef SQLITE_OS_WIN #endif -#ifdef __OS2__ -# include unistd.h +#ifndef SQLITE_THREADSAFE +#define SQLITE_THREADSAFE 1 +#endif +#if !SQLITE_THREADSAVE +#undef SQLITE_THREADSAVE +#endif + +#ifndef SQLITE_THREAD_OVERRIDE_LOCK +#define SQLITE_THREAD_OVERRIDE_LOCK -1 +#endif +#if !SQLITE_THREAD_OVERRIDE_LOCK +#undef SQLITE_THREAD_OVERRIDE_LOCK #endif +#ifndef SQLITE_TEMP_STORE +#define SQLITE_TEMP_STORE 1 +#endif +#if !SQLITE_THREAD_OVERRIDE_LOCK +#undef SQLITE_THREAD_OVERRIDE_LOCK +#endif + +#include sqlite3.h + #if defined(HAVE_EDITLINE) HAVE_EDITLINE==1 #include editline/readline.h #elif defined(HAVE_READLINE) HAVE_READLINE==1 @@ -65,27 +98,7 @@ # define stifle_history(X) #endif -#if defined(_WIN32) || defined(WIN32) -# include io.h -#define isatty(h) _isatty(h) -#define access(f,m) _access((f),(m)) -#else -/* Make sure isatty() has a prototype. -*/ -extern int isatty(); -#endif - -#if defined(_WIN32_WCE) -/* Windows CE (arm-wince-mingw32ce-gcc) does not provide isatty() - * thus we always assume that we have a console. That can be - * overridden with the -batch command line option. - */ -#define isatty(x) 1 -#endif - -#if !defined(_WIN32) !defined(WIN32) !defined(__OS2__) !defined(__RTP__) !defined(_WRS_KERNEL) -#include sys/time.h -#include sys/resource.h +#include debug.h /* Saved resource information for the beginning of an operation */ static struct rusage sBegin; @@ -125,87 +138,6 @@ #define END_TIMER endTimer() #define HAS_TIMER 1 -#elif (defined(_WIN32) || defined(WIN32)) - -#include windows.h - -/* Saved resource information for the beginning of an operation */ -static HANDLE hProcess; -static FILETIME ftKernelBegin; -static FILETIME ftUserBegin; -typedef BOOL (WINAPI
[CVS] RPM: rpm/tools/ Makefile.am nix-hash.c nix-hash.cc xiu-hash.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 26-Mar-2010 15:09:23 Branch: HEAD Handle: 2010032614092300 Added files: rpm/tools nix-hash.cc xiu-hash.c Modified files: rpm/tools Makefile.am Removed files: rpm/tools nix-hash.c Log: - nix: flip to nix-hash.cc for now. Summary: RevisionChanges Path 2.154 +9 -4 rpm/tools/Makefile.am 2.2 +0 -405rpm/tools/nix-hash.c 2.1 +67 -0 rpm/tools/nix-hash.cc 2.1 +405 -0 rpm/tools/xiu-hash.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.153 -r2.154 Makefile.am --- rpm/tools/Makefile.am 24 Mar 2010 18:42:00 - 2.153 +++ rpm/tools/Makefile.am 26 Mar 2010 14:09:23 - 2.154 @@ -26,7 +26,7 @@ nix-build nix-channel nix-collect-garbage nix-copy-closure \ nix-hash nix-install-package nix-instantiate \ nix-prefetch-url nix-pull nix-push nix-store \ - xiu-instantiate xiu-store \ + xiu-hash xiu-instantiate xiu-store \ rpmkey sandbox semodule spooktool RPMMISC_LDADD_COMMON = \ @@ -96,9 +96,10 @@ nix_copy_closure_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) nix_copy_closure_LDADD = $(RPMIO_LDADD_COMMON) -nix_hash_SOURCES = nix-hash.c -nix_hash_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) -nix_hash_LDADD = $(RPMIO_LDADD_COMMON) +nix_hash_SOURCES = nix-hash.cc +nix_hash_LDADD = -L/usr/lib/nix -lmain -lexpr -lstore -lutil -lformat \ +/usr/lib/nix/libATerm.a +nix_hash_LDFLAGS = -Wl,-rpath -Wl,/usr/lib/nix nix_install_package_SOURCES =nix-install-package.c nix_install_package_LDFLAGS =@LDFLAGS_STATIC@ $(LDFLAGS) @@ -173,6 +174,10 @@ wget_SOURCES = rpmwget.c wget_LDADD = $(RPMIO_LDADD_COMMON) +xiu_hash_SOURCES = xiu-hash.c +xiu_hash_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) +xiu_hash_LDADD = $(RPMIO_LDADD_COMMON) + xiu_instantiate_SOURCES = xiu-instantiate.c xiu_instantiate_LDADD= $(RPMIO_LDADD_COMMON) # -L/usr/lib/nix -lmain -lexpr -lstore -lutil -lformat /usr/lib/nix/libATerm.a xiu_instantiate_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) # -Wl,-rpath -Wl,/usr/lib/nix @@ . rm -f rpm/tools/nix-hash.c '@@ .' Index: rpm/tools/nix-hash.c [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED] @@ . patch -p0 '@@ .' Index: rpm/tools/nix-hash.cc $ cvs diff -u -r0 -r2.1 nix-hash.cc --- /dev/null 2010-03-26 15:08:21 +0100 +++ nix-hash.cc 2010-03-26 15:09:23 +0100 @@ -0,0 +1,67 @@ +#include iostream + +#include hash.hh +#include shared.hh + +/* #include help.txt.hh */ +static unsigned char helpText[] = {0x55, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x6e, 0x69, 0x78, 0x2d, 0x68, 0x61, 0x73, 0x68, 0x20, 0x5b, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x2e, 0x2e, 0x2e, 0x5d, 0x20, 0x5b, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x2e, 0x2e, 0x2e, 0x5d, 0x0a, 0x0a, 0x60, 0x6e, 0x69, 0x78, 0x2d, 0x68, 0x61, 0x73, 0x68, 0x27, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x20, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x2d, 0x2d, 0x66, 0x6c, 0x61, 0x74, 0x3a, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x63 , 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x20, 0x20, 0x2d, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x33, 0x32, 0x3a, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x33, 0x32, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x68, 0x65, 0x78, 0x61, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x0a, 0x20, 0x20, 0x2d, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x20, 0x48, 0x41, 0x53, 0x48, 0x3a, 0x20, 0x75, 0x73, 0x65, 0x20, 0x68, 0x61, 0x73, 0x68, 0x20,
[CVS] RPM: rpm/tools/ Makefile.am cudftool.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 22-Dec-2009 16:56:12 Branch: HEAD Handle: 2009122215561101 Modified files: rpm/tools Makefile.am cudftool.c Log: - cudf: start hacking up a cudf_fini() to tear down an OCAML runtime. - cudf: fix: do lazy cudf_init() now that the fake_argv[] has a NULL sentinel. Summary: RevisionChanges Path 2.144 +1 -1 rpm/tools/Makefile.am 2.3 +139 -0 rpm/tools/cudftool.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.143 -r2.144 Makefile.am --- rpm/tools/Makefile.am 18 Dec 2009 20:31:01 - 2.143 +++ rpm/tools/Makefile.am 22 Dec 2009 15:56:12 - 2.144 @@ -68,7 +68,7 @@ cudftool_SOURCES = cudftool.c cudftool_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) $(shell pkg-config --cflags glib-2.0) cudftool_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) $(shell pkg-config --libs glib-2.0) -cudftool_LDADD = # $(RPMIO_LDADD_COMMON) +cudftool_LDADD = $(RPMIO_LDADD_COMMON) debugedit_SOURCES = debugedit.c hashtab.c debugedit_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) @@ . patch -p0 '@@ .' Index: rpm/tools/cudftool.c $ cvs diff -u -r2.2 -r2.3 cudftool.c --- rpm/tools/cudftool.c 19 Dec 2009 17:08:00 - 2.2 +++ rpm/tools/cudftool.c 22 Dec 2009 15:56:11 - 2.3 @@ -431,6 +431,12 @@ static rpmcudf rpmcudfNew(const char * fn, int flags) { rpmcudf cudf = rpmcudfGetPool(_rpmcudfPool); +static int oneshot = 0; + +if (!oneshot) { + cudf_init(); + oneshot++; +} if (fn != NULL) { if (flags) @@ -444,6 +450,132 @@ } /*==*/ +typedef struct { + void *block; /* address of the malloced block this chunk live in */ + size_t alloc; /* in bytes, used for compaction */ + size_t size; /* in bytes */ + char *next; +} heap_chunk_head; + +#define Chunk_size(c) (((heap_chunk_head *) (c)) [-1]).size +#define Chunk_alloc(c) (((heap_chunk_head *) (c)) [-1]).alloc +#define Chunk_next(c) (((heap_chunk_head *) (c)) [-1]).next +#define Chunk_block(c) (((heap_chunk_head *) (c)) [-1]).block +extern char * caml_heap_start; + +struct caml_ref_table { + void **base; + void **end; + void **threshold; + void **ptr; + void **limit; + size_t size; + size_t reserve; +}; +extern struct caml_ref_table caml_ref_table; +extern struct caml_ref_table caml_weak_ref_table; + +#define Page_log 12 /* A page is 4 kilobytes. */ +#define Pagetable2_log 11 +#define Pagetable2_size (1 Pagetable2_log) +#define Pagetable1_log (Page_log + Pagetable2_log) +#define Pagetable1_size (1 (32 - Pagetable1_log)) +extern unsigned char * caml_page_table[Pagetable1_size]; + +struct channel { + int fd; /* Unix file descriptor */ + off_t offset; /* Absolute position of fd in the file */ + char * end; /* Physical end of the buffer */ + char * curr; /* Current position in the buffer */ + char * max; /* Logical end of the buffer (for input) */ + void * mutex; /* Placeholder for mutex (for systhreads) */ + struct channel * next, * prev;/* Double chaining of channels (flush_all) */ + int revealed; /* For Cash only */ + int old_revealed; /* For Cash only */ + int refcount; /* For flush_all and for Cash */ + int flags;/* Bitfield */ + char buff[1]; /* The buffer itself */ +}; +extern struct channel * caml_all_opened_channels; + +struct ext_table { + int size; + int capacity; + void ** contents; +}; +extern struct ext_table caml_prim_table; + +extern void * caml_stack_low; + +extern char * caml_young_start; +extern char * caml_young_end; +extern char * caml_young_ptr; +extern char * caml_young_limit; + +static void +cudf_fini(void) +{ +void * _p = caml_heap_start; +void * _block = Chunk_block(_p); +size_t _alloc = Chunk_alloc(_p); +size_t _size = Chunk_size(_p); +void * _next = Chunk_next(_p); +void * _base; +void * _empty; +struct channel * _c; + +int i; + +
[CVS] RPM: rpm/tools/ Makefile.am sandbox.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 15-Sep-2009 17:18:38 Branch: HEAD Handle: 2009091515183700 Added files: rpm/tools sandbox.c Modified files: rpm/tools Makefile.am Log: - swipe a copy og sandbox.c from Google chromium. Summary: RevisionChanges Path 2.136 +4 -1 rpm/tools/Makefile.am 2.1 +356 -0 rpm/tools/sandbox.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.135 -r2.136 Makefile.am --- rpm/tools/Makefile.am 12 Sep 2009 21:30:56 - 2.135 +++ rpm/tools/Makefile.am 15 Sep 2009 15:18:37 - 2.136 @@ -22,7 +22,7 @@ EXTRA_DIST = hashtab.h -EXTRA_PROGRAMS = augtool debugedit rpmkey semodule spooktool +EXTRA_PROGRAMS = augtool debugedit rpmkey sandbox semodule spooktool RPMMISC_LDADD_COMMON = \ $(top_builddir)/misc/librpmmisc.la \ @@ -93,6 +93,9 @@ semodule_SOURCES = semodule.c semodule_LDADD = $(RPM_LDADD_COMMON) +sandbox_SOURCES =sandbox.c +sandbox_LDADD = $(RPM_LDADD_COMMON) + spooktool_SOURCES = spooktool.c spooktool_LDADD =$(RPM_LDADD_COMMON) @@ . patch -p0 '@@ .' Index: rpm/tools/sandbox.c $ cvs diff -u -r0 -r2.1 sandbox.c --- /dev/null 2009-09-15 17:15:29 +0200 +++ sandbox.c 2009-09-15 17:18:38 +0200 @@ -0,0 +1,356 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox + +#define _GNU_SOURCE +#include asm/unistd.h +#include errno.h +#include fcntl.h +#include sched.h +#include signal.h +#include stdarg.h +#include stdio.h +#include stdlib.h +#include string.h +#include sys/prctl.h +#include sys/resource.h +#include sys/socket.h +#include sys/stat.h +#include sys/time.h +#include sys/types.h +#include unistd.h +#include stdbool.h + +/* - #include suid_unsafe_environment_variables.h */ +static const char* kSUIDUnsafeEnvironmentVariables[] = { + LD_AOUT_LIBRARY_PATH, + LD_AOUT_PRELOAD, + GCONV_PATH, + GETCONF_DIR, + HOSTALIASES, + LD_AUDIT, + LD_DEBUG, + LD_DEBUG_OUTPUT, + LD_DYNAMIC_WEAK, + LD_LIBRARY_PATH, + LD_ORIGIN_PATH, + LD_PRELOAD, + LD_PROFILE, + LD_SHOW_AUXV, + LD_USE_LOAD_BIAS, + LOCALDOMAIN, + LOCPATH, + MALLOC_TRACE, + NIS_PATH, + NLSPATH, + RESOLV_HOST_CONF, + RES_OPTIONS, + TMPDIR, + TZDIR, + NULL, +}; + +// Return a malloc allocated string containing the 'saved' environment variable +// name for a given environment variable. +static inline char* SandboxSavedEnvironmentVariable(const char* envvar) { + const size_t envvar_len = strlen(envvar); + const size_t saved_envvarlen = envvar_len + 1 /* NUL terminator */ + + 8 /* strlen(SANDBOX_) */; + char* const saved_envvar = (char*) malloc(saved_envvarlen); + if (!saved_envvar) +return NULL; + + memcpy(saved_envvar, SANDBOX_, 8); + memcpy(saved_envvar + 8, envvar, envvar_len); + saved_envvar[8 + envvar_len] = 0; + + return saved_envvar; +} +/* - */ + +#if !defined(CLONE_NEWPID) +#define CLONE_NEWPID 0x2000 +#endif + +#if defined(LINUX_SANDBOX_CHROME_PATH) +static const char kChromeBinary[] = LINUX_SANDBOX_CHROME_PATH; +#endif + +static const char kSandboxDescriptorEnvironmentVarName[] = SBX_D; + +// These are the magic byte values which the sandboxed process uses to request +// that it be chrooted. +static const char kMsgChrootMe = 'C'; +static const char kMsgChrootSuccessful = 'O'; + +static void FatalError(const char *msg, ...) +__attribute__((noreturn, format(printf,1,2))); + +static void FatalError(const char *msg, ...) { + va_list ap; + va_start(ap, msg); + + vfprintf(stderr, msg, ap); + fprintf(stderr, : %s\n, strerror(errno)); + fflush(stderr); + exit(1); +} + +static int CloneChrootHelperProcess() { + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == -1) { +perror(socketpair); +return -1; + } + + // We create a temp directory for our chroot. Nobody should ever write into + // it, so it's root:root mode 000. + char kTempDirectoryTemplate[] =
[CVS] RPM: rpm/tools/ Makefile.am cp.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 01-Sep-2009 23:20:19 Branch: HEAD Handle: 2009090121201900 Added files: rpm/tools cp.c Modified files: rpm/tools Makefile.am Log: - swipe a copy of FreeBSD cp(1) to extract a fts(3) based tree copy. Summary: RevisionChanges Path 2.132 +4 -1 rpm/tools/Makefile.am 2.1 +1028 -0rpm/tools/cp.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.131 -r2.132 Makefile.am --- rpm/tools/Makefile.am 23 Aug 2009 19:25:38 - 2.131 +++ rpm/tools/Makefile.am 1 Sep 2009 21:20:19 - 2.132 @@ -22,7 +22,7 @@ EXTRA_DIST = hashtab.h -EXTRA_PROGRAMS = augtool debugedit rpmkey +EXTRA_PROGRAMS = augtool cp debugedit rpmkey RPMMISC_LDADD_COMMON = \ $(top_builddir)/misc/librpmmisc.la \ @@ -56,6 +56,9 @@ augtool_SOURCES =augtool.c augtool_LDADD = $(RPM_LDADD_COMMON) -lreadline +cp_SOURCES = cp.c +cp_LDADD = $(RPM_LDADD_COMMON) + debugedit_SOURCES = debugedit.c hashtab.c debugedit_LDADD =$(RPM_LDADD_COMMON) @@ . patch -p0 '@@ .' Index: rpm/tools/cp.c $ cvs diff -u -r0 -r2.1 cp.c --- /dev/null 2009-09-01 23:19:10 +0200 +++ cp.c 2009-09-01 23:20:19 +0200 @@ -0,0 +1,1028 @@ +/*- + * Copyright (c) 1988, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * David Hitz of Auspex Systems Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include sys/cdefs.h + +/* + * Cp copies source files to target files. + * + * The global PATH_T structure to always contains the path to the + * current target file. Since fts(3) does not change directories, + * this path can be either absolute or dot-relative. + * + * The basic algorithm is to initialize to and use fts(3) to traverse + * the file hierarchy rooted in the argument list. A trivial case is the + * case of 'cp file1 file2'. The more interesting case is the case of + * 'cp file1 file2 ... fileN dir' where the hierarchy is traversed and the + * path (relative to the root of the traversal) is appended to dir (stored + * in to) to form the final target path. + */ + +#include sys/types.h +#include sys/stat.h +#include sys/time.h + +#include err.h +#include errno.h +#ifdef NOTYET +#include fts.h +#else +#include /usr/include/fts.h +#endif +#include limits.h +#include signal.h +#include stdio.h +#include stdlib.h +#include string.h +#include unistd.h + +#if defined(__linux__) +#include utime.h + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval =
[CVS] RPM: rpm/tools/ Makefile.am rpmfind.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 10-Jul-2009 19:21:58 Branch: HEAD Handle: 2009071017215800 Modified files: rpm/tools Makefile.am rpmfind.c Log: - find: install in /usr/lib/rpm/bin. Summary: RevisionChanges Path 2.130 +3 -2 rpm/tools/Makefile.am 2.8 +1 -1 rpm/tools/rpmfind.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.129 -r2.130 Makefile.am --- rpm/tools/Makefile.am 2 Jul 2009 00:30:33 - 2.129 +++ rpm/tools/Makefile.am 10 Jul 2009 17:21:58 - 2.130 @@ -20,7 +20,7 @@ EXTRA_DIST = hashtab.h -EXTRA_PROGRAMS = augtool debugedit find rpmkey +EXTRA_PROGRAMS = augtool debugedit rpmkey RPMMISC_LDADD_COMMON = \ $(top_builddir)/misc/librpmmisc.la \ @@ -46,7 +46,8 @@ pkgbindir = @USRLIBRPM@/bin pkgbin_PROGRAMS =\ - rpmcache rpmdigest grep mtree rpmrepo rpmspecdump wget \ + find grep mtree wget \ + rpmcache rpmdigest rpmrepo rpmspecdump \ rpmcmp rpmdeps @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ dist_man_MANS = rpmgrep.1 @@ . patch -p0 '@@ .' Index: rpm/tools/rpmfind.c $ cvs diff -u -r2.7 -r2.8 rpmfind.c --- rpm/tools/rpmfind.c 3 Jul 2009 22:03:56 - 2.7 +++ rpm/tools/rpmfind.c 10 Jul 2009 17:21:58 - 2.8 @@ -1075,7 +1075,7 @@ static int ugwidth = 8; char modep[15]; -(void)printf(%6lu %8lld , (unsigned long) sb-st_ino, (long long)sb-st_blocks); +(void)printf(%10lu %8lld , (unsigned long) sb-st_ino, (long long)sb-st_blocks); (void)strmode(sb-st_mode, modep); (void)printf(%s %3u %-*s %-*s , modep, sb-st_nlink, ugwidth, user_from_uid(sb-st_uid, 0), @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/tools/ Makefile.am augtool.c augtool.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 14-Jun-2009 19:09:13 Branch: HEAD Handle: 2009061417091300 Modified files: rpm/tools Makefile.am augtool.c Removed files: rpm/tools augtool.h Log: - augtool: merge augtool.h into augtool.c and eliminate. Summary: RevisionChanges Path 2.128 +1 -1 rpm/tools/Makefile.am 2.2 +101 -53rpm/tools/augtool.c 2.2 +0 -525rpm/tools/augtool.h patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.127 -r2.128 Makefile.am --- rpm/tools/Makefile.am 14 Jun 2009 16:13:21 - 2.127 +++ rpm/tools/Makefile.am 14 Jun 2009 17:09:13 - 2.128 @@ -18,7 +18,7 @@ @WITH_PCRE_CPPFLAGS@ \ @WITH_XAR_CPPFLAGS@ -EXTRA_DIST = augtool.h hashtab.h +EXTRA_DIST = hashtab.h EXTRA_PROGRAMS = augtool debugedit rpmkey @@ . patch -p0 '@@ .' Index: rpm/tools/augtool.c $ cvs diff -u -r2.1 -r2.2 augtool.c --- rpm/tools/augtool.c 14 Jun 2009 16:13:21 - 2.1 +++ rpm/tools/augtool.c 14 Jun 2009 17:09:13 - 2.2 @@ -20,16 +20,95 @@ * Author: David Lutterkort dlut...@redhat.com */ -#include config.h -#include augeas.h -#include augtool.h +#include system.h +#include augeas.h #include readline/readline.h #include readline/history.h #include argz.h #include getopt.h -#include limits.h -#include ctype.h + +#include debug.h + +/* = internal.h */ + +#if !defined(SEP) +#define SEP '/' +#endif + +#define DATADIR /usr/share + +/* Define: AUGEAS_LENS_DIR + * The default location for lens definitions */ +#define AUGEAS_LENS_DIR DATADIR /augeas/lenses + +/* The directory where we install lenses distribute with Augeas */ +#define AUGEAS_LENS_DIST_DIR DATADIR /augeas/lenses/dist + +/* Define: AUGEAS_ROOT_ENV + * The env var that points to the chroot holding files we may modify. + * Mostly useful for testing */ +#define AUGEAS_ROOT_ENV AUGEAS_ROOT + +/* Define: AUGEAS_FILES_TREE + * The root for actual file contents */ +#define AUGEAS_FILES_TREE /files + +/* Define: AUGEAS_META_TREE + * Augeas reports some information in this subtree */ +#define AUGEAS_META_TREE /augeas + +/* Define: AUGEAS_META_FILES + * Information about files */ +#define AUGEAS_META_FILES AUGEAS_META_TREE AUGEAS_FILES_TREE + +/* Define: AUGEAS_META_ROOT + * The root directory */ +#define AUGEAS_META_ROOT AUGEAS_META_TREE /root + +/* Define: AUGEAS_META_SAVE_MODE + * How we save files. One of 'backup', 'overwrite' or 'newfile' */ +#define AUGEAS_META_SAVE_MODE AUGEAS_META_TREE /save + +/* Define: AUGEAS_CLONE_IF_RENAME_FAILS + * Control what save does when renaming the temporary file to its final + * destination fails with EXDEV or EBUSY: when this tree node exists, copy + * the file contents. If it is not present, simply give up and report an + * error. */ +#define AUGEAS_COPY_IF_RENAME_FAILS \ +AUGEAS_META_SAVE_MODE /copy_if_rename_fails + +/* A hierarchy where we record certain 'events', e.g. which tree + * nodes actually gotsaved into files */ +#define AUGEAS_EVENTS AUGEAS_META_TREE /events + +#define AUGEAS_EVENTS_SAVED AUGEAS_EVENTS /saved + +/* Where to put information about parsing of path expressions */ +#define AUGEAS_META_PATHX AUGEAS_META_TREE /pathx + +/* Define: AUGEAS_LENS_ENV + * Name of env var that contains list of paths to search for additional + spec files */ +#define AUGEAS_LENS_ENV AUGEAS_LENS_LIB + +/* Define: MAX_ENV_SIZE + * Fairly arbitrary bound on the length of the path we + * accept from AUGEAS_SPEC_ENV */ +#define MAX_ENV_SIZE 4096 + +/* Define: PATH_SEP_CHAR + * Character separating paths in a list of paths */ +#define PATH_SEP_CHAR ':' + +/* Constants for setting the save mode via the augeas path at + * AUGEAS_META_SAVE_MODE */ +#define AUG_SAVE_BACKUP_TEXT backup +#define AUG_SAVE_NEWFILE_TEXT newfile +#define AUG_SAVE_NOOP_TEXT noop +#define AUG_SAVE_OVERWRITE_TEXT overwrite + +/* = */ struct command { const char *name; @@ -48,7 +127,6 @@ const char *root = NULL; char *loadpath = NULL; - static char *cleanstr(char *path, const char sep) { if (path == NULL || strlen(path) == 0) return path;
[CVS] RPM: rpm/tools/ Makefile.am
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: a...@rpm5.org Module: rpm Date: 02-Jun-2009 16:05:39 Branch: HEAD Handle: 2009060214053900 Modified files: rpm/tools Makefile.am Log: be compatible with Automake 1.11 Summary: RevisionChanges Path 2.124 +2 -2 rpm/tools/Makefile.am patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.123 -r2.124 Makefile.am --- rpm/tools/Makefile.am 1 Jun 2009 13:22:12 - 2.123 +++ rpm/tools/Makefile.am 2 Jun 2009 14:05:39 - 2.124 @@ -155,7 +155,7 @@ @[ -d $(DESTDIR)$(pkgbindir) ] || $(mkinstalldirs) $(DESTDIR)$(pkgbindir) if WITH_DB_INTERNAL if WITH_DB_TOOLS_INTEGRATED - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(pkgbinPROGRAMS_INSTALL) \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) \ $(builddir)/db_tool $(DESTDIR)$(pkgbindir)/db_tool for tool in . $(my_DB_TOOLS); do \ test .$$tool = .. continue; \ @@ -165,7 +165,7 @@ else for tool in . $(my_DB_TOOLS); do \ test .$$tool = .. continue; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(pkgbinPROGRAMS_INSTALL) \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) \ $(top_builddir)/$(WITH_DB_SUBDIR)/$$tool $(DESTDIR)$(pkgbindir)/$$tool; \ done endif @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/tools/ Makefile.am
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: r...@rpm5.org Module: rpm Date: 01-Jun-2009 15:22:12 Branch: HEAD Handle: 2009060113221200 Modified files: rpm/tools Makefile.am Log: rpmkey is Keyutils specific, so do not build it by default for now Summary: RevisionChanges Path 2.123 +2 -2 rpm/tools/Makefile.am patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.122 -r2.123 Makefile.am --- rpm/tools/Makefile.am 21 May 2009 16:33:08 - 2.122 +++ rpm/tools/Makefile.am 1 Jun 2009 13:22:12 - 2.123 @@ -20,7 +20,7 @@ EXTRA_DIST = hashtab.h -EXTRA_PROGRAMS = debugedit +EXTRA_PROGRAMS = debugedit rpmkey RPMMISC_LDADD_COMMON = \ $(top_builddir)/misc/librpmmisc.la \ @@ -47,7 +47,7 @@ pkgbindir = @USRLIBRPM@/bin pkgbin_PROGRAMS =\ rpmcache rpmdigest grep mtree rpmrepo rpmspecdump wget \ - rpmcmp rpmdeps rpmkey txar @WITH_LIBELF_DEBUGEDIT@ + rpmcmp rpmdeps txar @WITH_LIBELF_DEBUGEDIT@ dist_man_MANS = rpmgrep.1 debugedit_SOURCES = debugedit.c hashtab.c @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/tools/ Makefile.am
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 21-May-2009 18:33:08 Branch: HEAD Handle: 2009052116330800 Modified files: rpm/tools Makefile.am Log: - add DESTDIR prefix to lazy pkgbindir creation. Summary: RevisionChanges Path 2.122 +1 -1 rpm/tools/Makefile.am patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.121 -r2.122 Makefile.am --- rpm/tools/Makefile.am 7 May 2009 21:44:16 - 2.121 +++ rpm/tools/Makefile.am 21 May 2009 16:33:08 - 2.122 @@ -152,9 +152,9 @@ endif install-data-local: + @[ -d $(DESTDIR)$(pkgbindir) ] || $(mkinstalldirs) $(DESTDIR)$(pkgbindir) if WITH_DB_INTERNAL if WITH_DB_TOOLS_INTEGRATED - @[ -d $(pkgbindir) ] || $(mkinstalldirs) $(pkgbindir) $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(pkgbinPROGRAMS_INSTALL) \ $(builddir)/db_tool $(DESTDIR)$(pkgbindir)/db_tool for tool in . $(my_DB_TOOLS); do \ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/tools/ Makefile.am
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: a...@rpm5.org Module: rpm Date: 27-Jan-2009 18:04:46 Branch: HEAD Handle: 2009012717044500 Modified files: rpm/tools Makefile.am Log: fix VPATH using builds Summary: RevisionChanges Path 2.119 +1 -1 rpm/tools/Makefile.am patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.118 -r2.119 Makefile.am --- rpm/tools/Makefile.am 25 Jan 2009 18:38:02 - 2.118 +++ rpm/tools/Makefile.am 27 Jan 2009 17:04:45 - 2.119 @@ -70,7 +70,7 @@ rpmmtree_LDADD = $(RPM_LDADD_COMMON) rpmrepo_SOURCES =rpmrepo.c -rpmrepo_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/scripts $(CPPFLAGS) +rpmrepo_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/scripts -I$(top_builddir)/scripts $(CPPFLAGS) rpmrepo_LDADD = $(RPM_LDADD_COMMON) rpmspecdump_SOURCES =rpmspecdump.c @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/tools/ Makefile.am rpmspecdump.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Arkadiusz Miskiewicz Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 29-Jul-2008 17:36:09 Branch: HEAD Handle: 2008072915360900 Added files: rpm/tools rpmspecdump.c Modified files: rpm/tools Makefile.am Log: Tool for dumping spec tags. Summary: RevisionChanges Path 2.113 +4 -1 rpm/tools/Makefile.am 2.1 +359 -0 rpm/tools/rpmspecdump.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.112 -r2.113 Makefile.am --- rpm/tools/Makefile.am 16 Jun 2008 18:47:20 - 2.112 +++ rpm/tools/Makefile.am 29 Jul 2008 15:36:09 - 2.113 @@ -40,7 +40,7 @@ $(top_builddir)/build/librpmbuild.la \ $(RPM_LDADD_COMMON) -bin_PROGRAMS = rpm2cpio rpmcache rpmdigest rpmmtree rpmrepo +bin_PROGRAMS = rpm2cpio rpmcache rpmdigest rpmmtree rpmrepo rpmspecdump pkglibdir = @USRLIBRPM@ pkglib_PROGRAMS =rpmcmp rpmdeps @WITH_LIBELF_DEBUGEDIT@ @@ -66,6 +66,9 @@ rpmrepo_SOURCES =rpmrepo.c rpmrepo_LDADD = $(RPM_LDADD_COMMON) +rpmspecdump_SOURCES =rpmspecdump.c +rpmspecdump_LDADD = $(RPM_LDADD_COMMON) + ## ## Traditional rpm2cpio ## @@ . patch -p0 '@@ .' Index: rpm/tools/rpmspecdump.c $ cvs diff -u -r0 -r2.1 rpmspecdump.c --- /dev/null 2008-07-29 17:36:08 +0200 +++ rpmspecdump.c 2008-07-29 17:36:09 +0200 @@ -0,0 +1,359 @@ +/* + * $Id: rpmspecdump.c,v 2.1 2008/07/29 15:36:09 arekm Exp $ + * + * Prints out following information in same format as %dump for builder: + * $ rpmbuild --nodigest --nosignature --nobuild -bp --define 'prep %{echo:dummy: PACKAGE_NAME %{name} }%dump' qemu.spec 21 | awk '$2 ~ /^SOURCEURL/ {print} $2 ~ /^PATCHURL/ {print} $2 ~ /^nosource/ {print} $2 ~ /^PACKAGE_/ {print}' + * dummy: PACKAGE_NAME qemu + * -2: PACKAGE_RELEASE[EMAIL PROTECTED] + * -1: PACKAGE_VERSION1.3.0pre11 + * -3: PATCHURL0 qemu-nostatic.patch + * -3: PATCHURL1 qemu-cc.patch + * -3: PATCHURL11 qemu-0.7.2-gcc4-opts.patch + * -3: PATCHURL13 qemu-dosguest.patch + * -3: PATCHURL3 qemu-dot.patch + * -3: PATCHURL4 qemu-gcc4_x86.patch + * -3: PATCHURL5 qemu-gcc4_ppc.patch + * -3: PATCHURL6 qemu-nosdlgui.patch + * -3: PATCHURL8 qemu-kde_virtual_workspaces_hack.patch + * -3: PATCHURL9 qemu-0.8.0-gcc4-hacks.patch + * -3: SOURCEURL0 http://fabrice.bellard.free.fr/qemu/qemu-0.9.0.tar.gz + * -3: SOURCEURL1 http://fabrice.bellard.free.fr/qemu/kqemu-1.3.0pre11.tar.gz + * + * $ rpm-specdump qemu.spec + * h PACKAGE_NAME qemu + * h PACKAGE_VERSION 0.9.0 + * h PACKAGE_RELEASE 60k + * s PATCHURL13 qemu-dosguest.patch + * s PATCHURL11 qemu-0.7.2-gcc4-opts.patch + * s PATCHURL9 qemu-0.8.0-gcc4-hacks.patch + * s PATCHURL8 qemu-kde_virtual_workspaces_hack.patch + * s PATCHURL6 qemu-nosdlgui.patch + * s PATCHURL5 qemu-gcc4_ppc.patch + * s PATCHURL4 qemu-gcc4_x86.patch + * s PATCHURL3 qemu-dot.patch + * s PATCHURL1 qemu-cc.patch + * s PATCHURL0 qemu-nostatic.patch + * s SOURCEURL1 http://fabrice.bellard.free.fr/qemu/kqemu-1.3.0pre11.tar.gz + * s SOURCEURL0 http://fabrice.bellard.free.fr/qemu/qemu-0.9.0.tar.gz + * + * And with NoSource: 1, NoSource: 2 + * + * $ rpmbuild --nodigest --nosignature --nobuild -bp --define 'prep %{echo:dummy: PACKAGE_NAME %{name} }%dump' ZendDebugger.spec 21 | awk '$2 ~ /^SOURCEURL/ {print} $2 ~ /^PATCHURL/ {print} $2 ~ /^nosource/ {print} $2 ~ /^PACKAGE_/ {print}' + * dummy: PACKAGE_NAME ZendDebugger + * -2: PACKAGE_RELEASE0.4 + * -1: PACKAGE_VERSION5.2.10 + * -3: SOURCEURL0 http://downloads.zend.com/pdt/server-debugger/ZendDebugger-5.2.10-linux-glibc21-i386.tar.gz + * -3: SOURCEURL1 http://downloads.zend.com/pdt/server-debugger/ZendDebugger-5.2.10-linux-glibc23-x86_64.tar.gz + * -3: nosource 1 + * + * $ rpm-specdump ZendDebugger.spec + * h PACKAGE_NAME ZendDebugger + * h PACKAGE_VERSION 5.2.10 + * h PACKAGE_RELEASE 0.4 + * s SOURCEURL1 http://downloads.zend.com/pdt/server-debugger/ZendDebugger-5.2.10-linux-glibc23-x86_64.tar.gz + * s nosource 1 + * s SOURCEURL0 http://downloads.zend.com/pdt/server-debugger/ZendDebugger-5.2.10-linux-glibc21-i386.tar.gz + * s nosource 0 + * + * Compile with: + * gcc -lrpm
[CVS] RPM: rpm/tools/ Makefile.am txar.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Anders F. Björklund Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 11-Nov-2007 19:49:45 Branch: HEAD Handle: 200718494500 Modified files: rpm/tools Makefile.am txar.c Log: fix building txar with internal xar Summary: RevisionChanges Path 2.102 +4 -2 rpm/tools/Makefile.am 2.9 +1 -1 rpm/tools/txar.c patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.101 -r2.102 Makefile.am --- rpm/tools/Makefile.am 18 Sep 2007 19:19:21 - 2.101 +++ rpm/tools/Makefile.am 11 Nov 2007 18:49:45 - 2.102 @@ -7,7 +7,8 @@ -I$(top_srcdir)/lib \ -I$(top_srcdir)/rpmdb \ -I$(top_srcdir)/rpmio \ - -I$(top_srcdir)/misc + -I$(top_srcdir)/misc \ + @WITH_XAR_CPPFLAGS@ EXTRA_DIST = hashtab.h @@ -49,7 +50,8 @@ ## XAR package format work-in-progress. ## txar_SOURCES = txar.c -txar_LDADD = $(myLDADD) -lxar +txar_LDADD = $(myLDADD) @WITH_XAR_LDFLAGS@ +txar_LIBS = @WITH_XAR_LIBS@ ## ## provide Berkeley-DB tools @@ . patch -p0 '@@ .' Index: rpm/tools/txar.c $ cvs diff -u -r2.8 -r2.9 txar.c --- rpm/tools/txar.c 10 Nov 2007 20:09:25 - 2.8 +++ rpm/tools/txar.c 11 Nov 2007 18:49:45 - 2.9 @@ -2,7 +2,7 @@ #define RPM2XAR #include system.h #include inttypes.h -#include xar/xar.h +#include xar.h #include rpmio.h #include rpmcli.h @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/tools/ Makefile.am
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: 08-Sep-2007 18:15:39 Branch: HEAD Handle: 2007090817153900 Modified files: rpm/tools Makefile.am Log: save private devel rules to streamline check-ins. Summary: RevisionChanges Path 2.100 +7 -1 rpm/tools/Makefile.am patch -p0 '@@ .' Index: rpm/tools/Makefile.am $ cvs diff -u -r2.99 -r2.100 Makefile.am --- rpm/tools/Makefile.am 29 Aug 2007 12:50:24 - 2.99 +++ rpm/tools/Makefile.am 8 Sep 2007 16:15:39 - 2.100 @@ -11,7 +11,7 @@ EXTRA_DIST = hashtab.h -EXTRA_PROGRAMS = debugedit rpmkey txar +EXTRA_PROGRAMS = debugedit rpmkey twf txar myLDADD = \ $(top_builddir)/build/librpmbuild.la \ @@ -45,6 +45,12 @@ rpmkey_SOURCES =rpmkey.c rpmkey_LDADD = $(myLDADD) -lkeyutils +## +## XAR package format work-in-progress. +## +twf =twf.c +twf_LDADD = $(myLDADD) -lxar + txar_SOURCES = txar.c txar_LDADD = $(myLDADD) -lxar @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org