I finished my "nano" RPM package successfully and without errors. I researched a lot on the Internet and Fedora Project website. Also, Special thanks to Chris Tyler and my friends in IRC for their advice that help me a lot to solve the errors. If you remember from my last blog, I ended up with these errors when I was running rpmlint command:
nano.x86_64: E: info-dir-file /usr/share/info/dir
nano.x86_64: E: info-files-without-install-info-postin /usr/share/info/dir
nano.x86_64: E: info-files-without-install-info-postun /usr/share/info/dir
nano.x86_64: E: info-files-without-install-info-postin /usr/share/info/nano.info.gz
nano.x86_64: E: info-files-without-install-info-postun /usr/share/info/nano.info.gz
As you see here, these errors are related to info files. According to http://fedoraproject.org/wiki/Packaging/ScriptletSnippets under Texinfo section, "the GNU project and many other programs use the texinfo file format for much of its documentation. These info files are usually located in /usr/share/info/. When installing or removing a package, install-info from the info package takes care of adding the newly installed files to the main info index and removing them again on deinstallation."
Also, it suggests a nice solution like this (I just added the below lines in my Specfile):
Requires(post): info Requires(preun): info ... %post /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : %preun if [ $1 = 0 ] ; then /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : fi
These two scriptlets tell install-info to add entries for the info pages to the main index file on installation and remove them at erase time. The "|| :" in this case prevents failures that would typically affect systems that have been configured not to install any %doc files, or have read-only mounted, %_netsharedpath /usr/share.
I added these two scriptlets in my specfile and 4 errors were solved. The only error that left was " nano.x86_64: E: info-dir-file /usr/share/info/dir". If you use rpmlint command with -i option, it gives you a description of error. According to that description, I included "dir" file to my package which means I included the info file for all packages to my package. In order to solve the problem, I added this line under %install section in specfile(last command):
rm %{buildroot}/%{_datadir}/info/dir
It removes dir file after installation. And the problem solved. Finally, I could solve the problem and get an output (RPM package) without any errors and warning.
Regards to all.
Thanks ..
ReplyDelete