[arch-projects] [namcap][PATCH] fhs: update valid and invalid paths

Tom Gundersen teg at jklm.no
Sat Mar 31 19:56:14 EDT 2012


* Remove /var/lock form valid paths. It is already forbidden, so should not be valid.
* Empty most of /lib. We want to empty /lib over time. This explicitly allows the subdirs
  that would need a coordinated rebuild to empty, and disallows everything else.
* Prod people into emptying /{s,}bin. To the extent possible these dirs should be emptied
  and moved to /usr/bin. In particular we want to avoid new or third-party packages
  putting stuff here.
* Disallow installing in /srv. /srv is admin territory, similar to /home. No package should
  put stuff there.

Signed-off-by: Tom Gundersen <teg at jklm.no>
---

This is updated to be up-to-date with the status of the current move of /lib to /usr/lib,
and squashed into one commit as suggested. Once /lib is a symlink to /usr/lib, we should
update this again, but even now this would be very useful to make sure people get warnings
in case they are about to put stuff back into /lib.

 Namcap/rules/fhs.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Namcap/rules/fhs.py b/Namcap/rules/fhs.py
index e66d67e..455c5cd 100644
--- a/Namcap/rules/fhs.py
+++ b/Namcap/rules/fhs.py
@@ -26,10 +26,11 @@ class FHSRule(TarballRule):
 	description = "Checks for standard directories."
 	def analyze(self, pkginfo, tar):
 		valid_paths = [
-				'bin/', 'etc/', 'lib/', 'sbin/', 'opt/', 'srv/',
+				'etc/', 'opt/',
+				'lib/modules', 'lib/security',
 				'usr/bin/', 'usr/include/', 'usr/lib/', 'usr/lib32/',
 				'usr/sbin/', 'usr/share/',
-				'var/cache/', 'var/lib/', 'var/lock/', 'var/log/', 'var/opt/',
+				'var/cache/', 'var/lib/', 'var/log/', 'var/opt/',
 				'var/spool/', 'var/state/',
 				'.PKGINFO', '.INSTALL', '.CHANGELOG',
 		]
-- 
1.7.9.5



More information about the arch-projects mailing list