Opened 5 years ago

Last modified 15 months ago

#508 new defect/bug

Use of private libraries (shapelib, mdbtools)

Reported by: http://adamwill.id.fedoraproject.org/ Owned by: horwitz
Priority: minor Milestone: version 0.5.1
Component: core Version: svn
Severity: Keywords: feodora, packaging
Cc:

Description

I'm (still, I know it's taking a while :>) working on packaging Navit for Fedora. Review is here:

https://bugzilla.redhat.com/show_bug.cgi?id=485652

the reviewer has pointed out that Navit uses private copies of a couple of things without looking for system-wide copies. This is against Fedora packaging guidelines. Specifically, he identifies the use of a private copy of (part of) shapelib in navit/map/shapefile and mdbtools in navit/map/poi_geodownload . I have tried patching myself to use system-wide copies of these but haven't got it to fly yet. If Navit could be improved to use system-wide copies of these components when available - like it does for all the stuff under navit/support - that would be great.

Change History (5)

comment:1 Changed 5 years ago by http://adamwill.id.fedoraproject.org/

So, just an update: discussed this on IRC with cp15, on December 11th. He noted that poi_geodownload (which is what uses libmdb) can probably be removed now, as it's not much use any more. He thought shapelib was not commonly shipped in distributions, which is why navit was using a private copy, but I checked, and Debian/Ubuntu?, Fedora and Mandriva at least all provide it. He asked for an autoconf test for its presence; I tried to write one for a while and then had the better idea of just ripping one off from somewhere else - http://fpaste.org/gjtB/ comes from xastir, the only other package in Fedora that uses shapelib. It's GPL, so should be fine to re-use it in navit.

comment:2 Changed 5 years ago by kazer

  • Milestone set to version 0.2.0
  • Owner changed from KaZeR to kazer
  • Status changed from new to assigned

comment:3 Changed 5 years ago by quique

You may include in configure.in this code for checking shapefile presence:

AC_CHECK_HEADER(
        libshp/shapefil.h,
        AC_DEFINE(
                [HAVE_SYS_SHAPEFILELIB],
                [1],
                Define to 1 if you have the <libshp/shapefil.h> header file.
                )
                SHAPEFILE_LIBS="-lshp"
                system_shapefile=yes,
        AC_MSG_WARN([*** no libshp/shapefil.h -- using included copy])
)
AC_SUBST(SHAPEFILE_CFLAGS)
AC_SUBST(SHAPEFILE_LIBS)
AM_CONDITIONAL(HAVE_SYSTEM_SHAPEFILELIB, [test "x$system_shapefile" = "xyes" ])

And modify navit/map/Makefile.am

SUBDIRS=mg textfile binfile filter
#  garmin_img
if HAVELIBGARMIN
SUBDIRS+=garmin
endif
if !HAVE_SYSTEM_SHAPEFILELIB
SUBDIRS+=shapefile
endif

DIST_SUBDIRS=mg textfile binfile garmin shapefile filter

I have tested it with and without shapefile lib instaled in my fedora 12 computer.

comment:4 Changed 5 years ago by horwitz

  • Owner changed from kazer to horwitz
  • Priority changed from major to minor
  • Status changed from assigned to new

mdbtools has already been removed and I applied a change to use a system installed shapelib.

It's still needs a little cleanup (move the library parts to a subdir under support).

comment:5 Changed 15 months ago by http://wiki.navit-project.org/index.php/user:usul

  • Keywords feodora packaging added
  • Milestone changed from version 0.2.1 to version 0.5.1

I'm not familar with Feodora at all, but did some further investigations and found this ticket:
https://bugzilla.redhat.com/show_bug.cgi?id=654374 from 2011

It seems that on the one hand this issue was solved, but on the other hand, there is no navit Feodora package at all.

So what to do with this ticket?

Note: See TracTickets for help on using tickets.