diff --git a/.gitignore b/.gitignore index 469c469..13f966d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,3 @@ 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 diff --git a/Makefile.linux b/Makefile.linux index 92854ef..4a076fa 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -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.UTF-8 hr_HR.UTF-8 ru_RU.UTF-8 fr_FR.UTF-8 +INTER = de_DE.ISO_8859-1 hr_HR.ISO_8859-2 ru_RU.KOI8-R fr_FR.ISO8859-1 all: calendar diff --git a/calendar-1.37-linux.patch b/calendar-1.35-linux.patch similarity index 61% rename from calendar-1.37-linux.patch rename to calendar-1.35-linux.patch index 4154d5d..bf1fd6f 100644 --- a/calendar-1.37-linux.patch +++ b/calendar-1.35-linux.patch @@ -1,6 +1,6 @@ -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 +diff -up calendar-1.35-20180719cvs/calendar.c.orig calendar-1.35-20180719cvs/calendar.c +--- calendar-1.35-20180719cvs/calendar.c.orig 2015-12-07 13:46:35.000000000 -0500 ++++ calendar-1.35-20180719cvs/calendar.c 2018-07-19 17:03:48.564840708 -0400 @@ -35,7 +35,6 @@ #include #include @@ -20,8 +20,8 @@ diff -up calendar-1.37-20221115cvs/calendar.c.orig calendar-1.37-20221115cvs/cal + 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; ++ errx(1, "-A %s: %s out of range", optarg); + f_SetdayAfter = 1; break; case 'B': /* days before current date */ @@ -32,11 +32,11 @@ diff -up calendar-1.37-20221115cvs/calendar.c.orig calendar-1.37-20221115cvs/cal + 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; ++ errx(1, "-B %s: %s out of range", optarg); break; -@@ -125,15 +128,6 @@ main(int argc, char *argv[]) + + case 'w': +@@ -123,15 +126,6 @@ main(int argc, char *argv[]) if (argc) usage(); @@ -52,7 +52,7 @@ diff -up calendar-1.37-20221115cvs/calendar.c.orig calendar-1.37-20221115cvs/cal /* use current time */ if (f_time <= 0) (void)time(&f_time); -@@ -192,10 +186,6 @@ main(int argc, char *argv[]) +@@ -190,10 +184,6 @@ main(int argc, char *argv[]) case 0: /* child */ (void)setpgid(getpid(), getpid()); (void)setlocale(LC_ALL, ""); @@ -63,9 +63,9 @@ diff -up calendar-1.37-20221115cvs/calendar.c.orig calendar-1.37-20221115cvs/cal 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 +diff -up calendar-1.35-20180719cvs/calendar.h.orig calendar-1.35-20180719cvs/calendar.h +--- calendar-1.35-20180719cvs/calendar.h.orig 2015-12-07 13:46:35.000000000 -0500 ++++ calendar-1.35-20180719cvs/calendar.h 2018-07-19 16:51:12.156275891 -0400 @@ -29,6 +29,7 @@ * SUCH DAMAGE. */ @@ -74,7 +74,7 @@ diff -up calendar-1.37-20221115cvs/calendar.h.orig calendar-1.37-20221115cvs/cal extern struct passwd *pw; extern int doall; -@@ -116,7 +117,7 @@ extern int f_Setday; /* calendar invoked +@@ -116,7 +117,7 @@ extern int f_SetdayAfter; /* calendar in /* calendars */ extern enum calendars { GREGORIAN = 0, JULIAN, LUNAR } calendar; @@ -83,9 +83,9 @@ diff -up calendar-1.37-20221115cvs/calendar.h.orig calendar-1.37-20221115cvs/cal #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 +diff -up calendar-1.35-20180719cvs/day.c.orig calendar-1.35-20180719cvs/day.c +--- calendar-1.35-20180719cvs/day.c.orig 2016-09-14 11:09:46.000000000 -0400 ++++ calendar-1.35-20180719cvs/day.c 2018-07-19 16:51:00.669312872 -0400 @@ -160,7 +160,7 @@ settime(time_t *now) tp->tm_isdst = 0; tp->tm_hour = 12; @@ -108,7 +108,7 @@ diff -up calendar-1.37-20221115cvs/day.c.orig calendar-1.37-20221115cvs/day.c /* Easter or Easter depending days */ if (flags & F_SPECIAL) -@@ -444,7 +446,7 @@ isnow(char *endp, int bodun) +@@ -440,7 +442,7 @@ isnow(char *endp, int bodun) } v2 = day - tp->tm_yday; if ((v2 > v1) || (v2 < 0)) { @@ -117,7 +117,7 @@ diff -up calendar-1.37-20221115cvs/day.c.orig calendar-1.37-20221115cvs/day.c <= v1) tmtmp.tm_year++; else if(!bodun || (day - tp->tm_yday) != -1) -@@ -674,7 +676,7 @@ variable_weekday(int *day, int month, in +@@ -670,7 +672,7 @@ variable_weekday(int *day, int month, in int *cumdays; int day1; @@ -126,9 +126,9 @@ diff -up calendar-1.37-20221115cvs/day.c.orig calendar-1.37-20221115cvs/day.c 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 +diff -up calendar-1.35-20180719cvs/io.c.orig calendar-1.35-20180719cvs/io.c +--- calendar-1.35-20180719cvs/io.c.orig 2017-09-25 15:13:56.000000000 -0400 ++++ calendar-1.35-20180719cvs/io.c 2018-07-19 16:58:19.641899643 -0400 @@ -67,7 +67,7 @@ void cal(void) { @@ -138,21 +138,22 @@ diff -up calendar-1.37-20221115cvs/io.c.orig calendar-1.37-20221115cvs/io.c char buf[2048 + 1], *prefix = NULL, *p; struct match *m; FILE *fp; -@@ -282,8 +282,8 @@ getfield(char *p, char **endp, int *flag +@@ -282,8 +282,9 @@ 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)) ++ 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 +diff -up calendar-1.35-20180719cvs/ostern.c.orig calendar-1.35-20180719cvs/ostern.c +--- calendar-1.35-20180719cvs/ostern.c.orig 2015-03-14 20:41:28.000000000 -0400 ++++ calendar-1.35-20180719cvs/ostern.c 2018-07-19 16:51:00.670312869 -0400 +@@ -60,7 +60,7 @@ easter(int year) /* 0 ... abcd, NOT sinc e_p = e_p + 1; e_q = 31 + 28 + e_p; @@ -161,9 +162,9 @@ diff -up calendar-1.37-20221115cvs/ostern.c.orig calendar-1.37-20221115cvs/oster 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 +diff -up calendar-1.35-20180719cvs/paskha.c.orig calendar-1.35-20180719cvs/paskha.c +--- calendar-1.35-20180719cvs/paskha.c.orig 2015-03-14 20:41:28.000000000 -0400 ++++ calendar-1.35-20180719cvs/paskha.c 2018-07-19 16:51:00.670312869 -0400 @@ -27,6 +27,7 @@ */ @@ -181,21 +182,9 @@ diff -up calendar-1.37-20221115cvs/paskha.c.orig calendar-1.37-20221115cvs/paskh 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 - --#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 +diff -up calendar-1.35-20180719cvs/pesach.c.orig calendar-1.35-20180719cvs/pesach.c +--- calendar-1.35-20180719cvs/pesach.c.orig 2015-03-14 20:41:28.000000000 -0400 ++++ calendar-1.35-20180719cvs/pesach.c 2018-07-19 16:51:00.670312869 -0400 @@ -18,6 +18,7 @@ */ diff --git a/calendar.spec b/calendar.spec index 21bcc2e..0dd8fd7 100644 --- a/calendar.spec +++ b/calendar.spec @@ -1,10 +1,11 @@ -%define alphatag 20250303cvs +%define alphatag 20180719cvs Summary: Reminder utility Name: calendar -Version: 1.37 -Release: 12.%{alphatag}%{?dist} -License: BSD-3-Clause AND BSD-2-Clause AND ISC +Version: 1.35 +Release: 1.%{alphatag}%{?dist} +License: BSD +Group: Applications/Productivity URL: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/calendar # The source archive is generated with the export-calendar-source.sh @@ -16,10 +17,9 @@ Source0: %{name}-%{version}-%{alphatag}.tar.gz Source1: Makefile.linux Source2: export-calendar-source.sh -Patch0: %{name}-1.37-linux.patch +Patch0: %{name}-1.35-linux.patch BuildRequires: gcc -BuildRequires: make Requires: cpp %description @@ -30,7 +30,8 @@ tomorrow's. The output of the command shows upcoming events for the week. %prep -%autosetup -n %{name}-%{version}-%{alphatag} +%setup -q -n %{name}-%{version}-%{alphatag} +%patch0 -p1 cp %{SOURCE1} Makefile for c in calendars/*.*/* ; do @@ -42,10 +43,11 @@ for c in calendars/*.*/* ; do done %build -%make_build +make %{?_smp_mflags} %install -%make_install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} %files %attr(755,root,root) %{_bindir}/calendar @@ -53,86 +55,6 @@ done %{_datadir}/calendar %changelog -* Wed Jul 23 2025 Fedora Release Engineering - 1.37-12.20250303cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Mar 03 2025 David Cantrell - 1.37-11.20250303cvs -- Upgrade to calendar(1) from OpenBSD 7.6 - -* Thu Jan 16 2025 Fedora Release Engineering - 1.37-10.20240528cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 17 2024 Fedora Release Engineering - 1.37-9.20240528cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue May 28 2024 David Cantrell - 1.37-8.20240528cvs -- Upgrade to calendar(1) from OpenBSD 7.5 - -* Thu Mar 28 2024 Evan Goode - 1.37-7.20240209cvs -- Bump release to stay newer than Fedora 37 package - -* Fri Feb 09 2024 David Cantrell - 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 - 1.37-5.20221115cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 1.37-4.20221115cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jul 19 2023 Fedora Release Engineering - 1.37-3.20221115cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jan 18 2023 Fedora Release Engineering - 1.37-2.20221115cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Nov 15 2022 David Cantrell - 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 - 1.37-7.20211220cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 19 2022 Fedora Release Engineering - 1.37-6.20211220cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Dec 20 2021 David Cantrell - 1.37-20211220cvs -- Upgrade to calendar(1) from OpenBSD 7.0 - -* Wed Jul 21 2021 Fedora Release Engineering - 1.37-4.20200430cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jan 26 2021 Fedora Release Engineering - 1.37-3.20200430cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 1.37-2.20200430cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Apr 30 2020 David Cantrell - 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 - 1.37-2.20190827cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Aug 27 2019 David Cantrell - 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 - 1.35-4.20190227cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu Mar 07 2019 Igor Gnatenko - 1.35-2.20190227cvs -- Fix downgradepath - -* Wed Feb 27 2019 David Cantrell - 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 - 1.35-2.20180719cvs -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - * Thu Jul 19 2018 David Cantrell - 1.35-1.20180719cvs - Upgrade to calendar-1.35 from OpenBSD 6.3 diff --git a/export-calendar-source.sh b/export-calendar-source.sh index 5f51484..160b3a0 100755 --- a/export-calendar-source.sh +++ b/export-calendar-source.sh @@ -1,33 +1,19 @@ #!/bin/sh #TAG=HEAD -TAG=OPENBSD_7_6 -SERVER=anoncvs4.usa.openbsd.org +TAG=OPENBSD_6_3 -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 :ext:anoncvs@${SERVER}:/cvs co -d calendar -r ${TAG} src/usr.bin/calendar - +cvs -d anoncvs@anoncvs.ca.openbsd.org:/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} diff --git a/sources b/sources index 8d59208..fd3b310 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (calendar-1.37-20250303cvs.tar.gz) = e5f15b6c4efc11ee6c7041535ba5e8f2d0cc3ed22a3944bf2f499fabcfae9ae45290b59a564641bf0355fa402674890694054790a9ee64304a8214752b6b4edf +SHA512 (calendar-1.35-20180719cvs.tar.gz) = 6ef957a887e1ce1ae7efb0526a7bd86dc91cb179ed1748e49ebe2cdf7b4b133858e352b6f35676f29d5b2ad4bba484e280e1db34cc090175b7ff33029dc55792