summaryrefslogtreecommitdiff
path: root/www-misc/shellinabox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /www-misc/shellinabox
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'www-misc/shellinabox')
-rw-r--r--www-misc/shellinabox/Manifest9
-rw-r--r--www-misc/shellinabox/files/shellinaboxd.conf15
-rw-r--r--www-misc/shellinabox/files/shellinaboxd.init5
-rw-r--r--www-misc/shellinabox/shellinabox-2.20-r1.ebuild2
-rw-r--r--www-misc/shellinabox/shellinabox-2.20-r2.ebuild109
-rw-r--r--www-misc/shellinabox/shellinabox-2.20-r3.ebuild109
6 files changed, 237 insertions, 12 deletions
diff --git a/www-misc/shellinabox/Manifest b/www-misc/shellinabox/Manifest
index 849fa28d2ac4..37ca6ac63074 100644
--- a/www-misc/shellinabox/Manifest
+++ b/www-misc/shellinabox/Manifest
@@ -1,6 +1,9 @@
-AUX shellinaboxd.conf 3564 BLAKE2B 82b42901c93e64b2f6f950af13a628c35a50b076c394e73132e32725fb9fe3d8e4d2a607688adb4f512838f2996b7945aee72a4a545d5a4169b4bdd815c36e55 SHA512 62c29e61a9fb332660806210533d30cdbd473f7c8acba9d1bb7d1960013920962f23b4af5e98b0ccc8a05a6ebfb6907f77b2c26ef3f8d5dee8fb23d2d074681a
-AUX shellinaboxd.init 1673 BLAKE2B 1489e72db618f71708cec4f576ca56fc7623b80bf5538b51578712f1c04365edc8957d34bce45acd0e083f30c24eb5f551bda5bc581fd880375b4e508be8bd26 SHA512 7fc79a4a7633c452277ebcfb871ce34f4f3350beae863ad0cf5540ca12c9c8f33367cedddd8777eb1ea75d3ef7816935ef176d8eefac700b3e2917d11bfd280b
+AUX shellinaboxd.conf 3474 BLAKE2B 873c0ea46b81bac7c78f08da2d566099bbf26973f6e6b1ca1d3f4a0926b9971c282f48c65b9db30b445d8185d2273a4795c208e104903c94ad55953ffd1ad18b SHA512 7bd213a7f58bbf3aab29a77b31d3c29a7b885bacb23782ede738e1afbebb4d2dab9de30245ca0493652f3d487882b7332d6ed1a932df2a643dc91da75e3f9fac
+AUX shellinaboxd.init 1723 BLAKE2B e5e8bc573628f1b12f1390c5a481c80b9411eba156ba5513d04f1afc41d42e6a398bfa35b65c8a705cfb439238cc30b76d5c22ef14507cd8e714af1e8fde1107 SHA512 e568d9e972097960e292c73df6b493c610f0a17fec159dc933ac19b15b92649165c4e41cac8d19d32860effd0a4da8ff950a34f54f6db9ca67206056d22b2703
AUX shellinaboxd.service 420 BLAKE2B 89973ee0f64fce39603778afef8e0544313ff05f71c7668b5055edccffa552511278ab090aad50529e949e4b16e84291302f1404660d3ab5150ce5491f2fa4ca SHA512 cdb22177b92794c7cda2e10c461f1f31ed165ede156c682fec5b682afbd48f8c9c564420950f3d39f9943cbfbfdb864869a96a2dae60f2bbe1bd36bd61282aa5
+DIST shellinabox-2.20.tar.gz 745920 BLAKE2B 34d360d2e4f0474f64490894f4ba9b9457ca7915156fc3364e874c89d9792ec52c8e756d5f356da6f680425fcc4cf9c9025a47d56cb0b0671a2749f0ba90d5b9 SHA512 369fb6e0041fc3eb52a533f14d1f856a71ec1bf166441e25a5d61bb129f2db5de6b61205ddd0cb08d53384baaf4e087bd2c549f7919b96ee465d4cc3318d2237
DIST shellinabox-2.20.zip 792359 BLAKE2B fd6ebde4d9f81314dd439126ad9ed6759556268c4af6dbe2094fb7aaef3956e8c484deb8c3b43a485bc28cf3a2c0105bee0f8b5c2efba1d3d7f0c0b6b3f6867a SHA512 0537b6400cb7f4880c76cce270e5eefd6f536eae7e27b5f7b12de0465a1e354f7980bb2f67230237eda1f7945afb1d3bb18013106bf7c3a02e7974532f0d9190
-EBUILD shellinabox-2.20-r1.ebuild 2694 BLAKE2B 39197dae01645b3f3fbaf0fbb1c46b4f3c5fcd960fb32c146af70daf2ca37a12e248f490f9d952b448ffd851121a38754f074efa39f97b12a47b6d25684c6a08 SHA512 325d00ec3c11c089550e72aaf31bc5bc6b60593348666f863d7cdfda6766b85f92f97ed77cc319b041779683d17d410c4628e0b635d45cb1e44dcd566df75233
+EBUILD shellinabox-2.20-r1.ebuild 2694 BLAKE2B bad035b871d10f39c919dd96a857335f0f21ea47e3a80d260639bcdd8d494a4b8e13e3831bbed2e62e71a47ed75faedb058a469d6a7fe9e9626b8c4b51db8606 SHA512 0567f829f8cd92b34384fd4942869acdc7145dc900c88a519b7979e34566c2a4235cae47473be15f973a5a4e97cde123b96b5c190054f11443644622b222ce3d
+EBUILD shellinabox-2.20-r2.ebuild 2673 BLAKE2B 626f9e847d8a884c0b9cfd60f0d471feeedc22d31fed5767aa999ccd1f20123e629eb46c1fc99ccb0d2422136ba893a2a230b013b0a4b961e34bfd4a4acd67c0 SHA512 28e163e20225f8e06b0bed77d06dd9cbae92973090f121c1d8aef93307776c41618bc96185dff247507bef21045a0af08456b77466c44f9af3a6812e73b5425e
+EBUILD shellinabox-2.20-r3.ebuild 2679 BLAKE2B 8eebe74aa6ad393427fa5546b7813c1a3217b9ad83dac44ebebfa88207040420d62fb6bf7dd034d5e65b4f3550a69e0c09b4f6d57d66016588c81e6dd22d1f86 SHA512 50e3079d5e77f6073f728f84bd5630a7933da41f9a9526e24bd8b24185f2a826f345d258df464259ce58d4a8401e9a8a65fa9d22660b3ed6691caa286151be5c
MISC metadata.xml 526 BLAKE2B 35b2638ace4b739a89974a6d9fcff93530172088c5a8ec49bff2f9949fd44220aeb8d1bffbed2d56b0550963625e99d52582926741517e612269495ca88242e8 SHA512 c9986b020184cb4393a1934b30dc2fce77ef6e926bd3f1f2f474adc201ae8302fe759c2b64e2775506b3ec0a097f10891490c39b9928359f31886d7818c8b64d
diff --git a/www-misc/shellinabox/files/shellinaboxd.conf b/www-misc/shellinabox/files/shellinaboxd.conf
index 3c34ab08f5e9..d80ecd0250d2 100644
--- a/www-misc/shellinabox/files/shellinaboxd.conf
+++ b/www-misc/shellinabox/files/shellinaboxd.conf
@@ -1,5 +1,5 @@
# conf.d file for shellinaboxd
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Options available (copied from the man page):
@@ -26,8 +26,8 @@ SIAB_CSS_DIR="/usr/share/shellinabox-resources"
#
# The administrator should make sure that there are matching certificates for
# each of the virtual hosts on this server, and that there is a generic certifiā€
-# cate.pem file.
-#
+# cate.pem file.
+
# If no suitable certificate is installed, shellinaboxd will attempt to invoke
# /usr/bin/openssl and create a new self-signed certificate. This only
# succeeds if, after dropping privileges, shellinaboxd has write
@@ -41,7 +41,7 @@ SIAB_CSS_DIR="/usr/share/shellinabox-resources"
#
SIAB_CERT_DIR="/etc/shellinabox/cert"
-# By default, shellinaboxd redirectes all incoming HTTP requests to their
+# By default, shellinaboxd redirects all incoming HTTP requests to their
# equivalent HTTPS URLs. If promoting of connections to encrypted SSL/TLS
# sessions is undesired, this behavior can be disabled.
#
@@ -49,7 +49,7 @@ SIAB_CERT_DIR="/etc/shellinabox/cert"
# intranets, if SSL certificates are unavailable.
#
# SIAB_DISABLE_SSL and SIAB_CERT_DIR are mutually exclusive options.
-#
+
# Add this option to SIAB_OPTS if you don't want SSL support.
SIAB_DISABLE_SSL="--disable-ssl"
@@ -65,10 +65,13 @@ SIAB_GROUP="shellinaboxd"
# Default service to launch
SIAB_SERVICE="/:LOGIN"
+# SIAB log file.
+SIAB_LOGFILE="/var/log/shellinabox.log"
+
# Do not add both SIAB_CSS_DIR or SIAB_CERT_DIR to SIAB_OPTS.
# Default setup turns off SSL.
-SIAB_OPTS="${SIAB_DISABLE_SSL} --port=${SIAB_HTTP_PORT} --user=${SIAB_USER} --group=${SIAB_GROUP} --service=${SIAB_SERVICE}"
+SIAB_OPTS="${SIAB_DISABLE_SSL} --port=${SIAB_HTTP_PORT} --user=${SIAB_USER} --group=${SIAB_GROUP} --service=${SIAB_SERVICE} --verbose"
# Uncomment this line to activate SSL.
# SIAB_OPTS="--cert=${SIAB_CERT_DIR} --port=${SIAB_HTTP_PORT} --user=${SIAB_USER} --group=${SIAB_GROUP} --service=${SIAB_SERVICE}"
diff --git a/www-misc/shellinabox/files/shellinaboxd.init b/www-misc/shellinabox/files/shellinaboxd.init
index 657a137a5c6b..11c50d437914 100644
--- a/www-misc/shellinabox/files/shellinaboxd.init
+++ b/www-misc/shellinabox/files/shellinaboxd.init
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
my_daemon="shellinaboxd"
@@ -33,7 +33,7 @@ start_pre() {
SIAB_CSS_FILES+=("\"${_NAME}\":-${_CSS}")
done
- # The 1st one, which the default one, must be turned on using a + sign.
+ # The 1st one, which is the default one, must be turned on using the + sign.
SIAB_CSS_FILES[0]=$(sed 's#:-#:+#' <<< ${SIAB_CSS_FILES[0]})
command_args="${command_args} --user-css=$(my_join , "${SIAB_CSS_FILES[@]}")"
@@ -50,6 +50,7 @@ start() {
--pidfile ${pidfile} \
--make-pidfile \
--exec ${command} \
+ -1 ${SIAB_LOGFILE} -2 ${SIAB_LOGFILE} \
-- ${command_args}
eend $?
}
diff --git a/www-misc/shellinabox/shellinabox-2.20-r1.ebuild b/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
index 402d2b3c081b..0fd76e1f2e61 100644
--- a/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
+++ b/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
@@ -66,7 +66,7 @@ src_install() {
newinitd "${FILESDIR}/${SIAB_DAEMON}.init" "${SIAB_DAEMON}"
newconfd "${FILESDIR}/${SIAB_DAEMON}.conf" "${SIAB_DAEMON}"
- # Install systemd unit files
+ # Install systemd unit file.
systemd_dounit "${FILESDIR}"/shellinaboxd.service
# Install CSS files.
diff --git a/www-misc/shellinabox/shellinabox-2.20-r2.ebuild b/www-misc/shellinabox/shellinabox-2.20-r2.ebuild
new file mode 100644
index 000000000000..f92e89f9f226
--- /dev/null
+++ b/www-misc/shellinabox/shellinabox-2.20-r2.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user autotools 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="+pam"
+
+DEPEND="
+ dev-libs/openssl:0=
+ pam? ( sys-libs/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_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconf=(
+ --disable-runtime-loading
+ --enable-ssl
+ )
+
+ econf \
+ $(use_enable pam) \
+ "${myeconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # 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 file.
+ systemd_dounit "${FILESDIR}"/shellinaboxd.service
+
+ # Install CSS files.
+ insinto "/usr/share/${PN}-resources"
+ doins -r "${PN}"/*.css
+
+ # 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
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "The default configuration exposes a login shell"
+ ewarn "with SSL disabled on the localhost interface only."
+ ewarn
+
+ shellinbox_gen_ssl_setup
+
+ einfo
+ einfo "To generate self-signed SSL certificates"
+ einfo "please read the procedure explained here:"
+ einfo "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
+}
diff --git a/www-misc/shellinabox/shellinabox-2.20-r3.ebuild b/www-misc/shellinabox/shellinabox-2.20-r3.ebuild
new file mode 100644
index 000000000000..4ddaef132e05
--- /dev/null
+++ b/www-misc/shellinabox/shellinabox-2.20-r3.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit user autotools 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}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="+pam"
+
+DEPEND="
+ dev-libs/openssl:0=
+ pam? ( sys-libs/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_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconf=(
+ --disable-runtime-loading
+ --enable-ssl
+ )
+
+ econf \
+ $(use_enable pam) \
+ "${myeconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # 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 file.
+ systemd_dounit "${FILESDIR}"/shellinaboxd.service
+
+ # Install CSS files.
+ insinto "/usr/share/${PN}-resources"
+ doins -r "${PN}"/*.css
+
+ # 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
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "The default configuration exposes a login shell"
+ ewarn "with SSL disabled on the localhost interface only."
+ ewarn
+
+ shellinbox_gen_ssl_setup
+
+ einfo
+ einfo "To generate self-signed SSL certificates"
+ einfo "please read the procedure explained here:"
+ einfo "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
+}