diff options
author | Alin Năstac <mrness@gentoo.org> | 2009-07-23 08:16:12 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2009-07-23 08:16:12 +0000 |
commit | dd4176530b61cc62dba2aafc06442794ff9cbb39 (patch) | |
tree | c42ff75d8da3c19313402db7771154a37a4ba2db /net-proxy | |
parent | conf.d and init.d files wrt #199602, thanks to Yoann LE TOUCHE. (diff) | |
download | gentoo-2-dd4176530b61cc62dba2aafc06442794ff9cbb39.tar.gz gentoo-2-dd4176530b61cc62dba2aafc06442794ff9cbb39.tar.bz2 gentoo-2-dd4176530b61cc62dba2aafc06442794ff9cbb39.zip |
Avoid conflicts with net-misc/putty and x11-terms/pssh by renaming pscp and pssh scripts (#248193 and #278794).
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/sshproxy/ChangeLog | 12 | ||||
-rw-r--r-- | net-proxy/sshproxy/files/sshproxy-0.6.0_beta2-rename-wrappers.patch | 159 | ||||
-rw-r--r-- | net-proxy/sshproxy/sshproxy-0.6.0_beta2-r1.ebuild (renamed from net-proxy/sshproxy/sshproxy-0.5.0.ebuild) | 69 |
3 files changed, 215 insertions, 25 deletions
diff --git a/net-proxy/sshproxy/ChangeLog b/net-proxy/sshproxy/ChangeLog index 110061d63840..1bbb02ac3982 100644 --- a/net-proxy/sshproxy/ChangeLog +++ b/net-proxy/sshproxy/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-proxy/sshproxy -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/sshproxy/ChangeLog,v 1.11 2008/12/14 14:36:51 mrness Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/sshproxy/ChangeLog,v 1.12 2009/07/23 08:16:12 mrness Exp $ + +*sshproxy-0.6.0_beta2-r1 (23 Jul 2009) + + 23 Jul 2009; Alin Năstac <mrness@gentoo.org> + +files/sshproxy-0.6.0_beta2-rename-wrappers.patch, -sshproxy-0.5.0.ebuild, + +sshproxy-0.6.0_beta2-r1.ebuild: + Avoid conflicts with net-misc/putty and x11-terms/pssh by renaming pscp and + pssh scripts (#248193 and #278794). 14 Dec 2008; Alin Năstac <mrness@gentoo.org> sshproxy-0.5.0.ebuild, -sshproxy-0.6.0_beta1.ebuild, sshproxy-0.6.0_beta2.ebuild: diff --git a/net-proxy/sshproxy/files/sshproxy-0.6.0_beta2-rename-wrappers.patch b/net-proxy/sshproxy/files/sshproxy-0.6.0_beta2-rename-wrappers.patch new file mode 100644 index 000000000000..765bd9d5bdf9 --- /dev/null +++ b/net-proxy/sshproxy/files/sshproxy-0.6.0_beta2-rename-wrappers.patch @@ -0,0 +1,159 @@ +diff -Nru sshproxy-0.6.0_beta2.orig/lib/get_client_scripts/getscript.py sshproxy-0.6.0_beta2/lib/get_client_scripts/getscript.py +--- sshproxy-0.6.0_beta2.orig/lib/get_client_scripts/getscript.py 2008-01-28 01:44:29.000000000 +0200 ++++ sshproxy-0.6.0_beta2/lib/get_client_scripts/getscript.py 2009-07-23 10:34:01.000000000 +0300 +@@ -22,7 +22,7 @@ + from sshproxy import get_class + from sshproxy.util import chanfmt + +-pssh = """#!/bin/bash ++spssh = """#!/bin/bash + + PROXY_PORT=${SSHPROXY_PORT:-%(port)d} + PROXY_HOST=${SSHPROXY_HOST:-%(ip_addr)s} +@@ -32,7 +32,7 @@ + exec ssh -tp $PROXY_PORT $PROXY_USER@$PROXY_HOST -- "$@" + """ + +-pscp = """#!/bin/bash ++spscp = """#!/bin/bash + + PROXY_PORT=${SSHPROXY_PORT:-%(port)s} + PROXY_HOST=${SSHPROXY_HOST:-%(ip_addr)s} +@@ -79,26 +79,26 @@ + class Server(base_class): + def add_cmdline_options(self, parser): + base_class.add_cmdline_options(self, parser) +- parser.add_option("", "--get-pssh", dest="action", +- help="display pssh client script.", ++ parser.add_option("", "--get-spssh", dest="action", ++ help="display spssh client script.", + action="store_const", +- const="get_pssh", ++ const="get_spssh", + ) +- parser.add_option("", "--get-pscp", dest="action", +- help="display pscp client script.", ++ parser.add_option("", "--get-spscp", dest="action", ++ help="display spscp client script.", + action="store_const", +- const="get_pscp", ++ const="get_spscp", + ) + +- def opt_get_pssh(self, options, *args): ++ def opt_get_spssh(self, options, *args): + user = self.pwdb.get_client().username + ip_addr, port = self.ip_addr, self.port +- self.chan.send(pssh % locals()) ++ self.chan.send(spssh % locals()) + +- def opt_get_pscp(self, options, *args): ++ def opt_get_spscp(self, options, *args): + user = self.pwdb.get_client().username + ip_addr, port = self.ip_addr, self.port +- self.chan.send(pscp % locals()) ++ self.chan.send(spscp % locals()) + + + +diff -Nru sshproxy-0.6.0_beta2.orig/lib/get_client_scripts/__init__.py sshproxy-0.6.0_beta2/lib/get_client_scripts/__init__.py +--- sshproxy-0.6.0_beta2.orig/lib/get_client_scripts/__init__.py 2008-01-28 01:44:29.000000000 +0200 ++++ sshproxy-0.6.0_beta2/lib/get_client_scripts/__init__.py 2009-07-23 10:32:34.000000000 +0300 +@@ -21,11 +21,11 @@ + + __plugin_name__ = "Get Client Scripts" + __description__ = """ +- This plugin allows clients to download the pssh and +- pscp wrapper scripts with special options on the ssh ++ This plugin allows clients to download the spssh and ++ spscp wrapper scripts with special options on the ssh + command line: +- ssh -tp 2242 user@sshproxy -- --get-pssh +- ssh -tp 2242 user@sshproxy -- --get-pscp ++ ssh -tp 2242 user@sshproxy -- --get-spssh ++ ssh -tp 2242 user@sshproxy -- --get-spscp + """ + + def __init_plugin__(): +diff -Nru sshproxy-0.6.0_beta2.orig/misc/acl.db sshproxy-0.6.0_beta2/misc/acl.db +--- sshproxy-0.6.0_beta2.orig/misc/acl.db 2008-01-28 01:44:29.000000000 +0200 ++++ sshproxy-0.6.0_beta2/misc/acl.db 2009-07-23 10:30:30.000000000 +0300 +@@ -78,13 +78,13 @@ + # options ###################################################### + + # opt_list_sites is to allow or deny the use of the --list-sites option: +-# $ pssh --list-sites ++# $ spssh --list-sites + opt_list_sites: + # guests group members can't see the list of allowed sites (they're blind) + client.group != "guests" + +-# opt_get_pkey controls the option --get-pkey of pssh: +-# $ pssh --get-pkey root@host ++# opt_get_pkey controls the option --get-pkey of spssh: ++# $ spssh --get-pkey root@host + opt_get_pkey: + # only admins can get the public key of a site login + "admin" in split(client.groups) +diff -Nru sshproxy-0.6.0_beta2.orig/README sshproxy-0.6.0_beta2/README +--- sshproxy-0.6.0_beta2.orig/README 2008-01-28 01:44:29.000000000 +0200 ++++ sshproxy-0.6.0_beta2/README 2009-07-23 10:23:21.000000000 +0300 +@@ -95,9 +95,9 @@ + root@remote-site # exit + me@myhost $ + +-Here is the same with the pssh shell wrapper:: ++Here is the same with the spssh shell wrapper:: + +- me@myhost $ pssh remote-site ++ me@myhost $ spssh remote-site + root@remote-site # + ... doing some administration commands ... + root@remote-site # exit +@@ -105,7 +105,7 @@ + + You can also execute remote commands:: + +- me@myhost $ pssh remote-site uname -a ++ me@myhost $ spssh remote-site uname -a + nova.wallix.com + me@myhost $ + +@@ -114,9 +114,9 @@ + me@myhost $ scp /etc/issue me@proxy:root@remote-site:/etc/issue.new + me@myhost $ + +-And the same with the pscp shell wrapper:: ++And the same with the spscp shell wrapper:: + +- me@myhost $ pscp /etc/issue remote-site:/etc/issue.new ++ me@myhost $ spscp /etc/issue remote-site:/etc/issue.new + me@myhost $ + + +diff -Nru sshproxy-0.6.0_beta2.orig/setup.py sshproxy-0.6.0_beta2/setup.py +--- sshproxy-0.6.0_beta2.orig/setup.py 2008-01-28 01:44:29.000000000 +0200 ++++ sshproxy-0.6.0_beta2/setup.py 2009-07-23 10:22:31.000000000 +0300 +@@ -74,7 +74,7 @@ + url=url, + download_url='%sdownload/sshproxy-%s.tar.gz' % (url, version), + packages=['sshproxy'], +- scripts=['bin/sshproxyd', 'bin/sshproxy-setup', 'bin/pssh', 'bin/pscp'], ++ scripts=['bin/sshproxyd', 'bin/sshproxy-setup', 'bin/spssh', 'bin/spscp'], + long_description=long_description, + data_files=data_files, + classifiers=classifiers, +diff -Nru sshproxy-0.6.0_beta2.orig/sshproxy/server.py sshproxy-0.6.0_beta2/sshproxy/server.py +--- sshproxy-0.6.0_beta2.orig/sshproxy/server.py 2008-01-28 01:44:29.000000000 +0200 ++++ sshproxy-0.6.0_beta2/sshproxy/server.py 2009-07-23 10:30:44.000000000 +0300 +@@ -308,8 +308,8 @@ + + def parse_cmdline(self, args): + usage = u""" +- pssh [options] +- pssh [user@site [cmd]] ++ spssh [options] ++ spssh [user@site [cmd]] + """ + parser = OptionParser(self.chan, usage=usage) + # add options from a mapping or a Registry callback diff --git a/net-proxy/sshproxy/sshproxy-0.5.0.ebuild b/net-proxy/sshproxy/sshproxy-0.6.0_beta2-r1.ebuild index 56d3e5d8a736..f3bd5ecb7823 100644 --- a/net-proxy/sshproxy/sshproxy-0.5.0.ebuild +++ b/net-proxy/sshproxy/sshproxy-0.6.0_beta2-r1.ebuild @@ -1,12 +1,14 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/sshproxy/sshproxy-0.5.0.ebuild,v 1.4 2008/12/14 14:36:51 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/sshproxy/sshproxy-0.6.0_beta2-r1.ebuild,v 1.1 2009/07/23 08:16:12 mrness Exp $ -inherit distutils +EAPI="2" + +inherit distutils eutils DESCRIPTION="sshproxy is an ssh gateway to apply ACLs on ssh connections" -HOMEPAGE="http://penguin.fr/sshproxy/" -SRC_URI="http://penguin.fr/sshproxy/download/${P}.tar.gz" +HOMEPAGE="http://sshproxy-project.org/" +SRC_URI="http://sshproxy-project.org/download/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" @@ -17,11 +19,10 @@ IUSE="client-only mysql minimal" # minimal: do not install extra plugins # client-only: install only the client wrappers -DEPEND="!net-misc/putty - !client-only? ( - >=dev-python/paramiko-1.6.2 - mysql? ( >=dev-python/mysql-python-1.2.0 ) - )" +DEPEND="!client-only? ( + >=dev-python/paramiko-1.6.2 + mysql? ( >=dev-python/mysql-python-1.2.0 ) + )" RDEPEND="${DEPEND} net-misc/openssh" @@ -30,9 +31,22 @@ pkg_setup() { enewuser sshproxy -1 -1 /var/lib/sshproxy sshproxy } +src_prepare() { + # avoid conflicts with net-misc/putty and x11-terms/pssh + # by renaming pscp and pssh scripts (#248193 and #278794) + epatch "${FILESDIR}"/${P}-rename-wrappers.patch + sed -i -e 's/pscp/spscp/g;s/pssh/spssh/g' doc/* && \ + mv bin/pssh bin/spssh && \ + mv bin/pscp bin/spscp && \ + mv doc/pscp.1 doc/spscp.1 && \ + mv doc/pssh.1 doc/spssh.1 || die "failed to rename pscp or pssh files" + ewarn "For avoiding conflicts with net-misc/putty and x11-terms/pssh," + ewarn "pscp and pssh scripts have been renamed as spscp respectively spssh." +} + src_install () { - dobin bin/pssh - dobin bin/pscp + dobin bin/spssh + dobin bin/spscp if ! use client-only; then distutils_src_install @@ -42,7 +56,7 @@ src_install () { # Create a default sshproxy.ini dodir /etc/sshproxy - insopts -o sshproxy -g sshproxy -m0600 + insopts -o root -g sshproxy -m0600 insinto /etc/sshproxy doins "${FILESDIR}/sshproxy.ini" local BLOWFISH_SECRET=$(printf "%04hX%04hX%04hX%04hX\n" ${RANDOM} ${RANDOM} ${RANDOM} ${RANDOM}) @@ -50,6 +64,7 @@ src_install () { -e "s/%HOSTNAME%/${HOSTNAME}/" \ "${D}/etc/sshproxy/sshproxy.ini" + insopts -o sshproxy -g sshproxy -m0600 rm -rf "${D}/usr/lib/sshproxy/spexpect" if use minimal; then local p @@ -70,6 +85,15 @@ src_install () { newinitd "${FILESDIR}/sshproxyd.initd" sshproxyd newconfd "${FILESDIR}/sshproxyd.confd" sshproxyd + # install manpages + doman doc/spscp.1 + doman doc/spssh.1 + if ! use client-only; then + doman doc/sshproxy.ini.5 + doman doc/sshproxy-setup.8 + doman doc/sshproxyd.8 + fi + if use mysql; then insinto /usr/share/sshproxy/mysql_db doins misc/mysql_db.sql @@ -83,14 +107,13 @@ src_install () { } pkg_postinst () { - if use client-only; then - echo - einfo "Don't forget to set the following environment variables" - einfo " SSHPROXY_HOST (default to localhost)" - einfo " SSHPROXY_PORT (default to 2242)" - einfo " SSHPROXY_USER (default to $USER)" - einfo "for each sshproxy user." - else + echo + einfo "Don't forget to set the following environment variables" + einfo " SSHPROXY_HOST (default to localhost)" + einfo " SSHPROXY_PORT (default to 2242)" + einfo " SSHPROXY_USER (default to \$USER)" + einfo "for each sshproxy user." + if ! use client-only; then distutils_pkg_postinst echo @@ -100,7 +123,7 @@ pkg_postinst () { echo einfo "There is no need to install sshproxy on a client machine." einfo "You can connect to a SSH server using this proxy by running" - einfo " ssh -tp PROXY_PORT PROXY_HOST REMOTE_USER@REMOTE_HOST" + einfo " ssh -tp PROXY_PORT PROXY_USER@PROXY_HOST -- REMOTE_USER@REMOTE_HOST" fi } @@ -148,7 +171,7 @@ EOF echo "port = ${DB_PORT}" } >> "${ROOT}/etc/sshproxy/sshproxy.ini" - sed -i -e 's/^\(\(acl\|client\|site\)_db = \)file_db/\1mysql_db/g' \ + sed -i -e 's/^\(\(acl\|client\|site\)_db = \)ini_db/\1mysql_db/g' \ "${ROOT}/etc/sshproxy/sshproxy.ini" grep -q "^plugin_list .* mysql_db" \ "${ROOT}/etc/sshproxy/sshproxy.ini" || \ |