This patch fixes the exception handling in libselinux-python bindings
A message that is not in the archive (sent off-list or not yet received): C6A74D22.A99BD%[email protected]
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
include/selinux/selinux.h +4 -4
@@ -346,7 +347,7 @@const char *perms[sizeof (access_vector_t) *8 +1 ]; }; -int selinux_set_mapping (struct security_class_mapping *map); +extern int selinux_set_mapping (struct security_class_mapping *map);/* Common helpers */
@@ -556,17 +557,17 @@ char **r_seuser, char **r_level);/* Compare two file contexts, return 0 if equivalent. */ -int selinux_file_context_cmp (const security_context_t a, +extern int selinux_file_context_cmp (const security_context_t a,const security_context_t b);/* * Verify the context of the file 'path' against policy. * Return 0 if correct. */ -int selinux_file_context_verify (const char *path,mode_t mode); +extern int selinux_file_context_verify (const char *path,mode_t mode);/* This function sets the file context on to the system defaults returns 0 on success */ -int selinux_lsetfilecon_default (const char *path); +extern int selinux_lsetfilecon_default (const char *path); #ifdef __cplusplus }
src/exception.sh +21 -0
@@ -0,0 +1,21 @@ +function except() { +case $1 in + selinux_file_context_cmp) # ignore + ;; + *) +echo " +%exception $1 { + \$action + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } +} +" +;; +esac +} +echo '#include "../include/selinux/selinux.h"' > temp.c +gcc -c temp.c -aux-info temp.aux +for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6 }' temp.aux`; do except $i ; done +rm -f temp.c temp.aux temp.o
src/Makefile +6 -3
@@ -82,6 +82,9 @@ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ln -sf $@ $(TARGET) +selinuxswig_exception.i: ../include/selinux/selinux.h + sh exception.sh > $@ + audit2why.lo: audit2why.c $(CC) $(CFLAGS) -I$(PYINC) -fPIC -DSHARED -c -o $@ $<
@@ -100,8 +103,8 @@ $(SWIGRUBYCOUT): $(SWIGRUBYIF) $(SWIGRUBY) $^ -swigify: $(SWIGIF) - $(SWIG) $^ +swigify: $(SWIGIF) selinuxswig_exception.i + $(SWIG) $< install: all test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
@@ -124,7 +127,7 @@ /sbin/restorecon $(SHLIBDIR)/$(LIBSO) clean: - -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ + -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_exception.i distclean: clean rm -f $(GENERATED) $(SWIGFILES)
src/selinuxswig.i +12 -6
@@ -4,11 +4,14 @@ %module selinux %{ - #include "selinux/selinux.h" #include "../include/selinux/avc.h" - #include "../include/selinux/selinux.h" - #include "../include/selinux/get_default_type.h" + #include "../include/selinux/av_permissions.h" + #include "../include/selinux/context.h" + #include "../include/selinux/flask.h" #include "../include/selinux/get_context_list.h" + #include "../include/selinux/get_default_type.h" + #include "../include/selinux/label.h" + #include "../include/selinux/selinux.h" %} %apply int *OUTPUT { int *enforce }; %apply int *OUTPUT { size_t * };
@@ -55,8 +58,11 @@ %ignore avc_netlink_release_fd; %ignore avc_netlink_check_nb; -%include "../include/selinux/selinux.h" %include "../include/selinux/avc.h" -%include "../include/selinux/get_default_type.h" +%include "../include/selinux/av_permissions.h" +%include "../include/selinux/context.h" +%include "../include/selinux/flask.h" %include "../include/selinux/get_context_list.h" - +%include "../include/selinux/get_default_type.h" +%include "../include/selinux/label.h" +%include "../include/selinux/selinux.h"
src/selinuxswig_python.i +10 -0
@@ -21,6 +21,15 @@ map(restorecon, [os.path.join(dirname, fname) for fname in fnames]), None) +def copytree(src, dest): + """ An SELinux-friendly shutil.copytree method """ + shutil.copytree(src, dest) + restorecon(dest, recursive=True) + +def install(src, dest): + """ An SELinux-friendly shutil.move method """ + shutil.move(src, dest) + restorecon(dest, recursive=True) %} /* security_get_boolean_names() typemap */
@@ -150,4 +159,5 @@ free($1); } +%include "selinuxswig_exception.i" %include "selinuxswig.i"
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying to reproduce what you are doing by hand but nothing comes out of gcc:
[root@localhost src]# echo '#include "../include/selinux/selinux.h"' > temp.c [root@localhost src]# gcc -c temp.c -aux-info temp.aux [root@localhost src]# ls temp.*temp.c temp.o
What is the purpose of the aux-info thing, and why doesn't it work on my F11 machine?
also, I'm not sure if the best place for selinuxswig_exception.i is swigify or pywrap. In the swigify case it shouldn't be in the clean target because if you check out the repo and do make clean; make pywrap you'll get an error. (I can make these fixes, I'm just trying to figure out how it all works first).
--
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.
Quoted 20 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying to reproduce what you are doing by hand but nothing comes out of gcc:
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"' >temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.o
Quoted 9 lines
What is the purpose of the aux-info thing, and why doesn't it work on my F11 machine?
also, I'm not sure if the best place for selinuxswig_exception.i is swigify or pywrap. In the swigify case it shouldn't be in the clean target because if you check out the repo and do make clean; make pywrap you'll get an error. (I can make these fixes, I'm just trying to figure out how it all works first).
Oh, one more thing, should this be python specific? (E.g, should it be named selinuxswig_python_exception.i ?)
--
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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Daniel J Walsh
Quoted 13 lines · Joshua Brindle
Quoted 11 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying to reproduce what you are doing by hand but nothing comes out of gcc:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.o
I got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux < ../include/selinux/selinux.h <stdin>:569: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Other comments:
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
--
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.
Quoted 41 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux <
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +4 -4
@@ -16,14 +16,14 @@ LIBVERSION = 1 LIBA=libselinux.a TARGET=libselinux.so -SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.i SWIGRUBYIF= selinuxswig_ruby.i SWIGCOUT= selinuxswig_wrap.c SWIGRUBYCOUT= selinuxswig_ruby_wrap.c SWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.so -SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.i SWIGRUBYSO=_rubyselinux.so LIBSO=$(TARGET).$(LIBVERSION) AUDIT2WHYSO=audit2why.so
@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF) $(SWIGRUBY) $^ -swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF) $(SWIG) $< install: all
@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO) clean: - -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i + -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ distclean: clean rm -f $(GENERATED) $(SWIGFILES)
libselinux/src/exception.sh +3 -4
@@ -15,7 +15,6 @@ echo " ;; esac } -echo '#include "../include/selinux/selinux.h"' > temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6 }' temp.aux`; do except $i ; done -rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux < ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do except $i ; done +rm -f -- temp.aux -.o
--
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.
Quoted 112 lines · Joshua Brindle
Quoted 41 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux <
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"' > temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6}' temp.aux`; do except $i ; done
libselinux/src/exception.sh +2
-1-rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux < ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do except
Quoted 3 lines
$i ; done
+rm -f -- temp.aux -.o
Merged in libselinux-2.0.87
--
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.
Quoted 112 lines · Joshua Brindle
Quoted 111 lines · Joshua Brindle
Quoted 42 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux <
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"' > temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6}' temp.aux`; do except $i ; done
-rm -ftemp.ctemp.aux temp.o
Quoted 8 lines
Quoted 5 lines
libselinux/src/exception.sh +2
-0+gcc -x c -c - -aux-info temp.aux < ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do except$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
I have VERSION 2.0.86 in git?
--
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.
Quoted 8 lines · Daniel J Walsh
Quoted 3 lines · Joshua Brindle
Joshua Brindle wrote:
Merged in libselinux-2.0.87
I have VERSION 2.0.86 in git?
So it is. Somehow my git got into an anonymous branch and several commits weren't pushed. Fixing now.
--
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.
Quoted 123 lines · Daniel J Walsh
Quoted 112 lines · Joshua Brindle
Quoted 111 lines · Joshua Brindle
Quoted 42 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux <
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"' > temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6}' temp.aux`; do except $i ; done
-rm -ftemp.ctemp.aux temp.oQuoted 8 lines
Quoted 5 lines
libselinux/src/exception.sh +2
-0+gcc -x c -c - -aux-info temp.aux < ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do except$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
Quoted 1 line
I have VERSION 2.0.86 in git?
This seems to break make install-pywrap on the current selinux trunk:
bash exception.sh > selinuxswig_python_exception.i
swig -Wall -python -o selinuxswig_wrap.c -outdir ./ selinuxswig_python.i selinuxswig_python_exception.i swig error : Unrecognized option selinuxswig_python.i
Use 'swig -help' for available options.
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.
Quoted 124 lines · Stephen Smalley
Quoted 123 lines · Daniel J Walsh
Quoted 120 lines · Joshua Brindle
Quoted 113 lines · Joshua Brindle
Quoted 42 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux <
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"' > temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6}' temp.aux`; do except $i ; done
libselinux/src/exception.sh +2
-1-rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux < ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do exceptQuoted 3 lines
$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
Quoted 7 lines
Quoted 1 line
I have VERSION 2.0.86 in git?
This seems to break make install-pywrap on the current selinux trunk:
bashexception.sh> selinuxswig_python_exception.i
swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i selinuxswig_python_exception.i swig error : Unrecognized option selinuxswig_python.i
Use 'swig -help' for available options.
This btw prevents use of Caleb's patches on Fedora 12. If I can't build and install the python modules from the selinux repo, then there is an undefined dependency from the Fedora libsemanage-python module on the upstream libsemanage (some symbol introduced in the Fedora patches to libsemanage) and thus migrate.py is unable to import semanage and aborts.
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.
Quoted 133 lines · Stephen Smalley
Quoted 124 lines · Stephen Smalley
Quoted 123 lines · Daniel J Walsh
Quoted 120 lines · Joshua Brindle
Quoted 113 lines · Joshua Brindle
Quoted 42 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux <
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"' > temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6}' temp.aux`; do except $i ; done
libselinux/src/exception.sh +2
-1-rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux < ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do exceptQuoted 3 lines
$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
Quoted 7 lines
Quoted 1 line
I have VERSION 2.0.86 in git?
This seems to break make install-pywrap on the current selinux trunk:
bashexception.sh> selinuxswig_python_exception.i
swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i selinuxswig_python_exception.i swig error : Unrecognized option selinuxswig_python.i
Use 'swig -help' for available options.
Quoted 6 lines
This btw prevents use of Caleb's patches on Fedora 12. If I can't build and install the python modules from the selinux repo, then there is an undefined dependency from the Fedora libsemanage-python module on the upstream libsemanage (some symbol introduced in the Fedora patches to libsemanage) and thus
migrate.pyis unable to import semanage and aborts.
Hmm...if I make swigify, all is well again. But something seems wrong with the Makefile...
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.
Quoted 141 lines · Stephen Smalley
Quoted 133 lines · Stephen Smalley
Quoted 124 lines · Stephen Smalley
Quoted 123 lines · Daniel J Walsh
Quoted 120 lines · Joshua Brindle
Quoted 113 lines · Joshua Brindle
Quoted 42 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 12 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux <
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"' > temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6}' temp.aux`; do except $i ; done
libselinux/src/exception.sh +2
-1-rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux < ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do exceptQuoted 3 lines
$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
Quoted 7 lines
Quoted 1 line
I have VERSION 2.0.86 in git?
This seems to break make install-pywrap on the current selinux trunk:
bashexception.sh> selinuxswig_python_exception.i
swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i selinuxswig_python_exception.i swig error : Unrecognized option selinuxswig_python.i
Use 'swig -help' for available options.Quoted 6 lines
This btw prevents use of Caleb's patches on Fedora 12. If I can't build and install the python modules from the selinux repo, then there is an undefined dependency from the Fedora libsemanage-python module on the upstream libsemanage (some symbol introduced in the Fedora patches to libsemanage) and thus
migrate.pyis unable to import semanage and aborts.
Quoted 3 lines
Hmm...if I make swigify, all is well again. But something seems wrong with the
Makefile...
Lets stop carrying the patch for swigified c and py file from the package and force you to have to run make swigify in the build procedure.
--
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.
Quoted 132 lines · Daniel J Walsh
Quoted 131 lines · Stephen Smalley
Quoted 130 lines · Stephen Smalley
Quoted 117 lines · Stephen Smalley
Quoted 116 lines · Daniel J Walsh
Quoted 114 lines · Joshua Brindle
Quoted 108 lines · Joshua Brindle
Quoted 38 lines · Joshua Brindle
Quoted 13 lines · Daniel J Walsh
Quoted 12 lines · Joshua Brindle
Quoted 11 lines · Joshua Brindle
Quoted 6 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly on the header but it leaves a .gch file sitting in the include directory.
Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux<
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate. See<http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 8 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean shouldn't remove it, else it should be in the pywrap target and not installed.
I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"'> temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6}' temp.aux`; do except $i ; done
libselinux/src/exception.sh +2
-1-rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux< ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do exceptQuoted 3 lines
$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
Quoted 6 lines
Quoted 1 line
I have VERSION 2.0.86 in git?
This seems to break make install-pywrap on the current selinux trunk:
bashexception.sh> selinuxswig_python_exception.i
swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i selinuxswig_python_exception.i swig error : Unrecognized option selinuxswig_python.i
Use 'swig -help' for available options.This btw prevents use of Caleb's patches on Fedora 12. If I can't build and install the python modules from the selinux repo, then there is an undefined dependency from the Fedora libsemanage-python module on the upstream libsemanage (some symbol introduced in the Fedora patches to libsemanage) and thus
migrate.pyis unable to import semanage and aborts.
Quoted 5 lines
Quoted 3 lines
Hmm...if I make swigify, all is well again. But something seems wrong with the
Makefile...Lets stop carrying the patch for swigified c and py file from the package and force you to have to run make swigify in the build procedure.
I am fine with that, having an outdated swig wrapper has caused much more pain than having to have swig installed will.
--
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.
Quoted 156 lines · Joshua Brindle
Quoted 155 lines · Daniel J Walsh
Quoted 153 lines · Stephen Smalley
Quoted 150 lines · Stephen Smalley
Quoted 133 lines · Stephen Smalley
Quoted 131 lines · Daniel J Walsh
Quoted 128 lines · Joshua Brindle
Quoted 120 lines · Joshua Brindle
Quoted 46 lines · Joshua Brindle
Quoted 19 lines · Daniel J Walsh
Quoted 17 lines · Joshua Brindle
Quoted 15 lines · Joshua Brindle
Quoted 7 lines · Daniel J Walsh
What do you think of this one. Removed excess swig cruft,
You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works. I'm
trying
to reproduce what you are doing by hand but nothing comes out of gcc:Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
[root@localhost src]# echo '#include "
../include/selinux/selinux.h"'>temp.c
[root@localhost src]# gcc -ctemp.c-aux-info temp.aux [root@localhost src]# ls temp.*temp.ctemp.oI got this "sort of" working locally. It works when I call it directly
on the header but it leaves a .gch file sitting in the include directory.Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux<
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate. See<http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 9 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean
shouldn't remove it, else it should be in the pywrap target and not installed.I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"'> temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ {print $6
}' temp.aux`; do except $i ; donelibselinux/src/exception.sh +2
-1-rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux< ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; doQuoted 4 lines
except
$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
Quoted 8 lines
Quoted 1 line
I have VERSION 2.0.86 in git?
This seems to break make install-pywrap on the current selinux trunk:
bashexception.sh> selinuxswig_python_exception.i
swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i selinuxswig_python_exception.i
swig error : Unrecognized option selinuxswig_python.i
Use 'swig -help' for available options.This btw prevents use of Caleb's patches on Fedora 12. If I can't build and install the python modules from the selinux repo, then there is an undefined dependency from the Fedora libsemanage-python module on the upstream libsemanage (some symbol introduced in the Fedora patches to libsemanage) and thus
migrate.pyis unable to import semanage and aborts.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Hmm...if I make swigify, all is well again. But something seems wrong with the
Makefile...
The make targets swigify and make install-pywrap should do the same things during their swig step, however they don't. It appears that make swigify does not include the second target to swig (selinuxswig_python_exception.i), but install-pywrap does. On the other hand, swig also does not accept multiple .i files so install-pywrap fails.
As a result the exception wrappers are not installed.
[make swigify]
[ccase@fc12 libselinux]$ make distclean
<snip>
[ccase@fc12 libselinux]$ make swigify
<snip>
make -C src swigify
make[1]: Entering directory `/home/ccase/projects/git/selinux-upstream/libselinux/src' bash exception.sh > selinuxswig_python_exception.i
swig -Wall -python -o selinuxswig_wrap.c -outdir ./ selinuxswig_python.i ../include/selinux/avc.h:410: Warning(302): Identifier 'avc_cache_stats' redefined (ignored), ../include/selinux/avc.h:390: Warning(302): previous definition of 'avc_cache_stats'.../include/selinux/selinux.h:142: Warning(451): Setting a const char * variable may leak memory.../include/selinux/selinux.h:345: Warning(451): Setting a const char * variable may leak memory.
make[1]: Leaving directory `/home/ccase/projects/git/selinux-upstream/libselinux/src'
[make install-pywrap]
[ccase@fc12 libselinux]$ make distclean
<snip>
[ccase@fc12 libselinux]$ make install-pywrap <snip>
bash exception.sh > selinuxswig_python_exception.i swig -Wall -python -o selinuxswig_wrap.c -outdir ./ selinuxswig_python.i selinuxswig_python_exception.i swig error : Unrecognized option selinuxswig_python.i Use 'swig -help' for available options.
make[1]: *** [selinuxswig_wrap.c] Error 1 make[1]: Leaving directory `/home/ccase/projects/git/selinux-upstream/libselinux/src'
make: *** [install-pywrap] Error 2
Caleb
--
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.
Quoted 175 lines · Caleb Case
Quoted 132 lines · Joshua Brindle
Quoted 131 lines · Daniel J Walsh
Quoted 130 lines · Stephen Smalley
Quoted 129 lines · Stephen Smalley
Quoted 128 lines · Stephen Smalley
Quoted 120 lines · Daniel J Walsh
Quoted 111 lines · Joshua Brindle
Quoted 110 lines · Joshua Brindle
Quoted 41 lines · Joshua Brindle
Quoted 15 lines · Daniel J Walsh
Quoted 14 lines · Joshua Brindle
Quoted 13 lines · Joshua Brindle
Daniel J Walsh wrote:
What do you think of this one. Removed excess swig cruft,You need to run
make swigify to generate those changes.
Ok, looking at this now. I don't completely get how it works.
I'm
trying
to reproduce what you are doing by hand but nothing comes out of
gcc:Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
[root@localhost src]# echo '#include
"../include/selinux/selinux.h"'>
temp.c
[root@localhost src]# gcc -c temp.c -aux-info temp.aux
[root@localhost src]# ls temp.*
temp.c temp.oI got this "sort of" working locally. It works when I call it directly
on the header but it leaves a .gch file sitting in the include directory.Trying to use stdin I get:
[root@localhost src]# gcc -x c-header -c - -aux-info temp.aux<
../include/selinux/selinux.h
<stdin>:569: internal compiler error: Segmentation fault Please submit a full bug report,
with preprocessed source if appropriate.
See<http://bugzilla.redhat.com/bugzilla> for instructions.Other comments:
Quoted 9 lines
The disconnect between swigify and clean targets remains: If make swigify builds this, and it is checked in to the tree then make clean
shouldn't remove it, else it should be in the pywrap target and not installed.I'm not sure what the header re-ordering in selinuxswig.i and the copytree/install functions have to do with this patch.
Applied with this diff on top:
libselinux/src/Makefile +0
-0@@ -16,14 +16,14 @@ LIBVERSION = 1LIBA=libselinux.a
TARGET=libselinux.solibselinux/src/Makefile +1
-1-SWIGIF= selinuxswig_python.i +SWIGIF= selinuxswig_python.i selinuxswig_python_exception.iSWIGRUBYIF= selinuxswig_ruby.i
SWIGCOUT=selinuxswig_wrap.c
SWIGRUBYCOUT=selinuxswig_ruby_wrap.cSWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=_selinux.solibselinux/src/Makefile +1
-1-SWIGFILES=$(SWIGSO) selinux.py +SWIGFILES=$(SWIGSO) selinux.py selinuxswig_python_exception.iSWIGRUBYSO=_rubyselinux.so
LIBSO=$(TARGET).$(LIBVERSION)
AUDIT2WHYSO=audit2why.solibselinux/src/Makefile +0
-0@@ -103,7 +103,7 @@ $(SWIGCOUT): $(SWIGIF) $(SWIGRUBYCOUT): $(SWIGRUBYIF)$(SWIGRUBY) $^
libselinux/src/Makefile +1
-1-swigify: $(SWIGIF) selinuxswig_python_exception.i +swigify: $(SWIGIF)$(SWIG) $<
install: all
libselinux/src/Makefile +0
-0@@ -127,7 +127,7 @@ relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO)clean:
- -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~ selinuxswig_python_exception.i
+ -rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~distclean: clean
rm -f $(GENERATED) $(SWIGFILES)libselinux/src/exception.sh +0
-0@@ -15,7 +15,6 @@ echo " ;;esac
}libselinux/src/exception.sh +0
-3-echo '#include "../include/selinux/selinux.h"'> temp.c -gcc -c temp.c -aux-info temp.aux -for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ {print $6
}' temp.aux`; do except $i ; doneQuoted 8 lines
Quoted 7 lines
libselinux/src/exception.sh +2
-1-rm -f temp.c temp.aux temp.o +gcc -x c -c - -aux-info temp.aux< ../include/selinux/selinux.h +for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; doexcept
$i ; done
+rm -f -- temp.aux -.oMerged in libselinux-2.0.87
Quoted 1 line
I have VERSION 2.0.86 in git?
This seems to break make install-pywrap on the current selinux trunk:
bashexception.sh> selinuxswig_python_exception.i
swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i selinuxswig_python_exception.i
swig error : Unrecognized option selinuxswig_python.i
Use 'swig -help' for available options.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
This btw prevents use of Caleb's patches on Fedora 12. If I can't build and install the python modules from the selinux repo, then there is an undefined dependency from the Fedora libsemanage-python module on the upstream libsemanage (some symbol introduced in the Fedora patches to libsemanage) and thus
migrate.pyis unable to import semanage and aborts.Hmm...if I make swigify, all is well again. But something seems wrong with the
Makefile...The make targets swigify and make install-pywrap should do the same things during their swig step, however they don't. It appears that make swigify does not include the second target to swig (selinuxswig_python_exception.i), but install-pywrap does. On the other hand, swig also does not accept multiple .i files so install-pywrap fails.
As a result the exception wrappers are not installed.
[make swigify]
[ccase@fc12 libselinux]$ make distclean
<snip>
[ccase@fc12 libselinux]$ make swigify
<snip>
make -C src swigify
make[1]: Entering directory `/home/ccase/projects/git/selinux-upstream/libselinux/src' bashexception.sh> selinuxswig_python_exception.i
swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i../include/selinux/avc.h:410: Warning(302): Identifier 'avc_cache_stats' redefined (ignored),../include/selinux/avc.h:390: Warning(302): previous definition of 'avc_cache_stats'.../include/selinux/selinux.h:142: Warning(451): Setting a const char * variable may leak memory.../include/selinux/selinux.h:345: Warning(451): Setting a const char * variable may leak memory.
make[1]: Leaving directory `/home/ccase/projects/git/selinux-upstream/libselinux/src'[make install-pywrap]
Quoted 14 lines
[ccase@fc12 libselinux]$ make distclean
<snip>
[ccase@fc12 libselinux]$ make install-pywrap <snip>
bashexception.sh> selinuxswig_python_exception.i swig -Wall -python -oselinuxswig_wrap.c-outdir ./ selinuxswig_python.i selinuxswig_python_exception.i swig error : Unrecognized option selinuxswig_python.i Use 'swig -help' for available options.
make[1]: *** [selinuxswig_wrap.c] Error 1 make[1]: Leaving directory `/home/ccase/projects/git/selinux-upstream/libselinux/src'
make: *** [install-pywrap] Error 2
I'm not sure why, make swigify and make install-pywrap both work here (F12) swig-1.3.40-5
--
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.