On Wed, Oct 11, 2006 at 06:55:02PM +0200, Sam Hocevar (Debian packages) wrote: > Plugins in /usr/share/netdude/plugins and .../protocols should be moved > to /usr/lib.
The attached diff should _almost_ fix the problem. AFAICS, it should fix the issues themselves; however, after fiddling with configure.ac and Makefile.am we would need to re-run autotools, and at that point, my knowledge stops. The original configure and friends seem to be generated with automake 1.5, which is not in Debian; testing 1.6 or 1.7 provided a syntax error. 1.8 has the same problem as 1.9, which is that the mkinstalldirs definition in po/Makefile.am is wrong; I believe the included debian/patches/fix_automake1.9_issues.dpatch will take care of that. However, there are still problems; The string "${exec_prefix}" ends up literally in CONFIG.H paths (with braces and all) in some places, like PACKAGE_DATA_DIR, rendering netdude unable to load its splash screen, protocols or plugins. I'm sure this is quite simple to fix for someone well versed in automake and friends, so I'll leave it at that. (That being said, I'm not really sure what the point of this bug is; while being a FHS violation, I cannot find the big issues that would be caused by this.) /* Steinar */ -- Homepage: http://www.sesse.net/
diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/changelog /tmp/ARJbfLaJmy/netdude-0.3.3/debian/changelog --- /tmp/2airmYyfwE/netdude-0.3.3/debian/changelog 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/changelog 2006-11-01 01:47:45.000000000 +0100 @@ -1,3 +1,22 @@ +netdude (0.3.3-2.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Install plugins and protocols to /usr/lib instead of /usr/share. + (Closes: #392399) + * fix_libdir.dpatch: Install to pkglibdir instead of pkgdatadir, update + configure.ac to provide PKG_LIB_DIR, change C code to use PKG_LIB_DIR + instead of PKG_DATA_DIR for default plugins and protocols path. + * fix_automake1.9_issues.dpatch: Fix the definition of mkinstalldirs + not to use @[EMAIL PROTECTED] (Needed for the next patch, as we no longer have + automake 1.5 in Debian.) + * re-autotoolize.dpatch: Run autoreconf and libtoolize -f after applying + fix_libdir.dpatch, since we mess with both configure.ac and various + Makefile.am files. + * In debian/*.{files,dirs}, replace /usr/share/netdude/{plugins,protocols} + by the appropriate path in /usr/lib. + + -- Steinar H. Gunderson <[EMAIL PROTECTED]> Wed, 1 Nov 2006 00:24:28 +0100 + netdude (0.3.3-2.1) unstable; urgency=low * Non-maintainer upload. (with maintainer's blessing) diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/libnetdude.dirs /tmp/ARJbfLaJmy/netdude-0.3.3/debian/libnetdude.dirs --- /tmp/2airmYyfwE/netdude-0.3.3/debian/libnetdude.dirs 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/libnetdude.dirs 2006-11-01 01:47:45.000000000 +0100 @@ -1,2 +1,2 @@ -usr/share/netdude/plugins -usr/share/netdude/protocols +usr/lib/netdude/plugins +usr/lib/netdude/protocols diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/libnetdude.files /tmp/ARJbfLaJmy/netdude-0.3.3/debian/libnetdude.files --- /tmp/2airmYyfwE/netdude-0.3.3/debian/libnetdude.files 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/libnetdude.files 2006-11-01 01:47:45.000000000 +0100 @@ -1,3 +1,3 @@ -usr/share/netdude/plugins/nd_cksumfix.so -usr/share/netdude/plugins/nd_dummyplugin.so -usr/share/netdude/protocols/*.so +usr/lib/netdude/plugins/nd_cksumfix.so +usr/lib/netdude/plugins/nd_dummyplugin.so +usr/lib/netdude/protocols/*.so diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude-dev.dirs /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude-dev.dirs --- /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude-dev.dirs 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude-dev.dirs 2006-11-01 01:47:45.000000000 +0100 @@ -1,3 +1,3 @@ usr/include/netdude -usr/share/netdude/plugins -usr/share/netdude/protocols +usr/lib/netdude/plugins +usr/lib/netdude/protocols diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude-dev.files /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude-dev.files --- /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude-dev.files 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude-dev.files 2006-11-01 01:47:45.000000000 +0100 @@ -1,3 +1,3 @@ usr/include/netdude/* -usr/share/netdude/plugins/*.a -usr/share/netdude/protocols/*.a +usr/lib/netdude/plugins/*.a +usr/lib/netdude/protocols/*.a diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude.dirs /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude.dirs --- /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude.dirs 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude.dirs 2006-11-01 01:47:45.000000000 +0100 @@ -3,6 +3,6 @@ usr/share/locale/de/LC_MESSAGES usr/share/man/man1 usr/share/netdude/pixmaps -usr/share/netdude/plugins -usr/share/netdude/protocols +usr/lib/netdude/plugins +usr/lib/netdude/protocols diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude.files /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude.files --- /tmp/2airmYyfwE/netdude-0.3.3/debian/netdude.files 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/netdude.files 2006-11-01 01:47:45.000000000 +0100 @@ -4,6 +4,6 @@ usr/share/man/man1/netdude.1 usr/share/netdude/pixmaps/*.xpm usr/share/netdude/pixmaps/*.png -usr/share/netdude/plugins/*.la -usr/share/netdude/protocols/*.la +usr/lib/netdude/plugins/*.la +usr/lib/netdude/protocols/*.la diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/patches/00list /tmp/ARJbfLaJmy/netdude-0.3.3/debian/patches/00list --- /tmp/2airmYyfwE/netdude-0.3.3/debian/patches/00list 2006-11-01 01:47:44.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/patches/00list 2006-11-01 01:47:45.000000000 +0100 @@ -1 +1,4 @@ fix_324896 +fix_libdir +fix_automake1.9_issues +# re-autotoolize diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/patches/fix_automake1.9_issues.dpatch /tmp/ARJbfLaJmy/netdude-0.3.3/debian/patches/fix_automake1.9_issues.dpatch --- /tmp/2airmYyfwE/netdude-0.3.3/debian/patches/fix_automake1.9_issues.dpatch 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/patches/fix_automake1.9_issues.dpatch 2006-11-01 01:47:45.000000000 +0100 @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## fix_automake1.9_issues.dpatch by Steinar H. Gunderson <[EMAIL PROTECTED]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + [EMAIL PROTECTED]@ +diff -urNad netdude-0.3.3~/po/Makefile.in.in netdude-0.3.3/po/Makefile.in.in +--- netdude-0.3.3~/po/Makefile.in.in 2002-07-22 18:28:19.000000000 +0200 ++++ netdude-0.3.3/po/Makefile.in.in 2006-11-01 01:12:51.007691174 +0100 +@@ -28,8 +28,7 @@ + + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ +-MKINSTALLDIRS = @MKINSTALLDIRS@ +-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` ++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + + CC = @CC@ + GMSGFMT = @GMSGFMT@ diff -Nru /tmp/2airmYyfwE/netdude-0.3.3/debian/patches/fix_libdir.dpatch /tmp/ARJbfLaJmy/netdude-0.3.3/debian/patches/fix_libdir.dpatch --- /tmp/2airmYyfwE/netdude-0.3.3/debian/patches/fix_libdir.dpatch 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/ARJbfLaJmy/netdude-0.3.3/debian/patches/fix_libdir.dpatch 2006-11-01 01:47:45.000000000 +0100 @@ -0,0 +1,193 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## fix_libdir.dpatch by Steinar H. Gunderson <[EMAIL PROTECTED]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + [EMAIL PROTECTED]@ +diff -urNad netdude-0.3.3~/configure.ac netdude-0.3.3/configure.ac +--- netdude-0.3.3~/configure.ac 2002-11-12 18:58:41.000000000 +0100 ++++ netdude-0.3.3/configure.ac 2006-11-01 00:34:45.672866674 +0100 +@@ -61,6 +61,20 @@ + fi + + dnl ################################################## ++dnl # Set PACKAGE_LIB_DIR in config.h. ++dnl ################################################## ++if test "x${libdir}" = 'x${prefix}/lib'; then ++ if test "x${prefix}" = "xNONE"; then ++ AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib/${PACKAGE}", [The lib dir of the package]) ++ else ++ AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib/${PACKAGE}", [The lib dir of the package]) ++ fi ++else ++ AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}/${PACKAGE}", [The lib dir of the package]) ++fi ++ ++ ++dnl ################################################## + dnl # Set PACKAGE_SOURCE_DIR in config.h. + dnl ################################################## + packagesrcdir=`cd $srcdir && pwd` +diff -urNad netdude-0.3.3~/plugins/Makefile.am netdude-0.3.3/plugins/Makefile.am +--- netdude-0.3.3~/plugins/Makefile.am 2002-10-17 19:42:49.000000000 +0200 ++++ netdude-0.3.3/plugins/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -9,7 +9,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include + +-pkgdir = $(pkgdatadir)/plugins ++pkgdir = $(pkglibdir)/plugins + + pkg_LTLIBRARIES = nd_cksumfix.la nd_dummyplugin.la + +diff -urNad netdude-0.3.3~/protocols/arp/Makefile.am netdude-0.3.3/protocols/arp/Makefile.am +--- netdude-0.3.3~/protocols/arp/Makefile.am 2002-09-22 19:26:21.000000000 +0200 ++++ netdude-0.3.3/protocols/arp/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -6,7 +6,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + pkgincludedir = $(includedir)/netdude/protocols/arp + + pkg_LTLIBRARIES = nd_arp.la +diff -urNad netdude-0.3.3~/protocols/ether/Makefile.am netdude-0.3.3/protocols/ether/Makefile.am +--- netdude-0.3.3~/protocols/ether/Makefile.am 2002-09-22 19:25:58.000000000 +0200 ++++ netdude-0.3.3/protocols/ether/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -8,7 +8,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + + pkg_LTLIBRARIES = nd_ethernet.la + +diff -urNad netdude-0.3.3~/protocols/fddi/Makefile.am netdude-0.3.3/protocols/fddi/Makefile.am +--- netdude-0.3.3~/protocols/fddi/Makefile.am 2002-09-22 19:26:10.000000000 +0200 ++++ netdude-0.3.3/protocols/fddi/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -6,7 +6,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + pkgincludedir = $(includedir)/netdude/protocols/fddi + + pkg_LTLIBRARIES = nd_fddi.la +diff -urNad netdude-0.3.3~/protocols/icmp/Makefile.am netdude-0.3.3/protocols/icmp/Makefile.am +--- netdude-0.3.3~/protocols/icmp/Makefile.am 2002-09-22 19:26:06.000000000 +0200 ++++ netdude-0.3.3/protocols/icmp/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -6,7 +6,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_srcdir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + pkgincludedir = $(includedir)/netdude/protocols/icmp + + pkg_LTLIBRARIES = nd_icmp.la +diff -urNad netdude-0.3.3~/protocols/ip/Makefile.am netdude-0.3.3/protocols/ip/Makefile.am +--- netdude-0.3.3~/protocols/ip/Makefile.am 2002-09-22 19:26:24.000000000 +0200 ++++ netdude-0.3.3/protocols/ip/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -8,7 +8,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + + pkg_LTLIBRARIES = nd_ip.la + +diff -urNad netdude-0.3.3~/protocols/linux-sll/Makefile.am netdude-0.3.3/protocols/linux-sll/Makefile.am +--- netdude-0.3.3~/protocols/linux-sll/Makefile.am 2002-09-22 19:25:46.000000000 +0200 ++++ netdude-0.3.3/protocols/linux-sll/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -6,7 +6,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + pkgincludedir = $(includedir)/netdude/protocols/sll + + pkg_LTLIBRARIES = nd_sll.la +diff -urNad netdude-0.3.3~/protocols/snap/Makefile.am netdude-0.3.3/protocols/snap/Makefile.am +--- netdude-0.3.3~/protocols/snap/Makefile.am 2002-09-22 19:26:02.000000000 +0200 ++++ netdude-0.3.3/protocols/snap/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -6,7 +6,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + pkgincludedir = $(includedir)/netdude/protocols/snap + + pkg_LTLIBRARIES = nd_snap.la +diff -urNad netdude-0.3.3~/protocols/tcp/Makefile.am netdude-0.3.3/protocols/tcp/Makefile.am +--- netdude-0.3.3~/protocols/tcp/Makefile.am 2002-09-22 19:26:17.000000000 +0200 ++++ netdude-0.3.3/protocols/tcp/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -6,7 +6,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + pkgincludedir = $(includedir)/netdude/protocols/tcp + + pkg_LTLIBRARIES = nd_tcp.la +diff -urNad netdude-0.3.3~/protocols/udp/Makefile.am netdude-0.3.3/protocols/udp/Makefile.am +--- netdude-0.3.3~/protocols/udp/Makefile.am 2002-09-22 19:26:14.000000000 +0200 ++++ netdude-0.3.3/protocols/udp/Makefile.am 2006-11-01 00:34:23.079454674 +0100 +@@ -6,7 +6,7 @@ + LDFLAGS = -L$(top_srcdir)/src + INCLUDES = @GTK_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/libltdl -I$(top_builddir)/include -W -Wall + +-pkgdir = $(pkgdatadir)/protocols ++pkgdir = $(pkglibdir)/protocols + pkgincludedir = $(includedir)/netdude/protocols/udp + + pkg_LTLIBRARIES = nd_udp.la +diff -urNad netdude-0.3.3~/src/nd_main.c netdude-0.3.3/src/nd_main.c +--- netdude-0.3.3~/src/nd_main.c 2002-11-12 18:27:54.000000000 +0100 ++++ netdude-0.3.3/src/nd_main.c 2006-11-01 00:34:23.079454674 +0100 +@@ -116,7 +116,7 @@ + } + else if (!strcmp(argv[i], "--plugindir")) + { +- printf("%s/plugins\n", PACKAGE_DATA_DIR); ++ printf("%s/plugins\n", PACKAGE_LIB_DIR); + exit(0); + } + else if (!strcmp(argv[i], "--includedir")) +@@ -126,7 +126,7 @@ + } + else if (!strcmp(argv[i], "--protodir")) + { +- printf("%s/protocols\n", PACKAGE_DATA_DIR); ++ printf("%s/protocols\n", PACKAGE_LIB_DIR); + exit(0); + } + else if (!strcmp(argv[i], "--protos")) +diff -urNad netdude-0.3.3~/src/nd_prefs.c netdude-0.3.3/src/nd_prefs.c +--- netdude-0.3.3~/src/nd_prefs.c 2002-09-19 19:02:14.000000000 +0200 ++++ netdude-0.3.3/src/nd_prefs.c 2006-11-01 00:34:23.079454674 +0100 +@@ -185,7 +185,7 @@ + if (dir[0] != 0) + return dir; + +- g_snprintf(dir, MAXPATHLEN, "%s/plugins", PACKAGE_DATA_DIR); ++ g_snprintf(dir, MAXPATHLEN, "%s/plugins", PACKAGE_LIB_DIR); + + return dir; + } +@@ -213,7 +213,7 @@ + if (dir[0] != 0) + return dir; + +- g_snprintf(dir, MAXPATHLEN, "%s/protocols", PACKAGE_DATA_DIR); ++ g_snprintf(dir, MAXPATHLEN, "%s/protocols", PACKAGE_LIB_DIR); + + return dir; + }