diff --git a/0001-Fix-build-with-icu-68.1.patch b/0001-Fix-build-with-icu-68.1.patch deleted file mode 100644 index 6f188f0..0000000 --- a/0001-Fix-build-with-icu-68.1.patch +++ /dev/null @@ -1,79 +0,0 @@ -From a3308a23912bba2db654a8c456165c31888cc897 Mon Sep 17 00:00:00 2001 -From: Allen Winter -Date: Sat, 31 Oct 2020 17:38:01 -0400 -Subject: [PATCH] Fix build with icu-68.1 - -Use stdbool.h to define true and false when possible - -Issue#448 ---- - ConfigureChecks.cmake | 1 + - ReleaseNotes.txt | 1 + - config.h.cmake | 3 +++ - src/libical/icalrecur.c | 10 ++++++++-- - 4 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake -index e4d0e2ec..bba33fa9 100644 ---- a/ConfigureChecks.cmake -+++ b/ConfigureChecks.cmake -@@ -10,6 +10,7 @@ check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) - check_include_files(fcntl.h HAVE_FCNTL_H) - check_include_files(unistd.h HAVE_UNISTD_H) - check_include_files(wctype.h HAVE_WCTYPE_H) -+check_include_files(stdbool.h HAVE_STDBOOL_H) - - include(CheckFunctionExists) - if(WIN32 AND MSVC) -diff --git a/config.h.cmake b/config.h.cmake -index 8fd3421b..c8008692 100644 ---- a/config.h.cmake -+++ b/config.h.cmake -@@ -39,6 +39,9 @@ - /* Define to 1 if you have the header file. */ - #cmakedefine HAVE_DIRENT_H 1 - -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_STDBOOL_H 1 -+ - /* Define if we have pthread. */ - #cmakedefine HAVE_PTHREAD_ATTR_GET_NP 1 - #cmakedefine HAVE_PTHREAD_GETATTR_NP 1 -diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c -index 38ee2bb3..64ec9732 100644 ---- a/src/libical/icalrecur.c -+++ b/src/libical/icalrecur.c -@@ -145,6 +145,12 @@ - #if defined(HAVE_LIBICU) - #include - #include -+#if defined(HAVE_STDBOOL_H) -+#include -+#else -+#define false 0 -+#define true 1 -+#endif - #define RSCALE_IS_SUPPORTED 1 - #else - #define RSCALE_IS_SUPPORTED 0 -@@ -1018,7 +1024,7 @@ icalarray *icalrecurrencetype_rscale_supported_calendars(void) - - calendars = icalarray_new(sizeof(const char **), 20); - -- en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status); -+ en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status); - while ((cal = uenum_next(en, NULL, &status))) { - cal = icalmemory_tmp_copy(cal); - icalarray_append(calendars, &cal); -@@ -1411,7 +1417,7 @@ static int initialize_rscale(icalrecur_iterator *impl) - } - - /* Check if specified calendar is supported */ -- en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status); -+ en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status); - while ((cal = uenum_next(en, NULL, &status))) { - if (!strcmp(cal, rule.rscale)) { - is_hebrew = !strcmp(rule.rscale, "hebrew"); --- -2.29.2 - diff --git a/libical-3.0.8.tar.gz b/libical-3.0.8.tar.gz deleted file mode 100644 index 1babe1e..0000000 --- a/libical-3.0.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f -size 881462 diff --git a/libical-3.0.9.tar.gz b/libical-3.0.9.tar.gz new file mode 100644 index 0000000..49616e8 --- /dev/null +++ b/libical-3.0.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd26d98b7fcb2eb0cd5461747bbb02024ebe38e293ca53a7dfdcb2505265a728 +size 886500 diff --git a/libical-read-v2-v3-data.patch b/libical-read-v2-v3-data.patch deleted file mode 100644 index fa35881..0000000 --- a/libical-read-v2-v3-data.patch +++ /dev/null @@ -1,193 +0,0 @@ -From c7e767bfe1d218aaf845686f9811195cecc7be2a Mon Sep 17 00:00:00 2001 -From: Ken Murchison -Date: Wed, 11 Nov 2020 08:50:54 -0500 -Subject: [PATCH] icaltzutil_fetch_timezone() should read v2/v3 data when - available - ---- - src/libical/icaltz-util.c | 103 +++++++++++++++++++++++++++++++------- - 1 file changed, 86 insertions(+), 17 deletions(-) - -diff --git a/src/libical/icaltz-util.c b/src/libical/icaltz-util.c -index 710ff9db..c2663e93 100644 ---- a/src/libical/icaltz-util.c -+++ b/src/libical/icaltz-util.c -@@ -84,6 +84,9 @@ - - typedef struct - { -+ char magic[4]; -+ char version; -+ char unused[15]; - char ttisgmtcnt[4]; - char ttisstdcnt[4]; - char leapcnt[4]; -@@ -153,6 +156,23 @@ static int decode(const void *ptr) - } - } - -+static long long int decode64(const void *ptr) -+{ -+#if defined(sun) && defined(__SVR4) -+#if defined(_BIG_ENDIAN) -+ return *(const long long int *)ptr; -+#else -+ return BSWAP_64(*(const long long int *)ptr); -+#endif -+#else -+ if ((BYTE_ORDER == BIG_ENDIAN)) { -+ return *(const long long int *)ptr; -+ } else { -+ return (int)bswap_64(*(const long long int *)ptr); -+ } -+#endif -+} -+ - static char *zname_from_stridx(char *str, size_t idx) - { - size_t i; -@@ -239,12 +259,13 @@ static void adjust_dtstart_day_to_rrule(icalcomponent *comp, struct icalrecurren - - icalcomponent *icaltzutil_fetch_timezone(const char *location) - { -- tzinfo type_cnts; -+ tzinfo header; - size_t i, num_trans, num_chars, num_leaps, num_isstd, num_isgmt; - size_t num_types = 0; - size_t size; - int pos, sign; - time_t now = time(NULL); -+ int trans_size = 4; - - const char *zonedir; - FILE *f = NULL; -@@ -296,27 +317,65 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location) - goto error; - } - -- if (fseek(f, 20, SEEK_SET) != 0) { -- icalerror_set_errno(ICAL_FILE_ERROR); -+ /* read version 1 header */ -+ EFREAD(&header, 44, 1, f); -+ if (memcmp(header.magic, "TZif", 4)) { -+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); -+ goto error; -+ } -+ switch (header.version) { -+ case 0: -+ break; -+ case '2': -+ case '3': -+ if (sizeof(time_t) == 8) -+ trans_size = 8; -+ break; -+ default: -+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - goto error; - } - -- EFREAD(&type_cnts, 24, 1, f); -+ num_isgmt = (size_t)decode(header.ttisgmtcnt); -+ num_leaps = (size_t)decode(header.leapcnt); -+ num_chars = (size_t)decode(header.charcnt); -+ num_trans = (size_t)decode(header.timecnt); -+ num_isstd = (size_t)decode(header.ttisstdcnt); -+ num_types = (size_t)decode(header.typecnt); -+ -+ if (trans_size == 8) { -+ long skip = num_trans * 5 + num_types * 6 + -+ num_chars + num_leaps * 8 + num_isstd + num_isgmt; -+ -+ /* skip version 1 data block */ -+ if (fseek(f, skip, SEEK_CUR) != 0) { -+ icalerror_set_errno(ICAL_FILE_ERROR); -+ goto error; -+ } - -- num_isgmt = (size_t)decode(type_cnts.ttisgmtcnt); -- num_leaps = (size_t)decode(type_cnts.leapcnt); -- num_chars = (size_t)decode(type_cnts.charcnt); -- num_trans = (size_t)decode(type_cnts.timecnt); -- num_isstd = (size_t)decode(type_cnts.ttisstdcnt); -- num_types = (size_t)decode(type_cnts.typecnt); -+ /* read version 2+ header */ -+ EFREAD(&header, 44, 1, f); -+ if (memcmp(header.magic, "TZif", 4)) { -+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); -+ goto error; -+ } - -+ num_isgmt = (size_t)decode(header.ttisgmtcnt); -+ num_leaps = (size_t)decode(header.leapcnt); -+ num_chars = (size_t)decode(header.charcnt); -+ num_trans = (size_t)decode(header.timecnt); -+ num_isstd = (size_t)decode(header.ttisstdcnt); -+ num_types = (size_t)decode(header.typecnt); -+ } -+ -+ /* read data block */ - if (num_trans > 0) { - transitions = calloc(num_trans, sizeof(time_t)); - if (transitions == NULL) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - goto error; - } -- r_trans = calloc(num_trans, 4); -+ r_trans = calloc(num_trans, trans_size); - if (r_trans == NULL) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - goto error; -@@ -325,7 +384,7 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location) - icalerror_set_errno(ICAL_FILE_ERROR); - goto error; - } -- EFREAD(r_trans, 4, num_trans, f); -+ EFREAD(r_trans, trans_size, num_trans, f); - temp = r_trans; - if (num_trans) { - trans_idx = calloc(num_trans, sizeof(int)); -@@ -335,8 +394,11 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location) - } - for (i = 0; i < num_trans; i++) { - trans_idx[i] = fgetc(f); -- transitions[i] = (time_t) decode(r_trans); -- r_trans += 4; -+ if (trans_size == 8) -+ transitions[i] = (time_t) decode64(r_trans); -+ else -+ transitions[i] = (time_t) decode(r_trans); -+ r_trans += trans_size; - } - } - r_trans = temp; -@@ -375,10 +437,13 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location) - goto error; - } - for (i = 0; i < num_leaps; i++) { -- char c[4]; -+ char c[8]; - -- EFREAD(c, 4, 1, f); -- leaps[i].transition = (time_t)decode(c); -+ EFREAD(c, trans_size, 1, f); -+ if (trans_size == 8) -+ leaps[i].transition = (time_t)decode64(c); -+ else -+ leaps[i].transition = (time_t)decode(c); - - EFREAD(c, 4, 1, f); - leaps[i].change = decode(c); -@@ -403,6 +468,10 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location) - types[i++].isgmt = 0; - } - -+ if (trans_size == 8) { -+ /* XXX Do we need/want to read and use the footer? */ -+ } -+ - /* Read all the contents now */ - - for (i = 0; i < num_types; i++) { --- -2.29.2 - diff --git a/libical.changes b/libical.changes index b348486..453e5e5 100644 --- a/libical.changes +++ b/libical.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Sun Jan 24 20:01:42 UTC 2021 - Dirk Müller + +- update to 3.0.9: + * Add support for empty parameters, e.g. CN="" + * Accept VTIMEZONE with more than one X- property + * Several fixes for recurrences containing BYWEEKNO + * icalrecurrencetype_from_string() will reject any RRULE that contains a + rule-part that occurs more than once + * Improve thread safety + * Fix compiled-in path for the built-in timezone data + * Fix reading TZif files with empty v1 data (use v2+ whenever possible) + * Add backwards compatibility for previous TZIDs + * Built-in timezones updated to tzdata2020d + * Fix build with newer libicu + * Fix cross-compile support in libical-glib +- remove 0001-Fix-build-with-icu-68.1.patch libical-read-v2-v3-data.patch: + upstream + ------------------------------------------------------------------- Fri Dec 4 23:18:50 UTC 2020 - Michael Gorse diff --git a/libical.spec b/libical.spec index 921cac3..7788377 100644 --- a/libical.spec +++ b/libical.spec @@ -1,7 +1,7 @@ # # spec file for package libical # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,10 +25,22 @@ %define name_ext %{nil} %bcond_with glib %endif - Name: libical%{name_ext} -Version: 3.0.8 +Version: 3.0.9 Release: 0 +URL: https://github.com/libical/libical +Source: %{url}/releases/download/v%{version}/libical-%{version}.tar.gz +Source2: baselibs.conf +Source3: libical-rpmlintrc +Patch1: 0001-vcc.y-factor-out-hexdigit-conversion.patch +Patch2: 0002-vcc.y-fix-infinite-loop-with-lower-case-hex-digits.patch +Patch3: 0003-vcc.y-fix-infinite-loop-with-non-hex-digits.patch +Patch4: 0004-vobject.c-vCard-Unicode-reading-support.patch +Patch5: 0005-vcc.y-do-not-ignore-field-separator-in-QUOTED-PRINTA.patch +BuildRequires: c++_compiler +BuildRequires: cmake >= 3.1 +BuildRequires: pkgconfig +BuildRequires: pkgconfig(icu-i18n) %if %{without glib} Summary: An Implementation of Basic iCAL Protocols License: MPL-2.0 OR LGPL-2.1-only @@ -38,23 +50,6 @@ Summary: GObject wrapper for libical library License: MPL-2.0 OR LGPL-2.1-only Group: Development/Libraries/C and C++ %endif -URL: https://github.com/libical/libical -Source: %{url}/releases/download/v%{version}/libical-%{version}.tar.gz -Source2: baselibs.conf -Source3: libical-rpmlintrc - -Patch1: 0001-vcc.y-factor-out-hexdigit-conversion.patch -Patch2: 0002-vcc.y-fix-infinite-loop-with-lower-case-hex-digits.patch -Patch3: 0003-vcc.y-fix-infinite-loop-with-non-hex-digits.patch -Patch4: 0004-vobject.c-vCard-Unicode-reading-support.patch -Patch5: 0005-vcc.y-do-not-ignore-field-separator-in-QUOTED-PRINTA.patch -Patch6: libical-read-v2-v3-data.patch -Patch7: 0001-Fix-build-with-icu-68.1.patch - -BuildRequires: c++_compiler -BuildRequires: cmake >= 3.1 -BuildRequires: pkgconfig -BuildRequires: pkgconfig(icu-i18n) %if %{with glib} BuildRequires: gtk-doc BuildRequires: vala @@ -64,7 +59,6 @@ BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(libical) BuildRequires: pkgconfig(libxml-2.0) %endif - %if %{without glib} %description -n libical Libical is an implementation of the IETF's iCalendar