Bug#774643: can't cast Hash to text

2015-03-25 Thread Knut Arne Bjørndal
Hi

There still seems to be some problems with stored configs, in a test
deployment I have the following minimal node manifest:

define foo($params) {
}

node 'test.adm.easyconnect.no' {
  @@foo {'bar': params = {foo = 1, bar = 2} }
}

We use this kind of pattern in quite a few places where it would be
inconvenient to flatten it before exporting, and it works fine on wheezy.

The first run of the agent works fine, and the following value is
written to the database: {foo=1, bar=2}

The second (and third, fourth, ...) run fails: Error: Could not retrieve
catalog from remote server: Error 400 on SERVER: can't cast Hash to text

Enabling as much debug as I know how to on the master it logs this on
the first (successful) run:

Notice: Compiled catalog for test.adm.easyconnect.no in environment
vagrant in 1.20 seconds
Info: Caching catalog for test.adm.easyconnect.no
Debug: Searched for resources in 0.01 seconds
Debug: Searched for resource params and tags in 0.00 seconds
Debug: Resource removal in 0.00 seconds
Debug: Resource merger in 0.00 seconds
Debug: Added resources(initialization) in 0.01 seconds
Debug: Added resources(parameters) in 0.01 seconds
Debug: Added resources(tags) in 0.02 seconds
Debug: Resource addition in 0.06 seconds
Debug: Performed resource comparison in 0.06 seconds
Debug: Using cached facts for test.adm.easyconnect.no
Info: Caching node for test.adm.easyconnect.no

While for the second run:

Info: Caching node for test.adm.easyconnect.no
Notice: Compiled catalog for test.adm.easyconnect.no in environment
vagrant in 0.03 seconds
Info: Caching catalog for test.adm.easyconnect.no
Debug: Searched for resources in 0.01 seconds
Debug: Searched for resource params and tags in 0.00 seconds
Debug: Resource removal in 0.00 seconds
Error: can't cast Hash to text

Agent version doesn't seem to matter, I've tried both 2.7 and 3.7.
Master is on 3.7.2-3 from jessie.

-- 
Knut Arne Bjørndal, Tekniker Easy Connect AS - http://1890.no
E-post: knut.arne.bjorn...@easyconnect.no



signature.asc
Description: OpenPGP digital signature


Bug#664857: varnish: reload-vcl exits with code 0 if vcl.load or vcl.use fails

2012-03-21 Thread Knut Arne Bjørndal
Package: varnish
Version: 2.1.3-8
Severity: normal
Tags: patch

If the VCL has errors the reload-vcl script exits successfully anyway. I've
tested with both 2.1 from squeeze and 3.0.2, with both bash and dash.

The problem seems to be that the exitstatus variable disappears after the if
$varnishadm ... vcl.load block. I suspect this is due to the redirect through
grep that causes the block to run in a subshell.

I'm attaching a patch that moves this grep to the place where the logfile is
output instead, which avoids the subshell.



-- System Information:
Debian Release: 6.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages varnish depends on:
ii  adduser   3.112+nmu2 add and remove users and groups
ii  gcc   4:4.4.5-1  The GNU C compiler
ii  libc6 2.11.3-2   Embedded GNU C Library: Shared lib
ii  libc6-dev [libc-dev]  2.11.3-2   Embedded GNU C Library: Developmen
ii  libncurses5   5.7+20100313-5 shared libraries for terminal hand
ii  libvarnish1   2.1.3-8shared libraries for Varnish

varnish recommends no packages.

varnish suggests no packages.

-- no debconf information
--- debian/reload-vcl.orig  2012-03-21 13:36:32.174223469 +0100
+++ debian/reload-vcl   2012-03-21 13:37:09.669963485 +0100
@@ -160,12 +160,12 @@
 else
 printf $msg_compile_failed $vcl_label $vcl_file
 exitstatus=1
-fi | grep -v ^$  $logfile
+fi  $logfile
 
 # Blather
 if [ -z ${quiet} -o -n $exitstatus ]
 then
-cat 2 $logfile
+grep -v '^$' 2 $logfile
 fi
 
 # Cleanup


Bug#635594: postgresql-common: /etc/init.d/postgresql status fails with some clusters down

2011-07-27 Thread Knut Arne Bjørndal
Package: postgresql-common
Version: 118~bpo60+1
Severity: normal

After installing postgresql 9.0 from backports and using pg_upgrade I have a
stopped 8.3 cluster and a running 9.0 cluster. This breaks
/etc/init.d/postgresql status, which doesn't find any running clusters.

Since /etc/init.d/postgresql sets -e, when status() in /usr/share/postgresql-
common/init.d-functions exits with return code 3 it halts the loop at line 31
in the init script.



-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages postgresql-common depends on:
ii  adduser 3.112+nmu2   add and remove users and groups
ii  debconf [debconf-2.0]   1.5.36.1 Debian configuration management sy
ii  lsb-base3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii  postgresql-client-commo 118~bpo60+1  manager for multiple PostgreSQL cl
ii  procps  1:3.2.8-9/proc file system utilities
ii  ssl-cert1.0.28   simple debconf wrapper for OpenSSL

postgresql-common recommends no packages.

postgresql-common suggests no packages.

-- debconf information excluded



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



Bug#627989: spamass-milter: Add SMTP AUTH information to received header

2011-05-26 Thread Knut Arne Bjørndal
Package: spamass-milter
Version: 0.3.1-10
Severity: normal
Tags: patch

The synthesized received header that spamass-milter adds does not
contain information on SMTP AUTH. This results in false positives for
mail from for example road-warriors that submit mail from addresses that
are listed in various RBLs, but which should be accepted since they are
authenticated.

The attached patch is based on the one from https://www.linuxhacker.at
/opensource-projects/spamass-milter but both cleaned up so it applies to
the debian source and modified to output (authenticated) even if
auth_ssf isn't available (which it isn't from postfix).

The patched milter is running in production here with
postfix-2.7.1-1+squeeze1 and spamassassin-3.3.1-1 and everything seems
to work just fine.

-- 
Knut Arne Bjørndal, Technician Easy Connect AS - http://1890.no
E-mail: knut.arne.bjorn...@easyconnect.no Phone: +47 53 20 53 25

--- spamass-milter.cpp	2011-05-26 10:32:52.0 +0200
+++ spamass-milter.cpp	2011-05-26 10:44:53.0 +0200
@@ -894,7 +894,8 @@
 		   
 		*/
 		const char *macro_b, *macro_i, *macro_j, *macro_r,
-		   *macro_s, *macro_v, *macro_Z, *macro__;
+		   *macro_s, *macro_v, *macro_Z, *macro__,
+		   *macro_auth_type, *macro_auth_ssf;
 		char date[32];
 
 		/* RFC 822 date. */
@@ -931,7 +932,22 @@
 			macro_r = SMTP;
 			warnmacro(r, ENVRCPT);
 		}
-			
+
+		/* Authenticated bits Information */
+		macro_auth_type = smfi_getsymval(ctx, {auth_type});
+		if (!macro_auth_type)
+		{
+			macro_auth_type = ;
+			warnmacro(auth_type, ENVRCPT);
+		}
+
+		macro_auth_ssf = smfi_getsymval(ctx, {auth_ssf});
+		if (!macro_auth_ssf)
+		{
+			macro_auth_ssf = ;
+			warnmacro(auth_ssf, ENVRCPT);
+		}
+
 		/* Sendmail currently cannot pass us the {s} macro, but
 		   I do not know why.  Leave this in for the day sendmail is
 		   fixed.  Until that day, use the value remembered by
@@ -970,11 +986,22 @@
 		assassin-output((string)X-Envelope-From: +assassin-from()+\r\n);
 		assassin-output((string)X-Envelope-To: +envrcpt[0]+\r\n);
 
-		assassin-output((string)
-			Received: from +macro_s+ (+macro__+)\r\n\t+
-			by +macro_j+ (+macro_v+/+macro_Z+) with +macro_r+ id +macro_i+\r\n\t+
+		string rec_header;
+		rec_header=(string)Received: from +macro_s+ (+macro__+)\r\n\t;
+		if (strlen(macro_auth_type)!=0) {
+			rec_header+=(string)(authenticated;
+			if (strlen(macro_auth_ssf)!=0) {
+rec_header+=(string) bits=+macro_auth_ssf;
+			}
+			rec_header+=(string))\r\n\t;
+		}
+		rec_header+=(string)by +macro_j+(+macro_v+/+macro_Z+) with +
+			macro_r+ id +macro_i+\r\n\t+
 			macro_b+\r\n\t+
-			(envelope-from +assassin-from()+)\r\n);
+			(envelope-from +assassin-from()+\r\n;
+
+		debug(D_SPAMC, Received header for spamc: %s, rec_header.c_str());
+		assassin-output(rec_header);
 
 	} else
 		assassin-output((string)X-Envelope-To: +envrcpt[0]+\r\n);



signature.asc
Description: OpenPGP digital signature


Bug#534346: [request-tracker-maintainers] Bug#534346: Upgrading from 3.8.2 to 3.8.3 with rt-setup-database

2010-05-06 Thread Knut Arne Bjørndal
Dominic Hargreaves wrote:
 On Wed, May 05, 2010 at 10:36:51AM +0200, Knut Arne Bjørndal wrote:
 
 I also experienced this error, and tracked it down. For some reason if
 there's a Schema.Pg in /etc/request-tracker3.8 the upgrade script will
 try to apply it.

 I'm not sure at what point the package was updated to move things like
 schema.Pg from /etc to /usr, but my install has been upgraded a few
 times and had a schema.Pg there.

 Moving acl.*, initialdata, schema.*, upgrade and RT_Config.pm away from
 /etc solved the problem for me.

 Would it make sense to have a package upgrade script either
 automatically clean out those files (if it detected they were
 unchanged), or at least warn the user?
 
 Thanks for taking the time to write about this.
 
 It does seem plausible that the problems described in this bug were 
 caused by left behind schema files; however, the intention was that
 they be removed. The postinst now removes unmodified config from /etc
 (as of 3.8.2-1).
 
 It would be interesting to know exactly which versions you had installed,
 and also whether the old schema files that were left behind match the
 MD5sums in /usr/share/request-tracker3.8/debian/old_etc.md5sum (since
 that would indicate a bug in the postinst removal script fragment).

3.8.2-1~experimental1, rebuilt for lenny.

Not quite sure what other versions has at some point been installed on
the same machine, things have moved around a bit.

The schema/acl files all match the md5sums, except for
/etc/request-tracker3.8/old_package_stuff/upgrade/schema.mysql-4.0-4.1.pl,
which doesn't exist.

 I don't think we anticipated that left-behind schema files would be a
 problem, though; we were just tidying up for neatness.
 
 I'm not sure whether it's worth fixing this in the package now, since
 the problem should only exist for people who installed from experimental
 over a year ago.

Yeah, presumably this is just a problem for a few old versions from
experimental, so probably not worth spending energy on. At least now
there's a solution if anybody else googles the problem.

-- 
Knut Arne Bjørndal, Tekniker Easy Connect AS - http://1890.no
E-post: knut.arne.bjorn...@easyconnect.no Tlf: 53 20 53 25



signature.asc
Description: OpenPGP digital signature


Bug#534346: Upgrading from 3.8.2 to 3.8.3 with rt-setup-database

2010-05-05 Thread Knut Arne Bjørndal
Hi

I also experienced this error, and tracked it down. For some reason if
there's a Schema.Pg in /etc/request-tracker3.8 the upgrade script will
try to apply it.

I'm not sure at what point the package was updated to move things like
schema.Pg from /etc to /usr, but my install has been upgraded a few
times and had a schema.Pg there.

Moving acl.*, initialdata, schema.*, upgrade and RT_Config.pm away from
/etc solved the problem for me.

Would it make sense to have a package upgrade script either
automatically clean out those files (if it detected they were
unchanged), or at least warn the user?

-- 
Knut Arne Bjørndal, Tekniker Easy Connect AS - http://1890.no
E-post: knut.arne.bjorn...@easyconnect.no Tlf: 53 20 53 25



signature.asc
Description: OpenPGP digital signature


Bug#513580: CREATE TEXT DICTIONARY with Norwegian data files makes postgresql-8.3 segfault on amd64

2009-01-30 Thread Knut Arne Bjørndal

Package: postgresql-8.3
Version: 8.3.3-1~bpo40+1
Severity: normal
Tags: patch

As reported in 
http://archives.postgresql.org/pgsql-general/2009-01/msg00953.php 
creating a new Norwegian dictionary causes postgresql to segfault. It 
seems the segfault only happens on amd64, but it seems there could be 
problems elsewhere too.


Upstream came up with a patch just hours after the report, and it seems 
to be slated for 8.3.6: 
http://archives.postgresql.org/pgsql-general/2009-01/msg00970.php


I've built a package locally with the patch included and it works and 
solves the issue for me.


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.26-bpo.1-686-bigmem
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages postgresql-8.3 depends on:
ii  lib 2.3.6.ds1-13etch8GNU C Library: Shared libraries
ii  lib 1.39+1.40-WIP-2006.11.14+dfsg-2etch1 common error description 
library

ii  lib 1.4.4-7etch6 MIT Kerberos runtime libraries
ii  lib 2.1.30-13.3  OpenLDAP libraries
ii  lib 0.79-5   Pluggable Authentication 
Modules l

ii  lib 8.3.4-2~bpo40+1  PostgreSQL C client library
ii  lib 0.9.8c-4etch4SSL shared libraries
ii  lib 2.6.27.dfsg-6GNOME XML library
ii  pos 8.3.3-1~bpo40+1  front-end programs for 
PostgreSQL
ii  pos 88~bpo40+1   PostgreSQL database-cluster 
manage
ii  tzd 2008e-1etch3 Time Zone and Daylight 
Saving Time


postgresql-8.3 recommends no packages.

-- no debconf information

--
Knut Arne Bjørndal, Tekniker Easy Connect AS - http://1890.no
E-post: knut.arne.bjorn...@easyconnect.no Tlf: 53 20 53 25



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



Bug#497544: /usr/share/doc/request-tracker3.6/NOTES.Debian.gz: Cludgy documentation

2008-09-02 Thread Knut Arne Bjørndal

Package: request-tracker3.6
Version: 3.6.1-4
Severity: minor
File: /usr/share/doc/request-tracker3.6/NOTES.Debian.gz

*** Please type your report below this line ***

The documentation in NOTES/README.Debian is, as much of the upstream
documentation, really cludgy in some places.

After finding some better ways to do some of the steps I wrote it down
on http://wiki.bestpractical.com/view/DebianInstallGuide, it would be
great if some of this could be integrated into the documentation shipped
with Debian.

-- Package-specific info:
Changed files:


-- System Information:
Debian Release: 4.0
 APT prefers stable
 APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-etchnhalf.1-686-bigmem
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages request-tracker3.6 depends on:
ii  exim4   4.63-17  metapackage to ease exim 
MTA (v4)
ii  exim4-daemon-light [mail-tr 4.63-17  lightweight exim MTA (v4) 
daemon
ii  libapache-session-perl  1.81-1   Perl modules for keeping 
persisten
ii  libcache-cache-perl 1.05-2   Managed caches of 
persistent infor
ii  libcache-simple-timedexpiry 0.26-1   Perl module to cache and 
expire ke
ii  libcalendar-simple-perl 1.17-2   Perl extension to create 
simple ca
ii  libclass-returnvalue-perl   0.53-1   A return-value object that 
lets yo
ii  libdbd-pg-perl  1.49-2   a PostgreSQL interface for 
Perl 5
ii  libdbd-sqlite3-perl 1.13-1.1 Perl DBI driver with a 
self-contai
ii  libdbi-perl 1.53-1etch1  Perl5 database interface by 
Tim Bu
ii  libdbix-searchbuilder-perl  1.45-2   Encapsulate SQL queries and 
rows i
ii  libexception-class-perl 1.21-1   a module that allows you to 
declar

ii  libfcgi-perl0.67-2   FastCGI Perl module
ii  libfreezethaw-perl  0.43-3   converting Perl structures 
to stri
ii  libgd-graph-perl1.43.08-2.1  Graph Plotting Module for 
Perl 5

ii  libgd-text-perl 0.86-3.1 Text utilities for use with GD
ii  libhtml-mason-perl  1:1.35-3 HTML::Mason Perl module
ii  libhtml-parser-perl 3.55-1   A collection of modules 
that parse
ii  libhtml-scrubber-perl   0.08-3   Perl extension for 
scrubbing/sanit
ii  liblocale-maketext-fuzzy-pe 0.02-2   Maketext from already 
interpolated
ii  liblocale-maketext-lexicon- 0.62-1   Lexicon-handling backends 
for Loc
ii  liblog-dispatch-perl2.11-1   Dispatches messages to 
multiple Lo
ii  libmailtools-perl   1.74-1   Manipulate email in perl 
programs
ii  libmime-perl5.420-0.1Perl5 modules for 
MIME-compliant m
ii  libmldbm-perl   2.01-1   Store multidimensional hash 
struct
ii  libmodule-versions-report-p 1.02-3   Report versions of all 
modules in
ii  libparams-validate-perl 0.77-1   validate parameters to Perl 
method
ii  libregexp-common-perl   2.120-4  Provide commonly requested 
regular
ii  libterm-readkey-perl2.30-3   A perl module for simple 
terminal
ii  libtest-inline-perl 2.103-1  Perl extension for embed 
tests and
ii  libtext-autoformat-perl 1.13-1   Perl module for automatic 
text wra
ii  libtext-quoted-perl 1.8-3Extract the structure of a 
quoted

ii  libtext-template-perl   1.44-1.1 Text::Template perl module
ii  libtext-wikiformat-perl 0.78-0.1 translates Wiki formatted 
text int

ii  libtext-wrapper-perl1.000-2  Simple word wrapping routine
ii  libtime-modules-perl2003.1126-2  Various Perl modules for 
time/date

ii  libtree-simple-perl 1.17-1   A simple tree object
ii  libuniversal-require-perl   0.10-1   Load modules from a variable
ii  libxml-rss-perl 1.05-1   Perl module for managing 
RSS (RDF
ii  libxml-simple-perl  2.14-5   Perl module for reading and 
writin
ii  perl5.8.8-7etch3 Larry Wall's Practical 
Extraction
ii  rt3.6-apache2   3.6.1-4  Apache 2 specific files for 
reques
ii  rt3.6-clients   3.6.1-4  Mail gateway and 
command-line inte

ii  sysklogd [system-log-daemon 1.4.1-18 System Logging Daemon

Versions of packages request-tracker3.6 recommends:
ii  postgresql7.5.22 object-relational SQL 
database man


-- no debconf information




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