[tz] [PROPOSED] Remove zoneinfo2tdf.pl

Paul Eggert eggert at cs.ucla.edu
Fri Aug 12 23:35:52 UTC 2022


* Makefile (MISC, VERSION_DEPS): Remove mention of removed file.
* NEWS: Mention this.
* zoneinfo2tdf.pl: Remove.
---
 Makefile        |  4 ++--
 NEWS            |  3 +++
 zoneinfo2tdf.pl | 53 -------------------------------------------------
 3 files changed, 5 insertions(+), 55 deletions(-)
 delete mode 100755 zoneinfo2tdf.pl

diff --git a/Makefile b/Makefile
index 88240ad..ae0f3fd 100644
--- a/Makefile
+++ b/Makefile
@@ -538,7 +538,7 @@ DATA=		$(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
 			leapseconds $(ZONETABLES)
 AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk \
 			ziguard.awk zishrink.awk
-MISC=		$(AWK_SCRIPTS) zoneinfo2tdf.pl
+MISC=		$(AWK_SCRIPTS)
 TZS_YEAR=	2050
 TZS_CUTOFF_FLAG=	-c $(TZS_YEAR)
 TZS=		to$(TZS_YEAR).tzs
@@ -567,7 +567,7 @@ VERSION_DEPS= \
 		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
 		workman.sh zdump.8 zdump.c zic.8 zic.c \
 		ziguard.awk zishrink.awk \
-		zone.tab zone1970.tab zoneinfo2tdf.pl
+		zone.tab zone1970.tab
 
 # And for the benefit of csh users on systems that assume the user
 # shell should be used to handle commands in Makefiles. . .
diff --git a/NEWS b/NEWS
index 9042cd8..4c1c48d 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,9 @@ Unreleased, experimental changes
     Fix bug with 'zic -d /a/b/c' when /a is unwritable but the
     directory /a/b already exists.
 
+    The script zoneinfo2tdf.pl has been removed, as it was unused and
+    triggered false malware alarms on some email servers.
+
 
 Release 2022b - 2022-08-10 15:38:32 -0700
 
diff --git a/zoneinfo2tdf.pl b/zoneinfo2tdf.pl
deleted file mode 100755
index 176fce9..0000000
--- a/zoneinfo2tdf.pl
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /usr/bin/perl -w
-# Summarize .zi input in a .zi-like format.
-
-# Courtesy Ken Pizzini.
-
-use strict;
-
-#This file released to the public domain.
-
-# Note: error checking is poor; trust the output only if the input
-# has been checked by zic.
-
-my $contZone = '';
-while (<>) {
-  my $origline = $_;
-  my @fields = ();
-  while (s/^\s*((?:"[^"]*"|[^\s#])+)//) {
-    push @fields, $1;
-  }
-  next unless @fields;
-
-  my $type = lc($fields[0]);
-  if ($contZone) {
-    @fields >= 3 or warn "bad continuation line";
-    unshift @fields, '+', $contZone;
-    $type = 'zone';
-  }
-
-  $contZone = '';
-  if ($type eq 'zone') {
-    # Zone  NAME  STDOFF  RULES/SAVE  FORMAT  [UNTIL]
-    my $nfields = @fields;
-    $nfields >= 5 or warn "bad zone line";
-    if ($nfields > 6) {
-      #this splice is optional, depending on one's preference
-      #(one big date-time field, or componentized date and time):
-      splice(@fields, 5, $nfields-5, "@fields[5..$nfields-1]");
-    }
-    $contZone = $fields[1] if @fields > 5;
-  } elsif ($type eq 'rule') {
-    # Rule  NAME  FROM  TO  -  IN  ON  AT  SAVE  LETTER/S
-    @fields == 10 or warn "bad rule line";
-  } elsif ($type eq 'link') {
-    # Link  TARGET  LINK-NAME
-    @fields == 3 or warn "bad link line";
-  } elsif ($type eq 'leap') {
-    # Leap  YEAR  MONTH  DAY  HH:MM:SS  CORR  R/S
-    @fields == 7 or warn "bad leap line";
-  } else {
-    warn "Fubar at input line $.: $origline";
-  }
-  print join("\t", @fields), "\n";
-}
-- 
2.37.1



More information about the tz mailing list