[Glibc-bsd-commits] r1890 - trunk/web/patches
Petr Salinger
ps-guest at alioth.debian.org
Mon Jan 29 22:26:56 UTC 2007
Author: ps-guest
Date: 2007-01-29 23:26:56 +0100 (Mon, 29 Jan 2007)
New Revision: 1890
Added:
trunk/web/patches/rpm-4.4.1.diff.txt
Removed:
trunk/web/patches/rpm_11-matchpathcon.diff
trunk/web/patches/rpm_21-kfreebsd.diff
Log:
* update instruction for rpm
Added: trunk/web/patches/rpm-4.4.1.diff.txt
===================================================================
--- trunk/web/patches/rpm-4.4.1.diff.txt 2007-01-27 21:29:49 UTC (rev 1889)
+++ trunk/web/patches/rpm-4.4.1.diff.txt 2007-01-29 22:26:56 UTC (rev 1890)
@@ -0,0 +1,41 @@
+
+* extract rpm 4.4.1-14 somewhere
+* unpack rpm_4.4.1.orig.tar.gz
+* copy debian subdir from rpm 4.4.1-14 into unpacked rpm_4.4.1.orig.tar.gz
+* copy lsb-rpm.1 from rpm 4.4.1-14 into unpacked rpm_4.4.1.orig.tar.gz
+* in debian/patches/20-no-linux-gate.so-dependancy.diff drop whole change of debian/changelog
+* apply this patch (it adds quilt into Build-Depends and uses it in debian/rules)
+* build it
+
+
+diff -ur rpm-4.4.1.std/debian/control rpm-4.4.1/debian/control
+--- rpm-4.4.1.std/debian/control 2007-01-29 23:36:35.000000000 +0100
++++ rpm-4.4.1/debian/control 2007-01-29 23:38:53.000000000 +0100
+@@ -1,7 +1,7 @@
+ Source: rpm
+ Section: admin
+ Priority: optional
+-Build-Depends: debhelper (>= 5.0.37.2), libtool, autoconf, automake1.9, zlib1g-dev, libbz2-dev, libdb3-dev, dpkg-dev (>= 1.9.0), libpopt-dev (>= 1.6.4), python-all-dev, libbeecrypt6-dev, libneon25-dev, libxml2-dev, libreadline5-dev, libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libsepol1-dev, libsqlite3-dev, python-central (>= 0.5)
++Build-Depends: debhelper (>= 5.0.37.2), libtool, autoconf, automake1.9, zlib1g-dev, libbz2-dev, libdb3-dev, dpkg-dev (>= 1.9.0), libpopt-dev (>= 1.6.4), python-all-dev, libbeecrypt6-dev, libneon25-dev, libxml2-dev, libreadline5-dev, libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libsepol1-dev, libsqlite3-dev, python-central (>= 0.5), quilt
+ Maintainer: Anibal Monsalve Salazar <anibal at debian.org>
+ Uploaders: Anand Kumria <wildfire at progsoc.org>, Víctor Pérez Pereira <vperez at debianvenezuela.org>
+ XS-Python-Version: all
+diff -ur rpm-4.4.1.std/debian/rules rpm-4.4.1/debian/rules
+--- rpm-4.4.1.std/debian/rules 2007-01-29 23:36:35.000000000 +0100
++++ rpm-4.4.1/debian/rules 2007-01-29 23:39:54.000000000 +0100
+@@ -16,6 +16,7 @@
+ endif
+
+ makefiles:
++ QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+ cd popt && aclocal && libtoolize --copy --force && automake -c -i && autoconf && ./configure
+ #cd beecrypt && aclocal-1.7 && libtoolize --copy --force && automake-1.7 -i -a -c -f && autoconf
+ #aclocal-1.7
+@@ -75,6 +76,7 @@
+ po/cat-id-tbl.c \
+ popt/configure popt/ltmain.sh popt/aclocal.m4 Doxytags \
+ lsb-rpm po/de.gmo
++ QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
+
+ binary-indep: build
+
Deleted: trunk/web/patches/rpm_11-matchpathcon.diff
===================================================================
--- trunk/web/patches/rpm_11-matchpathcon.diff 2007-01-27 21:29:49 UTC (rev 1889)
+++ trunk/web/patches/rpm_11-matchpathcon.diff 2007-01-29 22:26:56 UTC (rev 1890)
@@ -1,305 +0,0 @@
-
-Current 11-matchpathcon.diff breaks non-selinux architectures.
-Revert the current one, replace with this one and reapply.
-After that add 21-kfreebsd.diff
-
-diff -wur a/build/Makefile.am b/build/Makefile.am
---- a/build/Makefile.am 2006-11-21 21:04:26.000000000 +0100
-+++ b/build/Makefile.am 2006-11-21 21:02:30.000000000 +0100
-@@ -35,6 +35,7 @@
- $(top_builddir)/lib/librpm.la \
- $(top_builddir)/rpmdb/librpmdb.la \
- $(top_builddir)/rpmio/librpmio.la \
-+ @WITH_SELINUX_LIB@ \
- @WITH_LIBELF_LIB@
-
- rpmfile.h:
-diff -wur a/build/files.c b/build/files.c
---- a/build/files.c 2006-11-21 21:04:26.000000000 +0100
-+++ b/build/files.c 2006-11-21 21:02:30.000000000 +0100
-@@ -23,7 +23,11 @@
- #define _RPMFI_INTERNAL
- #include "rpmfi.h"
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+#else
- #include "rpmsx.h"
-+#endif
-
- #define _RPMTE_INTERNAL
- #include "rpmte.h"
-@@ -1122,7 +1126,11 @@
- int apathlen = 0;
- int dpathlen = 0;
- int skipLen = 0;
-+#ifdef WITH_SELINUX
-+ security_context_t scon = NULL;
-+#else
- rpmsx sx = NULL;
-+#endif
- const char * sxfn;
- size_t fnlen;
- FileListRec flp;
-@@ -1142,7 +1150,11 @@
-
- sxfn = rpmGetPath("%{?_build_file_context_path}", NULL);
- if (sxfn != NULL && *sxfn != '\0')
-+#ifdef WITH_SELINUX
-+ matchpathcon_init(sxfn);
-+#else
- sx = rpmsxNew(sxfn);
-+#endif
-
- for (i = 0, flp = fl->fileList; i < fl->fileListRecsUsed; i++, flp++) {
- const char *s;
-@@ -1324,7 +1336,18 @@
- &(flp->flags), 1);
-
- /* Add file security context to package. */
--/*@-branchstate@*/
-+#ifdef WITH_SELINUX
-+ mode_t fmode = (uint_16)flp->fl_mode;
-+ int rc = matchpathcon(flp->fileURL, fmode, &scon);
-+ if ( rc == 0 && scon != NULL) {
-+ (void) headerAddOrAppendEntry(h, RPMTAG_FILECONTEXTS, RPM_STRING_ARRAY_TYPE, &scon, 1);
-+ freecon(scon);
-+ }
-+ else {
-+ const char *nocon = "";
-+ (void) headerAddOrAppendEntry(h, RPMTAG_FILECONTEXTS, RPM_STRING_ARRAY_TYPE, &nocon, 1);
-+ }
-+#else
- if (sx != NULL) {
- mode_t fmode = (uint_16)flp->fl_mode;
- s = rpmsxFContext(sx, flp->fileURL, fmode);
-@@ -1332,10 +1355,12 @@
- (void) headerAddOrAppendEntry(h, RPMTAG_FILECONTEXTS, RPM_STRING_ARRAY_TYPE,
- &s, 1);
- }
--/*@=branchstate@*/
--
-+#endif
- }
-+#ifdef WITH_SELINUX
-+#else
- sx = rpmsxFree(sx);
-+#endif
- sxfn = _free(sxfn);
-
- (void) headerAddEntry(h, RPMTAG_SIZE, RPM_INT32_TYPE,
-diff -wur a/lib/fsm.c b/lib/fsm.c
---- a/lib/fsm.c 2006-11-21 21:04:26.000000000 +0100
-+++ b/lib/fsm.c 2006-11-21 21:02:30.000000000 +0100
-@@ -634,12 +634,20 @@
- if (ts != NULL && rpmtsSELinuxEnabled(ts) == 1 &&
- !(rpmtsFlags(ts) & RPMTRANS_FLAG_NOCONTEXTS))
- {
-+#ifdef WITH_SELINUX
-+ security_context_t scon = NULL;
-+
-+ if ( matchpathcon(fsm->path, st->st_mode, &scon) == 0 && scon != NULL) {
-+ /* Get file security context from patterns. */
-+ fsm->fcontext = scon;
-+#else
- rpmsx sx = rpmtsREContext(ts);
-
- if (sx != NULL) {
- /* Get file security context from patterns. */
- fsm->fcontext = rpmsxFContext(sx, fsm->path, st->st_mode);
- sx = rpmsxFree(sx);
-+#endif
- } else {
- int i = fsm->ix;
-
-diff -wur a/lib/rpmfi.c b/lib/rpmfi.c
---- a/lib/rpmfi.c 2006-11-21 21:04:26.000000000 +0100
-+++ b/lib/rpmfi.c 2006-11-21 21:08:33.000000000 +0100
-@@ -16,7 +16,11 @@
- #define _RPMFI_INTERNAL
- #include "rpmfi.h"
-
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+#else
- #include "rpmsx.h"
-+#endif
-
- #define _RPMTE_INTERNAL /* relocations */
- #include "rpmte.h"
-@@ -1645,7 +1649,11 @@
- {
- int scareMem = 0;
- rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
-+#ifdef WITH_SELINUX
-+ const char * myfn = rpmGetPath("%{?__file_context_path}", NULL);
-+#else
- rpmsx sx = NULL;
-+#endif
- const char ** av = NULL;
- int ac;
- size_t nb;
-@@ -1660,7 +1668,11 @@
- }
-
- /* Read security context patterns. */
-+#ifdef WITH_SELINUX
-+ matchpathcon_init(myfn);
-+#else
- sx = rpmsxNew(NULL);
-+#endif
-
- /* Compute size of argv array blob, concatenating file contexts. */
- nb = ac * sizeof(*fcnb);
-@@ -1671,10 +1683,16 @@
- while (rpmfiNext(fi) >= 0) {
- const char * fn = rpmfiFN(fi);
- mode_t fmode = rpmfiFMode(fi);
-+#ifdef WITH_SELINUX
-+ security_context_t scon;
-+
-+ if (matchpathcon(fn, fmode, &scon) == 0) {
-+#else
- const char * scon;
-
- scon = rpmsxFContext(sx, fn, fmode);
- if (scon != NULL) {
-+#endif
- fcnb[ac] = strlen(scon) + 1;
- /*@-branchstate@*/
- if (fcnb[ac] > 0) {
-@@ -1682,6 +1700,9 @@
- memcpy(fctxt+fctxtlen, scon, fcnb[ac]);
- fctxtlen += fcnb[ac];
- }
-+#ifdef WITH_SELINUX
-+ freecon(scon);
-+#endif
- /*@=branchstate@*/
- }
- ac++;
-@@ -1707,7 +1728,10 @@
-
- exit:
- fi = rpmfiFree(fi);
-+#ifdef WITH_SELINUX
-+#else
- sx = rpmsxFree(sx);
-+#endif
- /*@-branchstate@*/
- if (fcontextp)
- *fcontextp = av;
-diff -wur a/lib/rpminstall.c b/lib/rpminstall.c
---- a/lib/rpminstall.c 2006-11-21 21:04:26.000000000 +0100
-+++ b/lib/rpminstall.c 2006-11-21 21:02:30.000000000 +0100
-@@ -310,6 +310,12 @@
-
- /* Initialize security context patterns (if not already done). */
- if (!(ia->transFlags & RPMTRANS_FLAG_NOCONTEXTS)) {
-+#ifdef WITH_SELINUX
-+ const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL);
-+ if (fn != NULL && *fn != '\0') {
-+ matchpathcon_init(fn);
-+ }
-+#else
- rpmsx sx = rpmtsREContext(ts);
- if (sx == NULL) {
- const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL);
-@@ -320,6 +326,7 @@
- fn = _free(fn);
- }
- sx = rpmsxFree(sx);
-+#endif
- }
- (void) rpmtsSetFlags(ts, ia->transFlags);
-
-diff -wur a/lib/verify.c b/lib/verify.c
---- a/lib/verify.c 2006-11-21 21:04:26.000000000 +0100
-+++ b/lib/verify.c 2006-11-21 21:09:05.000000000 +0100
-@@ -128,6 +128,20 @@
- if (rc == -1)
- *res |= (RPMVERIFY_LGETFILECONFAIL|RPMVERIFY_CONTEXTS);
- else {
-+#ifdef WITH_SELINUX
-+ security_context_t fcontext;
-+
-+ /* Get file security context from patterns. */
-+ if (matchpathcon(fn,fmode,&fcontext) != 0) {
-+ /* Get file security context from package. */
-+ fcontext = rpmfiFContext(fi);
-+ }
-+
-+ if (fcontext == NULL || strcmp(fcontext, con))
-+ *res |= RPMVERIFY_CONTEXTS;
-+ freecon(con);
-+ freecon(fcontext);
-+#else
- rpmsx sx = rpmtsREContext(ts);
- const char * fcontext;
-
-@@ -142,6 +156,7 @@
- if (fcontext == NULL || strcmp(fcontext, con))
- *res |= RPMVERIFY_CONTEXTS;
- freecon(con);
-+#endif
- }
- }
- /*@=branchstate@*/
-@@ -524,6 +539,13 @@
-
- /* Initialize security context patterns (if not already done). */
- if (qva->qva_flags & VERIFY_CONTEXTS) {
-+#ifdef WITH_SELINUX
-+ arg = rpmGetPath("%{?_verify_file_context_path}", NULL);
-+ if (arg != NULL && *arg != '\0') {
-+ matchpathcon_init(arg);
-+ }
-+ arg = _free(arg);
-+#else
- rpmsx sx = rpmtsREContext(ts);
- if (sx == NULL) {
- arg = rpmGetPath("%{?_verify_file_context_path}", NULL);
-@@ -534,6 +556,7 @@
- arg = _free(arg);
- }
- sx = rpmsxFree(sx);
-+#endif
- }
-
- ovsflags = rpmtsSetVSFlags(ts, vsflags);
-diff -wur a/python/Makefile.am b/python/Makefile.am
---- a/python/Makefile.am 2006-11-21 21:04:26.000000000 +0100
-+++ b/python/Makefile.am 2006-11-21 21:02:30.000000000 +0100
-@@ -34,6 +34,7 @@
- $(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/popt/libpopt.la \
- $(top_builddir)/build/librpmbuild.la \
-+ @WITH_SELINUX_LIB@ \
- @WITH_LIBELF_LIB@
-
- LDADD =
-diff -wur a/python/rpmts-py.c b/python/rpmts-py.c
---- a/python/rpmts-py.c 2006-11-21 21:04:26.000000000 +0100
-+++ b/python/rpmts-py.c 2006-11-21 21:02:30.000000000 +0100
-@@ -1182,6 +1182,13 @@
-
- /* Initialize security context patterns (if not already done). */
- if (!(s->ts->transFlags & RPMTRANS_FLAG_NOCONTEXTS)) {
-+#ifdef WITH_SELINUX
-+ const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL);
-+ if (fn != NULL && *fn != '\0') {
-+ matchpathcon_init(fn);
-+ }
-+ fn = _free(fn);
-+#else
- rpmsx sx = rpmtsREContext(s->ts);
- if (sx == NULL) {
- const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL);
-@@ -1192,6 +1199,7 @@
- fn = _free(fn);
- }
- sx = rpmsxFree(sx);
-+#endif
- }
-
- if (_rpmts_debug)
Deleted: trunk/web/patches/rpm_21-kfreebsd.diff
===================================================================
--- trunk/web/patches/rpm_21-kfreebsd.diff 2007-01-27 21:29:49 UTC (rev 1889)
+++ trunk/web/patches/rpm_21-kfreebsd.diff 2007-01-29 22:26:56 UTC (rev 1890)
@@ -1,25 +0,0 @@
-
-Date: Mon, 20 Nov 2006 15:57:40 +0100 (CET)
-From: Petr Salinger <Petr.Salinger at seznam.cz>
-To: rpm-devel at lists.dulug.duke.edu
-
---- rpm-4.4.1/rpmio/rpmdav.c~ 2006-11-20 12:16:47.000000000 +0100
-+++ rpm-4.4.1/rpmio/rpmdav.c 2006-11-20 12:16:47.000000000 +0100
-@@ -1406,7 +1406,7 @@
- dp->d_reclen = 0; /* W2DO? */
-
- #if !defined(hpux) && !defined(sun)
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__)
- dp->d_off = 0; /* W2DO? */
- #endif
- /*@-boundsread@*/
-@@ -1530,7 +1530,7 @@
- dp->d_reclen = 0; /* W2DO? */
-
- #if !defined(hpux) && !defined(sun)
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__)
- dp->d_off = 0; /* W2DO? */
- #endif
- /*@-boundsread@*/
More information about the Glibc-bsd-commits
mailing list