summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2011-09-28 15:23:02 +0000
committerChristian Ruppert <idl0r@gentoo.org>2011-09-28 15:23:02 +0000
commit99efce86940a24c17a881e2b12001d8a6876b0eb (patch)
tree2efeef35cfec22a6b9a7672ba207c221fe7f04b2 /net-proxy/haproxy
parentNew version that fixes bug #384535. Removed 0.6.1 (diff)
downloadhistorical-99efce86940a24c17a881e2b12001d8a6876b0eb.tar.gz
historical-99efce86940a24c17a881e2b12001d8a6876b0eb.tar.bz2
historical-99efce86940a24c17a881e2b12001d8a6876b0eb.zip
Improve haproxy init script, bug 384753. Also fix use of deprecated opts variable.
Package-Manager: portage-2.2.0_alpha59/cvs/Linux x86_64
Diffstat (limited to 'net-proxy/haproxy')
-rw-r--r--net-proxy/haproxy/ChangeLog10
-rw-r--r--net-proxy/haproxy/Manifest19
-rw-r--r--net-proxy/haproxy/files/haproxy.initd-r150
-rw-r--r--net-proxy/haproxy/haproxy-1.3.26-r1.ebuild73
-rw-r--r--net-proxy/haproxy/haproxy-1.4.18-r1.ebuild75
5 files changed, 218 insertions, 9 deletions
diff --git a/net-proxy/haproxy/ChangeLog b/net-proxy/haproxy/ChangeLog
index 5177e9ab5d70..9c065f8b7593 100644
--- a/net-proxy/haproxy/ChangeLog
+++ b/net-proxy/haproxy/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-proxy/haproxy
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/ChangeLog,v 1.55 2011/09/21 13:44:51 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/ChangeLog,v 1.56 2011/09/28 15:23:02 idl0r Exp $
+
+*haproxy-1.4.18-r1 (28 Sep 2011)
+*haproxy-1.3.26-r1 (28 Sep 2011)
+
+ 28 Sep 2011; Christian Ruppert <idl0r@gentoo.org> +haproxy-1.3.26-r1.ebuild,
+ +haproxy-1.4.18-r1.ebuild, +files/haproxy.initd-r1:
+ Improve haproxy init script, bug 384753. Also fix use of deprecated opts
+ variable.
21 Sep 2011; Christian Ruppert <idl0r@gentoo.org> haproxy-1.3.25.ebuild,
haproxy-1.3.26.ebuild, -haproxy-1.4.8.ebuild, haproxy-1.4.15.ebuild,
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
index 29cb89ea19a9..030fa1768af0 100644
--- a/net-proxy/haproxy/Manifest
+++ b/net-proxy/haproxy/Manifest
@@ -2,24 +2,27 @@
Hash: SHA256
AUX haproxy.initd 948 RMD160 a2be74ba6c0672544e4f90ff28b3671e3493a7d3 SHA1 3d003a7f2d1bbb078ca6e51d2588605f0c4700a7 SHA256 4ffccbd0e635ba89235561669cab9e9d4cd8f13e1d8028213c08e9123f092628
+AUX haproxy.initd-r1 1129 RMD160 08d281a92820dc424fc3259cc7f915ca682d7d1d SHA1 f7a309acde899b0afb953380b74b63a61713515b SHA256 9f3ee5b09133d206bb1f82038af867eb5797d8ec82fc67ab912cdbae0c8155f1
DIST haproxy-1.3.25.tar.gz 662198 RMD160 54fac52224e5e1a32d19c4e8b5da92e1ee6ed6ff SHA1 08fcc1f881514cb8ded801890743af29b93d5d30 SHA256 50dbe7b515c32a643b7caaac32ec3152ba536e589242e4d50ff42618a85f5a78
DIST haproxy-1.3.26.tar.gz 668337 RMD160 f11286cef16eb3c9e29d09da3293316957226843 SHA1 4a93bcf6bcd48969fa44ac8081ce7a8baf518e17 SHA256 ab97d7f524b8c816c2b42b99d63691c819a32fe593c22242dad3108c7f85f274
DIST haproxy-1.4.15.tar.gz 812293 RMD160 1a5e3e5c4ea71e4d439ffc4b221e31ae90d04f88 SHA1 8c42bc8c7d3714061b6fb74b0e3565d1e672556f SHA256 4baebfe0a5a9220f77d9175b2e711dc8985bbb696d11c38033cc0e94e3cca93a
DIST haproxy-1.4.18.tar.gz 820427 RMD160 16729f0519a47123d88e849ae95d600c590c8583 SHA1 191dbcb5880c711580693bd081ca5fdd8dde3012 SHA256 ec2b6222a34d11f97cf7cf5cc696080dac34e94deb8e6cf3822b27442e0793fa
EBUILD haproxy-1.3.25.ebuild 2114 RMD160 a659cb1b4b5363587dcff5b0110d6e70de9fba6b SHA1 2459ba284afeb6e1b5fa7c9b48e1832dd7105aa4 SHA256 f1c490d64addccb658b225e4c8ff94d0537ef5411c96309d3fa820a5f14dc88b
+EBUILD haproxy-1.3.26-r1.ebuild 2123 RMD160 6c18aa1b1390c6cd4ff68535d829a658f9c12214 SHA1 53463d39424a2d8648f9423b554135cf889f5604 SHA256 a333a4ca4590fe954c7875335b38a326d15469cdb32c28bfc20937daa31c83c3
EBUILD haproxy-1.3.26.ebuild 2117 RMD160 53403476cc28b297f6fdeaea0334175a2b743d96 SHA1 bfd80e37e59e2d8898722625d7928c58c2953c38 SHA256 b6f22a2176dcd70305e6a5e41d1f76ac7a70d611e10bd09fa6ce2bd40fdd081e
EBUILD haproxy-1.4.15.ebuild 2125 RMD160 46aae9d007aeb5f85073a158048fcb7041714fcb SHA1 ed62ad19e94f15cb72a4adcb50ebdbb122861c62 SHA256 e3d93b9bf710b0b354d2e8081a404aebbf64a31b573927949baec1f503fd1fef
+EBUILD haproxy-1.4.18-r1.ebuild 2133 RMD160 77a11c8e259c8e35902e259de60a21ace9edc0d3 SHA1 410a4a65240a2468dac0f30da877885b584fe51b SHA256 c3c7f742341f210343be7063b08760a92c9f72f7769bc71ec3436c4de5dc7b6f
EBUILD haproxy-1.4.18.ebuild 2127 RMD160 1847e9cde0979b4cc3d3217db77cc610c95cceea SHA1 0f7f1988a44a00a0ca21f26adc7c9c96fd045c79 SHA256 99741767f4276f699dcc7c89354fe7b36650afc944626988e28f7fbd6a325d12
-MISC ChangeLog 10290 RMD160 8c928bcc8d799b3a53ee5a57343b926a372ed2ad SHA1 670c668f92fc1d3c85edf06eac865ac58d8a8707 SHA256 ce5cd53196fa63e36edf3784054db3c9b53f6cfcf420bcd67cc52f40160a48a5
+MISC ChangeLog 10578 RMD160 87de34aa1bfc3db5f97c224e237f7e03c8367a78 SHA1 81715c62db434101f760de512417a3cbd9b7bee8 SHA256 cb2e276331888a1a5682d6adf43fa41a5909b8dba39b27a1a39f6730fb6079b5
MISC metadata.xml 1450 RMD160 1e354be32e3ed9cbd5cd2b1aadbb9dd7772cd526 SHA1 035780ecce98f5856301af6e1633e11ce2bb5e8c SHA256 0797818620feed90cb3481805f66448e3a32afa5f981a95e45e0b0535fbc1cf4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iQEcBAEBCAAGBQJOeepaAAoJEMOx0zmdw4Z1H/IIAL6q/E0vw/eHTC+9XJ8CjZBt
-E0Bq2njda5DhdmoFeqV7X+DIKsM6seBbN/R9ti5gusDa58hz+Pgy/hbwkjvyKBW/
-QPCaAPCs8gYTSpI8XJSKGQXo1/SoT0zdat1u/fh3bJ6pML27JZoMgn0jQn2fEvet
-EhuR3cyAJ2EpD4pSpiq+iu0kTwjlF7UZatpXtO4IXLcIXlQvPH4YI10HUlDvgEan
-hklN3LBCev+cyPUZpUMHhLs2Kh6Azm7NmlsDj/Npg6XRxZOnPfoWVHZqfvXJ4h1l
-vLuu6T8FcM1t1HlTcM5CHciDb6zsadn1vZ7Mrz3ez+y95gLAnWgu6XEWSJJEXRI=
-=ygc+
+iQEcBAEBCAAGBQJOgzvbAAoJEMOx0zmdw4Z18NQIAIlwmDZP7rTCtFEOM4k7df1h
+IZ7bHn3fvyhWDYqVGafuLftpQQE4lkxgTr8VjDh0PxsHaBceWdxKrs0t9qVX2I//
+4frmscZoU0C+XA0Pnxp5CJWXRIiJ2gn8TAMaZUQWu31D1VGQRTjP4yxZHQcNvJm2
+BNVxx+7qpzPi0Y7IIgwvLGZjYlQq940UAs9Yk8uO7qL7qKi4/R8MWpj5SgFyosYE
+/jUHKrnS+3AcOpC9pihyyiVD6d6PYIotxidyQyhzPhL/vhl32nM/hELrYV7ZU0va
+sYvM7z6jD/71UIJq1EaWCYfPmQLSig/uPXFPhkUWeVtRHt+gQUNf6kDCAvqwX6c=
+=sppu
-----END PGP SIGNATURE-----
diff --git a/net-proxy/haproxy/files/haproxy.initd-r1 b/net-proxy/haproxy/files/haproxy.initd-r1
new file mode 100644
index 000000000000..7edf5e6bc27e
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy.initd-r1
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/files/haproxy.initd-r1,v 1.1 2011/09/28 15:23:01 idl0r Exp $
+
+extra_commands="checkconfig reload"
+
+CONFFILE=/etc/${SVCNAME}.cfg
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "${CONFFILE} does not exist!"
+ return 1
+ fi
+
+ ebegin "Checking ${CONFFILE}"
+ /usr/bin/haproxy -q -c -f "${CONFFILE}"
+ eend $?
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --pidfile "${PIDFILE}" --exec /usr/bin/haproxy \
+ --start -- -D -p "${PIDFILE}" -f "${CONFFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+
+ if [ "${RC_CMD}" = "restart" ]; then
+ checkconfig || return 1
+ fi
+
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ checkconfig || { eerror "Reloading failed, please fix your ${CONFFILE} first"; return 1; }
+ /usr/bin/haproxy -D -p "${PIDFILE}" -f "${CONFFILE}" -sf $(cat "${PIDFILE}")
+ eend $?
+}
diff --git a/net-proxy/haproxy/haproxy-1.3.26-r1.ebuild b/net-proxy/haproxy/haproxy-1.3.26-r1.ebuild
new file mode 100644
index 000000000000..cd6d6a604def
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.3.26-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/haproxy-1.3.26-r1.ebuild,v 1.1 2011/09/28 15:23:02 idl0r Exp $
+
+inherit eutils versionator toolchain-funcs flag-o-matic
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="examples pcre vim-syntax"
+
+DEPEND="pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_compile() {
+ local args="TARGET=linux26"
+
+ use pcre && args="${args} USE_PCRE=1"
+
+ use kernel_linux && args="${args} USE_LINUX_SPLICE=1"
+ use kernel_linux && args="${args} USE_LINUX_TPROXY=1"
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} || die
+}
+
+src_install() {
+ dobin haproxy || die
+ newinitd "${FILESDIR}/haproxy.initd-r1" haproxy || die
+
+ # Don't install useless files
+ rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP TODO doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ if use examples;
+ then
+ docinto examples
+ dodoc examples/*.cfg || die
+ fi
+
+ if use vim-syntax;
+ then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${ROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.4.18-r1.ebuild b/net-proxy/haproxy/haproxy-1.4.18-r1.ebuild
new file mode 100644
index 000000000000..8363d6118a4b
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.4.18-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/haproxy/haproxy-1.4.18-r1.ebuild,v 1.1 2011/09/28 15:23:02 idl0r Exp $
+
+EAPI="3"
+
+inherit eutils versionator toolchain-funcs flag-o-matic
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="examples pcre vim-syntax"
+
+DEPEND="pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_compile() {
+ local args="TARGET=linux26"
+
+ use pcre && args="${args} USE_PCRE=1"
+
+ use kernel_linux && args="${args} USE_LINUX_SPLICE=1"
+ use kernel_linux && args="${args} USE_LINUX_TPROXY=1"
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} || die
+}
+
+src_install() {
+ dobin haproxy || die
+ newinitd "${FILESDIR}/haproxy.initd-r1" haproxy || die
+
+ # Don't install useless files
+ rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP TODO doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ if use examples;
+ then
+ docinto examples
+ dodoc examples/*.cfg || die
+ fi
+
+ if use vim-syntax;
+ then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${ROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}