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
|
|
|
#
|
2012-01-03 13:17:39 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
2007-01-15 23:51:51 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2012-09-13 11:04:36 +02:00
|
|
|
|
|
|
|
|
2012-01-03 13:17:39 +01:00
|
|
|
#
|
2012-09-13 11:04:36 +02:00
|
|
|
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
2010-10-20 10:52:22 +02:00
|
|
|
%define pkg_version 0.7
|
2008-04-04 01:24:41 +02:00
|
|
|
|
2007-01-15 23:51:51 +01:00
|
|
|
Name: atftp
|
2010-10-20 10:52:22 +02:00
|
|
|
Summary: Advanced TFTP Server and Client
|
2011-11-23 15:38:35 +01:00
|
|
|
License: GPL-2.0+
|
2007-01-15 23:51:51 +01:00
|
|
|
Group: System/Daemons
|
2012-01-03 13:17:39 +01:00
|
|
|
Version: 0.7.0
|
|
|
|
Release: 0
|
2008-04-04 01:24:41 +02:00
|
|
|
Url: ftp://ftp.mamalinux.com/pub/atftp/
|
2007-01-15 23:51:51 +01:00
|
|
|
Source: %{name}-%{pkg_version}.tar.bz2
|
|
|
|
Source1: atftpd.init.d
|
|
|
|
Source2: atftpd.sysconfig
|
2010-10-20 10:52:22 +02:00
|
|
|
Source3: atftpd.logrotate
|
2012-09-13 11:04:36 +02:00
|
|
|
Source4: atftp.fw
|
2007-01-15 23:51:51 +01:00
|
|
|
Patch1: atftp-0.7.dif
|
|
|
|
Patch2: atftp-CLK_TCK.diff
|
|
|
|
Patch3: atftp-0.7_compiler_warnings.patch
|
|
|
|
Patch4: atftp-0.7_thread_crash.patch
|
|
|
|
Patch5: atftp-0.7_sol_ip.patch
|
2007-01-23 01:12:40 +01:00
|
|
|
Patch6: atftp-0.7_bug-213384_OPT_NUMBER.patch
|
2008-04-04 01:24:41 +02:00
|
|
|
Patch7: atftpd-0.7_unprotected_assignments_crash.patch
|
2008-09-12 22:58:04 +02:00
|
|
|
Patch8: atftpd-0.7_circumvent_tftp_size_restrictions.patch
|
2011-11-23 15:38:35 +01:00
|
|
|
# PATCH-FIX-SUSE sorcerer's apprentice syndrom (bnc#727843)
|
|
|
|
Patch9: atftp-0.7-sorcerers_apprentice.patch
|
2012-09-13 11:04:36 +02:00
|
|
|
# PATCH-FIX-SUSE server receive thread race (bnc#599856)
|
|
|
|
Patch10: atftp-0.7-server_receive_race.patch
|
|
|
|
Patch11: atftp-0.7-prevent-sas.patch
|
2010-10-20 10:52:22 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
PreReq: %insserv_prereq %fillup_prereq
|
2011-09-07 17:51:39 +02:00
|
|
|
PreReq: pwdutils
|
2012-01-03 13:17:39 +01:00
|
|
|
BuildRequires: autoconf
|
2011-12-01 12:46:12 +01:00
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
BuildRequires: tcpd-devel
|
2010-10-20 10:52:22 +02:00
|
|
|
Conflicts: tftp
|
|
|
|
Recommends: logrotate
|
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
|
|
|
|
%setup -q -n %{name}-%{pkg_version}
|
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
|
|
|
%patch5
|
2007-01-23 01:12:40 +01:00
|
|
|
%patch6
|
2008-04-04 01:24:41 +02:00
|
|
|
%patch7
|
2008-09-12 22:58:04 +02:00
|
|
|
%patch8
|
2011-11-23 15:38:35 +01:00
|
|
|
%patch9 -p1
|
2012-09-13 11:04:36 +02:00
|
|
|
%patch10 -p0
|
|
|
|
%patch11 -p1
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
autoreconf -fi
|
|
|
|
%configure
|
2011-09-19 11:12:36 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
|
|
|
# SuSE rc
|
|
|
|
%{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/atftpd
|
|
|
|
%{__ln_s} -f ../../etc/init.d/atftpd %{buildroot}%{_sbindir}/rcatftpd
|
|
|
|
%{__install} -D -m 0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.atftpd
|
2010-11-04 16:09:00 +01:00
|
|
|
%{__install} -D -m 0644 %{S:3} %{buildroot}/etc/logrotate.d/%{name}
|
2012-09-13 11:04:36 +02:00
|
|
|
%{__mkdir} -p %{buildroot}/%{_fwdefdir}
|
|
|
|
%{__install} -m 0644 %{S:4} %{buildroot}/%{_fwdefdir}/atftp
|
2010-11-04 16:09:00 +01:00
|
|
|
%{__install} -d -m 0750 %{buildroot}/srv/tftpboot
|
|
|
|
%{__install} -d -m 0750 %{buildroot}/var/log/atftpd
|
2010-10-20 10:52:22 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
# This group/user is shared with tftp, so please
|
|
|
|
# keep this in sync with tftp.spec
|
2010-11-04 16:09:00 +01:00
|
|
|
# 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
|
2010-10-20 10:52:22 +02:00
|
|
|
if [ -f /etc/sysconfig/atftpd ]; then
|
|
|
|
%{__sed} -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" /etc/sysconfig/atftpd
|
|
|
|
%{__sed} -i -e "s@^\(ATFTPD_DIRECTORY=\"/tftpboot\"\)@#\1@" /etc/sysconfig/atftpd
|
|
|
|
fi
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal atftpd
|
|
|
|
|
|
|
|
%post
|
2008-08-22 23:48:08 +02:00
|
|
|
%{fillup_only -n atftpd}
|
2007-01-15 23:51:51 +01:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update atftpd
|
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-10-20 10:52:22 +02:00
|
|
|
%doc BUGS FAQ LICENSE README README.MCAST README.PCRE TODO
|
2007-01-15 23:51:51 +01:00
|
|
|
%{_bindir}/atftp
|
|
|
|
%{_sbindir}/atftpd
|
|
|
|
%{_sbindir}/in.tftpd
|
|
|
|
%{_sbindir}/rcatftpd
|
|
|
|
/etc/init.d/atftpd
|
2010-10-20 10:52:22 +02:00
|
|
|
%config /etc/logrotate.d/%{name}
|
2007-01-15 23:51:51 +01:00
|
|
|
/var/adm/fillup-templates/sysconfig.atftpd
|
|
|
|
%{_mandir}/man1/atftp.1.gz
|
|
|
|
%{_mandir}/man8/atftpd.8.gz
|
|
|
|
%{_mandir}/man8/in.tftpd.8.gz
|
2012-09-13 11:04:36 +02:00
|
|
|
%config %{_fwdefdir}/atftp
|
2010-11-04 16:09:00 +01:00
|
|
|
%dir %attr(0750,root,tftp) /srv/tftpboot
|
|
|
|
%dir %attr(0750,tftp,root) /var/log/atftpd/
|
2007-01-15 23:51:51 +01:00
|
|
|
|
2007-06-21 19:43:35 +02:00
|
|
|
%changelog
|