--- libdbix-password-perl-1.9.orig/debian/control +++ libdbix-password-perl-1.9/debian/control @@ -0,0 +1,22 @@ +Source: libdbix-password-perl +Section: perl +Priority: optional +Maintainer: Debian Perl Group +Uploaders: Peter Pentchev +Build-Depends: debhelper (>= 7.0.50), quilt +Build-Depends-Indep: perl (>= 5.8.2-2) +Standards-Version: 3.8.1 +Homepage: http://search.cpan.org/dist/DBIx-Password/ +Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdbix-password-perl/ +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdbix-password-perl/ + +Package: libdbix-password-perl +Architecture: all +Depends: ${misc:Depends}, ${perl:Depends}, libdbi-perl +Description: Perl module for creating a global password file for DB passwords + Don't you hate keeping track of database passwords and such + throughout your scripts? How about the problem of changing those + passwords on a mass scale? DBIx::Password is one possible solution. + . + It keeps track of all your virtual users, databases, password, etc. in one + central file. --- libdbix-password-perl-1.9.orig/debian/clean +++ libdbix-password-perl-1.9/debian/clean @@ -0,0 +1,2 @@ +.cache +test.pl --- libdbix-password-perl-1.9.orig/debian/README.Debian +++ libdbix-password-perl-1.9/debian/README.Debian @@ -0,0 +1,19 @@ +libdbix-password for Debian +---------------------- + +To set up a virtual user, you have to add it to /etc/dbix-password.conf + +Each line represents a virtual user and the syntax is as follows: + +'v.user':'username':passwd':'port':'dbase:'connect':'driver':'host' + +Your program may also read another config file; see the DBIx::Password +documentation on the clearConfig() and readConfig() functions for +more information. + +IMPORTANT NOTE IF UPGRADING FROM VERSION =< 1.8-4 +------------------------------------------------ + +From version 1.8-5 the syntax of /etc/dbix-password.conf has changed. The 'attr' field has been removed, because when used, it caused DBIx::Password to error. + +If you are upgrading from a version prior to 1.8-5, please edit your config file and remove all the attr. field from the entries. --- libdbix-password-perl-1.9.orig/debian/copyright +++ libdbix-password-perl-1.9/debian/copyright @@ -0,0 +1,65 @@ +Format-Specification: + http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 +Upstream-Maintainer: Brian Aker +Upstream-Source: http://search.cpan.org/dist/DBIx-Password/ +Upstream-Name: DBIx-Password + +Files: * +Copyright: 1999-2000, Brian Aker, brian@tangent.org +License: other + Copyright (c) 1999-2000 Brian Aker. All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + . + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + . + 4. The name "DBIx::Password" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + brian@tangent.org. + . + 5. Products derived from this software may not be called "DBIx::Password". + . + THIS SOFTWARE IS PROVIDED BY BRIAN AKER ``AS IS'' AND ANY + EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRIAN AKER OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: debian/* +Copyright: 2001, Jesus M. Gonzalez-Barahona + 2002, 2003, 2004, 2006, Eric Van Buggenhaut + 2009, Peter Pentchev +License: Artistic | GPL-1+ + +License: Artistic + This program is free software; you can redistribute it and/or modify + it under the terms of the Artistic License, which comes with Perl. + On Debian GNU/Linux systems, the complete text of the Artistic License + can be found in `/usr/share/common-licenses/Artistic' + +License: GPL-1+ + This program 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; either version 1, or (at your option) + any later version. + On Debian GNU/Linux systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL' --- libdbix-password-perl-1.9.orig/debian/watch +++ libdbix-password-perl-1.9/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://search.cpan.org/dist/DBIx-Password/ .*/DBIx-Password-v?(\d[\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ --- libdbix-password-perl-1.9.orig/debian/compat +++ libdbix-password-perl-1.9/debian/compat @@ -0,0 +1 @@ +7 --- libdbix-password-perl-1.9.orig/debian/README.source +++ libdbix-password-perl-1.9/debian/README.source @@ -0,0 +1,4 @@ +This package uses quilt for maintaining patches applied to upstream code. + +See /usr/share/doc/quilt/README.source contained in the `quilt' package for +more information. --- libdbix-password-perl-1.9.orig/debian/changelog +++ libdbix-password-perl-1.9/debian/changelog @@ -0,0 +1,116 @@ +libdbix-password-perl (1.9-1) unstable; urgency=low + + [ Peter Pentchev ] + * Adopt into the Debian Perl Group. Closes: #503531 + * Use quilt for patch management. + * Remove the autogenerated test.pl in the clean target. + * Only depend on debhelper once :) + * Remove the empty prerm, postrm, and preinst scripts. + * Remove the postinst script - its only purpose was to output a warning + on upgrades from versions that are not even in oldstable. + * Bump the debhelper compatibility level to 7: + - add misc:Depends to the binary package + - minimize the rules file, adding debian/clean and debian/install + * Convert the copyright file to the machine-readable format. + * Add a watch file. + * Add the Vcs-Svn and Vcs-Browser control fields. + * Bump Standards-Version to 3.8.1: + - add the README.source file to document the use of quilt + - add the Homepage control field + * New upstream release. + * Allow the module to be loaded even without a config file. + * Break out the config file parsing into separate functions. + * Do not install the useless README file. + + [ gregor herrmann ] + * Remove unneeded debian/dirs. + * Mention module name in debian/control's long description. + + -- Peter Pentchev Sat, 09 May 2009 16:11:31 +0300 + +libdbix-password-perl (1.8-10) unstable; urgency=low + + * Did some clean-up in debian/rules (closes: #395613) + + -- Eric Van Buggenhaut Mon, 30 Oct 2006 01:38:51 +0100 + +libdbix-password-perl (1.8-9) unstable; urgency=low + + * Corrected typo in description (closes: #375852) + + -- Eric Van Buggenhaut Fri, 30 Jun 2006 16:12:29 +0200 + +libdbix-password-perl (1.8-8) unstable; urgency=low + + * Corrected manpage section to 3perl + + -- Eric Van Buggenhaut Mon, 16 Aug 2004 19:57:05 +0200 + +libdbix-password-perl (1.8-7) unstable; urgency=low + + * Build against perl 5.8.2-2 + * Updated Standards-Version + + -- Eric Van Buggenhaut Tue, 30 Dec 2003 00:55:57 +0100 + +libdbix-password-perl (1.8-6) unstable; urgency=high + + * Previous version messed the syntax of /etc/dbix-password.conf and rendered + the package unusable. So priority is high. + + -- Eric Van Buggenhaut Mon, 17 Feb 2003 13:49:45 +0100 + +libdbix-password-perl (1.8-5) unstable; urgency=low + + * Removed attr. field from /etc/dbix-password.conf (closes: #179881) + + -- Eric Van Buggenhaut Thu, 6 Feb 2003 04:08:09 +0100 + +libdbix-password-perl (1.8-4) unstable; urgency=low + + * Corrected typo in the example in dbix-password.conf (closes: #178892) + * Updated maintainer's email address + + -- Eric Van Buggenhaut Fri, 31 Jan 2003 01:56:54 +0100 + +libdbix-password-perl (1.8-3) unstable; urgency=low + + * Suppressed install notes in manpage. + * corrected typo in /etc/dbix-password.conf (closes: #149991) + * Forgot to close this one before (closes: #143635) + + -- Eric Van Buggenhaut Tue, 17 Sep 2002 13:37:25 +0200 + +libdbix-password-perl (1.8-2) unstable; urgency=low + + * Build all package in binary-indep target (closes: #157474) + + -- Eric Van Buggenhaut Wed, 21 Aug 2002 10:12:36 +0200 + +libdbix-password-perl (1.8-1) unstable; urgency=low + + * New upstream release + * Now using INSTALLDIRS=vendor as per Perl Policy 3.3 + + -- Eric Van Buggenhaut Tue, 30 Jul 2002 15:33:39 +0200 + +libdbix-password-perl (1.6-2) unstable; urgency=low + + * Separated the central data from the .pm module. All users, databases, + passwords, etc. are now in /etc/dbix-password.conf and read from within + the module. + * New package entering Debian (closes: #129811) + + -- Eric Van Buggenhaut Wed, 2 Jan 2002 10:55:25 +0100 + +libdbix-password-perl (1.6-1) unstable; urgency=low + + * Initial Release. + * Added some info to README.Debian, explaining how to add a virtual user. + * Fixed missing dependency on libdbi-perl. Now it is lintian clean. + + -- Jesus M. Gonzalez-Barahona Sat, 17 Mar 2001 13:51:13 +0100 + +Local variables: +mode: debian-changelog +End: --- libdbix-password-perl-1.9.orig/debian/install +++ libdbix-password-perl-1.9/debian/install @@ -0,0 +1 @@ +debian/dbix-password.conf etc --- libdbix-password-perl-1.9.orig/debian/rules +++ libdbix-password-perl-1.9/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make + +%: + dh $@ + +override_dh_auto_configure: $(QUILT_STAMPFN) + dh_auto_configure + +# Do not try to run the test script - it actually attempts to connect +# to databases! +# +override_dh_auto_test: + +# We can't really use "clean: unpatch" here since we're modifying +# the build system (Makefile.PL) and bad things happen if "make clean" +# finds out that Makefile.PL has been modified and tries to re-run +# the original interactive configuration. +# +override_dh_auto_clean: + dh_auto_clean + $(MAKE) -f debian/rules unpatch --- libdbix-password-perl-1.9.orig/debian/dbix-password.conf +++ libdbix-password-perl-1.9/debian/dbix-password.conf @@ -0,0 +1,7 @@ +#Place in this file your databases passwords +# +#Each line represents a virtual user and has the following syntax: +#'v.user':'username':'passwd':'port':'dbase':'connect':'driver':'host' +#(See /usr/share/doc/libdbix-password-perl/README.Debian for syntax) +# +#Lines starting with '#' will be skipped --- libdbix-password-perl-1.9.orig/debian/patches/series +++ libdbix-password-perl-1.9/debian/patches/series @@ -0,0 +1,2 @@ +01-unattended-config.patch +02-config-file.patch --- libdbix-password-perl-1.9.orig/debian/patches/01-unattended-config.patch +++ libdbix-password-perl-1.9/debian/patches/01-unattended-config.patch @@ -0,0 +1,32 @@ +Do not ask any questions during the package configuration. + +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -7,7 +7,8 @@ + my $virtuals = {}; + my $dumped; + +-if (-e '.cache') { ++#if (-e '.cache') { ++if (0) { + print "Oh, I can see that you have run me before, should I reuse these?(y or n)\n"; + my $answer = getLine(); + if($answer eq 'y') { +@@ -24,7 +25,8 @@ + ); + + print "What is the name of the Virtual User?\n"; +-my $virtual = getLine(); ++#my $virtual = getLine(); ++my $virtual; + while ($virtual) { + print "What is the dbi driver? (AKA mysql)\n"; + my $driver = getLine(); +@@ -70,6 +72,7 @@ + } + + sub makeFile { ++ return 0; + open(FILEHANDLE, "Password.pm-orig"); + my @file = ; + close (FILEHANDLE); --- libdbix-password-perl-1.9.orig/debian/patches/02-config-file.patch +++ libdbix-password-perl-1.9/debian/patches/02-config-file.patch @@ -0,0 +1,141 @@ +Add the readConfig($filename) function to read the virtual user data from +a configuration file instead of hard-coding it into the module. +Invoke readConfig('/etc/dbix-password.conf') at module load time so +that all users may benefit from a system-wide config file. +Add the clearConfig() function to start the configuration from scratch. + +--- a/Password.pm ++++ b/Password.pm +@@ -7,6 +7,64 @@ + + my $virtual1 = {}; + ++#We want to end up with such a structure: ++#my $virtual1 = { ++# 'acs' => { ++# 'username' => 'root', ++# 'password' => 'o.r,3', ++# 'port' => '', ++# 'database' => 'acs', ++# 'attributes' => {}, ++# 'connect' => 'DBI:mysql:database=acs;host=localhost', ++# 'driver' => 'mysql', ++# 'host' => 'localhost' ++# }, ++# 'personales' => { ++# 'username' => 'root', ++# 'password' => 'p.E.1', ++# 'port' => '', ++# 'database' => 'acs', ++# 'attributes' => {}, ++# 'connect' => 'DBI:mysql:database=PaginasPersonales;host= ++#localhost', ++# 'driver' => 'mysql', ++# 'host' => 'localhost' ++# }, ++#}; ++ ++sub clearConfig() ++{ ++ $virtual1 = {}; ++ return 1; ++} ++ ++sub readConfig($) ++{ ++ my ($config) = @_; ++ my $f; ++ my @user; ++ ++ return undef unless -r $config; ++ ++ open ($f, $config) || die "Opening config file $config: $!"; ++ ++ my @fields = qw(user username password port database connect driver ++host); ++ ++ while (<$f>) { ++ next if /^(#.*)?$/; #skip comments and blanks ++ @user = m/:?'([^']*)':?/g; ++ foreach (1 .. $#fields) { #write fields ++ $virtual1->{$user[0]}->{$fields[$_]} = $user[$_]; ++ }; ++ $virtual1->{$user[0]}->{attributes} ||= {}; ++ } ++ close $f; ++ return $user[0]; ++} ++ ++#Now let's fill %virtual1 with values ++readConfig('/etc/dbix-password.conf'); + + my %driver_cache; + +@@ -90,15 +148,18 @@ + DBIx::Password::getDriver($user); + DBIx::Password::checkVirtualUser($user); + ++ DBIx::Password::clearConfig(); ++ DBIx::Password::readConfig("$ENV{HOME}/.my.secret.file"); ++ + =head1 DESCRIPTION + + Don't you hate keeping track of database passwords and such throughout + your scripts? How about the problem of changing those passwords +-on a mass scale? This module is one possible solution. When you +-go to build this module it will ask you to create virtual users. ++on a mass scale? This module is one possible solution. It stores all your ++virtual users and data in /etc/dbix-password.conf. + For each user you need to specify the database module to use, +-the database connect string, the username and the password. You +-will be prompted to give a name to this virtual user. ++the database connect string, the username and the password. ++You will have to give a name to this virtual user. + You can add as many as you like. + + I would recommend that if you are only using this with +@@ -125,21 +186,13 @@ + This is a rewrite of the module Tangent::DB that I did + for slashcode. + +-Hope you enjoy it. +- +-=head1 INSTALL ++If your program does not need the system-wide information stored ++in the /etc/dbix-password.conf file, you may use the clearConfig() ++and readConfig() functions to get the data from another source. ++At any time, readConfig() may also be used to merge the data from ++another file into the currently-loaded configuration. + +-Basically: +- +-perl Makefile.PL +- +-make +- +-make test +- +-make install +- +-Be sure to answer the questions as you make the module ++Hope you enjoy it. + + =head1 HOME + +--- a/README ++++ b/README +@@ -14,11 +14,10 @@ + Don't you hate keeping track of database passwords and such + throughout your scripts? How about the problem of changing those + passwords on a mass scale? This module is one possible solution. +- When you go to build this module it will ask you to create +- virtual users. For each user you need to specify the database ++ When you go to build this module it will ask you to create. For each user you need to specify the database + module to use, the database connect string, the username and the +- password. You will be prompted to give a name to this virtual +- user. You can add as many as you like. ++ password. You will have to give a name to this virtual ++ user. All virtual users are stored in /etc/dbix-password.conf + + I would recommend that if you are only using this with web + applications that you change the final permissions on this