From owner-svn-ports-head@FreeBSD.ORG Fri Jan 11 20:22:29 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E036B5BA; Fri, 11 Jan 2013 20:22:29 +0000 (UTC) (envelope-from rm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B3AF0EDD; Fri, 11 Jan 2013 20:22:29 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0BKMTxx049261; Fri, 11 Jan 2013 20:22:29 GMT (envelope-from rm@svn.freebsd.org) Received: (from rm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0BKMTgN049259; Fri, 11 Jan 2013 20:22:29 GMT (envelope-from rm@svn.freebsd.org) Message-Id: <201301112022.r0BKMTgN049259@svn.freebsd.org> From: Ruslan Mahmatkhanov Date: Fri, 11 Jan 2013 20:22:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r310248 - in head/security/zenmap: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2013 20:22:30 -0000 Author: rm Date: Fri Jan 11 20:22:28 2013 New Revision: 310248 URL: http://svnweb.freebsd.org/changeset/ports/310248 Log: - drop PKGNAMEPREFIX (it's an app, not library) - replace su-to-zenmap.sh (su detection script) with more clean solution from PC-BSD, that does not require modification to work properlt with kde4 - bump PORTREVISION PR: 175120 Submitted by: nemysis (maintainer) Added: head/security/zenmap/files/ head/security/zenmap/files/pc-su (contents, props changed) Modified: head/security/zenmap/Makefile Modified: head/security/zenmap/Makefile ============================================================================== --- head/security/zenmap/Makefile Fri Jan 11 20:19:45 2013 (r310247) +++ head/security/zenmap/Makefile Fri Jan 11 20:22:28 2013 (r310248) @@ -3,9 +3,9 @@ PORTNAME= zenmap PORTVERSION= 6.25 +PORTREVISION= 1 CATEGORIES= security ipv6 MASTER_SITES= http://nmap.org/dist/ -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= nmap-${PORTVERSION} MAINTAINER= nemysis@gmx.ch @@ -37,7 +37,13 @@ PLIST_SUB+= NLS="" PLIST_SUB+= NLS="@comment " .endif +post-extract: + @${RM} -f ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh + @${CP} -a ${FILESDIR}/pc-su ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh + post-patch: + @${REINPLACE_CMD} -e 's|su-to-zenmap.sh %F|su-to-zenmap.sh ${PORTNAME}|' \ + ${WRKSRC}/install_scripts/unix/zenmap-root.desktop @${REINPLACE_CMD} \ -e '/self.create_uninstaller/s|^|#|' ${WRKSRC}/setup.py @${REINPLACE_CMD} \ Added: head/security/zenmap/files/pc-su ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/zenmap/files/pc-su Fri Jan 11 20:22:28 2013 (r310248) @@ -0,0 +1,34 @@ +#!/bin/sh +# Wrapper script which finds the right "su" program +# to use for graphical root execution + +if [ `id -r -u` != "0" ] ; then + VARS="`echo $@`" + + # Try qsu first, should always be the default + which qsu >/dev/null 2>/dev/null + if [ $? -eq 0 ] ; then + qsu $VARS + exit $? + fi + + # Now try gksu + which gksu >/dev/null 2>/dev/null + if [ $? -eq 0 ] ; then + gksu -a "$VARS" + exit $? + fi + + # Lastly we have kdesu + which kdesu >/dev/null 2>/dev/null + if [ $? -eq 0 ] ; then + kdesu -t -c "$VARS" + exit $? + fi + + # If no utility could be found... + echo "No graphical switch-user utility found!" + exit 1 +else + ${@} +fi