From 67215239bf6d34006cb691d1011d37af280c90dcdbb1a1c713fd8569fa6a2c1c Mon Sep 17 00:00:00 2001 From: Uwe Gansert Date: Wed, 8 Feb 2012 16:00:07 +0000 Subject: [PATCH] added tftp group (bnc#738905) OBS-URL: https://build.opensuse.org/package/show/network/dnsmasq?expand=0&rev=30 --- dnsmasq.changes | 6 ++++++ dnsmasq.spec | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dnsmasq.changes b/dnsmasq.changes index 397a9ea..195464d 100644 --- a/dnsmasq.changes +++ b/dnsmasq.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 8 16:56:35 CET 2012 - ug@suse.de + +- added correct group for tftp + (bnc#738905) + ------------------------------------------------------------------- Mon Feb 6 22:25:05 UTC 2012 - crrodriguez@opensuse.org diff --git a/dnsmasq.spec b/dnsmasq.spec index 6c9a91a..afe4e0f 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -16,6 +16,7 @@ # + Name: dnsmasq Summary: Lightweight, Easy-to-Configure DNS Forwarder and DHCP Server License: GPL-2.0+ @@ -62,16 +63,23 @@ export LDFLAGS="-Wl,-z,relro,-z,now -pie" make %{?_smp_mflags} AWK=gawk all-i18n %pre -if ! /usr/bin/getent passwd dnsmasq >/dev/null; then - /usr/sbin/useradd -r -d /var/lib/empty -s /bin/false -c "dnsmasq" -g nogroup dnsmasq || : +if ! /usr/bin/getent group tftp >/dev/null; then + %{_sbindir}/groupadd -r tftp 2>/dev/null || : fi +if ! /usr/bin/getent passwd dnsmasq >/dev/null; then + /usr/sbin/useradd -r -d /var/lib/empty -s /bin/false -c "dnsmasq" -g nogroup -G tftp dnsmasq || : +fi + %service_add_pre %{name}.service + %post %{fillup_and_insserv dnsmasq} %service_add_post %{name}.service + %preun %stop_on_removal dnsmasq %service_del_preun %{name}.service + %postun %restart_on_update dnsmasq %{insserv_cleanup} @@ -91,6 +99,7 @@ install -m 644 SuSEFirewall.dnsmasq-dhcp ${RPM_BUILD_ROOT}/%{_sysconfdir}/syscon install -d 755 ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/ install -m 644 dbus/dnsmasq.conf ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/dnsmasq.conf install -D -m 0644 %SOURCE2 %{buildroot}/lib/systemd/system/dnsmasq.service +install -d -m 0750 ${RPM_BUILD_ROOT}/srv/tftpboot %find_lang %{name} %files -f %{name}.lang @@ -109,5 +118,6 @@ install -D -m 0644 %SOURCE2 %{buildroot}/lib/systemd/system/dnsmasq.service %{_mandir}/es/man8/dnsmasq.8.gz /etc/dbus-1/system.d/dnsmasq.conf /lib/systemd/system/dnsmasq.service +%dir %attr(0750,root,tftp) /srv/tftpboot %changelog