From facaf7c7679f5b700b529098e909eed0347fcad4 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 15 Feb 2007 20:27:16 +0000 Subject: [PATCH] * Thu Feb 15 2007 Dan Walsh 2.0.1-2 - Cleanup man pages syntax - Add sepolgen --- .cvsignore | 1 + policycoreutils-po.patch | 24 +++---- policycoreutils-rhat.patch | 128 ++++++++++++++++++++++----------- policycoreutils-sepolgen.patch | 20 ++++++ policycoreutils.spec | 41 ++++++++--- sources | 1 + 6 files changed, 150 insertions(+), 65 deletions(-) create mode 100644 policycoreutils-sepolgen.patch diff --git a/.cvsignore b/.cvsignore index 35ccb07..43a70d5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -131,3 +131,4 @@ policycoreutils-1.34.0.tgz policycoreutils-1.34.1.tgz policycoreutils-2.0.0.tgz policycoreutils-2.0.1.tgz +sepolgen-1.0.0.tgz diff --git a/policycoreutils-po.patch b/policycoreutils-po.patch index 6ee8e29..58c55a0 100644 --- a/policycoreutils-po.patch +++ b/policycoreutils-po.patch @@ -1,6 +1,6 @@ -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/bs.po policycoreutils-1.34.1/po/bs.po +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/bs.po policycoreutils-2.0.1/po/bs.po --- nsapolicycoreutils/po/bs.po 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-1.34.1/po/bs.po 2007-01-24 14:40:16.000000000 -0500 ++++ policycoreutils-2.0.1/po/bs.po 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,1116 @@ +# translation of bs.po to Bosnian +# Adnan Hodzic , 2007. @@ -1118,9 +1118,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/bs.po policycoreutils +msgid "Options Error: %s " +msgstr "Opciona greška: %s " + -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/da.po policycoreutils-1.34.1/po/da.po +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/da.po policycoreutils-2.0.1/po/da.po --- nsapolicycoreutils/po/da.po 2007-01-19 08:50:12.000000000 -0500 -+++ policycoreutils-1.34.1/po/da.po 2007-01-24 14:40:16.000000000 -0500 ++++ policycoreutils-2.0.1/po/da.po 2007-02-15 15:01:06.000000000 -0500 @@ -3,7 +3,7 @@ # Christian Rose , 2006. # Keld Simonsen , 2006. @@ -1130,9 +1130,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/da.po policycoreutils # msgid "" msgstr "" -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/mr.po policycoreutils-1.34.1/po/mr.po +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/mr.po policycoreutils-2.0.1/po/mr.po --- nsapolicycoreutils/po/mr.po 2007-01-19 08:50:12.000000000 -0500 -+++ policycoreutils-1.34.1/po/mr.po 2007-01-24 14:40:16.000000000 -0500 ++++ policycoreutils-2.0.1/po/mr.po 2007-02-15 15:01:06.000000000 -0500 @@ -2,14 +2,15 @@ # This file is distributed under the same license as the PACKAGE package. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. @@ -2390,9 +2390,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/mr.po policycoreutils -msgstr "चूक " +msgstr "पर्याय चूक: %s" + -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/ms.po policycoreutils-1.34.1/po/ms.po +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/ms.po policycoreutils-2.0.1/po/ms.po --- nsapolicycoreutils/po/ms.po 2007-01-19 08:50:12.000000000 -0500 -+++ policycoreutils-1.34.1/po/ms.po 2007-01-24 14:40:16.000000000 -0500 ++++ policycoreutils-2.0.1/po/ms.po 2007-02-15 15:01:06.000000000 -0500 @@ -8,7 +8,7 @@ "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" @@ -3079,9 +3079,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/ms.po policycoreutils msgid "Options Error: %s " msgstr "Ralat Pilihan: %s" + -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sv.po policycoreutils-1.34.1/po/sv.po +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sv.po policycoreutils-2.0.1/po/sv.po --- nsapolicycoreutils/po/sv.po 2007-01-19 08:50:12.000000000 -0500 -+++ policycoreutils-1.34.1/po/sv.po 2007-01-24 14:40:16.000000000 -0500 ++++ policycoreutils-2.0.1/po/sv.po 2007-02-15 15:01:06.000000000 -0500 @@ -1,15 +1,15 @@ # Swedish messages for policycoreutils. -# Copyright (C) 2006 Christian Rose. @@ -3256,9 +3256,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sv.po policycoreutils #: ../semanage/seobject.py:1203 msgid "Requires value" -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/uk.po policycoreutils-1.34.1/po/uk.po +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/uk.po policycoreutils-2.0.1/po/uk.po --- nsapolicycoreutils/po/uk.po 2007-01-19 08:50:12.000000000 -0500 -+++ policycoreutils-1.34.1/po/uk.po 2007-01-24 14:40:16.000000000 -0500 ++++ policycoreutils-2.0.1/po/uk.po 2007-02-15 15:01:06.000000000 -0500 @@ -1,14 +1,14 @@ # Ukraqinian translation of policycoreutils. # Copyright (C) 2006 Free software Foundation diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 4e65ed7..3416f88 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,6 +1,6 @@ -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.1/gui/booleansPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.1/gui/booleansPage.py --- nsapolicycoreutils/gui/booleansPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/booleansPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/booleansPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,199 @@ +# +# booleansPage.py - GUI for Booleans page in system-config-securitylevel @@ -201,9 +201,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + + setsebool="/usr/sbin/setsebool -P %s=%d" % (key, not val) + commands.getstatusoutput(setsebool) -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.1/gui/fcontextPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.1/gui/fcontextPage.py --- nsapolicycoreutils/gui/fcontextPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/fcontextPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/fcontextPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,158 @@ +## fcontextPage.py - show selinux mappings +## Copyright (C) 2006 Red Hat, Inc. @@ -363,9 +363,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + self.store.set_value(iter, 0, fspec) + self.store.set_value(iter, 2, ftype) + self.store.set_value(iter, 1, "system_u:object_r:%s:%s" % (type, mls)) -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.1/gui/loginsPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.1/gui/loginsPage.py --- nsapolicycoreutils/gui/loginsPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/loginsPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/loginsPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,161 @@ +## loginsPage.py - show selinux mappings +## Copyright (C) 2006 Red Hat, Inc. @@ -528,9 +528,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + self.store.set_value(iter, 1, seuser) + self.store.set_value(iter, 2, seobject.translate(serange)) + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.1/gui/Makefile +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.1/gui/Makefile --- nsapolicycoreutils/gui/Makefile 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/Makefile 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/Makefile 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,30 @@ +# Installation directories. +PREFIX ?= ${DESTDIR}/usr @@ -562,9 +562,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. +indent: + +relabel: -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.1/gui/mappingsPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.1/gui/mappingsPage.py --- nsapolicycoreutils/gui/mappingsPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/mappingsPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/mappingsPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,54 @@ +## mappingsPage.py - show selinux mappings +## Copyright (C) 2006 Red Hat, Inc. @@ -620,9 +620,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + for k in keys: + print "%-25s %-25s %-25s" % (k, dict[k][0], translate(dict[k][1])) + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.1/gui/modulesPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.1/gui/modulesPage.py --- nsapolicycoreutils/gui/modulesPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/modulesPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/modulesPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,161 @@ +## modulesPage.py - show selinux mappings +## Copyright (C) 2006 Red Hat, Inc. @@ -785,9 +785,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + + + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.1/gui/portsPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.1/gui/portsPage.py --- nsapolicycoreutils/gui/portsPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/portsPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/portsPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,214 @@ +## portsPage.py - show selinux mappings +## Copyright (C) 2006 Red Hat, Inc. @@ -1003,9 +1003,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + self.store.set_value(iter, MLS_COL, mls) + + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.1/gui/selinux.tbl +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.1/gui/selinux.tbl --- nsapolicycoreutils/gui/selinux.tbl 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/selinux.tbl 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/selinux.tbl 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,265 @@ +acct_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for acct daemon") +allow_cvs_read_shadow _("CVS") _("Allow cvs daemon to read shadow") @@ -1272,9 +1272,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. +ypserv_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ypserv daemon") +ypxfr_disable_trans _("NIS") _("Disable SELinux protection for NIS Transfer Daemon") +zebra_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for zebra daemon") -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.1/gui/semanagePage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.1/gui/semanagePage.py --- nsapolicycoreutils/gui/semanagePage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/semanagePage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/semanagePage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,109 @@ +## semanagePage.py - show selinux mappings +## Copyright (C) 2006 Red Hat, Inc. @@ -1385,9 +1385,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + self.dialog.hide() + + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.1/gui/statusPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.1/gui/statusPage.py --- nsapolicycoreutils/gui/statusPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/statusPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/statusPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,213 @@ +## statusPage.py - show selinux status +## Copyright (C) 2006 Red Hat, Inc. @@ -1602,9 +1602,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + return self.types[self.selinuxTypeOptionMenu.get_active()] + + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.1/gui/system-config-selinux.glade +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.1/gui/system-config-selinux.glade --- nsapolicycoreutils/gui/system-config-selinux.glade 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/system-config-selinux.glade 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/system-config-selinux.glade 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,2803 @@ + + @@ -4409,9 +4409,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + + + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.1/gui/system-config-selinux.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.1/gui/system-config-selinux.py --- nsapolicycoreutils/gui/system-config-selinux.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/system-config-selinux.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/system-config-selinux.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,156 @@ +#!/usr/bin/python +# @@ -4569,9 +4569,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + + app = childWindow() + app.stand_alone() -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/translationsPage.py policycoreutils-2.0.1/gui/translationsPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/translationsPage.py policycoreutils-2.0.1/gui/translationsPage.py --- nsapolicycoreutils/gui/translationsPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/translationsPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/translationsPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,109 @@ +## translationsPage.py - show selinux translations +## Copyright (C) 2006 Red Hat, Inc. @@ -4682,9 +4682,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + store, iter = self.view.get_selection().get_selected() + self.store.set_value(iter, 0, level) + self.store.set_value(iter, 1, translation) -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.1/gui/usersPage.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.1/gui/usersPage.py --- nsapolicycoreutils/gui/usersPage.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.1/gui/usersPage.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/gui/usersPage.py 2007-02-15 15:01:06.000000000 -0500 @@ -0,0 +1,155 @@ +## usersPage.py - show selinux mappings +## Copyright (C) 2006 Red Hat, Inc. @@ -4841,18 +4841,18 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. + except ValueError, e: + self.error(e.args[0]) + -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.1/Makefile +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.1/Makefile --- nsapolicycoreutils/Makefile 2006-11-16 17:15:00.000000000 -0500 -+++ policycoreutils-2.0.1/Makefile 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/Makefile 2007-02-15 15:01:06.000000000 -0500 @@ -1,4 +1,4 @@ -SUBDIRS=setfiles semanage load_policy newrole run_init restorecon restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po +SUBDIRS=setfiles semanage load_policy newrole run_init restorecon restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui all install relabel clean indent: @for subdir in $(SUBDIRS); do \ -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-2.0.1/newrole/newrole.c +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-2.0.1/newrole/newrole.c --- nsapolicycoreutils/newrole/newrole.c 2007-01-24 10:03:59.000000000 -0500 -+++ policycoreutils-2.0.1/newrole/newrole.c 2007-02-12 10:51:04.000000000 -0500 ++++ policycoreutils-2.0.1/newrole/newrole.c 2007-02-15 15:01:06.000000000 -0500 @@ -640,7 +640,7 @@ } @@ -4879,9 +4879,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. if (fd != 2) goto err_close_pam; -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.1/restorecond/restorecond.c +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.1/restorecond/restorecond.c --- nsapolicycoreutils/restorecond/restorecond.c 2006-11-16 17:14:28.000000000 -0500 -+++ policycoreutils-2.0.1/restorecond/restorecond.c 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/restorecond/restorecond.c 2007-02-15 15:01:06.000000000 -0500 @@ -210,9 +210,10 @@ } @@ -4908,9 +4908,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. } free(scontext); close(fd); -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.1/restorecond/restorecond.conf +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.1/restorecond/restorecond.conf --- nsapolicycoreutils/restorecond/restorecond.conf 2006-11-20 12:19:55.000000000 -0500 -+++ policycoreutils-2.0.1/restorecond/restorecond.conf 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/restorecond/restorecond.conf 2007-02-15 15:01:06.000000000 -0500 @@ -1,7 +1,9 @@ /etc/resolv.conf +/etc/localtime @@ -4921,9 +4921,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. /var/log/wtmp ~/public_html ~/.mozilla/plugins/libflashplayer.so -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.1/scripts/chcat +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.1/scripts/chcat --- nsapolicycoreutils/scripts/chcat 2006-11-16 17:14:27.000000000 -0500 -+++ policycoreutils-2.0.1/scripts/chcat 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/scripts/chcat 2007-02-15 15:01:06.000000000 -0500 @@ -25,11 +25,22 @@ import commands, sys, os, pwd, string, getopt, selinux import seobject @@ -5025,9 +5025,53 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. except ValueError, e: usage() -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/scripts/fixfiles.8 policycoreutils-2.0.1/scripts/fixfiles.8 +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat.8 policycoreutils-2.0.1/scripts/chcat.8 +--- nsapolicycoreutils/scripts/chcat.8 2007-01-17 11:11:34.000000000 -0500 ++++ policycoreutils-2.0.1/scripts/chcat.8 2007-02-15 15:01:06.000000000 -0500 +@@ -3,30 +3,31 @@ + chcat \- change file SELinux security category + .SH SYNOPSIS + .B chcat +-\fICATEGORY FILE\fR... ++\fIcategory file\fR... + .br + .B chcat -l +-\fICATEGORY USER\fR... ++\fIcategory user\fR... + .br + .B chcat +-\fI[[+|-]CATEGORY],...] FILE\fR... ++\fI[[+|-]category...] file\fR... + .br + .B chcat -l +-\fI[[+|-]CATEGORY],...] USER\fR... ++\fI[[+|-]category...] user\fR... + .br + .B chcat +-[\fI-d\fR] \fIFILE\fR... ++[\fI-d\fR] \fIfile\fR... + .br + .B chcat -l +-[\fI-d\fR] \fIUSER\fR... ++[\fI-d\fR] \fIuser\fR... + .br + .B chcat +-\fI-L\fR [-l] [ USER ... ] ++\fI-L\fR [ -l ] [ user ... ] + .br ++.SH DESCRIPTION + .PP +-Change/Remove the security CATEGORY for each FILE/USER. ++Change/Remove the security \fIcategory\fR for each \fIfile\fR or \fIuser\fR. + .PP +-Use +/- to add/remove categories from a FILE/USER. ++Use +/- to add/remove categories from a \fIfile\fR or \fIuser\fR. + .PP + .B + Note: +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles.8 policycoreutils-2.0.1/scripts/fixfiles.8 --- nsapolicycoreutils/scripts/fixfiles.8 2007-01-17 11:11:34.000000000 -0500 -+++ policycoreutils-2.0.1/scripts/fixfiles.8 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/scripts/fixfiles.8 2007-02-15 15:01:06.000000000 -0500 @@ -54,7 +54,7 @@ change any incorrect file context labels. .TP @@ -5037,9 +5081,9 @@ diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*. .TP .B verify List out files with incorrect file context labels, but do not change them. -diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.1/semanage/seobject.py +diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.1/semanage/seobject.py --- nsapolicycoreutils/semanage/seobject.py 2007-01-17 11:11:34.000000000 -0500 -+++ policycoreutils-2.0.1/semanage/seobject.py 2007-02-12 10:50:54.000000000 -0500 ++++ policycoreutils-2.0.1/semanage/seobject.py 2007-02-15 15:01:06.000000000 -0500 @@ -209,7 +209,8 @@ os.write(fd, self.out()) os.close(fd) diff --git a/policycoreutils-sepolgen.patch b/policycoreutils-sepolgen.patch new file mode 100644 index 0000000..557eb16 --- /dev/null +++ b/policycoreutils-sepolgen.patch @@ -0,0 +1,20 @@ +diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/refparser.py policycoreutils-2.0.1/sepolgen-1.0.0/src/sepolgen/refparser.py +--- nsasepolgen/src/sepolgen/refparser.py 2007-02-07 12:12:15.000000000 -0500 ++++ policycoreutils-2.0.1/sepolgen-1.0.0/src/sepolgen/refparser.py 2007-02-15 15:08:28.000000000 -0500 +@@ -691,11 +691,13 @@ + output.write(msg) + + def parse_file(f, module, spt=None): +- fd = open(f) +- txt = fd.read() +- fd.close() + try: ++ fd = open(f) ++ txt = fd.read() ++ fd.close() + parse(txt, module, spt) ++ except IOError, e: ++ return + except ValueError, e: + raise ValueError("error parsing file %s: %s" % (f, str(e))) + diff --git a/policycoreutils.spec b/policycoreutils.spec index 20ce062..20df6c9 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -2,19 +2,22 @@ %define libsepolver 2.0.1-1 %define libsemanagever 1.10.0-1 %define libselinuxver 2.0.0-1 +%define sepolgenver 1.0.0 Summary: SELinux policy core utilities. Name: policycoreutils Version: 2.0.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz -Source1: system-config-selinux.png -Source2: system-config-selinux.desktop -Source3: system-config-selinux.pam -Source4: system-config-selinux.console +Source1: http://www.nsa.gov/selinux/archives/sepolgen-%{sepolgenver}.tgz +Source2: system-config-selinux.png +Source3: system-config-selinux.desktop +Source4: system-config-selinux.pam +Source5: system-config-selinux.console Patch: policycoreutils-rhat.patch Patch1: policycoreutils-po.patch +Patch2: policycoreutils-sepolgen.patch BuildRequires: pam-devel libsepol-devel >= %{libsepolver} libsemanage-devel >= %{libsemanagever} libselinux-devel >= %{libselinuxver} libcap-devel audit-libs-devel gettext Requires: /bin/mount /bin/egrep /bin/awk /usr/bin/diff /bin/rpm @@ -40,12 +43,14 @@ to switch roles, and run_init to run /etc/init.d scripts in the proper context. %prep -%setup -q +%setup -q -a 1 %patch -p1 -b .rhat %patch1 -p1 -b .rhatpo +%patch2 -p1 -b .sepolgen %build make LSPP_PRIV=y LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all +make -C sepolgen-%{sepolgenver} LSPP_PRIV=y LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all %install rm -rf %{buildroot} @@ -59,15 +64,17 @@ mkdir -p %{buildroot}%{_sysconfdir}/pam.d mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps make LSPP_PRIV=y DESTDIR="%{buildroot}" LIBDIR="%{buildroot}%{_libdir}" install -install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/system-config-selinux/ -install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/system-config-selinux -install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/security/console.apps/system-config-selinux +make -C sepolgen-%{sepolgenver} DESTDIR="%{buildroot}" LIBDIR="%{buildroot}%{_libdir}" install + +install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/system-config-selinux/ +install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/system-config-selinux +install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/security/console.apps/system-config-selinux ln -sf consolehelper %{buildroot}%{_bindir}/system-config-selinux desktop-file-install --vendor fedora \ --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ --add-category X-Fedora \ - %{SOURCE2} + %{SOURCE3} %find_lang %{name} %package newrole @@ -155,7 +162,10 @@ rm -rf %{buildroot} %{_libdir}/python?.?/site-packages/seobject.py* %attr(755,root,root) /etc/rc.d/init.d/restorecond %config(noreplace) /etc/selinux/restorecond.conf - +%dir %{_libdir}/python?.?/site-packages/sepolgen +%{_libdir}/python?.?/site-packages/sepolgen/* +%dir %{_usr}/share/sepolgen +%{_usr}/share/sepolgen/perm_map %preun if [ $1 -eq 0 ]; then @@ -166,8 +176,17 @@ fi %post /sbin/chkconfig --add restorecond [ -x /sbin/service ] && /sbin/service restorecond condrestart > /dev/null +/usr/bin/sepolgen-ifgen > /dev/null %changelog +* Thu Feb 15 2007 Dan Walsh 2.0.1-2 +- Cleanup man pages syntax +- Add sepolgen + +* Mon Feb 12 2007 Dan Walsh 2.0.1-1 +- Update to upstream + * Merged small fix to correct include of errcodes.h in semodule_deps from Dan Walsh. + * Wed Feb 7 2007 Dan Walsh 2.0.0-1 - Update to upstream * Merged new audit2allow from Karl MacMillan. diff --git a/sources b/sources index 20aee0f..eeb2ff2 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +42087696c0b3926244ccfe637ee8c89b sepolgen-1.0.0.tgz f642af08f24e04a93269cb295050ef59 policycoreutils-2.0.1.tgz