Skip to contentSkip to conversation

libselinux CVS doesn't honor DESTDIR

PATCH Erich Schubert 2 participants 3 messages Feb 23, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Stephen,
libselinux CVS doesn't honor $(DESTDIR). Here's the patch (I'm not sure it's perfect, but thats how the makefile of libsemanage looks like. ;-) )

Makefile renamed from Makefile~ +1 -1
@@ -1,5 +1,5 @@
 # Installation directories.
-PREFIX ?= /usr
+PREFIX ?= $(DESTDIR)/usr
 LIBDIR ?= $(PREFIX)/lib
 SHLIBDIR ?= $(DESTDIR)/lib
 INCLUDEDIR ?= $(PREFIX)/include

Thanks.

On a side note: libselinux CVS is required for current semanage, due to the fix in the swig interface in
http://cvs.sourceforge.net/viewcvs.py/selinux/nsa/selinux-usr/libselinux/src/selinuxswig.i?r1=1.1&r2=1.2
Which is not in the latest libselinux release.

best regards,
Erich Schubert

Signature · 11 lines
     erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C    (o_
 Nothing prevents happiness like the memory of happiness. --- A. Gide //\
     Das größte Hindernis beim Erkennen der Wahrheit ist nicht die    V_/_
        Falschheit, sondern die Halbwahrheit. --- L. N. Tolstoi



--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 8 lines · Erich Schubert

Hello Stephen,
libselinux CVS doesn't honor $(DESTDIR). Here's the patch (I'm not sure it's perfect, but thats how the makefile of libsemanage looks like. ;-) )

Makefile line 5

Quoted 6 lines
Makefile renamed from Makefile~ +1 -1
@@ -1,5 +1,5 @@
 # Installation directories.
-PREFIX ?= /usr
+PREFIX ?= $(DESTDIR)/usr
 LIBDIR ?= $(PREFIX)/lib
 SHLIBDIR ?= $(DESTDIR)/lib
 INCLUDEDIR ?= $(PREFIX)/include

I'm confused; I see the following in the selinux sourceforge CVS tree:

1.1          (ssmalley 14-Aug-03): # Installation directories.
1.1          (ssmalley 14-Aug-03): PREFIX ?= $(DESTDIR)/usr
1.1          (ssmalley 14-Aug-03): LIBDIR ?= $(PREFIX)/lib
1.3          (ssmalley 20-Oct-03): SHLIBDIR ?= $(DESTDIR)/lib
1.16         (ssmalley 13-Oct-05): INCLUDEDIR ?= $(PREFIX)/include
Quoted 4 lines

On a side note: libselinux CVS is required for current semanage, due to the fix in the swig interface in
http://cvs.sourceforge.net/viewcvs.py/selinux/nsa/selinux-usr/libselinux/src/selinuxswig.i?r1=1.1&r2=1.2
Which is not in the latest libselinux release.

Ok. semanage in that release wasn't very mature anyway. We should be able to make an updated release soon, as Fedora development has finally slowed down for final testing. Need to make sure that everything works without MCS/MLS first (which requires at least the patch posted by Dan Walsh for policycoreutils, and I think it needs a further fix).

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw

Hello Stephen,
Sorry, my bad. I just verified that it was somehow in the Debian diff, albeit I couldn't build the debian package with that change... I thought the Debian diffs here only consisted of a debian/ dir, but apparently libselinux was an exception. Seems like this was introduced when adding support for the pkgconfig file requested by some debian packagers (to aid the building of statically linked support utilities for bootstrapping I think)

But - yay - I finally have:

# semanage user -l
                MLS/       MLS/
SELinux User    MCS Level  MCS Range                      SELinux Roles

root s0 s0-s0:c0.c255 system_r
sysadm_r staff_r
staff_u s0 s0-s0:c0.c255 sysadm_r
staff_r

sysadm_u        s0         s0-s0:c0.c255                  sysadm_r
system_u        s0         s0-s0:c0.c255                  system_r
user_u          s0         s0                             user_r

On Debian stable! ;-)

Now I only need to write and fix tons of policy... E.g. amavis, courier, drac, tor

best regards,
Erich Schubert

Signature · 10 lines
    erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C    (o_
  A polar bear is a rectangular bear after a coordinate transform.   //\
             Es lohnt sich nicht, die Augen aufzumachen,             V_/_
                    wenn der Kopf im Sand steckt.


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.