r35068 - in /trunk/libdbix-password-perl: ./ debian/ debian/patches/

roam-guest at users.alioth.debian.org roam-guest at users.alioth.debian.org
Sat May 9 10:33:34 UTC 2009


Author: roam-guest
Date: Sat May  9 10:33:29 2009
New Revision: 35068

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35068
Log:
Switch to quilt for patch management:
- extract the patches into debian/patches/*
- add the README.source file

Remove the autogenerated test.pl in the "clean" target so that it
doesn't get into the Debian diff if building twice in a row.

Remove the duplicate dependency on debhelper.

Added:
    trunk/libdbix-password-perl/debian/README.source
    trunk/libdbix-password-perl/debian/patches/
    trunk/libdbix-password-perl/debian/patches/01-unattended-config.patch
    trunk/libdbix-password-perl/debian/patches/02-config-file.patch
    trunk/libdbix-password-perl/debian/patches/series
Removed:
    trunk/libdbix-password-perl/test.pl
Modified:
    trunk/libdbix-password-perl/Makefile.PL
    trunk/libdbix-password-perl/Password.pm
    trunk/libdbix-password-perl/README
    trunk/libdbix-password-perl/debian/changelog
    trunk/libdbix-password-perl/debian/control
    trunk/libdbix-password-perl/debian/rules

Modified: trunk/libdbix-password-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/Makefile.PL?rev=35068&op=diff
==============================================================================
--- trunk/libdbix-password-perl/Makefile.PL (original)
+++ trunk/libdbix-password-perl/Makefile.PL Sat May  9 10:33:29 2009
@@ -7,8 +7,7 @@
 my $virtuals = {};
 my $dumped;
 
-#if (-e '.cache') {
-if (0) {
+if (-e '.cache') {
 	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') {
@@ -25,8 +24,7 @@
 );
 
 print "What is the name of the Virtual User?\n";
-#my $virtual  = getLine();
-my $virtual;
+my $virtual  = getLine();
 while ($virtual) {
 	print "What is the dbi driver? (AKA mysql)\n";
 	my $driver  = getLine();
@@ -72,7 +70,6 @@
 }
 
 sub makeFile {
-	return 0;
 	open(FILEHANDLE, "Password.pm-orig"); 
 	my @file = <FILEHANDLE>;
 	close (FILEHANDLE);

Modified: trunk/libdbix-password-perl/Password.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/Password.pm?rev=35068&op=diff
==============================================================================
--- trunk/libdbix-password-perl/Password.pm (original)
+++ trunk/libdbix-password-perl/Password.pm Sat May  9 10:33:29 2009
@@ -5,50 +5,20 @@
 @DBIx::Password::ISA = qw ( DBI::db );
 ($DBIx::Password::VERSION) = ' $Revision: 1.8 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
-my $virtual1 = {};
+my $virtual1 = {
+              'slash' => {
+                           'username' => '',
+                           'password' => '',
+                           'port' => '',
+                           'database' => 'sdf',
+                           'attributes' => {},
+                           'connect' => 'DBI:mysql:database=sdf;host=asf',
+                           'driver' => 'mysql',
+                           'host' => 'asf'
+                         }
+            };
 
-#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'
-#                       },
-#};
 
-#Now let's fill %virtual1 with values
-my $config = "/etc/dbix-password.conf";
-open (IN,$config) || die "I need a config file: $!";
-
-my @fields = qw(user username password port database connect driver
-host);
-
-while (<IN>) {
-	next if /^(#.*)?$/; #skip comments and blanks
-	my @user = m/:?'([^']*)':?/g;
-	foreach (1 .. 7) { #write fields
-		$virtual1->{$user[0]}->{$fields[$_]} = $user[$_];
-	};
-	$virtual1->{$user[0]}->{attributes} ||= {};
-}
-close IN;
- 
 my %driver_cache;
 
 sub connect {
@@ -129,11 +99,11 @@
 
 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. It stores all your
-virtual users and data in /etc/dbix-password.conf.
+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 module to use,
-the database connect string, the username and the password.
-You will have to give a name to this virtual user.
+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.
 
 I would recommend that if you are only using this with
@@ -162,6 +132,20 @@
 
 Hope you enjoy it.
 
+=head1 INSTALL
+
+Basically:
+
+perl Makefile.PL
+
+make
+
+make test
+
+make install
+
+Be sure to answer the questions as you make the module
+
 =head1 HOME
 
 To find out more information look at: http://software.tangent.org/projects.pl?view=DBIxPassword

Modified: trunk/libdbix-password-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/README?rev=35068&op=diff
==============================================================================
--- trunk/libdbix-password-perl/README (original)
+++ trunk/libdbix-password-perl/README Sat May  9 10:33:29 2009
@@ -14,10 +14,11 @@
     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. For each user you need to specify the database
+    When you go to build this module it will ask you to create
+    virtual users. For each user you need to specify the database
     module to use, the database connect string, the username and the
-    password. You will have to give a name to this virtual
-    user. All virtual users are stored in /etc/dbix-password.conf
+    password. You will be prompted 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 web
     applications that you change the final permissions on this

Added: trunk/libdbix-password-perl/debian/README.source
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/debian/README.source?rev=35068&op=file
==============================================================================
--- trunk/libdbix-password-perl/debian/README.source (added)
+++ trunk/libdbix-password-perl/debian/README.source Sat May  9 10:33:29 2009
@@ -1,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.

Modified: trunk/libdbix-password-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/debian/changelog?rev=35068&op=diff
==============================================================================
--- trunk/libdbix-password-perl/debian/changelog (original)
+++ trunk/libdbix-password-perl/debian/changelog Sat May  9 10:33:29 2009
@@ -1,6 +1,9 @@
 libdbix-password-perl (1.8-11) UNRELEASED; urgency=low
 
   * Adopt into the Debian Perl Group.  Closes: #503531
+  * Use quilt for patch management; note this in the README.source file.
+  * Remove the autogenerated test.pl in the clean target.
+  * Only depend on debhelper once :)
 
  -- Peter Pentchev <roam at ringlet.net>  Sat, 09 May 2009 12:54:32 +0300
 

Modified: trunk/libdbix-password-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/debian/control?rev=35068&op=diff
==============================================================================
--- trunk/libdbix-password-perl/debian/control (original)
+++ trunk/libdbix-password-perl/debian/control Sat May  9 10:33:29 2009
@@ -3,8 +3,8 @@
 Priority: optional
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Peter Pentchev <roam at ringlet.net>
-Build-Depends-Indep: debhelper (>= 3), perl (>= 5.8.2-2)
-Build-Depends: debhelper (>= 3)
+Build-Depends: debhelper (>= 3), quilt
+Build-Depends-Indep: perl (>= 5.8.2-2)
 Standards-Version: 3.7.2
 
 Package: libdbix-password-perl

Added: trunk/libdbix-password-perl/debian/patches/01-unattended-config.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/debian/patches/01-unattended-config.patch?rev=35068&op=file
==============================================================================
--- trunk/libdbix-password-perl/debian/patches/01-unattended-config.patch (added)
+++ trunk/libdbix-password-perl/debian/patches/01-unattended-config.patch Sat May  9 10:33:29 2009
@@ -1,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 = <FILEHANDLE>;
+ 	close (FILEHANDLE);

Added: trunk/libdbix-password-perl/debian/patches/02-config-file.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/debian/patches/02-config-file.patch?rev=35068&op=file
==============================================================================
--- trunk/libdbix-password-perl/debian/patches/02-config-file.patch (added)
+++ trunk/libdbix-password-perl/debian/patches/02-config-file.patch Sat May  9 10:33:29 2009
@@ -1,0 +1,121 @@
+Read the virtual user data from a configuration file instead of
+hard-coding it into the module.
+
+--- a/Password.pm
++++ b/Password.pm
+@@ -5,19 +5,49 @@
+ @DBIx::Password::ISA = qw ( DBI::db );
+ ($DBIx::Password::VERSION) = ' $Revision: 1.8 $ ' =~ /\$Revision:\s+([^\s]+)/;
+ 
+-my $virtual1 = {
+-              'slash' => {
+-                           'username' => '',
+-                           'password' => '',
+-                           'port' => '',
+-                           'database' => 'sdf',
+-                           'attributes' => {},
+-                           'connect' => 'DBI:mysql:database=sdf;host=asf',
+-                           'driver' => 'mysql',
+-                           'host' => 'asf'
+-                         }
+-            };
++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'
++#                       },
++#};
++
++#Now let's fill %virtual1 with values
++my $config = "/etc/dbix-password.conf";
++open (IN,$config) || die "I need a config file: $!";
++
++my @fields = qw(user username password port database connect driver
++host);
++
++while (<IN>) {
++	next if /^(#.*)?$/; #skip comments and blanks
++	my @user = m/:?'([^']*)':?/g;
++	foreach (1 .. 7) { #write fields
++		$virtual1->{$user[0]}->{$fields[$_]} = $user[$_];
++	};
++	$virtual1->{$user[0]}->{attributes} ||= {};
++}
++close IN;
+ 
+ my %driver_cache;
+ 
+@@ -99,11 +129,11 @@
+ 
+ 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
+@@ -132,20 +162,6 @@
+ 
+ Hope you enjoy it.
+ 
+-=head1 INSTALL
+-
+-Basically:
+-
+-perl Makefile.PL
+-
+-make
+-
+-make test
+-
+-make install
+-
+-Be sure to answer the questions as you make the module
+-
+ =head1 HOME
+ 
+ To find out more information look at: http://software.tangent.org/projects.pl?view=DBIxPassword
+--- 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

Added: trunk/libdbix-password-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/debian/patches/series?rev=35068&op=file
==============================================================================
--- trunk/libdbix-password-perl/debian/patches/series (added)
+++ trunk/libdbix-password-perl/debian/patches/series Sat May  9 10:33:29 2009
@@ -1,0 +1,2 @@
+01-unattended-config.patch
+02-config-file.patch

Modified: trunk/libdbix-password-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-password-perl/debian/rules?rev=35068&op=diff
==============================================================================
--- trunk/libdbix-password-perl/debian/rules (original)
+++ trunk/libdbix-password-perl/debian/rules Sat May  9 10:33:29 2009
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
+
+include /usr/share/quilt/quilt.make
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -12,7 +14,7 @@
 endif
 
 build: build-stamp
-build-stamp:
+build-stamp:	${QUILT_STAMPFN}
 	dh_testdir
 	$(PERL) Makefile.PL INSTALLDIRS=vendor MAN3EXT=3perl
 	$(MAKE) OPTIMIZE="-02 -g -Wall"
@@ -24,8 +26,9 @@
 	rm -f build-stamp
 	rm -f .cache
 	if [ -e Makefile ]; then $(MAKE) -i distclean; fi
-	rm -rf Makefile
+	rm -rf Makefile test.pl
 	dh_clean
+	$(MAKE) -f debian/rules unpatch
 
 install: build
 	dh_testdir




More information about the Pkg-perl-cvs-commits mailing list