В Tue, 2 Apr 2013 12:29:41 -0400 Greg Freemyer <greg.freemyer@gmail.com> пишет:
On Mon, Apr 1, 2013 at 10:42 PM, Andrey Borzenkov <arvidjaar@gmail.com> wrote:
В Mon, 1 Apr 2013 15:20:55 -0400 Greg Freemyer <greg.freemyer@gmail.com> пишет:
All,
I don't know why, but I've struggled getting a doc file created that actually contains the files in it I have listed.
My project is home:gregfreemyer:Tools-for-forensic-boot-cd > libpff
Right now my specfile is dieing when I'm just trying to copy the doc files to the %_docdir folder tree.
You should just mark them as %doc in file list. They will be copied automatically when RPM is built.
Andrey,
The file I'm trying to add to the doc sub-package is a supplemental file upstream provides outside of the tarball.
I've got a Source1: line at the top of my specfile.
In theory I can reference in the body of the specfile as %{SOURCE1}.
If I try to just do:
%files doc %defattr(-,root,root,-) %doc "%{SOURCE1}"
I get:
[ 35s] Processing files: libvshadow-doc-0.0.0~20130304-0.i586 [ 35s] error: File not found: /home/abuild/rpmbuild/BUILDROOT/libvshadow-0.0.0~20130304-0.i386/home/abuild/rpmbuild/SOURCES/Paper_-_Windowless_Shadow_Snapshots.pdf [ 35s] Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/abuild/rpmbuild/BUILDROOT/libvshadow-0.0.0~20130304-0.i386
Source1: docfile.txt %prep cp %{SOURCE1} . %files %doc docfile.txt
It would seem from looking at other spec files something like this should work:
%install ... install -d -m 666 "%{buildroot}%{_docdir}/%{name}"
-m 775 You block path traversal.
install -m 644 "%{SOURCE1}" "%{buildroot}%{_docdir}/%{name}"
But that is failing with:
[ 34s] + install -d -m 666 /home/abuild/rpmbuild/BUILDROOT/libvshadow-0.0.0~20130304-0.i386/usr/share/doc/packages/libvshadow [ 34s] + install -m 644 /home/abuild/rpmbuild/SOURCES/Paper_-_Windowless_Shadow_Snapshots.pdf /home/abuild/rpmbuild/BUILDROOT/libvshadow-0.0.0~20130304-0.i386/usr/share/doc/packages/libvshadow [ 34s] install: cannot stat '/home/abuild/rpmbuild/BUILDROOT/libvshadow-0.0.0~20130304-0.i386/usr/share/doc/packages/libvshadow/Paper_-_Windowless_Shadow_Snapshots.pdf': Permission denied [ 34s] error: Bad exit status from /var/tmp/rpm-tmp.rv9AA8 (%install)
If I run the equivalent of those 2 install commands from my local command line, it works. Thus this is some interaction between how install works the chroot environment.
Greg
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org