]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Add html/bugs.css
authorDon Armstrong <don@donarmstrong.com>
Wed, 13 Jun 2007 21:28:46 +0000 (22:28 +0100)
committerDon Armstrong <don@donarmstrong.com>
Wed, 13 Jun 2007 21:28:46 +0000 (22:28 +0100)
 * Switch to ExtUtils::MakeMaker for building the perl modules
 * Fix read_log_records import in bugreport.cgi
 * Split the package into three

Debbugs/Config.pm
Makefile
Makefile.PL [new file with mode: 0644]
cgi/bugreport.cgi
debian/changelog
debian/control
debian/rules
html/bugs.css [new file with mode: 0644]

index c9e17dcdeae4c84871485a59f3c645ae4ed359b6..1997cbb9e7412423566fb5e8992dad5075695609 100644 (file)
@@ -88,10 +88,14 @@ use Safe;
 %config = ();
 # untaint $ENV{DEBBUGS_CONFIG_FILE} if it's owned by us
 # This enables us to test things that are -T.
-if (exists $ENV{DEBBUGS_CONFIG_FILE} and
-    ${[stat($ENV{DEBBUGS_CONFIG_FILE})]}[4] = $<) {
-     $ENV{DEBBUGS_CONFIG_FILE} =~ /(.+)/;
-     $ENV{DEBBUGS_CONFIG_FILE} = $1;
+if (exists $ENV{DEBBUGS_CONFIG_FILE}) {
+     if (${[stat($ENV{DEBBUGS_CONFIG_FILE})]}[4] = $<) {
+         $ENV{DEBBUGS_CONFIG_FILE} =~ /(.+)/;
+         $ENV{DEBBUGS_CONFIG_FILE} = $1;
+     }
+     else {
+         die "Environmental variable DEBBUGS_CONFIG_FILE set, and $ENV{DEBBUGS_CONFIG_FILE} is not owned by the user running this script.";
+     }
 }
 read_config(exists $ENV{DEBBUGS_CONFIG_FILE}?$ENV{DEBBUGS_CONFIG_FILE}:'/etc/debbugs/config');
 
index 015ef957ed9824499b231b2f401f92ce86baeee9..4dad84022d0ac0b5829d19fcad034a8093d784cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,10 @@ examples_dir := $(doc_dir)/examples
 scripts_in     := $(filter-out scripts/config.in scripts/errorlib.in scripts/text.in, $(wildcard scripts/*.in))
 htmls_in       := $(wildcard html/*.html.in)
 cgis           := $(wildcard cgi/*.cgi cgi/*.pl)
-perls          := $(foreach name,Log MIME Mail Packages Versions,Debbugs/$(name).pm)
+
+# We use the Makefile.PL to install these; not totally decided if we
+# should switch entirely to this model.
+#perls         := $(shell find Debbugs -type f -iname '*.pm')
 
 install_exec   := install -m755 -p
 install_data   := install -m644 -p
@@ -64,8 +67,10 @@ $(var_dir)/spool/db-h $(scripts_dir) $(perl_dir) $(examples_dir) $(man8_dir); \
        for cgi in $(cgis); do $(install_exec) $$cgi $(var_dir)/www/cgi; done
        $(install_exec) cgi/bugs-fetch2.pl.in $(var_dir)/www/cgi/bugs-fetch2.pl
 
-       # install Perl modules
-       for perl in $(perls); do $(install_data) $$perl $(perl_dir); done
+#      # install Perl modules
+#      for perl in $(perls); do $(install_data) $$perl $(perl_dir); done
+       # Make documentation for the perl modules
+
 
        # install debbugsconfig
        $(install_exec) debian/debbugsconfig $(sbin_dir)
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644 (file)
index 0000000..9ee13de
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use ExtUtils::MakeMaker;
+
+WriteMakefile(FIRST_MAKEFILE => 'Makefile.perl',
+             PMLIBDIRS => ['Debbugs'],
+             NAME => 'Debbugs',
+             VERSION => '2.4.2',
+            );
index 98e474169fa983ac7a4ca04f1633357bfe8b3cf6..64547d40a1eceaeb51daa521002b93113c3f1223 100755 (executable)
@@ -11,7 +11,7 @@ use IO::File;
 use Debbugs::Config qw(:globals :text);
 
 # for read_log_records
-use Debbugs::Log;
+use Debbugs::Log qw(read_log_records);
 use Debbugs::MIME qw(convert_to_utf8 decode_rfc1522 create_mime_message);
 use Debbugs::CGI qw(:url :html :util);
 use Debbugs::Common qw(buglog getmaintainers);
index 68b7cfc20441360565dfa51a30dad2ea230e51d3..9334559a2e7873cb52091f3968808e3134629fbc 100644 (file)
@@ -181,6 +181,8 @@ debbugs (2.4.2) UNRELEASED; urgency=low
       (closes: #428056)
     - Don't doubly select users
     - Implement versioning aware archiving support (closes: #419693)
+    - Split out packages so that you don't have to install the mail stuff
+      unless you want it.
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
index e8591a77e6932ba4c80dfd5d2296d2aa592f015e..b2e5db2ecbd4a5f5f4fc9c4b80da76fdaa7900f0 100644 (file)
@@ -8,8 +8,8 @@ Build-Depends-Indep: debhelper, libparams-validate-perl, libmailtools-perl, libm
 
 Package: debbugs
 Architecture: all
-Depends: perl5 | perl, exim4 | mail-transport-agent, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libparams-validate-perl
-Recommends: apache | httpd, links | lynx
+Depends: ${perl:Depends}, exim4 | mail-transport-agent, libdebbugs-perl
+Recommends: debbugs-web
 Suggests: spamassassin (>= 3.0), libcgi-alert-perl
 Description: The bug tracking system based on the active Debian BTS
  Debian has a bug tracking system which files details of bugs reported by
@@ -21,3 +21,29 @@ Description: The bug tracking system based on the active Debian BTS
  See /usr/share/doc/debbugs/README.Debian after installation.
  .
  Note: there might be various issues with this package, caveat emptor.
+
+Package: libdebbugs-perl
+Architecture: all
+Depends: ${perl:Depends}, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libparams-validate-perl
+Description: modules used by the active Debian BTS
+ Debian has a bug tracking system which files details of bugs reported by
+ users and developers. Each bug is given a number, and is kept on file until
+ it is marked as having been dealt with. The system is mainly controlled by
+ e-mail, but the bug reports can be viewed using the WWW.
+ .
+ This package contains the perl modules used by the bug tracking
+ system, some of which may be suitable for custom scripts which
+ interact with local debbugs mirrors.
+
+Package: debbugs-web
+Architecture: all
+Depends: libdebbugs-perl, apache | httpd
+Suggests: libcgi-alert-perl
+Description: web scripts for the active Debian BTS
+ Debian has a bug tracking system which files details of bugs reported by
+ users and developers. Each bug is given a number, and is kept on file until
+ it is marked as having been dealt with. The system is mainly controlled by
+ e-mail, but the bug reports can be viewed using the WWW.
+ .
+ This package contains the cgi scripts necessary to view bugreports
+ using the web.
index 3b65094c4193555b95a66a55fd6a81e1915ab95c..94639f4def0e5f98df87ab91606f75f83ad30369 100755 (executable)
@@ -6,38 +6,59 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-tmp_dir                := $(CURDIR)/debian/tmp
+DEST_DIR := $(CURDIR)/debian/tmp
+PERL ?= /usr/bin/perl
 
-build:
+
+build: build-stamp
+build-stamp:
 # Call the test suite
+       $(PERL) Makefile.PL INSTALLDIRS=vendor
+       $(MAKE) -f Makefile.perl
        $(MAKE) test
+       touch $@
 
 clean:
        dh_testdir
        dh_testroot
+       rm -f *-stamp;
+       -$(MAKE) -f Makefile.perl clean;
        #something to remove all trace and *.trace files?
-       dh_clean build-stamp
+       dh_clean
+
+install: install-stamp
+install-stamp: build
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+       $(MAKE) install_mostfiles DESTDIR=$(DEST_DIR)
+       $(MAKE) -f Makefile.perl install PREFIX=$(DEST_DIR)/usr
+       touch $@
 
 binary-arch:
 # nothing to do, as there aren't any architecture-dependent packages
 
-binary-indep: build install
+binary-indep:
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs
-       $(MAKE) install_mostfiles DESTDIR=$(tmp_dir)
+       $(MAKE) install_mostfiles DESTDIR=$(DEST_DIR)
+       $(MAKE) -f Makefile.perl install PREFIX=$(DEST_DIR)/usr
+       dh_install --sourcedir=debian/tmp --list-missing
        dh_installdocs
        dh_installchangelogs
        dh_strip
-       dh_compress -X examples/text
        dh_fixperms
        #chown bugs.bugs $(var_dir)/spool/incoming
        dh_installdeb
+       dh_perl
+       dh_compress -X examples/text
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb
 
+
 binary: binary-indep binary-arch
 .PHONY: build clean install binary-indep binary-arch binary
diff --git a/html/bugs.css b/html/bugs.css
new file mode 100644 (file)
index 0000000..ed42581
--- /dev/null
@@ -0,0 +1,184 @@
+html {
+    color: #000; 
+    background: #fefefe;
+    font-family: serif;
+    margin: 1em;
+    border: 0;
+    padding: 0;
+    line-height: 120%;
+}
+
+body {
+    margin: 0;
+    border: 0;
+    padding: 0;
+}
+
+h1, h2, h3 {
+    text-align: left; 
+    font-family: sans-serif;
+}
+
+h1 {
+    font-size: 150%;
+    line-height: 150%;
+}
+
+h2 {
+    font-size: 130%;
+}
+
+h3 {
+    font-size: 100%;
+}
+
+a:link {
+    color: #1b56ce;
+    font-weight: bold;
+}
+
+a:visited {
+    color:#1b56ce;
+}
+
+a:link:active, a:link:visited {
+    color:#ff0000;
+}
+
+a:link:hover, a:visited:hover {
+    color: #d81e1e;
+}
+
+a.submitter:link {
+    color: #242424;
+    font-family: sans-serif;
+    font-size: 95%;
+    text-decoration: underline;
+    font-weight: normal;
+}
+
+a.submitter:visited, a.submitter:active {
+    color: #6e6e6e;
+    font-family: sans-serif;
+    font-size: 95%;
+}
+
+a.submitter:hover, a.submitter:visited:hover {
+    color: #d01414;
+    font-family: sans-serif;
+    font-size: 95%;
+}
+
+pre.message {
+    font-family: monospace;
+    padding-top: 0;
+    margin-top: 0;
+    border-top: 0;
+}
+
+.sparse li {
+    padding-top: 1ex;
+    margin-top: 1ex;
+    border-top: 1ex;
+}
+
+a.bugtitle {
+    font-weight: bold;
+    font-size: 110%;
+}
+
+
+pre.headers {
+    font-family: sans-serif;
+    font-size: 95%;
+    color: #3c3c3c;
+    background-color: #f0f0f0;
+    padding: 2px;
+    border: #a7a7a7 1px solid;
+    line-height: 120%
+}
+
+pre.mime {
+    font-family: monospace;
+    font-size: 95%;
+    color: #797979;
+}
+
+/* This must be separate from the other CSS to make the showing of
+   unimportant messages work in bugreport.cgi. */ 
+.infmessage { display: none; }
+
+.infmessage {
+    font-family: sans-serif;
+    font-size: 90%;
+    color: #686868;
+}
+
+.msgreceived {
+    font-family: sans-serif;
+    font-size: 90%;
+    color: #686868;
+}
+
+pre.tags {
+    color: #a3a3a3;
+    font-size: 90%;
+}
+
+hr.thin {
+    color: #a1a1a1;
+}
+
+em.severity {
+    color: #c31212;
+}
+
+code, address {
+    font-family: sans-serif;
+}
+
+p {
+    font-family: sans-serif;
+    font-size: 95%;
+}
+
+h2.outstanding {
+    font-family: sans-serif;
+    background-color: #f0f0f0;
+    color: #3c3c3c;
+    border: #a7a7a7 1px solid;
+    padding: 10px;
+}
+
+a.options:link, a.options:visited {
+    font-family: sans-serif;
+    background-color: #f0f0f0;
+    color: #3c3c3c;
+    text-decoration: none;
+    border-bottom: #3c3c3c 1px dotted;
+}
+
+li {
+    list-style-type: square;
+}
+
+.bugs li {
+    margin-top: 5px;
+}
+
+input {
+    border: #000 1px solid;
+    margin: 3px;
+}
+
+table.forms {
+    font-size: 95%;
+    font-family: sans-serif;
+    margin-left: 10px;
+}
+
+select {
+    margin: 3px;
+    border: #000 1px solid;
+}
+