commit f7375074de7d8a12a1ab275c606e4d3e27c026ef Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:16:08 2019 -0400 Package init diff --git a/radvd-2.18.tar.gz b/radvd-2.18.tar.gz new file mode 100644 index 0000000..0c5872c Binary files /dev/null and b/radvd-2.18.tar.gz differ diff --git a/radvd-tmpfs.conf b/radvd-tmpfs.conf new file mode 100644 index 0000000..26f203d --- /dev/null +++ b/radvd-tmpfs.conf @@ -0,0 +1 @@ +d /run/radvd 0755 radvd radvd diff --git a/radvd.service b/radvd.service new file mode 100644 index 0000000..b6007c1 --- /dev/null +++ b/radvd.service @@ -0,0 +1,14 @@ +[Unit] +Description=Router advertisement daemon for IPv6 +After=network-online.target +Wants=network-online.target + +[Service] +EnvironmentFile=/etc/sysconfig/radvd +ExecStart=/usr/sbin/radvd $OPTIONS +Type=forking +PIDFile=/var/run/radvd/radvd.pid +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/radvd.spec b/radvd.spec new file mode 100644 index 0000000..dc265d9 --- /dev/null +++ b/radvd.spec @@ -0,0 +1,93 @@ +Name: radvd +Version: 2.18 +Release: 1 +Summary: Router ADVertisement Daemon for IPv6 +License: BSD with advertising +URL: http://www.litech.org/radvd/ +Source0: http://www.litech.org/radvd/dist/%{name}-%{version}.tar.gz +Source1: radvd-tmpfs.conf +Source2: radvd.service + +BuildRequires: gcc bison flex flex-static pkgconfig check-devel systemd +Requires(pre): shadow-utils +%{?systemd_requires} + +%description +The router advertisement daemon (radvd) is run by Linux or BSD systems +acting as IPv6 routers. It sends Router Advertisement messages, +specified by RFC 2461, to a local Ethernet LAN periodically and when +requested by a node sending a Router Solicitation message. These +messages are required for IPv6 stateless autoconfiguration. + +%package_help + +%prep +%autosetup -n %{name}-%{version} -p1 + +for F in CHANGES; do + iconv -f iso-8859-1 -t utf-8 < "$F" > "${F}.new" + touch -r "$F" "${F}.new" + mv "${F}.new" "$F" +done + +%build +%configure --with-check --disable-silent-rules \ + --with-pidfile=/run/radvd/radvd.pid +%make_build + +%install +%make_install + +install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig +install -d -m 755 %{buildroot}/run/radvd +install -d -m 755 %{buildroot}%{_unitdir} + +pushd redhat/SysV +install -m 644 radvd.conf.empty %{buildroot}%{_sysconfdir}/radvd.conf +install -m 644 radvd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/radvd +popd + +install -d -m 755 %{buildroot}%{_tmpfilesdir} +install -p -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/radvd.conf + +pushd redhat/systemd +install -m 644 %{SOURCE2} %{buildroot}%{_unitdir} +popd + +%check +make check + +%postun +%systemd_postun_with_restart radvd.service + +%post +%systemd_post radvd.service + +%preun +%systemd_preun radvd.service + +%pre +getent group radvd >/dev/null || groupadd -r -g 75 radvd +getent passwd radvd >/dev/null || \ + useradd -r -u 75 -g radvd -d / -s /sbin/nologin -c "radvd user" radvd +exit 0 + +%files +%doc CHANGES COPYRIGHT +%defattr(-,root,root) +%{_tmpfilesdir}/radvd.conf +%config(noreplace) %{_sysconfdir}/radvd.conf +%config(noreplace) %{_sysconfdir}/sysconfig/radvd +%{_sbindir}/* +%{_unitdir}/radvd.service +%dir %attr(755,radvd,radvd) /run/radvd/ + +%files help +%defattr(-,root,root) +%doc radvd.conf.example +%doc INTRO.html README TODO +%{_mandir}/*/* + +%changelog +* Mon Sep 16 2018 openEuler Buildteam - 2.18-1 +- Package init