mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
aftp, bump version (#5803)
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
SUMMARY="Advanced tftp server and client"
|
||||
DESCRIPTION="atftp is a client/server implementation of the TFTP protocol \
|
||||
that implements RFCs 1350, 2090, 2347, 2348, and 2349. The server is \
|
||||
multi-threaded and the client presents a friendly interface using libreadline."
|
||||
HOMEPAGE="https://sourceforge.net/projects/atftp/"
|
||||
COPYRIGHT="2000-2012 Jean-Pierre Lefebvre & Remi Lefebvre"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://sourceforge.net/projects/atftp/files/atftp-$portVersion.tar.gz/download"
|
||||
CHECKSUM_SHA256="ae4c6f09cadb8d2150c3ce32d88f19036a54e8211f22d723e97864bb5e18f92d"
|
||||
SOURCE_FILENAME="atfp-$portVersion.tar.gz"
|
||||
PATCHES="atftp-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
atftp = $portVersion
|
||||
cmd:atftp = $portVersion
|
||||
cmd:atftpd = $portVersion
|
||||
cmd:in.tftpd = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
lib:libncurses
|
||||
lib:libpcre
|
||||
lib:libreadline
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
devel:libncurses
|
||||
devel:libpcre
|
||||
devel:libreadline
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:gcc
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i "s/-lpthread/-lroot/g" configure
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export LDFLAGS="-lnetwork -lbsd"
|
||||
export CPPFLAGS="-D_BSD_SOURCE"
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
68
net-ftp/atftp/atftp-0.7.4.recipe
Normal file
68
net-ftp/atftp/atftp-0.7.4.recipe
Normal file
@@ -0,0 +1,68 @@
|
||||
SUMMARY="Advanced tftp server and client"
|
||||
DESCRIPTION="atftp is a client/server implementation of the TFTP protocol \
|
||||
that implements RFCs 1350, 2090, 2347, 2348, and 2349. The server is \
|
||||
multi-threaded and the client presents a friendly interface using libreadline."
|
||||
HOMEPAGE="https://sourceforge.net/projects/atftp/"
|
||||
COPYRIGHT="2000-2021 Jean-Pierre Lefebvre & Remi Lefebvre"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://sourceforge.net/projects/atftp/files/atftp-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d3c9cd0d971dfc786d7a5f4055c35d4e66aafc8102ac03473ef225bdf7edb26a"
|
||||
SOURCE_FILENAME="atftp-$portVersion.tar.gz"
|
||||
PATCHES="atftp-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
atftp$secondaryArchSuffix = $portVersion
|
||||
cmd:atftp$commandSuffix = $portVersion
|
||||
cmd:atftpd$commandSuffix = $portVersion
|
||||
cmd:in.tftpd$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libncurses$secondaryArchSuffix
|
||||
lib:libpcre$secondaryArchSuffix
|
||||
lib:libreadline$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libncurses$secondaryArchSuffix
|
||||
devel:libpcre$secondaryArchSuffix
|
||||
devel:libreadline$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i "s/-lpthread/-lroot/g" configure
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export LDFLAGS="-lnetwork -lbsd"
|
||||
export CPPFLAGS="-D_BSD_SOURCE"
|
||||
runConfigure --omit-dirs "binDir sbinDir" ./configure \
|
||||
--bindir=$commandBinDir \
|
||||
--sbindir=$commandBinDir
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
@@ -1,71 +1,42 @@
|
||||
From a0ca8184a43966f1b82862ce7aa7caaa3cfb176e Mon Sep 17 00:00:00 2001
|
||||
From a8e25a34fe914b39af7e0af2d8656a5c8ff8d9bc Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Fri, 27 Feb 2015 01:14:25 -0500
|
||||
Subject: [PATCH] Merging Axel's patches from trunk.
|
||||
|
||||
---
|
||||
argz.h | 6 +++++-
|
||||
logger.c | 1 -
|
||||
tftp_def.c | 7 +++----
|
||||
tftp_io.c | 13 +++++++++++--
|
||||
tftpd.c | 6 +++++-
|
||||
5 files changed, 24 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/argz.h b/argz.h
|
||||
index 582be55..f1ded53 100644
|
||||
--- a/argz.h
|
||||
+++ b/argz.h
|
||||
@@ -38,7 +38,7 @@
|
||||
#ifndef _ARGZ_H
|
||||
#define _ARGZ_H 1
|
||||
|
||||
-#include <features.h>
|
||||
+#include <sys/cdefs.h>
|
||||
|
||||
#define __need_error_t
|
||||
#include <errno.h>
|
||||
@@ -52,6 +52,10 @@
|
||||
typedef int error_t;
|
||||
#endif
|
||||
|
||||
+#define __THROW
|
||||
+#define __restrict
|
||||
+#define __attribute_pure__
|
||||
+#define __BEGIN_DECLS
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
diff --git a/logger.c b/logger.c
|
||||
index 2ef1ba3..40d0707 100644
|
||||
index 2ef1ba3..0d47c4a 100644
|
||||
--- a/logger.c
|
||||
+++ b/logger.c
|
||||
@@ -20,7 +20,6 @@
|
||||
@@ -20,7 +20,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
-#include <sys/stat.h>
|
||||
+#ifndef __HAIKU__
|
||||
+ #include <sys/stat.h>
|
||||
+#endif
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
diff --git a/tftp_def.c b/tftp_def.c
|
||||
index 96abdc5..9fcbf36 100644
|
||||
index 428a930..f9286f0 100644
|
||||
--- a/tftp_def.c
|
||||
+++ b/tftp_def.c
|
||||
@@ -159,20 +159,19 @@ int Gethostbyname(char *addr, struct hostent *host)
|
||||
@@ -151,7 +151,6 @@ int Gethostbyname(char *addr, struct hostent *host)
|
||||
struct hostent *hp;
|
||||
char *tmpbuf;
|
||||
size_t tmpbuflen;
|
||||
- int res;
|
||||
int herr;
|
||||
-
|
||||
+
|
||||
|
||||
tmpbuflen = 1024;
|
||||
|
||||
@@ -159,12 +158,12 @@ int Gethostbyname(char *addr, struct hostent *host)
|
||||
if ((tmpbuf = (char *)malloc(tmpbuflen)) == NULL)
|
||||
return ERR;
|
||||
|
||||
- res = gethostbyname_r(addr, host, tmpbuf, tmpbuflen, &hp, &herr);
|
||||
+ hp = gethostbyname_r(addr, host, tmpbuf, tmpbuflen, &herr);
|
||||
+ hp = gethostbyname_r(addr, host, tmpbuf, tmpbuflen, &hp, &herr);
|
||||
|
||||
free(tmpbuf);
|
||||
|
||||
@@ -76,7 +47,7 @@ index 96abdc5..9fcbf36 100644
|
||||
logger(LOG_ERR, "%s: %d: gethostbyname_r: %s",
|
||||
__FILE__, __LINE__, strerror(herr));
|
||||
diff --git a/tftp_io.c b/tftp_io.c
|
||||
index 605a9c2..f84a8b9 100644
|
||||
index a0c702e..abae85d 100644
|
||||
--- a/tftp_io.c
|
||||
+++ b/tftp_io.c
|
||||
@@ -217,8 +217,6 @@ int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa
|
||||
@@ -88,7 +59,7 @@ index 605a9c2..f84a8b9 100644
|
||||
struct iovec iov;
|
||||
char cbuf[1024];
|
||||
|
||||
@@ -288,10 +286,12 @@ int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa
|
||||
@@ -288,11 +286,13 @@ int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa
|
||||
cmsg != NULL && cmsg->cmsg_len >= sizeof(*cmsg);
|
||||
cmsg = CMSG_NXTHDR(&msg, cmsg))
|
||||
{
|
||||
@@ -97,21 +68,24 @@ index 605a9c2..f84a8b9 100644
|
||||
if (cmsg->cmsg_level == SOL_IP
|
||||
&& cmsg->cmsg_type == IP_PKTINFO)
|
||||
{
|
||||
- pktinfo4 = (struct in_pktinfo *)CMSG_DATA(cmsg);
|
||||
+ struct in_pktinfo *pktinfo4;
|
||||
pktinfo4 = (struct in_pktinfo *)CMSG_DATA(cmsg);
|
||||
+ pktinfo4 = (struct in_pktinfo *)CMSG_DATA(cmsg);
|
||||
sa_to->ss_family = AF_INET;
|
||||
((struct sockaddr_in *)sa_to)->sin_addr =
|
||||
@@ -302,12 +302,21 @@ int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa
|
||||
pktinfo4->ipi_addr;
|
||||
@@ -302,11 +302,20 @@ int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_storage *sa
|
||||
if (cmsg->cmsg_level == SOL_IPV6
|
||||
&& cmsg->cmsg_type == IPV6_PKTINFO)
|
||||
{
|
||||
- pktinfo6 = (struct in6_pktinfo *)CMSG_DATA(cmsg);
|
||||
+ struct in6_pktinfo *pktinfo6;
|
||||
pktinfo6 = (struct in6_pktinfo *)CMSG_DATA(cmsg);
|
||||
+ pktinfo6 = (struct in6_pktinfo *)CMSG_DATA(cmsg);
|
||||
sa_to->ss_family = AF_INET6;
|
||||
((struct sockaddr_in6 *)sa_to)->sin6_addr =
|
||||
pktinfo6->ipi6_addr;
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
+#else // !__HAIKU__
|
||||
+ if (cmsg->cmsg_level == IPPROTO_IP
|
||||
+ && cmsg->cmsg_type == IP_RECVDSTADDR)
|
||||
@@ -119,15 +93,14 @@ index 605a9c2..f84a8b9 100644
|
||||
+ struct in_addr *addr = (struct in_addr *)CMSG_DATA(cmsg);
|
||||
+ ((struct sockaddr_in *)sa_to)->sin_addr = *addr;
|
||||
+ }
|
||||
+#endif
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
diff --git a/tftpd.c b/tftpd.c
|
||||
index b9822c4..8611a6f 100644
|
||||
index a7561a5..1c08bb9 100644
|
||||
--- a/tftpd.c
|
||||
+++ b/tftpd.c
|
||||
@@ -334,9 +334,13 @@ int main(int argc, char **argv)
|
||||
@@ -344,10 +344,14 @@ int main(int argc, char **argv)
|
||||
open_logger("atftpd", log_file, logging_level);
|
||||
}
|
||||
|
||||
@@ -142,24 +115,19 @@ index b9822c4..8611a6f 100644
|
||||
{
|
||||
logger(LOG_WARNING, "Failed to set socket option: %s", strerror(errno));
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.2.2
|
||||
2.30.2
|
||||
|
||||
|
||||
From fbddc427e3eb9259093c5d7e392b1dd40a615d69 Mon Sep 17 00:00:00 2001
|
||||
From c5d55c6caf2d2ad918323cb4a554fc1b83363568 Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Fri, 27 Feb 2015 01:26:36 -0500
|
||||
Subject: [PATCH] Disable IPv6.
|
||||
|
||||
---
|
||||
tftp_file.c | 4 ++++
|
||||
tftp_mtftp.c | 4 ++++
|
||||
tftpd_file.c | 2 ++
|
||||
tftpd_mtftp.c | 2 ++
|
||||
4 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/tftp_file.c b/tftp_file.c
|
||||
index 27ae4d0..6dcbcac 100644
|
||||
index 3817166..c44f24a 100644
|
||||
--- a/tftp_file.c
|
||||
+++ b/tftp_file.c
|
||||
@@ -505,10 +505,12 @@ int tftp_receive_file(struct client_data *data)
|
||||
@@ -175,7 +143,7 @@ index 27ae4d0..6dcbcac 100644
|
||||
if (err < 0)
|
||||
{
|
||||
perror("setsockopt");
|
||||
@@ -579,10 +581,12 @@ int tftp_receive_file(struct client_data *data)
|
||||
@@ -585,10 +587,12 @@ int tftp_receive_file(struct client_data *data)
|
||||
err = setsockopt(mcast_sockfd, IPPROTO_IP,
|
||||
IP_DROP_MEMBERSHIP,
|
||||
&mreq.v4, sizeof(mreq.v4));
|
||||
@@ -189,7 +157,7 @@ index 27ae4d0..6dcbcac 100644
|
||||
{
|
||||
perror("setsockopt");
|
||||
diff --git a/tftp_mtftp.c b/tftp_mtftp.c
|
||||
index edc739c..74a5bf3 100644
|
||||
index 2ad55f8..59b8cd5 100644
|
||||
--- a/tftp_mtftp.c
|
||||
+++ b/tftp_mtftp.c
|
||||
@@ -214,9 +214,11 @@ int tftp_mtftp_receive_file(struct client_data *data)
|
||||
@@ -218,10 +186,10 @@ index edc739c..74a5bf3 100644
|
||||
{
|
||||
perror("setsockopt");
|
||||
diff --git a/tftpd_file.c b/tftpd_file.c
|
||||
index da1d6c9..075a29b 100644
|
||||
index 65a0324..c7c3565 100644
|
||||
--- a/tftpd_file.c
|
||||
+++ b/tftpd_file.c
|
||||
@@ -665,9 +665,11 @@ int tftpd_send_file(struct thread_data *data)
|
||||
@@ -678,9 +678,11 @@ int tftpd_send_file(struct thread_data *data)
|
||||
if (data->sa_mcast.ss_family == AF_INET)
|
||||
setsockopt(data->sockfd, IPPROTO_IP, IP_MULTICAST_TTL,
|
||||
&data->mcast_ttl, sizeof(data->mcast_ttl));
|
||||
@@ -234,10 +202,10 @@ index da1d6c9..075a29b 100644
|
||||
/* set options data for OACK */
|
||||
opt_set_multicast(data->tftp_options, data->mc_addr,
|
||||
diff --git a/tftpd_mtftp.c b/tftpd_mtftp.c
|
||||
index f69f9b0..36f9562 100644
|
||||
index 0032905..ee39c12 100644
|
||||
--- a/tftpd_mtftp.c
|
||||
+++ b/tftpd_mtftp.c
|
||||
@@ -475,9 +475,11 @@ void *tftpd_mtftp_server(void *arg)
|
||||
@@ -480,9 +480,11 @@ void *tftpd_mtftp_server(void *arg)
|
||||
if (thread->sa_mcast.ss_family == AF_INET)
|
||||
setsockopt(thread->sockfd, IPPROTO_IP, IP_MULTICAST_TTL,
|
||||
&data->mcast_ttl, sizeof(data->mcast_ttl));
|
||||
@@ -250,5 +218,5 @@ index f69f9b0..36f9562 100644
|
||||
/* give server thread access to mtftp options */
|
||||
thread->mtftp_data = data;
|
||||
--
|
||||
2.2.2
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user