]> granicus.if.org Git - fortune-mod/blob - fortune-mod/ChangeLog
avoid under-portable text
[fortune-mod] / fortune-mod / ChangeLog
1 (Note: this file has been re-arranged to be in reverse chronological
2 order, which is The Right Thing for ChangeLogs - DLC)
3
4 May 31, 2021 (fortune-mod 3.6.1)
5
6         Fix missing rinutils in release tarball.
7         ( https://github.com/shlomif/fortune-mod/issues/52 ; thanks
8         to @Vonfry )
9
10 April 20, 2021 (fortune-mod 3.6.0)
11
12         Some lib-recode handling fixes.
13
14         rinutils_bootstrap.
15
16         Move some stuff to off.
17         ( https://github.com/shlomif/fortune-mod/pull/51 ; thanks to
18         @tristanbatchler )
19
20         Fix typos.
21         ( https://github.com/shlomif/fortune-mod/pull/49 ; thanks to
22         @cchristiansen )
23
24         Add quotes.
25
26 November 9, 2020 (fortune-mod 3.4.1)
27
28         Some lib-recode handling fixes:
29         ( https://github.com/shlomif/fortune-mod/pull/46 ; thanks to @heirecka )
30
31         Add a quotation.
32
33 November 8, 2020 (fortune-mod 3.4.0)
34
35         Made the compile-time dependency on lib-recode optional ;
36         handle the missing librinutils better.
37         ( https://github.com/shlomif/fortune-mod/issues/44 )
38
39         Add some quotes (Thanks in part to @RashadSaleh :
40         https://github.com/shlomif/fortune-mod/pull/43 )
41
42 September 24, 2020 (fortune-mod 3.2.0)
43
44         Include rinutils in the source tarball / git checkout.
45         ( https://github.com/shlomif/fortune-mod/issues/44 )
46
47 September 16, 2020 (fortune-mod 3.0.0)
48
49         Convert the documentation from troff to DocBook 5/XML using
50         doclifter ( http://www.catb.org/~esr/doclifter/ ). The resultant troff
51         man pages are included in the source release tarball.
52
53         Fix formatting of several cookies.
54
55         Minor build fixes (avoid rebuilding the symlinks).
56
57         Fix the build and tests on AppVeyor-CI / Windows
58
59         Fix some compiler warnings and modernise the code a little.
60
61         Add some new fortune cookies.
62
63         New major version digit just in time for Rosh Hashana
64         and Talk like a Pirate day. Happy new yea..arrrrrrrrr!
65
66 August 30, 2020 (fortune-mod 2.29.1)
67
68         DEVELOPMENT RELEASE
69
70         Fix the build and tests on AppVeyor-CI / Windows
71
72         Fix some compiler warnings.
73
74 August 20, 2020 (fortune-mod 2.29.0)
75
76         DEVELOPMENT RELEASE
77
78         Convert the documentation from troff to DocBook 5/XML using
79         doclifter ( http://www.catb.org/~esr/doclifter/ ). The resultant troff
80         man pages are included in the source release tarball.
81
82         Fix formatting of several cookies.
83
84         Minor build fixes (avoid rebuilding the symlinks).
85
86 June 02, 2020 (fortune-mod 2.28.0)
87
88         SECURITY [low risk]: avoid overflow with the -i flag
89
90         Correct attributions and typos (Thanks to Tobin Yehle.)
91
92         Small code cleanups.
93
94 May 02, 2020 (fortune-mod 2.26.0)
95
96         SECURITY: Avoid integer overflow in parsing the percentages which caused
97         using negative integers.
98
99         https://metacpan.org/pod/Test::Trap is a new tests' dependency
100
101         Format strings cleanups in C.
102
103 April 30, 2020 (fortune-mod 2.24.0)
104
105         SECURITY: Avoid some potential buffer overflows in unstr, strfile and randstr.
106                 - This was found to exist in NetBSD's fortune, and FreeBSD's fortune
107                 as well (OpenBSD's fortune appear to have been fixed).
108
109         Add regression valgrind tests for the buffer overflows.
110
111         Some cleanups inspired by OpenBSD'd fortune.
112
113 April 29, 2020 (fortune-mod 2.22.0)
114
115         SECURITY: Avoid some hypothetical buffer overflows in unstr, strfile and randstr.
116
117         Modernize and refactor the code.
118
119         Avoid build targets' proliferation in CMake.
120
121 April 04, 2020 (fortune-mod 2.20.0)
122
123         Further avoid double traversal if FORTDIR == LOCFORTDIR.
124
125         Using clang-format to format the code.
126
127         Eliminate -D_FORTIFY_SOURCE warnings.
128
129         Modernize and refactor the code.
130
131 March 30, 2020 (fortune-mod 2.18.0)
132
133         Avoid double traversal if FORTDIR == LOCFORTDIR.
134
135         Typos' corrections and a new quote.
136
137 February 26, 2020 (fortune-mod 2.16.0)
138
139         Better portability to Microsoft Windows and other OSes
140         Thanks to AppVeyor (done by Shlomi Fish).
141
142         Add the -u flag [from debian]
143
144         Add fortune.desktop [from debian]
145
146         Remove backspaces in a cookie [from debian]
147
148         Complete the lyrics of a Leonard Cohen song [from debian]
149
150         Correct a misattribution.
151
152 February 23, 2020 (fortune-mod 2.14.0)
153
154         Correct some typos and add some new cookies.
155
156         Better Win32/Win64 Portability (AppVeyor is still failing.)
157
158         Code cleanups.
159
160 December 18, 2019 (fortune-mod 2.12.0)
161
162         Extract rinutils as a package and require it as a dep:
163         https://github.com/shlomif/rinutils/ .
164
165         Move some jokes to the offensive collection:
166         https://github.com/shlomif/fortune-mod/pull/38 - thanks
167         to @s0nata .
168
169 June 30, 2019 (fortune-mod 2.10.0)
170
171         Move strfile and unstr to /usr/bin :
172         https://github.com/shlomif/fortune-mod/issues/35
173
174         Code cleanups: warnings and portability.
175
176         Better porting to windows / appveyor-CI
177         (still not perfect)
178
179 June 07, 2019 (fortune-mod 2.8.0)
180
181         Add some quotes by amigojapan.
182
183         Some improvements for spelling, punctuation and grammar.
184
185         Extract a common C header.
186
187         Add TidyAll tests.
188
189 December 19, 2018 (fortune-mod 2.6.2)
190
191         Fix the cmake files installation paths. See
192         https://github.com/shlomif/fortune-mod/pull/29 .
193
194         Some improvements for spelling, punctuation and grammar.
195
196         Normalize the numbering of "Great Moments in History":
197         https://github.com/shlomif/fortune-mod/issues/28 .
198
199 July 10, 2018 (fortune-mod 2.6.1)
200
201         Fix the previously rotated display of offensive fortunes (using the "-o"
202         or "-a" flags). See https://github.com/shlomif/fortune-mod/issues/26 .
203
204         Incorporate several more minor patches from Debian.
205
206 June 26, 2018 (fortune-mod 2.6.0)
207
208         Incorporate patches from the Debian package.
209
210         Add the "tao", "pratchett" and many individual cookies.
211
212 March 22, 2018 (fortune-mod 2.4.1)
213
214         Add the missing cmake/Shlomif_Common.cmake file.
215
216 March 22, 2018 (fortune-mod 2.4.0)
217
218         Fix issue #24 reported by @pouar of an underflow error in strfile.
219
220         Fix some GCC warnings with the Recode flags.
221
222         Remove some trailing empty lines in fortunes
223
224 February 15, 2018 (fortune-mod 2.2.1)
225
226         Fix some mispellings.
227
228         Remove some duplicates.
229
230         Thanks to bug reporters on the bug trackers of Linux distributions.
231
232 January 31, 2018 (fortune-mod 2.2.0)
233
234         Add the "disclaimer" cookie file (thanks to mathew).
235
236         Correct some problems in the documentation.
237
238         Fix some memory leaks (thanks to valgrind).
239
240         Reenable the valgrind tests (requires Recode 3.7).
241
242 January 11, 2018 (fortune-mod-2.0.0)
243
244         Correct typos.
245
246         Deprecate the BSD_REGEX - we now use only POSIX ones.
247
248         Various build fixes.
249
250 March 25, 2017 (fortune-mod-1.99.5)
251
252         Add a new cmake-based configuration/build/install system.
253
254         Converted the source files to UTF-8.
255
256         Added automated tests.
257
258         Removed trailing whitespace.
259
260         Reformatted long (> 80 chars) lines.
261
262         Fixed many typos.
263
264         Fixed some compiler warnings.
265
266         Added a build-time option to remove the “-o” (= “offensive”) flag.
267
268         Incorporated some downstream patches from Linux distributions.
269
270
271 March 05, 2004 (fortune-mod-1.99.1)
272
273         Most of the changes have occurred at some point in time in the last
274         5 years.
275
276         A high number of spelling, punctuation, formatting and grammar
277         fixes.
278
279         Internationalisation support.
280
281         New -c option to see which file a fortune came from.
282
283 August 29, 1997
284
285   Incorporated a couple of minor changes made in the (old) Debian
286   fortune-mod package, including the addition of an extra data file
287   called 'cookie'.  Renamed some documentation files, and included some
288   install information for non-Linux users.  Added a "-v" option to
289   report the program version.
290
291   I intend to submit this distribution to SunSITE RSN.
292
293     -- Dennis L. Clark <dbugger@progsoc.uts.edu.au>
294
295 May, 1997
296
297   This release fixes many of the portability problems with the
298   fortune-mod program released by Amy Lewis in October, 1995.  The
299   previous version had many Linux-isms in it, which left it unworkable
300   on any other platform.  This version replaces most of these with more
301   standard calls, making it more likely to work under other platforms.
302   The Makefiles have been modified so that GNU's gcc and make are no
303   longer required: any standard make and ANSI-compatible C compiler
304   should work.  Sorry, pre-ANSI compilers are not supported (c'mon, this
305   is the 90's, darn it!)
306
307   This version has been tested to work on SunOS 4.1.x as well as Linux.
308   All changes made to the sources were as platform-independant as
309   possible.  Therefore, no "#ifdef LINUX" or "#ifdef SUNOS4" directives
310   appear in the code.  An effect of this is that a number of 'implicit
311   declaration' warnings are emitted by gcc under SunOS 4.1.x, but this a
312   problem with SunOS's standard headers, not with the program or the
313   compiler.  The benefit of this approach is that it eases the work of
314   expanding the port to include other platforms. Bug reports and fixes
315   for other platforms are most welcome!
316
317   A few "standard" C function calls were replaced with more standard
318   counterparts at various points.  Generally, when there was a choice
319   between a BSD version of a function and a POSIX version, the POSIX
320   version was favoured (even though fortune originated on BSD).  An
321   exception to this was the regex functions: either POSIX or BSD
322   versions can be used, with selection made via the top-level Makefile.
323
324   Fortune and strfile also compiles on Solaris 2.5, but a discrepency
325   between the declaration and implementation of 'struct dirent' on the
326   test platform caused fortune to execute incorrectly there.  It is not
327   certain whether this is a bug in the header file, the C library, or
328   the test platform.
329
330   While the making of this release was not meant to become a bug
331   search-and-destroy mission, some bugs were inadvertently discovered
332   and fixed. including the known bug of using -a with a file that occurs
333   in both the offensive and inoffensive directories.  Fixing this
334   particular bug required a way to be able to separately identify two
335   fortune files with the same name, with one in the inoffensive
336   directory, the other one in the offensive directory.  Now, such a name
337   will be taken to be the inoffensive file by default.  However, you can
338   now append '-o' to a fortune name, and the '-o' will be removed and
339   the offensive directory will be searched.  Thus you can say (assuming
340   you use the distributed datfiles):
341
342         fortune 80% politics politics-o
343
344   Which has an 80% change of giving an "inoffensive" political fortune,
345   and a 20% change of giving an "offensive" political one.  Note that
346   this makes fortune-mod backwards-compatible with BSD fortune, but only
347   for users, not fortune database maintainers.
348
349   Of course, this solution only passes the buck: with the above example
350   again, if you have a 'politics-o' file in your inoffensive directory,
351   you are back to square one.  OTOH, seeing that '-o' originally was
352   meant for offensive fortunes, using it for inoffensive ones is simply
353   asking for trouble.
354
355   Bug fixed: Fortune's definition of a fortune length (for -s and -l)
356   was inconsistent.  Unordered fortunes counted the 2 delimiting
357   characters (as hinted in the man page), but sorted or randomized
358   fortunes did not.  Now the delimiting characters are _NEVER_ counted,
359   so you will always get the length limit you expect.
360
361   Another bug fix: -l and -s can now work together with -m.  Previously
362   -l and -s were ignored when -m was in effect.  The new behaviour helps
363   me count how many long or short fortunes there are in a file.
364
365   Ansify has been removed from the package, as well as some filter
366   scripts from NetBSD that no longer appear useful.  Randstr has been
367   kept, but has not been improved in any way.  It at least has a man
368   page: maybe somebody will find it useful.
369
370   Some of the documentation (including the man pages) has been improved
371   and updated, and some files have been renamed so that the package
372   looks less Linux-specific.
373
374     -- Dennis L. Clark <dbugger@progsoc.uts.edu.au>
375
376 Late October 1995
377   Ansify has been abandoned.  I'm going to distribute this working version
378   of fortune, and then see how difficult it would be to add termcap/terminfo
379   enhancements to fortune itself--I don't anticipate serious problems, but
380   I'd rather go ahead and get this on the net.
381
382   A last-minute change was made to the way that percentages are displayed
383   with -f; it is now in the format nnn.nn%.  The reason for this is that
384   with the multiplication of small files, fortune -af displayed a large
385   number of "0%"s--no worse than the old version, but not helpful.
386
387   The fortunes database was finally cleaned up, and this version is now
388   being distributed (at least, I hope it is).  I don't consider the current
389   division of fortunes among files absolutely canonical; some are certainly
390   in the wrong places.  But things are *better*.
391
392 Amy A. Lewis    alewis@email.unc.edu
393
394 Mid-October '95
395   Another utility, ansify, now compiles; it has not been tested at all, so
396   it may not work even slightly.
397
398   Ansify is a rather stupid program, all things considered, but the work on
399   it does raise an interesting possibility for an enhanced fortune.  At
400   present, the fortune databases contain x^Hy sequences for underline and
401   special characters (and this can be extended to include bold, = x^Hx).
402   Ansify is stupid because it doesn't use the proper tools, ie termcap or
403   terminfo (hmmm ... since it works on files, that may not be so stupid);
404   it appears that if that can be done, then a termcap/terminfo enhanced
405   fortune could be produced, which would recognize the existence of ^H in
406   a string and attempt to display using appropriate control sequences.
407   This sort of modification would be of greater interest to casual users,
408   I think, than even the bug fixes, and since it would not force changes
409   in the storage of fortunes, it is eminently portable.  Consider this a
410   'todo' announcement.
411
412 Added (early October 95):
413   A new executable, rot, which is a rot13 filter (a caesar cipher). Most
414   probably have caesar, but on the other hand, if you compile this mess
415   as root, caesar probably isn't in the path.
416
417   A new parameter to fortune, -n, which permits you to specify the length
418   at which to break between long (-l) and short (-s) fortunes.
419
420   fortune -f now shows probabilities.
421
422   A bug: fortune -a nn% filename filename ... now fails without an error
423   message, if the filename named following the percentage exists in both
424   the inoffensive and the offensive directories (that is, if you have two
425   files containing definitions, one called fortunes/definitions and one
426   called fortunes/off/definitions, and call fortune as: fortune -a 10%
427   definitions religion politics ..., then fortune simply fails).  This
428   appears to be an artifact of the changes that were made in storage/
429   naming of offensive fortunes.  It only happens with the combination of
430   a percentage with -a and inoffensive/offensive files that share a name.
431   Temporary workaround: rename one or the other of the files (*sigh*  I
432   don't like that as a solution).
433
434   The man pages have been updated.  The old man pages are also available,
435   but are not installed unless you do it yourself (the new ones are).  The
436   new man pages have the extension .man; the old ones have numeric
437   extensions.
438
439   A place has been created for fortune files containing HTML tags (the
440   reason I started playing with this mess was because I wanted to be
441   able to format fortunes nicely for the web without having to run an
442   enormously complex script to figure out from formatting how best to
443   display things, a particular problem since the formatting isn't
444   consistent).  Tagged fortunes don't exist yet, and I'm seriously
445   considering creating a slightly different fortune binary that would
446   output the necessary headers and trailers (reducing the CGI script
447   to complete triviality) (-f isn't really needed for a webfortune).
448
449 Todo: I'm thinking of adding a -x to unstr, to rot13 the output.  This
450 would have the effect of putting all the necessary tools in one package.
451 It further breaks compatibility with BSD tools (which has *mostly* been
452 maintained, merely enhanced slightly, although the change in how
453 offensive files are distinguished from inoffensive might be regarded as
454 breaking compatibility) by adding yet another parameter to unstr, which
455 didn't have any, before.  So I haven't decided, yet.
456
457 Todo: KOI8 encoded fortunes?  They couldn't be rotated without a great
458 deal of trouble, of course.
459
460 More minor fixes:
461
462   The way that fortune -m prints its output has been slightly changed.  It
463   used to print the delimiter first, then, if this were the first fortune
464   from a particular file, it printed the name of the file in parentheses.
465   It now prints the first fortune without an initial delimiter; if the
466   fortune is the first from a particular file, it then prints
467   (filename), newline, delimiter, newline *to stderr*.  Redirect stderr to
468   stdout to get something *similar to* (but not the same as) the old
469   behavior.  The new behavior, if stderr is redirected to stdout, and
470   both are then redirected to a file, produces fictitious entries, one
471   per file in which a match was found.  However, whether stderr is
472   redirected or not, the new format produces files that strfile can
473   parse without choking (the old format, since it placed the filename
474   on the same line as the delimiter character, effectively forced editing
475   of the file in order to make it usable by strfile, unless the option of
476   concatenating two fortunes with an ugly "% (filename)" line separating
477   them was considered acceptable output).  Under the new display format,
478   if stderr is redirected into the file, you end up with filenames marking
479   the separation between files (as before), but they are now valid text
480   strings (which should probably, therefore, be deleted).
481
482   In other words, if you don't care what files the original text came from,
483   and want a new file containing (let us say), quotes from Mark Twain,
484   you might do:
485   fortune -am '-- Mark Twain' >twain
486   The files accessed would march down the screen; the fortunes would be
487   stored in parsable format into the file twain.  If, however, you planned
488   to edit (perhaps to remove the quotes from the original file, you might
489   then wish to redirect stderr to stdout.  Using bash:
490   fortune -am '-- Mark Twain' &>twain
491     or
492   fortune -am '-- Mark Twain' >twain 2>&1
493
494   [The above is now in the man page, more or less]
495
496 Late September, 1995
497   Too many changes to mention, really.  Look at the source code for
498   comments on individual files.  LINUX.DIF has been removed.
499
500   It is worth noting that strfile was completely broken as distributed,
501   and fortune had code to make it report a different file list than the
502   one it used to retrieve fortunes.  There's some rather strong language
503   on the subject in strfile.c; if it offends you, tough.
504
505   Bugs were fixed, and some enhancements were added.  Unstr, in
506   particular, has had its command line considerably enhanced.  Strfile
507   now *really does* sort, instead of merely setting the 'sorted' flag.
508   Ditto for randomizing.
509
510   Noteworthy: the way to distinguish between offensive and non-offensive
511   files has changed for fortune.  A second directory (which may be a
512   subdirectory of the main fortune directory; the program doesn't
513   add files recursively down a directory tree) has been added to
514   pathnames.h.  Offensive files should be placed there.  There is no
515   longer any need to add the -o suffix to file names, and the problems
516   with finding files (especially offensive ones) seem to have
517   disappeared in the process.
518
519   Currently, I'm working on breaking the fortune files themselves into
520   smaller, more manageable pieces, checking spelling, punctuation, and
521   grammar, and trying to reduce redundancy.  The eventual goal, after
522   the files are cleaned up, is another set of files carrying HTML tags,
523   which would then massively simplify a CGI script that calls fortune.
524
525   New Makefiles.
526
527   A 'randstr' (I want to call it 'lottery,' but I won't) utility, which
528   amounts to a poor woman's stripped-down fortune, to illustrate some
529   other possible uses of strfile-type random-access strings files.
530
531   Amy A. Lewis   alewis@email.unc.edu
532