Hi, On Tue, 01 Oct 2013, Barak A. Pearlmutter wrote: > No worries: fixed for a while in git://github.com/barak/ettercap
Duh, I didn't think of checking the git repository... I already worked on packaging 0.8.0 (for Kali Linux) and got bitten by some of the problems you already fixed. > If you're interested, Have a look at the draft packaging above. There > are some minor issues (handily noticed by lint) that popped up with > 0.8.0 due to the upstream library-ization (slapping libettercap.so into > /usr/lib/, need to set it in a lib package for multiarch, and it is also > w/o a version number) I'm not sure about this one. As long as it's marked experimental, I wouldn't care about it. Once it has a version number, I'd say yes. > , and some upstream fuffing around with the way > debug support is enabled which seems now inappropriately aliased to > turning on profiling support; Hum, not sure I understand the implications for this one. I noticed you added -DCMAKE_BUILD_TYPE=Debug but I opted to patch the CMakeLists.txt files so that they accept the default value set by debhelper (-DCMAKE_BUILD_TYPE=RelWithDebInfo) to work around the build failure I got. > need to turn off a spurious rpath; etc. Again I patched the upstream makefiles for this to disable RPATH generation. You can find both patches here: http://git.kali.org/gitweb/?p=packages/ettercap.git;a=tree;f=debian/patches;hb=refs/heads/master Other relevant changes: http://git.kali.org/gitweb/?p=packages/ettercap.git;a=commitdiff;h=f56969cbe5886b3719d23af1e75c64469e03f778 http://git.kali.org/gitweb/?p=packages/ettercap.git;a=commitdiff;h=cba12234d6e7a2585bed70c92293b9366011d158 You also don't need the menu dependency since any usage of su-to-root is gone. Attached is generic patch with the diff between what I made and what you have made. > I have not had time to deal with it yet, but it's on the queue. Of > course if someone wants to lend a hand, fantastic! Co-maintain? Also > fantastic! My help will always be sporadic... maybe once we have a team dedicated to security tools you could join and I could help in that context. > Should mention that upstream is very happy to discuss issues, and to > accept patches. This is nice when a packaging problem is at root an > upstream issue. On the other hand it makes it hard to silently work > around problems: instead one needs to think about the "right" fix. I rather like that! The RelWithDebInfo patch could be submitted upstream. The other one is unlikely to be upstreamable as is... although I'm not sure why upstream wants to add RPATH. Cheers, -- Raphaël Hertzog ◈ Debian Developer Discover the Debian Administrator's Handbook: → http://debian-handbook.info/get/
diff --git a/debian/.gitignore b/debian/.gitignore deleted file mode 100644 index 596ebd7..0000000 --- a/debian/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/*.debhelper -/*.log -/*.substvars -/ettercap-common/ -/ettercap-dbg/ -/ettercap-graphical/ -/ettercap-text-only/ -/files -/tmp/ diff --git a/debian/changelog b/debian/changelog index 10d7c41..a64856a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,19 +1,26 @@ -ettercap (1:0.8.0-1) unstable; urgency=low +ettercap (1:0.8.0-0kali1) kali; urgency=low - [ Gianfranco Costamagna ] - * New upstream version - * Added policykit-1 to ettercap-graphical - * Added luajit to build-dep - * Updated debian/rules clean target - * Removed patches, addressed upstream - * Added ethtool dependency, needed for disabling - segmentation offload - * Tweaked debian/watch file - - [ Barak A. Pearlmutter ] - * Migrated debian/rules clean target to debian/clean - - -- Barak A. Pearlmutter <b...@debian.org> Mon, 23 Sep 2013 14:05:44 +0100 + * New upstream release. + * Drop Debian specific patches: + - 0001-desktop.patch: upstream uses pkexec by default now, no need to use + su-to-root, thus drop dep on menu and add dep on policykit-1 + - 0002-centre-scalable-icon.patch: merged upstream + * Fix CMakeLists.txt to not barf on Debian's + CMAKE_BUILD_TYPE=RelWithDebInfo. + * Tweak install files to let upstream install the desktop file, the + policy kit rules, and the pkexec wrapper. + * Install libettercap.so in ettercap-common. + * Add disable-rpath.patch to disable RPATH generation. + * Add some lintian overrides to deal with the internal but public + libettercap.so. + + -- Raphaël Hertzog <hert...@debian.org> Mon, 30 Sep 2013 21:17:08 +0200 + +ettercap (1:0.7.6-1kali0) kali; urgency=low + + * Import ettercap from testing + + -- Mati Aharoni <m...@kali.org> Mon, 09 Sep 2013 07:01:22 -0400 ettercap (1:0.7.6-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 6b7eaa6..c598658 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9), libssl-dev, libcurl4-openssl-dev | libcurl-ssl-dev | libcurl-dev, ghostscript, - luajit + luajit, Standards-Version: 3.9.4 Homepage: http://ettercap.sourceforge.net Vcs-Git: git://github.com/barak/ettercap.git @@ -75,8 +75,8 @@ Description: Ettercap console-mode executable Package: ettercap-graphical Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ettercap-common (= ${binary:Version}), menu, policykit-1 -Replaces: ettercap-gtk, ettercap-text-only, ettercap +Depends: ${shlibs:Depends}, ${misc:Depends}, ettercap-common (= ${binary:Version}), policykit-1 +Replaces: ettercap-gtk, ettercap-text-only, ettercap, ettercap-common Conflicts: ettercap-gtk, ettercap-text-only, ettercap (<= 1:0.7.3) Provides: ettercap Recommends: gksu diff --git a/debian/ettercap-common.lintian-overrides b/debian/ettercap-common.lintian-overrides new file mode 100644 index 0000000..b4b4407 --- /dev/null +++ b/debian/ettercap-common.lintian-overrides @@ -0,0 +1,5 @@ +# We install an unversionned libettercap.so which is for private use +ettercap-common: postinst-must-call-ldconfig usr/lib/libettercap.so +ettercap-common: no-symbols-control-file usr/lib/libettercap.so +ettercap-common: shlib-without-versioned-soname usr/lib/libettercap.so libettercap.so +ettercap-common: package-name-doesnt-match-sonames libettercap diff --git a/debian/ettercap-graphical.install b/debian/ettercap-graphical.install index 27de3fc..f4aa8a1 100644 --- a/debian/ettercap-graphical.install +++ b/debian/ettercap-graphical.install @@ -1,5 +1,5 @@ debian/tmp/usr/bin/ettercap usr/sbin/ -debian/tmp/usr/bin/ettercap-pkexec usr/sbin/ +debian/tmp/usr/bin/ettercap-pkexec usr/bin/ debian/tmp/usr/share/ettercap/ettercap.png debian/tmp/usr/share/polkit-1 debian/tmp/usr/share/pixmaps diff --git a/debian/patches/allow-build-type-RelWithDebInfo.patch b/debian/patches/allow-build-type-RelWithDebInfo.patch new file mode 100644 index 0000000..2656227 --- /dev/null +++ b/debian/patches/allow-build-type-RelWithDebInfo.patch @@ -0,0 +1,22 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ option(LIBRARY_BUILD "Build for libetter + option(INSTALL_DESKTOP "Install ettercap desktop files" ON) + + +-SET(VALID_BUILD_TYPES Debug Release) ++SET(VALID_BUILD_TYPES Debug Release RelWithDebInfo) + + if(NOT CMAKE_BUILD_TYPE) + # Default to using "Release" as our build type. +--- a/tests/check/CMakeLists.txt ++++ b/tests/check/CMakeLists.txt +@@ -34,6 +34,8 @@ IF("${CMAKE_BUILD_TYPE}" STREQUAL "Debug + SET(EXPORT_C_FLAGS "${EXPORT_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}") + ELSEIF("${CMAKE_BUILD_TYPE}" STREQUAL "Release") + SET(EXPORT_C_FLAGS "${EXPORT_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") ++ELSEIF("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo") ++ SET(EXPORT_C_FLAGS "${EXPORT_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") + ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + + SET(EXPORT_PREFIX ${CHECK_PREFIX}) diff --git a/debian/patches/disable-rpath.patch b/debian/patches/disable-rpath.patch new file mode 100644 index 0000000..ea1a50c --- /dev/null +++ b/debian/patches/disable-rpath.patch @@ -0,0 +1,25 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,10 +32,6 @@ if(contains_valid EQUAL -1) + endif() + UNSET(contains_valid) + +-# Ensure that, when we link to stuff outside of our build path, we include the +-# library dir path in our RPATH. +-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +- + include(CMakeDependentOption) + + # If SYSTEM_LIBS is set to off, then all SYSTEM_* options will be +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -209,9 +209,6 @@ set_target_properties(lib_ettercap PROPE + + if (NOT LIBRARY_BUILD) + target_link_libraries(ettercap lib_ettercap) +- set_target_properties(ettercap PROPERTIES +- INSTALL_RPATH ${INSTALL_LIBDIR} +- ) + endif(NOT LIBRARY_BUILD) + install(TARGETS lib_ettercap DESTINATION ${INSTALL_LIBDIR}) + if(NOT LIBRARY_BUILD) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..3ea07cb --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +allow-build-type-RelWithDebInfo.patch +disable-rpath.patch diff --git a/debian/rules b/debian/rules index 665b590..7530857 100755 --- a/debian/rules +++ b/debian/rules @@ -11,20 +11,17 @@ ENABLE_IPV6 := $(shell \ else echo OFF; \ fi) -#For some reasons ettercap FTBFS with -PIC enabled -#/usr/bin/ld.bfd.real: CMakeFiles/lib_ettercap.dir/dissectors/ec_ssh.c.o: relocation R_X86_64_PC32 against symbol `ssh_conn_key' can not be used when making a shared object; recompile with -fPIC -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - override_dh_auto_configure: @echo LIBNET_VER = $(LIBNET_VER) @echo ENABLE_IPV6 = $(ENABLE_IPV6) @echo main configuration deferred until build, as it must be done twice override_dh_auto_build: - dh_auto_configure -- -DENABLE_IPV6=$(ENABLE_IPV6) -DENABLE_GTK=OFF -DCMAKE_BUILD_TYPE=Debug + dh_auto_configure -- -DENABLE_IPV6=$(ENABLE_IPV6) -DENABLE_GTK=OFF -DBUNDLED_LIBS=OFF dh_auto_build - mv obj*/src/ettercap ettercap-text-only - dh_auto_configure -- -DENABLE_IPV6=$(ENABLE_IPV6) -DENABLE_GTK=ON -DCMAKE_BUILD_TYPE=Debug + cd obj-* && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + mv debian/tmp/usr/bin/ettercap ettercap-text-only + dh_auto_configure -- -DENABLE_IPV6=$(ENABLE_IPV6) -DENABLE_GTK=ON -DBUNDLED_LIBS=OFF dh_auto_build override_dh_auto_install: @@ -34,7 +31,7 @@ override_dh_auto_install: install --mode=0755 ettercap-text-only debian/tmp/usr/sbin/ override_dh_install: - dh_install + dh_install --list-missing mkdir -p debian/ettercap-text-only/usr/sbin install --mode=0755 \ debian/tmp/usr/sbin/ettercap-text-only \ diff --git a/debian/source/local-options b/debian/source/local-options deleted file mode 100644 index 7423a2d..0000000 --- a/debian/source/local-options +++ /dev/null @@ -1 +0,0 @@ -single-debian-patch diff --git a/debian/watch b/debian/watch index 5d5c3c7..3b87f35 100644 --- a/debian/watch +++ b/debian/watch @@ -1,4 +1,4 @@ version=3 -http://ettercap.github.com/ettercap/downloads.html \ -(?:.*[/=]|)v(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)).* +http://ettercap.github.io/ettercap/downloads.html \ +(?:.*[/=]|)(?:ettercap[_\-]|v)(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)).*