Rpmlint Errors

Материал из Rosalab Wiki
Версия от 12:28, 9 февраля 2012; D uragan (обсуждение | вклад) (Description of rpmlint errors that can be met in ROSA)

(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Это снимок страницы. Он включает старые, но не удалённые версии шаблонов и изображений.
Перейти к: навигация, поиск

Rpmlint in ROSA Linux is configured to detect the problems described below. Note that you can obtain a short description of any problem by invoking rpmlint with '--explain <problem-identifier>' option.

This page tries to provide more detailed information at least for non-trivial issues.

Содержание

arch-independent-package-contains-binary-or-object

Your package has been marked as noarch, but contains a binary that is architecture-specific.

backup-file-in-package

You have a file whose name looks like one for backup files, usually created by an editor or resulting from applying unclean (fuzzy, or ones with line offsets) patches.

bad-crc-in-zip

The reported file in the zip fails the CRC check. Usually this is a sign of a corrupt zip file.

binary-in-etc

This package installs an ELF binary in /etc. This is forbidden by the Filesystem Hierarchy Standard (FHS).

binary-or-shlib-defines-rpath

The binary or shared library defines the PATH'. Usually this is a bad thing because it hard codes the path to search libraries and so it makes it difficult to move libraries around. Most likely you will find a Makefile with a line like:

gcc test.o -o test -Wl,--rpath.

If the program uses ./configure, you can probably add --disable-rpath (verify with ./configure --help to see if the option is available).

You can look at the Debian wiki for more information.

If you can not change that easily, you can use chrpath -d on the given file at the end of %build. If you do so, do not forget to add a BuildRequires2: chrpath to your spec.

buildprereq-use

The use of BuildPreReq is deprecated, build dependencies are always required before a package can be built. Use plain BuildRequires instead.

compressed-symlink-with-wrong-ext

The symlink points to a compressed file but doesn't use the same extension.

description-line-too-long

Your description lines must not exceed 79 characters. If a line is exceeding this number, cut it to fit in two lines.

devel-dependency

Your package has a dependency on a devel package but it's not a devel package itself.

dir-or-file-in-home

A file in the package is located in /home. It's not permitted for packages to install files in this directory.

dir-or-file-in-mnt

A file in the package is located in /mnt. It's not permitted for packages to install files in this directory.

dir-or-file-in-opt

A file in the package is located in /opt. It's not permitted for packages to install files in this directory.

dir-or-file-in-tmp

A file in the package is located in /tmp. It's not permitted for packages to install files in this directory.

dir-or-file-in-usr-local

A file in the package is located in /usr/local. It's not permitted for packages to install files in this directory.

dir-or-file-in-var-local

A file in the package is located in /var/local. It's not permitted for packages to install files in this directory.

empty-debuginfo-package

This debuginfo package contains no files. This is often a sign of binaries being unexpectedly stripped too early during the build, rpmbuild not being able to strip the binaries, the package actually being a noarch one but erratically packaged as arch dependent, or something else. Verify what the case is, and if there's no way to produce useful debuginfo out of it, disable creation of the debuginfo package.

executable-crontab-file

This crontab file has executable bit set, which is refused by modern cron

executable-in-library-package

The package mixes up libraries and executables. Mixing up these both types of files makes upgrades quite impossible.

executable-marked-as-config-file

Executables must not be marked as config files because that may prevent upgrades from working correctly. If you need to be able to customize an executable, make it for example read a config file in /etc/sysconfig.

executable-menu-file

Menu files (those installed to /usr/lib/menu/) should not be executable

executable-sourced-script

This text file has executable bit set, but is meant to be sourced, not executed.

explicit-lib-dependency

Don't include dependencies like "Requires: libdvdread3" in your spec file. Library dependencies are managed automatically, so if your program is linked against libdvdread.so.3, the libdvdread3 package will be an automatic dependency. Also, this isn't portable to architectures like amd64, where the package is named lib64dvdread3.

If you really need a library dependency, e.g. to force the upgrade to a new version, use the virtual name provided by that package, in this example "Requires: libdvdread". (Note, however, that rpmlint will still claim on such dependency)

filename-not-utf8

The character encoding of the name of this file is not UTF-8. Rename it.

hardcoded-library-path

A library path is hardcoded to one of the following paths: /lib, /usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

Don't hardcode path in spec files, use macros instead.

htaccess-file

You have individual apache configuration .htaccess file(s) in your package. Replace them by a central configuration file in /etc/, according to the web application packaging policy.

incoherent-logrotate-file

The log file or directory name should be the same as the package name in lower case, i.e. /etc/logrotate.d/<package name>.

incoherent-subsys

The filename of your lock file in /var/lock/subsys/ is incoherent with your actual init script name. For example, if your script name is httpd, you have to use 'httpd' as the filename in your subsys directory. It is also possible that rpmlint gets this wrong, especially if the init script contains nontrivial shell variables and/or assignments. These cases usually manifest themselves when rpmlint reports that the subsys name starts a with '$'; in these cases a warning instead of an error is reported and you should check the script manually.

incoherent-version-in-name

The package name should contain the major version of the library. For example, if a package provides libxml2.so* library, it should contain 'xml2' in its name ('libxml2' or 'lib64xml2')

info-dir-file

You have /usr/info/dir or /usr/share/info/dir in your package. It will cause conflicts with other packages and thus is not allowed. Please remove it.

info-files-without-install-info-postin

This package contains info files and provides no %post scriptlet containing a call to install-info.

info-files-without-install-info-postun

This package contains info files and provides no %postun scriptlet containing a call to install-info.

init-script-name-with-dot

The init script name should not contain a dot in its name.

init-script-non-executable

The init script should have at least the execution bit set for root in order for it to run at boot time.

init-script-without-chkconfig-postin

The package contains an init script but doesn't contain a %post with a call to chkconfig or add-service.

init-script-without-chkconfig-preun

The package contains an init script but doesn't contain a %preun with a call to chkconfig or del-service.

invalid-dependency

An invalid dependency has been detected. It usually means that the build of the package was buggy. A list of dependencies treated as invalid can be found in the /usr/share/rpmlint/TagsCheck.py (see DEFAULT_INVALID_REQUIRES declaration). The list can be overridden using the InvalidRequires option.

invalid-desktopfile

.desktop file is not valid, check with desktop-file-validate

invalid-directory-reference

Don't include files in /tmp or /home in your package.

invalid-lc-messages-dir

Package installs localization files to /usr/share/locale/ subdirectory not corresponding to any valid language

invalid-ldconfig-symlink

The symbolic link references the wrong file. It should reference the shared library.

invalid-locale-man-dir

Package installs man files to /usr/share/man/ or /usr/man/ subdirectory not corresponding to any valid language

invalid-menu-section

The section field of the menu entry isn't standard. List of valid sections can be found in the beginning of the /usr/share/rpmlint/MenuCheck.py file.

invalid-soname

The soname of the library is neither of the form lib<libname>.so.<major> or lib<libname>-<major>.so.

invalid-title

The menu title contains invalid characters like '/'.

invalid-version

The version string must not contain the pre, alpha, beta or rc suffixes because when the final version will be out, you will have to use an Epoch tag to make the package upgradable. Instead put it in the release tag, prefixed with something you have control over.

lib-package-without-%mklibname

If you split out library packages, you should use the %mklibname macro to generate the name of the library package. Further information on the usage of %mklibname are in the library policy section.

library-not-linked-against-libc

Every shared object is expected to be linked against libc.

menu-in-wrong-dir

Menu files should go to /usr/lib/menu, not /usr/lib64/menu.

menu-without-postin

A menu file exists in the package but no %post scriptlet is present to call update-menus.

menu-without-postun

A menu file exists in the package but no %postun scriptlet is present to call update-menus.

missing-PT_GNU_STACK-section

The binary lacks a PT_GNU_STACK section. This forces the dynamic linker to make the stack executable. Usual suspects include use of a non-GNU linker or an old GNU linker version.

module-without-depmod-postin

This package contains a kernel module but provides no call to depmod in the %post scriptlet.

module-without-depmod-postun

This package contains a kernel module but provides no call to depmod in the %postun scriptlet.

noarch-python-in-64bit-path

Noarch package installs something to /usr/lib64/python. This should not be the case.

no-binary

The package should be of the noarch architecture because it doesn't contain any binaries. Add BuildArchitectures: noarch to the spec file.

no-chkconfig-line

The init script doesn't contain a chkconfig line to specify the runlevels at which to start and stop it.

no-dependency-on

rpmlint has detected that the package uses some capabilities not provided by its dependencies. E.g., the package installs Perl modules but does not require Perl itself.

no-description-tag

The description of the package is empty or missing. To add it, insert a %description section in your spec file, add a textual description of the package after it, and rebuild the package.

no-group-tag

There is no Group tag in your package. You have to specify a valid group in your spec file using the Group tag.

no-license

There is no License tag in your spec file. You have to specify one license for your program. To insert this tag, just insert a 'License' in your specfile.

no-longtitle-in-menu

The longtitle field isn't present in the menu entry.

non-executable-script

This text file contains a shebang or is located in a path dedicated for executables, but lacks the executable bits and cannot thus be executed. If the file is meant to be an executable script, add the executable bits, otherwise remove the shebang or move the file elsewhere.

non-file-in-menu-dir

/usr/lib/menu must not contain anything else than normal files.

non-ghost-file

File should be tagged %ghost.

non-lsb-compliant-package-name

Your package name contains an illegal character. Use only alphanumeric symbols in your package name.

non-lsb-compliant-release

Your version number contains an illegal character. Use only lowercase letters and/or numbers.

non-lsb-compliant-version

Your version number contains an illegal character. Use only lowercase letters and/or numbers.

non-owner-writeable-only-crontab-file

This crontab file is writeable by other users as its owner, which is insecure

non-readable

The file can't be read by everybody. If this is expected (for security reasons), the file should be added to the list of rpmlint exceptions.

non-readable-menu-file

The menu file isn't readable. Check the permissions.

non-root-group-log-file

If you need log files owned by a non-root group, just create a subdir in /var/log and put your log files in it.

non-root-user-log-file

If you need log files owned by a non-root user, just create a subdir in /var/log and put your log files in it.

non-standard-dir-perm

A standard directory should have permission set to 0755. If you get this message, it means that you have wrong directory permissions in some dirs included in your package.

non-standard-executable-perm

A standard executable should have permission set to 0755. If you get this message, it means that you have a wrong executable permissions in some files included in your package.

non-standard-group

The value of the Group tag in the package is not valid. Run rpmlint --explain non-standard-group to get list of valid groups

non-utf8-desktopfile

.desktop file is not encoded in UTF-8. Convert it for example using iconv(1).

non-versioned-file-in-library-package

The package contains files in non versioned directories. This makes it impossible to have multiple major versions of the libraries installed. One solution can be to change the directories which contain the files to subdirs of /usr/lib/<name>-<version> or /usr/share/<name>-<version>. Another solution can be to include a version number in the file names themselves.

non-xdg-migrated-menu

The menu file has not been migrated to new XDG menu system.

no-prereq-on

The package contains a %pre, %post, %preun or %postun script that references an external binary that is however not explicitely listed in the appropriate requires tag (Requires(pre):, Requires(post):, Requires: or Requires:, respectively). Fixing this is necessary so that (de)installation of the package happens in the correct order, e.g. the packages necessary for executing the %post script are already installed.

no-signature

Packages get signed during upload process, so just ignore this or add addFilter("E:.* no-signature") into your rpmlint config file.

no-status-entry

In your init script (/etc/rc.d/init.d/your_file), you don't have a 'status' entry, which is necessary for good functionality.

no-summary-tag

There is no Summary tag in your package. You have to describe your package using this tag. To insert it, just insert a tag 'Summary'.

no-title-in-menu

The title field isn't present in the menu entry.

not-listed-as-documentation

The documentation files of this package are not listed with the standard %doc tag.

no-release-tag

There is no Release tag in your package. You have to specify a release using the Release tag.

no-version-tag

There is no Version tag in your package. You have to specify a version using the Version tag.

old-menu-entry

Detected old-style menu file (installed to /usr/share/gnome/apps or /usr/share/applnk)

outside-libdir-files

This library package must not contain non library files to allow 64 and 32 bits versions of the package to coexist.

percent-in-conflicts, percent-in-dependency, percent-in-obsoletes, percent-in-provides

The tag contains a "%" in a context which might indicate it being fallout from an rpm macro/variable which was not expanded during build.

postin-without-chkconfig

The package contains an init script but doesn't call chkconfig in its %post script.

postin-without-install-info

This package contains info files and its %post doesn't call install-info.

postin-without-update-menus

A menu file exists in the package but its %post scriptlet doesn't call update-menus.

postin-with-wrong-depmod

This package contains a kernel module but its %post scriptlet calls depmod for the wrong kernel.

postun-without-update-menus

A menu file exists in the package but its %postun scriptlet doesn't call update-menus.

postun-with-wrong-depmod

This package contains a kernel module but its %postun scriptlet calls depmod for the wrong kernel.

prereq-use

The use of PreReq is deprecated. In the majority of cases, a plain Requires is enough and the right thing to do. Sometimes Requires(pre), Requires(post), Requires(preun) and/or Requires(postun) can also be used instead of PreReq.

preun-without-chkconfig

The package contains an init script but doesn't call chkconfig in its %preun script.

program-not-linked-against-libc

Every binary executable is expected be linked against libc.

rpath-in-buildconfig

This build configuration file contains rpaths which will be introduced into dependent packages.

score-file-must-not-be-conffile

A file in /var/lib/games/ is a configuration file. Store your conf files in /etc instead.

script-without-shebang

This executable text file does not contain a shebang (#!/bin/sh), thus it cannot be properly executed. Often this is a sign of spurious executable bits for a non-script file, but can also be a case of a missing shebang. To fix this error, find out which case of the above it is by looking at the top of the file, and either remove the executable bits or add the shebang.

Add sh shebang:
sed -i -e '1d;2i#!/bin/sh' foo.sh
Add Perl shebang:
sed -i -e '1d;2i#!/usr/bin/perl' foo.pl
Add Python shebang:
sed -i -e '1d;2i#!/usr/bin/python' foo.py

setgid-binary

The file is setgid. Usually this is a packaging bug. If this is a game, then you should use the proper rpm group, or location.

setuid-binary

The file is setuid; this may be dangerous, especially if this file is setuid root. Sometimes file capabilities can be used instead of setuid bits.

shared-lib-without-dependency-information

The file seems to be an ELF shared object, but it doesn't have DT_NEEDED entries.

sourced-script-with-shebang

This text file contains a shebang, but is meant to be sourced, not executed.

standard-dir-owned-by-package

This package owns a directory that is part of the standard hierarchy, which can lead to default directory permissions or ownerships being changed to something non-standard.

You should not make Systems standard directory's to belong to your package. In Mandriva, basic system directories are owned by the filesystem package.

statically-linked-binary

The package installs a statically linked binary or object file. Usually this is a packaging bug. If not, the package should be included in the exception file for rpmlint.

subdir-in-bin

The package contains a subdirectory in /usr/bin. It's not permitted to create a subdir there.

subfile-not-in-%lang

A gettext translation file (those ending in .mo) is not properly tagged by language. This information might be useful in the future to be able to leave out certain languages during installation. The %find_lang macro should be used to automatically tag such files.

subsys-not-used

While your daemon is running, you have to put a lock file in /var/lock/subsys/. To see an example, look at this directory on your machine and examine the corresponding init scripts.

summary-ended-with-dot

Summary ends with a dot. Remove it.

summary-has-leading-spaces

Summary begins with whitespace. Remove it.

summary-on-multiple-lines

Summary must fit on one line. Please make it shorter.

summary-too-long

Summary must not exceed 79 characters.

symlink-contains-up-and-down-segments

Symlink contains superfluous segments - e.g., foo/../bar/

symlink-crontab-file

This crontab file is a symbolic link, which is insecure and refused by newer version of cron

symlink-has-too-many-up-segments

The symlink references a directory beyond the root directory "/".

tag-not-utf8

The character encoding of the value of this tag is not UTF-8.

unexpanded-macro

This package contains a file whose path contains something that looks like an unexpanded macro. This is often the sign of a misspelling. Please check your specfile.

useless-provides

This package provides 2 times the same capacity. It should only provide it once.

use-of-launcher-in-menu-but-no-requires-on

The menu command uses a launcher but there is no dependency in the package that contains it.

use-of-RPM_SOURCE_DIR

You use $RPM_SOURCE_DIR or %{_sourcedir} in your spec file. If you have to use a directory for building, use %{buildroot} instead.

use-old-pam-stack

Update pam file to use include instead of pam_stack.

version-control-internal-file

You have included file(s) internally used by a version control system in the package. Remove them.

world-writable

A file or directory in the package is installed with world writable permissions, which is most likely a security issue.

wrong-script-end-of-line-encoding

This script has wrong end-of-line encoding, usually caused by creation or modification on a non-Unix system. It will prevent its execution.

wrong-script-interpreter

This script uses an incorrect interpreter in its shebang. The script interpreter should be a full path to a packaged interpreter, which means it should not point to /usr/local/bin for example.

zero-length

The package includes files of zero length. In many cases this is done by mistake and such files should be dropped.