Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 477706

Summary: www-servers/nginx.1.5.2 - build with google pagespeed module
Product: Gentoo Linux Reporter: Volker Schwaberow <volker>
Component: [OLD] ServerAssignee: Tiziano Müller (RETIRED) <dev-zero>
Status: RESOLVED DUPLICATE    
Severity: enhancement Keywords: EBUILD
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: nginx-1.5.2.ebuild

Description Volker Schwaberow 2013-07-22 07:13:42 UTC
Created attachment 353838 [details]
nginx-1.5.2.ebuild

Hello.

I patched the www-servers/nginx-1.4.1-r5.ebuild to include support for Google Pagespeed (https://github.com/pagespeed/ngx_pagespeed). Maybe this support can be included in the next official ebuilds.
Comment 1 Volker Schwaberow 2013-07-22 07:14:56 UTC
Portage 2.1.12.13 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.9.0-gentoo x86_64)
=================================================================
System uname: Linux-3.9.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16357496 total,    842308 free
KiB Swap:   61483964 total,  61483960 free
Timestamp of tree: Sun, 21 Jul 2013 17:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r1, 3.2.5, 3.3.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.2
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo x-volker OSSDL
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ rsync://de-mirror.org/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/volker /var/lib/layman/OSSDL"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt curl cxx dovecot-sasl dri fortran fpm gd gdbm gpm iconv imap ipv6 jpeg mhash mmx modules mudflap multilib ncurses nls nptl openmp pam passenger pcre pdo png postgres rar readline session sharedmem sieve sqlite sqlite3 sse sse2 ssh ssl tcpd tiff unicode xml xmlwriter zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack v
host_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" NGINX_MODULES_HTTP="pagespeed charset dav memcached fastcgi rewrite gzip headers_more access auth_basic passenger gzip_static" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trid
ent vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-23 12:52:32 UTC
Comment on attachment 353838 [details]
nginx-1.5.2.ebuild

Please attach the patch and not the ebuild next time.


--- nginx-1.4.1-r5.ebuild       2013-06-03 21:33:10.691852776 +0200
+++ -   2013-07-23 14:52:10.237043899 +0200
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.4.1-r5.ebuild,v 1.2 2013/06/02 22:48:30 naota Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.5.2.ebuild,v 1.0 2013/07/20 22:48:30 vsc Exp $
 
 EAPI="5"

@@ -17,6 +17,16 @@
 # prevent perl-module from adding automagic perl DEPENDs
 GENTOO_DEPEND_ON_PERL="no"

+# pagespeed (https://github.com/pagespeed/ngx_pagespeed, Apache 2.0 License)
+HTTP_PAGESPEED_MODULE_PV="1.6.29.3-beta"
+HTTP_PAGESPEED_PSOL_PV="1.6.29.3"
+HTTP_PAGESPEED_MODULE_URI="https://github.com/pagespeed/ngx_pagespeed/archive/release-${HTTP_PAGESPEED_MODULE_PV}.zip"
+HTTP_PAGESPEED_PSOL_URI="https://dl.google.com/dl/page-speed/psol/${HTTP_PAGESPEED_PSOL_PV}.tar.gz"
+HTTP_PAGESPEED_MODULE_P="release-${HTTP_PAGESPEED_MODULE_PV}"
+HTTP_PAGESPEED_PSOL_P="${HTTP_PAGESPEED_PSOL_PV}"
+HTTP_PAGESPEED_MODULE_WD="${WORKDIR}/ngx_pagespeed-release-${HTTP_PAGESPEED_MODULE_PV}"
+HTTP_PAGESPEED_PSOL_WD="${WORKDIR}/psol"
+
 # syslog
 SYSLOG_MODULE_PV="0.25"
 SYSLOG_MODULE_NGINX_PV="1.3.14"
@@ -115,6 +125,8 @@
 SRC_URI="http://nginx.org/download/${P}.tar.gz
        syslog? ( ${SYSLOG_MODULE_URI} -> ${SYSLOG_MODULE_P}.tar.gz )
        ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz
+       nginx_modules_http_pagespeed? ( ${HTTP_PAGESPEED_MODULE_URI} -> ${HTTP_PAGESPEED_MODULE_P}.zip
+                                       ${HTTP_PAGESPEED_PSOL_URI} -> ${HTTP_PAGESPEED_PSOL_P}.tar.gz )
        nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
        nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
        nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} -> ${HTTP_PUSH_MODULE_P}.tar.gz )
@@ -144,6 +156,7 @@
        http_headers_more
        http_push
        http_cache_purge
+       http_pagespeed
        http_slowfs_cache
        http_fancyindex
        http_lua
@@ -242,6 +255,10 @@
                epatch "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.2.6+.patch
        fi

+       if use nginx_modules_http_pagespeed; then
+               mv  ${HTTP_PAGESPEED_PSOL_WD} ${HTTP_PAGESPEED_MODULE_WD}
+       fi
+       
        find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
        # We have config protection, don't rename etc files
        sed -i 's:.default::' auto/install || die
@@ -353,6 +370,11 @@
                myconf+=" --add-module=${HTTP_DAV_EXT_MODULE_WD}"
        fi

+       if use nginx_modules_http_pagespeed ; then
+               http_enabled=1
+               myconf+=" --add-module=${HTTP_PAGESPEED_MODULE_WD}"
+       fi
+       
        if use http || use http-cache; then
                http_enabled=1
        fi
Comment 3 Johan Bergström 2013-08-07 04:01:12 UTC
Hi,
thanks for your report.

This is actually a dupe of #471106. As you can see by the discussion over there, the real hurdle is building PSOL. If you manage to get that building from source, I'd be keen to get this in.

*** This bug has been marked as a duplicate of bug 471106 ***