Bug 1017953 - calendar: no calendar file: ``calendar'' or ``~/.calendar/calendar''
calendar: no calendar file: ``calendar'' or ``~/.calendar/calendar''
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: calendar (Show other bugs)
19
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 16:35 EDT by Eduardo Minguez
Modified: 2014-06-18 09:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-18 09:16:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eduardo Minguez 2013-10-10 16:35:39 EDT
Description of problem:
Running calendar without arguments doesn't work, it shows:
$ calendar
calendar: no calendar file: ``calendar'' or ``~/.calendar/calendar''

And it should show (debian output):
$ calendar
oct 10     Beginning of the Wars for Independence in Cuba
oct 10     Foundation of the Workers Party in North Korea
oct 10     Mercury at Superior Conjunction with Sun.  Moves into night sky. (1984)
oct 10     Spiro T. Agnew resigns as Vice-President due to income tax fraud, 1973
oct 10     National Day in Taiwan
oct 10     Oklahoma Historical Day in Oklahoma
oct 10     John Prine is born in Maywood, Illinois, 1946
oct 10     Giuseppe Verdi is born in Le Roncole, Italy, 1813
oct 10     Ubuntu 10.10 (Maverick Meerkat) released, 2010
oct 10     Día Nacional de la Danza
oct 10         Launceston Show Day (TAS)
oct 10     Demonstrators against paedophilia are 300,000 in Bruxelles, 1996
oct 10     Bonne fête aux Ghislain !
oct 10     Aujourd'hui, c'est la St(e) Ghislaine.
oct 10     N'oubliez pas les Guislain !
oct 10     Bonne fête aux Guislaine !
oct 10     Gedeon
oct 11     "Saturday Night Live" premiers on NBC-TV, 1975
oct 11     The Gang of Four are arrested in Peking, 1976
oct 11     The first steam powered ferry ran between New York and Hoboken, 1811
oct 11     The second Vatican Ecumenical Council opens in Rome, 1962
oct 11     First broadcast of Saturday Night Live, 1975
oct 11     Day of the Revolution in Panama
oct 11     Anton Bruckner dies in Vienna, Austria, 1896
oct 11     Old Lady of the Trees
oct 11     Día Nacional de la Patagonia
oct 11     Aujourd'hui, c'est la St(e) Firmin.
oct 11     N'oubliez pas les Gausbert !
oct 11     Brigitta

Version-Release number of selected component (if applicable):


How reproducible:
Run "calendar" without arguments

Steps to Reproduce:
1. Install calendar
2. Run calendar without arguments
3.

Actual results:
calendar: no calendar file: ``calendar'' or ``~/.calendar/calendar''

Expected results:
oct 10     Beginning of the Wars for Independence in Cuba
oct 10     Foundation of the Workers Party in North Korea
oct 10     Mercury at Superior Conjunction with Sun.  Moves into night sky. (1984)
oct 10     Spiro T. Agnew resigns as Vice-President due to income tax fraud, 1973
oct 10     National Day in Taiwan
oct 10     Oklahoma Historical Day in Oklahoma
oct 10     John Prine is born in Maywood, Illinois, 1946
oct 10     Giuseppe Verdi is born in Le Roncole, Italy, 1813
oct 10     Ubuntu 10.10 (Maverick Meerkat) released, 2010
oct 10     Día Nacional de la Danza
oct 10         Launceston Show Day (TAS)
oct 10     Demonstrators against paedophilia are 300,000 in Bruxelles, 1996
oct 10     Bonne fête aux Ghislain !
oct 10     Aujourd'hui, c'est la St(e) Ghislaine.
oct 10     N'oubliez pas les Guislain !
oct 10     Bonne fête aux Guislaine !
oct 10     Gedeon
oct 11     "Saturday Night Live" premiers on NBC-TV, 1975
oct 11     The Gang of Four are arrested in Peking, 1976
oct 11     The first steam powered ferry ran between New York and Hoboken, 1811
oct 11     The second Vatican Ecumenical Council opens in Rome, 1962
oct 11     First broadcast of Saturday Night Live, 1975
oct 11     Day of the Revolution in Panama
oct 11     Anton Bruckner dies in Vienna, Austria, 1896
oct 11     Old Lady of the Trees
oct 11     Día Nacional de la Patagonia
oct 11     Aujourd'hui, c'est la St(e) Firmin.
oct 11     N'oubliez pas les Gausbert !
oct 11     Brigitta

Additional info:
Comment 1 David Cantrell 2013-10-16 11:44:54 EDT
What package in Debian provides the calendar command you are talking about?  The calendar package in Fedora is a direct port of the calendar command from the latest stable release of OpenBSD.  The functionality you describe is exactly how the command operates on OpenBSD.  You must create a local calendar file, which can include files from /usr/share/calendar, and then calendar will read that and display output.  calendar is meant to be used by each user, so there is no system-wide calendar file.
Comment 2 Eduardo Minguez 2014-06-09 07:12:31 EDT
rpm -ql calendar shows /usr/share/calendar/ files. I think what debian binary does is to show calendar.all calendar if no parameter or calendar is specified.
Comment 3 David Cantrell 2014-06-13 13:48:17 EDT
What package in Debian provides the calendar command?
Comment 4 David Cantrell 2014-06-18 09:16:34 EDT
OK, this took a while to track down because I don't know how Debian is organized.  But the 'bsdmainutils' package in Debian appears to provide the calendar command.  Like this package, they are using the OpenBSD source.  However they add some nonstandard changes to the package that are specific to Debian.  In particular, you are referring to:

+			    (fdin = open(calendarFile, O_RDONLY)) != -1)) {
+				/* Try the system-wide calendar file. */
+				if ((fdin = open(_PATH_DEFAULT, O_RDONLY)) == -1) {
+					errx(1, "no calendar file: ``%s'' or ``~/%s/%s''",
+					    calendarFile, calendarHome, calendarFile);
+				}
+			}

In the io.c file.  Which also relies on a new /etc/calendar structure for a system-wide calendar.

I'm not interested in carrying these nonstandard extensions to the calendar(1) command.  The main intent was to bring the BSD calendar command to Fedora systems.  Please follow the instructions in the man page on how to use it.

Note You need to log in before you can comment on or make changes to this bug.