Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37405275
en ru br
Репозитории ALT
S:2.89-alt2
5.1: 2.46-alt1.1.M51.2
4.1: 2.41-alt4.M41.1
4.0: 2.38-alt1
3.0: 2.22-alt2
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: dnsmasq

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%def_with libidn2

Name: dnsmasq
Version: 2.89

Release: alt2
Summary: A lightweight caching nameserver
License: GPLv2+
Group: System/Servers
Url: https://thekelleys.org.uk/dnsmasq/
Vcs: git://thekelleys.org.uk/dnsmasq.git
Source0: %name-%version.tar
Source1: %name.init
Source2: %name.sysconfig
Source3: %name-helper
Source4: %name.service
Patch: %name-%version-%release.patch

# Patches from upstream git, must be droped

# wen new version will be released.
Patch1: Avoid-undefined-behaviour-with-the-ctype-3-functions.patch
Patch2: Fix-rev-server-option.-It-was-broken-in-1db9943c6879.patch
Patch3: Fix-possible-SEGV-when-no-servers-defined.patch

# Fixes CVE-2023-28450

Patch4: Set-the-default-maximum-DNS-UDP-packet-size-to-1232.patch

Patch5: Fix-DHCPv6-use-multicast-response-which-previously-f.patch

BuildPreReq: glibc-kernheaders

# IDN

%if_with libidn2
BuildRequires: libidn2-devel
%else
BuildRequires: libidn-devel
%endif

# DNSSEC

BuildRequires: libnettle-devel libgmp-devel

%define sysconfig_file %_sysconfdir/sysconfig/%name
%define _unpackaged_files_terminate_build 1

Summary(ru_RU.UTF-8): п п╬п╪п©п╟п╨я┌п╫я▀п╧ я│п╣я─п╡п╣я─ DNS п╦ DHCP п╢п╩я▐ п╩п╬п╨п╟п╩я▄п╫я▀я┘ я│п╣я┌п╣п╧

%description
Dnsmasq is lightweight, easy to configure DNS forwarder and DHCP server. It
is designed to provide DNS and, optionally, DHCP, to a small network. It can
serve the names of local machines which are not in the global DNS. The DHCP
server integrates with the DNS server and allows machines with DHCP-allocated
addresses to appear in the DNS with names configured either in each host or
in a central configuration file. Dnsmasq supports static and dynamic DHCP
leases and BOOTP for network booting of diskless machines.

%description -l ru_RU.UTF-8
Dnsmasq - я█я┌п╬ п╨п╬п╪п©п╟п╨я┌п╫я▀п╧, п©я─п╬я│я┌п╬п╧ п╡ п╫п╟я│я┌я─п╬п╧п╨п╣ я│п╣я─п╡п╣я─ DNS п╦ DHCP,
я─п╟п╥я─п╟п╠п╬я┌п╟п╫п╫я▀п╧ п╢п╩я▐ п╦я│п©п╬п╩я▄п╥п╬п╡п╟п╫п╦я▐ п╡ п╫п╣п╠п╬п╩я▄я┬п╦я┘ я│п╣я┌я▐я┘.
п÷п╬ я┐п╪п╬п╩я┤п╟п╫п╦я▌ п╬п╫ п╦я│п©п╬п╩я▄п╥я┐п╣я┌ п╬п╠я┴п╣я│п╦я│я┌п╣п╪п╫я▀п╣ я└п╟п╧п╩я▀ /etc/hosts п╦ /etc/resolv.conf,
п©п╬я█я┌п╬п╪я┐ п╪п╬п╤п╣я┌ п╦я│п©п╬п╩я▄п╥п╬п╡п╟я┌я▄я│я▐ п╠п╣п╥ п╫п╟я│я┌я─п╬п╧п╨п╦ я│я─п╟п╥я┐ п©п╬я│п╩п╣ я┐я│я┌п╟п╫п╬п╡п╨п╦.

п·я┤п╣п╫я▄ я┐п╢п╬п╠п╫я▀п╪п╦ я└я┐п╫п╨я├п╦я▐п╪п╦ я▐п╡п╩я▐я▌я┌я│я▐ п©я─п╬п╥я─п╟я┤п╫п╬п╣ п©п╣я─п╣п╬п©я─п╣п╢п╣п╩п╣п╫п╦п╣ п╡п╫п╣я┬п╫п╦я┘ п╦п╪я▒п╫
я┤п╣я─п╣п╥ /etc/hosts п╦ я┌я─п╟п╫я│п╩я▐я├п╦я▐ п╦п╪п╣п╫п╦ п╡ п╫п╟п╦п╠п╬п╩п╣п╣ п©п╬п╢я┘п╬п╢я▐я┴п╦п╧ п╨п╩п╦п╣п╫я┌я┐ IP-п╟п╢я─п╣я│,
п╣я│п╩п╦ п╢п╩я▐ п╦п╪п╣п╫п╦ п╬п©я─п╣п╢п╣п╩п╣п╫п╬ п╫п╣я│п╨п╬п╩я▄п╨п╬ п╟п╢я─п╣я│п╬п╡ п╦п╥ я─п╟п╥п╫я▀я┘ п©п╬п╢я│п╣я┌п╣п╧.

%package        utils
Summary:        Utilities for manipulating DHCP server leases
Group:          Networking/Other

%description    utils
Utilities that use the standard DHCP protocol to
query/remove a DHCP server's leases.

%prep
%setup
%patch -p1

%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

# Setup version

sed -r -i "s;-DVERSION=.+;-DVERSION='\\\\\"%version\\\\\"';" Makefile

#enable IDN support

%if_with libidn2
sed -i 's;/\* #define HAVE_LIBIDN2 \*/;#define HAVE_LIBIDN2;' src/config.h
%else
sed -i 's;/\* #define HAVE_IDN \*/;#define HAVE_IDN;' src/config.h
%endif

#enable DNSSEC support

sed -i 's;/\* #define HAVE_DNSSEC \*/;#define HAVE_DNSSEC;' src/config.h

%build
# E2K: EDG-based compiler has many false positives
%ifnarch %e2k
%add_optflags -Werror
%endif
%make_build
%make_build -C contrib/lease-tools

%install
%makeinstall_std PREFIX=%prefix

install -d -m770 %buildroot%_sysconfdir/dnsmasq.conf.d
install -pD -m744 %SOURCE1            %buildroot%_initdir/%name
install -pD -m600 %SOURCE2            %buildroot%sysconfig_file
install -pD -m600 %name.conf.example  %buildroot%_sysconfdir/%name.conf
install -pD -m755 %SOURCE3            %buildroot%_sbindir/%name-helper
install -pD -m644 %SOURCE4            %buildroot%_unitdir/%name.service

# For utils package

install -pD -m 755 contrib/lease-tools/dhcp_release %buildroot%_bindir/dhcp_release
install -pD -m 644 contrib/lease-tools/dhcp_release.1 %buildroot%_man1dir/dhcp_release.1
install -pD -m 755 contrib/lease-tools/dhcp_lease_time %buildroot%_bindir/dhcp_lease_time
install -pD -m 644 contrib/lease-tools/dhcp_lease_time.1 %buildroot%_man1dir/dhcp_lease_time.1

# For DNSSEC support

install -pD -m 644 trust-anchors.conf %buildroot%_datadir/%name/trust-anchors.conf

%pre
# Upgrade configuration from previous versions
if test -e %sysconfig_file; then
if grep -Eq '^[^#]*ALL *=' %sysconfig_file; then
   if ! grep -Eq '^[^#]*ALL_DEV *=' %sysconfig_file; then
echo 'NOTE: You should put ALL_DEV=<interface> to %sysconfig_file'
echo '      for keeping DHCP broadcasts mode.'
   fi
fi
fi
# Create dnsmasq user
groupadd -r -f _dnsmasq ||:
useradd -r -g _dnsmasq -d /dev/null -s /dev/null -N _dnsmasq >/dev/null 2>&1 ||:

%post
%post_service %name

%preun
%preun_service %name

%files
%doc CHANGELOG FAQ doc.html setup.html CHANGELOG.archive
%config(noreplace) %_sysconfdir/%name.conf
%dir %_datadir/%name/
%config(noreplace) %_datadir/%name/trust-anchors.conf
%config(noreplace) %_sysconfdir/sysconfig/%name
%dir %_sysconfdir/dnsmasq.conf.d
%_unitdir/%name.service
%_initdir/%name
%_sbindir/%{name}*
%_man8dir/%{name}*
%doc contrib/dnslist contrib/dynamic-dnsmasq

%files utils
%_bindir/dhcp_*
%_man1dir/dhcp_*

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin