2007-01-15 23:51:51 +01:00
|
|
|
#
|
2011-09-07 17:51:39 +02:00
|
|
|
# spec file for package atftp
|
2007-01-15 23:51:51 +01:00
|
|
|
#
|
2021-01-30 09:19:22 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2007-01-15 23:51:51 +01:00
|
|
|
#
|
2008-08-22 23:48:08 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-05-21 13:00:49 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-15 23:51:51 +01:00
|
|
|
#
|
2012-09-13 11:04:36 +02:00
|
|
|
|
|
|
|
|
2012-01-03 13:17:39 +01:00
|
|
|
#
|
2017-11-24 08:06:54 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
|
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
|
|
%endif
|
|
|
|
|
2007-01-15 23:51:51 +01:00
|
|
|
Name: atftp
|
2021-05-26 09:44:03 +02:00
|
|
|
Version: 0.7.4
|
2015-03-20 20:32:59 +01:00
|
|
|
Release: 0
|
2010-10-20 10:52:22 +02:00
|
|
|
Summary: Advanced TFTP Server and Client
|
2019-04-26 11:54:01 +02:00
|
|
|
License: GPL-2.0-or-later
|
2007-01-15 23:51:51 +01:00
|
|
|
Group: System/Daemons
|
2019-04-26 11:54:01 +02:00
|
|
|
URL: https://sourceforge.net/projects/atftp/
|
|
|
|
Source: %{name}-%{version}.tar.gz
|
2007-01-15 23:51:51 +01:00
|
|
|
Source2: atftpd.sysconfig
|
2010-10-20 10:52:22 +02:00
|
|
|
Source3: atftpd.logrotate
|
2015-02-16 14:23:51 +01:00
|
|
|
Source5: atftpd.service
|
|
|
|
Source6: atftpd.socket
|
2011-11-23 15:38:35 +01:00
|
|
|
# PATCH-FIX-SUSE sorcerer's apprentice syndrom (bnc#727843)
|
2019-04-26 11:54:01 +02:00
|
|
|
Patch1: atftp-0.7-sorcerers_apprentice.patch
|
2012-09-13 11:04:36 +02:00
|
|
|
# PATCH-FIX-SUSE server receive thread race (bnc#599856)
|
2019-04-26 11:54:01 +02:00
|
|
|
Patch2: atftp-0.7-server_receive_race.patch
|
2013-02-14 11:50:57 +01:00
|
|
|
# PATCH-FIX-SUSE drop one duplicated ACK each round (bnc#774376)
|
2019-04-26 11:54:01 +02:00
|
|
|
Patch3: atftp-0.7-ack_heuristic.patch
|
|
|
|
Patch4: atftp-0.7-default_user_man.patch
|
2013-02-14 11:50:57 +01:00
|
|
|
# PATCH-FIX-SUSE update default directory in man (bnc#507011)
|
2019-04-26 11:54:01 +02:00
|
|
|
Patch5: atftp-0.7-default_dir_man.patch
|
|
|
|
Patch6: atftp-drop_privileges_non-daemon.patch
|
2015-03-20 20:32:59 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
BuildRequires: tcpd-devel
|
|
|
|
Requires(pre): %fillup_prereq
|
2021-01-30 09:19:22 +01:00
|
|
|
Requires(pre): user(tftp) group(tftp)
|
2015-03-20 20:32:59 +01:00
|
|
|
Recommends: logrotate
|
|
|
|
Conflicts: tftp
|
2013-02-14 11:50:57 +01:00
|
|
|
Provides: tftp(client)
|
|
|
|
Provides: tftp(server)
|
2015-03-20 20:32:59 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-02-16 14:23:51 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
atftp stands for Advanced Trivial File Transfer Protocol. It is called
|
|
|
|
"advanced", in contrast to others TFTP servers, for two reasons. First,
|
|
|
|
it is intended to be fully compliant with all related RFCs. This
|
|
|
|
includes RFC1350, RFC2090, RFC2347, RFC2348, and RFC2349. Second, atftp
|
|
|
|
is intended for serving boot files to large clusters. It is
|
|
|
|
multithreaded and will eventually support multicast, allowing faster
|
|
|
|
boot of hundreds of machines simultaneously.
|
|
|
|
|
|
|
|
%prep
|
2019-04-26 11:54:01 +02:00
|
|
|
%setup -q -n %{name}-%{version}
|
2007-01-15 23:51:51 +01:00
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
|
|
|
%patch5
|
2019-04-26 11:54:01 +02:00
|
|
|
%patch6 -p1
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%build
|
2015-06-16 11:04:00 +02:00
|
|
|
autoreconf -fi
|
2015-06-08 13:06:39 +02:00
|
|
|
CFLAGS="%optflags -fgnu89-inline"
|
2007-01-15 23:51:51 +01:00
|
|
|
%configure
|
2011-09-19 11:12:36 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%install
|
2021-05-26 09:44:03 +02:00
|
|
|
%make_install
|
2007-01-15 23:51:51 +01:00
|
|
|
# SuSE rc
|
2015-03-20 20:32:59 +01:00
|
|
|
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_unitdir}/atftpd.service
|
|
|
|
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_unitdir}/atftpd.socket
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcatftpd
|
2017-11-24 08:06:54 +01:00
|
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.atftpd
|
2015-03-20 20:32:59 +01:00
|
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
2017-09-10 11:50:23 +02:00
|
|
|
install -d -m 0755 %{buildroot}/srv/tftpboot
|
2015-03-20 20:32:59 +01:00
|
|
|
install -d -m 0750 %{buildroot}%{_localstatedir}/log/atftpd
|
2010-10-20 10:52:22 +02:00
|
|
|
|
|
|
|
%pre
|
2010-11-04 16:09:00 +01:00
|
|
|
# fix sysconfig to get new defaults on Update
|
2015-03-20 20:32:59 +01:00
|
|
|
if [ -f %{_sysconfdir}/sysconfig/atftpd ]; then
|
|
|
|
sed -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" %{_sysconfdir}/sysconfig/atftpd
|
|
|
|
sed -i -e "s@^\(ATFTPD_DIRECTORY=\"/tftpboot\"\)@#\1@" %{_sysconfdir}/sysconfig/atftpd
|
2010-10-20 10:52:22 +02:00
|
|
|
fi
|
2015-02-16 14:23:51 +01:00
|
|
|
%service_add_pre atftpd.service atftpd.socket
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%preun
|
2015-02-16 14:23:51 +01:00
|
|
|
%service_del_preun atftpd.service atftpd.socket
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%post
|
2015-02-16 14:23:51 +01:00
|
|
|
%service_add_post atftpd.service atftpd.socket
|
2008-08-22 23:48:08 +02:00
|
|
|
%{fillup_only -n atftpd}
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%postun
|
2015-02-16 14:23:51 +01:00
|
|
|
%service_del_postun atftpd.service atftpd.socket
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2019-04-26 11:54:01 +02:00
|
|
|
%license LICENSE
|
|
|
|
%doc BUGS FAQ README README.MCAST README.PCRE TODO
|
2007-01-15 23:51:51 +01:00
|
|
|
%{_bindir}/atftp
|
|
|
|
%{_sbindir}/atftpd
|
|
|
|
%{_sbindir}/in.tftpd
|
|
|
|
%{_sbindir}/rcatftpd
|
2015-02-16 14:23:51 +01:00
|
|
|
%{_unitdir}/atftpd.service
|
|
|
|
%{_unitdir}/atftpd.socket
|
2015-03-20 20:32:59 +01:00
|
|
|
%config %{_sysconfdir}/logrotate.d/%{name}
|
2017-11-24 08:06:54 +01:00
|
|
|
%{_fillupdir}/sysconfig.atftpd
|
2007-01-15 23:51:51 +01:00
|
|
|
%{_mandir}/man1/atftp.1.gz
|
|
|
|
%{_mandir}/man8/atftpd.8.gz
|
|
|
|
%{_mandir}/man8/in.tftpd.8.gz
|
2016-12-08 10:00:44 +01:00
|
|
|
|
2017-09-10 11:50:23 +02:00
|
|
|
%dir %attr(0755,tftp,tftp) /srv/tftpboot
|
2015-03-20 20:32:59 +01:00
|
|
|
%dir %attr(0750,tftp,tftp) %{_localstatedir}/log/atftpd/
|
2007-01-15 23:51:51 +01:00
|
|
|
|
2007-06-21 19:43:35 +02:00
|
|
|
%changelog
|