Hello, So I recently posted my first package and the review. While I waited I started cleaning up more issues I found after I realized you could run rpmlint on the actual rpm and not just the spec file. I'd like the review to go as quickly as possible so I'm just trying to get all those warnings cleaned up.
My package has a number of sub packages for various backend drivers. These subpackages basically contain a .so file for the most part however I'm getting rpmlint messages as follows
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
how is libdspam.so determined to be a devel file?
libdspam.so.7.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
Is what I get back from file. What is it that I'm missing?
Thanks,
On Sunday, 15 November 2009 at 21:59, Nathanael Noblet wrote:
Hello, So I recently posted my first package and the review. While I waited I started cleaning up more issues I found after I realized you could run rpmlint on the actual rpm and not just the spec file. I'd like the review to go as quickly as possible so I'm just trying to get all those warnings cleaned up.
My package has a number of sub packages for various backend drivers. These subpackages basically contain a .so file for the most part however I'm getting rpmlint messages as follows
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
how is libdspam.so determined to be a devel file?
Shared objects (libraries) residing in %{_libdir} usually have names like libfoo.so.X.Y.Z where X.Y.Z is their ABI version number. -devel subpackages contain libfoo.so which is usually a link to libfoo.X.Y.Z and is used for linking against libfoo (-lfoo in linker command line).
libdspam.so.7.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
Is what I get back from file. What is it that I'm missing?
Judging by the above, your libdspam.so should in fact be named libdspam.so.7.0.0.
Regards, R.
On Sun, 15 Nov 2009 22:30:44 +0100, Dominik wrote:
On Sunday, 15 November 2009 at 21:59, Nathanael Noblet wrote:
Hello, So I recently posted my first package and the review. While I waited I started cleaning up more issues I found after I realized you could run rpmlint on the actual rpm and not just the spec file. I'd like the review to go as quickly as possible so I'm just trying to get all those warnings cleaned up.
My package has a number of sub packages for various backend drivers. These subpackages basically contain a .so file for the most part however I'm getting rpmlint messages as follows
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
how is libdspam.so determined to be a devel file?
Shared objects (libraries) residing in %{_libdir} usually have names like libfoo.so.X.Y.Z where X.Y.Z is their ABI version number. -devel subpackages contain libfoo.so which is usually a link to libfoo.X.Y.Z and is used for linking against libfoo (-lfoo in linker command line).
libdspam.so.7.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
Is what I get back from file. What is it that I'm missing?
Judging by the above, your libdspam.so should in fact be named libdspam.so.7.0.0.
It is. "file" prints the file name, not the SONAME.
Often, projects, which dlopen plugin/module shared libraries at run-time, store the versioned libraries as well as the .so symlinks. Then they dlopen the libraries via the .so symlinks.
Find out how and with what file names those backend libraries are loaded. If the .so symlinks are not needed, don't package them. And if the backend libraries have SONAMEs defined, check for [potential] conflicts with system libraries.
On 11/15/2009 03:05 PM, Michael Schwendt wrote:
On Sun, 15 Nov 2009 22:30:44 +0100, Dominik wrote:
On Sunday, 15 November 2009 at 21:59, Nathanael Noblet wrote:
Hello, So I recently posted my first package and the review. While I waited I started cleaning up more issues I found after I realized you could run rpmlint on the actual rpm and not just the spec file. I'd like the review to go as quickly as possible so I'm just trying to get all those warnings cleaned up.
My package has a number of sub packages for various backend drivers. These subpackages basically contain a .so file for the most part however I'm getting rpmlint messages as follows
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
how is libdspam.so determined to be a devel file?
Shared objects (libraries) residing in %{_libdir} usually have names like libfoo.so.X.Y.Z where X.Y.Z is their ABI version number. -devel subpackages contain libfoo.so which is usually a link to libfoo.X.Y.Z and is used for linking against libfoo (-lfoo in linker command line).
libdspam.so.7.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
Is what I get back from file. What is it that I'm missing?
Judging by the above, your libdspam.so should in fact be named libdspam.so.7.0.0.
It is. "file" prints the file name, not the SONAME.
Often, projects, which dlopen plugin/module shared libraries at run-time, store the versioned libraries as well as the .so symlinks. Then they dlopen the libraries via the .so symlinks.
Find out how and with what file names those backend libraries are loaded. If the .so symlinks are not needed, don't package them. And if the backend libraries have SONAMEs defined, check for [potential] conflicts with system libraries.
So I've grepped through the source a bit and the library loads a storage driver from the config file. So in the case of mysql the dspam.conf file has
StorageDriver /usr/lib64/dspam/libhash_drv.so
and passes that full path to dlopen. The sub driver package has the following files. /usr/lib64/dspam/libmysql_drv.so /usr/lib64/dspam/libmysql_drv.so.7 /usr/lib64/dspam/libmysql_drv.so.7.0.0
It will open the .so which is a symlink to the real file of so.7.0.0. I don't think it would be feasible to have the config file load the so.7.0.0 because any update to to the SONAME would cause a config change when it may not be necessary.
So in this case do I package them all? So does that mean the .so is okay to be in the non devel package?
On 11/15/2009 02:30 PM, Dominik 'Rathann' Mierzejewski wrote:
On Sunday, 15 November 2009 at 21:59, Nathanael Noblet wrote:
Hello, So I recently posted my first package and the review. While I waited I started cleaning up more issues I found after I realized you could run rpmlint on the actual rpm and not just the spec file. I'd like the review to go as quickly as possible so I'm just trying to get all those warnings cleaned up.
My package has a number of sub packages for various backend drivers. These subpackages basically contain a .so file for the most part however I'm getting rpmlint messages as follows
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
how is libdspam.so determined to be a devel file?
Shared objects (libraries) residing in %{_libdir} usually have names like libfoo.so.X.Y.Z where X.Y.Z is their ABI version number. -devel subpackages contain libfoo.so which is usually a link to libfoo.X.Y.Z and is used for linking against libfoo (-lfoo in linker command line).
libdspam.so.7.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
Is what I get back from file. What is it that I'm missing?
Judging by the above, your libdspam.so should in fact be named libdspam.so.7.0.0.
[gnat@iridium ~]$ ls -l /usr/lib64/libdspam.* -rw-r--r--. 1 root root 175812 2009-11-15 13:54 /usr/lib64/libdspam.a -rwxr-xr-x. 1 root root 954 2009-11-15 13:54 /usr/lib64/libdspam.la lrwxrwxrwx. 1 root root 17 2009-11-15 13:59 /usr/lib64/libdspam.so -> libdspam.so.7.0.0 lrwxrwxrwx. 1 root root 17 2009-11-15 13:59 /usr/lib64/libdspam.so.7 -> libdspam.so.7.0.0 -rwxr-xr-x. 1 root root 111000 2009-11-15 13:54 /usr/lib64/libdspam.so.7.0.0
[gnat@iridium ~]$ ldd /usr/bin/dspam_2sql linux-vdso.so.1 => (0x00007fffccfda000) ==> libdspam.so.7 => /usr/lib64/libdspam.so.7 (0x00007f7f4d89e000) libm.so.6 => /lib64/libm.so.6 (0x000000335a400000) libdl.so.2 => /lib64/libdl.so.2 (0x000000335a800000) libldap-2.4.so.2 => /usr/lib64/libldap-2.4.so.2 (0x00007f7f4d659000) liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x0000003362000000) libpthread.so.0 => /lib64/libpthread.so.0 (0x000000335ac00000) libc.so.6 => /lib64/libc.so.6 (0x000000335a000000) /lib64/ld-linux-x86-64.so.2 (0x0000003359c00000) libresolv.so.2 => /lib64/libresolv.so.2 (0x000000335d000000) libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f7f4d43d000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x0000003368000000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x0000003366000000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f7f4d205000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x0000003367000000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x0000003366c00000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003365c00000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x0000003367400000) libz.so.1 => /lib64/libz.so.1 (0x000000335b000000) libfreebl3.so => /usr/lib64/libfreebl3.so (0x00007f7f4cfa4000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x0000003366800000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003367800000) libselinux.so.1 => /lib64/libselinux.so.1 (0x000000335bc00000)
It seems to me then that libdspam.so.7.0.0 is the actual file, and I have libdspam.so and libdspam.so.7 as symlinks. Based off the ldd of some of the binaries I can see that it is linked to x.so.VER for most libraries...
So does that mean that my libdspam.so.7.0.0 and libdspam.so.7 are in the one package and then libdspam.a/la/so are part of -devel ?
Would that be the correct assumption?
Thanks for the tips so far. -- Nathanael D. Noblet
On Mon, 16 Nov 2009 13:24:03 -0700, Nathanael wrote:
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
[gnat@iridium ~]$ ls -l /usr/lib64/libdspam.* -rw-r--r--. 1 root root 175812 2009-11-15 13:54 /usr/lib64/libdspam.a -rwxr-xr-x. 1 root root 954 2009-11-15 13:54 /usr/lib64/libdspam.la lrwxrwxrwx. 1 root root 17 2009-11-15 13:59 /usr/lib64/libdspam.so -> libdspam.so.7.0.0 lrwxrwxrwx. 1 root root 17 2009-11-15 13:59 /usr/lib64/libdspam.so.7 -> libdspam.so.7.0.0 -rwxr-xr-x. 1 root root 111000 2009-11-15 13:54 /usr/lib64/libdspam.so.7.0.0
[gnat@iridium ~]$ ldd /usr/bin/dspam_2sql linux-vdso.so.1 => (0x00007fffccfda000) ==> libdspam.so.7 => /usr/lib64/libdspam.so.7 (0x00007f7f4d89e000)
That means you only need the .so.7 and the .so.7.0.0 libs in %{_libdir}.
For the .a lib, follow the Fedora Packaging Guidelines on Static Libraries. Same for the .la libtool archive. Delete it.
The symlink libdspam.so is not needed at run-time. It's only needed to make the -ldspam linking step work when building software with this lib.
On Sun, Nov 15, 2009 at 01:59:57PM -0700, Nathanael Noblet wrote:
Hello, So I recently posted my first package and the review. While I waited I started cleaning up more issues I found after I realized you could run rpmlint on the actual rpm and not just the spec file. I'd like the review to go as quickly as possible so I'm just trying to get all those warnings cleaned up.
My package has a number of sub packages for various backend drivers. These subpackages basically contain a .so file for the most part however I'm getting rpmlint messages as follows
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
You should also see if you can build the app such that it installs its private plugins in a subdir of %{_libdir} rather than clutter up %{_libdir} with libraries that nothing else can use.
Thanks, Matt
On 11/15/2009 06:52 PM, Matt Domsch wrote:
On Sun, Nov 15, 2009 at 01:59:57PM -0700, Nathanael Noblet wrote:
Hello, So I recently posted my first package and the review. While I waited I started cleaning up more issues I found after I realized you could run rpmlint on the actual rpm and not just the spec file. I'd like the review to go as quickly as possible so I'm just trying to get all those warnings cleaned up.
My package has a number of sub packages for various backend drivers. These subpackages basically contain a .so file for the most part however I'm getting rpmlint messages as follows
libdspam.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libdspam.so
You should also see if you can build the app such that it installs its private plugins in a subdir of %{_libdir} rather than clutter up %{_libdir} with libraries that nothing else can use.
Yeah, there is a lib, and then dlopened backend drivers. So we have.
%{_libdir}/libdspam.so.7 (libdspam package) %{_libdir}/dspam/libdspam-mysql_drv.so (libdspam-mysql)
For each backend driver.