diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/respect_umask.diff')
-rw-r--r-- | meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/respect_umask.diff | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/respect_umask.diff b/meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/respect_umask.diff new file mode 100644 index 0000000000..a84c9f9e3e --- /dev/null +++ b/meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/respect_umask.diff | |||
@@ -0,0 +1,153 @@ | |||
1 | From 0d1ab4f799eb14d5488fcc959f4a6bdec548b370 Mon Sep 17 00:00:00 2001 | ||
2 | From: Brendan O'Dea <bod@debian.org> | ||
3 | Date: Tue, 8 Mar 2005 19:30:38 +1100 | ||
4 | Subject: Respect umask during installation | ||
5 | |||
6 | This is needed to satisfy Debian policy regarding group-writable | ||
7 | site directories. | ||
8 | |||
9 | Patch-Name: fixes/respect_umask.diff | ||
10 | --- | ||
11 | cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 18 +++++++++--------- | ||
12 | dist/ExtUtils-Install/lib/ExtUtils/Install.pm | 18 +++++++++--------- | ||
13 | 2 files changed, 18 insertions(+), 18 deletions(-) | ||
14 | |||
15 | diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | ||
16 | index 6964eea..865d36d 100644 | ||
17 | --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | ||
18 | +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | ||
19 | @@ -2053,7 +2053,7 @@ doc__install : doc_site_install | ||
20 | $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site | ||
21 | |||
22 | pure_perl_install :: all | ||
23 | - $(NOECHO) $(MOD_INSTALL) \ | ||
24 | + $(NOECHO) umask 022; $(MOD_INSTALL) \ | ||
25 | read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \ | ||
26 | write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \ | ||
27 | $(INST_LIB) $(DESTINSTALLPRIVLIB) \ | ||
28 | @@ -2067,7 +2067,7 @@ pure_perl_install :: all | ||
29 | |||
30 | |||
31 | pure_site_install :: all | ||
32 | - $(NOECHO) $(MOD_INSTALL) \ | ||
33 | + $(NOECHO) umask 022; $(MOD_INSTALL) \ | ||
34 | read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \ | ||
35 | write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \ | ||
36 | $(INST_LIB) $(DESTINSTALLSITELIB) \ | ||
37 | @@ -2080,7 +2080,7 @@ pure_site_install :: all | ||
38 | }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{ | ||
39 | |||
40 | pure_vendor_install :: all | ||
41 | - $(NOECHO) $(MOD_INSTALL) \ | ||
42 | + $(NOECHO) umask 022; $(MOD_INSTALL) \ | ||
43 | read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \ | ||
44 | write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \ | ||
45 | $(INST_LIB) $(DESTINSTALLVENDORLIB) \ | ||
46 | @@ -2092,8 +2092,8 @@ pure_vendor_install :: all | ||
47 | |||
48 | doc_perl_install :: all | ||
49 | $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod | ||
50 | - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) | ||
51 | - -$(NOECHO) $(DOC_INSTALL) \ | ||
52 | + -$(NOECHO) umask 022; $(MKPATH) $(DESTINSTALLARCHLIB) | ||
53 | + -$(NOECHO) umask 022; $(DOC_INSTALL) \ | ||
54 | "Module" "$(NAME)" \ | ||
55 | "installed into" "$(INSTALLPRIVLIB)" \ | ||
56 | LINKTYPE "$(LINKTYPE)" \ | ||
57 | @@ -2103,8 +2103,8 @@ doc_perl_install :: all | ||
58 | |||
59 | doc_site_install :: all | ||
60 | $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod | ||
61 | - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) | ||
62 | - -$(NOECHO) $(DOC_INSTALL) \ | ||
63 | + -$(NOECHO) umask 022; $(MKPATH) $(DESTINSTALLARCHLIB) | ||
64 | + -$(NOECHO) umask 022; $(DOC_INSTALL) \ | ||
65 | "Module" "$(NAME)" \ | ||
66 | "installed into" "$(INSTALLSITELIB)" \ | ||
67 | LINKTYPE "$(LINKTYPE)" \ | ||
68 | @@ -2114,8 +2114,8 @@ doc_site_install :: all | ||
69 | |||
70 | doc_vendor_install :: all | ||
71 | $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod | ||
72 | - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) | ||
73 | - -$(NOECHO) $(DOC_INSTALL) \ | ||
74 | + -$(NOECHO) umask 022; $(MKPATH) $(DESTINSTALLARCHLIB) | ||
75 | + -$(NOECHO) umask 022; $(DOC_INSTALL) \ | ||
76 | "Module" "$(NAME)" \ | ||
77 | "installed into" "$(INSTALLVENDORLIB)" \ | ||
78 | LINKTYPE "$(LINKTYPE)" \ | ||
79 | diff --git a/dist/ExtUtils-Install/lib/ExtUtils/Install.pm b/dist/ExtUtils-Install/lib/ExtUtils/Install.pm | ||
80 | index 3b030a5..cb0e9e0 100644 | ||
81 | --- a/dist/ExtUtils-Install/lib/ExtUtils/Install.pm | ||
82 | +++ b/dist/ExtUtils-Install/lib/ExtUtils/Install.pm | ||
83 | @@ -468,7 +468,7 @@ sub _can_write_dir { | ||
84 | |||
85 | =pod | ||
86 | |||
87 | -=item _mkpath($dir,$show,$mode,$verbose,$dry_run) | ||
88 | +=item _mkpath($dir,$show,$verbose,$dry_run) | ||
89 | |||
90 | Wrapper around File::Path::mkpath() to handle errors. | ||
91 | |||
92 | @@ -485,13 +485,13 @@ writable. | ||
93 | =cut | ||
94 | |||
95 | sub _mkpath { | ||
96 | - my ($dir,$show,$mode,$verbose,$dry_run)=@_; | ||
97 | + my ($dir,$show,$verbose,$dry_run)=@_; | ||
98 | if ( $verbose && $verbose > 1 && ! -d $dir) { | ||
99 | $show= 1; | ||
100 | - printf "mkpath(%s,%d,%#o)\n", $dir, $show, $mode; | ||
101 | + printf "mkpath(%s,%d)\n", $dir, $show; | ||
102 | } | ||
103 | if (!$dry_run) { | ||
104 | - if ( ! eval { File::Path::mkpath($dir,$show,$mode); 1 } ) { | ||
105 | + if ( ! eval { File::Path::mkpath($dir,$show); 1 } ) { | ||
106 | _choke("Can't create '$dir'","$@"); | ||
107 | } | ||
108 | |||
109 | @@ -796,7 +796,7 @@ sub install { #XXX OS-SPECIFIC | ||
110 | _chdir($cwd); | ||
111 | } | ||
112 | foreach my $targetdir (sort keys %check_dirs) { | ||
113 | - _mkpath( $targetdir, 0, 0755, $verbose, $dry_run ); | ||
114 | + _mkpath( $targetdir, 0, $verbose, $dry_run ); | ||
115 | } | ||
116 | foreach my $found (@found_files) { | ||
117 | my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime, | ||
118 | @@ -810,7 +810,7 @@ sub install { #XXX OS-SPECIFIC | ||
119 | $targetfile= _unlink_or_rename( $targetfile, 'tryhard', 'install' ) | ||
120 | unless $dry_run; | ||
121 | } elsif ( ! -d $targetdir ) { | ||
122 | - _mkpath( $targetdir, 0, 0755, $verbose, $dry_run ); | ||
123 | + _mkpath( $targetdir, 0, $verbose, $dry_run ); | ||
124 | } | ||
125 | print "Installing $targetfile\n"; | ||
126 | |||
127 | @@ -850,7 +850,7 @@ sub install { #XXX OS-SPECIFIC | ||
128 | |||
129 | if ($pack{'write'}) { | ||
130 | $dir = install_rooted_dir(dirname($pack{'write'})); | ||
131 | - _mkpath( $dir, 0, 0755, $verbose, $dry_run ); | ||
132 | + _mkpath( $dir, 0, $verbose, $dry_run ); | ||
133 | print "Writing $pack{'write'}\n" if $verbose; | ||
134 | $packlist->write(install_rooted_file($pack{'write'})) unless $dry_run; | ||
135 | } | ||
136 | @@ -1190,7 +1190,7 @@ be prepended as a directory to each installed file (and directory). | ||
137 | sub pm_to_blib { | ||
138 | my($fromto,$autodir,$pm_filter) = @_; | ||
139 | |||
140 | - _mkpath($autodir,0,0755); | ||
141 | + _mkpath($autodir,0); | ||
142 | while(my($from, $to) = each %$fromto) { | ||
143 | if( -f $to && -s $from == -s $to && -M $to < -M $from ) { | ||
144 | print "Skip $to (unchanged)\n"; | ||
145 | @@ -1213,7 +1213,7 @@ sub pm_to_blib { | ||
146 | # we wont try hard here. its too likely to mess things up. | ||
147 | forceunlink($to); | ||
148 | } else { | ||
149 | - _mkpath(dirname($to),0,0755); | ||
150 | + _mkpath(dirname($to),0); | ||
151 | } | ||
152 | if ($need_filtering) { | ||
153 | run_filter($pm_filter, $from, $to); | ||