SHA256
1
0
forked from pool/atftp

Accepting request 206687 from home:computersalat:devel:network

rebase patches, remove 'ghost /var/run/atftp' from spec

OBS-URL: https://build.opensuse.org/request/show/206687
OBS-URL: https://build.opensuse.org/package/show/network/atftp?expand=0&rev=20
This commit is contained in:
Vítězslav Čížek 2013-11-15 11:54:26 +00:00 committed by Git OBS Bridge
parent 967cd543e5
commit 9f1ef11be3
12 changed files with 89 additions and 76 deletions

View File

@ -1,7 +1,7 @@
Index: atftp-0.7/tftpd_file.c
Index: tftpd_file.c
===================================================================
--- atftp-0.7.orig/tftpd_file.c 2013-02-06 16:15:50.178332917 +0100
+++ atftp-0.7/tftpd_file.c 2013-02-06 16:16:49.608140471 +0100
--- tftpd_file.c.orig
+++ tftpd_file.c
@@ -402,7 +402,6 @@ int tftpd_send_file(struct thread_data *
int timeout_state = state;
int result;

View File

@ -1,7 +1,7 @@
Index: atftp-0.7/atftpd.8
Index: atftpd.8
===================================================================
--- atftp-0.7.orig/atftpd.8 2012-11-16 11:50:17.618281568 +0100
+++ atftp-0.7/atftpd.8 2013-01-03 14:27:00.913280412 +0100
--- atftpd.8.orig
+++ atftpd.8
@@ -210,7 +210,7 @@ Show summary of options.
.B path
This is the root directory used by the TFTP server. All requested

View File

@ -1,7 +1,7 @@
Index: atftp-0.7/atftpd.8
Index: atftpd.8
===================================================================
--- atftp-0.7.orig/atftpd.8 2012-11-16 11:46:18.798067178 +0100
+++ atftp-0.7/atftpd.8 2012-11-16 11:50:17.618281568 +0100
--- atftpd.8.orig
+++ atftpd.8
@@ -80,10 +80,10 @@ acknowledging the 'multicast' request by
.TP

View File

@ -1,8 +1,8 @@
Index: tftpd_file.c
===================================================================
--- tftpd_file.c.orig 2012-08-06 10:26:36.356745154 +0200
+++ tftpd_file.c 2012-08-06 11:27:59.265571512 +0200
@@ -113,7 +113,7 @@ int tftpd_receive_file(struct thread_dat
--- tftpd_file.c.orig
+++ tftpd_file.c
@@ -114,7 +114,7 @@ int tftpd_receive_file(struct thread_dat
struct sockaddr_in *sa = &data->client_info->client;
struct sockaddr_in from;
struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer;
@ -11,7 +11,7 @@ Index: tftpd_file.c
char filename[MAXLEN];
char string[MAXLEN];
int timeout = data->timeout;
@@ -143,18 +143,6 @@ int tftpd_receive_file(struct thread_dat
@@ -144,18 +144,6 @@ int tftpd_receive_file(struct thread_dat
return ERR;
}
@ -30,7 +30,7 @@ Index: tftpd_file.c
/* tsize option */
if (((result = opt_get_tsize(data->tftp_options)) > -1) && !convert)
{
@@ -171,7 +159,6 @@ int tftpd_receive_file(struct thread_dat
@@ -172,7 +160,6 @@ int tftpd_receive_file(struct thread_dat
if (data->trace)
logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", EOPTNEG,
tftp_errmsg[EOPTNEG]);
@ -38,7 +38,7 @@ Index: tftpd_file.c
return ERR;
}
timeout = result;
@@ -188,7 +175,6 @@ int tftpd_receive_file(struct thread_dat
@@ -189,7 +176,6 @@ int tftpd_receive_file(struct thread_dat
if (data->trace)
logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", EOPTNEG,
tftp_errmsg[EOPTNEG]);
@ -46,7 +46,7 @@ Index: tftpd_file.c
return ERR;
}
@@ -198,7 +184,6 @@ int tftpd_receive_file(struct thread_dat
@@ -199,7 +185,6 @@ int tftpd_receive_file(struct thread_dat
if (data->data_buffer == NULL)
{
logger(LOG_ERR, "memory allocation failure");
@ -54,7 +54,7 @@ Index: tftpd_file.c
return ERR;
}
tftphdr = (struct tftphdr *)data->data_buffer;
@@ -209,7 +194,6 @@ int tftpd_receive_file(struct thread_dat
@@ -210,7 +195,6 @@ int tftpd_receive_file(struct thread_dat
if (data->trace)
logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", ENOSPACE,
tftp_errmsg[ENOSPACE]);
@ -62,7 +62,7 @@ Index: tftpd_file.c
return ERR;
}
opt_set_blksize(result, data->tftp_options);
@@ -342,6 +326,20 @@ int tftpd_receive_file(struct thread_dat
@@ -343,6 +327,20 @@ int tftpd_receive_file(struct thread_dat
}
break;
case S_DATA_RECEIVED:
@ -83,7 +83,7 @@ Index: tftpd_file.c
/* We need to seek to the right place in the file */
block_number = ntohs(tftphdr->th_block);
if (data->trace)
@@ -369,13 +367,13 @@ int tftpd_receive_file(struct thread_dat
@@ -370,13 +368,13 @@ int tftpd_receive_file(struct thread_dat
state = S_SEND_ACK;
break;
case S_END:

View File

@ -1,6 +1,7 @@
diff -u atftp-0.7/tftp_file.c atftp-0.7/tftp_file.c
--- atftp-0.7/tftp_file.c 2012-03-27 11:39:59.441167084 +0200
+++ atftp-0.7/tftp_file.c 2012-09-11 13:55:28.422295562 +0200
Index: tftp_file.c
===================================================================
--- tftp_file.c.orig
+++ tftp_file.c
@@ -49,6 +49,7 @@
#define NB_BLOCK 2048
@ -9,7 +10,7 @@ diff -u atftp-0.7/tftp_file.c atftp-0.7/tftp_file.c
/*
* Find a hole in the file bitmap.
@@ -605,6 +606,7 @@
@@ -605,6 +606,7 @@ int tftp_send_file(struct client_data *d
int timeout_state = state; /* what state should we go on when timeout */
int result;
long block_number = 0;
@ -17,7 +18,7 @@ diff -u atftp-0.7/tftp_file.c atftp-0.7/tftp_file.c
long last_block = -1;
int data_size; /* size of data received */
int sockfd = data->sockfd; /* just to simplify calls */
@@ -765,6 +767,20 @@
@@ -765,6 +767,20 @@ int tftp_send_file(struct client_data *d
connected = 1;
}
block_number = ntohs(tftphdr->th_block);
@ -38,9 +39,10 @@ diff -u atftp-0.7/tftp_file.c atftp-0.7/tftp_file.c
if (data->trace)
fprintf(stderr, "received ACK <block: %ld>\n",
block_number);
diff -u atftp-0.7/tftpd_file.c atftp-0.7/tftpd_file.c
--- atftp-0.7/tftpd_file.c 2012-03-30 14:02:04.335089843 +0200
+++ atftp-0.7/tftpd_file.c 2012-09-11 13:55:28.422295562 +0200
Index: tftpd_file.c
===================================================================
--- tftpd_file.c.orig
+++ tftpd_file.c
@@ -55,6 +55,7 @@
extern char directory[MAXLEN];
/* read only except for the main thread */
@ -49,7 +51,7 @@ diff -u atftp-0.7/tftpd_file.c atftp-0.7/tftpd_file.c
#ifdef HAVE_PCRE
extern tftpd_pcre_self_t *pcre_top;
@@ -403,6 +404,7 @@
@@ -403,6 +404,7 @@ int tftpd_send_file(struct thread_data *
int timeout_state = state;
int result;
long block_number = 0;
@ -57,7 +59,7 @@ diff -u atftp-0.7/tftpd_file.c atftp-0.7/tftpd_file.c
long last_block = -1;
int block_loops = 0;
int data_size;
@@ -785,6 +787,10 @@
@@ -785,6 +787,10 @@ int tftpd_send_file(struct thread_data *
inet_ntoa(client_info->client.sin_addr),
ntohs(client_info->client.sin_port));
sa = &client_info->client;
@ -68,7 +70,8 @@ diff -u atftp-0.7/tftpd_file.c atftp-0.7/tftpd_file.c
state = S_SEND_OACK;
break;
}
@@ -858,5 +864,31 @@
@@ -859,6 +865,32 @@ int tftpd_send_file(struct thread_data *
{
logger(LOG_DEBUG, "received ACK <block: %d>", block_number);
}
+
@ -100,7 +103,7 @@ diff -u atftp-0.7/tftpd_file.c atftp-0.7/tftpd_file.c
if (ntohs(tftphdr->th_block) == 65535)
{
block_loops++;
@@ -958,6 +990,8 @@
@@ -958,6 +990,8 @@ int tftpd_send_file(struct thread_data *
/* nedd to send an oack to that client */
state = S_SEND_OACK;
fseek(fp, 0, SEEK_SET);
@ -109,10 +112,10 @@ diff -u atftp-0.7/tftpd_file.c atftp-0.7/tftpd_file.c
}
else
{
only in patch2:
unchanged:
--- atftp-0.7.orig/tftpd.c 2012-09-11 13:55:28.303292010 +0200
+++ atftp-0.7/tftpd.c 2012-09-11 13:58:20.701437613 +0200
Index: tftpd.c
===================================================================
--- tftpd.c.orig
+++ tftpd.c
@@ -62,6 +62,7 @@ int retry_timeout = S_TIMEOUT;
int tftpd_daemon = 0; /* By default we are started by inetd */
@ -147,10 +150,10 @@ unchanged:
" --user <user[.group]> : default is nobody\n"
" --group <group> : default is nogroup\n"
" --port <port> : port on which atftp listen\n"
only in patch2:
unchanged:
--- atftp-0.7.orig/tftp.c 2012-09-11 13:55:28.255290577 +0200
+++ atftp-0.7/tftp.c 2012-09-11 14:01:13.437593304 +0200
Index: tftp.c
===================================================================
--- tftp.c.orig
+++ tftp.c
@@ -57,6 +57,7 @@
/* defined as extern in tftp_file.c and mtftp_file.c, set by the signal
handler */
@ -185,10 +188,10 @@ unchanged:
" --verbose : set verbose mode on\n"
" --trace : set trace mode on\n"
#if DEBUG
only in patch2:
unchanged:
--- atftp-0.7.orig/atftpd.8 2004-03-06 21:41:40.000000000 +0100
+++ atftp-0.7/atftpd.8 2012-09-11 13:55:28.423295591 +0200
Index: atftpd.8
===================================================================
--- atftpd.8.orig
+++ atftpd.8
@@ -180,6 +180,14 @@ implication. Be aware that this option v
option has effect only for non-multicast transfer.
@ -204,10 +207,10 @@ unchanged:
.B \-\-mcast\-switch\-client
This option allow the server to proceed with the next multicast client
as soon as the current client timeout. When the current master client
only in patch2:
unchanged:
--- atftp-0.7.orig/atftp.1 2004-03-06 21:41:40.000000000 +0100
+++ atftp-0.7/atftp.1 2012-09-11 13:55:28.423295591 +0200
Index: atftp.1
===================================================================
--- atftp.1.orig
+++ atftp.1
@@ -77,6 +77,14 @@ to configure client side port to use.
See atftpd's man page.

View File

@ -6,8 +6,8 @@
Index: options.h
===================================================================
--- options.h.orig 2001-07-07 01:35:18.000000000 +0200
+++ options.h 2007-01-22 18:27:05.238498611 +0100
--- options.h.orig
+++ options.h
@@ -27,7 +27,7 @@ struct tftp_opt {
int enabled; /* enabled for use by server or client */
};
@ -19,8 +19,8 @@ Index: options.h
int opt_parse_options(char *data, int data_size, struct tftp_opt *options);
Index: tftp_def.c
===================================================================
--- tftp_def.c.orig 2004-03-06 21:41:41.000000000 +0100
+++ tftp_def.c 2007-01-22 18:27:05.254499542 +0100
--- tftp_def.c.orig
+++ tftp_def.c
@@ -30,7 +30,7 @@
*/
@ -32,8 +32,8 @@ Index: tftp_def.c
{ "tsize", "0", 0, 1 }, /* RFC1350 options. See RFC2347, */
Index: tftp_def.h
===================================================================
--- tftp_def.h.orig 2004-03-06 21:41:41.000000000 +0100
+++ tftp_def.h 2007-01-22 18:27:05.274500706 +0100
--- tftp_def.h.orig
+++ tftp_def.h
@@ -40,7 +40,7 @@
#define OPT_TIMEOUT 3
#define OPT_BLKSIZE 4

View File

@ -1,6 +1,8 @@
--- stats.c
Index: stats.c
===================================================================
--- stats.c.orig
+++ stats.c
@@ -142,6 +142,10 @@
@@ -142,6 +142,10 @@ void stats_thread_usage_locked(void)
pthread_mutex_unlock(&s_stats.mutex);
}

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Nov 12 20:41:45 UTC 2013 - chris@computersalat.de
- rebase patches (p0)
- rename atftpd.init.d to atftpd.init
- fix spec
* remove ghost /var/run/atftp (created by init)
-------------------------------------------------------------------
Thu Feb 7 13:05:52 UTC 2013 - vcizek@suse.com

View File

@ -28,7 +28,7 @@ Version: 0.7.0
Release: 0
Url: ftp://ftp.mamalinux.com/pub/atftp/
Source: %{name}-%{pkg_version}.tar.bz2
Source1: atftpd.init.d
Source1: atftpd.init
Source2: atftpd.sysconfig
Source3: atftpd.logrotate
Source4: atftp.fw
@ -81,11 +81,11 @@ boot of hundreds of machines simultaneously.
%patch6
%patch7
%patch8
%patch9 -p1
%patch10 -p0
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch9
%patch10
%patch12
%patch13
%patch14
%build
autoreconf -fi
@ -144,6 +144,6 @@ fi
%config %{_fwdefdir}/atftp
%dir %attr(0750,tftp,tftp) /srv/tftpboot
%dir %attr(0750,tftp,tftp) /var/log/atftpd/
%ghost %dir /var/run/atftpd
#ghost %dir /var/run/atftpd
%changelog

View File

@ -10,8 +10,8 @@ http://www.compuphase.com/tftp.htm
Index: tftp_def.h
===================================================================
--- tftp_def.h.orig 2008-09-12 16:30:56.092292872 +0200
+++ tftp_def.h 2008-09-12 16:30:56.160294265 +0200
--- tftp_def.h.orig
+++ tftp_def.h
@@ -32,6 +32,7 @@
#define TIMEOUT 5 /* Client timeout */
#define S_TIMEOUT 5 /* Server timout. */
@ -22,8 +22,8 @@ Index: tftp_def.h
#define OPT_FILENAME 0
Index: tftp_file.c
===================================================================
--- tftp_file.c.orig 2008-09-12 16:30:55.907808154 +0200
+++ tftp_file.c 2008-09-12 16:31:46.663791666 +0200
--- tftp_file.c.orig
+++ tftp_file.c
@@ -604,8 +604,8 @@ int tftp_send_file(struct client_data *d
int state = S_SEND_REQ; /* current state in the state machine */
int timeout_state = state; /* what state should we go on when timeout */
@ -66,8 +66,8 @@ Index: tftp_file.c
{
Index: tftp_io.c
===================================================================
--- tftp_io.c.orig 2008-09-12 16:30:56.048295391 +0200
+++ tftp_io.c 2008-09-12 16:30:56.200292051 +0200
--- tftp_io.c.orig
+++ tftp_io.c
@@ -334,8 +334,8 @@ int tftp_get_packet(int sock1, int sock2
/*
* Read from file and do netascii conversion if needed
@ -81,8 +81,8 @@ Index: tftp_io.c
int c;
Index: tftp_io.h
===================================================================
--- tftp_io.h.orig 2004-03-06 21:41:41.000000000 +0100
+++ tftp_io.h 2008-09-12 16:30:56.240291211 +0200
--- tftp_io.h.orig
+++ tftp_io.h
@@ -52,8 +52,8 @@ int tftp_send_data(int socket, struct so
int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_in *sa,
struct sockaddr_in *from, struct sockaddr_in *to,
@ -96,8 +96,8 @@ Index: tftp_io.h
#endif
Index: tftpd_file.c
===================================================================
--- tftpd_file.c.orig 2004-03-06 21:41:41.000000000 +0100
+++ tftpd_file.c 2008-09-12 16:30:56.268005211 +0200
--- tftpd_file.c.orig
+++ tftpd_file.c
@@ -402,8 +402,9 @@ int tftpd_send_file(struct thread_data *
int state = S_BEGIN;
int timeout_state = state;

View File

@ -1,7 +1,7 @@
Index: tftpd_list.c
===================================================================
--- tftpd_list.c.orig 2007-09-18 18:14:46.182187192 +0200
+++ tftpd_list.c 2007-09-18 18:19:50.072480431 +0200
--- tftpd_list.c.orig
+++ tftpd_list.c
@@ -49,11 +49,11 @@ pthread_mutex_t thread_list_mutex = PTHR
*/
int tftpd_list_add(struct thread_data *new)
@ -115,8 +115,8 @@ Index: tftpd_list.c
{
Index: tftpd_mcast.c
===================================================================
--- tftpd_mcast.c.orig 2004-03-06 21:41:41.000000000 +0100
+++ tftpd_mcast.c 2007-09-18 18:16:54.705925936 +0200
--- tftpd_mcast.c.orig
+++ tftpd_mcast.c
@@ -51,9 +51,11 @@ struct tid *tid_list = NULL;
*/
int tftpd_mcast_get_tid(char **addr, short *port)