Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344111 - www-apache/mod_pagespeed (new package)
Summary: www-apache/mod_pagespeed (new package)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 13:19 UTC by Milan Nikolic
Modified: 2021-04-15 01:23 UTC (History)
23 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
www-apache/mod_pagespeed-9999.ebuild (mod_pagespeed-9999.ebuild,1.74 KB, text/plain)
2010-11-04 13:20 UTC, Milan Nikolic
Details
80_mod_pagespeed.conf (80_mod_pagespeed.conf,4.55 KB, text/plain)
2010-11-04 13:21 UTC, Milan Nikolic
Details
emerge --info (emerge--info,14.58 KB, text/plain)
2011-04-10 20:47 UTC, Sergio
Details
Modified ebuild (mod_pagespeed-9999-r1.ebuild,1.79 KB, text/plain)
2011-04-18 22:05 UTC, Sergio
Details
Updated configuration file (80_mod_pagespeed.conf,6.76 KB, text/plain)
2011-04-18 22:05 UTC, Sergio
Details
Ebuild for the latest stable mod_pagespeed (mod_pagespeed-1.8.31.5.ebuild,1.73 KB, text/plain)
2014-12-31 19:32 UTC, Philip Ludlam
Details
Ebuild for the very latest mod_pagespeed (mod_pagespeed-9999.ebuild,1.75 KB, text/plain)
2014-12-31 19:34 UTC, Philip Ludlam
Details
Latest 80_mod_pagespeed.conf (80_mod_pagespeed.conf,15.04 KB, text/plain)
2014-12-31 19:36 UTC, Philip Ludlam
Details
mod_pagespeed-1.9.32.3.ebuild (mod_pagespeed-1.9.32.3.ebuild,1.55 KB, text/plain)
2015-03-13 13:07 UTC, Philip Ludlam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Nikolic 2010-11-04 13:19:55 UTC
Google released yesterday an apache module for rewriting web pages to reduce latency and bandwidth. See http://code.google.com/p/modpagespeed/ for details.

Attached is initial ebuild and conf file for apache, I used chromium ebuild as a base for gclient source fetching. There are some bundled libs like libpng, zlib etc. Some libs have README file with changes and some doesn't have any changes but for now I didn't bother with this. 

Reproducible: Always
Comment 1 Milan Nikolic 2010-11-04 13:20:52 UTC
Created attachment 253177 [details]
www-apache/mod_pagespeed-9999.ebuild
Comment 2 Milan Nikolic 2010-11-04 13:21:14 UTC
Created attachment 253179 [details]
80_mod_pagespeed.conf
Comment 3 Mike Auty (RETIRED) gentoo-dev 2010-11-04 17:56:31 UTC
Thanks very much for the ebuilds!  I've marked them as maintainer wanted, but CCed in a couple of herds that may be interested in taking maintaining this.

If they're not interested, then you might want to investigate project sunrise[1] as a way of getting your ebuild out to more people.

[1] http://www.gentoo.org/proj/en/sunrise/
Comment 4 Shaun Oleson 2011-02-16 19:20:30 UTC
Has anyone shown interest in maintaining this? It would be great to see this become a standard package in portage.
Comment 5 Craig Andrews gentoo-dev 2011-03-04 17:01:05 UTC
Reported the bundled libraries issue at https://code.google.com/p/modpagespeed/issues/detail?id=226
Comment 6 Sergio 2011-04-10 20:45:27 UTC
I was unable to build. The error is immediately after the fetch.
I'm sad, because using gclient manually everything goes fine.

Sergio

PS: I'm completely inexperienced in ebuilds preparation. I can test test test... (amd64).

...
/usr/portage/distfiles/svn-src/mod_pagespeed/src/third_party/apache/httpd/src/os/tpf/TPFExport
A    /usr/portage/distfiles/svn-src/mod_pagespeed/src/third_party/apache/httpd/src/os/.indent.pro
 U   /usr/portage/distfiles/svn-src/mod_pagespeed/src/third_party/apache/httpd/src/os
Checked out revision 1090888.
Syncing projects: 100% (46/46), done.

________ running '/usr/bin/python2.7 src/build/gyp_chromium' in '/usr/portage/distfiles/svn-src/mod_pagespeed'
Updating projects from gyp files...
/bin/sh: ../build/linux/python_arch.sh: Permission denied
Traceback (most recent call last):
  File "src/build/gyp_chromium", line 24, in <module>
    execfile(os.path.join(chrome_src, 'build', 'gyp_chromium'))
  File "src/third_party/chromium/src/build/gyp_chromium", line 129, in <module>
    sys.exit(gyp.main(args))
  File "src/tools/gyp/pylib/gyp/__init__.py", line 445, in main
    options.circular_check)
  File "src/tools/gyp/pylib/gyp/__init__.py", line 84, in Load
    depth, generator_input_info, check, circular_check)
  File "src/tools/gyp/pylib/gyp/input.py", line 2174, in Load
    depth, check)
  File "src/tools/gyp/pylib/gyp/input.py", line 379, in LoadTargetBuildFile
    build_file_path)
  File "src/tools/gyp/pylib/gyp/input.py", line 888, in ProcessVariablesAndConditionsInDict
    variables, build_file, 'variables')
  File "src/tools/gyp/pylib/gyp/input.py", line 940, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, is_late, variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 817, in ProcessConditionsInDict
    variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 895, in ProcessVariablesAndConditionsInDict
    expanded = ExpandVariables(value, is_late, variables, build_file)
  File "src/tools/gyp/pylib/gyp/input.py", line 652, in ExpandVariables
    (contents, p.returncode))
Exception: Call to '../build/linux/python_arch.sh /usr/lib/libpython2.5.so.1.0' returned exit status 126. while trying to load src/build/all.gyp
Error: /usr/bin/python2.7 src/build/gyp_chromium in /usr/portage/distfiles/svn-src/mod_pagespeed returned 1
Comment 7 Sergio 2011-04-10 20:47:23 UTC
Created attachment 269387 [details]
emerge --info

chromium is installed
Comment 8 Sergio 2011-04-18 10:24:06 UTC
I resolved my issue.
My /usr/portage dir is mounted with noexec option, bat the gclient program is located in /usr/portage/distfiles/svn-src/mod_pagespeed/depot_tools.

While in this 'development' state it can be considered as a "personal issue", I feel that my option is valid and that the gclient should execute elsewhere.

Regards,
Sergio
Comment 9 Sergio 2011-04-18 22:03:41 UTC
I tried to write a new version of the ebuild, with three little "improvements" (for me).
1) The execution is completely moved to ${WORKDIR}
2) The configuration file is updated, avoiding some deprecated directive.
3) The directory /var/cache/mod_pagespeed/cache is created.
2) and 3) are simply updates.
It works fine for me (amd64).

The odd gclient/svn fetching is a problem. The source code didn't stay in distfiles.
Should we need a gclient.eclass?

I gave this attempt the arbitrary name mod_pagespeed-9999-r1

Double check everything, this is my very first ebuild exercise.

Regards,
HUjuice
Comment 10 Sergio 2011-04-18 22:05:13 UTC
Created attachment 270439 [details]
Modified ebuild
Comment 11 Sergio 2011-04-18 22:05:53 UTC
Created attachment 270441 [details]
Updated configuration file
Comment 12 georgia_tech_swagger 2012-07-13 01:49:35 UTC
gperf needs to be added as a build dependency.
Comment 13 Sergiy Borodych 2012-12-27 09:09:05 UTC
New version 1.2 appeared
Comment 14 Harold Anderson 2014-08-28 18:35:47 UTC
mod_pagespeed is an important tool, and it should be supported in Gentoo.

The ebuilds that are in the overlays do not work.  However,  I have been able to build mod_pagespeed from source following Google's instructions:

https://developers.google.com/speed/pagespeed/module/build_mod_pagespeed_from_source

The build process is a bit different than the overlay ebuilds, which perhaps explains why the overlays don't work.

I would try to write the ebuild, but when I have done this in the past, the quality has not been up to Gentoo's standard.  So I think a developer should do it.
Comment 15 Philip Ludlam 2014-12-31 19:32:32 UTC
Created attachment 392816 [details]
Ebuild for the latest stable mod_pagespeed
Comment 16 Philip Ludlam 2014-12-31 19:34:08 UTC
Created attachment 392818 [details]
Ebuild for the very latest mod_pagespeed
Comment 17 Philip Ludlam 2014-12-31 19:36:45 UTC
Created attachment 392820 [details]
Latest 80_mod_pagespeed.conf

There's been some changes from upstream since the previous 80_mod_pagespeed.conf was posted. This has been updated to include those.
Comment 18 Philip Ludlam 2014-12-31 19:44:06 UTC
I've been using the mod_pagespeed (via these ebuilds) for the last 6 months on two machines.

mod_pagespeed-1.8.31.5.ebuild (aka Ebuild for the latest stable mod_pagespeed) builds fine on both of them; mod_pagespeed-9999.ebuild (aka Ebuild for the very latest mod_pagespeed) fails to build on one of them :(

I haven't investigated that too much as previous 'stable' releases failed to build and the recommendation was to use the very latest version instead.
Such is life ;)
Comment 19 Jeffrey Crowell 2015-02-27 15:25:14 UTC
Hi,

We're currently linking to this ebuild on our help documentation. I see that it is currently failing on trunk builds, but is the 1.9.32.3 (latest stable) working with this?

Thanks,
Jeff
Comment 20 Philip Ludlam 2015-03-13 13:07:12 UTC
Created attachment 398804 [details]
mod_pagespeed-1.9.32.3.ebuild

I'm using mod_pagespeed-1.9.32.3.ebuild on a couple of servers with success.

I've found that it doesn't compile when using GCC 4.8.3.
It errors with:
  <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]

Normally this would be a warning, but the command line option "-Werror" turns all warnings into errors.
GCC 4.7.3 is fine with this mod_pagespeed ebuild.
Comment 21 Dennis 2015-04-17 05:10:27 UTC
According to this discussion:
https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/VVWGUU47U4o

Quote: "mod_pagespeed doesn't work with FORTIFY_SOURCE"


and according to:
http://gentoo.2317880.n4.nabble.com/Should-we-disable-FORTIFY-SOURCE-for-packages-where-it-is-not-default-td138737.html

one of the following should help resolving the compile error.

-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"


I successfully compiled it with "-U_FORTIFY_SOURCE" on gcc 4.8.4