]> granicus.if.org Git - fortune-mod/blob - README.md
travis-fix #1: docmake/docbook
[fortune-mod] / README.md
1 # fortune-mod Maintenance Version and Ongoing Development
2
3 [![Build Status](https://travis-ci.org/shlomif/fortune-mod.svg?branch=master)](https://travis-ci.org/shlomif/fortune-mod)
4
5 This GitHub repository maintains the sources for fortune-mod, a
6 version of
7 [the UNIX fortune command](https://en.wikipedia.org/wiki/Fortune_%28Unix%29).
8 `fortune` is a command-line utility which displays a random quotation from a
9 collection of quotes. This collection is read from the local [file system](https://en.wikipedia.org/wiki/File_system)
10 and does not require network access. A large collection of quotes is provided in
11 the download and installed by default, but more quote collections can be added
12 by the user.
13
14 The canonical repository for the time being is:
15 https://github.com/shlomif/fortune-mod . In the future, we may create a GitHub
16 organization for it and move the sources there.
17
18 For more information about it, you can contact
19 [Shlomi Fish](https://www.shlomifish.org/) .
20
21 ## Installation
22
23 On Fedora and other rpm-based distributions:
24
25 ```
26 sudo dnf install fortune-mod
27 ```
28
29 On Arch Linux and derivatives:
30
31 ```
32 sudo pacman -S fortune-mod
33 ```
34
35 On Debian, and derivatives (e.g: Ubuntu, Linux Mint):
36
37 ```
38 sudo apt install fortune-mod
39 ```
40
41 (Warning: may be an old version.)
42
43 ## Release Tarballs
44
45 Release tarballs can be found at [this directory](https://www.shlomifish.org/open-source/projects/fortune-mod/arcs/)
46 for now.
47
48 Reading from [this reported bug](https://github.com/shlomif/fortune-mod/issues/10):
49
50 One can find the official release tarballs of fortune-mod as prepared by CPack
51 there. They have a proper containing directory. Please don't use GitHub's tags
52 for that.
53
54 ## Sample usage
55
56 ```
57 $ fortune
58 Enthusiasm is one of the most important
59 ingredients a volunteer project runs on.
60                 -- Andreas Schuldei
61 $
62 ```
63
64 ## History
65
66 I believe fortune-mod was originally forked from the NetBSD version of
67 fortune, and ported to run on Linux systems. For some time it was maintained
68 at the currently offline redellipse-dot-net inside a
69 [GNU Arch](http://en.wikipedia.org/wiki/GNU_arch) (= an old and now mostly
70 unused version control system) repository, and version 1.99.1 was released as
71 a tarball.
72
73 This maintenance version was initiated by Shlomi Fish, who decided to maintain
74 it out of being a fan of the fortune command. It started by importing the
75 unpacked source of the fortune-mod-1.99.1.tar tarball from the Mageia Linux
76 .src.rpm into an empty git repository and continuing from there.
77
78 # What was already done.
79
80 1. fortune-mod-1.99.1 was imported into the repository from the Mageia tarball
81 as the tag <code>fortune-mod-1.99.1</code>.
82
83 2. Converted the build system to [CMake](https://en.wikipedia.org/wiki/CMake) .
84
85 3. Converted the source files to UTF-8.
86
87 4. Added some tests.
88
89 5. Removed trailing whitespace.
90
91 6. Reformatted long (> 80 chars) lines.
92
93 7. Fixed some typos.
94
95 8. Added [Travis-CI](https://travis-ci.org/) testing.
96
97 9. Added valgrind tests and fixed some memory leaks.
98
99 10. Released fortune-mod-1.99.3, fortune-mod-1.99.4, v2.0.0 and up to
100 version 2.26.0
101
102 11. Fixed some C compiler warnings encountered with the GCC compiler flags of
103 [Shlomif_Common](https://bitbucket.org/shlomif/shlomif-cmake-modules/overview).
104
105 12. Added a build-time option to remove the “-o” (= “offensive”) flag, inspired
106 by a set of patches on the Fedora package.
107
108 13. Applied some downstream patches.
109
110 14. Fixed as many “clang -Weverything” warnings as possible.
111
112 15. lib-recode became maintained again at https://github.com/rrthomas/recode
113 (thanks to @rrthomas ) thus preventing a switch to something else.
114
115 16. Got the build and tests to pass on [AppVeyor/MS Windows](https://ci.appveyor.com/project/shlomif/fortune-mod)
116 (with some appreciated help).
117
118 17. Found and fixed some security issues:
119     - Seems to affect some Linux distributions as well as FreeBSD and NetBSD.
120         - Was already fixed in OpenBSD
121     - https://bugs.mageia.org/show_bug.cgi?id=26567
122     - https://advisories.mageia.org/MGASA-2020-0199.html
123     - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246050
124     - https://github.com/shlomif/fortune-mod/commit/fe182a25663261be6e632a2824f6fd653d1d8f45
125     - https://github.com/shlomif/fortune-mod/commit/540c495f57e441b745038061a3cfa59e3a97bf33
126     - https://github.com/shlomif/fortune-mod/commit/acd338098071bddfa1d21f87e1813727031428ea
127
128 18. Reformatted the C code using [clang-format](https://clang.llvm.org/docs/ClangFormat.html).
129
130 # What remains to be done.
131
132 1. See if there are any more downstream patches to apply.
133
134 2. Fix more typos (reports and pull-requests are welcome.)
135
136 3. Perhaps modernize the code a little.
137
138 4. Add more quotes / fortune cookies.
139
140 5. Prepare packages for the new releases for [downstream distributions/Operating Systems](https://pkgs.org/download/fortune-mod).
141
142 # Links
143
144 * [Shlomi Fish’s Fortune Cookie Files](https://www.shlomifish.org/humour/fortunes/) - on his site, containing links to many other collections of fortune cookies.
145 * [XML-Grammar-Fortune](https://web-cpan.shlomifish.org/modules/XML-Grammar-Fortune/) - an XML grammar for collections of quotes, allowing one to generate XHTML or plaintext.
146 * [Anvari.org’s web interface to fortune](http://www.anvari.org/fortune/) - with
147 many collections.