Opened 13 years ago

Closed 6 years ago

#33166 closed enhancement (fixed)

fortune: add variant to hide offensive fortunes

Reported by: cmconnelly (Claire Connelly) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: fortune

Description

The limerick data file included with the fortune port contains many offensive, sexually charged limericks; in particular, ones that really aren't appropriate for display on a machine in a shared environment.

As fortune includes a mechanism for avoiding the display of such fortunes by default, I would recommend that the limerick data file simply be renamed to limerick-o.

Note that such files already exist in this distribution. And, just as an example, here are what I would say are the two most offensive fortunes from murphy-o,

You can lead a horticulture, but you can't make her think.

Pity the poor egg;
It only gets laid once in its life.

and just the first limerick in limerick,

A bad little girl in Madrid,
A most reprehensible kid,
        Told her Tante Louise
        That her cunt smelled like cheese,
And the worst of it was that it did!

There are worse ones in there.

Change History (9)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: limerick data file contains offensive fortunesfortune: limerick data file contains offensive fortunes

To be fair, limericks are often (some would say usually or even expected to be) offensive.

The developers of fortune appear to be aware of this. The first paragraph of the README says:

The potentially offensive fortunes are installed by default on FreeBSD
systems.  If you're absolutely, *positively*, without-a-shadow-of-a-doubt
sure that your user community goes berzerk/sues your pants off/drops dead
upon reading one of them, edit the Makefile in the subdirectory datfiles,
and do "make all install".

That Makefile contains:

# TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, COMMENT OUT THE
# THREE LINES AND UNCOMMENT THE FOURTH LINE.

# THE THREE LINES:
FILES+=	fortunes2-o limerick murphy-o gerrold.limerick
BLDS+=	fortunes2-o.dat limerick.dat murphy-o.dat gerrold.limerick.dat
TYPE=	real

# THE FOURTH LINE:
#TYPE=	fake

In order to not deviate too much from the official distribution, what if we offered an "+offensive" variant which, when deselected, would perform the modifications described in the README/Makefile? I am undecided as to whether this variant would default to on or off.

Alternately, it's possible something has already been done about this upstream, however, I do not know if there is an upstream; I don't know if this software has a homepage or a newer version. If anyone can locate one, let me know.

comment:2 Changed 13 years ago by cmconnelly (Claire Connelly)

To be fair, limericks are often (some would say usually or even expected to be) offensive.

I agree, but if you compare the other things that are marked as offensive with the "inoffensive" limericks, I think you'll see that many of the limericks are really in a whole different category of offensive.

Alternately, it's possible something has already been done about this upstream, however, I do not know if there is an upstream; I don't know if this software has a homepage or a newer version. If anyone can locate one, let me know.

I believe that Debian is upstream; see http://packages.debian.org/changelogs/pool/main/f/fortune-mod/current/copyright, http://packages.qa.debian.org/f/fortune-mod.html, and http://packages.debian.org/source/sid/fortune-mod . There are also additional fortune-* packages containing supplemental fortune data files.

Rather than just mark the files with a -o extension, the Debian package has a separate directory for offensive fortune files, and fortune only prints offensive fortunes if the -o (only offensive) or -a (all available) flag is specified. But Debian also produces several binary packages from the source, including fortune-mod (the main package, with the binaries), which is dependent on fortunes-min (a minimal set of fortune data); fortunes, an optional larger set of fortunes; and fortunes-off, an optional package with offensive fortunes. So they avoid having offensive fortunes on the system unless they were specifically requested by the system administrator, and those fortunes are only printed if they are requested by the person running the fortune program. Debian puts the limerick data file in fortunes-off.

I would say that the most trivial fix for MacPorts is to simply rename the limerick data file to limerick-o, which means you'll only see them if you ask for them. The Debian-maintained version of fortune does have lots more fortunes, so having that could be a nice thing all on its own. (I imagine that packaging that version might involve including a offensive variant that would cause the offensive fortunes to be installed, and that that variant would not be selected by default.)

Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to stuartwesterman@…

comment:4 Changed 10 years ago by stuartwesterman (Stuart Westerman)

Is this still an issue?

I'll look into implementing the +offensive variant, and look into the debian style of -o (only offensive) and -a (all available).

I'd also like the original ticket creator to weigh in again about whether or not this is still an issue for him because I assume that the majority of users don't have a problem with offensive fortunes being enabled by default.

comment:5 Changed 10 years ago by cmconnelly (Claire Connelly)

Yes, it's still a problem. I'd actually forgotten how squicky some of these limericks are until I looked again today. I've "fixed it" on my machines by making the file read-only.

One of the other features Debian's upstream fortune has is giving you lots of separate packages to install, so if you like The Simpsons, you can have fortunes from The Simpsons, and if you don't, you don't.

comment:6 Changed 8 years ago by mf2k (Frank Schima)

Owner: stuartwesterman deleted
Status: newassigned

comment:7 Changed 8 years ago by mf2k (Frank Schima)

Summary: fortune: limerick data file contains offensive fortunesfortune: add variant to hide offensive fortunes
Type: defectenhancement
Version: 2.0.3

comment:8 Changed 8 years ago by cmconnelly (Claire Connelly)

Ooh, very timely—I just got a couple of these on a new install and had to cripple the limerick files again.

comment:9 Changed 6 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: assignedclosed

In d5a2a26c198073694c5b00a124738e139c8c02e1/macports-ports (master):

fortune: improve handling of offensive fortunes

Now installing all the potentially offensive fortunes in the
recommended way, with a suffix of -o on the filename so they are only
shown when the -o or -a options are used, and obfuscated on disk with
rot13.

Fixes: #33166

Note: See TracTickets for help on using tickets.