Selinux Sources

Paul Howarth paul at city-fan.org
Fri Jun 23 16:11:53 UTC 2006


Miguel Fernandes wrote:
> Sorry, I'm not following you. I'm relatively new to linux and don't know
> what to do. Is SRPM like an RPM? it installs in the same way?

Not quite. The SRPM contains the source code, patches, and other files 
for a package, plus the "recipe" in the form of a "spec" file for how to 
build the regular RPM. When you install an SRPM, it's just extracted 
into a few directories and not entered into your RPM database. You do 
not have to be root to install an SRPM, and in fact you shouldn't build 
packages as root anyway, for security reasons.

Here's what I'd do to look at the sources in FC5:

1. Set up an RPM build environment for your account:
    http://www.city-fan.org/tips/CreateRPMBuildEnvironment

2. Get the selinux-policy SRPM:
    # yum install yum-utils
    (do that as root; you don't need to be root for anything else)
    $ yumdownloader --source --enablerepo=updates-source selinux-policy

3. Install the SRPM:
    $ rpm -Uvh selinux-policy-2.2.43-4.fc5.src.rpm

4. Unpack tarball and apply patches:
    $ cd ~/rpmbuild/SPECS
    $ rpmbuild -bp selinux-policy.spec

That should leave you with the patched policy sources corresponding to 
the latest FC5 policy in ~/rpmbuild/BUILD/serefpolicy-2.2.43

Paul.




More information about the fedora-selinux-list mailing list