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

Re: RFS: libfilesys-smbclient-perl

Amit Shah dijo [Fri, Oct 31, 2003 at 07:42:05PM +0530]:
> Hi Gunnar,
> On Friday 31 Oct 2003 19:12, Gunnar Wolf wrote:
> > Leave the original file as the .orig.tar.gz, dpkg-buildpackage takes
> > care of it. Just unpack it, rename the directory and work in there.
> Just uploaded changed package.
> links:
> http://mentors.debian.net/debian/dists/unstable/main/binary-i386/libfilesys-smbclient-perl/

Ok... the package as you uploaded it would miserably FTBFS - Instead
of modifying Makefile.PL for correctness (which is always good, I
agree), you should modify it to be buildable non-interactively -
Instead of what you did to the Makefile.PL, I would first recognize
that Debian establishes where some things are and thus:

@@ -6,14 +6,10 @@
 ($^O =~ m/AIX/i) ? ($ccfl = '-qcpluscmt') : ($ccfl = '');
 # path libsmbclient.h
-my $include = try_to_find("libsmbclient.h");
-$include = prompt("Where can I find libsmbclient.h?", $include) unless $include;
-warn_user("$include/libsmbclient.h") if (!-r
+my $include = '/usr/include';
 # path libsmbclient.so
-my $lib = try_to_find("libsmbclient.so");
-$lib = prompt("Where can I find libsmbclient.so?", $lib) unless $lib;
-warn_user("libsmbclient.so") if (!-r "$lib/libsmbclient.so");
+my $lib = '/usr/lib';

And then, we cannot rely on having a user with a controlling terminal
- The package must be autobuildable. It is very good to be able to
perform comprehensive tests involving connectivity, but you should not
prompt for them in the build process... So you should remove the block 
starting with '# tests demande ?' as well.

Finally, on your last question (the '# Trace for debug' block): You
should handle this non-interactively as well. You can control it using
a shell variable (I would suggest using DH_VERBOSE, as you only
specify it when playing with a stubborn package). This is a useful
feature, and you should keep it, but in order for it to build
non-interactively, I did:

@@ -11,27 +11,6 @@
 # path libsmbclient.so
 my $lib = '/usr/lib';
-# tests demande ?
-my $ans = 
-  prompt("Do you want make tests? (You will be prompted for server /
-          "workgroup / share / user / password to allow read-write
-          "no");
-if ($ans =~ /^y(es)?$/i) 
-  {
-    my $server = prompt("Server:","localhost");
-    my $share = prompt("Share:","homes");
-    my $workgroup = prompt("Workgroup/Domain:","");
-    my $user = prompt("Smb user:",$ENV{'USER'});
-    my $pass = prompt("Smb password:");
-    open(FILE,">.c") || warn "Can't create .c for test: $!\n";
-    print FILE
-    close FILE;
-  }
-# Trace for debug
-$ans = prompt("Compile module with trace to STDERR?", "no");
-if ($ans =~ /^y(es)?$/i) { $define = "-DVERBOSE"; }

...What else?

Please make your
usr/share/doc/libfilesys-smbclient-perl/examples/smb2www.css file
non-executable. I do not know... I am not sure the tests (01base.t,
02tie.t and 03tie_perl56.t) are good examples. They are not written in
a clear style for newcomers, are built to test for specific
functionality and, not to show how to build a program. smb2www-2.cgi
is a great way to show this.


Gunnar Wolf - gwolf@gwolf.cx - (+52-55)5630-9700 ext. 1366
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF

Reply to: