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