From: "Patrice Clement" <monsieurp@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-misc/shellinabox/
Date: Tue, 31 Jan 2017 13:01:31 +0000 (UTC) [thread overview]
Message-ID: <1485867688.2d30d59f0307cc388e91fa5945927559f3241728.monsieurp@gentoo> (raw)
commit: 2d30d59f0307cc388e91fa5945927559f3241728
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 31 12:55:34 2017 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 13:01:28 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d30d59f
www-misc/shellinabox: turn openssl into a hard dependency and remove ssl USE flag.
dev-libs/openssl:0= previously was an optional dependency available through a
USE flag but it turns out shellinabox cannot be compiled with SSL support
disabled. let's remove the "ssl" USE flag and turn dev-libs/openssl into a hard
dependency.
Gentoo-Bug: https://bugs.gentoo.org/607528
Package-Manager: portage-2.3.3
www-misc/shellinabox/shellinabox-2.20-r1.ebuild | 108 ++++++++++++++++++++++++
1 file changed, 108 insertions(+)
diff --git a/www-misc/shellinabox/shellinabox-2.20-r1.ebuild b/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
new file mode 100644
index 00000000..4e0bfce
--- /dev/null
+++ b/www-misc/shellinabox/shellinabox-2.20-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2017 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="+pam"
+
+DEPEND="
+ 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
+ --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 files
+ 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
+}
next reply other threads:[~2017-01-31 13:01 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 13:01 Patrice Clement [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-05 15:14 [gentoo-commits] repo/gentoo:master commit in: www-misc/shellinabox/ Patrice Clement
2020-07-31 4:00 Sam James
2020-07-29 23:41 Sam James
2020-07-23 14:18 Sam James
2020-02-29 14:44 Mikle Kolyada
2019-12-22 4:48 Craig Andrews
2019-12-12 12:53 Patrice Clement
2019-12-12 9:11 Patrice Clement
2019-12-11 20:40 Patrice Clement
2019-10-12 21:37 Mikle Kolyada
2017-05-20 13:38 Patrice Clement
2017-05-20 10:14 Patrice Clement
2017-05-20 10:14 Patrice Clement
2017-05-18 15:22 Michael Weber
2017-05-18 12:39 Agostino Sarubbo
2016-11-23 15:53 Patrice Clement
2015-12-31 17:40 Patrice Clement
2015-12-25 18:19 Agostino Sarubbo
2015-12-22 0:27 Patrice Clement
2015-12-19 7:39 Jeroen Roovers
2015-12-09 10:47 Agostino Sarubbo
2015-12-07 11:38 Patrice Clement
2015-12-03 13:28 Agostino Sarubbo
2015-11-27 1:16 Patrice Clement
2015-11-25 8:54 Agostino Sarubbo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1485867688.2d30d59f0307cc388e91fa5945927559f3241728.monsieurp@gentoo \
--to=monsieurp@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox