From 3567b1b40239a917bea51a4e6d07682202f5ba17 Mon Sep 17 00:00:00 2001 From: Radek Vokál Date: Apr 10 2006 16:13:43 +0000 Subject: - show localtime instead of GMT (#172274) --- diff --git a/tftp-hpa-0.39-tzfix.patch b/tftp-hpa-0.39-tzfix.patch new file mode 100644 index 0000000..22aff10 --- /dev/null +++ b/tftp-hpa-0.39-tzfix.patch @@ -0,0 +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; + #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 */ + + p = strrchr(argv[0], '/'); diff --git a/tftp.spec b/tftp.spec index bf68c2f..fc221c1 100644 --- a/tftp.spec +++ b/tftp.spec @@ -3,12 +3,13 @@ Summary: The client for the Trivial File Transfer Protocol (TFTP). Name: tftp Version: %{tftp_hpa_version} -Release: 2 +Release: 3 License: BSD Group: Applications/Internet Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{tftp_hpa_version}.tar.gz Patch0: tftp-0.40-remap.patch Patch1: tftp-hpa-0.42-sigjmp.patch +Patch2: tftp-hpa-0.39-tzfix.patch BuildPreReq: tcp_wrappers BuildRoot: %{_tmppath}/%{name}-root @@ -36,6 +37,7 @@ enabled unless it is expressly needed. The TFTP server is run from %setup -q -n tftp-hpa-%{version} %patch0 -p1 -b .zero %patch1 -p1 -b .sigjmp +%patch2 -p1 -b .tzfix %build @@ -78,6 +80,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/* %changelog +* Mon Apr 10 2006 Radek Vokál 0.42-3 +- show localtime instead of GMT (#172274) + * Wed Mar 22 2006 Radek Vokál 0.42-2 - fix double free error when hitting ^C (#186201)