6 Commits

Author SHA256 Message Date
9a70648965 Accepting request 1296245 from network
- Allow enabling the service via `systemctl enable tftp` to create
  the tftp.socket symlink [bsc#1215520, bsc#1246141]

OBS-URL: https://build.opensuse.org/request/show/1296245
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tftp?expand=0&rev=48
2025-07-30 09:41:35 +00:00
e43eda170f - Allow enabling the service via systemctl enable tftp to create
the tftp.socket symlink [bsc#1215520, bsc#1246141]

OBS-URL: https://build.opensuse.org/package/show/network/tftp?expand=0&rev=64
2025-07-29 07:20:50 +00:00
e568f99f8d Accepting request 1269981 from network
OBS-URL: https://build.opensuse.org/request/show/1269981
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tftp?expand=0&rev=47
2025-04-18 14:14:12 +00:00
855be02258 add -std=gnu11 to CFLAGS to fix gcc15 compile time error, and to still allow build on Leap 15.6
OBS-URL: https://build.opensuse.org/package/show/network/tftp?expand=0&rev=62
2025-04-16 11:23:49 +00:00
045cc26293 Accepting request 1181869 from network
OBS-URL: https://build.opensuse.org/request/show/1181869
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tftp?expand=0&rev=46
2024-06-21 14:02:12 +00:00
a4862770a9 - Add tftp-c99.patch to avoid calling undeclaed function and thus make
the package buildable with GCC 14 [boo#1225935]

OBS-URL: https://build.opensuse.org/package/show/network/tftp?expand=0&rev=60
2024-06-20 06:59:45 +00:00
4 changed files with 77 additions and 2 deletions

50
tftp-c99.patch Normal file
View File

@@ -0,0 +1,50 @@
The glibc headers do not declare bsd_signal by default. Call signal
instead, which is the same function as bsd_signal in current glibc.
This fixes implicit function declarations and avoids build issues with
future compilers.
Index: tftp-hpa-5.2/tftp/main.c
===================================================================
--- tftp-hpa-5.2.orig/tftp/main.c
+++ tftp-hpa-5.2/tftp/main.c
@@ -306,7 +306,7 @@ int main(int argc, char *argv[])
sp->s_proto = (char *)"udp";
}
- bsd_signal(SIGINT, intr);
+ signal(SIGINT, intr);
if (peerargc > 1) {
/* Set peer */
@@ -772,7 +772,7 @@ void intr(int sig)
{
(void)sig; /* Quiet unused warning */
- bsd_signal(SIGALRM, SIG_IGN);
+ signal(SIGALRM, SIG_IGN);
alarm(0);
siglongjmp(toplevel, -1);
}
Index: tftp-hpa-5.2/tftp/tftp.c
===================================================================
--- tftp-hpa-5.2.orig/tftp/tftp.c
+++ tftp-hpa-5.2/tftp/tftp.c
@@ -85,7 +85,7 @@ void tftp_sendfile(int fd, const char *n
is_request = 1; /* First packet is the actual WRQ */
amount = 0;
- bsd_signal(SIGALRM, timer);
+ signal(SIGALRM, timer);
do {
if (is_request) {
size = makerequest(WRQ, name, dp, mode) - 4;
@@ -191,7 +191,7 @@ void tftp_recvfile(int fd, const char *n
firsttrip = 1;
amount = 0;
- bsd_signal(SIGALRM, timer);
+ signal(SIGALRM, timer);
do {
if (firsttrip) {
size = makerequest(RRQ, name, ap, mode);

View File

@@ -1,3 +1,21 @@
-------------------------------------------------------------------
Tue Jul 29 07:19:02 UTC 2025 - Angel Yankov <angel.yankov@suse.com>
- Allow enabling the service via `systemctl enable tftp` to create
the tftp.socket symlink [bsc#1215520, bsc#1246141]
-------------------------------------------------------------------
Tue Apr 8 10:20:18 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
- add -std=gnu11 to CFLAGS to fix gcc15 compile time error, and to
still allow build on Leap 15.6
-------------------------------------------------------------------
Wed Jun 19 15:41:54 UTC 2024 - Martin Jambor <mjambor@suse.com>
- Add tftp-c99.patch to avoid calling undeclaed function and thus make
the package buildable with GCC 14 [boo#1225935]
-------------------------------------------------------------------
Wed Dec 7 16:28:52 UTC 2022 - Marcus Meissner <meissner@suse.com>

View File

@@ -9,6 +9,10 @@ EnvironmentFile=/etc/sysconfig/tftp
ExecStart=/usr/sbin/in.tftpd -u $TFTP_USER -s $TFTP_OPTIONS $TFTP_DIRECTORY
StandardInput=socket
PrivateDevices=yes
[Install]
Also=tftp.socket
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full

View File

@@ -1,7 +1,7 @@
#
# spec file for package tftp
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -39,6 +39,9 @@ Patch6: tftp-multi-addresses.patch
Patch7: tftp-hpa-0.48-macros-crash.patch
Patch8: tftp-hpa-0.48-macros-v6mapped.patch
Patch43: tftp-config_h.patch
# Fix for boo#1225935, originally from
# https://bugzilla.redhat.com/show_bug.cgi?id=2148911
Patch44: tftp-c99.patch
BuildRequires: autoconf
BuildRequires: binutils-devel
BuildRequires: pkgconfig
@@ -62,7 +65,7 @@ component configuration files.
%build
autoreconf -fi
export CFLAGS="%{optflags} -fcommon"
export CFLAGS="%{optflags} -fcommon -std=gnu11"
%configure \
--enable-largefile \
--with-tcpwrappers \