* [gentoo-commits] gentoo-x86 commit in sys-apps/policycoreutils/files: policycoreutils-extra-1.21-fix-python3.patch
@ 2012-06-25 20:08 Sven Vermeulen (swift)
0 siblings, 0 replies; 2+ messages in thread
From: Sven Vermeulen (swift) @ 2012-06-25 20:08 UTC (permalink / raw
To: gentoo-commits
swift 12/06/25 20:08:44
Added: policycoreutils-extra-1.21-fix-python3.patch
Log:
Fix python 3 and audit2allow support, needed for bugs #408179 and #415091
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Revision Changes Path
1.1 sys-apps/policycoreutils/files/policycoreutils-extra-1.21-fix-python3.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/files/policycoreutils-extra-1.21-fix-python3.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/policycoreutils/files/policycoreutils-extra-1.21-fix-python3.patch?rev=1.1&content-type=text/plain
Index: policycoreutils-extra-1.21-fix-python3.patch
===================================================================
diff -ur policycoreutils-extra.orig/scripts/rlpkg policycoreutils-extra/scripts/rlpkg
--- policycoreutils-extra.orig/scripts/rlpkg 2012-05-01 16:01:43.321023704 +0200
+++ policycoreutils-extra/scripts/rlpkg 2012-05-01 16:01:53.192023725 +0200
@@ -86,7 +86,7 @@
t = portage.db["/"]["vartree"].dbapi.match(search_key)
# catch the "amgigous package" Exception
except ValueError as e:
- if type(e[0]) == types.ListType:
+ if type(e[0]) == list:
t = []
for cp in e[0]:
t += portage.db["/"]["vartree"].dbapi.match(cp)
@@ -112,7 +112,7 @@
def find_xattr_mounts():
"""Find mounted xattr filesystems"""
- print("Relabeling filesystem types: "+" ".join(xattrfs))
+ print(("Relabeling filesystem types: "+" ".join(xattrfs)))
mounts=open("/etc/mtab", "r")
fs_matches=[]
@@ -158,29 +158,29 @@
(ret,context) = selinux.getfilecon(filename)
if ret < 0:
- print("Error getting context of "+filename)
+ print(("Error getting context of "+filename))
continue
ctx = string.split(context,":")
if len(ctx) < 3:
- print("Debug: getfilecon on \""+filename+"\" returned a context of \""+context+"\" which split incorrectly ("+ctx+").")
+ print(("Debug: getfilecon on \""+filename+"\" returned a context of \""+context+"\" which split incorrectly ("+ctx+")."))
continue
if ctx[2] in textrel_ok_relabelfrom:
if verbose:
- print("Relabeling "+filename+" to "+textrel_type+".")
+ print(("Relabeling "+filename+" to "+textrel_type+"."))
ctx[2] = textrel_type
if selinux.setfilecon(filename,string.join(ctx,":")) < 0:
- print("Failed to relabel "+filename)
+ print(("Failed to relabel "+filename))
elif ctx[2] == textrel_type:
if verbose:
- print("Skipping "+filename+" because it is already "+textrel_type+".")
+ print(("Skipping "+filename+" because it is already "+textrel_type+"."))
else:
- print("Not relabeling "+filename+" because it is "+ctx[2]+".")
+ print(("Not relabeling "+filename+" because it is "+ctx[2]+"."))
notok += 1
- print("%(a)d libraries with text relocations, %(b)d not relabeled." % {"a":textrel_libs, "b":notok})
+ print(("%(a)d libraries with text relocations, %(b)d not relabeled." % {"a":textrel_libs, "b":notok}))
if notok > 0:
print("\nSome files were not relabeled! This is not necessarily bad,")
@@ -197,10 +197,10 @@
textrel_bins = 0
for line in tb.stdout.readline():
- print("PIE executable "+line.split()[1]+" has text relocations!")
+ print(("PIE executable "+line.split()[1]+" has text relocations!"))
textrel_bins += 1
- print("%d binaries with text relocations detected." % (textrel_bins))
+ print(("%d binaries with text relocations detected." % (textrel_bins)))
if textrel_bins > 0:
print("\nPIE binaries with text relocations have been detected!")
@@ -234,8 +234,8 @@
childin = os.popen(string.join(cmdline),'w')
for i in pkglist:
- print("Relabeling: "+i.get_cpv())
- for j in i.get_contents().keys():
+ print(("Relabeling: "+i.get_cpv()))
+ for j in list(i.get_contents().keys()):
childin.write(j+'\n')
rc = childin.close()
@@ -245,14 +245,14 @@
if rc == None:
rc = 0
else:
- print("Error relabeling: %d" % (rc))
+ print(("Error relabeling: %d" % (rc)))
return rc
def usage(message=""):
pgmname = os.path.basename(sys.argv[0])
- print("Usage: %s [OPTIONS] {<pkg1> [<pkg2> ...]}" % (pgmname))
+ print(("Usage: %s [OPTIONS] {<pkg1> [<pkg2> ...]}" % (pgmname)))
print("\n\
-a, --all Relabel the entire filesystem instead of individual packages.\n\
-r, --reset Force reset of context if the file's selinux identity is\n\
@@ -266,7 +266,7 @@
\"policycoreutils\" or \">=sys-apps/policycoreutils-1.30\".\n\
")
if message != "":
- print(pgmname+": "+message)
+ print((pgmname+": "+message))
sys.exit(1)
else:
sys.exit(0)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-apps/policycoreutils/files: policycoreutils-extra-1.21-fix-python3.patch
@ 2014-05-10 14:04 Sven Vermeulen (swift)
0 siblings, 0 replies; 2+ messages in thread
From: Sven Vermeulen (swift) @ 2014-05-10 14:04 UTC (permalink / raw
To: gentoo-commits
swift 14/05/10 14:04:59
Removed: policycoreutils-extra-1.21-fix-python3.patch
Log:
Spring cleanup
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-10 14:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-10 14:04 [gentoo-commits] gentoo-x86 commit in sys-apps/policycoreutils/files: policycoreutils-extra-1.21-fix-python3.patch Sven Vermeulen (swift)
-- strict thread matches above, loose matches on Subject: below --
2012-06-25 20:08 Sven Vermeulen (swift)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox