diff options
Diffstat (limited to 'net-misc/radvd')
-rw-r--r-- | net-misc/radvd/Manifest | 2 | ||||
-rw-r--r-- | net-misc/radvd/files/radvd-2.19.init | 83 | ||||
-rw-r--r-- | net-misc/radvd/radvd-2.19-r7.ebuild | 76 |
3 files changed, 161 insertions, 0 deletions
diff --git a/net-misc/radvd/Manifest b/net-misc/radvd/Manifest index 7d4b917076d9..a4d605232ee5 100644 --- a/net-misc/radvd/Manifest +++ b/net-misc/radvd/Manifest @@ -2,9 +2,11 @@ AUX radvd-2.15.init 1537 BLAKE2B 6ca0db1eeeee77c345e4a5d9ee75d4e4fac188e3e19b153 AUX radvd-2.19-clang16.patch 1928 BLAKE2B 474ecc1ead26d8f48d3fbf3717f344e6dbb2dfbaa0bd4327d9ee2cf0141aacdaf286ed1eba8092bb94e47224bbf3204f208367fa86fcf4fdaa2361cbfa296e1d SHA512 160fda7ce408cf86312f29e525bae899df6059a01e52fb731ea14c499ab286f93a30b56d7beaea6c94a081766eddc6331df4db9890d1a7ae5ea1eff6ce8bade0 AUX radvd-2.19-configure-c99.patch 2060 BLAKE2B ae4e10a6960854cbd1cefd2898e213596181b28b55613cf75667fc795da2ec4f4d861b0cf4ee35992ce9e201bde7a4f8bc6185c40cdc5cc221128a4bfa0c9242 SHA512 17505b1986660258dbce340c49ad114c843ce9bc86602dd29893002ab48fca3086d4009e5c3a360b4a23cddb73235c57bbaf7ac2f21e7189fe0028acd0f1da10 AUX radvd-2.19-musl-include.patch 699 BLAKE2B 48ed5443cdad829b22f044ed5783d495ea111d4d573b6a961cf0a2fc44f7bf5a6db7c43e98a4e7f287a54d42114e5ddee9ffbc80f5209a12401a380ed3c196b0 SHA512 2451de4b6ed7979c2c64b30006c5c146612788a990f656c7ed6def6307c7682cb98708c6b780db8778ebe4ae460545bc71c00918d9fcd4bab764a10c1d5bbaf5 +AUX radvd-2.19.init 1872 BLAKE2B e36361271caa5ad130642f73777c317f5c4feb2c67ab0f833adb32a768aafa358a63118c335005e4a85c85ce988209f7794a024350724838838feaf22585d758 SHA512 6ee673419fe45e13af5262d19a5f4688c5dae3abb52cce0936d4a8c36b6d10f4abc1cd096c5841c763c8c948ce449b60ba6db12dd5bfd5ad6b067a84494c8241 AUX radvd.conf 337 BLAKE2B 67d50a761449b35389580ac956758f5c8c9373a14294a9e98e8238cce4ef2847694712e12296197ff196d58a9e5123aa6e27044a2137c36c34c6e2342ee7db63 SHA512 303a79c6e60293571f5cc868ba36f48a98658be8b6a9596c007461cbef2775d7deb67950fdacb3f37765cffdda164bc386e23bbb512cbabebd5173245841e401 AUX radvd.service 603 BLAKE2B fb573b528050d772926f3cb3cf82984b946345f636b661583f3aa5ef720a664cc13b20b8435ad2bcdd5bbdbad6451530384cd869f6d33d4e6f2ccf014ff9871b SHA512 3371d18e71ddb7672e929152d9f93201b49c1ce08c77d59cbcac7654362690a9ab97db08519f5fbe210738595aa52f30f5972cacca988b9274e2218c21bc7dd2 DIST radvd-2.19.tar.xz 168264 BLAKE2B e28705837263d2d377721e4eaee56b2f86d636d77cf052f08a7c74d5d7f3871f6821a2681ba4997f283b4debe9b3df28a88b01f6fc16b87ee7c3f8b6bbf431b4 SHA512 a1eb40af90fc83ebab2517c16a0f7e85c11338ab276bec400b7c33177748d1e36bc5abd7e373b6742f12f7c690dd7ae6b951bc832c7de9bbb56f7e9bc844ed22 EBUILD radvd-2.19-r5.ebuild 1634 BLAKE2B b0f0e9f7c74f54c42546af4791da1c3355acccb51549f00e221c3fe5a8b60554764bb113d12d865d40913d112e14a695f5436844a421a7fecf479552577c02aa SHA512 bd354125973077a96dcc10cfbe2a70968787aa27a414913077ce5dc68b2e5cb1d01c9a982ee5e4cd3ddffdb85ccdb59309a5845f1b6f931c8a26c143318d72d8 EBUILD radvd-2.19-r6.ebuild 1681 BLAKE2B 81212210813f0073638fa8a6731cc81a1ff4768fb0688d04beb746d3814f0c50cf582fc57fca3870454996f8b9338336f81e0a31330fbbdfb0b6237aa226e072 SHA512 52379762815ad0b0c11cb58d5cf4d844422114511bc18b9d6ed305c36da8a53165bf85ae66186034209c4f2586c8d94e7893098c171c333b656cab59ddfca5d4 +EBUILD radvd-2.19-r7.ebuild 1681 BLAKE2B b9f6bcd54d13f0c658e617b0d7ceefbe87b3ce2469c73ee3db467bf07712889a3c158715ae6839c560dbbcb0825ba1a24730b118eba0b32623207ac94b77dd4b SHA512 8f6fedfacf7f4836de488b91d0c7980d417a2dd991cc1687ccf217a3347742215b7d56ea3573c9778b913ee2a18c1d35ed9a7206154568d596d150b7e867f037 MISC metadata.xml 417 BLAKE2B 7f94abef147b6a917da0c6d0070855bc54c121e0a6fbb54161e7e7de2ce0bf709de51fd3a5e834b52b2b19fbd544330266852788a810ee7f60a039a5c7c6fe14 SHA512 1402bb46da7074aa12c0154417b4d1aa3c887a3817281b59f8dcd3aa98708b30b2fa522c23d920afb4ff824753e7be2555ceb085ee72b967ff60249959c10476 diff --git a/net-misc/radvd/files/radvd-2.19.init b/net-misc/radvd/files/radvd-2.19.init new file mode 100644 index 000000000000..069801e841ab --- /dev/null +++ b/net-misc/radvd/files/radvd-2.19.init @@ -0,0 +1,83 @@ +#!/sbin/openrc-run +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +CONFIGFILE=/etc/radvd.conf +PIDFILE=/run/radvd/radvd.pid +SYSCTL_FORWARD=net.ipv6.conf.all.forwarding + +description="IPv6 Router Advertisement Daemon" + +extra_commands="configtest" +extra_started_commands="reload" +description_configtest="Test the configuration and run startup tests" +description_reload="Reload the radvd configuration file" + +depend() { + need net +} + +checkconfig() { + if [ ! -f "${CONFIGFILE}" ]; then + eerror "Configuration file ${CONFIGFILE} not found" + return 1 + fi + + if ! /usr/sbin/radvd -c -C "${CONFIGFILE}" ; then + eerror "Configuration file ${CONFIGFILE} failed test" + return 1 + fi +} + +configtest() { + ebegin "Checking ${RC_SVCNAME} configuration" + checkconfig + eend $? +} + +start() { + if [ "${FORWARD}" != "no" ]; then + ebegin "Enabling IPv6 forwarding" + sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null + eend $? + fi + + checkconfig || return 1 + + checkpath -d -o radvd:radvd "${PIDFILE%/*}" + + ebegin "Starting IPv6 Router Advertisement Daemon" + start-stop-daemon --start --exec /usr/sbin/radvd \ + --pidfile "${PIDFILE}" \ + -- -C "${CONFIGFILE}" -p "${PIDFILE}" -u radvd ${OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping IPv6 Router Advertisement Daemon" + start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}" + eend $? + + if [ "${FORWARD}" != "no" ]; then + ebegin "Disabling IPv6 forwarding" + sysctl -w "${SYSCTL_FORWARD}=0" > /dev/null + eend $? + fi +} + +reload() { + if [ "${FORWARD}" != "no" ]; then + ebegin "Enabling IPv6 forwarding" + sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null + eend $? + fi + + checkconfig || return 1 + + checkpath -d -o radvd:radvd "${PIDFILE%/*}" + + ebegin "Reloading IPv6 Router Advertisement Daemon" + start-stop-daemon --signal HUP \ + --exec /usr/sbin/radvd --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-misc/radvd/radvd-2.19-r7.ebuild b/net-misc/radvd/radvd-2.19-r7.ebuild new file mode 100644 index 000000000000..803571c1bfce --- /dev/null +++ b/net-misc/radvd/radvd-2.19-r7.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools readme.gentoo-r1 systemd toolchain-funcs + +DESCRIPTION="Linux IPv6 Router Advertisement Daemon" +HOMEPAGE="https://radvd.litech.org/" +SRC_URI="https://v6web.litech.org/radvd/dist/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="selinux test" +RESTRICT="!test? ( test )" + +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig" +DEPEND="test? ( dev-libs/check )" +RDEPEND=" + acct-group/radvd + acct-user/radvd + selinux? ( sec-policy/selinux-radvd )" + +PATCHES=( + "${FILESDIR}"/${P}-musl-include.patch + "${FILESDIR}"/${P}-clang16.patch + "${FILESDIR}"/${P}-configure-c99.patch +) + +src_prepare() { + default + + # Drop once clang16 patch is in a release + eautoreconf +} + +src_configure() { + # Needs reentrant functions (yyset_in), bug #884375 + export LEX=flex + + econf --with-pidfile=/run/radvd/radvd.pid \ + --with-systemdsystemunitdir=no \ + $(use_with test check) +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +src_install() { + HTML_DOCS=( INTRO.html ) + default + dodoc radvd.conf.example + + newinitd "${FILESDIR}"/${PN}-2.19.init ${PN} + newconfd "${FILESDIR}"/${PN}.conf ${PN} + + systemd_dounit "${FILESDIR}"/${PN}.service + + DISABLE_AUTOFORMATTING=1 + local DOC_CONTENTS="Please create a configuration file ${EPREFIX}/etc/radvd.conf. +See ${EPREFIX}/usr/share/doc/${PF} for an example. + +grsecurity users should allow a specific group to read /proc +and add the radvd user to that group, otherwise radvd may +segfault on startup." + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} |