SHA256
1
0
forked from pool/rpmlint
rpmlint/suse-file-var-run.diff

36 lines
1.7 KiB
Diff

Index: FilesCheck.py
===================================================================
--- FilesCheck.py.orig
+++ FilesCheck.py
@@ -901,7 +901,7 @@ class FilesCheck(AbstractCheck.AbstractC
is_kernel_package:
printError(pkg, "kernel-modules-not-in-kernel-packages", f)
- if tmp_regex.search(f):
+ if tmp_regex.search(f) and f not in ghost_files:
printError(pkg, 'dir-or-file-in-tmp', f)
elif f.startswith('/mnt/'):
printError(pkg, 'dir-or-file-in-mnt', f)
@@ -911,6 +911,8 @@ 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/') and f not in ghost_files:
+ printError(pkg, 'dir-or-file-in-var-run', f)
elif sub_bin_regex.search(f):
printError(pkg, 'subdir-in-bin', f)
elif f.startswith('/home/'):
@@ -1478,6 +1480,12 @@ 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.''',
+'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. Modify your package to create the
+necessary files during runtime.''',
+
'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.''',