Package: pal
Version: 0.4.3-8.1+b5
Severity: wishlist

Dear Maintainer,

pal2ical and ical2pal from the "src/convert" directory are currently
distributed as source in /usr/share/doc/pal/examples/ .

I've found ical2pal extremely helpful in the past, and now have a use
case for pal2ical as well.

Unfortunately, things have bitrotted somewhat and building those
programs myself out of /u/s/d/pal/examples/ is no longer possible:
* pal2ical.c has several #include "../foo" directives that access pal
  source files from the "src" directory, which are obviously not present
  in /usr/share/doc/pal/ .
* The libical header is named <libical/ical.h> nowadays.
* The makefile doesn't link with libical.
* is_valid_yyyymmdd() has changed its number of arguments.
* various other issues in pal2ical.
Also, C source files being gzip compressed is an annoyance.

To prevent future bitrot and to make these useful programs available to
all Debian users, please package them as binaries instead.


I've started working on this, my WIP patch is attached. It allows
building a functional ical2pal and fixes an assert() with
invalid/unreadable input files.
Unfortunately, I'm out of time for the moment. If you could fixup
pal2ical and add the necessary debian packaging bits, that would be
awesome.
Otherwise, this bug will serve to document the status quo until I find
the time to finish things.

Thank you for maintaining pal!
Regards,
    Jan


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (650, 'testing-debug'), (550, 
'unstable-debug'), (550, 'unstable'), (10, 'experimental-debug'), (10, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.6.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages pal depends on:
ii  libc6         2.30-8
ii  libglib2.0-0  2.64.3-1
ii  libncursesw6  6.2-1
ii  libreadline8  8.0-4
ii  libtinfo6     6.2-1

pal recommends no packages.

Versions of packages pal suggests:
ii  texlive  2020.20200522-1

-- no debconf information
Only in pal-0.4.3__jan/src: .tags
diff -u -r pal-0.4.3/src/convert/Makefile pal-0.4.3__jan/src/convert/Makefile
--- pal-0.4.3/src/convert/Makefile	2008-07-28 18:16:23.000000000 +0200
+++ pal-0.4.3__jan/src/convert/Makefile	2020-06-23 11:08:04.387213111 +0200
@@ -1,6 +1,6 @@
 include ../Makefile.defs
 
-INCLDIR = -I${prefix}/include `pkg-config --cflags glib-2.0`
+INCLDIR = -I${prefix}/include `pkg-config --cflags --libs glib-2.0 libical`
 LIBDIR  =
 
 
Only in pal-0.4.3__jan/src/convert: core
Only in pal-0.4.3__jan/src/convert: ical2pal
diff -u -r pal-0.4.3/src/convert/ical2pal.c pal-0.4.3__jan/src/convert/ical2pal.c
--- pal-0.4.3/src/convert/ical2pal.c	2008-07-28 18:16:23.000000000 +0200
+++ pal-0.4.3__jan/src/convert/ical2pal.c	2020-07-08 17:03:09.993935714 +0200
@@ -21,7 +21,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
-#include "ical.h"
+#include <libical/ical.h>
 
 #include <stdlib.h>
 
@@ -327,8 +327,11 @@
     printf("%s\n", argv[3]);
 
     stream = fopen(argv[1],"r");
+    if (stream == 0) {
+        fprintf(stderr, "Error opening input file \"%s\": %s\n", argv[1], strerror(errno));
+        exit(2);
+    }
 
-    assert(stream != 0);
 
     /* Tell the parser what input routine it should use. */
     icalparser_set_gen_data(parser,stream);
Only in pal-0.4.3__jan/src/convert: ical2pal.o
diff -u -r pal-0.4.3/src/convert/pal2ical.c pal-0.4.3__jan/src/convert/pal2ical.c
--- pal-0.4.3/src/convert/pal2ical.c	2008-07-28 18:16:23.000000000 +0200
+++ pal-0.4.3__jan/src/convert/pal2ical.c	2020-06-23 11:30:50.717332278 +0200
@@ -21,6 +21,7 @@
 #include "../main.h"
 #include "../input.h"
 #include "../event.h"
+#include "../event.c"
 
 #include <stdio.h>
 #include <string.h>
@@ -130,7 +131,7 @@
     {
 
 	/* convert one-time events of format yyyymmdd */
-	if(is_valid_yyyymmdd(event->date_string, 0))
+	if(is_valid_yyyymmdd(event->date_string))
 	{
 	    begin_vevent(event);
 	    print_dtstartend(event->date_string, event->start_time, event->end_time);

Attachment: signature.asc
Description: PGP signature

Reply via email to