SHA256
1
0
forked from pool/rpmlint
rpmlint/suse-file-var-run.diff
OBS User autobuild 23044a1498 Accepting request 38983 from Base:System
Copy from Base:System/rpmlint based on submit request 38983 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/38983
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=59
2010-04-28 20:41:49 +00:00

34 lines
1.4 KiB
Diff

--- FilesCheck.py
+++ FilesCheck.py
@@ -392,7 +392,7 @@
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)
@@ -402,6 +402,8 @@
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/'):
@@ -945,6 +948,12 @@
'''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.''',