EL6 reference policy sources?

Dave Quigley selinux at davequigley.com
Thu Feb 2 01:37:05 UTC 2012


On 2/1/2012 5:00 PM, Dominick Grift wrote:
> On Wed, 2012-02-01 at 14:51 -0700, Dmitry Makovey wrote:
>> I believe tresys had been hosting sources for reference policies on different
>> linux platforms, which is not the case anymore. This ML is the closest thing
>> to a help - which package contains sources for all the .pp modules coming as
>> part of "targeted" policy implementation on EL6? I tried to install most of
>> SELinux-related *-devel packages with no success (only got .fi files, but not
>> the .te)? Should I be downloading SRPMs ?
>
> If you want to see the source for the installed policy then indeed you
> would download the source rpm corresponding to the rpm that you have
> installed for selinux-policy-targeted.
>
> After that you can extract the rpm (alter click on the package and
> select "extract here" or use the command line tools to extract the
> source rpms). Also extract the serefpolicy.tgz file that was extracted
> from the source rpm. Then you would also prep the source by applying the
> enclose redhat patches.
>
> After the patches are applied, you can browse the source policy that is
> in the serefpolicy directory.
>
> I hope this helps
>
>> --
>> selinux mailing list
>> selinux at lists.fedoraproject.org
>> https://admin.fedoraproject.org/mailman/listinfo/selinux
>
>
> --
> selinux mailing list
> selinux at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/selinux

An easier way than extracting and patching by hand would be to do this

rpm -ihv <policy-source-rpm>.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bp <SPECFILE> #build prep <bp>

Once you've done that the ~/rpmbuild/BUILD directory should contain 
directory with an extracted and patched tree based on the spec file name.
Dave


More information about the selinux mailing list