diff options
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/Manifest.gz | bin | 5356 -> 5356 bytes | |||
-rw-r--r-- | net-proxy/haproxy/Manifest | 16 | ||||
-rw-r--r-- | net-proxy/haproxy/files/haproxy.confd-r1 | 14 | ||||
-rw-r--r-- | net-proxy/haproxy/files/haproxy.initd-r8 | 85 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.2.9999.ebuild | 4 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.4.9999.ebuild | 4 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.5.8.ebuild | 177 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.5.9999.ebuild | 4 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.6.2-r1.ebuild (renamed from net-proxy/haproxy/haproxy-2.6.2.ebuild) | 4 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-2.6.9999.ebuild | 4 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-9999.ebuild | 4 |
11 files changed, 298 insertions, 18 deletions
diff --git a/net-proxy/Manifest.gz b/net-proxy/Manifest.gz Binary files differindex b79e21061923..591f249305d7 100644 --- a/net-proxy/Manifest.gz +++ b/net-proxy/Manifest.gz diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest index 71d6e133f802..0229091fcf77 100644 --- a/net-proxy/haproxy/Manifest +++ b/net-proxy/haproxy/Manifest @@ -1,7 +1,9 @@ AUX haproxy-lua54.patch 3224 BLAKE2B 104a5406ff2fdf0ca031e19acccfa7cbec34bbb3431f36d9160a55a4279420a1e55d9677b37aa3dcca3c968a0ce8aa78961afe10b4becafb6f3d6957d566771c SHA512 b455640c7f40db99f408c2f12b6196ef41aaa1d46cd40206a000ee1c34cf9fa0dcc063501342f7c2e398f99e3600be07d287936abd17beb8d8e16e805d59f5a6 AUX haproxy.confd 610 BLAKE2B 89c6ea0c2f623bbe7aa80a4f42de1d7fb38a2fa6e9edb5b9c758ee1c5140e750fa6be046e4854c94806a609bd3b487f2553bfeafb1db43871032731425b54f59 SHA512 80a6e109432c7e751e9e1063853f73d3269c4c3967728a90cf94230cb32308b396f9f9ad7795b74b919dae4f61e5a29a9ae7badf0908148accbe0e8ca2238913 +AUX haproxy.confd-r1 637 BLAKE2B 5b79a652f0cd124ab9349ceee026c7b54de10c5c4ceccba189c856204fb149b2be667f1bcbd73cb438848d7b34f1ce15812c4fd0e3445b5a6d8c3bd77bdfeda4 SHA512 19cd0dad0fabf579b86c4de74f291e6caf6f5b91d9ae37da2315169dbb75fd35337a7a3e07f4d9e424cfe9776f39952c91f69abd6580c2df16b0d2cc8f3f099a AUX haproxy.initd-r6 1705 BLAKE2B af8b9ad2fcb499d7fec97fe4210af8685a15881aa98634551bad8ec90bd2fe412a7af337fcb5f3ced7715433fb1d98fa175ecb83fa61108802973976109a7c6d SHA512 59693dfb0ae004559e57fb751ebd4abc85a982733699230ff51aa94a2bb7db9875bc63f6a03355b7434448736beb513e923b2ad9c70661f4110e4b2ad2bba753 AUX haproxy.initd-r7 1705 BLAKE2B 6592a149144680d0a0fe124a1c87f26d4a5ef222d1b80bc940f6c8eeaca4cb24c6eb1766b75e1334d3331955c1b7bc65bddc337d7f1ab01813e70ca77e046313 SHA512 1acdd4806539656daf32277d66b1596de4c91ece34a8ec43b4948cf8c95b65ccdea58b152717596659db2c14d63602653e3858a108927fa6091ffae1a5a08d7e +AUX haproxy.initd-r8 1677 BLAKE2B 2bc1d95f5718fd674dbac7f41df07f3d36f83667ffa91de7dea73878af368251ede94b0aed97074b6459a44d2867a69d10b4e4a26ca8a1a4c3e58f68078bbebf SHA512 164fbafeba8475085b7c3c3356f6a39a8c7ae9ed7d602391bd78185a55ed3aa342d5e4d0aa4c4e8f07581ea4299b50614b30808dff6e1f5beec834c55b3bf8a2 DIST haproxy-2.2.17.tar.gz 2933836 BLAKE2B 750d2c5048f994442d13c05ce6624731d296462951ee2e86110467d517a6708b498e98260a3f0770e110dc5c2cb2bdd746fb76f23ba7cebc1642b0b9c8124a67 SHA512 174197e1e0915a6ae6062b9a070f16102ac7f3429f991f36cdb2e2cce587bd26059bd1dc71a368f904bcdecd292ab5926715160400ae96d498d902aac356864f DIST haproxy-2.2.21.tar.gz 2947789 BLAKE2B 3462f0a67070bd61266cc67d7d419dfb9e209314982f2035bdce6b905f9fe567780669adc09905598a6129152dbb77416790976249076935fcb90e7e03767284 SHA512 2404bf0938b88c3249668bef1f13195973c5b1db8dc056ed9d5b882b8cdabf71076b73de723e8d3d0d953193294edea4acac5edeee8ac472e93ae0bd917bf99b DIST haproxy-2.2.24.tar.gz 2952103 BLAKE2B 4e795c06ed329619135d553210e70d1abf57e20a27e857ea26f003cd9fcebba2ea964581fa9d1f33067fb3faa7304806f3a598d2e2b0c08d6c1d4593ad01203c SHA512 021d065e53503248de122fdd9431786b9f375a5f87aca76f870e17e44c8c4001a778bfb4e430b28af781a3f175f3643a549e363e964210c717f212c5966e68d8 @@ -9,18 +11,20 @@ DIST haproxy-2.4.14.tar.gz 3613642 BLAKE2B b45af8f62cefead1f471b0b61e9bc262dc25e DIST haproxy-2.4.17.tar.gz 3623854 BLAKE2B 54797eb6a16a100951ee9e0bb972a7fbdd8ffd22bd1feccdf41743d86ff37b71de54109504ae339007533d41b507b1abb74d8219e4a06320a13e0fce3557b999 SHA512 98d46b6dbafd95977a32a6479266f3b9fe6e6ed57e39182a3d031add60dabfdaa7494083109a75eaa3e4b15d0293b11081f9b06556eee1777ede40ed6c002a7f DIST haproxy-2.5.4.tar.gz 3819082 BLAKE2B fabc62ebaa968a11a49a6dd131198af31a49adbe73bcae82124ca752c2c90c1d77346621c9d804a10bca8ff254580aa7fbaca774f9df1a6a99ec112375d84a50 SHA512 95eb1ad9121a93cc77f0dd14e0080e18935cd45dc7dc511ab6dd0ecbdbb967bbde5eaa83f70157086796603560b979689f7d50b0cfba93d0245544c3a8c28a87 DIST haproxy-2.5.7.tar.gz 3832801 BLAKE2B 6d54135b56f84129dea497ddc935fecf593abccfb21fc647c7d166f9c1aa4abc670c66bf13e0923e353627d83d47345f632ae8212672c3b3da7a757fd5d24d7c SHA512 cf6994508d559401a84e1304c2b6829952a9b3a14365d03436da42ec7e4553c201ffde9e524044dfa48813e8e614d24095a87b0fae7d9145ce5e66b953666ee9 +DIST haproxy-2.5.8.tar.gz 3838130 BLAKE2B fd02c285682815fd1837190b80184e110bb6a37b99dfa30e6cece628e62af6a5a145d97f5849e64364a286593d0ea206506c0b474485b22018a816b899744710 SHA512 99a49556864b178c024e73e5bd45051a7a6e512bbb52906ba6f3888e22a83e2b91198ed1c6a3bcbbc44c474a9ba6a6373fae4216fac8ecdb5d724f281b00fd68 DIST haproxy-2.6.2.tar.gz 3978933 BLAKE2B 8d080b175f574718fac6c58b9681a50d40d8ea4a562a05466668ee9ebe95c065aaa3eab33115c69cca356207f91927c2b949c0ec7d354fdad413ae91a41e60cd SHA512 8eef882145ce8da409d2fbd6fa5b7d383b9d52f8147ef697d61c512c07a8aa8029ae742b5682af5fe736c34398a5265ce9dc189e938f47395cf9e775471b5f55 EBUILD haproxy-2.2.17.ebuild 5356 BLAKE2B 3e66fd23b24ac10f251ca4c0b20b9fc7f51c55a7235ea362b22f71f9e581c36c93dcb4046cc14dcf687669eb64a71e221f7affd9e811cf94361e4e86754fb3bd SHA512 316ba774a164527afb0c56da9fe3433cc3c96becef081388b5756d819e0962d15a61d67388e9776ee194582a1e7dd97105ee58e194c94689047aad38b20509c1 EBUILD haproxy-2.2.21.ebuild 5358 BLAKE2B 74e840c6a726c6c00e26de01e8ed0e9923a7a7623a9984a67a5d2322fe7be38eb26559cce3fc1bcfadeb00246e42c0ed076a2b2662776f596e14a8f9ab1f5d12 SHA512 2049483a3f1eb1907573fcb134d9cfff2b27dc50a45df9025c3e734a1bde76d4cc7f5c0affdf52877889d267b32bb1fcc402dd1f8d9338004e9aac2aac879dd7 EBUILD haproxy-2.2.24.ebuild 5333 BLAKE2B 8814d4213f00ee1a095d88361e4ec82530f29e6b2c616cd5953dbfb2a1a5e286f83c5995e6344e0f49cd1a9b057cc31ab9b68034587ff716e09d97227f1eb4f2 SHA512 359a68d2054f4260d0b375d46e19ba391aee72e6cbe5e51e8c098916b42e229372830668bccf44935eea81f01848d76751df85a00f10de74df0a86785b624490 -EBUILD haproxy-2.2.9999.ebuild 5333 BLAKE2B 8814d4213f00ee1a095d88361e4ec82530f29e6b2c616cd5953dbfb2a1a5e286f83c5995e6344e0f49cd1a9b057cc31ab9b68034587ff716e09d97227f1eb4f2 SHA512 359a68d2054f4260d0b375d46e19ba391aee72e6cbe5e51e8c098916b42e229372830668bccf44935eea81f01848d76751df85a00f10de74df0a86785b624490 +EBUILD haproxy-2.2.9999.ebuild 5336 BLAKE2B d2de168b66696613c932d3ba2dedaa5907ac3f069ffa03dbf133bd0e94907e139e943648215349a41e666d48e1e321de1767741236b82a4e06d17947312bb58a SHA512 fbd6e795ba02e7418bd2af8b103254332db134779e66a6b57ad8ab831ffa9550005948193315c3906e385cc5bbe22372b4c3b2f5733fb690c3c98727df1d6c2e EBUILD haproxy-2.4.14.ebuild 5603 BLAKE2B fe8ce7c4e262f9c7ec28b0409192a4165eaba2beb70eaea23affe3623eb0c977a6402dfca1bc70e48e09441a8918caed2632c63855963799eb8d9cb3b07dbf10 SHA512 2d10f3f0aebc2ca6d8cb0835a5b58a37d74b19850e80be1b819256a330bd1d14666fddcd8f0f80551cd426e015953f44d4cabcf95fccc8b95bae9b7d41f91a97 EBUILD haproxy-2.4.17.ebuild 5624 BLAKE2B 2bb250df90ffe2f545ae3767ba91fbcf435a1fe7403463d2a875454c2d0c871ebf7e1e5572af78f47d2767511fbb70e35c54be50b93073c6a649b985e8c9440d SHA512 262bebe786f159b771fc582cad856620c9b13fcf26204fcf19fb199753d7cd59de29a93e4d97e1a02be1f172ad41e113891fc7b96dd25416397ba8cdd86f47bb -EBUILD haproxy-2.4.9999.ebuild 5578 BLAKE2B 2cf102a86cfe405a0606a6dff4bdd1f386bf78430e42b79115ed9b2d8e5f5b3e6c613f8adbbfd0ea8b09f62086a310057c39bfaabd03848abaa229a1eed6778a SHA512 2b840e45636ce1ad922e4dc9be46e195f3bf566545fe2517f9dd3493d6e3a8eb882ef21edc124b1fd6c13192bbdf1ee24084bcf4d7e629d26e352394f0d60eab +EBUILD haproxy-2.4.9999.ebuild 5581 BLAKE2B 576b060f630da2a0060035868be9960aad9ecefb7205a49725a504e53fa397e800e0ce039d6d70ea771d67927545f73b8729694bd9876003a57e7c8a8e63944b SHA512 02f33f590bce955547b07a7b1963ad8b8e745736dd90d106835e31f83e091ebfb51d27ea6331c330e58b93d6ee82b08875f47e58d4e488b196d7b5d8100b4a8d EBUILD haproxy-2.5.4.ebuild 5603 BLAKE2B fe8ce7c4e262f9c7ec28b0409192a4165eaba2beb70eaea23affe3623eb0c977a6402dfca1bc70e48e09441a8918caed2632c63855963799eb8d9cb3b07dbf10 SHA512 2d10f3f0aebc2ca6d8cb0835a5b58a37d74b19850e80be1b819256a330bd1d14666fddcd8f0f80551cd426e015953f44d4cabcf95fccc8b95bae9b7d41f91a97 EBUILD haproxy-2.5.7.ebuild 5571 BLAKE2B 4a356c40d93c8f3aa2c88cb37bbe541fa897ab0fe0b7bb88302288c7b988d68e08f71a74f63a007b4fe5e701ffd74b44afd40ee8f7574f1d56ddce2259ab858d SHA512 33371bd457ddbfbd4e63d36a08841a1567ecac63cbebbc318fda193b634899deb6471b1c17e235655bd6152138f8360d7ddf1751d578b6e736233d181dde40bd -EBUILD haproxy-2.5.9999.ebuild 5571 BLAKE2B 4a356c40d93c8f3aa2c88cb37bbe541fa897ab0fe0b7bb88302288c7b988d68e08f71a74f63a007b4fe5e701ffd74b44afd40ee8f7574f1d56ddce2259ab858d SHA512 33371bd457ddbfbd4e63d36a08841a1567ecac63cbebbc318fda193b634899deb6471b1c17e235655bd6152138f8360d7ddf1751d578b6e736233d181dde40bd -EBUILD haproxy-2.6.2.ebuild 5570 BLAKE2B a6f86bdfc03906cda6311dcf4e511a914526bfb02f3381d6b84d9b93370514e9b3c7afe996407a0344c745c4956b1b418db44e0c2b84b1f413c272bd3aa91994 SHA512 da2b1aa6336c609ecbc2d0e47d740df3ce5a0dc8b53398e997df970acc3cb970fe36277670dde4973d8cfcdd761a1536da9a43f0f2578a19767d8e048e09aa0c -EBUILD haproxy-2.6.9999.ebuild 5570 BLAKE2B a6f86bdfc03906cda6311dcf4e511a914526bfb02f3381d6b84d9b93370514e9b3c7afe996407a0344c745c4956b1b418db44e0c2b84b1f413c272bd3aa91994 SHA512 da2b1aa6336c609ecbc2d0e47d740df3ce5a0dc8b53398e997df970acc3cb970fe36277670dde4973d8cfcdd761a1536da9a43f0f2578a19767d8e048e09aa0c -EBUILD haproxy-9999.ebuild 5570 BLAKE2B a6f86bdfc03906cda6311dcf4e511a914526bfb02f3381d6b84d9b93370514e9b3c7afe996407a0344c745c4956b1b418db44e0c2b84b1f413c272bd3aa91994 SHA512 da2b1aa6336c609ecbc2d0e47d740df3ce5a0dc8b53398e997df970acc3cb970fe36277670dde4973d8cfcdd761a1536da9a43f0f2578a19767d8e048e09aa0c +EBUILD haproxy-2.5.8.ebuild 5574 BLAKE2B 0745336c121fa432739cc6de7fb16c0ce610adc5b9fe24e4e1e197fefba04bba9a4f53939caf7482335690159beef8e53d1c063e968f7562801e3c4a1d20031c SHA512 5d1fd311ea9bc6c542e525146bcc4fcad608f4602ed5e813e2021da13490c9e05cd9ee7b863ca627bf04c9c7ed1f00da7f00dd5d7e6e463abd54cd226d1a5f8a +EBUILD haproxy-2.5.9999.ebuild 5574 BLAKE2B 0745336c121fa432739cc6de7fb16c0ce610adc5b9fe24e4e1e197fefba04bba9a4f53939caf7482335690159beef8e53d1c063e968f7562801e3c4a1d20031c SHA512 5d1fd311ea9bc6c542e525146bcc4fcad608f4602ed5e813e2021da13490c9e05cd9ee7b863ca627bf04c9c7ed1f00da7f00dd5d7e6e463abd54cd226d1a5f8a +EBUILD haproxy-2.6.2-r1.ebuild 5573 BLAKE2B fce77648e3fde52958f5153b5ce74f57e33a3872b0e72efe9b4ad1eaf04a91467bc634a9e89d5d099d99bea23ef4b99afe3e8830e94726c0864986c6e189205e SHA512 5c14c725a4327f44996ac3d51ac9009602283717ad713f9cca4a4a9ef110af782b6da4f24db52c711d97a3cdfe71c65504e7d76490fc4706034e66743ef722ce +EBUILD haproxy-2.6.9999.ebuild 5573 BLAKE2B fce77648e3fde52958f5153b5ce74f57e33a3872b0e72efe9b4ad1eaf04a91467bc634a9e89d5d099d99bea23ef4b99afe3e8830e94726c0864986c6e189205e SHA512 5c14c725a4327f44996ac3d51ac9009602283717ad713f9cca4a4a9ef110af782b6da4f24db52c711d97a3cdfe71c65504e7d76490fc4706034e66743ef722ce +EBUILD haproxy-9999.ebuild 5573 BLAKE2B fce77648e3fde52958f5153b5ce74f57e33a3872b0e72efe9b4ad1eaf04a91467bc634a9e89d5d099d99bea23ef4b99afe3e8830e94726c0864986c6e189205e SHA512 5c14c725a4327f44996ac3d51ac9009602283717ad713f9cca4a4a9ef110af782b6da4f24db52c711d97a3cdfe71c65504e7d76490fc4706034e66743ef722ce MISC metadata.xml 2063 BLAKE2B ddd51cff72847b617a457ac2baee4dd18a90a6a23e0982bc932ab8d3d101312dc2265884d38fcdc1a1cbb3d982b078e5b03a3c13fce07568d9d477688d210b09 SHA512 2198d3735f32f9c22787b1b43fd59bd6a0018ae25e104ee34ce0f27682ad8d6405a37c1c890b5eb41deabe5a5011d07d379e5df780bd8ab2877bd435bb875a1e diff --git a/net-proxy/haproxy/files/haproxy.confd-r1 b/net-proxy/haproxy/files/haproxy.confd-r1 new file mode 100644 index 000000000000..b9bb84e3e833 --- /dev/null +++ b/net-proxy/haproxy/files/haproxy.confd-r1 @@ -0,0 +1,14 @@ +# HAProxy config file(s), space separated +#CONFIGS="/etc/haproxy/haproxy.cfg" + +# Additional HAProxy command line options +HAPROXY_OPTS="-S /run/haproxy-master.sock" + +# If you want to make use ot the new seamless reload you can just write your own +# reload_seamless function here. It will be called by the init script. +# For more information on how to use that feature please have a look at the +# "seamless_reload.txt" documentation file (requires net-proxy/haproxy[examples]) +#reload_seamless() { +# checkpath -d -m 0700 haproxy:haproxy "/run/haproxy/" +# socat /run/haproxy/socket - <<< "show servers state" > /run/haproxy/global.state +#} diff --git a/net-proxy/haproxy/files/haproxy.initd-r8 b/net-proxy/haproxy/files/haproxy.initd-r8 new file mode 100644 index 000000000000..4994c28b42d5 --- /dev/null +++ b/net-proxy/haproxy/files/haproxy.initd-r8 @@ -0,0 +1,85 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="checkconfig" +extra_started_commands="reload" + +command="/usr/sbin/haproxy" + +pidfile="${HAPROXY_PIDFILE:-/run/${SVCNAME}.pid}" + +configs= + +if [ -z "${CONFIGS}" ]; then + if [ -f "/etc/haproxy/${SVCNAME}.cfg" ]; then + CONFIGS=/etc/haproxy/${SVCNAME}.cfg + elif [ -f "/etc/${SVCNAME}.cfg" ]; then + CONFIGS=/etc/${SVCNAME}.cfg # Deprecated + fi +fi + +for conf in $CONFIGS; do + configs="${configs} -f ${conf}" +done + +command_args="-D -W -p ${pidfile} ${configs} ${HAPROXY_OPTS}" + +depend() { + need net + use dns logger +} + +checkconfig() { + if [ -z "${CONFIGS}" ]; then + eerror "No config(s) has been specified" + return 1 + fi + + for conf in $CONFIGS; do + if [ ! -f "${conf}" ]; then + eerror "${conf} does not exist!" + return 1 + fi + done + + ebegin "Checking ${CONFIGS}" + $command -q -c $configs $HAPROXY_OPTS + eend $? +} + +start_pre() { + if [ "${RC_CMD}" != "restart" ]; then + checkconfig || return 1 + fi +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + checkconfig || return 1 + fi +} + +stop() { + local _t _pid + + _t="$(mktemp)" + for _pid in $(cat ${pidfile}) ; do + echo "${_pid}" > "${_t}" + start-stop-daemon --stop --pidfile="${_t}" + done + rm -f "${_t}" +} + +reload() { + checkconfig || { eerror "Reloading failed, please fix your config(s) first"; return 1; } + + if [ "$(command -v reload_seamless)" = "reload_seamless" ]; then + einfo "Calling user-defined reload_seamless()" + reload_seamless || { eerror "reload_seamless() failed!"; return 1; } + fi + + ebegin "Reloading ${SVCNAME}" + $command $command_args -sf $(cat "${pidfile}") + eend $? +} diff --git a/net-proxy/haproxy/haproxy-2.2.9999.ebuild b/net-proxy/haproxy/haproxy-2.2.9999.ebuild index 4ec0188ead43..954368323612 100644 --- a/net-proxy/haproxy/haproxy-2.2.9999.ebuild +++ b/net-proxy/haproxy/haproxy-2.2.9999.ebuild @@ -124,8 +124,8 @@ src_install() { dosbin haproxy dosym ../sbin/haproxy /usr/bin/haproxy - newconfd "${FILESDIR}/${PN}.confd" ${PN} - newinitd "${FILESDIR}/${PN}.initd-r7" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} doman doc/haproxy.1 diff --git a/net-proxy/haproxy/haproxy-2.4.9999.ebuild b/net-proxy/haproxy/haproxy-2.4.9999.ebuild index a8f7f3e7ffd3..56ad7268073b 100644 --- a/net-proxy/haproxy/haproxy-2.4.9999.ebuild +++ b/net-proxy/haproxy/haproxy-2.4.9999.ebuild @@ -119,8 +119,8 @@ src_install() { dosbin haproxy dosym ../sbin/haproxy /usr/bin/haproxy - newconfd "${FILESDIR}/${PN}.confd" ${PN} - newinitd "${FILESDIR}/${PN}.initd-r7" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} doman doc/haproxy.1 diff --git a/net-proxy/haproxy/haproxy-2.5.8.ebuild b/net-proxy/haproxy/haproxy-2.5.8.ebuild new file mode 100644 index 000000000000..853340e4fcb2 --- /dev/null +++ b/net-proxy/haproxy/haproxy-2.5.8.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +LUA_COMPAT=( lua5-3 ) + +[[ ${PV} == *9999 ]] && SCM="git-r3" +inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} + +MY_P="${PN}-${PV/_beta/-dev}" + +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" +HOMEPAGE="http://www.haproxy.org" +if [[ ${PV} != *9999 ]]; then + SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" +elif [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy.git/" + EGIT_BRANCH=master +else + EGIT_REPO_URI="https://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/" + EGIT_BRANCH=master +fi + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0/$(ver_cut 1-2)" +IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit prometheus-exporter +ssl systemd +threads tools vim-syntax zlib lua 51degrees wurfl" +REQUIRED_USE="pcre-jit? ( pcre ) + lua? ( ${LUA_REQUIRED_USE} ) + ?? ( slz zlib )" + +BDEPEND="virtual/pkgconfig" +DEPEND=" + crypt? ( virtual/libcrypt:= ) + pcre? ( + dev-libs/libpcre2:= + pcre-jit? ( dev-libs/libpcre2:=[jit] ) + ) + ssl? ( + dev-libs/openssl:0= + ) + systemd? ( sys-apps/systemd ) + zlib? ( sys-libs/zlib ) + lua? ( ${LUA_DEPS} )" +RDEPEND="${DEPEND} + acct-group/haproxy + acct-user/haproxy" + +S="${WORKDIR}/${MY_P}" + +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) +EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) + +haproxy_use() { + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" + + usex "${1}" "USE_${2}=1" "USE_${2}=" +} + +pkg_setup() { + use lua && lua-single_pkg_setup + if use net_ns; then + CONFIG_CHECK="~NET_NS" + linux-info_pkg_setup + fi +} + +src_compile() { + local -a args=( + V=1 + TARGET=linux-glibc + # Switching to PCRE2 by default, bug 838013 + PCRE= + PCRE_JIT= + ) + + # TODO: PCRE2_WIDTH? + args+=( $(haproxy_use threads THREAD) ) + args+=( $(haproxy_use crypt LIBCRYPT) ) + args+=( $(haproxy_use net_ns NS) ) + args+=( $(haproxy_use pcre PCRE2) ) + args+=( $(haproxy_use pcre-jit PCRE2_JIT) ) + args+=( $(haproxy_use ssl OPENSSL) ) + args+=( $(haproxy_use slz SLZ) ) + args+=( $(haproxy_use zlib ZLIB) ) + args+=( $(haproxy_use lua LUA) ) + args+=( $(haproxy_use 51degrees 51DEGREES) ) + args+=( $(haproxy_use wurfl WURFL) ) + args+=( $(haproxy_use systemd SYSTEMD) ) + args+=( $(haproxy_use prometheus-exporter PROMEX) ) + + # Bug #668002 + if use ppc || use arm || use hppa; then + TARGET_LDFLAGS=-latomic + fi + + # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) ${args[@]} + emake -C admin/systemd CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) SBINDIR=/usr/sbin + + if use tools ; then + for extra in ${EXTRAS[@]} ; do + if [ "${extra}" = "admin/halog" ]; then + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) ${args[@]} admin/halog/halog + elif [ "${extra}" = "dev/hpack" ]; then + emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB="${ESYSROOT}"/usr/$(get_libdir) ${args[@]} dev/hpack/{decode,gen-enc,gen-rht} + else + # Those two includes are a workaround for hpack Makefile missing those + emake -C ${extra} \ + CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" ${args[@]} + fi + done + fi +} + +src_install() { + dosbin haproxy + dosym ../sbin/haproxy /usr/bin/haproxy + + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} + + doman doc/haproxy.1 + + systemd_dounit admin/systemd/haproxy.service + + einstalldocs + + # The errorfiles are used by upstream defaults. + insinto /etc/haproxy/errors/ + doins examples/errorfiles/* + + if use doc; then + dodoc ROADMAP doc/*.txt + #if use lua; then + # TODO: doc/lua-api/ + #fi + fi + + if use tools ; then + has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog + has admin/iprange "${EXTRAS[@]}" && { newbin admin/iprange/iprange haproxy_iprange; newbin admin/iprange/ip6range haproxy_ip6range; } + has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop + has dev/hpack "${EXTRAS[@]}" && { + newbin dev/hpack/gen-rht haproxy_gen-rht + newbin dev/hpack/gen-enc haproxy_gen-enc + newbin dev/hpack/decode haproxy_decode + } + fi + + if use examples ; then + docinto examples + dodoc examples/*.cfg + dodoc doc/seamless_reload.txt + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/syntax + doins admin/syntax-highlight/haproxy.vim + fi +} + +pkg_postinst() { + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then + ewarn "You need to create /etc/haproxy/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 "${EROOT}/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 " ${EROOT}/usr/share/doc/${PF}" + fi + fi +} diff --git a/net-proxy/haproxy/haproxy-2.5.9999.ebuild b/net-proxy/haproxy/haproxy-2.5.9999.ebuild index 2b772750ef60..853340e4fcb2 100644 --- a/net-proxy/haproxy/haproxy-2.5.9999.ebuild +++ b/net-proxy/haproxy/haproxy-2.5.9999.ebuild @@ -119,8 +119,8 @@ src_install() { dosbin haproxy dosym ../sbin/haproxy /usr/bin/haproxy - newconfd "${FILESDIR}/${PN}.confd" ${PN} - newinitd "${FILESDIR}/${PN}.initd-r7" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} doman doc/haproxy.1 diff --git a/net-proxy/haproxy/haproxy-2.6.2.ebuild b/net-proxy/haproxy/haproxy-2.6.2-r1.ebuild index 5fc0953b5485..6e17e38ddf96 100644 --- a/net-proxy/haproxy/haproxy-2.6.2.ebuild +++ b/net-proxy/haproxy/haproxy-2.6.2-r1.ebuild @@ -119,8 +119,8 @@ src_install() { dosbin haproxy dosym ../sbin/haproxy /usr/bin/haproxy - newconfd "${FILESDIR}/${PN}.confd" ${PN} - newinitd "${FILESDIR}/${PN}.initd-r7" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} doman doc/haproxy.1 diff --git a/net-proxy/haproxy/haproxy-2.6.9999.ebuild b/net-proxy/haproxy/haproxy-2.6.9999.ebuild index 5fc0953b5485..6e17e38ddf96 100644 --- a/net-proxy/haproxy/haproxy-2.6.9999.ebuild +++ b/net-proxy/haproxy/haproxy-2.6.9999.ebuild @@ -119,8 +119,8 @@ src_install() { dosbin haproxy dosym ../sbin/haproxy /usr/bin/haproxy - newconfd "${FILESDIR}/${PN}.confd" ${PN} - newinitd "${FILESDIR}/${PN}.initd-r7" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} doman doc/haproxy.1 diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild index 5fc0953b5485..6e17e38ddf96 100644 --- a/net-proxy/haproxy/haproxy-9999.ebuild +++ b/net-proxy/haproxy/haproxy-9999.ebuild @@ -119,8 +119,8 @@ src_install() { dosbin haproxy dosym ../sbin/haproxy /usr/bin/haproxy - newconfd "${FILESDIR}/${PN}.confd" ${PN} - newinitd "${FILESDIR}/${PN}.initd-r7" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r1" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN} doman doc/haproxy.1 |