Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 9a70648965 | |||
| e43eda170f | |||
| e568f99f8d | |||
| 855be02258 | |||
| 045cc26293 | |||
| a4862770a9 |
50
tftp-c99.patch
Normal file
50
tftp-c99.patch
Normal 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);
|
||||
18
tftp.changes
18
tftp.changes
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user