From 811469ebe70ea65029d64ae2e7bc6e9828f59c9e Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 11 May 2011 13:15:22 +0200 Subject: [PATCH] check for files in /var/run and /var/lock nowadays /var/run and /var/lock move to using tmpfs so disallow packaging files there --- FilesCheck.py | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/FilesCheck.py b/FilesCheck.py index a82b4b8..0f43927 100644 --- a/FilesCheck.py +++ b/FilesCheck.py @@ -443,6 +443,10 @@ class FilesCheck(AbstractCheck.AbstractCheck): printError(pkg, 'dir-or-file-in-usr-local', f) elif f.startswith('/var/local/'): printError(pkg, 'dir-or-file-in-var-local', f) + elif f.startswith('/var/run/') and f not in ghost_files: + printError(pkg, 'dir-or-file-in-var-run', f) + elif f.startswith('/var/lock/'): + printError(pkg, 'dir-or-file-in-var-lock', f) elif sub_bin_regex.search(f): printError(pkg, 'subdir-in-bin', f) elif f.startswith('/home/'): @@ -1019,6 +1023,18 @@ for packages to install files in this directory.''', '''A file in the package is located in /var/local. It's not permitted for packages to install files in this directory.''', +'dir-or-file-in-var-run', +'''A file or directory in the package is located in /var/run. It's not +permitted for packages to install files in this directory as it might +be created as tmpfs during boot. Mark the files in question as %ghost and +create them at run time instead.''', + +'dir-or-file-in-var-lock', +'''A file or directory in the package is located in /var/lock. It's +not permitted for packages to install files in this directory as it +is a) reserved for legacy device lock files and b) might be created +as tmpfs during boot.''', + 'subdir-in-bin', '''The package contains a subdirectory in /usr/bin. It's not permitted to create a subdir there. Create it in /usr/lib/ instead.''', -- 1.7.3.4