selinux bug or my bug?

Anthony Joseph Seward anthony.seward at ieee.org
Fri Apr 2 20:40:06 UTC 2004


When I want to do upgrades or installs from a machine that already has
an RPM based distro on it, I install an RPM that I make that lets me
start from GRUB or LILO (as an aside, this should get around the disc1
won't boot problem that people are having).  When I install the RPM on a
system that already has test2 installed with selinux enabled, I get the
following error:

  [root at mza samba]# rpm -Uvh /nfs/u3/mirrors/installers/FC2-test2-i386/rpms/FC2-test2-installer-2.0-1.i386.rpm
  Preparing...                ########################################### [100%]
     1:FC2-test2-installer    ########################################### [100%]
  error: setexeccon(root:staff_r:rpm_script_t) fails from context "root:staff_r:staff_t": Invalid argument
  error: %post(FC2-test2-installer-2.0-1) scriptlet failed, exit status 255

Is this an error in selinx or in my %post script?  I've attached the .spec file.

Tony
-- 
Anthony Joseph Seward <anthony.seward at ieee.org>
-------------- next part --------------
%define rhrel  %(echo ${RELEASE})
%define rharch %(echo ${ARCH})
%define anaconda_args %(echo ${ANACONDA_ARGS})
%define kernel_args %(echo ${KARGS})

Summary: An RPM that lets one start an installation from the bootloader chooser.
Name: %{rhrel}-installer
Version: 2.0
Release: 1
License: GPL
Group: System Environment/Kernel
URL: http://www.redhat.com/
Source0: boot-%{rhrel}-%{rharch}.iso
Source1: initrd-%{rhrel}-%{rharch}-anaconda.img
Source2: vmlinuz-%{rhrel}-%{rharch}-anaconda
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%description
This RPM contains the kernel and initrd from the boot.iso installer
image of Red Hat's %{rhrel} release.

By installing this RPM you can install %{rhrel} from the bootloader
the next time you reboot.

%prep

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/boot
cp %{SOURCE1} $RPM_BUILD_ROOT/boot/initrd-%{rhrel}-%{rharch}-anaconda-%{release}.img
cp %{SOURCE2} $RPM_BUILD_ROOT/boot/vmlinuz-%{rhrel}-%{rharch}-anaconda-%{release}

%post
[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --install --kernel-args='%{kernel_args} %{anaconda_args}' %{rhrel}-%{rharch}-anaconda-%{release}

%preun
[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --remove %{rhrel}-%{rharch}-anaconda-%{release}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/boot/initrd-%{rhrel}-%{rharch}-anaconda-%{release}.img
/boot/vmlinuz-%{rhrel}-%{rharch}-anaconda-%{release}

%doc


%changelog
* Tue Mar 30 2004 Anthony Joseph Seward <anthony.seward at ieee.org> - 2.0-1
- Use the newer new-kernel-pkg command w/ 'kernel-args' command line argument

* Fri Sep 26 2003 Anthony Joseph Seward <anthony.seward at ieee.org> 1.0-6
- add kernel_args for per-config kernel arguments

* Thu Aug 14 2003 Anthony Joseph Seward <anthony.seward at ieee.org> 1.0-5
- General cleanup

* Thu Aug 14 2003 Anthony Joseph Seward <anthony.seward at ieee.org> 1.0-4
- Add %release to the kernel version.  Fixes %post errors

* Thu Aug 14 2003 Anthony Joseph Seward <anthony.seward at ieee.org> 1.0-3
- Use environment variables for rhrel, rharch, and anaconda_args

* Tue Aug 12 2003 Anthony Joseph Seward <anthony.seward at ieee.org> 1.0-2
- Copy parts from new-kernel-pkg and modify so that we can define our own kerlen arguments.

* Mon Aug 11 2003 Anthony Joseph Seward <anthony.seward at ieee.org> 1.0-1
- Initial build.


More information about the fedora-test-list mailing list