Bug#787591: python-pelican: datetime comparison error when WITH_FUTURE_DATES = False

2015-06-03 Thread Christian 'Greek0' Aichinger
Package: python-pelican
Version: 3.5.0-1
Severity: normal
Control: found -1 3.5.0-1~bpo8+1

Dear Maintainers,

when WITH_FUTURE_DATES is set to False to enable scheduling of posts in
the future, articles and pages will fail with the following error:

DEBUG: Read file blog/2006-08-05_secure_unison.md -> Article
ERROR: Could not process blog/2006-08-05_secure_unison.md
  | can't compare offset-naive and offset-aware datetimes
  |___
  | Traceback (most recent call last):
  |   File "/usr/lib/python2.7/dist-packages/pelican/generators.py", line 502, 
in generate_context
  | context_sender=self)
  |   File "/usr/lib/python2.7/dist-packages/pelican/readers.py", line 492, in 
read_file
  | context=context)
  |   File "/usr/lib/python2.7/dist-packages/pelican/contents.py", line 136, in 
__init__
  | if hasattr(self, 'date') and self.date > SafeDatetime.now():
  | TypeError: can't compare offset-naive and offset-aware datetimes

This bug has been reported upstream in issue 1536[1] and has a patch in
PR 1525[2], which has already been merged in master. Applying this patch
to my installation fixed the problem for me.

Note: I'm using BPO version 3.5.0-1~bpo8+1, but this bug report applies
to testing/unstable as well. Once this fix has propagated to testing, it
would be great if it could be applied to the BPO version as well.

Cheers,
Chris

[1]: https://github.com/getpelican/pelican/issues/1536
[2]: https://github.com/getpelican/pelican/pull/1525


-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages python-pelican depends on:
ii  python2.7.9-1
ii  python-blinker1.3.dfsg2-1
ii  python-dateutil   2.2-2
ii  python-docutils   0.12+dfsg-1
ii  python-feedgenerator  1.7-1
ii  python-jinja2 2.7.3-1
ii  python-markdown   2.5.1-2
ii  python-pkg-resources  5.5.1-1
ii  python-pygments   2.0.1+dfsg-1.1
ii  python-six1.8.0-1
ii  python-tz 2012c+dfsg-0.1
ii  python-unidecode  0.04.16-1

python-pelican recommends no packages.

Versions of packages python-pelican suggests:
pn  pandoc  
pn  python-bs4  

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#382627: Building a cross-compiler for ia64 fails

2006-08-12 Thread Christian 'Greek0' Aichinger
Package: gcc-4.1
Version: 4.1.1-5
Severity: minor
Tags: patch

Hi,
I tried to build a cross-toolchain for ia64, but when compiling gcc
I got a linker error (log is attached).

After searching for some time I found that Herbert Pƶtzl had already
written a patch to solve this problem. I talked to him and he was
fine with me submitting the patch to the Debian BTS.

There are 2 patches attached, gcc-cross-fix-ia64.diff and apply-me.diff.
The former is Bertl's original patch fixed up for gcc 4.1, the
latter is diff-in-diff, it puts gcc-cross-fix-ia64 into
debian/patches (including dpatch header of course), and adds the
patch to debian_patches in debian/rules.patch.

HTH,
Christian Aichinger
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/ia64/fde-glibc.c 
gcc-4.0.0.new/gcc/config/ia64/fde-glibc.c
--- gcc-4.0.0.orig/gcc/config/ia64/fde-glibc.c  2003-11-02 18:35:20.0 
+0100
+++ gcc-4.0.0.new/gcc/config/ia64/fde-glibc.c   2005-05-15 02:42:27.675247674 
+0200
@@ -31,6 +31,7 @@
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE 1
 #endif
+#ifndef inhibit_libc
 #include "config.h"
 #include 
 #include 
@@ -162,3 +163,5 @@ _Unwind_FindTableEntry (void *pc, unsign
 
   return data.ret;
 }
+
+#endif
diff -NurpP -x '*.orig' -x '*.libc' 
gcc-4.0.0.orig/gcc/config/ia64/unwind-ia64.c 
gcc-4.0.0.new/gcc/config/ia64/unwind-ia64.c
--- gcc-4.0.0.orig/gcc/config/ia64/unwind-ia64.c2005-04-06 
05:50:36.0 +0200
+++ gcc-4.0.0.new/gcc/config/ia64/unwind-ia64.c 2005-05-15 02:43:10.842199954 
+0200
@@ -30,7 +30,7 @@
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License.  */
 
-
+#ifndef inhibit_libc
 #include "tconfig.h"
 #include "tsystem.h"
 #include "coretypes.h"
@@ -2404,3 +2404,4 @@ alias (_Unwind_SetIP);
 #endif
 
 #endif
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/pa/linux-unwind.h 
gcc-4.0.0.new/gcc/config/pa/linux-unwind.h
--- gcc-4.0.0.orig/gcc/config/pa/linux-unwind.h 2005-02-11 02:46:20.0 
+0100
+++ gcc-4.0.0.new/gcc/config/pa/linux-unwind.h  2005-05-15 02:37:02.0 
+0200
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA.  */
 /* Do code reading to identify a signal frame, and set the frame
state data appropriately.  See unwind-dw2.c for the structs.  */
 
+#ifndef inhibit_libc
 #include 
 #include 
 
@@ -136,3 +137,5 @@ pa32_fallback_frame_state (struct _Unwin
   fs->retaddr_column = DWARF_ALT_FRAME_RETURN_COLUMN;
   return _URC_NO_REASON;
 }
+
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/sh/linux-unwind.h 
gcc-4.0.0.new/gcc/config/sh/linux-unwind.h
--- gcc-4.0.0.orig/gcc/config/sh/linux-unwind.h 2005-02-11 02:12:57.0 
+0100
+++ gcc-4.0.0.new/gcc/config/sh/linux-unwind.h  2005-05-15 02:44:31.0 
+0200
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA.  */
 /* Do code reading to identify a signal frame, and set the frame
state data appropriately.  See unwind-dw2.c for the structs.  */
 
+#ifndef inhibit_libc
 #include 
 #include 
 #include "insn-constants.h"
@@ -169,3 +170,4 @@ sh_fallback_frame_state (struct _Unwind_
   return _URC_NO_REASON;
 }
 #endif /* defined (__SH5__) */
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/unwind-compat.c 
gcc-4.0.0.new/gcc/unwind-compat.c
--- gcc-4.0.0.orig/gcc/unwind-compat.c  2004-09-04 02:15:40.0 +0200
+++ gcc-4.0.0.new/gcc/unwind-compat.c   2005-05-15 02:41:17.0 +0200
@@ -29,6 +29,7 @@
02110-1301, USA.  */
 
 #if defined (USE_GAS_SYMVER) && defined (USE_LIBUNWIND_EXCEPTIONS)
+#ifndef inhibit_libc
 #include "tconfig.h"
 #include "tsystem.h"
 #include "unwind.h"
@@ -204,3 +205,4 @@ _Unwind_SetIP (struct _Unwind_Context *c
 }
 symver (_Unwind_SetIP, GCC_3.0);
 #endif
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/unwind-generic.h 
gcc-4.0.0.new/gcc/unwind-generic.h
--- gcc-4.0.0.orig/gcc/unwind-generic.h 2004-11-30 09:15:39.0 +0100
+++ gcc-4.0.0.new/gcc/unwind-generic.h  2005-05-15 02:38:33.0 +0200
@@ -202,6 +202,7 @@ extern _Unwind_Reason_Code _Unwind_SjLj_
compatible with the standard ABI for IA-64, we inline these.  */
 
 #ifdef __ia64__
+#ifndef inhibit_libc
 #include 
 
 static inline _Unwind_Ptr
@@ -220,6 +221,7 @@ _Unwind_GetTextRelBase (struct _Unwind_C
 
 /* @@@ Retrieve the Backing Store Pointer of the given context.  */
 extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *);
+#endif
 #else
 extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
 extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
diff -NurpP -x '*.orig' -x '*.libc' 
gcc-4.0.0.new/gcc/config/alpha/linux-unwind.h 
gcc-4.0.0.new2/gcc/config/alpha/linux-unwind.h
--- gcc-4.0.0.new/gcc/config/alpha/linux-unwind.h   2005-02-11 
02:12:54.0 +0100
+++ gcc-4.0.0.new2/gcc/config/alpha/linux-unwind.h  2005-05-15 
05:09:16.0 +0200
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA.  */
 /* Do code rea

Bug#381682: orphan should check for inlined pages and stylesheets

2006-08-06 Thread Christian 'Greek0' Aichinger
Package: ikiwiki
Version: 1.16
Severity: wishlist

Hi, ikiwiki's orphan plugin lists some files as orphaned that
probably shouldn't be listed.

E.g. CSS files referenced via  by pages
are listed as orphaned (it just happens that ikiwiki.kitenet.net
links to style.css directly (cf. [1]), that's why it's not listed
there).

This is true for stylesheets used by the templates as well as for
manually set stylesheets via [[meta ..]].

Also the orphan plugin doesn't realize that when a page is inlined
in another one, it's actually shown, and that a link to the original
page is usually inlined too.

That's why all the news items pop up at [2].

Cheers,
Christian Aichinger

[1]: http://ikiwiki.kitenet.net/todo/html.html
[2]: http://ikiwiki.kitenet.net/plugins/orphans.html


signature.asc
Description: Digital signature


Bug#373229: please execute commands via sh -c "exec xyz" instead of sh -c "xyz"

2006-06-13 Thread Christian 'Greek0' Aichinger
Package: ion3
Version: 20050502-2
Severity: wishlist
Tags: patch

Hi,
when ion3 executes programms (e.g. xterm) it uses sh -c "...". The
so spawned sh process hangs around until the program exits.

If ion used sh -c "exec ..." there wouldn't be an extra shell around
for each command executed.

The only problem with this is when a command sequence is executed
instead of a command, e.g. sh -c "exec xterm; xterm". This obviously
doesn't work.

I've written a patch that checks for ';' in the command string, uses
sh -c "..." if it's found and sh -c "exec ..." otherwise.

That patch is attached, works fine on my system, on commands as well
as on sequences.

Cheers,
Christian Aichinger


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (500, 
'proposed-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc6-vs2.1.0-pre1-r20050817
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages ion3 depends on:
ii  libc62.3.5-8 GNU C Library: Shared libraries an
ii  libice6  6.8.2.dfsg.1-11 Inter-Client Exchange library
ii  liblua50 5.0.2-5.1   Main interpreter library for the L
ii  liblualib50  5.0.2-5.1   Extension library for the Lua 5.0 
ii  libsm6   6.8.2.dfsg.1-11 X Window System Session Management
ii  libx11-6 4.3.0.dfsg.1-13 X Window System protocol client li
ii  libxext6 6.8.2.dfsg.1-11 X Window System miscellaneous exte
ii  xlibs6.8.2.dfsg.1-11 X Window System client libraries m

ion3 recommends no packages.

-- no debconf information
diff -Nur ion3-20060524.orig/libmainloop/exec.c ion3-20060524/libmainloop/exec.c
--- ion3-20060524.orig/libmainloop/exec.c   2006-05-24 18:23:26.0 
+0200
+++ ion3-20060524/libmainloop/exec.c2006-06-13 13:34:41.0 +0200
@@ -35,15 +35,25 @@
 #define SHELL_PATH "/bin/sh"
 #define SHELL_NAME "sh"
 #define SHELL_ARG "-c"
+#define SHELL_PREPEND "exec "
 
 
 void mainloop_do_exec(const char *cmd)
 {
 char *argv[4];
+char *newcmd;
+
+if (strchr(cmd, ';')) {
+newcmd = cmd;
+} else {
+newcmd = malloc(strlen(SHELL_PREPEND)+strlen(cmd)+1);
+strcpy(newcmd, SHELL_PREPEND);
+strcat(newcmd, cmd);
+}
 
 argv[0]=SHELL_NAME;
 argv[1]=SHELL_ARG;
-argv[2]=(char*)cmd; /* stupid execve... */
+argv[2]=(char*)newcmd; /* stupid execve... */
 argv[3]=NULL;
 execvp(SHELL_PATH, argv);
 }


signature.asc
Description: Digital signature


Bug#372251: General cleanup: fixing CFLAGS, compiler warnings, lintian errors, ...

2006-06-08 Thread Christian 'Greek0' Aichinger
Package: cutter
Severity: normal
Tags: patch

The attached diff fixes the passing of CFLAGS from debian/rules to
the main Makefile. Without this fix, the CFLAGS set in debian/rules
(-Wall -g -O2) are not communicated down.

It also fixes an error in the manpage cutter(8), which produced an
error message in the `man` output.

Futher it updates the FSF address in debian/copyright.

It also cleans up the code a bit, fixing several compiler warnings.
3 correlated ones remain, though they are harmless, and the fix
looks rather stupid to me.

Lastly it updates Standards-Version to 3.7.2, no changes are
required AFAICS.

With this patch cutter is lintian and linda clean again.

HTH,
Christian Aichinger

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (500, 
'proposed-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc6-vs2.1.0-pre1-r20050817
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)
diff -Nur cutter-1.02.old/cutter.8 cutter-1.02/cutter.8
--- cutter-1.02.old/cutter.82006-06-09 06:20:02.0 +0200
+++ cutter-1.02/cutter.82006-06-09 07:11:25.0 +0200
@@ -5,7 +5,7 @@
 .SH SYNOPSIS
 .B cutter
 .IR ipaddress1 \ [ \ port1 \ [ \ ipaddress2 \ [ \ port2 
-.R ] \ ] \ ]
+\ ] \ ] \ ]
 .br
 .SH DESCRIPTION
 .B Cutter
diff -Nur cutter-1.02.old/cutter.c cutter-1.02/cutter.c
--- cutter-1.02.old/cutter.c2003-06-16 21:35:02.0 +0200
+++ cutter-1.02/cutter.c2006-06-09 06:42:29.0 +0200
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define ETHHDR  sizeof(struct ethhdr)
 #define TCPHDR  sizeof(struct tcphdr)
@@ -149,7 +150,6 @@
 int getmac(in_addr_t ip, uchar *mac)
 {
FILE *id = fopen( "/proc/net/arp", "r" );
-   union { uchar c[4]; in_addr_t n; } ipu;
in_addr_t ipn;
int mac0, mac1, mac2, mac3, mac4, mac5;
int hwtype, flags;
@@ -240,7 +240,7 @@
u_short toport
 )
 {
-   int i_result, raw_sock, rtn;
+   int i_result, raw_sock;
in_addr_t gateway_ip;
struct sockaddr_ll myaddr, hisaddr;
struct tpack tpack;
@@ -377,7 +377,7 @@
 
for ( ; time(0) < tstart + 15; ) {  // give the peer 15 seconds to 
respond
struct sockaddr_ll gotaddr;
-   int addrlen = sizeof(gotaddr);
+   unsigned int addrlen = sizeof(gotaddr);
fd_set readfds;
struct timeval tv;
 
diff -Nur cutter-1.02.old/debian/control cutter-1.02/debian/control
--- cutter-1.02.old/debian/control  2006-06-09 06:20:02.0 +0200
+++ cutter-1.02/debian/control  2006-06-09 07:14:44.0 +0200
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Blars Blarson <[EMAIL PROTECTED]>
 Build-Depends: debhelper (>= 4.0.0)
-Standards-Version: 3.6.1
+Standards-Version: 3.7.2
 
 Package: cutter
 Architecture: any
diff -Nur cutter-1.02.old/debian/copyright cutter-1.02/debian/copyright
--- cutter-1.02.old/debian/copyright2006-06-09 06:20:02.0 +0200
+++ cutter-1.02/debian/copyright2006-06-09 07:16:50.0 +0200
@@ -19,9 +19,9 @@
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
-   along with this package; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301  USA
 
 On Debian GNU/Linux systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
diff -Nur cutter-1.02.old/debian/rules cutter-1.02/debian/rules
--- cutter-1.02.old/debian/rules2006-06-09 06:20:02.0 +0200
+++ cutter-1.02/debian/rules2006-06-09 06:34:53.0 +0200
@@ -33,7 +33,7 @@
dh_testdir
 
# Add here commands to compile the package.
-   $(MAKE)
+   $(MAKE) CFLAGS="$(CFLAGS)"
 
touch build-stamp
 


signature.asc
Description: Digital signature


Bug#371139: gok does not start (not related to #369864)

2006-06-07 Thread Christian &#x27;Greek0' Aichinger
Package: gok
Version: 1.0.10-1
Severity: important
Tags: patch

While investigating #369864, I found that gok doesn't start if it
has problems reading the database. Note that this is not the same as
#369864.

The problems are freeing of an uninitialized pointer and a div-by-0.
A patch is attached.

The problem can be reproduced by setting up a fresh sid chroot,
installing gok, and probably xbase-clients, starting gok and
watching it segfault (given that it finds a proper display, which
can be ensured by bindmounting /tmp to /chroots/sid/tmp).

Cheers,
Christian Aichinger

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (500, 
'proposed-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc6-vs2.1.0-pre1-r20050817
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)
--- gok-1.0.10.old/gok/gok-data.c   2006-03-31 22:32:58.0 +0200
+++ gok-1.0.10/gok/gok-data.c   2006-06-07 12:26:37.0 +0200
@@ -240,15 +240,17 @@
 gok_gconf_get_string (gconf_client, GOK_GCONF_AUX_DICTS, 
 &m_AuxDicts);
 
-   gok_gconf_get_string (gconf_client, GOK_GCONF_DOCK_TYPE,
- &a_gchar);
-m_eDockType = gok_data_dock_type_from_string (a_gchar);
-   g_free (a_gchar);
-
-   gok_gconf_get_string (gconf_client, GOK_GCONF_COMPOSE_KBD_TYPE,
- &a_gchar);
-compose_keyboard_type = gok_data_compose_type_from_string (a_gchar);
-   g_free (a_gchar);
+   if (gok_gconf_get_string (gconf_client, GOK_GCONF_DOCK_TYPE,
+ &a_gchar)) {
+m_eDockType = gok_data_dock_type_from_string (a_gchar);
+g_free (a_gchar);
+}
+
+   if (gok_gconf_get_string (gconf_client, GOK_GCONF_COMPOSE_KBD_TYPE,
+ &a_gchar)) {
+compose_keyboard_type = gok_data_compose_type_from_string 
(a_gchar);
+g_free (a_gchar);
+}
 
/* Read in settings for individual access methods */
access_method_dirs
--- gok-1.0.10.old/gok/gok-keyboard.c   2006-05-15 17:10:00.0 +0200
+++ gok-1.0.10/gok/gok-keyboard.c   2006-06-07 12:38:08.0 +0200
@@ -3322,6 +3322,8 @@
/* maximum size of text per cell */
maxTextPerCell = gok_data_get_key_width() - 
gok_key_get_default_border_width (pKey);
+if (!maxTextPerCell)
+maxTextPerCell = 1;
}
 
while (pKey != NULL)


signature.asc
Description: Digital signature


Bug#337178: Segfault when characters are inserted and the screen is very wide

2005-11-02 Thread Christian &#x27;Greek0' Aichinger
Package: minicom
Version: 2.1-9
Severity: normal
Tags: patch

Minicom crashes when characters are inserted at the beginning of
some line and the screen is very wide (160+x actually).

Steps to reproduce:
  Get your xterm (or whatever) wider then ~200 chars.
  Start minicom, connect somewhere
  Type something
  Use the arrow keys to go back to the beginning of the line
  Type another character
  Watch it crash
  If it didn't crash, repeat

The problem lies in winschar2(). Some excerpts:
  ELM buf[160];
  /* .. some stuff omitted .. */
  len = w->xs - w->curx;
  memcpy(buf, gmap + COLS * y + x, sizeof(ELM) * len);

w->xs is the width of the window in characters, w->curx is the
current position. So if the distance between current cursor position
to the right border of the window exceeds 160 characters you are in
trouble, since random stuff on the stack is overwritten.

This overflow could be a security risk, but I think the
possibilities end at crashing minicom. I haven't checked this
thoroughly, but I don't think an attacker has enough control about
what gets written to execute arbitrary code.

The attacker has full control about every third byte (ELM.value),
but only very limited control about the others (ELM.attr,
ELM.color).

I see 2 ways out of this: making buf large enough so that noone will
bump into that limit again sometime soon, or allocate buf
dynamically via malloc, so it always has the right size. I've
implemented both ways, patches are attached.

Cheers,
Christian Aichinger

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (500, 
'proposed-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc6-vs2.1.0-pre1-r20050817
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages minicom depends on:
ii  libc6 2.3.5-6GNU C Library: Shared libraries an
ii  libncurses5   5.4-9  Shared libraries for terminal hand

Versions of packages minicom recommends:
pn  lrzsz  (no description available)

-- no debconf information
diff -Nurp minicom-2.1.orig/src/window.c minicom-2.1/src/window.c
--- minicom-2.1.orig/src/window.c   2005-11-03 03:21:55.0 +0100
+++ minicom-2.1/src/window.c2005-11-03 04:24:57.0 +0100
@@ -1551,7 +1551,7 @@ int move;
   int y;
   int x;
   int doit = 1;
-  ELM buf[160];
+  ELM buf[1024];
   ELM *e;
   int len, odir;
   int oldx;
diff -Nurp minicom-2.1.orig/src/window.c minicom-2.1/src/window.c
--- minicom-2.1.orig/src/window.c   2005-11-03 03:21:55.0 +0100
+++ minicom-2.1/src/window.c2005-11-03 04:29:07.0 +0100
@@ -1551,7 +1551,7 @@ int move;
   int y;
   int x;
   int doit = 1;
-  ELM buf[160];
+  ELM *buf;
   ELM *e;
   int len, odir;
   int oldx;
@@ -1583,6 +1583,8 @@ int move;
   x = w->x1 + w->curx;
   oldx = w->curx;
   len = w->xs - w->curx;
+
+  buf = malloc(sizeof(ELM)*len);
   memcpy(buf, gmap + COLS * y + x, sizeof(ELM) * len);
 
   /* Now, put the new character on screen. */
@@ -1597,6 +1599,7 @@ int move;
   }
   w->direct = odir;
   wlocate(w, w->curx, w->cury);
+  free(buf);
 }
 
 void winschar(w)


signature.asc
Description: Digital signature


Bug#322478: ld screws up relocation in some cases

2005-08-10 Thread Christian &#x27;Greek0' Aichinger
Package: binutils
Version: 2.16.1-2
Severity: normal

I've attached a C source file where ld from binutils >= 2.16.1-1
screws up, relocating a call in the wrong way. I had no problems
with 2.15.*.

I hope a little excerpt from the source code and disasm dumps from
compiled programs will help. It is a cutted down version of a
syscall benchmarking tool I coded up, and it tries to do a syscall
via the vsyscall DSO which is provided by 2.6 kernels on i386.

 benchmark.c  
static force_inline void DO_sysenter() {
asm volatile(
// syscall 17 on Linux/i386 is ni_syscall ->
// not implemented
// Probably check this before trying this out
"movl $17,%%eax\n\t"
"call 0xe400\n\t"
::: "eax", "ecx", "edx");
}
=

With binutils 2.15-6 installed, gcc generated that code, which is
what I want (that's the entry point of the virtual syscall code the
kernel provides).

 objdump -d benchmark.2.15-6 
 80483a5:   b8 11 00 00 00  mov$0x11,%eax
 80483aa:   e8 51 60 fb f7  call   e400 <_end+0xf7fb4e14>
=

With binutils 2.16.1-1 I get:

 objdump -d benchmark.2.16.1-1 
 80483b6:   b8 11 00 00 00  mov$0x11,%eax
 80483bb:   e8 fc e3 ff ff  call   80467bc <_init-0x1ac4>
=

It seems clear that the new binutils relocated the symbol marked as
*ABS* in a wrong way (relative to the current location instead of
absolute):
(0x80483bb + 0xe400) % 2**32 == 0x80467bb

This results in a segfault for me.

Some more information I managed to dig up:
gcc -O2 -Wall -ggdb -S -o benchmark.S benchmark.c
as benchmark.S -o benchmark.o
objdump -d -r benchmark.o
=
benchmark.o: file format elf32-i386

Disassembly of section .text:

 :
   0:   55  push   %ebp
   1:   89 e5   mov%esp,%ebp
   3:   83 ec 08sub$0x8,%esp
   6:   83 e4 f0and$0xfff0,%esp
   9:   83 ec 1csub$0x1c,%esp
   c:   68 00 00 00 00  push   $0x0
d: R_386_32 .rodata.str1.1
  11:   e8 fc ff ff ff  call   12 
12: R_386_PC32  puts
  16:   b8 11 00 00 00  mov$0x11,%eax
  1b:   e8 fc e3 ff ff  call   e41c 
1c: R_386_PC32  *ABS*
  20:   31 c0   xor%eax,%eax
  22:   c9  leave  
  23:   c3  ret
=

So far this is the same, no matter what version of gcc/binutils I
use. Trying to link that together with ld, with a commandline stolen
from an strace of gcc (slightly modified library {,search }paths):

ld --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 \
-o benchmark /usr/lib/crt1.o /usr/lib/crti.o \
/usr/lib/gcc/i486-linux-gnu/4.0.2/crtbegin.o \
-L/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/ \
-L/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../.. benchmark.o -lgcc \
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s \
--no-as-needed /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/crtend.o \
/usr/lib/crtn.o

Looking at the produced executable now shows this:

objdump -d benchmark.2.15-7 | grep '$0x11,' -A 5
=
80483b6:   b8 11 00 00 00  mov$0x11,%eax
80483bb:   e8 40 60 fb f7  call   e400 <_end+0xf7fb4df0>
80483c0:   31 c0   xor%eax,%eax
80483c2:   c9  leave  
80483c3:   c3  ret
80483c4:   90  nop
=

Looks quite reasonable (notice version 2.15-7)

objdump -d benchmark.2.16.1-1 | grep '$0x11,' -A 5
=
80483b6:   b8 11 00 00 00  mov$0x11,%eax
80483bb:   e8 fc e3 ff ff  call   80467bc <_init-0x1ac4>
80483c0:   31 c0   xor%eax,%eax
80483c2:   c9  leave  
80483c3:   c3  ret
80483c4:   90  nop
=

Well, this sucks, ld relocated a symbol marked *ABS* as relative to
the current location. The call goes somewhere to nirvana, which
causes a segfault.

I'm not sure whether this was intended or not, but I don't really
think so, and it's not documented anywhere too.

I've had a quick look at the source, but I didn't see anything
obvious. Maybe I can have a deeper look tomorrow.

If you have more questions (probably hard after my lengthy
bugreport), just mail me.

Cheers,
Christian Aichinger

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experiment

Bug#320580: New xlibs version should be pulled in on upgrade of x-window-system

2005-07-30 Thread Christian &#x27;Greek0' Aichinger
Package: xorg-x11
Severity: normal

I tried to upgrade from the xfree86 x packages to the x.org ones by
upgrading x-window-system. After the upgrade I noticed that AltGr-q,
which should generage an '@' in my locale didn't work any more.

I looked at the xkb rules, and it was still set to "xfree86".
Looking around in /etc/X11/xkb/rules I didn't find an xorg rule, so
I thought this would be ok.

I finally solved the problem days later at a local LUG when I
compared my config with that of another xorg user, and finding that
I didn't have the xorg xkb rule. One upgrade of xlibs later (to the
x.org version) and restarting X the problem was gone.

So I think it would be nice to have xlibs upgraded automatically to
the xorg version uppon installing of x-window-system.

TIA,
Christian Aichinger

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-rc1r20050702
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)


signature.asc
Description: Digital signature


Bug#308199: 0.6.36 contains ubuntu archive key instead of the debian key

2005-05-08 Thread Christian &#x27;Greek0' Aichinger
Package: apt
Version: 0.6.25
Severity: normal
Tags: experimental patch

0.6.36 in experimental contains a keyring with only the Ubuntu archive
key in /usr/share/apt/ubuntu-archive.gpg (mvo: this is an example of a
change I consider unsuitable for Debian ;). A patch with
debian-archive.gpg + debian/rules fixes to actually use it is available
in [EMAIL PROTECTED]/apt--debian--0.6--patch-1 at
http://greek0.net/~greek0/archives>.

Cheers,
Greek0

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r20050410
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages apt depends on:
ii  libc6   2.3.2.ds1-21 GNU C Library: Shared libraries an
ii  libgcc1 1:3.4.3-12   GCC support library
ii  libstdc++5  1:3.3.5-12   The GNU Standard C++ Library v3

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#304903: apt_pkg.GetPkgSrcRecords seems to leak FDs

2005-04-16 Thread Christian &#x27;Greek0' Aichinger
Package: python-apt
Version: 0.5.10
Severity: normal
Tags: patch

I've noticed that python-apt leaks FDs (and, as it turned out,
memory) when using PkgSrcRecords. Below is a transcript of a python
session that shows the bug.

 START 
[EMAIL PROTECTED]:~$ python
Python 2.3.5 (#2, Mar 26 2005, 17:32:32) 
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import apt_pkg
>>> apt_pkg.init()
>>> c = apt_pkg.GetCache()
Reading Package Lists... Done
Building Dependency Tree... Done
>>> 
[1]+  Stopped python
[EMAIL PROTECTED]:~$ ps aux | grep [p]ython | tail -n 1
greek0 848  2.4  3.4  17332 13408 pts/9T12:40   0:01 python
[EMAIL PROTECTED]:~$ ls /proc/848/fd/
0  1  2
[EMAIL PROTECTED]:~$ fg 1
python

>>> p = apt_pkg.GetPkgSrcRecords(c)
>>> p

>>> 
[1]+  Stopped python
[EMAIL PROTECTED]:~$ ls /proc/848/fd/
0  1  10  11  12  13  14  15  16  2  3  4  5  6  7  8  9
[EMAIL PROTECTED]:~$ # ^-- ?!
[EMAIL PROTECTED]:~$ exit
There are stopped jobs.
[EMAIL PROTECTED]:~$ fg 1
python

>>> del p
>>> del c
>>> del apt_pkg
>>> 
[1]+  Stopped python
[EMAIL PROTECTED]:~$ ls /proc/848/fd/
0  1  10  11  12  13  14  15  16  2  3  4  5  6  7  8  9
[EMAIL PROTECTED]:~$ for i in /proc/848/fd/*; do echo -e "$i\n `readlink $i`"; 
done
/proc/848/fd/0
 /dev/pts/9
/proc/848/fd/1
 /dev/pts/9
/proc/848/fd/10
 
/var/lib/apt/lists/ftp.de.debian.org_debian-non-US_dists_testing-proposed-updates_non-US_main_source_Sources
/proc/848/fd/11
 /var/lib/apt/lists/ftp.de.debian.org_debian_dists_unstable_main_source_Sources
/proc/848/fd/12
 
/var/lib/apt/lists/ftp.de.debian.org_debian-non-US_dists_unstable_non-US_main_source_Sources
/proc/848/fd/13
 /var/lib/apt/lists/security.debian.org_dists_stable_updates_main_source_Sources
/proc/848/fd/14
 
/var/lib/apt/lists/security.debian.org_dists_stable_updates_contrib_source_Sources
/proc/848/fd/15
 
/var/lib/apt/lists/security.debian.org_dists_stable_updates_non-free_source_Sources
/proc/848/fd/16
 
/var/lib/apt/lists/ftp.de.debian.org_debian_dists_experimental_main_source_Sources
/proc/848/fd/2
 /dev/pts/9
/proc/848/fd/3
 /var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable_main_source_Sources
/proc/848/fd/4
 
/var/lib/apt/lists/ftp.de.debian.org_debian-non-US_dists_stable_non-US_main_source_Sources
/proc/848/fd/5
 
/var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable-proposed-updates_main_source_Sources
/proc/848/fd/6
 
/var/lib/apt/lists/ftp.de.debian.org_debian-non-US_dists_stable-proposed-updates_non-US_main_source_Sources
/proc/848/fd/7
 /var/lib/apt/lists/ftp.de.debian.org_debian_dists_testing_main_source_Sources
/proc/848/fd/8
 
/var/lib/apt/lists/ftp.de.debian.org_debian-non-US_dists_testing_non-US_main_source_Sources
/proc/848/fd/9
 
/var/lib/apt/lists/ftp.de.debian.org_debian_dists_testing-proposed-updates_main_source_Sources
  END  

Investigating the problem showed that PkgSrcRecordsStruct creates a
new pkgSrcRecords object in its constructor without deleting it
again in the destructor. Fixing this revealed another bug, simmilar
to the one described in #304296 (mismatch of Owned and non-Owned
function calls, causing a segfault).

I've attatched a patch that fixes both problems.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r20050410
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages python-apt depends on:
ii  apt [libapt-pkg-libc6.3-5-3 0.5.28.6 Advanced front-end for dpkg
ii  apt-utils [libapt-inst-libc 0.5.28.6 APT utility programs
ii  libc6   2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgcc1 1:3.4.3-12   GCC support library
ii  libstdc++5  1:3.3.5-12   The GNU Standard C++ Library v3
ii  python  2.3.5-2  An interactive high-level object-o

-- no debconf information
diff -Nur orig.python-apt-0.5.10/python/pkgsrcrecords.cc 
python-apt-0.5.10/python/pkgsrcrecords.cc
--- orig.python-apt-0.5.10/python/pkgsrcrecords.cc  2003-12-26 
18:04:22.0 +0100
+++ python-apt-0.5.10/python/pkgsrcrecords.cc   2005-04-16 13:22:20.593046072 
+0200
@@ -26,6 +26,9 @@
   List.ReadMainList();
   Records = new pkgSrcRecords(List);
};
+   ~PkgSrcRecordsStruct() {
+  delete Records;
+   };
 };
 
 // PkgSrcRecords Class /*{{{*/
@@ -89,10 +92,10 @@
PyObject_HEAD_INIT(&PyType_Type)
0,  // ob_size
"pkgSrcRecords",  // tp_name
-   sizeof(CppOwnedPyObject),   // tp_basicsize
+   sizeof(CppPyObject),   // tp_basicsize
0,   // tp_itemsize
// Methods
-   CppOwnedDealloc,   // tp_dealloc
+   CppDealloc,   // tp_dealloc
0,   //

Bug#304296: Segfault in CppOwnedDealloc

2005-04-12 Thread Christian &#x27;Greek0' Aichinger
Package: python-apt
Version: 0.6.10
Severity: normal
Tags: patch

I've hit a segfault python-apt while trying to write a class that
nicely encapsulates a package.

gdb says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1075396736 (LWP 8931)]
0x403f20bc in CppOwnedDealloc () from
/usr/lib/python2.3/site-packages/apt_pkg.so

Looking at the source (at python/pkgsrcrecords.cc) there's a
mismatch in the used variants of the object allocation/deallocation
functions. Allocation is done with CppPyObject_NEW, while
deallocation is done with CppOwnedDealloc. Using the non-owned
variants everywhere the segfault is gone. 

I've attatched the python program that triggered the segfault here,
and my proposed fix.

Cheers,
Greek0

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r20050410
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages python-apt depends on:
ii  apt [libapt-pkg-libc6.3-5-3 0.5.28.6 Advanced front-end for dpkg
ii  apt-utils [libapt-inst-libc 0.5.28.6 APT utility programs
ii  libc6   2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgcc1 1:3.4.3-12   GCC support library
ii  libstdc++5  1:3.3.5-12   The GNU Standard C++ Library v3
ii  python  2.3.5-2  An interactive high-level object-o

-- no debconf information
#!/usr/bin/env python2.4

import sys
import os
import re
import copy
import apt_pkg
import options

class Regexps:
	# apt-cache policy RE
	# Installed = groups(1)
	# Candidate = groups(2)
	policy = re.compile(r'^\s+Installed: (.*)$\n^\s+Candidate: (.*)$', re.M)

class Package(object):
	"""Maintains data about packages.

	This class encapsulates a package. It allows inspection of the current
	state, listing of available versions, ...

	>>> y = Package("kde")
	>>> y.is_installed()
	False
	>>> y.installed
	''
	>>> y.candidate
	'5:44'
	>>> y.source
	'xfree86'

	"""
	def __init__(self, pkgname):
		self._name = pkgname
		self._installed = None
		self._candidate = None
		self._source = None

	def _read_policy(self):
		args = ""
		if options.opts.Release != None:
			args += " -oAPT::Default-Release='%s' " % options.opts.Release

		cmdline = "apt-cache policy %s %s" % (args, self._name)

		f = os.popen(cmdline)
		policy_txt = f.read()
		f.close()

		match = Regexps.policy.search(policy_txt)
		if match.group(1) == "(none)":
			self._installed = ""
		else:
			self._installed = match.group(1)
		self._candidate = match.group(2)

	def _get_candidate(self):
		if self._candidate == None:
			self._read_policy()
		return self._candidate

	def _get_installed(self):
		if self._installed == None:
			self._read_policy()
		return self._installed

	def is_installed(self):
		if self._installed == None:
			self._read_policy()

		return bool(self._installed)

	def _get_source(self):
		if self._source == None:
			src = apt_pkg.GetPkgSrcRecords(apt_pkg.GetCache())
			src.Lookup(self._name)
			self._source = copy.deepcopy(src.Package)
			print self._source

		#return self._source


	candidate = property(_get_candidate)
	installed = property(_get_installed)
	source = property(_get_source)


def main():
	os.environ["LC_ALL"]="C"
	os.environ["LC_MESSAGES"]="C"
	options.ParseOptions()
	apt_pkg.init()
	p = Package("xterm")
	print "Installed: %s" % p.installed
	print "Candidate: %s" % p.candidate
	x = p.source
	print "x:"
	print x
	print "source:"
	print p._source

if __name__ == "__main__":
	main()
diff -ur orig.python-apt-0.6.10/python/pkgsrcrecords.cc 
python-apt-0.6.10/python/pkgsrcrecords.cc
--- orig.python-apt-0.6.10/python/pkgsrcrecords.cc  2003-12-26 
18:04:22.0 +0100
+++ python-apt-0.6.10/python/pkgsrcrecords.cc   2005-04-12 08:48:46.640532096 
+0200
@@ -89,10 +89,10 @@
PyObject_HEAD_INIT(&PyType_Type)
0,  // ob_size
"pkgSrcRecords",  // tp_name
-   sizeof(CppOwnedPyObject),   // tp_basicsize
+   sizeof(CppPyObject),   // tp_basicsize
0,   // tp_itemsize
// Methods
-   CppOwnedDealloc,   // tp_dealloc
+   CppDealloc,   // tp_dealloc
0,   // tp_print
PkgSrcRecordsAttr,  // tp_getattr
0,   // tp_setattr


signature.asc
Description: Digital signature


Bug#303828: Hangs application if asked for FS_ListFontsWithXInfo

2005-04-08 Thread Christian &#x27;Greek0' Aichinger
Package: xfstt
Version: 1.6-3
Severity: normal
Tags: patch

When xfstt is asked for FS_ListFontsWithXInfo it returns an
FSBadImplementation error. This is not allowed according to the
specs, and causes the application that triggered the
ListFontsWithXInfo to hang.

The easy fix for this problem is changing
#if 0
in xfstt.cc:1345 to
#if 1

This causes xfstt to return an empty list in this case, which works
well and is OK with the spec. Another possibility would be to return
FSBadAlloc, which would also be OK according to the spec.
Unfortunately error xfree86 doesn't seem to handle this case
(violating the spec itself, cf. fs_wakeup(), err from
fs_read_list_info() is never really checked there).

The bug can be triggered by a call to XCreateFontSet(). I hit the
bug by starting ion3 under an UTF-8 locale, in which case it calls
XCreateFontSet().

Steps to reproduce:
 START  
host # locale
>>> [EMAIL PROTECTED]
>>> [EMAIL PROTECTED]
>>> LC_NUMERIC="[EMAIL PROTECTED]"
>>> LC_TIME=en_US.UTF8
>>> LC_COLLATE="[EMAIL PROTECTED]"
>>> LC_MONETARY="[EMAIL PROTECTED]"
>>> LC_MESSAGES=en_US.UTF8
>>> LC_PAPER="[EMAIL PROTECTED]"
>>> LC_NAME="[EMAIL PROTECTED]"
>>> LC_ADDRESS="[EMAIL PROTECTED]"
>>> LC_TELEPHONE="[EMAIL PROTECTED]"
>>> LC_MEASUREMENT="[EMAIL PROTECTED]"
>>> LC_IDENTIFICATION="[EMAIL PROTECTED]"
>>> LC_ALL=
host # mkdir xfstt-chroot
host # debootstrap sid xfstt-chroot http://ftp.debian.org/debian/
host # mount -t proc proc xfstt-chroot/proc
host # mount -t devpts devpts xfstt-chroot/dev/pts
host # # just entries for sid
host # cp /etc/apt/sources.list xfstt-chroot/etc/apt/sources.list
host # chroot xfstt-chroot /bin/bash
chroot # apt-get update
chroot # apt-get install xfstt ion3 tightvncserver x-window-system locales
chroot # vi /etc/X11/XF86Config-4
< insert '''FontPath"unix/:7101"''' just below "unix/:7100" >
chroot # adduser xyz
chroot # su xyz
chroot $ cd ~
chroot $ mkdir .vnc
chroot $ echo "exec ion3" > .vnc/xstartup
chroot $ chmod 755 .vnc/xstartup
chroot $ vncserver :1  # use whatever display is free
  END   

ion3 then hangs, waiting for a reply from the xserver.
I'm sure the bug is in xfstt and not in tightvnc (which uses the
xfree86 code internally) or ion3 because 
* ion3 doesn't do any special magic, the XCreateFontSet call is
  pretty streight-forward.
* the crash happens too when ion3 is started under xfree86 under a
  UTF-8 locale.
* xfstt violates the X Font Server Protocol and the xserver doesn't
  check for that violation.

Enabling UTF-8 serves no other purpose then to activate that special
code-path that leads to XCreateFontSet().

Cheers,
Greek0

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r20050324
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages xfstt depends on:
ii  debconf 1.4.46   Debian configuration management sy
ii  libc6   2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgcc1 1:3.4.3-12   GCC support library
ii  libstdc++5  1:3.3.5-12   The GNU Standard C++ Library v3

-- debconf information:
  xfstt/fonts_not_provided:
* xfstt/default_port_changed:
  xfstt/listen_tcp: false


signature.asc
Description: Digital signature


Bug#302221: Minor typo in de/fontset.c

2005-03-30 Thread Christian &#x27;Greek0' Aichinger
Package: ion3
Version: 20050322-2
Severity: minor
Tags: patch

I think I've found a minor typo in de/fontset.c. An error message says
"fonset", which should obviously be "fontset".

I've attatched a patch.

Cheers,
Greek0

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r20050324
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages ion3 depends on:
ii  libc62.3.2.ds1-20GNU C Library: Shared libraries an
ii  libice6  4.3.0.dfsg.1-12.0.1 Inter-Client Exchange library
ii  liblua50 5.0.2-5 Main interpreter library for the L
ii  liblualib50  5.0.2-5 Extension library for the Lua 5.0 
ii  libsm6   4.3.0.dfsg.1-12.0.1 X Window System Session Management
ii  libx11-6 4.3.0.dfsg.1-12.0.1 X Window System protocol client li
ii  libxext6 4.3.0.dfsg.1-12.0.1 X Window System miscellaneous exte
ii  xlibs4.3.0.dfsg.1-12 X Keyboard Extension (XKB) configu

-- no debconf information
--- orig.ion3-20050322/de/fontset.c	2005-03-30 17:47:50.0 +0200
+++ ion3-20050322/de/fontset.c	2005-03-30 20:02:45.252727312 +0200
@@ -95,7 +95,7 @@
 return fs;
 
 /* Not a warning, nothing serious */
-FNT_D(fprintf(stderr, "Failed to load fonset.\n"));
+FNT_D(fprintf(stderr, "Failed to load fontset.\n"));
 
 if (! fs) {
 char *lcc=NULL;


Bug#295994: Optionally use a special .inbox directory

2005-02-19 Thread Christian &#x27;Greek0' Aichinger
Package: sylpheed-claws-maildir-plugin
Version: 0.7-2
Severity: wishlist
Tags: patch

I'd like to have a special .inbox directory under the maildir mailbox
directory. Mutt doesn't like the current layout, and it seems
conceptionally better to me to have the maildir directory layed out like
a tree, where only the leaf nodes contain data.

I've written a patch that does this in a backwards-compatible way. To
get the new layout you have to manually create a .inbox file in your
maildir mailbox directory. If that directory exists maildir-plugin will
use it as inbox, otherwise the current directory (maildir mailbox root)
is used.

If you wish I can also provide a script to automatically convert between
the two styles.

Cheers,
Greek0


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r01112004
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages sylpheed-claws-maildir-plugin depends on:
ii  libc62.3.2.ds1-20GNU C Library: Shared libraries an
ii  libdb4.2 4.2.52-17   Berkeley v4.2 Database Libraries [
ii  libglib1.2   1.2.10-9The GLib library of C routines
ii  libgtk1.21.2.10-17   The GIMP Toolkit set of widgets fo
ii  libx11-6 4.3.0.dfsg.1-10 X Window System protocol client li
ii  libxext6 4.3.0.dfsg.1-10 X Window System miscellaneous exte
ii  libxi6   4.3.0.dfsg.1-10 X Window System Input extension li
ii  sylpheed-claws   1.0.1-1 Bleeding edge version of the Sylph
ii  xlibs4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu

-- no debconf information
diff -Nur sylpheed-claws-maildir-plugin-0.7.old/src/maildir.c 
sylpheed-claws-maildir-plugin-0.7/src/maildir.c
--- sylpheed-claws-maildir-plugin-0.7.old/src/maildir.c 2004-09-27 
16:51:42.0 +0200
+++ sylpheed-claws-maildir-plugin-0.7/src/maildir.c 2005-02-19 
16:08:48.0 +0100
@@ -201,16 +201,31 @@
 if (item->path && strcmp(item->path, "INBOX"))
 path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
item->path, NULL);
-else
-path = g_strdup(folder_path);
+else {
+path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
+   ".inbox", NULL);
+if (access(path, F_OK) != 0) {
+g_free(path);
+path = g_strdup(folder_path);
+}
+}
 } else {
 if (item->path && strcmp(item->path, "INBOX"))
 path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
folder_path, G_DIR_SEPARATOR_S,
item->path, NULL);
-else
+else {
 path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
-   folder_path, NULL);
+   folder_path, G_DIR_SEPARATOR_S,
+   ".inbox", NULL);
+if (access(path, F_OK) != 0) {
+g_free(path);
+path = g_strconcat(get_home_dir(), 
+   G_DIR_SEPARATOR_S,
+   folder_path, NULL);
+}
+
+}
 }
g_free(folder_path);
 


Bug#292737: segfault with newest sylpheed-claws-pgpinline-plugin

2005-01-29 Thread Christian &#x27;Greek0' Aichinger
Package: sylpheed-claws
Version: 0.9.13-1
Severity: normal
Tags: patch

Sylpheed-claws segfaults when using the sylpheed-claws-pgpinline-plugin
from http://sylpheed.mine.nu:9981/debian/>.

Steps to reproduce:
* Start sylpheed-claws
* Load pgpinline-plugin
* Click "Compose Email"
* Write some nonsense (fill To/Subject/Body)
* Check Options->Privacy System->PGP Inline
* Check Options->Sign
* Click Submit
* Enter your passphrase
* Sylpheed-Claws segfaults

Tracking the bug down showed that it's caused by pgpinline_sign()'s call
to procmime_encode_content() [pgpinline.c:442].
Looking at the latter function it can be seen that:
a) The function will always fail when (meminfo->content ==
MIMECONTENT_MEM) && (encoding == ENC_BASE64).
b) The error handling of that function terribly sucks, which turns a
not-so-serious bug into a segfault.

The source of the bug is line 432:
---
if (canonicalize_file(mimeinfo->data.filename, tmp_file) < 0) {
---
It is always called, no matter what mimeinfo->content is. Since
mimeinfo->data is a union (filename/mem), canonicalize_file tries to
open the passed mime data (the gpg-clearsigned message) as file, which
fails. At this point tmp_file has not yet been created by
canonicalize_file, so the following fopen on it (line 436) fails too,
which causes fread to access an invalid FILE* [tmp_fd] on line 444,
which results in the segfault.

So this bug is clearly one of sylpheed-claws, and not of the
pgpinline-plugin.

Fixing the segfault is easy, adding >return FALSE;< in 2 places is
enough. See attatchment sylpheed-claws-fixsegv.patch.

Making the function fully working with is a bit more problematic, since
procmime_encode_content() doesn't even know the name of the file where
the mime content is stored. The name isn't passed up by
str_open_as_stream() (which in turn doesn't have it itself, because it's
not returned by my_tmpfile()).

So you're basically left with two options: modify my_tmpfile and
str_open_as_stream to pass up the filename of the temporary file, or to
make a canonicalize_file variant which works on FILE* objects.

An implementation of the second way is in sylpheed-claws-fullfix.patch.
Please apply sylpheed-claws-fixsegv.patch as well as
sylpheed-claws-fullfix.patch. The first one fixes the error handling,
the second one makes the thing work right.

Perhaps this bug is related to #292089 and #280160. The symptoms look
similar, but I don't really understand what the submitter means in
#292089, and I don't use SA via sylpheed, so I can't check #280160.

Cheers,
Greek0

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r01112004
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages sylpheed-claws depends on:
ii  libaspell15  0.50.5-5The GNU Aspell spell-checker runti
ii  libc62.3.2.ds1-20GNU C Library: Shared libraries an
ii  libcompfaceg11989.11.11-24   Compress/decompress images for mai
ii  libglib1.2   1.2.10-9The GLib library of C routines
ii  libgpgme60.3.16-2GPGME - GnuPG Made Easy
ii  libgtk1.21.2.10-17   The GIMP Toolkit set of widgets fo
ii  libldap2 2.1.30-3OpenLDAP libraries
ii  libpisock8   0.11.8-10   Library for communicating with a P
ii  libssl0.9.7  0.9.7e-3SSL shared libraries
ii  libx11-6 4.3.0.dfsg.1-10 X Window System protocol client li
ii  libxext6 4.3.0.dfsg.1-10 X Window System miscellaneous exte
ii  libxi6   4.3.0.dfsg.1-10 X Window System Input extension li
ii  sylpheed-claws-i18n  0.9.13-1Locale data for Sylpheed Claws (i1
ii  xlibs4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu

-- no debconf information
--- old/sylpheed-claws-0.9.13/src/procmime.c2004-12-04 09:09:00.0 
+0100
+++ sylpheed-claws-0.9.13/src/procmime.c2005-01-28 00:56:01.0 
+0100
@@ -432,12 +432,14 @@
if (canonicalize_file(mimeinfo->data.filename, 
tmp_file) < 0) {
g_free(tmp_file);
fclose(infp);
+   return FALSE;
}
if ((tmp_fp = fopen(tmp_file, "rb")) == NULL) {
FILE_OP_ERROR(tmp_file, "fopen");
unlink(tmp_file);
g_free(tmp_file);
fclose(infp);
+   return FALSE;
}
}
 
diff -Nur old/sylpheed-claws-0.9.13.fixsegv/src/common/utils.c 
sylpheed-claws-0.9.13/src/common/utils.c
--- old/sylpheed-claws-0.9.13.fixsegv/src/common/utils.c2005-01-29 
11:04:33.0 +0100
+++ sylpheed-claws-0.9.13/

Bug#288654: sylpheed-claws-pgpinline-plugin: Package has unmet dependencies in Unstable.

2005-01-18 Thread Christian &#x27;Greek0' Aichinger
Would it be possible to put the new package online somewhere else in the
meantime, so we can use it with the sylpheed-claws version in sid?

Cheers,
Greek0


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]