SHA256
1
0
forked from pool/atftp

Accepting request 865253 from home:kukuk:branches:network

- Use system wide tftp user/group, don't create them again

OBS-URL: https://build.opensuse.org/request/show/865253
OBS-URL: https://build.opensuse.org/package/show/network/atftp?expand=0&rev=46
This commit is contained in:
Marcus Meissner 2021-01-30 08:19:22 +00:00 committed by Git OBS Bridge
parent fa4c7b8743
commit 71f1cecf60
2 changed files with 7 additions and 10 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jan 21 08:30:09 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- Use system wide tftp user/group, don't create them again
-------------------------------------------------------------------
Wed Oct 21 18:19:51 UTC 2020 - Pedro Monreal <pmonreal@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package atftp
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -52,14 +52,13 @@ BuildRequires: pcre-devel
BuildRequires: readline-devel
BuildRequires: tcpd-devel
Requires(pre): %fillup_prereq
Requires(pre): pwdutils
Requires(pre): user(tftp) group(tftp)
Recommends: logrotate
Conflicts: tftp
Provides: tftp(client)
Provides: tftp(server)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%description
atftp stands for Advanced Trivial File Transfer Protocol. It is called
@ -98,13 +97,6 @@ install -d -m 0755 %{buildroot}/srv/tftpboot
install -d -m 0750 %{buildroot}%{_localstatedir}/log/atftpd
%pre
# This group/user is shared with tftp, so please
# keep this in sync with tftp.spec
# add group
%{_sbindir}/groupadd -r tftp 2>/dev/null || :
# add user
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
-r -s /bin/false tftp 2>/dev/null || :
# fix sysconfig to get new defaults on Update
if [ -f %{_sysconfdir}/sysconfig/atftpd ]; then
sed -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" %{_sysconfdir}/sysconfig/atftpd