From d685ddb42daa5d3b122c0486cc1d4f2dde6c466f Mon Sep 17 00:00:00 2001 From: scop Date: Fri, 13 May 2011 17:10:53 +0000 Subject: [PATCH] Warn about non-ghost files in /var/run and /var/lock (based on patch from Ludwig Nussel). git-svn-id: http://rpmlint.zarb.org/svn/trunk@1863 9bc8b190-ac0f-0410-8968-dc7d1f502856 --- FilesCheck.py | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) Index: rpmlint-1.2/FilesCheck.py =================================================================== --- rpmlint-1.2.orig/FilesCheck.py +++ rpmlint-1.2/FilesCheck.py @@ -915,6 +915,12 @@ class FilesCheck(AbstractCheck.AbstractC 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/'): + if f not in ghost_files: + printWarning(pkg, 'non-ghost-in-var-run', f) + elif f.startswith('/var/lock/'): + if f not in ghost_files: + printWarning(pkg, 'non-ghost-in-var-lock', f) elif sub_bin_regex.search(f): printError(pkg, 'subdir-in-bin', f) elif f.startswith('/home/'): @@ -1491,6 +1497,16 @@ for packages to install files in this di '''A file in the package is located in /var/local. It's not permitted for packages to install files in this directory.''', +'non-ghost-in-var-run', +'''A file or directory in the package is located in /var/run. Files installed +in this directory should be marked as %ghost and created at runtime to work +properly in tmpfs /var/run setups.''', + +'non-ghost-in-var-lock', +'''A file or directory in the package is located in /var/lock. Files installed +in this directory should be marked as %ghost and created at runtime to work +properly in tmpfs /var/lock setups.''', + '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.''',