diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2013-03-11 10:45:03 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2013-03-11 10:45:03 +0000 |
commit | bf8c00620b76c0acc91116c5d0a0215467f2cec5 (patch) | |
tree | 9362d0df5c676b2cfedb2a074f9726fe0f0d3498 /net-misc/ucarp | |
parent | leave to dotnet (diff) | |
download | historical-bf8c00620b76c0acc91116c5d0a0215467f2cec5.tar.gz historical-bf8c00620b76c0acc91116c5d0a0215467f2cec5.tar.bz2 historical-bf8c00620b76c0acc91116c5d0a0215467f2cec5.zip |
Revision bump for new init.d/conf.d-scripts written from scratch by Christian Affolter for the FOSS-Cloud project, fixes bug #208156.
Package-Manager: portage-2.1.11.54/cvs/Linux x86_64
Manifest-Sign-Key: 0x1E0CA85F!
Diffstat (limited to 'net-misc/ucarp')
-rw-r--r-- | net-misc/ucarp/ChangeLog | 12 | ||||
-rw-r--r-- | net-misc/ucarp/Manifest | 23 | ||||
-rw-r--r-- | net-misc/ucarp/files/ucarp.confd | 30 | ||||
-rw-r--r-- | net-misc/ucarp/files/ucarp.initd | 58 | ||||
-rw-r--r-- | net-misc/ucarp/files/vip-down-default.sh | 7 | ||||
-rw-r--r-- | net-misc/ucarp/files/vip-up-default.sh | 7 | ||||
-rw-r--r-- | net-misc/ucarp/ucarp-1.5.2-r2.ebuild | 48 |
7 files changed, 181 insertions, 4 deletions
diff --git a/net-misc/ucarp/ChangeLog b/net-misc/ucarp/ChangeLog index 6d3f4d53563b..744b6aa431b2 100644 --- a/net-misc/ucarp/ChangeLog +++ b/net-misc/ucarp/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/ucarp -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/ucarp/ChangeLog,v 1.20 2012/12/16 13:47:24 ago Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/ucarp/ChangeLog,v 1.21 2013/03/11 10:45:02 dev-zero Exp $ + +*ucarp-1.5.2-r2 (11 Mar 2013) + + 11 Mar 2013; Tiziano Müller <dev-zero@gentoo.org> +files/ucarp.confd, + +files/ucarp.initd, +files/vip-down-default.sh, +files/vip-up-default.sh, + +ucarp-1.5.2-r2.ebuild: + Revision bump for new init.d/conf.d-scripts written from scratch by Christian + Affolter for the FOSS-Cloud project, fixes bug #208156. 16 Dec 2012; Agostino Sarubbo <ago@gentoo.org> ucarp-1.5.2-r1.ebuild: Stable for x86, wrt bug #441486 diff --git a/net-misc/ucarp/Manifest b/net-misc/ucarp/Manifest index 71622da65b1a..561b823f6dc7 100644 --- a/net-misc/ucarp/Manifest +++ b/net-misc/ucarp/Manifest @@ -1,8 +1,27 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX ucarp.8 6311 SHA256 18a7178c1362d514d8bacb56eb4c89d3987f936397a1dec72376e16179a7fe8b SHA512 4aab5f072663501e90a504e47e30c7cf3a89c6996addb6a23c7d0b3688688141f90d6134c79d2746fef1934a63588723bafb375777b2a12a6715257681baf28f WHIRLPOOL c83a3231dd15cd277c6833c9f7aa871136bbf2b12914c160568df45b8ff8b4b6cf8721672b0df0c52eee687d742730900761fef6b148721465d6a52aef52ebeb -DIST ucarp-1.3.tar.gz 226575 SHA256 c295479da930cf5627ac0d6af45dac3934fa7633f40c163a86b1fd28feb93aba +AUX ucarp.confd 880 SHA256 234ce139aef7b7c24ad7ab7d9901c65e602180bc7bbdba06bb36ffa9379fcfab SHA512 e72594f6292dcc4e17c13c07f12d5cd9ef791ea91ee2c22d5023d0aa574990b6ec6c6714dc45d678ba70ec8395790cd80272a8a57adbd8c735f296e580a298a1 WHIRLPOOL b2b6cdcc7edcc8f73c052e75ce835216b1c06fa2214828a180d20dac7b0189e602f2987c8274e01bf7741b251c17204e3f959c495df535d6eabd2292a5fcb986 +AUX ucarp.initd 1988 SHA256 1c51e001f81fc432e7da039b1ce784b628dc5f0490af1c96fd7fb572e60a0516 SHA512 cf98d4e61c5620b5fac2070279addcf19fabb5d306ecc7ad9bb2143ff0b3016b2e77f90debfa1bf2b14314be0fe662adc9f7e8cc6f3d0e4643d5553ae09f88c1 WHIRLPOOL e568c402a552b607bf3c0094bd17a87dddc1c947f495571bd583eace55282df762c4d9c474f4477a226b03db52960f8dfb1225635ec2c2bd01f18e31c142c839 +AUX vip-down-default.sh 119 SHA256 864b62a05eadf0b1bcd097d31803ba019ad5e6e8e3776bd38c56e073ab4b7f00 SHA512 026988d259ab07568995e0609ee0b22245abcf26c65e7c3ddeea8efc801a78eb2796e7423c52731b8070db99e410db4de8217d0a3b7b8681d399fef25c64e56f WHIRLPOOL 1e77c2af43769fbbb0de7f9d5f1baffe9186b635710c9fd59f46b39a36f5926334460942be3e9963c05dc256adbe87fbef6ae26d7705a53850747c9853bab346 +AUX vip-up-default.sh 132 SHA256 41cdfdf20f802dcdf7bed9206752d9f232fdc47891ee5103a10a8344131a555f SHA512 4db8a047c39671578d0fa0e0dfadf3ce6e4f5881a85811c5c8e986f26c97b5de64cc58578cd77ba9ee93e2c6659b178c69575d3006934da56736441c30c703ce WHIRLPOOL 0ee0c3d448244ce358a99667b5157d9b567d6a2c947ab5b2bee3eca4534a19be3e1d1c63e0d881026155dbf8b86b0e9a4192274ac28d6f10a0af3f39d42ce365 +DIST ucarp-1.3.tar.gz 226575 SHA256 c295479da930cf5627ac0d6af45dac3934fa7633f40c163a86b1fd28feb93aba SHA512 5a601d6c7edb87692847d0485dc223b7ccc738a417320875894f68d67ae38d23679e70fafd97dbf646b8418de2b09d393fcded532419cc1436e5fe8758c6cc32 WHIRLPOOL 0944024b091240f14eb9d2707ad7b62ff36bf5483e2c0dac30027f75d6ba53994be7ce8ac7b7f7ecc8dc38b152234da9ff22985e72a1ed5a12943d306d649b68 DIST ucarp-1.5.2.tar.gz 429089 SHA256 f3cc77e28481fd04f62bb3d4bc03104a97dd316c80c0ed04ad7be24b544112f3 SHA512 568ff2061e59d314c72a160ccb42eb099bf7cdf04bc30f405b5b62322dff3ceb4fa037c2b430fdb4cee25f0dcacf9309a15bd814b4b70b640840400bda20b253 WHIRLPOOL b763e7c7023f1364e735baf2df2855bd6bbbbd937267c1a411da22b2ad109b01807f8f7c798662ed0e86f1137a1c8a9ed601eb2a3242a444ba5560d8f47bc285 EBUILD ucarp-1.3.ebuild 719 SHA256 478c83d0e157d7c3ad0ea388838adc4cc778e03d028d4fbf4ec1b9aadaac2f2f SHA512 9614aa4fafe1757cb54f35c7b33eec5a399aa0ed1e5c1498b399d27500d234aba4f41009fcc289f9893d505886621cbcfd30cfbe2e3111e23181aec0dd9d6300 WHIRLPOOL b2c800fab1a1126b17b2c18e646f0a84b0cfd801ea79ce66bd5fba0e7a86292bc770362494ebaf85dbbdf7bf62927492f1e48b4fbdcdd331d86f490cd71ab02a EBUILD ucarp-1.5.2-r1.ebuild 806 SHA256 bf784226d8ca96076cfa574831320486ff2bcd316a8dfcb4e407208daa3127ba SHA512 2da198dfd34aa00dbf520f1e16111a45e65ceb86b7ca37750173cb550d5e194a525ce7b79bc2737775668fdcb1d08f31db7a340fff3f4f7f22b9c434b55987f1 WHIRLPOOL ebf3b2cfe30d53ff0a77eb4bf93ad4035b5e973f108fb2ad2e6f38c977e486f30271bc7153ea654b99869225f96e953a7dd4384d7a78606f417185f687a88f10 +EBUILD ucarp-1.5.2-r2.ebuild 1359 SHA256 29dd23d02039ac2201e8869232fa15ad2a71f943ce961e93837071ebf7ce6502 SHA512 9d4005db9a293ea9f4d816def2e1c5a5a468a115911731905bd4a7b9c3381f4432e247285b23739a506443cadbee8a500e0307d680205f14d00697628f2d4969 WHIRLPOOL e9c64884692de86d13d4bd9460806ac80fae5e7af68eea11949484f2a0521e21f4064cdf1515a2ed53b49ab8f2375b53daed182d23dca73a6e251502baaad547 EBUILD ucarp-1.5.2.ebuild 712 SHA256 a1251027a9cba40fa6bb693d67111e2b2556561cefdd9aa4253922eafb3eee68 SHA512 1e94abb40dcb728fdb4659371bab61dd8951a58bf8b93e44975c5f08876f136bcc514772d65d73e14ca1387271c1cb028f789bebba615ac65ca15c91ad4a9c0d WHIRLPOOL a7783731c0153a6abdf58882ec71d15682a8c1421a277749c2d278e816b5fd0e0bd80c3d7e05ad73636dd5a2bc7c63946e02f2da052b02caf3c8741e5c72fb32 -MISC ChangeLog 3027 SHA256 0b91b6a074a123524ce74308fbbc96f41b7176131eae78778a2bf5f3cec39295 SHA512 09a0584c2070136470a70523bedd8123ae5339aa8fe0df9ed9123cd181c73485bfdd6a1b3029be68e0c706696b70c0fefed4da546ea95547414f1d44ef85a9c2 WHIRLPOOL 5e51f2125d87d5b0241539e708ceb1abb5602c5c46b41d554ed41e08cd101c3a38c0880d50ea08b752fe7c0328cc84a5e0d71eb3e3f36bd6f06e08a09756c3cb +MISC ChangeLog 3377 SHA256 fde7ca6ea7001676edc5ad578c98a18da1c2b1179787319fcb8d422752dc2eab SHA512 36969bb4ce6dcf6e13aef31c70be6b77a988b0505dc81fe2cc9cde0946cd85f0fdda8d9109737aa1d396c5c99005b57affd85618e6f913646331a412f4373f21 WHIRLPOOL 5080db4a40522daf8e31225640cc8740845d3afeb6dc86a57b1d5ebad6f5a934298a5887951c24b8c6e29b0703101912200f6522a0d9e75268e474caa466b514 MISC metadata.xml 160 SHA256 56717bdb03ad5d833acecfbc612a67f569256b328bf610fbc6cc33714186dae9 SHA512 83001424d846619d2551025541359bae52ff22cfbbce0d2beef47b085c937ee44eeb267493486451403905151e3a66db2f5fb1a1d072bf03e598146df9af02e8 WHIRLPOOL 1d4572f178726ad1e060380478c630fc46fb641eed12408419df7bbf3b9331a92514bb970e798877e01313571eb7af5aaee9b98182ea93a4a1d7c644fe2598b0 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iQEcBAEBCAAGBQJRPbWvAAoJEB58/HceDKhfCX0IAIi7tBlrlYkHdB52UI+iIYpR +x7hEyhaRUvquYAOCAXvSMJEmq1IVjqeEYcdJSLPuEYXTFeG2peKTlMIRb78ZS8HL +H8FE0QjoUGv4ZkkSEHBbEdp+V/aJQZUQzZmVENqRuTQcXWLlpNwpqitHXQYaspKl +y5E70cVNSoPYVYEVP1lE0GSbEQ4YSatS4BCXmWIoXVrGI8QciYc68vojbKX6aoyb +YtEg6BG4iWudOyrLywXL7AukF07cl02YIAOLhrYtHws98jcw9HYAGuE642ryLlvh +Kbq5rcGEnZoxMuOJi+El5o/FOd2l+0hSshjHNi7awOu/iCk7rlKwr3JZ9fV86zI= +=NnrC +-----END PGP SIGNATURE----- diff --git a/net-misc/ucarp/files/ucarp.confd b/net-misc/ucarp/files/ucarp.confd new file mode 100644 index 000000000000..1a8cdb156973 --- /dev/null +++ b/net-misc/ucarp/files/ucarp.confd @@ -0,0 +1,30 @@ +# /etc/conf.d/ucarp: config file for /etc/init.d/ucarp + +# The network interface to bind to, for example 'eth0' +UCARP_INTERFACE= + +# The persistent source address, (real IP), associated with this interface. +UCARP_SOURCEADDRESS= + +# The IP address of the virtual server. +UCARP_VIRTUALADDRESS= + +# The prefix length of the virtual server IP address +# For example 24 for a netmask of 255.255.255.0 +UCARP_VIRTUALPREFIX= + +# The id of the virtual server [1-255]. +UCARP_VHID=123 + +# File to read the shared password from. +UCARP_PASSFILE=/etc/ucarp/ucarp.pass + +# Specifies the command to run after ucarp has successfully become master. +UCARP_UPSCRIPT=/usr/libexec/ucarp/vip-up-default.sh + +# Specifies the command that is run after ucarp has transitioned to the backup +# state. +UCARP_DOWNSCRIPT=/usr/libexec/ucarp/vip-down-default.sh + +# Additional ucarp options to pass +UCARP_OPTS="--shutdown" diff --git a/net-misc/ucarp/files/ucarp.initd b/net-misc/ucarp/files/ucarp.initd new file mode 100644 index 000000000000..0ca86e408130 --- /dev/null +++ b/net-misc/ucarp/files/ucarp.initd @@ -0,0 +1,58 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/ucarp/files/ucarp.initd,v 1.1 2013/03/11 10:45:02 dev-zero Exp $ + +description="UCARP is a portable implementation of the CARP protocol" +description_logstatus="Logs the status of ${SVCNAME} to syslog" +description_demote="Demotes ${SVCNAME} from master to backup" + +extra_started_commands="logstatus demote" + +command="/usr/sbin/ucarp" +command_args="--interface=${UCARP_INTERFACE} \ + --srcip=${UCARP_SOURCEADDRESS} \ + --vhid=${UCARP_VHID} \ + --passfile=${UCARP_PASSFILE} \ + --addr=${UCARP_VIRTUALADDRESS} \ + --upscript=${UCARP_UPSCRIPT} \ + --downscript=${UCARP_DOWNSCRIPT} \ + --xparam=${UCARP_VIRTUALPREFIX} \ + ${UCARP_OPTS}" + +pidfile="/var/run/${SVCNAME}.pid" +command_background="yes" + +required_files="${UCARP_PASSFILE} ${UCARP_UPSCRIPT} ${UCARP_DOWNSCRIPT}" + +depend() { + need net + use logger +} + +start_pre() { + local required_vars='UCARP_INTERFACE UCARP_SOURCEADDRESS UCARP_VHID + UCARP_PASSFILE UCARP_VIRTUALADDRESS UCARP_UPSCRIPT + UCARP_DOWNSCRIPT UCARP_VIRTUALPREFIX' + + local config_var='' + for config_var in $required_vars; do + if test -z "$(eval echo \$$config_var)"; then + eerror "Missing or empty config variable '$config_var'" + ewarn "You have to edit /etc/conf.d/${SVCNAME} first" + return 1 + fi + done +} + +logstatus() { + ebegin "Logging status of ${SVCNAME} to syslog" + start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}" + eend $? +} + +demote() { + ebegin "Demote ${SVCNAME} from master to backup" + start-stop-daemon --signal SIGUSR2 --pidfile "${pidfile}" + eend $? +} diff --git a/net-misc/ucarp/files/vip-down-default.sh b/net-misc/ucarp/files/vip-down-default.sh new file mode 100644 index 000000000000..cf5bfe5ce3a1 --- /dev/null +++ b/net-misc/ucarp/files/vip-down-default.sh @@ -0,0 +1,7 @@ +#! /bin/sh +exec 2> /dev/null + +/sbin/ip addr del "$2"/"$3" dev "$1" + +# or alternatively: +# /sbin/ifconfig "$1":254 down diff --git a/net-misc/ucarp/files/vip-up-default.sh b/net-misc/ucarp/files/vip-up-default.sh new file mode 100644 index 000000000000..763a56170a85 --- /dev/null +++ b/net-misc/ucarp/files/vip-up-default.sh @@ -0,0 +1,7 @@ +#! /bin/sh +exec 2> /dev/null + +/sbin/ip addr add "$2"/"$3" dev "$1" + +# or alternatively: +# /sbin/ifconfig "$1":254 "$2" netmask "$3" diff --git a/net-misc/ucarp/ucarp-1.5.2-r2.ebuild b/net-misc/ucarp/ucarp-1.5.2-r2.ebuild new file mode 100644 index 000000000000..6aced2e323c6 --- /dev/null +++ b/net-misc/ucarp/ucarp-1.5.2-r2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/ucarp/ucarp-1.5.2-r2.ebuild,v 1.1 2013/03/11 10:45:02 dev-zero Exp $ + +EAPI="5" + +DESCRIPTION="Portable userland implementation of Common Address Redundancy Protocol (CARP)." +HOMEPAGE="http://www.ucarp.org" +SRC_URI="ftp://ftp.ucarp.org/pub/ucarp/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="nls" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +src_configure() { + econf $(use_enable nls) +} + +src_install() { + default + + doman "${FILESDIR}"/ucarp.8 + + exeinto /usr/libexec/ucarp + doexe "${FILESDIR}"/vip-up-default.sh + doexe "${FILESDIR}"/vip-down-default.sh + + keepdir /etc/ucarp + + newinitd "${FILESDIR}"/ucarp.initd ucarp + newconfd "${FILESDIR}"/ucarp.confd ucarp +} + +pkg_postinst() { + elog "The provided init script needs to be configured first." + elog "Edit /etc/conf.d/ucarp to suite your environment." + elog "You will also have to set a shared password within /etc/ucarp/ucarp.pass" + elog "or whatever file you have set \$UCARP_PASSFILE to." + + elog "If you need more than one instance of ucarp running, simply symlink" + elog "the init script and create a copy of the init script configuration" + elog "which corresponds to the name of the init script." +} |