public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sebastian Pipping" <sping@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/gatling/files/, www-servers/gatling/
Date: Sun, 27 Aug 2017 20:56:02 +0000 (UTC)	[thread overview]
Message-ID: <1503867333.4221a4e4035cb01ca03fe4ceba8bde369f1806a6.sping@gentoo> (raw)

commit:     4221a4e4035cb01ca03fe4ceba8bde369f1806a6
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 27 20:21:16 2017 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Aug 27 20:55:33 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4221a4e4

www-servers/gatling: 0.15

Also bump EAPI 6, use SSL URLs, and address init script Bashism

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 www-servers/gatling/Manifest              |  1 +
 www-servers/gatling/files/gatling.initd-3 | 63 +++++++++++++++++++++++++++++++
 www-servers/gatling/gatling-0.15.ebuild   | 63 +++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+)

diff --git a/www-servers/gatling/Manifest b/www-servers/gatling/Manifest
index fa8313c8501..d209c348c91 100644
--- a/www-servers/gatling/Manifest
+++ b/www-servers/gatling/Manifest
@@ -1,2 +1,3 @@
 DIST gatling-0.12.tar.bz2 99540 SHA256 ffe4dbff99404eb80e6aac215fdf6bf8174355edc33dd1848a51fc1093296a7c SHA512 50330e92576ce8002acaba9692cb9270ed2d794b1118e697193bd47beadac8ae75a8e2e0b802923172961d74e50cbe114b5e39c083b79a975c0a1bf4c86cab0a WHIRLPOOL 5f16ffff9bfc0e91281833b543c050daaa5fe9f6f419e5a0a3b03f6853cb40468b375df849cfc4b036544131e1cefa97ccdde377629499f0a010cb56add33881
 DIST gatling-0.13.tar.bz2 108128 SHA256 b42145fdf7b66602fa8bc64661c2762172f6d33dbd9d53efebf821cd81e89245 SHA512 b9fa604aa8bb8c5d40d9c3eaaa536ed5e73d0ed93eccb41ca4744316ad893dc6fe92fe2c1f0247de82d4eda63b0ab7ab338355d9963fb58f23d39a2c678a1db8 WHIRLPOOL c9d90bec09cf07bc506bd84491d550834d48e0e3b19b2e7095ab43a4a3cd7a182fc1660d5a5cef878f1e1a7b3d367c5e76efc75df77269ab89d64c73c2af7a59
+DIST gatling-0.15.tar.xz 121804 SHA256 6fa329d0ced0c80deb8dde5460e9d9e984bee94f265043d7fdec0e253dce9aa4 SHA512 b76d220a0644f1e6e7ea966a4eff409964c564fc4a31c4efdb764e5f7b5857bc58c26bc31e860fe35df932cbd60fb2b0f4f21c75cb5aa56427e8a2a453684716 WHIRLPOOL 74d4613ca83500d11e81fc4a59e4a1749d0cac7baf1da16d7cbfb4573e3d94bddd1adc7f563de61942f46dd1e5dc88b19f498182eb63919ff71773ef31a19a38

diff --git a/www-servers/gatling/files/gatling.initd-3 b/www-servers/gatling/files/gatling.initd-3
new file mode 100644
index 00000000000..33c5e5a3095
--- /dev/null
+++ b/www-servers/gatling/files/gatling.initd-3
@@ -0,0 +1,63 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Gatling high performance web server init script"
+extra_started_commands="reload"
+
+depend() { 
+	need net
+}
+
+checkconfig() {
+	# Verify UID is valid for running process.
+	if [ ! "$(id ${GATLING_UID} 2>/dev/null)" ]; then
+		ewarn "User ${GATLING_UID} not found!"
+		return 1
+	fi
+
+	# Set gatling run opts
+	if yesno ${VHOST};then VHOST=-v;else VHOST=-V;fi
+	if yesno ${SSL};then SSL=-e;else SSL=-E;fi
+	if yesno ${DIR_INDEXING};then DIR_INDEXING=-d;else DIR_INDEXING=-D;fi
+	if yesno ${FTP}; then FTP=-f;else FTP=-F;fi
+	if yesno ${FTP_AUTH}; then FTP_AUTH=-l;else unset FTP_AUTH;fi
+	if yesno ${FTP_UP};then unset FTP_UP;else FTP_UP=-U;fi
+        if yesno ${TRANS_PROXY};then TRANS_PROXY=-t;else unset TRANS_PROXY;fi
+}
+
+start() {
+	checkconfig || return 1
+
+	ebegin "Starting gatling"
+	start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \
+--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \
+${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \
+${FTP_AUTH} ${FTP_UPLOADS} 
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping gatling"
+	start-stop-daemon --quiet --stop --pidfile ${PID} 
+	eend $?
+}
+
+reload() {
+        if ! service_started "${SVCNAME}" ; then
+                eerror "${SVCNAME} isn't running"
+                return 1
+        fi
+
+	checkconfig || return 1
+
+	ebegin "Sending gatling the HUP signal"
+	start-stop-daemon --quiet --signal HUP --pidfile ${PID}
+
+	ebegin "Restarting gatling server"
+        start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} \
+--name gatling --exec /usr/bin/gatling -- -T ${HTTP_TIMEOUT} -i ${IP} -p ${PORT} -P ${PREFETCH} \
+${VHOST} -c ${ROOTDIR} ${DIR_INDEXING} ${TRANS_PROXY} -u ${GATLING_UID} ${FTP} -T ${FTP_TIMEOUT} \
+${FTP_AUTH} ${FTP_UPLOADS}
+        eend $?
+}

diff --git a/www-servers/gatling/gatling-0.15.ebuild b/www-servers/gatling/gatling-0.15.ebuild
new file mode 100644
index 00000000000..f2b75dd2546
--- /dev/null
+++ b/www-servers/gatling/gatling-0.15.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="High performance web server"
+HOMEPAGE="https://www.fefe.de/gatling/"
+SRC_URI="https://www.fefe.de/gatling/${P}.tar.xz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="libressl ssl diet"
+REQUIRED_USE="ssl? ( !diet )"
+
+DEPEND=">=dev-libs/libowfat-0.25[diet=]
+	diet? ( dev-libs/dietlibc )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0 )
+		libressl? ( dev-libs/libressl )
+	)"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+	rm Makefile  # leaves us with GNUmakefile
+	epatch "${FILESDIR}/${PN}-0.13-compile.patch"
+	eapply_user
+}
+
+src_compile() {
+	local DIET=
+	use diet && DIET='/usr/bin/diet'
+
+	local targets='gatling'
+	use ssl && targets+=' tlsgatling'
+
+	emake DIET="${DIET}" CC="$(tc-getCC)" \
+			CFLAGS="${CFLAGS} -I${ROOT}usr/include/libowfat" \
+			LDFLAGS="${LDFLAGS}" prefix=/usr ${targets} \
+			|| die "emake ${targets} failed"
+}
+
+src_install() {
+	doman gatling.1 || die "installing manpage failed"
+
+	newconfd "${FILESDIR}/gatling.confd" gatling || die
+	newinitd "${FILESDIR}/gatling.initd-3" gatling || die
+	dodoc README.{ftp,http} || die "installing docs failed"
+
+	dobin gatling || die "installing gatling binary failed"
+	use ssl && {
+		dodoc README.tls || die "installing docs failed"
+		dobin tlsgatling || die "installing tlsgatling binary failed"
+	}
+}
+
+pkg_setup() {
+	ebegin "Creating gatling user and group"
+	enewgroup gatling
+	enewuser ${PN} -1 -1 /var/www/localhost ${PN}
+}


             reply	other threads:[~2017-08-27 20:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 20:56 Sebastian Pipping [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-21 20:56 [gentoo-commits] repo/gentoo:master commit in: www-servers/gatling/files/, www-servers/gatling/ Sebastian Pipping
2020-11-26 15:13 Sebastian Pipping
2022-09-20 19:32 Sam James

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=1503867333.4221a4e4035cb01ca03fe4ceba8bde369f1806a6.sping@gentoo \
    --to=sping@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