summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2016-11-23 16:53:29 +0100
committerPatrice Clement <monsieurp@gentoo.org>2016-11-23 16:53:57 +0100
commita3033209d3da1d8d84dad8336cbc4f7c397a762e (patch)
treebffe6fa7e024abe1c9b28b746030346e804da85e /www-misc
parentapp-emulation/docker-proxy: soft block docker<=1.12. Fixes #599904 (diff)
downloadgentoo-a3033209d3da1d8d84dad8336cbc4f7c397a762e.tar.gz
gentoo-a3033209d3da1d8d84dad8336cbc4f7c397a762e.tar.bz2
gentoo-a3033209d3da1d8d84dad8336cbc4f7c397a762e.zip
www-misc/shellinabox: version bump.
Gentoo-Bug: https://bugs.gentoo.org/587724 Package-Manager: portage-2.3.0
Diffstat (limited to 'www-misc')
-rw-r--r--www-misc/shellinabox/Manifest1
-rw-r--r--www-misc/shellinabox/shellinabox-2.20.ebuild112
2 files changed, 113 insertions, 0 deletions
diff --git a/www-misc/shellinabox/Manifest b/www-misc/shellinabox/Manifest
index ceeda3267b83..301b0eca5883 100644
--- a/www-misc/shellinabox/Manifest
+++ b/www-misc/shellinabox/Manifest
@@ -1 +1,2 @@
DIST shellinabox-2.19.zip 790437 SHA256 1897ec000bb05f8ded07ffb3092c4b43232b8695d8a656985ccae45bebd922e9 SHA512 e6f09679282fd1f23abb272082ca9983df217ad017cad4fdb04d5fa4f93124bfea4b5f12cedb17571e56770ee8b0a4cca1492aff144df5458ed7c1a4ee6a1838 WHIRLPOOL b887101335a48789041574e948a67cf24dd9b269e68481861ff7f4c0ededb4bceae0cc36c11870675597b9c5f3be2d84d824a2c882515b719e4e244c2c93f711
+DIST shellinabox-2.20.zip 792359 SHA256 2b79ed66e5d20a8a46f68d88ba3a74d5302ffe7e5eb048a46b92b268351419f4 SHA512 0537b6400cb7f4880c76cce270e5eefd6f536eae7e27b5f7b12de0465a1e354f7980bb2f67230237eda1f7945afb1d3bb18013106bf7c3a02e7974532f0d9190 WHIRLPOOL a41f1d4010b6fd5386a8e37d6106d774a4600ac43e4baa3efc7a3b3d0f4c22214f13c5eb3d821a7b169731115ea17c9c0f5a6ad762c9791658a5ad98983f1356
diff --git a/www-misc/shellinabox/shellinabox-2.20.ebuild b/www-misc/shellinabox/shellinabox-2.20.ebuild
new file mode 100644
index 000000000000..d215bc79cfec
--- /dev/null
+++ b/www-misc/shellinabox/shellinabox-2.20.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2016 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 systemd
+
+DESCRIPTION="Export 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 systemd unit files
+ systemd_dounit "${FILESDIR}"/shellinaboxd.service
+
+ # 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 exposes 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
+}