--- note-1.3.3.orig/debian/rules +++ note-1.3.3/debian/rules @@ -0,0 +1,63 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +include /usr/share/dpatch/dpatch.make +configure: configure-stamp +configure-stamp: patch + dh_testdir + touch configure-stamp + +build: patch-stamp build-stamp + +build-stamp: configure-stamp + dh_testdir + perl Makefile.PL + $(MAKE) + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + if [ -f Makefile ]; then $(MAKE) clean; fi + rm -f Makefile.old + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + #$(MAKE) -f Makefile-debian install DESTDIR=$(CURDIR)/debian/note + $(MAKE) install PREFIX=$(CURDIR)/debian/note/usr \ + SITEPREFIX=$(CURDIR)/debian/note/usr \ + INSTALLSITEMAN3DIR=$(CURDIR)/debian/note/usr/share/man/man3 \ + INSTALLSITELIB=$(CURDIR)/debian/note/usr/share/perl5 + rm -rfv $(CURDIR)/debian/note/usr/lib + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + dh_testdir + dh_testroot + dh_installchangelogs Changelog + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_perl + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: build install + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure unpatch patch --- note-1.3.3.orig/debian/docs +++ note-1.3.3/debian/docs @@ -0,0 +1,2 @@ +README TODO UPGRADE mysql/ bin/stresstest.sh + --- note-1.3.3.orig/debian/examples +++ note-1.3.3/debian/examples @@ -0,0 +1 @@ +config/noterc --- note-1.3.3.orig/debian/copyright +++ note-1.3.3/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Nico Golde +on Fri, 7 Oct 2005 15:57:27 +0200 + +It was downloaded from: http://www.daemon.de/NOTE + +Upstream Author: Thomas Linden + +Copyright: 1999-2004 Thomas Linden + +License: + +This package is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 dated June, 1991. + +This package is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +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 +Free Software Foundation, Inc., 51 Franklin St, 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-2'. + --- note-1.3.3.orig/debian/compat +++ note-1.3.3/debian/compat @@ -0,0 +1 @@ +7 --- note-1.3.3.orig/debian/control +++ note-1.3.3/debian/control @@ -0,0 +1,16 @@ +Source: note +Section: utils +Priority: optional +Maintainer: Alexandre De Dommelin +Build-Depends-Indep: perl, perl-modules +Build-Depends: debhelper (>= 7), dpatch +Standards-Version: 3.8.1 +Homepage: http://www.daemon.de/NOTE + +Package: note +Architecture: all +Depends: ${perl:Depends} +Suggests: libdigest-md5-perl, libdbi-perl, libdbd-mysql-perl, libcrypt-cbc-perl, libcrypt-des-perl, libterm-readline-gnu-perl, libconfig-general-perl +Description: small program managing notes from commandline + This is a small console program similar to knotes, which + allows you to manage notes from commandline. --- note-1.3.3.orig/debian/changelog +++ note-1.3.3/debian/changelog @@ -0,0 +1,94 @@ +note (1.3.3-5) unstable; urgency=low + + * New maintainer (closes: #495597). + * Fix bug in text dbdriver when no text::dbname value (closes: #495578). + + -- Alexandre De Dommelin Fri, 12 Jun 2009 22:47:48 +0200 + +note (1.3.3-4) unstable; urgency=low + + * QA upload + * Patch 02bashism: fix bashism in mysql/install.sh (Closes: #530151) + * debian/copyright: point to versionend GPL file. + * debian/rules: dh_clean -k => dh_prep + * Standards-Vesion 3.8.1 (no change) + + -- Ralf Treinen Thu, 28 May 2009 21:20:09 +0200 + +note (1.3.3-3) unstable; urgency=low + + * QA upload. + * Setting maintainer to QA group as I orphaned this package + + -- Nico Golde Mon, 18 Aug 2008 21:31:01 +0200 + +note (1.3.3-2) unstable; urgency=low + + * Make Homepage a real control field. + * Bump to standards version 3.8.0, no changes needed. + * Bump compat level and debhelper dependency to 7. + * Fix small errors in copyright to make lintian happy. + * Add necessary comments to debian/patches/* files. + * Move debhelper calls to binary-indep rules target as this package + doesn't build any arch dependent data. + + -- Nico Golde Tue, 22 Jul 2008 19:13:38 +0200 + +note (1.3.3-1) unstable; urgency=low + + * New upstream release + - fixed NOTEDB::mysql (and NOTEDB.pm) (Closes: #438175). + + -- Nico Golde Thu, 30 Aug 2007 15:23:52 +0200 + +note (1.3.1-5) unstable; urgency=low + + * Bumped compat level. + * Changed maintainer address. + * Added one additional space to Homepage tag. + + -- Nico Golde Sat, 31 Mar 2007 12:56:00 +0200 + +note (1.3.1-4) unstable; urgency=low + + * Bumped Standards-Version and fixed Build-Depends on dpatch and dephelper. + * Removed some crap from rules. + + -- Nico Golde Mon, 31 Jul 2006 12:13:45 +0200 + +note (1.3.1-3) unstable; urgency=low + + * Fixed insecure tmp-file creation (closes: #337492). + + -- Nico Golde Sat, 5 Nov 2005 12:33:09 +0100 + +note (1.3.1-2) unstable; urgency=low + + * New Maintainer (closes: #329771). + * Fixed manpage (closes: #292875). + * Made a proper copyright file. + * Added homepage tag to control file. + * Removed menu file. + + -- Nico Golde Fri, 7 Oct 2005 15:57:27 +0200 + +note (1.3.1-1) unstable; urgency=low + + * new upstream version (closes: #228050) + * added perl encryption packages to Suggest: (closes: #304969) + * added other optional perl packages to Suggest: + * reword copyright file (closes: #302974) + + -- Radovan GarabĂ­k Fri, 2 Sep 2005 20:30:22 +0200 + +note (1.1.1-2) unstable; urgency=low + + * added Build-Depends + + -- Radovan Garabik Fri, 23 Feb 2001 21:35:53 +0100 + +note (1.1.1-1) unstable; urgency=low + + * Initial Release. + + -- Radovan Garabik Sat, 23 Sep 2000 12:14:24 +0400 --- note-1.3.3.orig/debian/dirs +++ note-1.3.3/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/lib/perl5 --- note-1.3.3.orig/debian/patches/textdbname.dpatch +++ note-1.3.3/debian/patches/textdbname.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## textdbname.dpatch by Alexandre De Dommelin +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix bug when missing text::dbname config value. + +@DPATCH@ +diff -urNad note-1.3.3~/NOTEDB/text.pm note-1.3.3/NOTEDB/text.pm +--- note-1.3.3~/NOTEDB/text.pm 2006-08-29 00:39:53.000000000 +0200 ++++ note-1.3.3/NOTEDB/text.pm 2009-06-12 22:46:39.000000000 +0200 +@@ -32,16 +32,16 @@ + + $self->{NOTEDB} = $param{dbname} || File::Spec->catfile($ENV{HOME}, ".notedb"); + +- if(! -e $param{dbname}) { +- open(TT,">$param{dbname}") or die "Could not create $param{dbname}: $!\n"; ++ if(! -e $self->{NOTEDB}) { ++ open(TT,">$self->{NOTEDB}") or die "Could not create $self->{NOTEDB}: $!\n"; + close (TT); + } +- elsif(! -w $param{dbname}) { +- print "$param{dbname} is not writable!\n"; ++ elsif(! -w $self->{NOTEDB}) { ++ print "$self->{NOTEDB} is not writable!\n"; + exit(1); + } + +- $self->{LOCKFILE} = $param{dbname} . "~LOCK"; ++ $self->{LOCKFILE} = $self->{NOTEDB} . "~LOCK"; + $self->{mtime} = $self->get_stat(); + $self->{unread} = 1; + $self->{data} = {}; --- note-1.3.3.orig/debian/patches/security-fix.dpatch +++ note-1.3.3/debian/patches/security-fix.dpatch @@ -0,0 +1,88 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## security-fix.dpatch by Nico Golde +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: fix insecure temp file creation + +@DPATCH@ +diff -urNad note-1.3.1~/bin/note note-1.3.1/bin/note +--- note-1.3.1~/bin/note 2005-01-12 22:03:03.000000000 +0100 ++++ note-1.3.1/bin/note 2005-11-05 12:32:37.000000000 +0100 +@@ -35,6 +35,8 @@ + use Getopt::Long; + use FileHandle; + use File::Spec; ++use File::Temp qw/tempfile/; ++ + #use Data::Dumper; + + +@@ -673,8 +675,6 @@ + return if $db->lock(); + if ($conf{alwayseditor}) { + $TEMP = &gettemp; +- # security! +- unlink $TEMP; + # let the user edit it... + $editor = &find_editor; + if ($editor) { +@@ -1448,18 +1448,10 @@ + + + sub gettemp { +- my($random, @range); +- @range=('0'..'9','a'..'z','A'..'Z'); +- srand(time||$$); +- for (0..10) { +- $random .= $range[rand(int($#range)+1)]; +- } +- my $tempfile = File::Spec->catfile($conf{tempdirectory}, $USER . $random); +- if (-e $tempfile) { +- # avoid race conditions! +- unlink $tempfile; +- } +- return $tempfile; ++ my ($fh, $filename) = tempfile("note.XXXXXX", DIR => $conf{tempdirectory}, UNLINK => 1) ++ or die "Cannot create temporary file: $!" ; ++ close $fh; ++ return $filename; + } + + +diff -urNad note-1.3.1~/bin/stresstest.sh note-1.3.1/bin/stresstest.sh +--- note-1.3.1~/bin/stresstest.sh 2005-01-12 22:03:03.000000000 +0100 ++++ note-1.3.1/bin/stresstest.sh 2005-11-05 12:32:37.000000000 +0100 +@@ -28,25 +28,27 @@ + stress () + { + FILES="" ++ tmpfile=`tempfile` || { echo "$0: Cannot create temporary file" >&2; exit 1; } ++ trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15 + for file in `ls $1|sort` + do + echo "$1/$file" + if [ -d "$1/$file" ] ; then + stress "$1/$file" + else +- #echo "$1/" > /tmp/$$ +- #echo $file >> /tmp/$$ +- #`cat /tmp/$$ | note -` ++ #echo "$1/" > $tmpfile ++ #echo $file >> $tmpfile ++ #`cat $tmpfile | note -` + FILES="$FILES $file" + fi + done +- echo "$1/" > /tmp/$$ +- echo "$FILES" >> /tmp/$$ ++ echo "$1/" > $tmpfile ++ echo "$FILES" >> $tmpfile + case $FILES in + "") + ;; + *) +- RES=`cat /tmp/$$ | note -` ++ RES=`cat $tmpfile | note -` + ;; + esac + FILES="" --- note-1.3.3.orig/debian/patches/02bashism.dpatch +++ note-1.3.3/debian/patches/02bashism.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02bashism.dpatch by Ralf Treinen +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix bashism + +@DPATCH@ +diff -urNad note-1.3.3~/mysql/install.sh note-1.3.3/mysql/install.sh +--- note-1.3.3~/mysql/install.sh 2006-08-29 00:39:54.000000000 +0200 ++++ note-1.3.3/mysql/install.sh 2009-05-28 21:13:19.000000000 +0200 +@@ -21,7 +21,7 @@ + + case $YESNO in + "y" | "Y") +- if [ $UID != 0 ] ; then ++ if [ $(id -ru) != 0 ] ; then + echo "You should be root for that!" + exit + fi --- note-1.3.3.orig/debian/patches/01manpage.dpatch +++ note-1.3.3/debian/patches/01manpage.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01manpage.dpatch by Nico Golde +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix tag in manpage ;) + +@DPATCH@ +diff -urNad note-1.3.1~/note.pod note-1.3.1/note.pod +--- note-1.3.1~/note.pod 2005-01-12 22:03:06.000000000 +0100 ++++ note-1.3.1/note.pod 2005-10-07 16:03:47.000000000 +0200 +@@ -224,7 +224,7 @@ + is slash), then note will consider it as the topic of this certain + note. For examle: + +- B ++ /TodoList/ + + If you are using topics, no data after the topic is allowed, if there + is any text, note will consider it as a subtopic! Therefore, don't for- --- note-1.3.3.orig/debian/patches/00list +++ note-1.3.3/debian/patches/00list @@ -0,0 +1,4 @@ +security-fix +01manpage +02bashism.dpatch +textdbname.dpatch