Added tftp-hpa-5.2-r3.
This commit is contained in:
parent
87433dc22c
commit
de1678f982
9
net-ftp/tftp-hpa/Manifest
Normal file
9
net-ftp/tftp-hpa/Manifest
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
AUX in.tftpd.confd-0.44 576 BLAKE2B f5dbab65e92173c3a81ed6790d20b8091616278399471b09b3ec726c5caec1a4ad1864e5ac8b2da7aee7fbfb0a602c879d0317bd3ce6a702af1a01927b0a5da9 SHA512 2aa2f69a6cc86cd0b0ac9dd3c06bb271e3085eb5d44b74edf1b33a9723ba172b0cd0aa92dc0224de52e0572deb9f855e725ed076d8f57c86b509b2fbc03f5075
|
||||||
|
AUX in.tftpd.rc6 334 BLAKE2B 2f7c20b4704b5f3466c838fc79a59785cbb9c46a43037d044dea88caeda0be85f62084f0ff27a8aab20bb129d08dc37602d5a4934c2a6dc1b43c8e3d62c992d4 SHA512 77fd2fd385a6ee9415dfe4a15a993bde86396014cf7cfc0f97fb56c4040ef4becfe103be973b90688d0ee00bb46a36b51297ea46ecf7e32c400373c976de05df
|
||||||
|
AUX tftp-hpa-5.2-gcc-10.patch 1251 BLAKE2B 0701e5495a1d36237fa84ac97403ab2776bcf48ec9529ef486c32d40019de88d6554046e573fd3512cdb0d567f7ba8122c22906fad3e721b6564270db8d5e2cd SHA512 a6729ec1b39dd771efc82ecb9b54da9d21139906f81fca827d1cb870e4367aae3befa34ebc902d664778383019eee451af0076ee6f802f3082eb9056a7655525
|
||||||
|
AUX tftp.service 119 BLAKE2B a2d50dba1103fb7c868e070331c8a2000e65364801abc85d9692040af528bb7b0f84924d6903ea261a504b6e361c45f078cc5c2354a1438a4f18f45ebdcc4649 SHA512 e6be243fb28d014d7492b64cc9e72a29f0d2fcf7cf403f0b41998483c298bc39e83be2d0a6d0b7604d4da71fcb48ad0aabbfd0fa1620597883e66d5a6df222d8
|
||||||
|
AUX tftp.socket 112 BLAKE2B 11e8c6e77819ba772b709843af11449e768db16fe866dc67e4209e83e7d6d273583b2cd9104ba611e3acca0018d915f4313860039a3b0003e556f49f82917ef1 SHA512 d49cdbb7e265aa98d989f8ae96e2c80bfd5887ae0efc6bfcd726d5fa4d83ffc480f5f374e30b8564b05d9690eb2a0c0ed0077982a74946edfbce5d19066d0564
|
||||||
|
AUX tftp.xinetd 219 BLAKE2B d348f13fdfa749b10ec765d5cd90a65a46d266a132dde47dad00fbd1ef4046c250cd9246e7b1fe9590e974a2bc7fcc817535fd2e9447a10c5286f7c4148eec93 SHA512 26883a4feffe8f66fe2c21c05892beeb93fa4511ca5ce18e92273badd4b93afefb0d9cef48e07503037ca37b2ff0cdb24d35e5c24d2e32d8027a5e74c49426f5
|
||||||
|
DIST tftp-hpa-5.2.tar.xz 89564 BLAKE2B 45917ca3d710f8a4b584dbe1e9a912e06fd181e4ffcfd8fba13008f08dbbce0fe339b61fb6f97236b8012e755025d05700214e365adac81dfce42b0edd636e80 SHA512 a5198e923a6e58281f749dc77b3f3ed8579e56b6f0fd6a17482cc88bdc8d34b6702c7c709717885b9b937ecae459d9a832328a49a2e3536dc7432cdb39d2a394
|
||||||
|
EBUILD tftp-hpa-5.2-r3.ebuild 1586 BLAKE2B f99c21b0bca65c7407ea738173a99594fbb974a5262b2bd2fc145105fd4e7eb090284d3fc21222b5b09e16720ada2f00eb312af2f218fee61cb5bacacff8a332 SHA512 da62b4fc08cc1da7d3f69a3276399ed54a191cfe96d2a62c20e9be3c082edd9e95e39471b73894a82586d1ccfeb4b39a4322866a24762962b9efa3f9f5c151ec
|
||||||
|
MISC metadata.xml 395 BLAKE2B c333bf023404a04db911766366b8cae6b4e8390c8dbbdd5339b1a92291208ba6e8b01ce8f44d5f709fe3fd625368ad5077b8563e694ebb9e24d96047e9219150 SHA512 66038f6011f947ab9c23c8601e24a3caeb6055708e2b99b32d2dbb04ecc5bfc2e7b2446fd1010e94e83e92995ff155528f8c240eb38604d3bd11434f05bcc6b3
|
15
net-ftp/tftp-hpa/files/in.tftpd.confd-0.44
Normal file
15
net-ftp/tftp-hpa/files/in.tftpd.confd-0.44
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# /etc/init.d/in.tftpd
|
||||||
|
|
||||||
|
# Path to server files from
|
||||||
|
# Depending on your application you may have to change this.
|
||||||
|
# This is commented out to force you to look at the file!
|
||||||
|
#INTFTPD_PATH="/var/tftp/"
|
||||||
|
#INTFTPD_PATH="/tftpboot/"
|
||||||
|
#INTFTPD_PATH="/tftproot/"
|
||||||
|
|
||||||
|
# For more options, see in.tftpd(8)
|
||||||
|
# -R 4096:32767 solves problems with ARC firmware, and obsoletes
|
||||||
|
# the /proc/sys/net/ipv4/ip_local_port_range hack.
|
||||||
|
# -s causes $INTFTPD_PATH to be the root of the TFTP tree.
|
||||||
|
# -l is passed by the init script in addition to these options.
|
||||||
|
INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}"
|
19
net-ftp/tftp-hpa/files/in.tftpd.rc6
Normal file
19
net-ftp/tftp-hpa/files/in.tftpd.rc6
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2005 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting tftpd"
|
||||||
|
/usr/sbin/in.tftpd -l ${INTFTPD_OPTS}
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping tftpd"
|
||||||
|
start-stop-daemon --stop --exec /usr/sbin/in.tftpd
|
||||||
|
eend $?
|
||||||
|
}
|
42
net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch
Normal file
42
net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
From 7afd5aa65fdabaa4583f6e1a84936eb9bdd33c65 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||||
|
Date: Tue, 21 Jan 2020 23:10:46 +0000
|
||||||
|
Subject: [PATCH] tftp-hpa: fix build failure against gcc-10
|
||||||
|
|
||||||
|
On gcc-10 (and gcc-9 -fno-common) build fails as:
|
||||||
|
|
||||||
|
```
|
||||||
|
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu tftp.o main.o ../common/libcommon.a -lreadline -liberty -o tftp
|
||||||
|
ld: main.o:(.bss+0x40):
|
||||||
|
multiple definition of `toplevel'; tftp.o:(.bss+0x100): first defined here
|
||||||
|
collect2: error: ld returned 1 exit status
|
||||||
|
make[1]: *** [Makefile:12: tftp] Error 1
|
||||||
|
```
|
||||||
|
|
||||||
|
gcc-10 will change the default from -fcommon to fno-common:
|
||||||
|
https://gcc.gnu.org/PR85678.
|
||||||
|
|
||||||
|
The error also happens if CFLAGS=-fno-common passed explicitly.
|
||||||
|
|
||||||
|
Bug: https://bugs.gentoo.org/705834
|
||||||
|
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||||
|
---
|
||||||
|
tftp/tftp.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tftp/tftp.c b/tftp/tftp.c
|
||||||
|
index d15da22..d067f96 100644
|
||||||
|
--- a/tftp/tftp.c
|
||||||
|
+++ b/tftp/tftp.c
|
||||||
|
@@ -48,7 +48,7 @@ extern int maxtimeout;
|
||||||
|
#define PKTSIZE SEGSIZE+4
|
||||||
|
char ackbuf[PKTSIZE];
|
||||||
|
int timeout;
|
||||||
|
-sigjmp_buf toplevel;
|
||||||
|
+extern sigjmp_buf toplevel;
|
||||||
|
sigjmp_buf timeoutbuf;
|
||||||
|
|
||||||
|
static void nak(int, const char *);
|
||||||
|
--
|
||||||
|
2.25.0
|
||||||
|
|
6
net-ftp/tftp-hpa/files/tftp.service
Normal file
6
net-ftp/tftp-hpa/files/tftp.service
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Tftp Server
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/in.tftpd -R 4096:32767 -s /tftproot
|
||||||
|
StandardInput=socket
|
8
net-ftp/tftp-hpa/files/tftp.socket
Normal file
8
net-ftp/tftp-hpa/files/tftp.socket
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Tftp Server Activation Socket
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenDatagram=69
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
10
net-ftp/tftp-hpa/files/tftp.xinetd
Normal file
10
net-ftp/tftp-hpa/files/tftp.xinetd
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
service tftp
|
||||||
|
{
|
||||||
|
disable = yes
|
||||||
|
socket_type = dgram
|
||||||
|
protocol = udp
|
||||||
|
wait = yes
|
||||||
|
user = root
|
||||||
|
server = /usr/sbin/in.tftpd
|
||||||
|
server_args = -R 4096:32767 -s /tftpboot
|
||||||
|
}
|
12
net-ftp/tftp-hpa/metadata.xml
Normal file
12
net-ftp/tftp-hpa/metadata.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>base-system@gentoo.org</email>
|
||||||
|
<name>Gentoo Base System</name>
|
||||||
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="client">Compile and install the tftp client</flag>
|
||||||
|
<flag name="server">Compile and install the tftp server</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
79
net-ftp/tftp-hpa/tftp-hpa-5.2-r3.ebuild
Normal file
79
net-ftp/tftp-hpa/tftp-hpa-5.2-r3.ebuild
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="7"
|
||||||
|
|
||||||
|
inherit systemd toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="Port of the OpenBSD TFTP server"
|
||||||
|
HOMEPAGE="https://www.kernel.org/pub/software/network/tftp/"
|
||||||
|
SRC_URI="https://www.kernel.org/pub/software/network/tftp/${PN}/${P}.tar.xz"
|
||||||
|
|
||||||
|
LICENSE="BSD-4"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos"
|
||||||
|
IUSE="ipv6 readline selinux tcpd +client +server"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
readline? ( sys-libs/readline:0= )
|
||||||
|
tcpd? ( sys-apps/tcp-wrappers )
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="${DEPEND}
|
||||||
|
selinux? ( sec-policy/selinux-tftp )
|
||||||
|
!net-ftp/atftp
|
||||||
|
server? (
|
||||||
|
!net-ftp/uftpd
|
||||||
|
)
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/tftp-hpa-5.2-gcc-10.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
sed -i "/^AR/s:ar:$(tc-getAR):" MCONFIG.in || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local myconf=(
|
||||||
|
ac_cv_search_bsd_signal=no
|
||||||
|
$(use_with ipv6)
|
||||||
|
$(use_with tcpd tcpwrappers)
|
||||||
|
$(use_with readline)
|
||||||
|
)
|
||||||
|
econf "${myconf[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
emake version.h
|
||||||
|
emake -C lib
|
||||||
|
emake -C common
|
||||||
|
if use client; then
|
||||||
|
emake -C tftp
|
||||||
|
fi
|
||||||
|
if use server; then
|
||||||
|
emake -C tftpd
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dodoc README* CHANGES tftpd/sample.rules
|
||||||
|
|
||||||
|
if use client; then
|
||||||
|
emake INSTALLROOT="${D}" -C tftp install
|
||||||
|
fi
|
||||||
|
if use server; then
|
||||||
|
emake INSTALLROOT="${D}" -C tftpd install
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}"/in.tftpd.confd-0.44 in.tftpd
|
||||||
|
newinitd "${FILESDIR}"/in.tftpd.rc6 in.tftpd
|
||||||
|
|
||||||
|
systemd_dounit "${FILESDIR}"/tftp.service
|
||||||
|
systemd_dounit "${FILESDIR}"/tftp.socket
|
||||||
|
|
||||||
|
insinto /etc/xinetd.d
|
||||||
|
newins "${FILESDIR}"/tftp.xinetd tftp
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in a new issue