forked from pool/atftp
Accepting request 291321 from home:pluskalm:branches:network
- Do not install service and socket file as executable * change to 0644 - Cleanup spec file with spec-cleaner OBS-URL: https://build.opensuse.org/request/show/291321 OBS-URL: https://build.opensuse.org/package/show/network/atftp?expand=0&rev=24
This commit is contained in:
parent
58e155b9c9
commit
c7d02484d2
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 18 15:23:17 UTC 2015 - mpluskal@suse.com
|
||||||
|
|
||||||
|
- Do not install service and socket file as executable
|
||||||
|
* change to 0644
|
||||||
|
- Cleanup spec file with spec-cleaner
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 16 13:06:57 UTC 2015 - p.drouand@gmail.com
|
Mon Feb 16 13:06:57 UTC 2015 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
74
atftp.spec
74
atftp.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package atftp
|
# spec file for package atftp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,15 +17,14 @@
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
|
%define _fwdefdir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
|
||||||
%define pkg_version 0.7
|
%define pkg_version 0.7
|
||||||
|
|
||||||
Name: atftp
|
Name: atftp
|
||||||
|
Version: 0.7.0
|
||||||
|
Release: 0
|
||||||
Summary: Advanced TFTP Server and Client
|
Summary: Advanced TFTP Server and Client
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
Version: 0.7.0
|
|
||||||
Release: 0
|
|
||||||
Url: ftp://ftp.mamalinux.com/pub/atftp/
|
Url: ftp://ftp.mamalinux.com/pub/atftp/
|
||||||
Source: %{name}-%{pkg_version}.tar.bz2
|
Source: %{name}-%{pkg_version}.tar.bz2
|
||||||
Source1: atftpd.init
|
Source1: atftpd.init
|
||||||
@ -51,24 +50,24 @@ Patch12: atftp-0.7-ack_heuristic.patch
|
|||||||
Patch13: atftp-0.7-default_user_man.patch
|
Patch13: atftp-0.7-default_user_man.patch
|
||||||
# PATCH-FIX-SUSE update default directory in man (bnc#507011)
|
# PATCH-FIX-SUSE update default directory in man (bnc#507011)
|
||||||
Patch14: atftp-0.7-default_dir_man.patch
|
Patch14: atftp-0.7-default_dir_man.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
Provides: tftp(client)
|
|
||||||
Provides: tftp(server)
|
|
||||||
%if 0%{?suse_version} >= 1210
|
|
||||||
BuildRequires: systemd-rpm-macros
|
|
||||||
%{?systemd_requires}
|
|
||||||
%else
|
|
||||||
PreReq: %insserv_prereq
|
|
||||||
%endif
|
|
||||||
PreReq: %fillup_prereq
|
|
||||||
PreReq: pwdutils
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: tcpd-devel
|
BuildRequires: tcpd-devel
|
||||||
Conflicts: tftp
|
Requires(pre): %fillup_prereq
|
||||||
|
Requires(pre): pwdutils
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
|
Conflicts: tftp
|
||||||
|
Provides: tftp(client)
|
||||||
|
Provides: tftp(server)
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%if 0%{?suse_version} >= 1210
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
|
%{?systemd_requires}
|
||||||
|
%else
|
||||||
|
Requires(pre): %insserv_prereq
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
atftp stands for Advanced Trivial File Transfer Protocol. It is called
|
atftp stands for Advanced Trivial File Transfer Protocol. It is called
|
||||||
@ -101,22 +100,22 @@ autoreconf -fi
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
# SuSE rc
|
# SuSE rc
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%{__install} -D -m 0755 %{S:5} %{buildroot}/%{_unitdir}/atftpd.service
|
install -D -m 0644 %{SOURCE5} %{buildroot}/%{_unitdir}/atftpd.service
|
||||||
%{__install} -D -m 0755 %{S:6} %{buildroot}/%{_unitdir}/atftpd.socket
|
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_unitdir}/atftpd.socket
|
||||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcatftpd
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcatftpd
|
||||||
%else
|
%else
|
||||||
%{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/atftpd
|
install -D -m 0755 %{SOURCE1} %{buildroot}%{_initddir}/atftpd
|
||||||
%{__ln_s} -f ../../etc/init.d/atftpd %{buildroot}%{_sbindir}/rcatftpd
|
ln -s -f ../..%{_initddir}/atftpd %{buildroot}%{_sbindir}/rcatftpd
|
||||||
%endif
|
%endif
|
||||||
%{__install} -D -m 0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.atftpd
|
install -D -m 0644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.atftpd
|
||||||
%{__install} -D -m 0644 %{S:3} %{buildroot}/etc/logrotate.d/%{name}
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
%{__mkdir} -p %{buildroot}/%{_fwdefdir}
|
mkdir -p %{buildroot}/%{_fwdefdir}
|
||||||
%{__install} -m 0644 %{S:4} %{buildroot}/%{_fwdefdir}/atftp
|
install -m 0644 %{SOURCE4} %{buildroot}/%{_fwdefdir}/atftp
|
||||||
%{__install} -d -m 0750 %{buildroot}/srv/tftpboot
|
install -d -m 0750 %{buildroot}/srv/tftpboot
|
||||||
%{__install} -d -m 0750 %{buildroot}/var/log/atftpd
|
install -d -m 0750 %{buildroot}%{_localstatedir}/log/atftpd
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
# This group/user is shared with tftp, so please
|
# This group/user is shared with tftp, so please
|
||||||
@ -127,9 +126,9 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcatftpd
|
|||||||
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
|
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
|
||||||
-r -s /bin/false tftp 2>/dev/null || :
|
-r -s /bin/false tftp 2>/dev/null || :
|
||||||
# fix sysconfig to get new defaults on Update
|
# fix sysconfig to get new defaults on Update
|
||||||
if [ -f /etc/sysconfig/atftpd ]; then
|
if [ -f %{_sysconfdir}/sysconfig/atftpd ]; then
|
||||||
%{__sed} -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" /etc/sysconfig/atftpd
|
sed -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" %{_sysconfdir}/sysconfig/atftpd
|
||||||
%{__sed} -i -e "s@^\(ATFTPD_DIRECTORY=\"/tftpboot\"\)@#\1@" /etc/sysconfig/atftpd
|
sed -i -e "s@^\(ATFTPD_DIRECTORY=\"/tftpboot\"\)@#\1@" %{_sysconfdir}/sysconfig/atftpd
|
||||||
fi
|
fi
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%service_add_pre atftpd.service atftpd.socket
|
%service_add_pre atftpd.service atftpd.socket
|
||||||
@ -153,7 +152,7 @@ fi
|
|||||||
%service_del_postun atftpd.service atftpd.socket
|
%service_del_postun atftpd.service atftpd.socket
|
||||||
%else
|
%else
|
||||||
%restart_on_update atftpd
|
%restart_on_update atftpd
|
||||||
%{insserv_cleanup}
|
%insserv_cleanup
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -167,16 +166,15 @@ fi
|
|||||||
%{_unitdir}/atftpd.service
|
%{_unitdir}/atftpd.service
|
||||||
%{_unitdir}/atftpd.socket
|
%{_unitdir}/atftpd.socket
|
||||||
%else
|
%else
|
||||||
/etc/init.d/atftpd
|
%{_initddir}/atftpd
|
||||||
%endif
|
%endif
|
||||||
%config /etc/logrotate.d/%{name}
|
%config %{_sysconfdir}/logrotate.d/%{name}
|
||||||
/var/adm/fillup-templates/sysconfig.atftpd
|
%{_localstatedir}/adm/fillup-templates/sysconfig.atftpd
|
||||||
%{_mandir}/man1/atftp.1.gz
|
%{_mandir}/man1/atftp.1.gz
|
||||||
%{_mandir}/man8/atftpd.8.gz
|
%{_mandir}/man8/atftpd.8.gz
|
||||||
%{_mandir}/man8/in.tftpd.8.gz
|
%{_mandir}/man8/in.tftpd.8.gz
|
||||||
%config %{_fwdefdir}/atftp
|
%config %{_fwdefdir}/atftp
|
||||||
%dir %attr(0750,tftp,tftp) /srv/tftpboot
|
%dir %attr(0750,tftp,tftp) /srv/tftpboot
|
||||||
%dir %attr(0750,tftp,tftp) /var/log/atftpd/
|
%dir %attr(0750,tftp,tftp) %{_localstatedir}/log/atftpd/
|
||||||
#ghost %dir /var/run/atftpd
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user