[arch-projects] [PATCH] namcap: Add rubypaths rule warning against usage of usr/lib/ruby/site_ruby.

Rémy Oudompheng remyoudompheng at gmail.com
Sun Feb 26 08:14:24 EST 2012


---
This patch implements FS#28478. Can you take a look?

 NEWS                |    6 ++++++
 Namcap/rules/fhs.py |    9 +++++++++
 namcap-tags         |    1 +
 3 files changed, 16 insertions(+)

diff --git a/NEWS b/NEWS
index 3ffe3b6..cbc166d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+namcap (3.2.3)
+	- add pyelftools as a dependency, drop prelink.
+	- add rubypaths rule warning against use of site_ruby
+	- modify elfexecstack rule to use elftools
+	- add test case for elfexecstack
+
 namcap (3.2.2)
 	- fix: unwanted warning when testing database is not found (FS#27973)
 	- fix: Creative Commons licenses not recognized (FS#27489)
diff --git a/Namcap/rules/fhs.py b/Namcap/rules/fhs.py
index 2ce34d0..e66d67e 100644
--- a/Namcap/rules/fhs.py
+++ b/Namcap/rules/fhs.py
@@ -90,4 +90,13 @@ class FHSInfoPagesRule(TarballRule):
 					if part == "info":
 						self.warnings.append(("potential-non-fhs-info-page %s", i.name))
 
+class RubyPathsRule(TarballRule):
+	name = "rubypaths"
+	description = "Verifies correct usage of folders by ruby packages"
+	def analyze(self, pkginfo, tar):
+		for i in tar.getmembers():
+			if i.name.startswith('usr/lib/ruby/site_ruby'):
+				self.warnings.append(("site-ruby", ()))
+				return
+
 # vim: set ts=4 sw=4 noet:
diff --git a/namcap-tags b/namcap-tags
index fce8cf4..818c7a5 100644
--- a/namcap-tags
+++ b/namcap-tags
@@ -68,6 +68,7 @@ potential-non-fhs-info-page %s :: Potential non-FHS info page (%s) found.
 potential-non-fhs-man-page %s :: Potential non-FHS man page (%s) found.
 script-link-detected %s in %s :: Script link detected (%s) in file %s
 scrollkeeper-dir-exists %s :: Scrollkeeper directory exists (%s). Remember to not run scrollkeeper till post_{install,upgrade,remove}.
+site-ruby :: Found usr/lib/ruby/site_ruby in package, usr/lib/ruby/vendor_ruby should be used instead.
 specific-host-type-used %s :: Reference to %s should be changed to $CARCH
 specific-sourceforge-mirror :: Attempting to use specific sourceforge mirror, use downloads.sourceforge.net instead
 symlink-found %s points to %s :: Symlink (%s) found that points to %s
-- 
1.7.9.2



More information about the arch-projects mailing list