dnsmasq/dnsmasq.spec

220 lines
7.7 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:37:06 -04:00
Name: dnsmasq
2022-03-22 11:42:25 +08:00
Version: 2.86
2022-07-30 09:28:54 +08:00
Release: 2
2019-09-30 10:37:06 -04:00
Summary: Dnsmasq provides network infrastructure for small networks
License: GPLv2 or GPLv3
URL: http://www.thekelleys.org.uk/dnsmasq/
Source0: http://www.thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.xz
Source1: dnsmasq.service
Source2: dnsmasq-systemd-sysusers.conf
2022-03-22 11:42:25 +08:00
Patch1: backport-dnsmasq-2.77-underflow.patch
Patch2: backport-dnsmasq-2.81-configuration.patch
Patch3: backport-dnsmasq-2.78-fips.patch
Patch4: backport-0001-Retry-on-interrupted-error-in-tftp.patch
Patch5: backport-0002-Add-safety-checks-to-places-pointed-by-Coverity.patch
Patch6: backport-0003-Small-safeguard-to-unexpected-data.patch
Patch7: backport-0004-Fix-bunch-of-warnings-in-auth.c.patch
Patch8: backport-0005-Fix-few-coverity-warnings-in-lease-tools.patch
Patch9: backport-0006-Fix-coverity-formats-issues-in-blockdata.patch
Patch10: backport-0007-Retry-dhcp6-ping-on-interrupts.patch
Patch11: backport-0008-Fix-coverity-warnings-on-dbus.patch
Patch12: backport-0009-Address-coverity-issues-detected-in-util.c.patch
Patch13: backport-0010-Fix-coverity-detected-issues-in-option.c.patch
Patch14: backport-0011-Fix-coverity-detected-issue-in-radv.c.patch
Patch15: backport-0012-Fix-coverity-detected-issues-in-cache.c.patch
Patch16: backport-0013-Fix-coverity-issues-detected-in-domain-match.c.patch
Patch17: backport-0014-Fix-coverity-detected-issues-in-dnsmasq.c.patch
Patch18: backport-0015-Fix-coverity-issues-in-dnssec.c.patch
Patch19: backport-dnsmasq-2.86-domain-match-local.patch
Patch20: backport-dnsmasq-2.86-build_server_array.patch
Patch21: backport-dnsmasq-2.87-tcp-strcasecmp.patch
Patch22: bugfix-allow-binding-mac-with-ipv6.patch
Patch23: bugfix-deal-with-CONFRIM-when-binding-mac-with-ipv6.patch
2022-07-30 09:28:54 +08:00
Patch24: backport-Fix-write-after-free-in-DHCPv6-code-CVE-2022-0934.patch
2022-03-22 11:42:25 +08:00
2019-12-25 15:44:46 +08:00
2021-05-26 14:20:04 +08:00
BuildRequires: gcc
2019-09-30 10:37:06 -04:00
BuildRequires: dbus-devel pkgconfig libidn2-devel nettle-devel systemd
Requires: nettle >= 3.4
Provides: dnsmasq-utils
Obsoletes: dnsmasq-utils
%{?systemd_requires}
%description
Dnsmasq provides network infrastructure for small networks: DNS, DHCP, router
advertisement and network boot. It is designed to be lightweight and have a small
footprint, suitable for resource constrained routers and firewalls.
It has also been widely used for tethering on smartphones and portable hotspots,
and to support virtual networking in virtualisation frameworks.
%package help
Summary: Help documents for dnsmasq
%description help
Help package contains some readme, man and other related files for dnsmasq.
%prep
%autosetup -n %{name}-%{version} -p1
for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do
sed -i 's|/var/lib/misc/dnsmasq.leases|/var/lib/dnsmasq/dnsmasq.leases|g' "$file"
done
sed -i 's|#define CHGRP "dip"|#define CHGRP "dnsmasq"|' src/config.h
sed -i 's|#define CHUSER "nobody"|#define CHUSER "dnsmasq"|' src/config.h
2022-03-22 11:42:25 +08:00
sed -i "s|\(#\s*define RUNFILE\) \"/var/run/dnsmasq.pid\"|\1 \"%{_rundir}/dnsmasq.pid\"|" src/config.h
2019-09-30 10:37:06 -04:00
sed -i 's|^COPTS[[:space:]]*=|\0 -DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_DNSSEC|' Makefile
%build
%make_build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%make_build -C contrib/lease-tools CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%install
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_var}/lib/dnsmasq}
install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dnsmasq.d,%{_sysconfdir}/dbus-1/system.d}
install src/dnsmasq $RPM_BUILD_ROOT%{_sbindir}/dnsmasq
install -m644 man/dnsmasq.8 $RPM_BUILD_ROOT%{_mandir}/man8/
install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf
install dbus/dnsmasq.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/
install -D trust-anchors.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/trust-anchors.conf
install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_unitdir}}
install -m755 contrib/lease-tools/{dhcp_release,dhcp_release6,dhcp_lease_time} $RPM_BUILD_ROOT%{_bindir}/
install -m644 contrib/lease-tools/{dhcp_release.1,dhcp_release6.1,dhcp_lease_time.1} $RPM_BUILD_ROOT%{_mandir}/man1/
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/dnsmasq.conf
%pre
%sysusers_create_package %{name} %{SOURCE2}
2019-09-30 10:37:06 -04:00
%post
%systemd_post dnsmasq.service
2019-09-30 10:37:06 -04:00
%preun
%systemd_preun dnsmasq.service
2019-09-30 10:37:06 -04:00
%postun
%systemd_postun_with_restart dnsmasq.service
2019-09-30 10:37:06 -04:00
%files
%doc dbus/DBus-interface
%license COPYING COPYING-v3
%defattr(0644,root,dnsmasq,0755)
%config(noreplace) %{_sysconfdir}/dnsmasq.conf
%dir %{_sysconfdir}/dnsmasq.d
%dir %{_sharedstatedir}/dnsmasq
%defattr(-,root,root,-)
%{_bindir}/dhcp_*
%{_sbindir}/dnsmasq
%{_unitdir}/dnsmasq.service
%{_sysusersdir}/dnsmasq.conf
%{_datadir}/%{name}/trust-anchors.conf
%dir %{_datadir}/dnsmasq
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
%exclude %{_initrddir}
%files help
%doc CHANGELOG FAQ doc.html setup.html
%{_mandir}/man1/dhcp_*
%{_mandir}/man8/dnsmasq*
%changelog
2022-07-30 09:28:54 +08:00
* Sat Jul 30 2022 renmingshuai <renmingshuai@huawei.com> - 2.86-2
- Type:CVE
- Id:CVE-2022-0934
- SUG:NA
- DESC:fix CVE-2022-0934
2022-03-22 11:42:25 +08:00
* Tue Mar 22 2022 yanglu <yanglu72@h-partners.com> - 2.86-1
- update dnsmasq to 2.86
2021-07-14 14:34:40 +08:00
* Wed Jul 14 2021 gaihuiying <gaihuiying1@huawei.com> - 2.85-1
- update dnsmasq to 2.85
2021-05-26 14:20:04 +08:00
* Wed May 26 2021 liuyumeng <liuyumeng5@huawei.com> - 2.82-9
- Add a BuildRequires for gcc
* Sat May 08 2021 quanhongfei <quanhongfei@huawei.com> - 2.82-8
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:fix dnsmasq --bind-mac-with-ip6 unsupported option error
* Wed Apr 21 2021 gaihuiying <gaihuiying1@huawei.com> - 2.82-7
- Type:CVE
- Id:NA
- SUG:NA
- DESC: Handle caching with EDNS options better
Fix to 75e2f0aec33e58ef5b8d4d107d821c215a52827c
Fix for 12af2b171de0d678d98583e2190789e544440e02
Fix problem with DNS retries in 2.83 2.84 version
Simplify preceding fix
Update to new struct frec fields in conntrack code
Use the values of min port and max port in TCP connection
Correct occasional bind dynamic synchronization
Move fd into frec_src fixes 15b60ddf935a531269bb8c68
fix CVE-2021-3448
2022-05-12 17:04:52 +08:00
* Mon Apr 12 2021 seuzw <930zhaowei@163.com> - 2.82-6
- Type:requirement
- Id:NA
- SUG:NA
- DESC:Handle DHCPREBIND requests in the DHCPv6 server
* Thu Feb 25 2021 zengwefeng <zwfeng@huawei.com> - 2.82-5
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:Add missing check for NULL return from allocate_rfd
Fix DNS reply when asking for DNSSEC
* Thu Jan 21 2021 zhujh <zhujunhao8@huawei.com> - 2.82-4
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:Fix regression in s_config_in_context() method
* Wed Jan 20 2021 liulong <liulong20@huawei.com> - 2.82-3
- Type:CVE
- Id:NA
- SUG:NA
- DESC:fix CVE-2020-25681 CVE-2020-25682 CVE-2020-25683 CVE-2020-25684 CVE-2020-25685 CVE-2020-25686 CVE-2020-25687
* Tue Sep 1 2020 zhouyihang <zhouyihang3@huawei.com> - 2.82-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:fix install and uninstall scripts failure
2020-07-28 16:39:08 +08:00
* Tue Jul 28 2020 xiaoweiwei <xiaoweiwei5@huawei.com> - 2.82-1
- Type:upgrade
- Id:NA
- SUG:NA
- DESC:upgrade to 2.82
2019-12-25 15:44:46 +08:00
* Sat Dec 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.79-11
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:Fix memory leak in helper.c;
Allow binding mac with ipv6;
Deal with CONFRIM when binding mac with ipv6
2019-12-03 18:34:28 +08:00
* Mon Nov 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.79-10
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:modify the changelog
2019-11-06 19:05:43 +08:00
* Tue Oct 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.79-9
- Type:bugfix
- Id:NA
- SUG:NA
2019-12-03 18:34:28 +08:00
- DESC:add conf files for sysusers_create
2019-11-06 19:05:43 +08:00
* Fri Sep 20 2019 yanzhihua <yanzhihua4@huawei.com> - 2.79-8
2019-09-30 10:37:06 -04:00
- Package init.