* Mon Dec 29 2004 Dan Walsh <dwalsh@redhat.com> 1.19.2-2
- Fix fixfiles handling of rpm
This commit is contained in:
parent
38d8cfc55c
commit
3673618fbf
53
policycoreutils-rhat.patch
Normal file
53
policycoreutils-rhat.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.19.2/scripts/fixfiles
|
||||||
|
--- nsapolicycoreutils/scripts/fixfiles 2004-10-26 11:15:41.000000000 -0400
|
||||||
|
+++ policycoreutils-1.19.2/scripts/fixfiles 2005-01-03 13:30:04.708085304 -0500
|
||||||
|
@@ -53,10 +53,13 @@
|
||||||
|
echo $1 >> $LOGFILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
+rpmlist() {
|
||||||
|
+rpm -q --qf '[%{FILESTATES} %{FILENAMES}\n]' "$1" | grep '^0 ' | cut -f2- -d ' '
|
||||||
|
+}
|
||||||
|
checkLabels () {
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
for i in `echo $1 | sed 's/,/ /g'`; do
|
||||||
|
- rpm -q -l $i | restorecon ${OUTFILES} -n -v -f - 2>&1 >> $LOGFILE
|
||||||
|
+ rpmlist $i | restorecon ${OUTFILES} -R -n -v -f - 2>&1 >> $LOGFILE
|
||||||
|
done
|
||||||
|
else
|
||||||
|
if [ ! -z "$FILESYSTEMSRO" ]; then
|
||||||
|
@@ -70,7 +73,7 @@
|
||||||
|
restoreLabels () {
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
for i in `echo $1 | sed 's/,/ /g'`; do
|
||||||
|
- rpm -q -l $i | restorecon ${OUTFILES} -v -f - 2>&1 >> $LOGFILE
|
||||||
|
+ rpmlist $i | restorecon ${OUTFILES} -R -v -f - 2>&1 >> $LOGFILE
|
||||||
|
done
|
||||||
|
else
|
||||||
|
if [ ! -z "$FILESYSTEMSRO" ]; then
|
||||||
|
@@ -82,13 +85,11 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
relabel() {
|
||||||
|
-logit "Cleaning out /tmp"
|
||||||
|
-rm -rf /tmp/.??* /tmp/*
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
- for i in `echo $1 | sed 's/,/ /g'`; do
|
||||||
|
- rpm -q -l $i | restorecon ${OUTFILES} -v -f - 2>&1 >> $LOGFILE
|
||||||
|
- done
|
||||||
|
+ restoreLabels $1
|
||||||
|
else
|
||||||
|
+ logit "Cleaning out /tmp"
|
||||||
|
+ rm -rf /tmp/.??* /tmp/*
|
||||||
|
if [ ! -z "$FILESYSTEMSRO" ]; then
|
||||||
|
logit "Warning: Skipping the following R/O filesystems:"
|
||||||
|
logit "$FILESYSTEMSRO"
|
||||||
|
@@ -180,7 +181,7 @@
|
||||||
|
restoreLabels $rpmFiles
|
||||||
|
fi
|
||||||
|
if [ $relabelFlag = 1 ]; then
|
||||||
|
- if [ $fullFlag = 1 ]; then
|
||||||
|
+ if [ $fullFlag = 1 -o ! -z "$rpmFiles" ]; then
|
||||||
|
relabel $rpmFiles
|
||||||
|
else
|
||||||
|
relabelCheck $rpmFiles
|
@ -1,10 +1,11 @@
|
|||||||
Summary: SELinux policy core utilities.
|
Summary: SELinux policy core utilities.
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 1.19.2
|
Version: 1.19.2
|
||||||
Release: 1
|
Release: 2
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||||
|
Patch: policycoreutils-rhat.patch
|
||||||
|
|
||||||
Prefix: %{_prefix}
|
Prefix: %{_prefix}
|
||||||
BuildRequires: libselinux-devel >= 1.15.3 pam-devel libsepol-devel >= 1.1.1
|
BuildRequires: libselinux-devel >= 1.15.3 pam-devel libsepol-devel >= 1.1.1
|
||||||
@ -31,6 +32,7 @@ context.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch -p1 -b .rhat
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make CFLAGS="%{optflags}" all
|
make CFLAGS="%{optflags}" all
|
||||||
@ -74,6 +76,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 29 2004 Dan Walsh <dwalsh@redhat.com> 1.19.2-2
|
||||||
|
- Fix fixfiles handling of rpm
|
||||||
|
|
||||||
* Mon Dec 29 2004 Dan Walsh <dwalsh@redhat.com> 1.19.2-1
|
* Mon Dec 29 2004 Dan Walsh <dwalsh@redhat.com> 1.19.2-1
|
||||||
- Update to latest from NSA
|
- Update to latest from NSA
|
||||||
* Changed restorecon to ignore ENOENT errors from matchpathcon.
|
* Changed restorecon to ignore ENOENT errors from matchpathcon.
|
||||||
|
Loading…
Reference in New Issue
Block a user