File: non-interactive-path-for-rsync.patch

package info (click to toggle)
libfile-rsync-perl 0.43-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 160 kB
  • ctags: 15
  • sloc: perl: 550; makefile: 7
file content (72 lines) | stat: -rw-r--r-- 2,302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Description: Non interactive path for rsync
Author: Ivan Kohler <ivan@debian.org>
Forwarded: not-needed
Reviewed-By: Xavier Guimard <x.guimard@free.fr>
Last-Update: 2012-12-25

--- a/makepm.PL
+++ b/makepm.PL
@@ -1,32 +1,37 @@
 # makepm.PL -- Builds Rsync.pm from Rsync.in.  -*- perl -*-
-sub find_rsync {
-   my @dirs = map { s/^$/./; $_ } split (':', $ENV{PATH});
-   push (@dirs, qw(/usr/local/bin /usr/bin /opt/bin));
-   for my $dir (@dirs) {
-      next unless -d $dir;
-      next unless -x "$dir/rsync";
-      return "$dir/rsync";
-   }
-}
-$|=1;
-$RSYNC=&find_rsync;
-print <<'EOT';
 
-File::Rsync needs to know the path to the rsync binary.  This path is encoded
-in the installed module as the default path to rsync (it can be overridden
-at runtime).  Please enter the full path to the rsync program or just hit
-Enter if the guess is correct.  (If you always want the module to depend on
-the $PATH environment variable at runtime, just set the path to 'rsync'
-(this is not recommended)).
+#sub find_rsync {
+#   my @dirs = map { s/^$/./; $_ } split (':', $ENV{PATH});
+#   push (@dirs, qw(/usr/local/bin /usr/bin /opt/bin));
+#   for my $dir (@dirs) {
+#      next unless -d $dir;
+#      next unless -x "$dir/rsync";
+#      return "$dir/rsync";
+#   }
+#}
+#$|=1;
+#$RSYNC=&find_rsync;
+#print <<'EOT';
+#
+#File::Rsync needs to know the path to the rsync binary.  This path is encoded
+#in the installed module as the default path to rsync (it can be overridden
+#at runtime).  Please enter the full path to the rsync program or just hit
+#Enter if the guess is correct.  (If you always want the module to depend on
+#the $PATH environment variable at runtime, just set the path to 'rsync'
+#(this is not recommended)).
+#
+#EOT
+#$RSYNC||='/usr/local/bin/rsync';
+#print "Path to rsync [$RSYNC]: ";
+#my $ans=<STDIN>;
+#chomp $ans;
+#$RSYNC=$ans || $RSYNC;
+#$RSYNC=~s/\\/\\\\/g;
+#$RSYNC=~s/\'/\\\'/g;
+
+#hardcode for non-interactive build
+$RSYNC = '/usr/bin/rsync';
 
-EOT
-$RSYNC||='/usr/local/bin/rsync';
-print "Path to rsync [$RSYNC]: ";
-my $ans=<STDIN>;
-chomp $ans;
-$RSYNC=$ans || $RSYNC;
-$RSYNC=~s/\\/\\\\/g;
-$RSYNC=~s/\'/\\\'/g;
 open IN,'config.in' or die "Cannot read config.in: $!\n";
 open OUT,'>config.pm' or die "Cannot write config.pm: $!\n";
 while (<IN>) {