[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#260791: debbugs on other systems



Package: debbugs
Version: 2.4.1
Severity: wishlist
Tags: patch

hi,

i recently setup my own BTS on FreeBSD and run into some Problems.
Attached, 3 small Patches which should make it easier to setup
debbugs on non-debian Systems (eg. FreeBSD).

[1] debbugs.config.diff
[2] debbugs.mailer.diff
 o 	Make Path to sendmail binary editable
 
[3] debbugs.errorlib.diff
 o 	include ioctl's for FreeBSD as comment. 
 o	include $flockstruct for FreeBSD as comment.
 o	include pack call for FreeBSD as comment.

it may probably be an good idea to also have $flockstruct and both
F_SETLK/F_WRLCK somewhere in the config file.   

bye,
    - michael
--- /etc/debbugs/config.orig	Thu Jul 22 10:10:51 2004
+++ /etc/debbugs/config	Thu Jul 22 10:15:49 2004
@@ -40,6 +40,7 @@
 
 # Various configurable options
 $gMailer = "sendmail";				# valid: exim, qmail and sendmail
+$gMailerBin = "/usr/sbin/sendmail";		# Path to `sendmail' executable
 $gBug = "bug";					# how to spell `bug'
 $gBugs = "bugs";				# how to spell `bugs'
 $gRemoveAge = 28;				# days after closed bugs are cleaned out
--- debbugs.orig/errorlib	Fri Jun  6 10:37:36 2003
+++ debbugs/errorlib	Thu Jul 22 10:26:48 2004
@@ -2,7 +2,9 @@
 # $Id: errorlib.in,v 1.28.2.1 2003/06/06 08:37:36 cjwatson Exp $
 
 sub F_SETLK { 6; } sub F_WRLCK{ 1; }
+#sub F_SETLK { 8; } sub F_WRLCK{ 3; } # FreeBSD
 $flockstruct= 'sslll'; # And there ought to be something for this too.
+#$flockstruct= 'lllliss'; # FreeBSD 
 
 sub get_hashname {
     return "" if ( $_[ 0 ] < 0 );
@@ -124,7 +126,8 @@
     for (;;) {
         $evalstring= "
             open(FLOCK${flockpushno},\"> \$lockfile\") || die \"open: \$!\";
-            \$flockwant= pack(\$flockstruct,&F_WRLCK,0,0,1,0);".
+	    #\$flockwant= pack($flockstruct,0,0,0,1,0,&F_WRLCK,0);". # FreeBSD
+            \$flockwant= pack(\$flockstruct,&F_WRLCK,0,0,1,0);".  
                 ($] >= 5.000 ? "
             fcntl(FLOCK$flockpushno,&F_SETLK,\$flockwant) || die \"setlk: \$!\";" : "
             \$z= syscall(&SYS_fcntl,fileno(FLOCK$flockpushno),&F_SETLK,\$flockwant) < 0
diff -ruN -X ignore debbugs.orig/html-control debbugs/html-control
--- debbugs.orig/html-control	Fri Jun  6 10:23:00 2003
+++ debbugs/html-control	Thu Jul 22 10:16:11 2004
@@ -85,7 +85,7 @@
 runshell("$lib_path/html-install $gWebDir/db <html-data 2>&1",sub { &quit; });
 #runshell("gzip -9 html-data 2>&1",sub { &quit; });
 #runshell("btoa 2>&1 <html-data.gz >>html-data.mail",sub { &quit; });
-#runshell('2>&1 '.join(' ',('/usr/lib/sendmail','-f'."$gMaintainerEmail")).' -oem -oi -t <html-data.mail',
+#runshell('2>&1 '.join(' ',($gMailerBin,'-f'."$gMaintainerEmail")).' -oem -oi -t <html-data.mail',
 #         sub { &quit; });
 
 rename("stamp.html.new","stamp.html") or &quit("install new stamp.html: $!");
diff -ruN -X ignore debbugs.orig/mailsummary debbugs/mailsummary
--- debbugs.orig/mailsummary	Tue Apr 29 01:51:15 2003
+++ debbugs/mailsummary	Thu Jul 22 10:17:05 2004
@@ -59,7 +59,7 @@
 $v= $vdef if $v eq '';
 exit 0 if $v eq '';
 
-open(D, '| '.join(' ',('/usr/lib/sendmail','-f'.$gMaintainerEmail)).' -odq -oem -oi -t') ||
+open(D, '| '.join(' ',($gMailerBin, '-f'.$gMaintainerEmail)).' -odq -oem -oi -t') ||
     die "start sendmail: $!";
 
 print D <<END || die "complete sendmail";
diff -ruN -X ignore debbugs.orig/process debbugs/process
--- debbugs.orig/process	Fri Jun  6 10:37:36 2003
+++ debbugs/process	Thu Jul 22 10:12:43 2004
@@ -999,7 +999,7 @@
 	#print DEBUG "mailing child forked again ok $c<\n";
         if (!$c) { # ie, we are the child process
 	    #print DEBUG "mailing grandchild<\n";
-            exec '/usr/lib/sendmail','-f'."$gMaintainerEmail",'-odq','-oem','-oi',get_addresses(@$recips);
+            exec $gMailerBin,'-f'."$gMaintainerEmail",'-odq','-oem','-oi',get_addresses(@$recips);
 	    #print DEBUG "mailing grandchild exec failed<\n";
             die $!;
 	    #print DEBUG "mailing grandchild died !?<\n";
diff -ruN -X ignore debbugs.orig/service debbugs/service
--- debbugs.orig/service	Thu Jun  5 10:26:59 2003
+++ debbugs/service	Thu Jul 22 10:13:16 2004
@@ -698,7 +698,7 @@
     $c= open(D,"|-");
     defined($c) || &quit("mailing forking for sendmail: $!");
     if (!$c) { # ie, we are the child process
-        exec '/usr/lib/sendmail','-f'."$gMaintainerEmail",'-odb','-oem','-oi',get_addresses(@recips);
+        exec $gMailerBin,'-f'."$gMaintainerEmail",'-odb','-oem','-oi',get_addresses(@recips);
         die $!;
     }
     print(D $message) || &quit("writing to sendmail process: $!");

Reply to: