Hello community, here is the log from the commit of package radvd for openSUSE:Factory checked in at Tue Sep 20 09:35:41 CEST 2011.
-------- --- radvd/radvd.changes 2009-07-29 12:03:33.000000000 +0200 +++ /mounts/work_src_done/STABLE/radvd/radvd.changes 2011-05-05 09:25:04.000000000 +0200 @@ -1,0 +2,21 @@ +Tue May 3 14:36:57 UTC 2011 - lnus...@suse.de + +- new version 1.7: + - Fix an unintentional change in 1.3: RAs were accidentally often unicast to + solicitors instead of being multicast. This is still compliant with the + specification but is not optimal. + - Allow radvd.conf prefix, clients, route, and RDNSS options to be in any order. + - exit if the number of prefixes/routes/etc. would grow too much. + - Fix radvd skipping multiple interfaces when UnicastOnly is on or + AdvSendAdvert is off. This got broken in radvd 1.3. + - Fix a segmentation fault on reload_config() timer list corruption that only + occurs with multiple interfaces. + - Add '-c' flag to test configuration. + - Deprecate old, pre-RFC5006 parameters. Support RFC6106 by adding DNS Search List support. +- run as user radvd by default (bnc#691456) +- clean up init script +- install a small default config that advertises ULAs. Default prefix is + autogenerated to get a different for on each installation. +- start even if forwarding is not on to be able to work with ULAs only + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- radvd-1.3.tar.bz2 New: ---- 0001-run-as-user-radvd-by-default.diff 0002-continue-even-if-forwarding-is-off.diff radvd-1.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ radvd.spec ++++++ --- /var/tmp/diff_new_pack.Ks76jz/_old 2011-09-20 09:35:34.000000000 +0200 +++ /var/tmp/diff_new_pack.Ks76jz/_new 2011-09-20 09:35:34.000000000 +0200 @@ -25,13 +25,16 @@ PreReq: %insserv_prereq %fillup_prereq AutoReqProv: on Summary: Router ADVertisement Daemon for IPv6 -Version: 1.3 +Version: 1.7 Release: 1 -Source0: %{name}-%{version}.tar.bz2 +Source0: http://www.litech.org/radvd/dist/%{name}-%{version}.tar.gz Source1: radvd.init Source2: sysconfig.radvd +Patch0: 0001-run-as-user-radvd-by-default.diff +Patch1: 0002-continue-even-if-forwarding-is-off.diff Url: http://v6web.litech.org/radvd BuildRoot: %{_tmppath}/%{name}-%{version}-build +PreReq: /usr/sbin/useradd %description RADVD is the Router ADVertisement Daemon. It is used for automated @@ -41,27 +44,63 @@ %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build autoreconf -fi -CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --mandir=%{_mandir} --sysconfdir=%{_sysconfdir} --with-configfile=%{_sysconfdir}/radvd.conf --with-pidfile=/var/run/radvd/radvd.pid +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./configure --prefix=%{_prefix} --mandir=%{_mandir} --sysconfdir=%{_sysconfdir} --with-configfile=%{_sysconfdir}/radvd.conf --with-pidfile=/var/run/radvd/radvd.pid make %install make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/etc/init.d -install -m 0755 $RPM_SOURCE_DIR/radvd.init $RPM_BUILD_ROOT/etc/init.d/radvd +install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/radvd ln -sf /etc/init.d/radvd $RPM_BUILD_ROOT/usr/sbin/rcradvd mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates -install -m 644 $RPM_SOURCE_DIR/sysconfig.radvd $RPM_BUILD_ROOT/var/adm/fillup-templates/ -install -m 644 $RPM_BUILD_DIR/radvd-%{version}/radvd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/radvd.conf -mkdir -p $RPM_BUILD_ROOT/var/run/radvd +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/ +install -m 644 /dev/null $RPM_BUILD_ROOT%{_sysconfdir}/radvd.conf + +%pre +getent passwd radvd >/dev/null || \ + /usr/sbin/useradd -r -d /var/lib/empty -s /bin/false \ + -c "Router ADVertisement Daemon for" -g daemon radvd 2>/dev/null || : %post +# zap old (<= 11.4) default +sed -ie '/^RADVD_OPTIONS/s/-u daemon//' /etc/sysconfig/radvd %{fillup_and_insserv radvd} +# +if [ ! -e /etc/radvd.conf ]; then + # yeah, not quite the rfc4193 algorithm but hopefully + # random enough + prefix=`printf "fd%%02x:%%04x:%%04x:0001::/64\n" $((RANDOM%256)) $RANDOM $RANDOM` + cat > /etc/radvd.conf <<EOF +interface eth0 +{ + AdvSendAdvert on; + + # life time zero means we don't actually advertise a + # router but only our ULA address. Remove if you want this + # host to be advertised as router. + AdvDefaultLifetime 0; + + # ULA address according to RFC 4193. + # It was randomly created at installation of the package for + # use in your local network. + prefix $prefix + { + }; +}; +EOF + echo "created /etc/radvd.conf with ULA prefix $prefix" +fi +# +install -d -m 755 -o radvd /var/run/radvd %postun -%{insserv_cleanup} +%restart_on_update radvd +%insserv_cleanup %preun %stop_on_removal radvd @@ -71,8 +110,8 @@ %files %defattr(-,root,root) -%dir %attr(-,daemon,daemon) /var/run/radvd/ -%config(noreplace) %{_sysconfdir}/radvd.conf +%ghost %dir %attr(0755,radvd,root) /var/run/radvd/ +%ghost %config(noreplace) %{_sysconfdir}/radvd.conf /var/adm/fillup-templates/sysconfig.radvd /usr/sbin/radvd /usr/sbin/radvdump @@ -80,6 +119,7 @@ %doc %{_mandir}/man8/radvdump.8.gz %doc %{_mandir}/man5/radvd.conf.5.gz %doc CHANGES COPYRIGHT TODO INTRO.html +%doc radvd.conf.example %config /etc/init.d/radvd /usr/sbin/rcradvd ++++++ 0001-run-as-user-radvd-by-default.diff ++++++ >From 3ff72b5f5bccad1418441485177488f64dc4a135 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel <ludwig.nus...@suse.de> Date: Tue, 3 May 2011 15:42:36 +0200 Subject: [PATCH 1/2] run as user radvd by default --- radvd.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/radvd.c b/radvd.c index a84793e..90acc88 100644 --- a/radvd.c +++ b/radvd.c @@ -172,6 +172,9 @@ main(int argc, char *argv[]) } } + if (!username) + username = strdup("radvd"); + if (chrootdir) { if (!username) { fprintf(stderr, "Chroot as root is not safe, exiting\n"); -- 1.7.3.4 ++++++ 0002-continue-even-if-forwarding-is-off.diff ++++++ >From 1868997bdafeab248b0bc9e1027fe3b88d420462 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel <ludwig.nus...@suse.de> Date: Tue, 3 May 2011 15:46:01 +0200 Subject: [PATCH] continue even if forwarding is off radvd is useful for advertising ULA's without having a router too --- radvd.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/radvd.c b/radvd.c index 5071b4a..3b7a56b 100644 --- a/radvd.c +++ b/radvd.c @@ -252,12 +252,7 @@ main(int argc, char *argv[]) /* if we know how to do it, check whether forwarding is enabled */ if (check_ip6_forwarding()) { - if (get_debuglevel() == 0) { - flog(LOG_ERR, "IPv6 forwarding seems to be disabled, exiting"); - exit(1); - } - else - flog(LOG_WARNING, "IPv6 forwarding seems to be disabled, but continuing anyway."); + flog(LOG_WARNING, "IPv6 forwarding seems to be disabled, but continuing anyway."); } /* parse config file */ @@ -786,6 +781,7 @@ check_ip6_forwarding(void) int value; size_t size = sizeof(value); FILE *fp = NULL; + static int warned = 0; #ifdef __linux__ fp = fopen(PROC_SYS_IP6_FORWARDING, "r"); @@ -810,7 +806,8 @@ check_ip6_forwarding(void) return(0); /* this is of advisory value only */ } - if (value != 1) { + if (value != 1 && !warned) { + warned = 1; flog(LOG_DEBUG, "IPv6 forwarding setting is: %u, should be 1", value); return(-1); } -- 1.7.3.4 ++++++ radvd.init ++++++ --- /var/tmp/diff_new_pack.Ks76jz/_old 2011-09-20 09:35:34.000000000 +0200 +++ /var/tmp/diff_new_pack.Ks76jz/_new 2011-09-20 09:35:34.000000000 +0200 @@ -16,130 +16,64 @@ # Required-Stop: $remote_fs $named $syslog # Default-Start: 3 5 # Default-Stop: 0 1 2 6 +# Short-Description: router advertisement daemon # Description: router advertisement daemon ### END INIT INFO DAEMON="router advertisement daemon" DAEMON_BIN=/usr/sbin/radvd DAEMON_CONF=/etc/radvd.conf -DAEMON_PIDFILE=/var/run/radvd/radvd.pid - -test -x $DAEMON_BIN || exit 5 +DAEMON_PIDDIR=/var/run/radvd +DAEMON_PIDFILE=$DAEMON_PIDDIR/radvd.pid test -f /etc/sysconfig/radvd && . /etc/sysconfig/radvd -# Shell functions sourced from /etc/rc.status: -# rc_check check and set local and overall rc status -# rc_status check and set local and overall rc status -# rc_status -v ditto but be verbose in local rc status -# rc_status -v -r ditto and clear the local rc status -# rc_failed set local and overall rc status to failed -# rc_failed <num> set local and overall rc status to <num><num> -# rc_reset clear local rc status (overall remains) -# rc_exit exit appropriate to overall rc status . /etc/rc.status -# First reset status of this service rc_reset -# Return values acc. to LSB for all commands but status: -# 0 - success -# 1 - generic or unspecified error -# 2 - invalid or excess argument(s) -# 3 - unimplemented feature (e.g. "reload") -# 4 - insufficient privilege -# 5 - program is not installed -# 6 - program is not configured -# 7 - program is not running -# -# Note that starting an already running service, stopping -# or restarting a not-running service as well as the restart -# with force-reload (in case signalling is not supported) are -# considered a success. - case "$1" in start) echo -n "Starting $DAEMON" - ## Start daemon with startproc(8). If this fails - ## the echo return value is set appropriate. - - ## If there is no conf file, skip starting of ddtd - ## and return with "program not configured" if ! [ -f $DAEMON_CONF ]; then echo -e -n "... no configuration file found" - rc_status -s - # service is not configured - rc_failed 6 + rc_status -u rc_exit fi - - # startproc should return 0, even if service is - # already running to match LSB spec. - startproc $DAEMON_BIN $RADVD_OPTIONS + test -d $DAEMON_PIDDIR || install -d -m 755 -o radvd $DAEMON_PIDDIR + start_daemon $DAEMON_BIN $RADVD_OPTIONS rc_status -v ;; stop) echo -n "Shutting down $DAEMON" - ## Stop daemon with killproc(8) and if this fails - ## set echo the echo return value. - killproc -p $DAEMON_PIDFILE -TERM $DAEMON_BIN - - # Remember status and be verbose rc_status -v ;; try-restart) - ## Stop the service and if this succeeds (i.e. the - ## service was running before), start it again. $0 stop && $0 start - - # Remember status and be quiet rc_status ;; restart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. $0 stop $0 start - - # Remember status and be quiet rc_status ;; force-reload) - ## Signal the daemon to reload its config. Most daemons - ## do this on signal 1 (SIGHUP). - ## If it does not support it, restart. - echo -n "Reload service $DAEMON" killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN rc_status -v ;; reload) - ## Like force-reload, but if daemon does not support - ## signalling, do nothing (!) - echo -n "Reload service $DAEMON" killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN rc_status -v ;; status) echo -n "Checking for $DAEMON: " - ## Check status with checkproc(8), if process is running - ## checkproc will return with exit status 0. - - # Status has a slightly different for the status command: - # 0 - service running - # 1 - service dead, but /var/run/ pid file exists - # 2 - service dead, but /var/lock/ lock file exists - # 3 - service not running - checkproc -p $DAEMON_PIDFILE $DAEMON_BIN rc_status -v ;; probe) - ## Optional: Probe for the necessity of a reload, - ## give out the argument which is required for a reload. - test "$DAEMON_CONF" -nt "$DAEMON_PIDFILE" && echo reload ;; *) ++++++ sysconfig.radvd ++++++ --- /var/tmp/diff_new_pack.Ks76jz/_old 2011-09-20 09:35:34.000000000 +0200 +++ /var/tmp/diff_new_pack.Ks76jz/_new 2011-09-20 09:35:34.000000000 +0200 @@ -4,4 +4,4 @@ ## Default: "-u daemon" ## ServiceRestart: radvd # No chroot; /var/run/radvd must be owned by the user radvd is running as. -RADVD_OPTIONS="-u daemon" +RADVD_OPTIONS="" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org