summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add NEWS file.HEADv1.0.2masterAndre Noll2024-05-06
| | | | It's generally a good idea to summarize the changes of each version.
* Remove debian/.Andre Noll2024-05-06
| | | | | | | | | | Debian-related changes no longer happen in master. Instead, a dedicated branch will be created whose commits may only modify files below debian/. Whenever a new release is cut from the master branch, the master branch will be merged into the debian branch and debian/changelog will be updated accordingly. Suggested-by: Andreas Metzler <ametzler@bebt.de>
* Fix logo.Andre Noll2024-05-06
| | | | | | | | The value of xmlns is not a URI which specifies the address of a document on the Web but merely a string which identifies an XML namespace name. As such the "protocol" part needs to remain http. Fixes: de6a4b90f785b2557bcff38151c1e3225155dbf3
* configure.ac: Fix a typo in the lopsub error message.Andre Noll2024-05-01
|
* debian: Update release notes for lintian-clean upload.puAndre Noll2024-04-28
| | | | Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* debian: Prefer https over http and git.Andre Noll2024-04-28
| | | | | | | It is recommended to use an unencrypted transport protocol. Suggested-by: lintian(1) Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* debian: Update debhelper version.Andre Noll2024-04-28
| | | | | | | | | | | This is the version shipped currently with Debian 12 (Bookworm), which is the oldest version we care about since the support for Debian Bullseye (11) runs out soon. Remove the redundant debian/compat file while at it. Suggested-by: lintian(1) Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* debian: Declare that the build does not require root.Andre Noll2024-04-28
| | | | | | | | | Building tfortune does not require elevated privileges, neither root nor fakeroot. Setting this tells builders to run any target as an unprivileged user. Suggested-by: lintian(1) Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* debian: Use machine-readable debian/copyright file.Andre Noll2024-04-28
| | | | | | | | | | | | | | | | | | | Machine-readable copyright files are generally recommended to deal with the diversity of free software licenses. See https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ for details. Since the package contains epigrams in the public domain as well as source code which is licensed under the GPL-3, we need two Files stanzas and two stand-alone License stanzas, plus the required header stanza. By convention, the last matching Files: pattern applies, so the pattern for the epigrams needs to listed *after* the asterisk pattern that matches everything. Suggested-by: lintian(1) Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* debian: Update Standards-Version.Andre Noll2024-04-28
| | | | | | | | | | | | Scanning through the changes listed in /usr/share/doc/debian-policy/upgrading-checklist.txt.gz (after installing the debian-policy package) indicated that tfortune is compliant with the current standard. Suggested-by: lintian(1) Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* debian: Add watch file and public signing key.Andre Noll2024-04-28
| | | | | | | | | | | | | | | The watch file is an adjusted version of the "direct access to the git repository (tags)" example of uscan(1) (part of the devscripts package), which is appropriate for tfortune since the project does not publish release tarballs. The key file was created with gpg --export --export-options export-minimal --armor \ 87B45FDC6D91B2CA5BEAAB545ADA35403100930F > signing-key.asc Suggested-by: lintian(1) Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* Prefer https protocol.Andre Noll2024-04-28
| | | | | | | | | The http link in one of the epigrams has become stale, and switching to https does not work either, so remove this link. Thanks to Johannes Wörner for setting up https on the git server. Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* Improve lopsub error diagnostics.Andre Noll2024-04-28
| | | | | | | | | | | | | If the lopsub package is not installed, the check for the lopsubgen executable is the first thing that fails, so we print "lopsubgen required" and exit without also showing the detailed information which tells the user how to obtain the package. Move the check down, so that the build fails with the detailed message, and also educate the user that lopsub is also available as a Debian package. Reviewed-by: Andreas Metzler <ametzler@bebt.de>
* Document changes, upload to unstable.Andreas Metzler2024-04-21
| | | | Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
* debian: Remove hard-coded dependency on liblopsub1.Andre Noll2024-02-02
| | | | | | | | The lopsub package was recently renamed to liblopsub1t64 to deal with the upcoming 64-bit time_t transition in Debian. Drop the dependency rather than renaming it, since this is what shlibs are for. Suggested-by: Steve Langasek <vorlon@debian.org>
* Fix cross build.Helmut Grohne2023-03-01
| | | | | | | | | | | | | The cross build fails to find the lopsub library since it configures for the build architecture. This happens as no --build nor --host is passed which would have happened automatically if dh_auto_configure could be used. Thus it'll have to be passed manually. Then configure fails finding config.h.in, which for some reason is not created (nor asked for) by the override_dh_autoreconf. And finally, the actual Makefile does not pick up the compiler detected by configure and rather uses plain cc, so we'll have to tell it as well. Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
* tfortune-1.0.1.v1.0.1Andre Noll2019-09-05
| | | | | | | We've had a couple of improvements and fixes since version 1.0.0, so here is tfortune-1.0.1. A new version number is also needed for the package to migrate to Debian testing because the system would not accept a package with the same version number.
* Add a few sample epigrams and the fortunes package.Andre Noll2019-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a single file containing ~200 tagged epigrams in English language. The debian/control file is extended to provide the new "tfortunes" package which ships this data file. The new package is Recommended: by the tfortune package but tfortune works without it if epigrams are provided locally. The debian/copyright file also needs to be adjusted because the epigrams are under the public domain while the source code remains GPLv3. The epigrams were created by running tfortune -- print -atx pub on the author's epigram database with "pub" being a tag expression that filters out epigrams not suitable for public exposure. Suggested-by: Adam Borowski <kilobyte@angband.pl> v2 -> v3 ~~~~~~~~ Apply fixes provided by Adam Borowski: * Fix bogus date in debian/changelog (s/Mon/Tue) * Make the data package Arch:all, since it is truly arch-independent * Add Multi-Arch header to debian/control v1 -> v2 ~~~~~~~~ Incorporate feedback from Adam Borowski: * Fix typo in description of the tfortunes package * Update debian/changelog and increase debian version number
* Fall back to system-wide epigram directory.Andre Noll2019-06-19
| | | | | | | | | | If the per-user directory can not be opened, we currently print an error message and exit. As pointed out by Adam Borowski, this is not especially user-friendly. This commit teaches tfortune to look in a second, system-wide location in this case. This location can be controlled with the --datadir option of configure. The man page is updated accordingly.
* Make errors from regfile_iter_new() non-fatal.Andre Noll2019-06-19
| | | | | | | | | | | | The callers of the regfile iter API already handle the case of no epigrams or tag expressions just fine. In particular, the stats command can still print meaningful output if the tag expression directory does not exist, which is a perfectly valid setup. This patch modifies regfile_iter_new() to no longer abort but merely print a log message and return NULL if opendir() fails. The various accessors of the regfile iter API have to be adjusted to deal with NULL pointers but no changes to tfortune.c are required.
* com_stats(): Fix memory leak.Andre Noll2019-06-19
| | | | | | We currently leak one allocation per tag. Not a big deal since "stats" is a short-running subcommand. But at least valgrind no longer complains.
* com_stats(): Work around bogus gcc warning.Andre Noll2019-06-19
| | | | | | | | | | | | | | | | | | | | For some versions of gcc (7.4.0, 8.3.0, and 8.3.0-7 as shipped with Debian-11, but not gcc-7.4.0-1ubuntu1~18.04.1), the previous patch introduced the following warning: tfortune.c:912:3: warning: 'lh_stats' may be used uninitialized in this function [-Wmaybe-uninitialized] free(lh_stats); ^~~~~~~~~~~~~~ We only assign to lh_stats when --verbose is given, and only free the memory if --verbose is given. Apparently gcc has started to believe that the value of the "verbose" boolean variable might change, which is impossible. Therefore, the warning is believed to be a false positive. However, gcc has a point: There is no need to check for --verbose twice, as a single branch is sufficient. This not only gets rid of the warning but also makes the boolean variable pointless and removes more lines than it adds.
* com_stats(): Avoid division by zero.Andre Noll2019-06-18
| | | | | | | | | | | | If no epigrams are defined yet, the arguments to printf() contain a division by zero which results in output like: average number of epigrams per file -nan average number of tags per epigram. -nan average number of tag recurrence... -nan This is not a wrong per se, but it seems to be safer to special case this and print zero.
* Add infrastructure to build debian packages.Andre Noll2019-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the usual files below debian/ so that debian source and binary packages can be made with a command like dpkg-buildpackage The debian/rules file relies on dh but overrides the dh_auto_configure and the dh_autoreconf targets. The default recipe for dh_auto_configure results in warnings because tfortune's configure does not implement some of the options which dh appends to the configure command. The override for autoreconf is needed because the default recipe would remove our configure wrapper and replace it with the generated script. This has been tested on debian-9, debian-10 and debian-11. On all systems, lintian(1) reports no warnings and no errors. v3 -> v4 ~~~~~~~~ * Fix Bug ID in debian/changelog (pointed out by Adam Borowski) v2 -> v3 ~~~~~~~~ * Switch to a simple debian/rules file as suggested by Alexis Murzeau and Adam Borowski. v1 -> v2 ~~~~~~~~ Incorporate feedback from Adam Borowski: * Use dh_installchangelogs instead of open-coding it * Use gzip -n to avoid rendering the build non-reproducible * Fix the installation path of debian/copyright by running dh_install, * Create md5sums file
* Makefile: Avoid warning when config.mak is not present.Andre Noll2019-06-04
| | | | | | | | | Without the leading dash, make(1) complains if, for example, make config.mak is run on a pristine tree. The dash instructs make(1) to not emit a warning if the file to include does not exist or cannot be remade.
* Run gzip with -n.Andre Noll2019-06-01
| | | | | | | It is generally a good idea to not save the local file name and timestamp in the compressed file, as this thwarts reproducible builds. Suggested-by: Adam Borowski <kilobyte@angband.pl>
* New make targets: exe, build-arch, man and build-indep.Andre Noll2019-05-24
| | | | | | | It's good practice to provide separate make targets for generating arch-dependent files (e.g., executables) and for arch-independent files (e.g., manual pages). Currently there is only one file of either type which gets installed by the make target, but this might change.
* make distclean: Remove also configure.sh.Andre Noll2019-05-24
| | | | All derived files should be removed by the distclean target.
* Install man pages in compressed form.Andre Noll2019-05-24
| | | | | This is generally a good idea since all versions of man(1) support at least gzip-compressed manual pages.
* Install man page in section 6.Andre Noll2019-05-24
| | | | | | The manual page of the standard fortune program is part of section 6 (Games Manuals), so the tfortune man page should be installed there as well rather than in section 1.
* Avoid duplication in version, README, man page.Andre Noll2019-03-13
| | | | | | | | | | URLs and the email address are currently spread out over multiple files. This commit cleans up the mess by defining everything in Makefile and adjusting other places to use the information from there. We use the opportunity to add a link to the author's home page. version-gen.sh is made generic, i.e., it does not refer to tfortune any more.
* Fix --basedir completion.Andre Noll2019-01-20
| | | | Silly braino.
* Update copyright year.Andre Noll2019-01-20
|
* com_help(): Fix comma placement.Andre Noll2019-01-20
| | | | We never want to print a comma at the beginning of the line.
* epi_iter_new(): Use xrealloc().Andre Noll2019-01-20
| | | | This way we get proper error checking.
* txt2ast(): Mark iovec structure as const.Andre Noll2019-01-20
| | | | The function does not modify the fields of "tx".
* Initial commit.v1.0.0Andre Noll2018-03-19
Tfortune was maintained in a non-public git repository between 2016-04 and 2018-01. By then it was moved to a dedicated repository, rewritten to support the tag expression grammar and made scalable by introducing linear hashing. At the same time command line parsing was switched to the lopsub library, the command line options were redesigned and properly documented, and the nifty logo was added. In 2018-03 tfortune reached version 1.0 and was finally made public. All commits that led to version 1.0 have been discarded, so this repository contains only the final result as a single commit. Many thanks to Effie Symeonidi who gave valuable feedback regarding the installation instructions.