[opensuse-packaging] sub-package naming?
All, I'm trying to get the sub-packages for ssdeep right: https://build.opensuse.org/package/show?package=ssdeep&project=home%3Agregfreemyer%3ATools-for-forensic-boot-cd It has a executable of ssdeep, but the shared lib is libfuzzy.so. I currently have a main package of ssdeep and sub-packages of libfuzzy2 and libfuzzy2-devel. That allows the package to build, but I have no idea if I'm handling the sub-package names correctly. It seems wrong to me and I don't know why the 2 is needed. Is that because the library is libfuzzy v2.7? This is my %files section of the specfile: === %files %defattr(-,root,root) %doc README COPYING %{_bindir}/* %{_mandir}/man1/* %files -n libfuzzy2 %defattr(-,root,root) %doc README COPYING %{_libdir}/libfuzzy.so.* %files -n libfuzzy2-devel %defattr(-,root,root) %{_includedir}/fuzzy.h %{_libdir}/libfuzzy.so %exclude %{_libdir}/libfuzzy.a %exclude %{_libdir}/libfuzzy.la === Thanks Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Fri, 3 Aug 2012 19:58:57 -0400 Greg Freemyer <greg.freemyer@gmail.com> wrote:
All,
I'm trying to get the sub-packages for ssdeep right:
It has a executable of ssdeep, but the shared lib is libfuzzy.so. I currently have a main package of ssdeep and sub-packages of libfuzzy2 and libfuzzy2-devel.
That allows the package to build, but I have no idea if I'm handling the sub-package names correctly. It seems wrong to me and I don't know why the 2 is needed. Is that because the library is libfuzzy v2.7?
This is my %files section of the specfile:
=== %files %defattr(-,root,root) %doc README COPYING %{_bindir}/* %{_mandir}/man1/*
%files -n libfuzzy2 %defattr(-,root,root) %doc README COPYING %{_libdir}/libfuzzy.so.*
%files -n libfuzzy2-devel %defattr(-,root,root) %{_includedir}/fuzzy.h %{_libdir}/libfuzzy.so %exclude %{_libdir}/libfuzzy.a %exclude %{_libdir}/libfuzzy.la ===
Thanks Greg Hi That should be it's soname, you can check on your local build via;
readelf -a /path/to/lib.so | grep -i soname There should be an option to disable-static and you can get rid of the la files via; # Clean up find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print -- Cheers Malcolm °¿° (Linux Counter #276890) SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.34-0.7-default up 5 days 21:25, 2 users, load average: 2.06, 2.05, 2.07 CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Fri, 3 Aug 2012 19:58:57 -0400, Greg Freemyer <greg.freemyer@gmail.com> wrote:
That allows the package to build, but I have no idea if I'm handling the sub-package names correctly. It seems wrong to me and I don't know why the 2 is needed. Is that because the library is libfuzzy v2.7?
The shared library policy, which was created to allow multiple versions of a shared library to be installed in parallel, requires the package to be named <libname><so_major>, i.e. the name of the library with the major version appended. Basically it's the soname (objdump -p will show it) of the library.
%files -n libfuzzy2-devel %defattr(-,root,root) %{_includedir}/fuzzy.h %{_libdir}/libfuzzy.so %exclude %{_libdir}/libfuzzy.a %exclude %{_libdir}/libfuzzy.la
No need to have a versioned devel package when the header is in an unversioned directory. So you can just as well name the package libfuzzy-devel. BTW, if the package uses libtool (as the .la implies) you can either simply pass --disable-static to configure or change the AC_PROG_LIBTOOL in configure.in to LT_INIT([disable-static]) and run autoreconf afterwards. And I'd simply remove the .la file in the install section. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Thanks Malcolm / Phillip, The new sub-package stuff is building in the devel project now. I'll send it to factory tomorrow (I hope). Greg On Sat, Aug 4, 2012 at 12:46 PM, Philipp Thomas <Philipp.Thomas2@gmx.net> wrote:
On Fri, 3 Aug 2012 19:58:57 -0400, Greg Freemyer <greg.freemyer@gmail.com> wrote:
That allows the package to build, but I have no idea if I'm handling the sub-package names correctly. It seems wrong to me and I don't know why the 2 is needed. Is that because the library is libfuzzy v2.7?
The shared library policy, which was created to allow multiple versions of a shared library to be installed in parallel, requires the package to be named <libname><so_major>, i.e. the name of the library with the major version appended. Basically it's the soname (objdump -p will show it) of the library.
%files -n libfuzzy2-devel %defattr(-,root,root) %{_includedir}/fuzzy.h %{_libdir}/libfuzzy.so %exclude %{_libdir}/libfuzzy.a %exclude %{_libdir}/libfuzzy.la
No need to have a versioned devel package when the header is in an unversioned directory. So you can just as well name the package libfuzzy-devel.
BTW, if the package uses libtool (as the .la implies) you can either simply pass --disable-static to configure or change the AC_PROG_LIBTOOL in configure.in to LT_INIT([disable-static]) and run autoreconf afterwards.
And I'd simply remove the .la file in the install section.
Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
-- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist 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... The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Greg Freemyer
-
Malcolm
-
Philipp Thomas