|
|
503409 |
From ebe08cf927d75a7546d649fcaa73e1af5996150b Mon Sep 17 00:00:00 2001
|
|
|
503409 |
From: Miroslav Grepl <mgrepl@redhat.com>
|
|
|
503409 |
Date: Fri, 13 Jun 2014 08:21:26 +0200
|
|
|
503409 |
Subject: [PATCH] Make selinux-policy build working also on another
|
|
|
503409 |
architectures related to sepolicy-manpage generate
|
|
|
503409 |
|
|
|
503409 |
---
|
|
|
503409 |
policycoreutils/sepolicy/sepolicy/__init__.py | 21 ++++++++++++---------
|
|
|
503409 |
policycoreutils/sepolicy/sepolicy/manpage.py | 6 +++---
|
|
|
503409 |
2 files changed, 15 insertions(+), 12 deletions(-)
|
|
|
503409 |
|
|
|
503409 |
diff --git a/policycoreutils/sepolicy/sepolicy/__init__.py b/policycoreutils/sepolicy/sepolicy/__init__.py
|
|
|
503409 |
index 7ef8adf..e3943c0 100644
|
|
|
503409 |
--- a/policycoreutils/sepolicy/sepolicy/__init__.py
|
|
|
503409 |
+++ b/policycoreutils/sepolicy/sepolicy/__init__.py
|
|
|
503409 |
@@ -888,16 +888,19 @@ def get_os_version():
|
|
|
503409 |
output = subprocess.check_output("rpm -q '%s'" % pkg_name,
|
|
|
503409 |
stderr=subprocess.STDOUT,
|
|
|
503409 |
shell=True)
|
|
|
503409 |
- os_version = str(output).split(".")[-2]
|
|
|
503409 |
- except subprocess.CalledProcessError as e:
|
|
|
503409 |
- print(e.output)
|
|
|
503409 |
+ try:
|
|
|
503409 |
+ os_version = str(output).split(".")[-2]
|
|
|
503409 |
+ if os_version[0:2] == "fc":
|
|
|
503409 |
+ os_version = "Fedora"+os_version[2:]
|
|
|
503409 |
+ elif os_version[0:2] == "el":
|
|
|
503409 |
+ os_version = "RHEL"+os_version[2:]
|
|
|
503409 |
+ else:
|
|
|
503409 |
+ os_version = "Misc"
|
|
|
503409 |
+ except IndexError:
|
|
|
503409 |
+ os_version = "Misc"
|
|
|
503409 |
|
|
|
503409 |
- if os_version[0:2] == "fc":
|
|
|
503409 |
- os_version = "Fedora"+os_version[2:]
|
|
|
503409 |
- elif os_version[0:2] == "el":
|
|
|
503409 |
- os_version = "RHEL"+os_version[2:]
|
|
|
503409 |
- else:
|
|
|
503409 |
- os_version = ""
|
|
|
503409 |
+ except subprocess.CalledProcessError:
|
|
|
503409 |
+ os_version = "Misc"
|
|
|
503409 |
|
|
|
503409 |
return os_version
|
|
|
503409 |
|
|
|
503409 |
diff --git a/policycoreutils/sepolicy/sepolicy/manpage.py b/policycoreutils/sepolicy/sepolicy/manpage.py
|
|
|
503409 |
index 1765b1c..ecb4461 100755
|
|
|
503409 |
--- a/policycoreutils/sepolicy/sepolicy/manpage.py
|
|
|
503409 |
+++ b/policycoreutils/sepolicy/sepolicy/manpage.py
|
|
|
503409 |
@@ -175,7 +175,7 @@ class HTMLManPages:
|
|
|
503409 |
self.old_path = path + "/"
|
|
|
503409 |
self.new_path = self.old_path + self.os_version+"/"
|
|
|
503409 |
|
|
|
503409 |
- if self.os_version in fedora_releases or rhel_releases:
|
|
|
503409 |
+ if (self.os_version in fedora_releases) or (self.os_version in rhel_releases) or (self.os_version == "Misc"):
|
|
|
503409 |
self.__gen_html_manpages()
|
|
|
503409 |
else:
|
|
|
503409 |
print(("SELinux HTML man pages can not be generated for this %s" % os_version))
|
|
|
503409 |
@@ -255,10 +255,10 @@ Fedora or Red Hat Enterprise Linux Man Pages.
|
|
|
503409 |
<html>
|
|
|
503409 |
<head>
|
|
|
503409 |
<link rel=stylesheet type="text/css" href="../style.css" title="style">
|
|
|
503409 |
- <title>Linux man-pages online for Fedora18</title>
|
|
|
503409 |
+ <title>Linux man-pages online for Fedora/RHEL</title>
|
|
|
503409 |
</head>
|
|
|
503409 |
<body>
|
|
|
503409 |
-SELinux man pages for Fedora18
|
|
|
503409 |
+SELinux man pages for Fedora/RHEL
|
|
|
503409 |
|
|
|
503409 |
|
|
|
503409 |
|
|
|
503409 |
--
|
|
|
503409 |
2.0.4
|
|
|
503409 |
|