From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 948631384B4 for ; Mon, 7 Dec 2015 11:38:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C61E921C081; Mon, 7 Dec 2015 11:38:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 44AAE21C081 for ; Mon, 7 Dec 2015 11:38:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 237943406C0 for ; Mon, 7 Dec 2015 11:38:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 098A09A1 for ; Mon, 7 Dec 2015 11:38:51 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1449488309.85d4f95876799bc3493925120573a41ce496c238.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-misc/shellinabox/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-misc/shellinabox/Manifest www-misc/shellinabox/shellinabox-2.19.ebuild X-VCS-Directories: www-misc/shellinabox/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 85d4f95876799bc3493925120573a41ce496c238 X-VCS-Branch: master Date: Mon, 7 Dec 2015 11:38:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4f977ff0-8f3a-4512-8c44-5a3d76b7b3c0 X-Archives-Hash: 444058f208f0ecce1bdcdd53acb4ecf7 commit: 85d4f95876799bc3493925120573a41ce496c238 Author: Patrice Clement gentoo org> AuthorDate: Mon Dec 7 11:35:52 2015 +0000 Commit: Patrice Clement gentoo org> CommitDate: Mon Dec 7 11:38:29 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85d4f958 www-misc/shellinabox: Version bump. Fixes security bug 567316. Package-Manager: portage-2.2.20.1 Signed-off-by: Patrice Clement gentoo.org> www-misc/shellinabox/Manifest | 1 + www-misc/shellinabox/shellinabox-2.19.ebuild | 108 +++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/www-misc/shellinabox/Manifest b/www-misc/shellinabox/Manifest index 85f28cd..9c84883 100644 --- a/www-misc/shellinabox/Manifest +++ b/www-misc/shellinabox/Manifest @@ -1 +1,2 @@ DIST shellinabox-2.18.zip 328195 SHA256 0a3572268b7f42e402cd2fc48ca1f9d1dad6d27d6209ca19923a60f4ee5cb5f8 SHA512 a036131d48d7e1b2e69e128d509a755978bbeb13ebac82212b225d3b0eafea8420ecbb830ea85a75e870814bf20c446ca1642fe59da516f74e0e439a3a41fe24 WHIRLPOOL 903195402af196b55dafcf7f261bc291c5fdd690c3a40ca09578c58d307a6b75e38bbb5316995708e078a6bab6a36de1e2ae9722142bf97b948de2c1dbcf2e52 +DIST shellinabox-2.19.zip 790437 SHA256 1897ec000bb05f8ded07ffb3092c4b43232b8695d8a656985ccae45bebd922e9 SHA512 e6f09679282fd1f23abb272082ca9983df217ad017cad4fdb04d5fa4f93124bfea4b5f12cedb17571e56770ee8b0a4cca1492aff144df5458ed7c1a4ee6a1838 WHIRLPOOL b887101335a48789041574e948a67cf24dd9b269e68481861ff7f4c0ededb4bceae0cc36c11870675597b9c5f3be2d84d824a2c882515b719e4e244c2c93f711 diff --git a/www-misc/shellinabox/shellinabox-2.19.ebuild b/www-misc/shellinabox/shellinabox-2.19.ebuild new file mode 100644 index 0000000..fb9d66a --- /dev/null +++ b/www-misc/shellinabox/shellinabox-2.19.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +AUTOTOOLS_AUTORECONF="yes" +AUTOTOOLS_IN_SOURCE_BUILD="yes" + +inherit user autotools-utils + +DESCRIPTION="Web server that can export arbitrary command line tools to a web based terminal emulator" +HOMEPAGE="https://github.com/shellinabox/shellinabox" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.zip -> ${P}.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="+ssl +pam" + +RDEPEND="${DEPEND}" +DEPEND="${RDEPEND} + ssl? ( dev-libs/openssl:0= ) + pam? ( virtual/pam )" + +SIAB_CERT_DIR="/etc/shellinabox/cert" +SIAB_SSL_BASH="${SIAB_CERT_DIR}/gen_ssl_cert.bash" +SIAB_DAEMON="${PN}d" + +shellinbox_gen_ssl_setup() { + read -r -d '' SIAB_SSL_SETUP << EOF +cd ${SIAB_CERT_DIR} +openssl genrsa -des3 -out server.key 1024 +openssl req -new -key server.key -out server.csr +cp server.key server.key.org +openssl rsa -in server.key.org -out server.key +openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt +cat server.crt server.key > certificate.pem +EOF +} + +pkg_setup() { + enewgroup "${SIAB_DAEMON}" + enewuser "${SIAB_DAEMON}" -1 -1 -1 "${SIAB_DAEMON}" +} + +src_configure() { + local myeconf="--disable-runtime-loading" + + econf \ + $(use_enable ssl) \ + $(use_enable pam) \ + "${myeconf}" +} + +src_install() { + emake DESTDIR="${D}" install || die + + # make installs the binary in bin. + rm -rf "${D}/usr/bin" || die + + # whereas it should put it in sbin. + dosbin "${SIAB_DAEMON}" + + # Install init+conf files. + newinitd "${FILESDIR}/${SIAB_DAEMON}.init" "${SIAB_DAEMON}" + newconfd "${FILESDIR}/${SIAB_DAEMON}.conf" "${SIAB_DAEMON}" + + # Install CSS files. + insinto "/usr/share/${PN}-resources" + doins -r "${PN}"/*.css + + if use ssl; then + # Create directory where SSL certificates will be generated. + dodir "${SIAB_CERT_DIR}" + fowners "${SIAB_DAEMON}:${SIAB_DAEMON}" "${SIAB_CERT_DIR}" + + # Generate set up variable. + shellinbox_gen_ssl_setup + + # Dump it in a bash script. + echo "#!/usr/bin/env bash" > "${D}/${SIAB_SSL_BASH}" ||die + echo "${SIAB_SSL_SETUP}" >> "${D}/${SIAB_SSL_BASH}" || die + chmod +x "${D}/${SIAB_SSL_BASH}" || die + fi +} + +pkg_postinst() { + ewarn + ewarn "The default configuration expose a login shell" + ewarn "with SSL disabled on the localhost interface only." + ewarn + + if use ssl; then + shellinbox_gen_ssl_setup + + einfo + einfo "To generate self-signed SSL certificates" + einfo "please read the following procedure" + einfo "explained here: https://code.google.com/p/shellinabox/issues/detail?id=59#c15" + einfo + einfo "${SIAB_SSL_SETUP}" + einfo + einfo "This walkthrough has been written in ${SIAB_SSL_BASH} for your convenience." + einfo "Make sure to execute this script." + einfo + fi +}