Bug 166063 - Review Request: perl-HTML-Mason
Review Request: perl-HTML-Mason
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jose Pedro Oliveira
David Lawrence
http://ftp.kspei.com/pub/steve/rpms/p...
:
Depends On: 166059 166065
Blocks: FE-ACCEPT 168227
  Show dependency treegraph
 
Reported: 2005-08-16 10:40 EDT by Steven Pritchard
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-16 16:19:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Sample Mason configuration for the conf.d directory. (2.22 KB, text/plain)
2005-08-24 14:21 EDT, Chris Grau
no flags Details
Update to 1.3101 and requirments cleanup (2.18 KB, patch)
2005-08-26 12:04 EDT, Jose Pedro Oliveira
no flags Details | Diff
Specfile patch: adds documentation, ... (1.59 KB, patch)
2005-09-09 14:31 EDT, Jose Pedro Oliveira
no flags Details | Diff

  None (edit)
Description Steven Pritchard 2005-08-16 10:40:58 EDT
Spec Name or Url: http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason/perl-HTML-Mason.spec
SRPM Name or Url: http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason-1.30-1.src.rpm
Description:
Mason is a powerful Perl-based web site development and delivery
engine. With Mason you can embed Perl code in your HTML and construct
pages from shared, reusable components.  Mason solves the common
problems of site development: caching, debugging, templating,
maintaining development and production sites, and more.
Comment 1 Chris Grau 2005-08-20 16:17:03 EDT
HTML::Mason 1.31 was released today and is available on CPAN.  It contains a
handful of bug fixes.  Might be worth upgrading prior to a review.
Comment 2 Steven Pritchard 2005-08-20 19:31:12 EDT
Will do.
Comment 3 Ralf Corsepius 2005-08-21 01:41:10 EDT
NEEDSWORK:

* nitpicks:
- %check || :, please use "%check".
- sed'ing LD_RUN_PATH, please remove
- setting perl_vendorlib is superfluous with FC >= FC3.

* Arguable/Discussable:
- /var/www/mason and /var/www/comp
I am not sure if these are clever choices. /var/www/mason seems reasonable to
me, but /var/www/comp seems a bit too unspecific to me. However I don't have
strong opinion on this.

* Major issue:
Your /etc/http.d/conf.d/perl-HTML-Mason.conf doesn't work on FC4.
It prevents apache/httpd from startup:

# service http start
Starting httpd:                                            [FAILED]
[Sun Aug 21 07:34:47 2005] [error] Can't load Perl module Apache2 for server
..., exiting..

I am not as much an apache expert to be able to tell what is wrong with it.
AFAIS, it definitely is related to these lines in perl-HTML-Mason.conf, which
would indicate a mod_perl/mod_perl2 incompatiblity issue:
PerlModule Apache2
PerlModule Apache::compat
Comment 4 Chris Grau 2005-08-21 02:00:27 EDT
(In reply to comment #3)
[snip]
> - /var/www/mason and /var/www/comp
> I am not sure if these are clever choices. /var/www/mason seems reasonable to
> me, but /var/www/comp seems a bit too unspecific to me. However I don't have
> strong opinion on this.

My (unrequested) opinion would be to do what conf.d/perl.conf does and leave
every option commented as examples of what could be done.  For example, I use
/var/cache/mason (like mod_proxy) for MasonDataDir and /var/www/mason as
MasonCompRoot.  Also, since libapreq2 is available in extras, an example of
using the apache args method would be nice in addition to the cgi args method.

[snip]
> I am not as much an apache expert to be able to tell what is wrong with it.
> AFAIS, it definitely is related to these lines in perl-HTML-Mason.conf, which
> would indicate a mod_perl/mod_perl2 incompatiblity issue:
> PerlModule Apache2
> PerlModule Apache::compat

Neither of these lines are used with current versions of mod_perl and
HTML::Mason.  A physical Apache2 module was removed in mod_perl 2.0.0rc5, and
Apache::compat isn't needed in HTML::Mason >= 1.30.
Comment 5 Ralf Corsepius 2005-08-21 02:32:57 EDT
(In reply to comment #4)
> (In reply to comment #3)
> [snip]
> My (unrequested) opinion would be to do what conf.d/perl.conf does and leave
> every option commented as examples of what could be done.  For example, I use
> /var/cache/mason (like mod_proxy) for MasonDataDir and /var/www/mason as
> MasonCompRoot.
Agreed, /var/cache/mason seems to be a better choice to me.
Comment 6 Steven Pritchard 2005-08-24 11:03:05 EDT
Sorry, I rushed this one out.  I'll be more careful in the future.

I still haven't tested this well, but httpd will at least start with this:

 http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason-1.31-2.src.rpm
 http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason/perl-HTML-Mason.spec
Comment 7 Steven Pritchard 2005-08-24 11:06:39 EDT
The sample config file definitely still could use some work, so suggestions on
that are welcome.  (I see I missed a couple of things in comment #4.)
Comment 9 Chris Grau 2005-08-24 14:21:03 EDT
Created attachment 118085 [details]
Sample Mason configuration for the conf.d directory.

Here's my stab at a Mason configuration file for Apache 2.0.x.	It's based on
what I've been using in a production environment for some time.

It should be enough to get Mason up and running with basic functionality, and
I've included a pointer to the full list of configuration options.
Comment 10 Jose Pedro Oliveira 2005-08-26 12:04:10 EDT
Created attachment 118164 [details]
Update to 1.3101 and requirments cleanup

Steven,

Could you update HTML::Mason to version 1.3101 and clean the requirements and
build requirements list (patch attached)?

The following requirments are all core perl modules (perl > 5.8.0) [1]
  BuildRequires:  perl(CGI) >= 2.46
  BuildRequires:  perl(File::Spec) >= 0.8
  BuildRequires:  perl(Scalar::Util) >= 1.01
  BuildRequires:  perl(Test)
  BuildRequires:  perl(Test::Builder)
  Requires:	  perl(CGI) >= 2.46
  Requires:	  perl(File::Spec) >= 0.8
  Requires:	  perl(Scalar::Util) >= 1.01

References:
[1] Source: script corelist from perl-Module-CoreList
Comment 11 Steven Pritchard 2005-08-29 16:58:15 EDT
How does this look?

http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason-1.3101-1.src.rpm
http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason/perl-HTML-Mason.spec

%changelog
* Mon Aug 29 2005 Steven Pritchard <steve@kspei.com> 1.3101-1
- Update to 1.3101
- Spec cleanup (jpo)
- Include sample config file from Chris Grau
Comment 12 Jose Pedro Oliveira 2005-09-09 14:31:36 EDT
Created attachment 118655 [details]
Specfile patch: adds documentation, ...

Changelog:
* adds the html documentation pages
* adds the samples
  (the eg/ appliaction brings a new requirement which is filtered)
* changes the mason dir from /var/www/mason/html to /var/www/mason
* changes the "perl Makefile.PL" statement
Comment 13 Ralf Corsepius 2005-09-15 12:58:17 EDT
Do we have consensus on how to continue?

What I can tell: Steve's rpm perl-HTML-Mason-1.3101-1.src.rpm works fine with
rt3 under FC4 ;)

Did anybody test this under FC3?

I'd approve it for FC4 and FC5, if we have consensus on the mason dirs 
(FWIW: Debian seems to use /var/cache/mason).
Comment 14 Steven Pritchard 2005-09-15 14:12:09 EDT
+# Requires: filter perl(MasonX::Request::PlusApacheSession)
+cat <<__EOF__ > %{name}-perlreq
+#!/bin/sh
+/usr/lib/rpm/perl.req \$* | grep -v 'perl(MasonX::Request::PlusApacheSession)'
+__EOF__
+%define __perl_requires %{_builddir}/HTML-Mason-%{version}/%{name}-perlreq
+chmod +x %{__perl_requires}

Is this really necessary?  I don't see this dependency.

-echo '!' | %{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__perl} Makefile.PL INSTALLDIRS=vendor

Interesting...  That must have changed since the last build I did by hand.

Fixed.
 
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/mason/html
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/mason

Shouldn't DocumentRoot (/var/www/mason/html) be under MasonCompRoot
(/var/www/mason)?  I see that's not what the config file I'm including does now.
 My old one did...

I'll change it, but I'm still curious.  :-)
 
+%doc htdocs/ eg/ samples/
-%{_localstatedir}/www/mason/
+%dir %{_localstatedir}/www/mason

Done.

http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason-1.3101-2.src.rpm
http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason/perl-HTML-Mason.spec
Comment 15 Chris Grau 2005-09-15 14:24:40 EDT
(In reply to comment #14)
> +# Requires: filter perl(MasonX::Request::PlusApacheSession)
> +cat <<__EOF__ > %{name}-perlreq
> +#!/bin/sh
> +/usr/lib/rpm/perl.req \$* | grep -v 'perl(MasonX::Request::PlusApacheSession)'
> +__EOF__
> +%define __perl_requires %{_builddir}/HTML-Mason-%{version}/%{name}-perlreq
> +chmod +x %{__perl_requires}
> 
> Is this really necessary?  I don't see this dependency.

I seem to recall that perl(MasonX::Request::PlusApacheSession) gets pulled in by
one of the examples.  I had to do something like this with an older custom
package of HTML::Mason.

> -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/mason/html
> +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/mason
> 
> Shouldn't DocumentRoot (/var/www/mason/html) be under MasonCompRoot
> (/var/www/mason)?  I see that's not what the config file I'm including does now.

When I set up a Mason site, I usually use /var/www/html as the document root and
/var/www/mason as the private component root.  YMMV, of course.
Comment 16 Steven Pritchard 2005-09-15 14:31:23 EDT
Yeah, the examples introduce new provides and requires.  I'm fixing that now. 
(I noticed right after I hit "Save Changes".  Oops.)
Comment 17 Steven Pritchard 2005-09-15 14:52:08 EDT
http://ftp.kspei.com/pub/steve/rpms/perl-HTML-Mason-1.3101-3.src.rpm filters out
the bogus requires and provides.
Comment 18 Jose Pedro Oliveira 2005-09-15 14:59:25 EDT
Steven,

Can you replace the perl(mod_perl2) BR and R by mod_perl only?

This way perl-HTML-Mason will work for FC-3 and FC-4. Otherwise it will only
work with FC-4 (perl(mod_perl2) is only provided by mod_perl >= 2.0.0 RC5).

/jpo
Comment 19 Jose Pedro Oliveira 2005-09-15 15:06:55 EDT
Hum!  Please ignore my last comment.  I don't know if it is possible to support
mod_perl 1.99 (judging ny the comments in ApacheHandler.pm).  
Comment 20 Steven Pritchard 2005-09-15 15:11:48 EDT
I'm going to attempt to support FC-3, but I'd rather not worry about it until
after we get this into CVS.  Initially I'll only request builds for FC-4 and devel.
Comment 21 Chris Grau 2005-09-15 15:22:18 EDT
(In reply to comment #20)
> I'm going to attempt to support FC-3, but I'd rather not worry about it until
> after we get this into CVS.  Initially I'll only request builds for FC-4 and
devel.

I'd have to look at the code to be sure, but I think Mason went the same route
as other modules that depend on mod_perl.  Mason won't work with anything before
mod_perl 2.0.0rc5 and thus it won't work on FC-3.

If we really want Mason on FC-3, I think someone should package up 1.28.  Either
that version or one of the 1.29 dev releases supported mod_perl 1.99.
Comment 22 Jose Pedro Oliveira 2005-09-15 15:26:37 EDT
I have nothing further to add. Publish++ (FC-4 and devel)
Comment 23 Ralf Corsepius 2005-09-15 15:50:08 EDT
I am still having doubts on /var/www/mason and therefore don't want to approve
the package (Did anybody consider the FHS?).

As JPO seems to be convinced, I am assigning this package request to him.
Comment 24 Chris Grau 2005-09-15 16:17:22 EDT
(In reply to comment #23)
> I am still having doubts on /var/www/mason and therefore don't want to approve
> the package (Did anybody consider the FHS?).

I think if we were to follow the FHS, the entire www tree would be moved to
/srv.  However, I'm sure that's a flame war that's been faught elsewhere.

The /var/www/mason directory is not without precedent.  Consider, for example,
/var/www/{cgi-bin,error,icons,manual} owned by httpd and httpd-manual.  Also
/var/www/usage owned by webalizer.  Granted, all of these are usually aliased to
public URLs, but I think the real point is to prevent them from interfering with
the document root.

I don't know how others go about this, but my use of /var/www/mason is as a
private component root so that components/pages in the document root can call
them, but they are not accessible through a public URL.
Comment 25 Ralf Corsepius 2005-09-15 22:45:34 EDT
(In reply to comment #24)
> (In reply to comment #23)
> > I am still having doubts on /var/www/mason and therefore don't want to approve
> > the package (Did anybody consider the FHS?).
> 
> I think if we were to follow the FHS, the entire www tree would be moved to
> /srv.  However, I'm sure that's a flame war that's been faught elsewhere.
Yes, but you are aware, that the move to /srv already is taking place, even on
RH based distributions?

> The /var/www/mason directory is not without precedent.  Consider, for example,
> /var/www/{cgi-bin,error,icons,manual} owned by httpd and httpd-manual.  Also
> /var/www/usage owned by webalizer. 

> I don't know how others go about this, but my use of /var/www/mason is as a
> private component root so that components/pages in the document root can call
> them, but they are not accessible through a public URL.
Let me ask differently: Can /var/www/mason be read-only?
Comment 26 Chris Grau 2005-09-16 11:54:53 EDT
(In reply to comment #25)
> (In reply to comment #24)
> > (In reply to comment #23)
> > > I am still having doubts on /var/www/mason and therefore don't want to approve
> > > the package (Did anybody consider the FHS?).
> > 
> > I think if we were to follow the FHS, the entire www tree would be moved to
> > /srv.  However, I'm sure that's a flame war that's been faught elsewhere.
> Yes, but you are aware, that the move to /srv already is taking place, even on
> RH based distributions?

No, I was not aware.  Glad to hear it.  I wonder how long it will take me to get
used to typing /srv instead of /var.

> > The /var/www/mason directory is not without precedent.  Consider, for example,
> > /var/www/{cgi-bin,error,icons,manual} owned by httpd and httpd-manual.  Also
> > /var/www/usage owned by webalizer. 
> 
> > I don't know how others go about this, but my use of /var/www/mason is as a
> > private component root so that components/pages in the document root can call
> > them, but they are not accessible through a public URL.
> Let me ask differently: Can /var/www/mason be read-only?

If, after developing some code and installing it on a production system, the
admin chooses to make /var/www/mason read-only, everything will still work. 
Mason writes its cache files to MasonCacheDir, which we are pushing as
/var/cache/mason in this package.

I hope I understood correctly what you were asking here.
Comment 27 Ville Skyttä 2005-09-16 14:31:52 EDT
Just happened to notice that the summary of this package could be improved 
somewhat, for example: 
 
Summary: Powerful Perl-based web site development and delivery engine 
Comment 28 Steven Pritchard 2005-09-16 16:19:41 EDT
I've updated the summary.
Comment 29 Ralf Corsepius 2005-09-17 01:03:06 EDT
(In reply to comment #26)

> > Let me ask differently: Can /var/www/mason be read-only?
> 
> If, after developing some code and installing it on a production system, the
> admin chooses to make /var/www/mason read-only, everything will still work. 
> Mason writes its cache files to MasonCacheDir, which we are pushing as
> /var/cache/mason in this package.
> 
> I hope I understood correctly what you were asking here.
Yes, this is what I meant, because IMO, it would not be a good idea to have
dynamically changing files under /var/www.
Comment 30 Ralf Corsepius 2005-10-06 12:23:42 EDT
Housekeeping - Package has already been released

Note You need to log in before you can comment on or make changes to this bug.