Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Set *.html permissions in installhtml. #12053

Closed
p5pRT opened this issue Apr 13, 2012 · 6 comments
Closed

[PATCH] Set *.html permissions in installhtml. #12053

p5pRT opened this issue Apr 13, 2012 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 13, 2012

Migrated from rt.perl.org#112440 (status was 'resolved')

Searchable as RT112440$

@p5pRT
Copy link
Author

p5pRT commented Apr 13, 2012

From @craigberry

Pod​::Html​::pod2html via the installhtml utility, which is invoked by the install.html make target, has not been explicitly setting permissions on the installed HTML files. Leaving the target permissions to chance means that on some systems they are set appropriately and some not based on various site and platform defaults.

"Appropriately" in this case means readable by world/other, so the attached patch sets that explicitly.

This should probably be added to the list at [perl #112014].

The patch will also necessitate a version bump to Pod​::Html.

$ perl -"V"
Summary of my perl5 (revision 5 version 15 subversion 9) configuration​:
  Snapshot of​: 24391d9
  Platform​:
  osname=VMS, osvers=V8.4, archname=VMS_IA64
  uname='VMS alma V8.4 HP rx2600 (1.50GHz/6.0MB)'
  config_args='-"Dusedevel" -"DDEBUGGING" -"Dusevmsdebug" -"Duser_c_flags=/WARN=(ENABLE=ALIGNMENT,INFORMATIONAL=ALL)" -"des"'
  hint=none, useposix=false, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=undef, use64bitall=undef, uselongdouble=undef
  usemymalloc=undef, bincompat5005=undef
  Compiler​:
  cc='CC/DECC', ccflags ='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj /NOANSI_ALIAS/float=ieee/ieee=denorm/NAMES=(SHORTENED)/WARN=(ENABL
E=ALIGNMENT,INFORMATIONAL=ALL)/Define=_USE_STD_STAT=1',
  optimize='/List/Debug/NoOpt',
  cppflags='undef'
  ccversion='70390020', gccversion='', gccosandvers='undef'
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='Link/nodebug', ldflags ='/Debug/Trace/Map'
  libpth=/sys$share /sys$library
  libs=
  perllibs=
  libc=(DECCRTL), so=exe, useshrplib=true, libperl=undef
  gnulibc_version='undef'
  Dynamic Linking​:
  dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags=''
  cccdlflags='', lddlflags='/Share'

Characteristics of this PERLSHR image​:
  Compile-time options​: DEBUGGING HAS_TIMES HAVE_INTERP_INTERN PERLIO_LAYERS
  PERL_DONT_CREATE_GVSV PERL_EXTERNAL_GLOB
  PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_IEEE
  USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
  USE_PERL_ATOF VMS_DO_SOCKETS
  VMS_SHORTEN_LONG_SYMBOLS
  Built under VMS
  Compiled at Apr 9 2012 08​:07​:07
  %ENV​:
  PERLSHR="PERL_ROOT​:[000000]PERLSHR.EXE"
  PERL_ROOT="DSA0​:[CRAIG.BLEAD_ROOT.]"
  @​INC​:
  /perl_root/lib/site_perl/VMS_IA64
  /perl_root/lib/site_perl
  /perl_root/lib/VMS_IA64/5_15_9
  /perl_root/lib
  .

________________________________________
Craig A. Berry
mailto​:craigberry@​mac.com

"... getting out of a sonnet is much more
difficult than getting in."
  Brad Leithauser

@p5pRT
Copy link
Author

p5pRT commented Apr 13, 2012

From @craigberry

0001-Set-.html-permissions-in-installhtml.patch
From 4d96b7de00193003898c3d6e487c330abf142874 Mon Sep 17 00:00:00 2001
From: "Craig A. Berry" <craigberry@mac.com>
Date: Fri, 13 Apr 2012 12:42:10 -0500
Subject: [PATCH] Set *.html permissions in installhtml.

Pod::Html::pod2html via the installhtml utility, which is invoked
by the install.html make target, had not been explicitly setting
permissions on the installed HTML files.  Leaving the target
permissions to chance meant that on some systems they were set
appropriately and some not based on various site and platform
defaults.

"Appropriately" in this case means readable by world/other, so we
now set that explicitly.
---
 ext/Pod-Html/lib/Pod/Html.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index c16b657..909b5e9 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -433,6 +433,7 @@ HTMLFOOT
     }
     print $fhout $output;
     close $fhout or die "Failed to close $Htmlfile: $!";
+    chmod 0644, $Htmlfile unless $Htmlfile eq '-';
 }
 
 ##############################################################################
-- 
1.7.7.GIT

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2012

From @cpansprout

On Fri Apr 13 11​:43​:18 2012, craigberry wrote​:

Pod​::Html​::pod2html via the installhtml utility, which is invoked by
the install.html make target, has not been explicitly setting
permissions on the installed HTML files. Leaving the target
permissions to chance means that on some systems they are set
appropriately and some not based on various site and platform
defaults.

"Appropriately" in this case means readable by world/other, so the
attached patch sets that explicitly.

This should probably be added to the list at [perl #112014].

The patch will also necessitate a version bump to Pod​::Html.

$ perl -"V"
Summary of my perl5 (revision 5 version 15 subversion 9)
configuration​:
Snapshot of​: 24391d9
Platform​:
osname=VMS, osvers=V8.4, archname=VMS_IA64
uname='VMS alma V8.4 HP rx2600 (1.50GHz/6.0MB)'
config_args='-"Dusedevel" -"DDEBUGGING" -"Dusevmsdebug"
-"Duser_c_flags=/WARN=(ENABLE=ALIGNMENT,INFORMATIONAL=ALL)" -"des"'
hint=none, useposix=false, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=undef, bincompat5005=undef
Compiler​:
cc='CC/DECC', ccflags
='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj
/NOANSI_ALIAS/float=ieee/ieee=denorm/NAMES=(SHORTENED)/WARN=(ENABL
E=ALIGNMENT,INFORMATIONAL=ALL)/Define=_USE_STD_STAT=1',
optimize='/List/Debug/NoOpt',
cppflags='undef'
ccversion='70390020', gccversion='', gccosandvers='undef'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries​:
ld='Link/nodebug', ldflags ='/Debug/Trace/Map'
libpth=/sys$share /sys$library
libs=
perllibs=
libc=(DECCRTL), so=exe, useshrplib=true, libperl=undef
gnulibc_version='undef'
Dynamic Linking​:
dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags='/Share'

Characteristics of this PERLSHR image​:
Compile-time options​: DEBUGGING HAS_TIMES HAVE_INTERP_INTERN
PERLIO_LAYERS
PERL_DONT_CREATE_GVSV PERL_EXTERNAL_GLOB
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_IEEE
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF VMS_DO_SOCKETS
VMS_SHORTEN_LONG_SYMBOLS
Built under VMS
Compiled at Apr 9 2012 08​:07​:07
%ENV​:
PERLSHR="PERL_ROOT​:[000000]PERLSHR.EXE"
PERL_ROOT="DSA0​:[CRAIG.BLEAD_ROOT.]"
@​INC​:
/perl_root/lib/site_perl/VMS_IA64
/perl_root/lib/site_perl
/perl_root/lib/VMS_IA64/5_15_9
/perl_root/lib
.

________________________________________
Craig A. Berry
mailto​:craigberry@​mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser

Ricardo Signes applied this as c960cc8.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2012

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Apr 20, 2012
@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2012

From @cpansprout

On Fri Apr 13 11​:43​:18 2012, craigberry wrote​:

Pod​::Html​::pod2html via the installhtml utility, which is invoked by
the install.html make target, has not been explicitly setting
permissions on the installed HTML files. Leaving the target
permissions to chance means that on some systems they are set
appropriately and some not based on various site and platform
defaults.

"Appropriately" in this case means readable by world/other, so the
attached patch sets that explicitly.

This should probably be added to the list at [perl #112014].

The patch will also necessitate a version bump to Pod​::Html.

$ perl -"V"
Summary of my perl5 (revision 5 version 15 subversion 9)
configuration​:
Snapshot of​: 24391d9
Platform​:
osname=VMS, osvers=V8.4, archname=VMS_IA64
uname='VMS alma V8.4 HP rx2600 (1.50GHz/6.0MB)'
config_args='-"Dusedevel" -"DDEBUGGING" -"Dusevmsdebug"
-"Duser_c_flags=/WARN=(ENABLE=ALIGNMENT,INFORMATIONAL=ALL)" -"des"'
hint=none, useposix=false, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=undef, bincompat5005=undef
Compiler​:
cc='CC/DECC', ccflags
='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj
/NOANSI_ALIAS/float=ieee/ieee=denorm/NAMES=(SHORTENED)/WARN=(ENABL
E=ALIGNMENT,INFORMATIONAL=ALL)/Define=_USE_STD_STAT=1',
optimize='/List/Debug/NoOpt',
cppflags='undef'
ccversion='70390020', gccversion='', gccosandvers='undef'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries​:
ld='Link/nodebug', ldflags ='/Debug/Trace/Map'
libpth=/sys$share /sys$library
libs=
perllibs=
libc=(DECCRTL), so=exe, useshrplib=true, libperl=undef
gnulibc_version='undef'
Dynamic Linking​:
dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags=''
cccdlflags='', lddlflags='/Share'

Characteristics of this PERLSHR image​:
Compile-time options​: DEBUGGING HAS_TIMES HAVE_INTERP_INTERN
PERLIO_LAYERS
PERL_DONT_CREATE_GVSV PERL_EXTERNAL_GLOB
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_IEEE
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF VMS_DO_SOCKETS
VMS_SHORTEN_LONG_SYMBOLS
Built under VMS
Compiled at Apr 9 2012 08​:07​:07
%ENV​:
PERLSHR="PERL_ROOT​:[000000]PERLSHR.EXE"
PERL_ROOT="DSA0​:[CRAIG.BLEAD_ROOT.]"
@​INC​:
/perl_root/lib/site_perl/VMS_IA64
/perl_root/lib/site_perl
/perl_root/lib/VMS_IA64/5_15_9
/perl_root/lib
.

________________________________________
Craig A. Berry
mailto​:craigberry@​mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser

Ricardo Signes applied this as c960cc8.

--

Father Chrysostomos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant