[opensuse-packaging] Issues trying to create a -doc sub-package
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. Here's my snippet: install -d -m 644 "%{buildroot}%{_docdir}/%{name}-doc" install -m 644 -t "%{buildroot}%{_docdir}/%{name}-doc" %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} I've tried multiple variations of the above with no luck. (see below error). I've added ls calls to verify everything looks good and I don't see what the issue is: ls -l %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} install -d -m 644 "%{buildroot}%{_docdir}/%{name}-doc" ls -ld "%{buildroot}%{_docdir}/%{name}-doc" install -m 644 -t "%{buildroot}%{_docdir}/%{name}-doc" %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} The output from the above is: =============== [ 274s] + ls -l /home/abuild/rpmbuild/SOURCES/MAPI_definitions.pdf /home/abuild/rpmbuild/SOURCES/PFF_Forensics_-_analyzing_the_horrible_reference_file_format.pdf /home/abuild/rpmbuild/SOURCES/PFF_forensics_-_e-mail_and_appoinment_falsification_analysis.pdf '/home/abuild/rpmbuild/SOURCES/Personal_Folder_File_(PFF)_format.pdf' [ 274s] -rw-r--r-- 1 abuild abuild 862433 Apr 1 17:03 /home/abuild/rpmbuild/SOURCES/MAPI_definitions.pdf [ 274s] -rw-r--r-- 1 abuild abuild 220508 Apr 1 17:03 /home/abuild/rpmbuild/SOURCES/PFF_Forensics_-_analyzing_the_horrible_reference_file_format.pdf [ 274s] -rw-r--r-- 1 abuild abuild 159667 Apr 1 17:03 /home/abuild/rpmbuild/SOURCES/PFF_forensics_-_e-mail_and_appoinment_falsification_analysis.pdf [ 274s] -rw-r--r-- 1 abuild abuild 386190 Apr 1 17:03 /home/abuild/rpmbuild/SOURCES/Personal_Folder_File_(PFF)_format.pdf [ 274s] + install -d -m 644 /home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc [ 274s] + ls -ld /home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc [ 274s] drw-r--r-- 2 abuild abuild 4096 Apr 1 19:12 /home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc [ 274s] + install -m 644 -t /home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc /home/abuild/rpmbuild/SOURCES/MAPI_definitions.pdf /home/abuild/rpmbuild/SOURCES/PFF_Forensics_-_analyzing_the_horrible_reference_file_format.pdf /home/abuild/rpmbuild/SOURCES/PFF_forensics_-_e-mail_and_appoinment_falsification_analysis.pdf '/home/abuild/rpmbuild/SOURCES/Personal_Folder_File_(PFF)_format.pdf' [ 274s] install: cannot stat '/home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc/MAPI_definitions.pdf': Permission denied [ 274s] install: cannot stat '/home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc/PFF_Forensics_-_analyzing_the_horrible_reference_file_format.pdf': Permission denied [ 274s] install: cannot stat '/home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc/PFF_forensics_-_e-mail_and_appoinment_falsification_analysis.pdf': Permission denied [ 274s] install: cannot stat '/home/abuild/rpmbuild/BUILDROOT/libpff-0.0.0~20120802-9.1.x86_64/usr/share/doc/packages/libpff-doc/Personal_Folder_File_(PFF)_format.pdf': Permission denied [ 274s] error: Bad exit status from /var/tmp/rpm-tmp.sYmziu (%install) [ 274s] ================= Greg Freemyer Chief Technology Officer Intelligent Avatar Corporation (678) 653-4860 Greg.Freemyer@gmail.com http://www.linkedin.com/in/gregfreemyer CNN/TruTV Aired Forensic Imaging Demo - http://insession.blogs.cnn.com/2010/03/23/how-computer-evidence-gets-retriev... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
В Mon, 1 Apr 2013 15:20:55 -0400
Greg Freemyer
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. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Mon, Apr 1, 2013 at 10:42 PM, Andrey Borzenkov
В Mon, 1 Apr 2013 15:20:55 -0400 Greg Freemyer
пишет: 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 It would seem from looking at other spec files something like this should work: %install ... install -d -m 666 "%{buildroot}%{_docdir}/%{name}" 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
В Tue, 2 Apr 2013 12:29:41 -0400
Greg Freemyer
On Mon, Apr 1, 2013 at 10:42 PM, Andrey Borzenkov
wrote: В Mon, 1 Apr 2013 15:20:55 -0400 Greg Freemyer
пишет: 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
On Tue, Apr 2, 2013 at 12:55 PM, Andrey Borzenkov
В Tue, 2 Apr 2013 12:29:41 -0400 Greg Freemyer
пишет: On Mon, Apr 1, 2013 at 10:42 PM, Andrey Borzenkov
wrote: В Mon, 1 Apr 2013 15:20:55 -0400 Greg Freemyer
пишет: 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.
Thank you for both solutions. I really have been stuck on this. Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Greg, * Greg Freemyer (greg.freemyer@gmail.com) [20130401 21:22]:
I don't know why, but I've struggled getting a doc file created that actually contains the files in it I have listed.
There are two ways to do so. Either you simply mark the files _in the source dir_ as %doc, then rpm will install them in %_docdir/%name or you install the files and then give %doc the full path to the installed documents, in which case rpm will only note that these are documents and will not install them by itself. The latter is needed for instance if you want subpackages use a common docdir. hth Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Apr 2, 2013 at 11:54 AM, Philipp Thomas
Hi Greg,
* Greg Freemyer (greg.freemyer@gmail.com) [20130401 21:22]:
I don't know why, but I've struggled getting a doc file created that actually contains the files in it I have listed.
There are two ways to do so. Either you simply mark the files _in the source dir_ as %doc, then rpm will install them in %_docdir/%name or you install the files and then give %doc the full path to the installed documents, in which case rpm will only note that these are documents and will not install them by itself. The latter is needed for instance if you want subpackages use a common docdir.
Philipp, Thanks for making me keep trying. After hours of same I found something that works: %install ... install -d -m 777 "%{buildroot}%{_docdir}/%{name}-doc" install -m 644 "%{SOURCE1}" "%{buildroot}%{_docdir}/%{name}-doc" install -m 644 "%{SOURCE2}" "%{buildroot}%{_docdir}/%{name}-doc" %files doc %defattr(644,root,root,755) %{_docdir}/%{name}-doc I'm going to call that good. Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Dnia wtorek, 2 kwietnia 2013 12:53:20 Greg Freemyer pisze:
%files doc %defattr(644,root,root,755) %{_docdir}/%{name}-doc %doc %{_docdir}/%{name}-doc
I'm going to call that good.
almost -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Andrey Borzenkov
-
Greg Freemyer
-
Křištof Želechovski
-
Philipp Thomas