[opensuse-packaging] Need help, losing docs between %install and %files
Hi, I got this right before but when I changed something in the spec file I lose the files copied from "BUILD/bacula-docs-3.0.3/manuals/en/*" to "$RPM_BUILD_ROOT/%{_defaultdocdir}/bacula/manuals/" after the %install stage. If I cause rpmbuild to stop on an error at the end of the install stage the files are still there but when it gets to the %files stage the files are missing. The spec file is at :- http://pastebin.com/m153fa695 and the files are for the "%files doc" section copied over (I've tried install as well) at line 241, the mkdir command at line 245 is just there to create an error at the end of install, if I remove it the files and directories copied over for the doc package aren't there in the "%files doc" stage. The previous spec file where everything worked (for the doc package anyway) is at :- https://build.opensuse.org/package/view_file?file=project.diff&package=bacula&project=home%3Aplater%3Abranches%3AopenSUSE%3AFactory%3AContrib Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 12/09/2009 10:18 AM, Dave Plater wrote:
Hi, I got this right before but when I changed something in the spec file I lose the files copied from "BUILD/bacula-docs-3.0.3/manuals/en/*" to "$RPM_BUILD_ROOT/%{_defaultdocdir}/bacula/manuals/" after the %install stage. If I cause rpmbuild to stop on an error at the end of the install stage the files are still there but when it gets to the %files stage the files are missing. The spec file is at :- http://pastebin.com/m153fa695 and the files are for the "%files doc" section copied over (I've tried install as well) at line 241, the mkdir command at line 245 is just there to create an error at the end of install, if I remove it the files and directories copied over for the doc package aren't there in the "%files doc" stage. The previous spec file where everything worked (for the doc package anyway) is at :- https://build.opensuse.org/package/view_file?file=project.diff&package=bacula&project=home%3Aplater%3Abranches%3AopenSUSE%3AFactory%3AContrib Thanks Dave P
I've solved my nightmare, the %files section contained :- "%doc ABOUT-NLS COPYING INSTALL LICENSE README VERIFYING ReleaseNotes projects" and that causes rpmbuild to rm-rf %{_defaultdocdir}/bacula before copying the files over. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Dave Plater (dplater@webafrica.org.za) [20091209 10:47]:
and that causes rpmbuild to rm-rf %{_defaultdocdir}/bacula before copying the files over.
Yes. You have to copy all additional files yourself in the install stage and then specify them with path name like %doc %{_defaultdocdir}/%{name} If you only specify files rpmbuild will first remove the directory and then copy the specified files from the source directory to the documentation directory. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 12/09/2009 05:54 PM, Philipp Thomas wrote:
* Dave Plater (dplater@webafrica.org.za) [20091209 10:47]:
and that causes rpmbuild to rm-rf %{_defaultdocdir}/bacula before copying the files over.
Yes. You have to copy all additional files yourself in the install stage and then specify them with path name like
%doc %{_defaultdocdir}/%{name}
If you only specify files rpmbuild will first remove the directory and then copy the specified files from the source directory to the documentation directory.
Philipp
What determines the source directory? Do you have a link to somewhere where this is explained in some detail, I find maximum rpm lacking in certain explanations. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello, On Thu, 10 Dec 2009, Dave Plater wrote:
What determines the source directory?
It's the dir of the unpacked tarball under %{_topdir}/BUILD. It's available as ${RPM_BUILD_DIR} (+ the directory dir, just as specified with the %setup macro, or %{name}-%{version} if none).
Do you have a link to somewhere where this is explained in some detail, I find maximum rpm lacking in certain explanations.
It should be in there. -dnh -- Society doesn't need newspapers. What we need is journalism. -- Clay Shirky -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Dave Plater
-
David Haller
-
Philipp Thomas