Bug 908065 - [RFE] Split gdal-java-devel from gdal-devel
Summary: [RFE] Split gdal-java-devel from gdal-devel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdal
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Devrim Gündüz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-05 18:54 UTC by Ben Boeckel
Modified: 2013-06-29 18:44 UTC (History)
9 users (show)

Fixed In Version: gdal-1.9.2-7.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-29 18:44:18 UTC


Attachments (Terms of Use)

Description Ben Boeckel 2013-02-05 18:54:16 UTC
Installing gdal-devel drags in quite a few Java packages because of the JNI library it provides. Would it be possible to split off the Java bits?

Comment 1 Volker Fröhlich 2013-02-05 23:32:24 UTC
I tried that when I introduced 1.9, as far as I remember. It seemed impossible.

Comment 2 Volker Fröhlich 2013-02-17 23:07:52 UTC
I'd be very happy to receive help though!

Comment 3 Christian Stadelmann 2013-06-06 09:17:42 UTC
This really should be fixed. Installing 174 unrelated packages (maven, plexus, tomcat, jetty, …) for just one -devel package containing a single script plus some header files is massive overkill.

The gdal-devel package currently contains:
A) 2 shell scripts providing information about the gdal version installed plus a man page
/usr/bin/gdal-config
/usr/bin/gdal-config-64
/usr/share/man/man1/gdal-config.1.gz

B) some header files (they belong here since this is a devel package)

C) some library symlinks:
/usr/lib64/libgdal.so
/usr/lib64/libgdalconstjni.so
/usr/lib64/libgdaljni.so
/usr/lib64/libogrjni.so
/usr/lib64/libosrjni.so
Since they are symlinks I don't think they belong here but in the package where the actual library is provided:
/usr/lib64/libgdal.so -> gdal-libs
/usr/lib64/libgdalconstjni.so -> gdal-java
/usr/lib64/libgdaljni.so -> gdal-java
/usr/lib64/libogrjni.so -> gdal-java
/usr/lib64/libosrjni.so -> gdal-java

D) A PKGconfig file
/usr/lib64/pkgconfig/gdal.pc
I don't know for sure what it does but at least it does not rely on any gdal-java files.

Since the shell scripts (gdal-config and gdal-config-64) and the header files don't rely on any binary files provided by any gdal package, the gdal-java dependency can be removed without side effect.

I suggest moving the libgdalconstjni.so, libgdaljni.so, libogrjnis.so, libosrjni.so symlinks into gdal-java removing the dependency of gdal-devel on gdal-java. I think we should just ship the package the way debian ships it: http://packages.debian.org/sid/amd64/libgdal-dev/filelist

I'm not into SPEC files but I think the bug is in http://pkgs.fedoraproject.org/cgit/gdal.git/tree/gdal.spec line 773: the .so files without suffix are ignored. How about adding a line
%{_libdir}/*jni.so
to the existing line
%{_libdir}/*jni.so.*

Can anyone with some knowledge on packaging please check that?

Comment 4 Ben Boeckel 2013-06-06 14:17:59 UTC
(In reply to Christian Stadelmann from comment #3)
> This really should be fixed. Installing 174 unrelated packages (maven,
> plexus, tomcat, jetty, …) for just one -devel package containing a single
> script plus some header files is massive overkill.
> 
> The gdal-devel package currently contains:
> A) 2 shell scripts providing information about the gdal version installed
> plus a man page
> /usr/bin/gdal-config
> /usr/bin/gdal-config-64
> /usr/share/man/man1/gdal-config.1.gz
> 
> B) some header files (they belong here since this is a devel package)

Any jni-related headers belong in -java-devel.

> C) some library symlinks:
> /usr/lib64/libgdal.so
> /usr/lib64/libgdalconstjni.so
> /usr/lib64/libgdaljni.so
> /usr/lib64/libogrjni.so
> /usr/lib64/libosrjni.so
> Since they are symlinks I don't think they belong here but in the package
> where the actual library is provided:

No, these belong in -devel; they're the files the linker looks for when doing -lgdal. Programs which have already linked do not need them.

> /usr/lib64/libgdal.so -> gdal-libs

gdal-devel

> /usr/lib64/libgdalconstjni.so -> gdal-java
> /usr/lib64/libgdaljni.so -> gdal-java
> /usr/lib64/libogrjni.so -> gdal-java
> /usr/lib64/libosrjni.so -> gdal-java

gdal-java-devel

> D) A PKGconfig file
> /usr/lib64/pkgconfig/gdal.pc
> I don't know for sure what it does but at least it does not rely on any
> gdal-java files.

gdal-devel (used during configure steps in dependent projects; not needed at runtime).

> I'm not into SPEC files but I think the bug is in
> http://pkgs.fedoraproject.org/cgit/gdal.git/tree/gdal.spec line 773: the .so
> files without suffix are ignored. How about adding a line
> %{_libdir}/*jni.so
> to the existing line
> %{_libdir}/*jni.so.*

No (explained above).

> Can anyone with some knowledge on packaging please check that?

Other than that, without looking at the spec, the steps here (as commented) should suffice.

Comment 5 Christian Stadelmann 2013-06-07 11:24:36 UTC
There are no java-related header files for gdal since they are generated at compile time from javac and not intended to be used by anyone except the *jni.so and gdal.jar libraries.

The only files which could be possibly shipped with gdal-java-devel are the 4 *jni.so files which are in fact symlinks. It doesn't make sense to compile C/C++ code against java bindings for a C/C++ library so it doesn't make sense to ship this symlink at all.

How about removing the *jni.so files from gdal-devel and not shipping them in a new gdal-java-devel package.

Comment 6 Christian Stadelmann 2013-06-07 14:05:45 UTC
So I suggest to change the gdal.spec:759 [1] from
%{_libdir}/*.so
to
%{_libdir}/libgdal.so

[1] http://pkgs.fedoraproject.org/cgit/gdal.git/tree/gdal.spec#n759

Comment 7 Fedora Update System 2013-06-12 22:38:27 UTC
gdal-1.9.2-7.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/gdal-1.9.2-7.fc19

Comment 8 Fedora Update System 2013-06-13 18:07:34 UTC
Package gdal-1.9.2-7.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gdal-1.9.2-7.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10774/gdal-1.9.2-7.fc19
then log in and leave karma (feedback).

Comment 9 Ben Boeckel 2013-06-14 02:12:13 UTC
Looks much better here. Thanks!

Comment 10 Fedora Update System 2013-06-29 18:44:18 UTC
gdal-1.9.2-7.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.