rpms/policycoreutils/F-8 policycoreutils-sepolgen.patch, 1.4, 1.5 policycoreutils.spec, 1.481, 1.482 sources, 1.172, 1.173
Daniel J Walsh (dwalsh)
fedora-extras-commits at redhat.com
Wed Dec 19 18:43:21 UTC 2007
- Previous message (by thread): rpms/ruby-activerecord/devel .cvsignore, 1.4, 1.5 ruby-activerecord.spec, 1.3, 1.4 sources, 1.4, 1.5
- Next message (by thread): rpms/ruby-activesupport/F-7 .cvsignore, 1.4, 1.5 ruby-activesupport.spec, 1.4, 1.5 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dwalsh
Update of /cvs/extras/rpms/policycoreutils/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24493
Modified Files:
policycoreutils-sepolgen.patch policycoreutils.spec sources
Log Message:
* Tue Dec 19 2007 Dan Walsh <dwalsh at redhat.com> 2.0.34-1
- Update to upstream
* Tue Dec 19 2007 Dan Walsh <dwalsh at redhat.com> 2.0.33-4
- Fix sepolgen to be able to parse Fedora 9 policy
Handle ifelse statements
Handle refpolicywarn inside of define
Add init.if and inetd.if into parse
Add parse_file to syntax error message
policycoreutils-sepolgen.patch:
Index: policycoreutils-sepolgen.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-8/policycoreutils-sepolgen.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- policycoreutils-sepolgen.patch 22 Feb 2007 15:14:00 -0000 1.4
+++ policycoreutils-sepolgen.patch 19 Dec 2007 18:43:14 -0000 1.5
@@ -0,0 +1,102 @@
+diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/refparser.py policycoreutils-2.0.34/sepolgen-1.0.10/src/sepolgen/refparser.py
+--- nsasepolgen/src/sepolgen/refparser.py 2007-09-13 08:21:11.000000000 -0400
++++ policycoreutils-2.0.34/sepolgen-1.0.10/src/sepolgen/refparser.py 2007-12-19 06:05:51.000000000 -0500
+@@ -118,6 +118,7 @@
+ 'TEMPLATE',
+ 'GEN_CONTEXT',
+ # m4
++ 'IFELSE',
+ 'IFDEF',
+ 'IFNDEF',
+ 'DEFINE'
+@@ -174,6 +175,7 @@
+ 'template' : 'TEMPLATE',
+ 'gen_context' : 'GEN_CONTEXT',
+ # M4
++ 'ifelse' : 'IFELSE',
+ 'ifndef' : 'IFNDEF',
+ 'ifdef' : 'IFDEF',
+ 'define' : 'DEFINE'
+@@ -220,6 +222,12 @@
+ # Ignore all comments
+ t.lexer.lineno += 1
+
++def t_refpolicywarn1(t):
++ r'define.*refpolicywarn\(.*\n'
++ # Ignore refpolicywarn statements - they sometimes
++ # contain text that we can't parse.
++ t.skip(1)
++
+ def t_refpolicywarn(t):
+ r'refpolicywarn\(.*\n'
+ # Ignore refpolicywarn statements - they sometimes
+@@ -258,6 +266,7 @@
+ m = None
+ # error is either None (indicating no error) or a string error message.
+ error = None
++parse_file = ""
+ # spt is the support macros (e.g., obj/perm sets) - it is an instance of
+ # refpolicy.SupportMacros and should always be present during parsing
+ # though it may not contain any macros.
+@@ -382,6 +391,19 @@
+ collect(p[12], x, val=False)
+ p[0] = [x]
+
++def p_ifelse(p):
++ '''ifelse : IFELSE OPAREN TICK IDENTIFIER SQUOTE COMMA COMMA TICK IDENTIFIER SQUOTE COMMA TICK interface_stmts SQUOTE CPAREN optional_semi
++ | IFELSE OPAREN TICK IDENTIFIER SQUOTE COMMA TICK IDENTIFIER SQUOTE COMMA TICK interface_stmts SQUOTE COMMA TICK interface_stmts SQUOTE CPAREN optional_semi
++ '''
++# x = refpolicy.IfDef(p[4])
++# v = True
++# collect(p[8], x, val=v)
++# if len(p) > 12:
++# collect(p[12], x, val=False)
++# p[0] = [x]
++ pass
++
++
+ def p_ifdef(p):
+ '''ifdef : IFDEF OPAREN TICK IDENTIFIER SQUOTE COMMA TICK interface_stmts SQUOTE CPAREN optional_semi
+ | IFNDEF OPAREN TICK IDENTIFIER SQUOTE COMMA TICK interface_stmts SQUOTE CPAREN optional_semi
+@@ -446,6 +468,7 @@
+ | optional_policy
+ | tunable_policy
+ | ifdef
++ | ifelse
+ | conditional
+ '''
+ p[0] = p[1]
+@@ -844,7 +867,8 @@
+
+ def p_error(tok):
+ global error
+- error = "Syntax error on line %d %s [type=%s]" % (tok.lineno, tok.value, tok.type)
++ global parse_file
++ error = "%s: Syntax error on line %d %s [type=%s]" % (parse_file, tok.lineno, tok.value, tok.type)
+ print error
+
+ def prep_spt(spt):
+@@ -892,7 +916,7 @@
+ def list_headers(root):
+ modules = []
+ support_macros = None
+- blacklist = ["init.if", "inetd.if", "uml.if", "thunderbird.if"]
++ blacklist = ["uml.if", "thunderbird.if"]
+
+ for dirpath, dirnames, filenames in os.walk(root):
+ for name in filenames:
+@@ -941,12 +965,14 @@
+ output.write(msg)
+
+ def parse_file(f, module, spt=None):
++ global parse_file
+ if debug:
+ o("parsing file %s\n" % f)
+ try:
+ fd = open(f)
+ txt = fd.read()
+ fd.close()
++ parse_file = f
+ parse(txt, module, spt, debug)
+ except IOError, e:
+ return
Index: policycoreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-8/policycoreutils.spec,v
retrieving revision 1.481
retrieving revision 1.482
diff -u -r1.481 -r1.482
--- policycoreutils.spec 17 Dec 2007 15:52:43 -0000 1.481
+++ policycoreutils.spec 19 Dec 2007 18:43:14 -0000 1.482
@@ -5,8 +5,8 @@
%define sepolgenver 1.0.10
Summary: SELinux policy core utilities
Name: policycoreutils
-Version: 2.0.33
-Release: 3%{?dist}
+Version: 2.0.34
+Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -23,6 +23,7 @@
Patch1: policycoreutils-po.patch
#Patch2: policycoreutils-sepolgen.patch
Patch3: policycoreutils-gui.patch
+Patch4: policycoreutils-sepolgen.patch
BuildRequires: pam-devel libsepol-devel >= %{libsepolver} libsemanage-devel >= %{libsemanagever} libselinux-devel >= %{libselinuxver} libcap-devel audit-libs-devel >= %{libauditver} gettext
Requires: /bin/mount /bin/egrep /bin/awk /usr/bin/diff rpm /bin/sed
@@ -53,6 +54,7 @@
%patch1 -p1 -b .rhatpo
#%patch2 -p1 -b .sepolgen
%patch3 -p1 -b .gui
+%patch4 -p1 -b .sepolgen
%build
make LSPP_PRIV=y LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all
@@ -191,6 +193,15 @@
fi
%changelog
+* Tue Dec 19 2007 Dan Walsh <dwalsh at redhat.com> 2.0.34-1
+- Update to upstream
+* Tue Dec 19 2007 Dan Walsh <dwalsh at redhat.com> 2.0.33-4
+- Fix sepolgen to be able to parse Fedora 9 policy
+ Handle ifelse statements
+ Handle refpolicywarn inside of define
+ Add init.if and inetd.if into parse
+ Add parse_file to syntax error message
+
* Fri Dec 14 2007 Dan Walsh <dwalsh at redhat.com> 2.0.33-3
- Add scroll bar to fcontext gui page
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-8/sources,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -r1.172 -r1.173
--- sources 11 Dec 2007 02:59:48 -0000 1.172
+++ sources 19 Dec 2007 18:43:14 -0000 1.173
@@ -1,2 +1,2 @@
eddb3e34fb982d752aa8cbed7b98f3d2 sepolgen-1.0.10.tgz
-b877db4ee4b2474df1da952c8d0a3e1c policycoreutils-2.0.33.tgz
+ca550750667febd8441a8eb498863602 policycoreutils-2.0.34.tgz
- Previous message (by thread): rpms/ruby-activerecord/devel .cvsignore, 1.4, 1.5 ruby-activerecord.spec, 1.3, 1.4 sources, 1.4, 1.5
- Next message (by thread): rpms/ruby-activesupport/F-7 .cvsignore, 1.4, 1.5 ruby-activesupport.spec, 1.4, 1.5 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list