From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- net-misc/radvd/files/radvd-1.9.1.init | 71 ++++++++++++++++++ .../radvd/files/radvd-2.10-musl-libc-fix.patch | 87 ++++++++++++++++++++++ net-misc/radvd/files/radvd.conf | 11 +++ net-misc/radvd/files/radvd.service | 15 ++++ net-misc/radvd/files/radvd.tmpfilesd | 1 + 5 files changed, 185 insertions(+) create mode 100644 net-misc/radvd/files/radvd-1.9.1.init create mode 100644 net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch create mode 100644 net-misc/radvd/files/radvd.conf create mode 100644 net-misc/radvd/files/radvd.service create mode 100644 net-misc/radvd/files/radvd.tmpfilesd (limited to 'net-misc/radvd/files') diff --git a/net-misc/radvd/files/radvd-1.9.1.init b/net-misc/radvd/files/radvd-1.9.1.init new file mode 100644 index 000000000000..779233326aa9 --- /dev/null +++ b/net-misc/radvd/files/radvd-1.9.1.init @@ -0,0 +1,71 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +CONFIGFILE=/etc/radvd.conf +PIDFILE=/var/run/radvd/radvd.pid +SYSCTL_FORWARD=net.ipv6.conf.all.forwarding + +extra_started_commands="reload" + +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 + + checkpath -d -o radvd:radvd ${PIDFILE%/*} +} + +start() { + if [ "${FORWARD}" != "no" ]; then + ebegin "Enabling IPv6 forwarding" + sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null + eend $? + fi + + checkconfig || return 1 + + 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 + + ebegin "Reloading IPv6 Router Advertisement Daemon" + start-stop-daemon --signal HUP \ + --exec /usr/sbin/radvd --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch b/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch new file mode 100644 index 000000000000..c44f28437be4 --- /dev/null +++ b/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch @@ -0,0 +1,87 @@ +From 1d8973e13d89802eee0b648451e2b97ac65cf9e0 Mon Sep 17 00:00:00 2001 +From: Reuben Hawkins +Date: Sat, 16 May 2015 09:27:38 -0700 +Subject: [PATCH] device-linux.c: IEEE 802.15.4 musl libc fix + +The ARPHRD_IEEE802154 macro's definition and name have been recently +moved around from kernel header to glibc headers. Include linux/if_arp.h +if available and then use either ARPHRD_IEEE802154_MONITOR or ARPHRD_IEEE802154_PHY, +whichever comes first. +--- + configure.ac | 1 + + device-linux.c | 8 ++++++++ + includes.h | 6 ++++++ + 3 files changed, 15 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 0c1efd6..4bd4c9d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -156,6 +156,7 @@ AC_HEADER_STDC + AC_CHECK_HEADERS( \ + getopt.h \ + ifaddrs.h \ ++ linux/if_arp.h \ + machine/limits.h \ + machine/param.h \ + net/if_arp.h \ +diff --git a/device-linux.c b/device-linux.c +index fa7d978..de83f2e 100644 +--- a/device-linux.c ++++ b/device-linux.c +@@ -79,10 +79,12 @@ int update_device_info(int sock, struct Interface *iface) + iface->sllao.if_maxmtu = -1; + break; + #endif /* ARPHDR_ARCNET */ ++#ifdef ARPHRD_IEEE802154 + case ARPHRD_IEEE802154: + iface->sllao.if_hwaddr_len = 64; + iface->sllao.if_prefix_len = 64; + break; ++#endif + default: + iface->sllao.if_hwaddr_len = -1; + iface->sllao.if_prefix_len = -1; +@@ -371,9 +373,15 @@ static char const *hwstr(unsigned short sa_family) + case ARPHRD_IEEE802154: + rc = "ARPHRD_IEEE802154"; + break; ++#if ARPHRD_IEEE802154_MONITOR ++ case ARPHRD_IEEE802154_MONITOR: ++ rc = "ARPHRD_IEEE802154_MONITOR"; ++ break; ++#elif ARPHRD_IEEE802154_PHY + case ARPHRD_IEEE802154_PHY: + rc = "ARPHRD_IEEE802154_PHY"; + break; ++#endif + case ARPHRD_VOID: + rc = "ARPHRD_VOID"; + break; +diff --git a/includes.h b/includes.h +index 39a36d2..d2449c4 100644 +--- a/includes.h ++++ b/includes.h +@@ -81,9 +81,11 @@ + #ifdef HAVE_NET_IF_DL_H + #include + #endif ++ + #ifdef HAVE_NET_IF_TYPES_H + #include + #endif ++ + #if defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER) + #include + #endif /* defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER) */ +@@ -100,3 +102,7 @@ + #include + #endif + ++#ifdef HAVE_LINUX_IF_ARP_H ++#include ++#endif ++ +-- +2.3.6 + diff --git a/net-misc/radvd/files/radvd.conf b/net-misc/radvd/files/radvd.conf new file mode 100644 index 000000000000..d1a95b8dea20 --- /dev/null +++ b/net-misc/radvd/files/radvd.conf @@ -0,0 +1,11 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Extra options to pass to radvd +OPTIONS="" + +# Set this to "no" to tell the init script NOT to set up IPv6 forwarding +# using /proc/sys/net/ipv6/conf/all/forwarding +# Only change this if you know what you're doing! +FORWARD="yes" diff --git a/net-misc/radvd/files/radvd.service b/net-misc/radvd/files/radvd.service new file mode 100644 index 000000000000..d9095f625a9c --- /dev/null +++ b/net-misc/radvd/files/radvd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Router advertisement daemon for IPv6 +Documentation=man:radvd(8) +After=network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0 +ExecReload=/usr/sbin/radvd --configtest ; \ + /bin/kill -HUP $MAINPID +CPUSchedulingPolicy=idle +PIDFile=/run/radvd/radvd.pid + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/radvd/files/radvd.tmpfilesd b/net-misc/radvd/files/radvd.tmpfilesd new file mode 100644 index 000000000000..26f203d1aaa7 --- /dev/null +++ b/net-misc/radvd/files/radvd.tmpfilesd @@ -0,0 +1 @@ +d /run/radvd 0755 radvd radvd -- cgit v1.2.3-65-gdbad