JDS RPM Rules
The following RPM rules apply for hacking on the JDS sources -
Scripts
-
pre/post-install/remove scripts should never touch files belonging
to another package.
-
Never add or delete files in pre/post-install scripts. Adding files
will result in files in the file system that do not belong to any
packages. Removing files will cause the package to fail
verification (rpm --verify) and result in warnings about missing
files when you uninstall the package.
-
If you change a file in a pre/post-install script, make sure you
use
%verify
directive to tell RPM not to verify the MD5 checksum, size and
modification of that file when running rpm --verify -
%verify (not md5 size mtime) file.conf
-
The script fragment for registering help docs with scrollkeeper
should be "scrollkeeper-update -q" and nothing else.
-
Do not use the "j" or "z" flags of tar to uncompress sources
as it's not portable on Solaris. Use
"bzip2 -dc %SOURCEn | tar xf -"
Dependencies
Files
-
Always use the most specific directory variable, e.g.
%_bindir instead of %_prefix/bin and
%_datadir instead of %_prefix/share.
-
Use the
%config
directive for config files.
-
Do not include libtool's .la files in the packages. Not even in the
devel package.
-
Do not include static libs unless absolutely necessary, in that case,
include it in the devel package.
-
Include lib*.so.* in the base package, lib*.so in the -devel package.
Patches
-
All patches should be p1 (i.e. the files names in the diff start with the
top level source dir and you use %patchn -p1 in the spec file.
-
The patch naming convention should be the following -
module_name-nn-descriptive_text.diff, where modules_name
is the base name of the spec file without the .spec, nn is the
number of the patch (Patchnn tag in the spec file) and
descriptive_text is a very short description of what the patch
does or why it is needed, e.g.:
gst-02-fix-registry-crashes.diff.
-
When you remove a patch, make sure that patches with higher numbers are renumbered
(update Patchnn tag in the spec file, rename file, cvs remove
old_file, cvs add new_file). There is a script in the scripts directory to
automatically reorder patches - use it carefully if you do so.