Compare commits

...
Sign in to create a new pull request.

38 commits

Author SHA1 Message Date
Fedora Release Engineering
a0ce0d4ff5 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:03:46 +00:00
David Cantrell
ccd217463b Upgrade to calendar(1) from OpenBSD 7.6
Signed-off-by: David Cantrell <dcantrell@burdell.org>
2025-03-03 10:53:25 -05:00
Fedora Release Engineering
8f27d67269 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 13:14:23 +00:00
Fedora Release Engineering
df2eae7e4e Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 18:54:04 +00:00
David Cantrell
8bacc1c6f0 Upgrade to calendar(1) from OpenBSD 7.5
Signed-off-by: David Cantrell <dcantrell@burdell.org>
2024-05-28 12:25:40 -04:00
Evan Goode
1e26f175fb Bump release to -7 to stay newer than Fedora 37 package
Signed-off-by: Evan Goode <mail@evangoo.de>
2024-03-28 16:11:42 +00:00
David Cantrell
0327816edb Upgrade to calendar(1) from OpenBSD 7.4
Use non-deprecated syntax for the %patch macro

Signed-off-by: David Cantrell <dcantrell@burdell.org>
2024-02-09 11:05:00 -05:00
Fedora Release Engineering
03886615a7 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-23 01:09:22 +00:00
Fedora Release Engineering
657a007118 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 15:00:18 +00:00
Fedora Release Engineering
ede8e3ab78 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 15:12:00 +00:00
Fedora Release Engineering
f5ce23d2ae Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 23:27:05 +00:00
David Cantrell
bd0533188e Upgrade to calendar(1) from OpenBSD 7.2
Use SPDX license expression in the License tag

Signed-off-by: David Cantrell <dcantrell@redhat.com>
2022-11-15 14:52:10 -05:00
Fedora Release Engineering
1b0701f233 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 22:31:58 +00:00
Fedora Release Engineering
c6c2691faf - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 22:51:14 +00:00
David Cantrell
3a67d1b4ee Upgrade to calendar(1) from OpenBSD 7.0
Signed-off-by: David Cantrell <david.l.cantrell@gmail.com>
2021-12-20 10:59:58 -05:00
Fedora Release Engineering
59ba3ba13b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 19:06:50 +00:00
Fedora Release Engineering
e27aaf9838 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 14:09:24 +00:00
Fedora Release Engineering
e0ffa3a6eb - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 01:37:31 +00:00
Tom Stellard
0877276ab7 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-17 03:18:09 +00:00
Fedora Release Engineering
d7023a6df2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 13:37:31 +00:00
David Cantrell
fa93c9a986 Upgrade to calendar(1) from OpenBSD 6.6
Include missing calendar data files (#1809218)

Signed-off-by: David Cantrell <dcantrell@redhat.com>
2020-04-30 11:18:46 -04:00
Fedora Release Engineering
008d389922 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 13:35:34 +00:00
David Cantrell
b8f5033395 Upgrade to calendar(1) from OpenBSD 6.5
Correct translation filenames in Makefile.linux
2019-08-27 15:51:23 -04:00
David Cantrell
c3a71855b7 Upgrade to calendar(1) from OpenBSD 6.5
Correct translation filenames in Makefile.linux
2019-08-27 15:35:26 -04:00
David Cantrell
83f591b36a Upgrade to calendar(1) from OpenBSD 6.5
Correct translation filenames in Makefile.linux
2019-08-27 15:26:44 -04:00
Fedora Release Engineering
a8bb517841 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 19:50:59 +00:00
Dominique Corbex
a3d78e7dda Update calendar.spec 2019-07-17 08:44:44 +00:00
Dominique Corbex
bf4d3ccaba Update calendar.spec 2019-07-17 08:39:00 +00:00
Igor Gnatenko
495132b98c
Fix downgradepath
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-03-07 14:12:57 +01:00
David Cantrell
b7dc1aaeed Upgrade to calendar-1.35 from OpenBSD 6.4
Fix path to 'cpp' in pathnames.h (#1653311)
2019-02-27 15:04:04 -05:00
Fedora Release Engineering
6a23e9e9ae - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 15:12:05 +00:00
Igor Gnatenko
6e82d99ef8 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:23:57 +01:00
David Cantrell
610ddbb9fb Upgrade to calendar-1.35 from OpenBSD 6.3 2018-07-19 17:04:24 -04:00
David Cantrell
c1c4bba2c1 Upgrade to calendar-1.35 from OpenBSD 6.3 2018-07-19 16:37:57 -04:00
David Cantrell
f090eecfb3 Upgrade to calendar-1.35 from OpenBSD 6.3 2018-07-19 16:37:47 -04:00
David Cantrell
39f36ed792 BR gcc per https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot 2018-07-19 15:08:59 -04:00
Fedora Release Engineering
ee01e85ac9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 21:31:36 +00:00
Jason Tibbitts
5c96c2e615 Remove needless use of %defattr 2018-07-10 00:28:47 -05:00
7 changed files with 340 additions and 204 deletions

9
.gitignore vendored
View file

@ -1,2 +1,11 @@
calendar-1.26-20110531cvs.tar.gz
/calendar-1.28-20140613cvs.tar.gz
/calendar-1.35-20180719cvs.tar.gz
/calendar-1.35-20190227cvs.tar.gz
/calendar-1.37-20190827cvs.tar.gz
/calendar-1.37-20200430cvs.tar.gz
/calendar-1.37-20211220cvs.tar.gz
/calendar-1.37-20221115cvs.tar.gz
/calendar-1.37-20240209cvs.tar.gz
/calendar-1.37-20240528cvs.tar.gz
/calendar-1.37-20250303cvs.tar.gz

View file

@ -8,7 +8,7 @@ CFLAGS = $(RPM_OPT_FLAGS) -D_GNU_SOURCE -DTM_YEAR_BASE=1900
SRCS = calendar.c io.c day.c pesach.c ostern.c paskha.c
OBJS = $(SRCS:.c=.o)
INTER = de_DE.ISO_8859-1 hr_HR.ISO_8859-2 ru_RU.KOI8-R fr_FR.ISO8859-1
INTER = de_DE.UTF-8 hr_HR.UTF-8 ru_RU.UTF-8 fr_FR.UTF-8
all: calendar

View file

@ -1,186 +0,0 @@
diff -up calendar-1.28-20140613cvs/calendar.c.linux calendar-1.28-20140613cvs/calendar.c
--- calendar-1.28-20140613cvs/calendar.c.linux 2012-01-31 03:29:25.000000000 -0500
+++ calendar-1.28-20140613cvs/calendar.c 2014-06-13 11:55:10.282747232 -0400
@@ -35,14 +35,12 @@
#include <err.h>
#include <errno.h>
#include <locale.h>
-#include <login_cap.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <tzfile.h>
#include <unistd.h>
#include "pathnames.h"
@@ -171,10 +169,6 @@ main(int argc, char *argv[])
case 0: /* child */
(void)setpgid(getpid(), getpid());
(void)setlocale(LC_ALL, "");
- if (setusercontext(NULL, pw, pw->pw_uid,
- LOGIN_SETALL ^ LOGIN_SETLOGIN))
- err(1, "unable to set user context (uid %u)",
- pw->pw_uid);
if (acstat) {
if (chdir(pw->pw_dir) ||
stat(calendarFile, &sbuf) != 0 ||
diff -up calendar-1.28-20140613cvs/calendar.h.linux calendar-1.28-20140613cvs/calendar.h
--- calendar-1.28-20140613cvs/calendar.h.linux 2010-04-28 14:20:15.000000000 -0400
+++ calendar-1.28-20140613cvs/calendar.h 2014-06-13 12:57:23.200747232 -0400
@@ -29,6 +29,7 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
extern struct passwd *pw;
extern int doall;
@@ -110,7 +111,7 @@ extern int f_SetdayAfter; /* calendar in
/* calendars */
extern enum calendars { GREGORIAN = 0, JULIAN, LUNAR } calendar;
-extern u_long julian;
+extern unsigned long julian;
#define NUMEV 3 /* Total number of such special events */
extern struct specialev spev[NUMEV];
@@ -120,3 +121,5 @@ extern struct specialev spev[NUMEV];
* (e.g. by using named pipes)
*/
#define USERTIMEOUT 20
+
+#define SECSPERDAY 86400
diff -up calendar-1.28-20140613cvs/day.c.linux calendar-1.28-20140613cvs/day.c
--- calendar-1.28-20140613cvs/day.c.linux 2013-11-26 08:18:53.000000000 -0500
+++ calendar-1.28-20140613cvs/day.c 2014-06-13 11:55:10.283747232 -0400
@@ -39,7 +39,6 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <tzfile.h>
#include "pathnames.h"
#include "calendar.h"
@@ -157,7 +156,7 @@ settime(time_t *now)
tp->tm_isdst = 0;
tp->tm_hour = 12;
*now = mktime(tp);
- if (isleap(tp->tm_year + TM_YEAR_BASE))
+ if (__isleap(tp->tm_year + TM_YEAR_BASE))
cumdays = daytab[1];
else
cumdays = daytab[0];
@@ -288,8 +287,10 @@ isnow(char *endp, int bodun)
return (NULL);
/* adjust bodun rate */
- if (bodun && !bodun_always)
- bodun = !arc4random_uniform(3);
+ if (bodun && !bodun_always) {
+ srandom(3);
+ bodun = random();
+ }
/* Easter or Easter depending days */
if (flags & F_SPECIAL)
@@ -440,7 +441,7 @@ isnow(char *endp, int bodun)
}
v2 = day - tp->tm_yday;
if ((v2 > v1) || (v2 < 0)) {
- if ((v2 += isleap(tp->tm_year + TM_YEAR_BASE) ? 366 : 365)
+ if ((v2 += __isleap(tp->tm_year + TM_YEAR_BASE) ? 366 : 365)
<= v1)
tmtmp.tm_year++;
else if(!bodun || (day - tp->tm_yday) != -1)
@@ -676,7 +677,7 @@ variable_weekday(int *day, int month, in
int *cumdays;
int day1;
- if (isleap(year))
+ if (__isleap(year))
cumdays = daytab[1];
else
cumdays = daytab[0];
diff -up calendar-1.28-20140613cvs/io.c.linux calendar-1.28-20140613cvs/io.c
--- calendar-1.28-20140613cvs/io.c.linux 2013-11-26 08:18:53.000000000 -0500
+++ calendar-1.28-20140613cvs/io.c 2014-06-13 11:55:10.283747232 -0400
@@ -45,7 +45,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <tzfile.h>
#include <unistd.h>
#include "pathnames.h"
@@ -68,7 +67,7 @@ void
cal(void)
{
int ch, l, i, bodun = 0, bodun_maybe = 0, var, printing;
- struct event *events, *cur_evt, *ev1, *tmp;
+ struct event *events = NULL, *cur_evt = NULL, *ev1 = NULL, *tmp = NULL;
char buf[2048 + 1], *prefix = NULL, *p;
struct match *m;
FILE *fp;
diff -up calendar-1.28-20140613cvs/ostern.c.linux calendar-1.28-20140613cvs/ostern.c
--- calendar-1.28-20140613cvs/ostern.c.linux 2009-10-27 19:59:36.000000000 -0400
+++ calendar-1.28-20140613cvs/ostern.c 2014-06-13 11:55:10.283747232 -0400
@@ -30,7 +30,6 @@
#include <stdio.h>
#include <time.h>
-#include <tzfile.h>
#include "calendar.h"
@@ -61,7 +60,7 @@ easter(int year) /* 0 ... abcd, NOT sinc
e_p = e_p + 1;
e_q = 31 + 28 + e_p;
- if (isleap(year))
+ if (__isleap(year))
e_q++;
if (e_n == 4)
diff -up calendar-1.28-20140613cvs/paskha.c.linux calendar-1.28-20140613cvs/paskha.c
--- calendar-1.28-20140613cvs/paskha.c.linux 2009-10-27 19:59:36.000000000 -0400
+++ calendar-1.28-20140613cvs/paskha.c 2014-06-13 13:44:02.029747232 -0400
@@ -27,7 +27,7 @@
*/
#include <stdio.h>
-#include <tzfile.h>
+#include <time.h>
#include "calendar.h"
@@ -48,7 +48,7 @@ paskha(int R) /*year*/
d = (19*a + x) % 30;
e = (2*b + 4*c + 6*d + y) % 7;
cumdays = 31 + 28;
- if (isleap(R))
+ if (__isleap(R))
cumdays++;
return ((cumdays + 22) + (d + e) + 13);
}
diff -up calendar-1.28-20140613cvs/pesach.c.linux calendar-1.28-20140613cvs/pesach.c
--- calendar-1.28-20140613cvs/pesach.c.linux 2009-10-27 19:59:36.000000000 -0400
+++ calendar-1.28-20140613cvs/pesach.c 2014-06-13 12:57:51.624747232 -0400
@@ -18,7 +18,7 @@
*/
#include <stdio.h>
-#include <tzfile.h>
+#include <time.h>
#include "calendar.h"
@@ -62,5 +62,5 @@ pesach(int R)
if (R > 1582)
cumdays += R / 100 - R /400 - 2;
- return (31 + 28 + cumdays + (isleap(R)? 1 : 0));
+ return (31 + 28 + cumdays + (__isleap(R)? 1 : 0));
}

213
calendar-1.37-linux.patch Normal file
View file

@ -0,0 +1,213 @@
diff -up calendar-1.37-20221115cvs/calendar.c.orig calendar-1.37-20221115cvs/calendar.c
--- calendar-1.37-20221115cvs/calendar.c.orig 2019-02-01 11:22:53.000000000 -0500
+++ calendar-1.37-20221115cvs/calendar.c 2022-11-15 14:33:05.908157513 -0500
@@ -35,7 +35,6 @@
#include <err.h>
#include <errno.h>
#include <locale.h>
-#include <login_cap.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
@@ -98,16 +97,20 @@ main(int argc, char *argv[])
break;
case 'A': /* days after current date */
- f_dayAfter = strtonum(optarg, 0, INT_MAX, &errstr);
- if (errstr)
- errx(1, "-A %s: %s", optarg, errstr);
+ f_dayAfter = strtoll(optarg, NULL, 10);
+ if (errno == ERANGE && (f_dayAfter == LLONG_MIN || f_dayBefore == LLONG_MAX))
+ errx(1, "-A %s: %s", optarg, strerror(errno));
+ else if (f_dayAfter < 0 || f_dayAfter > INT_MAX)
+ errx(1, "-A %s: %s out of range", optarg, optarg);
f_Setday = 1;
break;
case 'B': /* days before current date */
- f_dayBefore = strtonum(optarg, 0, INT_MAX, &errstr);
- if (errstr)
- errx(1, "-B %s: %s", optarg, errstr);
+ f_dayBefore = strtoll(optarg, NULL, 10);
+ if (errno == ERANGE && (f_dayBefore == LLONG_MIN || f_dayBefore == LLONG_MAX))
+ errx(1, "-B %s: %s", optarg, strerror(errno));
+ else if (f_dayBefore < 0 || f_dayBefore > INT_MAX)
+ errx(1, "-B %s: %s out of range", optarg, optarg);
if (f_dayBefore != 0)
f_Setday = 1;
break;
@@ -125,15 +128,6 @@ main(int argc, char *argv[])
if (argc)
usage();
- if (doall) {
- if (pledge("stdio rpath tmppath fattr getpw id proc exec", NULL)
- == -1)
- err(1, "pledge");
- } else {
- if (pledge("stdio rpath proc exec", NULL) == -1)
- err(1, "pledge");
- }
-
/* use current time */
if (f_time <= 0)
(void)time(&f_time);
@@ -192,10 +186,6 @@ main(int argc, char *argv[])
case 0: /* child */
(void)setpgid(getpid(), getpid());
(void)setlocale(LC_ALL, "");
- if (setusercontext(NULL, pw, pw->pw_uid,
- LOGIN_SETALL ^ LOGIN_SETLOGIN))
- err(1, "unable to set user context (uid %u)",
- pw->pw_uid);
if (acstat) {
if (chdir(pw->pw_dir) ||
stat(calendarFile, &sbuf) != 0 ||
diff -up calendar-1.37-20221115cvs/calendar.h.orig calendar-1.37-20221115cvs/calendar.h
--- calendar-1.37-20221115cvs/calendar.h.orig 2019-02-01 11:22:53.000000000 -0500
+++ calendar-1.37-20221115cvs/calendar.h 2022-11-15 14:33:44.201071607 -0500
@@ -29,6 +29,7 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
extern struct passwd *pw;
extern int doall;
@@ -116,7 +117,7 @@ extern int f_Setday; /* calendar invoked
/* calendars */
extern enum calendars { GREGORIAN = 0, JULIAN, LUNAR } calendar;
-extern u_long julian;
+extern unsigned long julian;
#define NUMEV 3 /* Total number of such special events */
extern struct specialev spev[NUMEV];
diff -up calendar-1.37-20221115cvs/day.c.orig calendar-1.37-20221115cvs/day.c
--- calendar-1.37-20221115cvs/day.c.orig 2019-08-12 16:03:28.000000000 -0400
+++ calendar-1.37-20221115cvs/day.c 2022-11-15 14:35:03.925892751 -0500
@@ -160,7 +160,7 @@ settime(time_t *now)
tp->tm_isdst = 0;
tp->tm_hour = 12;
*now = mktime(tp);
- if (isleap(tp->tm_year + 1900))
+ if (__isleap(tp->tm_year + 1900))
cumdays = daytab[1];
else
cumdays = daytab[0];
@@ -288,8 +288,10 @@ isnow(char *endp, int bodun)
return (NULL);
/* adjust bodun rate */
- if (bodun && !bodun_always)
- bodun = !arc4random_uniform(3);
+ if (bodun && !bodun_always) {
+ srandom(3);
+ bodun = random();
+ }
/* Easter or Easter depending days */
if (flags & F_SPECIAL)
@@ -444,7 +446,7 @@ isnow(char *endp, int bodun)
}
v2 = day - tp->tm_yday;
if ((v2 > v1) || (v2 < 0)) {
- if ((v2 += isleap(tp->tm_year + 1900) ? 366 : 365)
+ if ((v2 += __isleap(tp->tm_year + 1900) ? 366 : 365)
<= v1)
tmtmp.tm_year++;
else if(!bodun || (day - tp->tm_yday) != -1)
@@ -674,7 +676,7 @@ variable_weekday(int *day, int month, in
int *cumdays;
int day1;
- if (isleap(year))
+ if (__isleap(year))
cumdays = daytab[1];
else
cumdays = daytab[0];
diff -up calendar-1.37-20221115cvs/io.c.orig calendar-1.37-20221115cvs/io.c
--- calendar-1.37-20221115cvs/io.c.orig 2021-12-07 09:00:33.000000000 -0500
+++ calendar-1.37-20221115cvs/io.c 2022-11-15 14:36:05.933753650 -0500
@@ -67,7 +67,7 @@ void
cal(void)
{
int ch, l, i, bodun = 0, bodun_maybe = 0, var, printing;
- struct event *events, *cur_evt, *ev1, *tmp;
+ struct event *events = NULL, *cur_evt = NULL, *ev1 = NULL, *tmp = NULL;
char buf[2048 + 1], *prefix = NULL, *p;
struct match *m;
FILE *fp;
@@ -282,8 +282,8 @@ getfield(char *p, char **endp, int *flag
switch (*start) {
case '-':
case '+':
- var = strtonum(start + 1, 0, 365, &errstr);
- if (errstr)
+ var = strtoll(start + 1, NULL, 10);
+ if ((errno == ERANGE && (var == LLONG_MIN || var == LLONG_MAX)) || (var < 0 || var > 365))
return (0); /* Someone is just being silly */
if (*start == '-')
var = -var;
diff -up calendar-1.37-20221115cvs/ostern.c.orig calendar-1.37-20221115cvs/ostern.c
--- calendar-1.37-20221115cvs/ostern.c.orig 2019-01-17 01:15:44.000000000 -0500
+++ calendar-1.37-20221115cvs/ostern.c 2022-11-15 14:36:20.564720831 -0500
@@ -58,7 +58,7 @@ easter(int year) /* 0 ... abcd, NOT sinc
e_p = e_p + 1;
e_q = 31 + 28 + e_p;
- if (isleap(year))
+ if (__isleap(year))
e_q++;
if (e_n == 4)
diff -up calendar-1.37-20221115cvs/paskha.c.orig calendar-1.37-20221115cvs/paskha.c
--- calendar-1.37-20221115cvs/paskha.c.orig 2015-03-14 20:41:28.000000000 -0400
+++ calendar-1.37-20221115cvs/paskha.c 2022-11-15 14:36:48.138658978 -0500
@@ -27,6 +27,7 @@
*/
#include <stdio.h>
+#include <time.h>
#include "calendar.h"
@@ -47,7 +48,7 @@ paskha(int R) /*year*/
d = (19*a + x) % 30;
e = (2*b + 4*c + 6*d + y) % 7;
cumdays = 31 + 28;
- if (isleap(R))
+ if (__isleap(R))
cumdays++;
return ((cumdays + 22) + (d + e) + 13);
}
diff -up calendar-1.37-20221115cvs/pathnames.h.orig calendar-1.37-20221115cvs/pathnames.h
--- calendar-1.37-20221115cvs/pathnames.h.orig 2021-12-07 09:00:33.000000000 -0500
+++ calendar-1.37-20221115cvs/pathnames.h 2022-11-15 14:37:06.633617492 -0500
@@ -33,7 +33,7 @@
#include <paths.h>
-#define _PATH_CPP "/usr/libexec/cpp"
+#define _PATH_CPP "/usr/bin/cpp"
/* XXX -- fix when cpp parses arguments rationally */
#define _PATH_INCLUDE "-I/usr/share/calendar"
diff -up calendar-1.37-20221115cvs/pesach.c.orig calendar-1.37-20221115cvs/pesach.c
--- calendar-1.37-20221115cvs/pesach.c.orig 2015-03-14 20:41:28.000000000 -0400
+++ calendar-1.37-20221115cvs/pesach.c 2022-11-15 14:37:31.728561201 -0500
@@ -18,6 +18,7 @@
*/
#include <stdio.h>
+#include <time.h>
#include "calendar.h"
@@ -61,5 +62,5 @@ pesach(int R)
if (R > 1582)
cumdays += R / 100 - R /400 - 2;
- return (31 + 28 + cumdays + (isleap(R)? 1 : 0));
+ return (31 + 28 + cumdays + (__isleap(R)? 1 : 0));
}

View file

@ -1,11 +1,10 @@
%define alphatag 20140613cvs
%define alphatag 20250303cvs
Summary: Reminder utility
Name: calendar
Version: 1.28
Release: 8.%{alphatag}%{?dist}
License: BSD
Group: Applications/Productivity
Version: 1.37
Release: 12.%{alphatag}%{?dist}
License: BSD-3-Clause AND BSD-2-Clause AND ISC
URL: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/calendar
# The source archive is generated with the export-calendar-source.sh
@ -17,9 +16,10 @@ Source0: %{name}-%{version}-%{alphatag}.tar.gz
Source1: Makefile.linux
Source2: export-calendar-source.sh
Patch0: %{name}-1.28-linux.patch
Patch0: %{name}-1.37-linux.patch
BuildRequires: gcc
BuildRequires: make
Requires: cpp
%description
@ -30,8 +30,7 @@ tomorrow's. The output of the command shows upcoming events for the
week.
%prep
%setup -q -n %{name}-%{version}-%{alphatag}
%patch0 -p1
%autosetup -n %{name}-%{version}-%{alphatag}
cp %{SOURCE1} Makefile
for c in calendars/*.*/* ; do
@ -43,19 +42,106 @@ for c in calendars/*.*/* ; do
done
%build
make %{?_smp_mflags}
%make_build
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%make_install
%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/calendar
%{_mandir}/man1/calendar.1.gz
%{_datadir}/calendar
%changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-12.20250303cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Mar 03 2025 David Cantrell <dcantrell@redhat.com> - 1.37-11.20250303cvs
- Upgrade to calendar(1) from OpenBSD 7.6
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-10.20240528cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-9.20240528cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue May 28 2024 David Cantrell <dcantrell@redhat.com> - 1.37-8.20240528cvs
- Upgrade to calendar(1) from OpenBSD 7.5
* Thu Mar 28 2024 Evan Goode <egoode@redhat.com> - 1.37-7.20240209cvs
- Bump release to stay newer than Fedora 37 package
* Fri Feb 09 2024 David Cantrell <dcantrell@redhat.com> - 1.37-6.20240209cvs
- Upgrade to calendar(1) from OpenBSD 7.4
- Use non-deprecated syntax for the %%patch macro
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-5.20221115cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-4.20221115cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-3.20221115cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-2.20221115cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Nov 15 2022 David Cantrell <dcantrell@redhat.com> - 1.37-20221115cvs
- Upgrade to calendar(1) from OpenBSD 7.2
- Use SPDX license expression in the License tag
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-7.20211220cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-6.20211220cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Dec 20 2021 David Cantrell <dcantrell@redhat.com> - 1.37-20211220cvs
- Upgrade to calendar(1) from OpenBSD 7.0
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-4.20200430cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-3.20200430cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-2.20200430cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Apr 30 2020 David Cantrell <dcantrell@redhat.com> - 1.37-1.20200430cvs
- Upgrade to calendar(1) from OpenBSD 6.6
- Include missing calendar data files (#1809218)
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-2.20190827cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Aug 27 2019 David Cantrell <dcantrell@redhat.com> - 1.37-1.20190827cvs
- Upgrade to calendar(1) from OpenBSD 6.5
- Correct translation filenames in Makefile.linux
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.35-4.20190227cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Mar 07 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.35-2.20190227cvs
- Fix downgradepath
* Wed Feb 27 2019 David Cantrell <dcantrell@redhat.com> - 1.35-1.20190227cvs
- Upgrade to calendar-1.35 from OpenBSD 6.4
- Fix path to 'cpp' in pathnames.h (#1653311)
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.35-2.20180719cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 19 2018 David Cantrell <dcantrell@redhat.com> - 1.35-1.20180719cvs
- Upgrade to calendar-1.35 from OpenBSD 6.3
* Thu Jul 19 2018 David Cantrell <dcantrell@redhat.com> - 1.28-10.20140613cvs
- BR gcc per https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.28-9.20140613cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.28-8.20140613cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

20
export-calendar-source.sh Normal file → Executable file
View file

@ -1,19 +1,33 @@
#!/bin/sh
#TAG=HEAD
TAG=OPENBSD_5_5
TAG=OPENBSD_7_6
SERVER=anoncvs4.usa.openbsd.org
PATH=/usr/bin
CWD=$(pwd)
if ! grep "${SERVER}" ~/.ssh/config ; then
echo "*** Configuration block for ${SERVER} not found in ~/.ssh/config" >&2
echo "*** Make sure this block exists in ~/.ssh/config:" >&2
echo >&2
echo "Host ${SERVER}" >&2
echo " Port 2022" >&2
exit 1
fi
CVS_RSH=ssh ; export CVS_RSH
rm -rf calendar calendar-${VER}
mkdir calendar
cvs -d anoncvs@anoncvs.ca.openbsd.org:/cvs co \
-d calendar -r ${TAG} src/usr.bin/calendar
cvs -d :ext:anoncvs@${SERVER}:/cvs co -d calendar -r ${TAG} src/usr.bin/calendar
cd calendar
VER="$(cvs status calendar.c | grep 'Working revision:' | awk '{ print $3; }')"
SNAPSHOT="$(date +%Y%m%d)cvs"
cd ..
find calendar -type d -name CVS | xargs rm -rf
mv calendar calendar-${VER}-${SNAPSHOT}
tar -cvf - calendar-${VER}-${SNAPSHOT} | gzip -9c > calendar-${VER}-${SNAPSHOT}.tar.gz
rm -rf calendar-${VER}-${SNAPSHOT}

View file

@ -1 +1 @@
016045f29b283c4267e525de6d5cc1fd calendar-1.28-20140613cvs.tar.gz
SHA512 (calendar-1.37-20250303cvs.tar.gz) = e5f15b6c4efc11ee6c7041535ba5e8f2d0cc3ed22a3944bf2f499fabcfae9ae45290b59a564641bf0355fa402674890694054790a9ee64304a8214752b6b4edf