|
|
|
Red Hat RPM Guide
by Eric Foster-Johnson
|
Book
|
|
Now available online as the Fedora RPM Guide
Available under the available under the Open Publication License, Version 1.0.
ISBN: 0-7645-4965-0, May 2003.
|
|
|
Errata For Printed Edition
|
|
| Page 35 |
In the third paragraph, just below the example, the warning comes
from the fact that the packages is signed, but the key is not found. If
the package hadn't been GPG signed at all it would have passed. |
| Page 50 |
The description of the %config behavior
was confusing and partially wrong. If you attach the %config attribute to a
file (quoted from the RPM mailing list):
| .rpmorig is used to save copy of preexsiting, but not in a package, file. |
| .rpmsave is used to save modified, previously installed, contents. |
| .rpmnew is used to save incoming if
%config(noreplace) was used, and previously installed contents are modified.
Note that if previous contents are not modified, then previous versions of the file
are simply replaced, not saved in in .rpmsave, incoming not saved in .rpmnew.
|
|
| Page 51 |
In the 2nd paragraph under
Installing over the Internet, FileTransfer Protocol should be three words:
File Transfer Protocol. Duh. Dumb typo.
|
| Page 55 |
The default repackage directory
isn't /var/spool, but /var/spool/repackage. Check your RPM settings to
be sure of the directory configured on your system.
|
| Page 56 |
In the 3rd paragraph in the note, /etc/rpmrc should be used
for local customizations rather than modifying /usr/lib/rpm/rpmrc.
See page 427 for a more in-depth look at the chain of these files.
|
| Page 57 |
The default set of initialization files is missing
/etc/rpmrc. It should be:
/usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc:/etc/rpmrc:~/.rpmrc
Note that it is actually listed without /etc/rpmrc in the
rpm man page, too.
|
| Page 61 |
In the
first paragraph under Querying everything, it should be
--all (with two hyphens).
|
| Page 74 |
In table 5-2,
there are some states that are missing. In
RPM 4.1 there is a 'net shared' state, and RPM 4.2 adds 'wrong color' to
the list.
|
| Page 77 |
In the changelog example, the last entry appears to have
bogus formatting instructions at the beginning of the comment line.
(The code 80 refers to a Wiley document style.)
|
| Page 91 |
In the Querying Package Files Remotely callout, all the
exampes should have -qp not -qf.
|
| Page 102 |
In the 2nd to last paragraph, the text on the version should be
clearer. The example shows a relationship of greater than or
equal (such as >= the 2.2 version of python). This should have
been called out more clearly.
|
| Page 124 |
In the caution, it suggests that you can use rpmbuild to
make a repackaged package into a full package, but there are not any
instructions on how to do so. (This is left as an exercise for the
reader. See Chapters 10, 11, and 12 for more on building packages.)
|
| Page 125 |
The program
rpmrebuild was given an extra "p" in a typo.
|
| Page 168 |
This section calls the first part of the spec file
the introduction section. I combined a number of
things into what I called the introduction, including the
preamble.
|
| Page 168 |
The preamble example has several problems:
- it shouldn't explicitly provide jikes
- the copyright tag is deprecated. It will automatically get turned
into a license tag when the package is built, so it shouldn't be used,
especially to hold copyright.
- %define version is bad practice. RPM will automatically define
the version macro from the Version: tag
(Comment: This is a real spec file from the jikes Java compiler.
I won't argue on the best practices, but I wanted to focus on examples
people might really see, not made-up examples, since one target audience
is Linux administrators. -Eric)
|
| Page 182 |
In really old versions of RPM, which no one should be using,
the deprectaed Serial directive was used in place of the version
and release, not in addition to it.
|
| Page 183 |
The text should be more blatant about Copyright being
deprecated. I wanted to show an example of both Copyright
and License.
|
| Page 184 |
In the third paragraph, it states that lines in the
%description section that start with whitespace will
be treated as preformatted. I should have been clearer: the
rpm command will treat it as such, but other programs
(Ximian/Red Carpet, for example), may not honor this.
|
| Page 186 |
The description of the Nosource should
be:
NoSource: 0
This example means that the first source item should
not be included in the package.
NoSource: 3
This example means that the third source item should
not be included in the package. The NoPatch
directive works similarly. In addition, do not place more
than one number on any given NoSource or NoPatch directive.
|
| Page 188 |
The %setup directive
can automatically extract tar, zip, gzip, bzip2, pack, compress,
and lzh compressed files. The tar-gzip format is most widely used,
though.
|
| Page 189 |
In the second paragraph, the %patch directive should be documented as
only to taking six options: -P, -R , -E, -b, -z, and -p.
|
| Page 197 |
In the note,
/usr/share/man would be a better example for
the directory, as that is the one that red Hat Linux and FHS use.
|
| Page 202 |
The example directories uses the standard RPM macro file,
/usr/lib/rpm/macros, instead of the Red Hat-specific file,
/usr/lib/rpm/redhat/macros, which holds:
%_prefix /usr
%_sysconfdir /etc
%_localstatedir /var
%_infodir /usr/share/info
%_mandir /usr/share/man<
%_initrddir %{_sysconfdir}/rc.d/init.d
%_defaultdocdir %{_usr}/share/doc
I should have used the Red Hat one.
|
| Page 205 |
The XML format
for spec files is not only expermimental, it is
very experimental. Assume there will be changes.
|
| Page 485 |
Parts of RPM are available under the LGPL in addition to
the GPL.
|
| Section 9.5.5 |
The %verify attributes are now different than what was described in the book.
The old list was: group, maj, md5, min, mode, mtime, owner, size, symlink.
The current list, in Fedora Core 6, is:
group, md5, mode, mtime, link, rdev, size, user, as shown following:
VFA_t verifyAttrs[] = {
{ "md5", 0, RPMVERIFY_MD5 },
{ "size", 0, RPMVERIFY_FILESIZE },
{ "link", 0, RPMVERIFY_LINKTO },
{ "user", 0, RPMVERIFY_USER },
{ "group", 0, RPMVERIFY_GROUP },
{ "mtime", 0, RPMVERIFY_MTIME },
{ "mode", 0, RPMVERIFY_MODE },
{ "rdev", 0, RPMVERIFY_RDEV },
{ NULL, 0, 0 }
};
|
|
|
|
Thanks
|
|
|
Thanks to
Aaron Bennett, Peter Bowen, Jeff Johnson, Christian Krause, Kelwin Wylie,
Richard Hitt, JP Vossen, and the wonderful people at Red Hat.
|
|
|
|
|