On July 14, 2006 11:17:44 AM -0600 "Nathanael D. Noblet" <nathanael@xxxxxxx> wrote:
Hello, I have a spec file for a program that has worked fairly well. I wanted to modify it to include some extra example scripts in the /usr/share/doc/program_name-version directory. I added the mkdir and cp statements to the specfile after the install portion. They run, however when packaging the directory gets deleted. I see in the output that it runs Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.47825 In the /var/tmp/rpm-tmp.47825 I see the following. export DOCDIR rm -rf $DOCDIR /bin/mkdir -p $DOCDIR and then a copy statement that is supposed to put the files back, however it no longer has the files I copied into that location. How is this supposed to work? I have the maximum RPM book, however I'm in the process of moving so it is in a truck a few hundred kilometers away. Any help would be appreciated.
AFAIK this is undocumented. If any of your %doc directives use a relative pathname, the rm,mkdir,cp steps are done. If all of your %doc directives are full pathnames (start with '/') this doesn't happen and the files simply get marked as doc files. The cp happens from the $RPM_BUILD_DIR. Maybe you are copying sources (ie, Source: directives), which %doc can't find. You can either cp from %{SOURCE*} into the builddir during setup/build/install, and use %doc with unqualified paths, or install them yourself (as you've done) and list them in %files with full paths. If you install them somewhere into docdir (/usr/share/doc by default) you don't need to explicitly mark them %doc; but it won't hurt. -frank _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list