From 65ec8eeb912426626b511ba1af57d21bb510c744 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 25 Nov 2008 16:55:31 +0000 Subject: [PATCH] 0.49 --- .cvsignore | 2 +- sources | 2 +- tftp-0.40-remap.patch | 31 ++++++++++++++++--------------- tftp-hpa-0.39-tzfix.patch | 32 ++++++++++++++++---------------- tftp.spec | 11 ++++++----- 5 files changed, 40 insertions(+), 38 deletions(-) diff --git a/.cvsignore b/.cvsignore index 148f127..fcadda0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -tftp-hpa-0.48.tar.gz +tftp-hpa-0.49.tar.bz2 diff --git a/sources b/sources index 35c75b8..d6e5fbf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -73dd29dfa9062a174163f6a267e0b5f7 tftp-hpa-0.48.tar.gz +64b7db6525b189831a7df0565cdfab67 tftp-hpa-0.49.tar.bz2 diff --git a/tftp-0.40-remap.patch b/tftp-0.40-remap.patch index 456f378..755a307 100644 --- a/tftp-0.40-remap.patch +++ b/tftp-0.40-remap.patch @@ -1,18 +1,19 @@ ---- tftp-hpa-0.40/tftpd/remap.c.old 2005-03-16 16:34:34.000000000 -0500 -+++ tftp-hpa-0.40/tftpd/remap.c 2005-03-16 16:22:49.000000000 -0500 -@@ -275,6 +275,7 @@ - int lineno = 0; - int err = 0; +diff -up tftp-hpa-0.49/tftpd/remap.c.zero tftp-hpa-0.49/tftpd/remap.c +--- tftp-hpa-0.49/tftpd/remap.c.zero 2008-10-20 18:08:31.000000000 -0400 ++++ tftp-hpa-0.49/tftpd/remap.c 2008-11-25 11:41:09.000000000 -0500 +@@ -286,6 +286,7 @@ struct rule *parserulefile(FILE * f) + int lineno = 0; + int err = 0; -+ memset(this_rule, '\0', sizeof(struct rule)); - while ( lineno++, fgets(line, MAXLINE, f) ) { - rv = parseline(line, this_rule, lineno); - if ( rv < 0 ) -@@ -283,6 +284,7 @@ - *last_rule = this_rule; - last_rule = &this_rule->next; - this_rule = tfmalloc(sizeof(struct rule)); -+ memset(this_rule, '\0', sizeof(struct rule)); ++ memset(this_rule, '\0', sizeof(struct rule)); + while (lineno++, fgets(line, MAXLINE, f)) { + rv = parseline(line, this_rule, lineno); + if (rv < 0) +@@ -294,6 +295,7 @@ struct rule *parserulefile(FILE * f) + *last_rule = this_rule; + last_rule = &this_rule->next; + this_rule = tfmalloc(sizeof(struct rule)); ++ memset(this_rule, '\0', sizeof(struct rule)); + } } - } diff --git a/tftp-hpa-0.39-tzfix.patch b/tftp-hpa-0.39-tzfix.patch index 22aff10..47458dc 100644 --- a/tftp-hpa-0.39-tzfix.patch +++ b/tftp-hpa-0.39-tzfix.patch @@ -1,18 +1,18 @@ ---- tftp-hpa-0.39/tftpd/tftpd.c.old 2004-09-15 00:38:46.000000000 +0200 -+++ tftp-hpa-0.39/tftpd/tftpd.c 2006-04-10 17:26:31.000000000 +0200 -@@ -286,7 +286,14 @@ - char *rewrite_file = NULL; +diff -up tftp-hpa-0.49/tftpd/tftpd.c.tzfix tftp-hpa-0.49/tftpd/tftpd.c +--- tftp-hpa-0.49/tftpd/tftpd.c.tzfix 2008-10-20 18:08:31.000000000 -0400 ++++ tftp-hpa-0.49/tftpd/tftpd.c 2008-11-25 11:45:27.000000000 -0500 +@@ -350,6 +350,14 @@ int main(int argc, char **argv) #endif - u_short tp_opcode; -- -+ time_t my_time = 0; -+ struct tm* p_tm; -+ char envtz[10]; -+ my_time = time(NULL); -+ p_tm = localtime(&my_time); -+ snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600); -+ setenv("TZ", envtz, 0); -+ - /* basename() is way too much of a pain from a portability standpoint */ + u_short tp_opcode; - p = strrchr(argv[0], '/'); ++ time_t my_time = 0; ++ struct tm* p_tm; ++ char envtz[10]; ++ my_time = time(NULL); ++ p_tm = localtime(&my_time); ++ snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600); ++ setenv("TZ", envtz, 0); ++ + /* basename() is way too much of a pain from a portability standpoint */ + + p = strrchr(argv[0], '/'); diff --git a/tftp.spec b/tftp.spec index b558dc5..e8127b5 100644 --- a/tftp.spec +++ b/tftp.spec @@ -1,12 +1,10 @@ -%define tftp_hpa_version 0.48 - Summary: The client for the Trivial File Transfer Protocol (TFTP) Name: tftp -Version: %{tftp_hpa_version} -Release: 6%{?dist} +Version: 0.49 +Release: 1%{?dist} License: BSD Group: Applications/Internet -Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{tftp_hpa_version}.tar.gz +Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2 URL: http://www.kernel.org/pub/software/network/tftp/ Patch0: tftp-0.40-remap.patch @@ -88,6 +86,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/* %changelog +* Tue Nov 25 2008 Tom "spot" Callaway - 0.49-1 +- update to 0.49 + * Wed May 21 2008 Warren Togami