--- setroubleshoot-2.2.52.orig/configure +++ setroubleshoot-2.2.52/configure @@ -727,6 +727,8 @@ CC GETTEXT_PACKAGE ACLOCAL_AMFLAGS +POLKIT_LIBS +POLKIT_CFLAGS SEAPPLET_LIBS SEAPPLET_CFLAGS NOTIFY_LIBS @@ -803,6 +805,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode +enable_fixit enable_dependency_tracking enable_nls with_libcap_ng @@ -820,6 +823,8 @@ NOTIFY_LIBS SEAPPLET_CFLAGS SEAPPLET_LIBS +POLKIT_CFLAGS +POLKIT_LIBS CC CFLAGS LDFLAGS @@ -1454,6 +1459,8 @@ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-fixit enable fixit code (require polkit-backend) +[default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-nls do not use Native Language Support @@ -1477,6 +1484,9 @@ C compiler flags for SEAPPLET, overriding pkg-config SEAPPLET_LIBS linker flags for SEAPPLET, overriding pkg-config + POLKIT_CFLAGS + C compiler flags for POLKIT, overriding pkg-config + POLKIT_LIBS linker flags for POLKIT, overriding pkg-config CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a @@ -2482,6 +2492,21 @@ +# Check whether --enable-fixit was given. +if test "${enable_fixit+set}" = set; then + enableval=$enable_fixit; + if test "x$enableval" = "xno"; then + ac_enable_fixit="no" + else + ac_enable_fixit="yes" + fi + +else + ac_enable_fixit="yes" +fi + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then @@ -3034,6 +3059,117 @@ $as_echo "yes" >&6; } : fi +if test "$ac_enable_fixit" = "yes"; then + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for POLKIT" >&5 +$as_echo_n "checking for POLKIT... " >&6; } + +if test -n "$POLKIT_CFLAGS"; then + pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit-backend-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "polkit-backend-1") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_POLKIT_CFLAGS=`$PKG_CONFIG --cflags "polkit-backend-1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$POLKIT_LIBS"; then + pkg_cv_POLKIT_LIBS="$POLKIT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"polkit-backend-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "polkit-backend-1") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_POLKIT_LIBS=`$PKG_CONFIG --libs "polkit-backend-1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + POLKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "polkit-backend-1" 2>&1` + else + POLKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "polkit-backend-1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$POLKIT_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (polkit-backend-1) were not met: + +$POLKIT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables POLKIT_CFLAGS +and POLKIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (polkit-backend-1) were not met: + +$POLKIT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables POLKIT_CFLAGS +and POLKIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables POLKIT_CFLAGS +and POLKIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables POLKIT_CFLAGS +and POLKIT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + POLKIT_CFLAGS=$pkg_cv_POLKIT_CFLAGS + POLKIT_LIBS=$pkg_cv_POLKIT_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +fi # make sure we keep ACLOCAL_FLAGS around for maintainer builds to work ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" --- setroubleshoot-2.2.52.orig/configure.ac +++ setroubleshoot-2.2.52/configure.ac @@ -7,10 +7,23 @@ AM_INIT_AUTOMAKE AM_MAINTAINER_MODE +AC_ARG_ENABLE(fixit, [ --enable-fixit enable fixit code (require polkit-backend) +[[default=yes]]],[ + if test "x$enableval" = "xno"; then + ac_enable_fixit="no" + else + ac_enable_fixit="yes" + fi + ],[ ac_enable_fixit="yes"]) + + PKG_CHECK_MODULES([DBUS], [dbus-1]) PKG_CHECK_MODULES([GTK], [gtk+-2.0]) PKG_CHECK_MODULES([NOTIFY], [libnotify]) PKG_CHECK_MODULES([SEAPPLET], [gtk+-2.0 libnotify]) +if test "$ac_enable_fixit" = "yes"; then + PKG_CHECK_MODULES([POLKIT], [polkit-backend-1]) +fi # make sure we keep ACLOCAL_FLAGS around for maintainer builds to work AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}") --- setroubleshoot-2.2.52.orig/debian/dirs +++ setroubleshoot-2.2.52/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/sbin +usr/share/setroubleshoot/plugins --- setroubleshoot-2.2.52.orig/debian/rules +++ setroubleshoot-2.2.52/debian/rules @@ -0,0 +1,125 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +else +CROSS= --build $(DEB_BUILD_GNU_TYPE) +endif + + + +config.status: patch configure + dh_testdir + # Add here commands to configure the package. +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + ./configure $(CROSS) --prefix=/usr \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=\$${prefix}/lib \ + --enable-fixit=no \ + CFLAGS="$(CFLAGS)" + #LDFLAGS="-Wl,-z,defs" + + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/setroubleshoot.sgml > setroubleshoot.1 + + touch $@ + +clean: clean-patched unpatch + +clean-patched: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess + rm -f setroubleshoot.desktop src/setroubleshoot.cfg + rm -rf src/sesearch/setroubleshoot/ + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Add here commands to install the package into debian/setroubleshoot. + $(MAKE) DESTDIR=$(CURDIR)/debian/setroubleshoot install + + # remove extra license file + find $(CURDIR)/debian/setroubleshoot -name "COPYING*" -delete + + rm -rf $(CURDIR)/debian/setroubleshoot/var/run/setroubleshoot + + cp -f setroubleshoot.logrotate debian/ + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf + dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime + dh_pysupport + dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- setroubleshoot-2.2.52.orig/debian/watch +++ setroubleshoot-2.2.52/debian/watch @@ -0,0 +1,11 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Recursive directory scanning, starting from +# http://cvs.fedoraproject.org/repo/pkgs/setroubleshoot/ +http://cvs.fedoraproject.org/repo/pkgs/setroubleshoot/setroubleshoot-([\d\.]+).tar.gz\//([a-zA-Z0-9]+)/ setroubleshoot-([\d\.]+).tar.gz --- setroubleshoot-2.2.52.orig/debian/postinst +++ setroubleshoot-2.2.52/debian/postinst @@ -0,0 +1,52 @@ +#!/bin/sh +# postinst script for setroubleshoot +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + # workaround plugins import problem + [ -f /usr/share/setroubleshoot/plugins/__init__.py ] || \ + touch /usr/share/setroubleshoot/plugins/__init__.py + + # no more init script + [ ! -f "/etc/init.d/setroubleshoot" ] || \ + (update-rc.d -f setroubleshoot remove; rm -f /etc/init.d/setroubleshoot) + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +echo "Reloading DBus" +invoke-rc.d dbus reload || true + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- setroubleshoot-2.2.52.orig/debian/docs +++ setroubleshoot-2.2.52/debian/docs @@ -0,0 +1,3 @@ +NEWS +README +TODO --- setroubleshoot-2.2.52.orig/debian/compat +++ setroubleshoot-2.2.52/debian/compat @@ -0,0 +1 @@ +7 --- setroubleshoot-2.2.52.orig/debian/postrm +++ setroubleshoot-2.2.52/debian/postrm @@ -0,0 +1,45 @@ +#!/bin/sh +# postrm script for setroubleshoot +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + purge) + rm -rf /var/lib/setroubleshoot + rm -rf /var/log/setroubleshoot + rm -rf /var/run/setroubleshoot + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- setroubleshoot-2.2.52.orig/debian/copyright +++ setroubleshoot-2.2.52/debian/copyright @@ -0,0 +1,21 @@ +This package was debianized by Pierre Chifflier on +Wed, 15 Oct 2008 21:15:36 +0200. + +It was downloaded from https://fedorahosted.org/setroubleshoot + +Upstream Authors: + + John Dennis + Dan Walsh + +Copyright 2006,2007,2008 Red Hat, Inc. + +License: + + This software is distributed under the GNU General Public License + version 2 or later, which can be found at + /usr/share/common-licenses/GPL. + +The Debian packaging is (C) 2008, Pierre Chifflier and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + --- setroubleshoot-2.2.52.orig/debian/changelog +++ setroubleshoot-2.2.52/debian/changelog @@ -0,0 +1,137 @@ +setroubleshoot (2.2.52-1) unstable; urgency=low + + * New upstream release + * Refreshed quilt patches + + -- Pierre Chifflier Fri, 18 Dec 2009 16:54:32 +0100 + +setroubleshoot (2.2.45-1) unstable; urgency=low + + * New upstream release + * Refreshed quilt patches + + -- Pierre Chifflier Wed, 04 Nov 2009 13:54:49 +0100 + +setroubleshoot (2.2.38-1) unstable; urgency=low + + * New upstream release + * Refreshed quilt patches + + -- Pierre Chifflier Fri, 09 Oct 2009 10:44:22 +0200 + +setroubleshoot (2.2.28-2) unstable; urgency=low + + * Fix missing imports in src/browser.py + * Move setroubleshoot-plugins to dependencies, setroubleshoot won't work + without plugins + + -- Pierre Chifflier Mon, 14 Sep 2009 09:26:57 +0200 + +setroubleshoot (2.2.28-1) unstable; urgency=low + + * New upstream release + * Bump standards version to 3.8.3 + * Refreshed quilt patches + + -- Pierre Chifflier Sat, 12 Sep 2009 18:44:53 +0200 + +setroubleshoot (2.2.18-1) unstable; urgency=low + + * New Upstream Version + + -- Pierre Chifflier Sat, 12 Sep 2009 18:33:32 +0200 + +setroubleshoot (2.2.13-2) unstable; urgency=low + + * Add build-dep on python-dev (Closes: #536995) + + -- Pierre Chifflier Thu, 16 Jul 2009 18:54:23 +0200 + +setroubleshoot (2.2.13-1) unstable; urgency=low + + * New Upstream Version + + -- Pierre Chifflier Thu, 09 Jul 2009 21:17:17 +0200 + +setroubleshoot (2.2.7-1) unstable; urgency=low + + * New Upstream Version + * Set minimum Python version to 2.5 + * Bump standards version to 3.8.2 + * Add 20_unavailable_imports.patch + - Suppress unavailable (redhat-specific) imports + - Replace bugzilla window by a messagebox suggesting to use + Debian bugtracker + + -- Pierre Chifflier Tue, 30 Jun 2009 13:32:35 +0200 + +setroubleshoot (2.1.14-1) unstable; urgency=low + + * New Upstream Version + + -- Pierre Chifflier Mon, 15 Jun 2009 09:10:48 +0200 + +setroubleshoot (2.1.12-1) unstable; urgency=low + + * New Upstream Version + + -- Pierre Chifflier Sun, 07 Jun 2009 22:19:23 +0200 + +setroubleshoot (2.1.11-1) unstable; urgency=low + + * New Upstream Version + + -- Pierre Chifflier Mon, 25 May 2009 10:41:33 +0200 + +setroubleshoot (2.1.10-1) unstable; urgency=low + + * New Upstream Version: + Fix alarm exiting after 10 seconds + + -- Pierre Chifflier Sun, 10 May 2009 22:12:35 +0200 + +setroubleshoot (2.1.9-2) unstable; urgency=low + + * Add build-depend on libselinux1-dev (Closes: #525054) + + -- Pierre Chifflier Wed, 22 Apr 2009 09:25:54 +0200 + +setroubleshoot (2.1.9-1) unstable; urgency=low + + * New Upstream Version + * Force removal of init script and rc symlinks (Closes: #524544) + + -- Pierre Chifflier Mon, 20 Apr 2009 10:09:25 +0200 + +setroubleshoot (2.1.6-2) unstable; urgency=low + + * Change binary-indep to binary-arch for arch:any transition + + -- Pierre Chifflier Wed, 15 Apr 2009 16:04:09 +0200 + +setroubleshoot (2.1.6-1) unstable; urgency=low + + * New Upstream Version + * Make package arch:any, some parts are now coded in C + * Fix dependencies (Closes: #515571) + * Add consolekit to dependencies + * setroubleshootd is now started dynamically (and is no more a daemon) + It automatically dies when there are no client or alerts + Init script has been removed (Closes: #515131) + * Bump standards version to 3.8.1, no changes + * + + -- Pierre Chifflier Wed, 15 Apr 2009 15:22:28 +0200 + +setroubleshoot (2.0.12-2) unstable; urgency=low + + * Exit gracefully if SElinux is disabled (Closes: #508089) + + -- Pierre Chifflier Mon, 08 Dec 2008 15:40:08 +0100 + +setroubleshoot (2.0.12-1) unstable; urgency=low + + * Initial release (Closes: #471701) + + -- Pierre Chifflier Tue, 04 Nov 2008 15:03:49 +0100 + --- setroubleshoot-2.2.52.orig/debian/pyversions +++ setroubleshoot-2.2.52/debian/pyversions @@ -0,0 +1 @@ +2.5- --- setroubleshoot-2.2.52.orig/debian/setroubleshoot.logrotate +++ setroubleshoot-2.2.52/debian/setroubleshoot.logrotate @@ -0,0 +1,8 @@ +/var/log/setroubleshoot/*.log { + weekly + rotate 2 + missingok + sharedscripts +# postrotate +# endscript +} --- setroubleshoot-2.2.52.orig/debian/control +++ setroubleshoot-2.2.52/debian/control @@ -0,0 +1,55 @@ +Source: setroubleshoot +Section: admin +Priority: extra +Maintainer: Pierre Chifflier +Build-Depends: debhelper (>= 7), + quilt, + autotools-dev, + python, + python-support (>= 0.6), + xdg-utils, + gettext, + intltool, + libxml-parser-perl, + libnotify-dev, + libgtk2.0-dev, + libaudit-dev, + libselinux1-dev, + libapol-dev, + libqpol-dev, + python-dev +Standards-Version: 3.8.3 +Homepage: https://fedorahosted.org/setroubleshoot + +Package: setroubleshoot +Architecture: any +Depends: ${python:Depends}, + ${shlibs:Depends}, + dbus, + consolekit, + python-audit, + python-notify, + python-rpm, + python-gtkhtml2, + python-dbus, + python-libxml2, + python-gnome2, + python-gnomekeyring, + rpm, + setroubleshoot-plugins +Recommends: auditd, + policycoreutils, + selinux-policy-default +Description: Tool to help troubleshoot SELinux problems + Tools to help diagnose SELinux problems. When AVC messages + are generated an alert can be generated that will give information + about the problem and help track its resolution. Alerts can be configured + to user preference. The same tools can be run on existing log files. + . + This package provides the SELinux troubleshoot server, and a graphical + application to analyze AVC messages, and get some hints on possible + solutions. + + + + --- setroubleshoot-2.2.52.orig/debian/README.Debian +++ setroubleshoot-2.2.52/debian/README.Debian @@ -0,0 +1,27 @@ +setroubleshoot for Debian +========================= + +Requirements +------------ + +To work correctly on a single host, the following packages are required:: + + - selinux-basic, selinux-policy-default (with SELinux enabled, in Permissive or Enforcing mode) + - auditd, sending events to /var/run/audispd_events (default auditd config) + - setroubleshoot-plugins + +If you don't have setroubleshoot-plugins installed, you will never get +any alert ! + +These packages are marked as Recommends (and not Depends), because they are +optional in case you are connecting to a remote server. + +Debian specific changes +----------------------- + +setroubleshoot checks the alert context to avoid infinite loops. +However, the check is done by comparing setroubleshootd context to the alert +context, which won't work until a SELinux policy is written for +setroubleshootd (it actually runs as unconfined_t). + + -- Pierre Chifflier Fri, 17 Oct 2008 23:28:28 +0200 --- setroubleshoot-2.2.52.orig/debian/patches/20_unavailable_imports.patch +++ setroubleshoot-2.2.52/debian/patches/20_unavailable_imports.patch @@ -0,0 +1,161 @@ +Index: setroubleshoot/src/browser.py +=================================================================== +--- setroubleshoot.orig/src/browser.py 2009-12-18 16:53:58.000000000 +0100 ++++ setroubleshoot/src/browser.py 2009-12-18 16:54:04.000000000 +0100 +@@ -9,14 +9,14 @@ + import datetime + import time + import gtkhtml2 +-import bugzilla, xmlrpclib ++import xmlrpclib + from filer import * + import pygtk + import gobject +-import yum ++#import yum + import gnomekeyring + import gtk +-import packagekit.frontend as pkf ++#import packagekit.frontend as pkf + import gtk.glade + from setroubleshoot.log import * + from setroubleshoot.analyze import * +@@ -31,8 +31,8 @@ + from setroubleshoot.run_cmd import * + import re + import dbus +-import slip.dbus.service +-from slip.dbus import polkit ++#import slip.dbus.service ++#from slip.dbus import polkit + import tempfile + + GLADE_DIRECTORY = "/usr/share/setroubleshoot/gui/" +@@ -41,12 +41,22 @@ + PREF_PATH = PREF_DIRECTORY + PREF_FILENAME + SYSTEM_VERSION_PATH = "/etc/system-release" + ++ ++class MessageBox(gtk.MessageDialog): ++ def __init__(self, parent, message): ++ gtk.MessageDialog.__init__(self, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, message) ++ self.set_default_response(gtk.RESPONSE_OK) ++ self.connect('response', self._handle_clicked) ++ ++ def _handle_clicked(self, *args): ++ self.destroy() ++ + class DBusProxy (object): + def __init__ (self): + self.bus = dbus.SystemBus () + self.dbus_object = self.bus.get_object ("org.fedoraproject.SetroubleshootFixit", "/org/fedoraproject/SetroubleshootFixit/object") + +- @polkit.enable_proxy ++ #@polkit.enable_proxy + def run_fix (self, local_id): + return self.dbus_object.run_fix (local_id, dbus_interface = "org.fedoraproject.SetroubleshootFixit") + +@@ -444,34 +454,34 @@ + Check for new policy + """ + installed = [] +- try: +- yb = yum.YumBase() +- yb.conf.cache = True +- try: +- pl = yb.doPackageLists(patterns=['selinux-policy']) +- except yum.Errors.RepoError, msg: +- yb.conf.cache = False +- pl = yb.doPackageLists(patterns=['selinux-policy']) +- +- if pl.installed: +- for pkg in sorted(pl.installed): +- installed.append(pkg.name) +- if pkg.name == 'selinux-policy': +- self.current_policy_label.set_markup("Policy Version: %s" % pkg.printVer()) +- +- if pl.available: +- for pkg in sorted(pl.available): +- self.report_button.set_tooltip_text("There is a newer version of policy available. Updating your policy may fix the denial that you having problems with.") +- for widget in self.report_button.get_children()[0].get_children()[0].get_children(): +- if type(widget) == gtk.Label: +- widget.set_text("Update Policy") +- #if pkg.name in installed: +- # self.new_policy_box.show() +- except yum.Errors.RepoError, msg: +- print "RepoError", str(msg) ++ #try: ++ # yb = yum.YumBase() ++ # yb.conf.cache = True ++ # try: ++ # pl = yb.doPackageLists(patterns=['selinux-policy']) ++ # except yum.Errors.RepoError, msg: ++ # yb.conf.cache = False ++ # pl = yb.doPackageLists(patterns=['selinux-policy']) ++ ++ # if pl.installed: ++ # for pkg in sorted(pl.installed): ++ # installed.append(pkg.name) ++ # if pkg.name == 'selinux-policy': ++ # self.current_policy_label.set_markup("Policy Version: %s" % pkg.printVer()) ++ ++ # if pl.available: ++ # for pkg in sorted(pl.available): ++ # self.report_button.set_tooltip_text("There is a newer version of policy available. Updating your policy may fix the denial that you having problems with.") ++ # for widget in self.report_button.get_children()[0].get_children()[0].get_children(): ++ # if type(widget) == gtk.Label: ++ # widget.set_text("Update Policy") ++ # #if pkg.name in installed: ++ # # self.new_policy_box.show() ++ #except yum.Errors.RepoError, msg: ++ # print "RepoError", str(msg) + +- except yum.Errors.ConfigError, msg: +- print "ConfigError", str(msg) ++ #except yum.Errors.ConfigError, msg: ++ # print "ConfigError", str(msg) + + def empty_load(self): + self.date_label.set_markup("") +@@ -655,19 +665,15 @@ + + + def report_button_clicked(self, widget): +- for widget in self.report_button.get_children()[0].get_children()[0].get_children(): +- if type(widget) == gtk.Label: +- label = widget +- if label.get_text() == "Update Policy": +- if os.fork() == 0: +- os.execv('/usr/bin/gpk-update-viewer', []) +- label.set_text("Report Bug...") +- return +- # If we don't have a bug_report_window yet, make a new one +- if self.bug_report_window is None: +- br = BugReport(self, self.alert_list[self.current_alert], self.bugzilla_username) +- self.bug_report_window = br +- self.bug_report_window.main_window.show() ++ ## If we don't have a bug_report_window yet, make a new one ++ #if self.bug_report_window is None: ++ # br = BugReport(self, self.alert_list[self.current_alert], self.bugzilla_username) ++ # self.bug_report_window = br ++ #self.bug_report_window.main_window.show() ++ dialog = MessageBox(None, ++"""This function is disabled in the Debian package. ++Please use reportbug or reportbug-ng to fill a bugreport.""") ++ dialog.show_all() + + def grant_button_clicked(self, widget): + # Grant access here +Index: setroubleshoot/src/sealert +=================================================================== +--- setroubleshoot.orig/src/sealert 2009-12-18 16:53:58.000000000 +0100 ++++ setroubleshoot/src/sealert 2009-12-18 16:54:04.000000000 +0100 +@@ -34,7 +34,7 @@ + import socket as Socket + import fcntl + import sys +-import slip.dbus.service ++#import slip.dbus.service + + from setroubleshoot.config import parse_config_setting, get_config + gettext.install(domain = get_config('general', 'i18n_text_domain'), --- setroubleshoot-2.2.52.orig/debian/patches/series +++ setroubleshoot-2.2.52/debian/patches/series @@ -0,0 +1,2 @@ +10_remove_context_check.patch +20_unavailable_imports.patch --- setroubleshoot-2.2.52.orig/debian/patches/10_remove_context_check.patch +++ setroubleshoot-2.2.52/debian/patches/10_remove_context_check.patch @@ -0,0 +1,13 @@ +Index: setroubleshoot/src/avc_audit.py +=================================================================== +--- setroubleshoot.orig/src/avc_audit.py 2009-09-12 18:40:25.000000000 +0200 ++++ setroubleshoot/src/avc_audit.py 2009-09-12 18:40:29.000000000 +0200 +@@ -52,7 +52,7 @@ + if avc.scontext.type == None or avc.tcontext.type == None: + return False + +- if my_context.type == avc.scontext.type: ++ if my_context.type == avc.scontext.type and my_context.type == "unconfined_t": + log_program.error( "setroubleshoot generated AVC, exiting to avoid recursion, context=%s, AVC scontext=%s", my_context, avc.scontext) + log_program.error( "audit event\n%s", avc.audit_event.format()) + import sys