From c37ae1046b5b1761294b5b378bc332a9910074a5 Mon Sep 17 00:00:00 2001 From: jbj Date: Sun, 15 Feb 2004 20:54:19 +0000 Subject: [PATCH] - fix: set fcontext from pkg when file_contexts doesn't exist (#114040). CVS patchset: 7088 CVS date: 2004/02/15 20:54:19 --- CHANGES | 2 ++ autogen.sh | 4 ++-- expat/autogen.sh | 4 ++-- file/autogen.sh | 4 ++-- lib/fsm.c | 5 ++++- rpm.spec.in | 13 +++++++++++-- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 7b88924..d16f542 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,8 @@ - use -fPIC -DPIC on all platforms, not just mandatory (#112713). - python: return None for NEVRAO, [] for everything else. - python: throw exception on bad arg to labelCompare (#113661). + - re-add --enable-posixmutexes to build. + - fix: set fcontext from pkg when file_contexts doesn't exist (#114040). 4.2.1 -> 4.2.2: - unify signal handling in librpmio, use condvar to deliver signal. diff --git a/autogen.sh b/autogen.sh index 669e3f5..ec524ac 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,12 +3,12 @@ export CFLAGS export LDFLAGS -LTV="libtoolize (GNU libtool) 1.5" +LTV="libtoolize (GNU libtool) 1.5.2" ACV="autoconf (GNU Autoconf) 2.59" AMV="automake (GNU automake) 1.8.2" USAGE=" This script documents the versions of the tools I'm using to build rpm: - libtool-1.5 + libtool-1.5.2 autoconf-2.59 automake-1.8.2 Simply edit this script to change the libtool/autoconf/automake versions diff --git a/expat/autogen.sh b/expat/autogen.sh index c82ddf2..5d587d3 100755 --- a/expat/autogen.sh +++ b/expat/autogen.sh @@ -3,12 +3,12 @@ export CFLAGS export LDFLAGS -LTV="libtoolize (GNU libtool) 1.5" +LTV="libtoolize (GNU libtool) 1.5.2" ACV="autoconf (GNU Autoconf) 2.59" AMV="automake (GNU automake) 1.8.2" USAGE=" This script documents the versions of the tools I'm using to build rpm: - libtool-1.5 + libtool-1.5.2 autoconf-2.59 automake-1.8.2 Simply edit this script to change the libtool/autoconf/automake versions diff --git a/file/autogen.sh b/file/autogen.sh index c82ddf2..5d587d3 100755 --- a/file/autogen.sh +++ b/file/autogen.sh @@ -3,12 +3,12 @@ export CFLAGS export LDFLAGS -LTV="libtoolize (GNU libtool) 1.5" +LTV="libtoolize (GNU libtool) 1.5.2" ACV="autoconf (GNU Autoconf) 2.59" AMV="automake (GNU automake) 1.8.2" USAGE=" This script documents the versions of the tools I'm using to build rpm: - libtool-1.5 + libtool-1.5.2 autoconf-2.59 automake-1.8.2 Simply edit this script to change the libtool/autoconf/automake versions diff --git a/lib/fsm.c b/lib/fsm.c index a5e1b63..e8ee232 100644 --- a/lib/fsm.c +++ b/lib/fsm.c @@ -641,8 +641,11 @@ static int fsmMapFContext(FSM_t fsm) fsm->fcontext = rpmsxFContext(sx, fsm->path, st->st_mode); sx = rpmsxFree(sx); } else { + int i = fsm->ix; + /* Get file security context from package. */ - fsm->fcontext = rpmfiFContext(fi); + if (fi && i >= 0 && i < fi->fc) + fsm->fcontext = (fi->fcontexts ? fi->fcontexts[i] : NULL); } } return 0; diff --git a/rpm.spec.in b/rpm.spec.in index a1a459f..4a0e76d 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -134,7 +134,7 @@ CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS ./configure --prefix=%{__prefix} --sysconfdir=/etc \ --localstatedir=/var --infodir='${prefix}%{__share}/info' \ --mandir='${prefix}%{__share}/man' \ - $WITH_PYTHON --without-javaglue + $WITH_PYTHON --enable-posixmutexes --without-javaglue %else CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} $WITH_PYTHON \ --without-javaglue @@ -482,7 +482,16 @@ exit 0 %{__includedir}/popt.h %changelog -* Mon Jan 19 2004 Jeff Johnson 4.2-0.8 +* Sun Feb 15 2004 Jeff Johnson 4.3-0.11 +- fix: set fcontext from pkg when file_contexts doesn't exist (#114040). + +* Wed Feb 11 2004 Jeff Johnson 4.3-0.10 +- re-add --enable-posixmutexes to build. + +* Mon Jan 19 2004 Jeff Johnson 4.3-0.9 +- python: return None for NEVRAO, [] for everything else. + +* Mon Jan 19 2004 Jeff Johnson 4.3-0.8 - python: return None for NEVRAO, [] for everything else. * Mon Jan 12 2004 Jeff Johnson 4.3-0.7 -- 2.7.4