# HG changeset patch # User Aleksej Bobylev # Date 1527421256 -10800 # Node ID 87e24d6b90ad23ecc76415d126c833b74d7c6bb6 # Parent a8db78a48611f3b833856a98b921759309f163f5 Up nginx (1.14.0) diff -r a8db78a48611 -r 87e24d6b90ad nginx-extras/receipt --- a/nginx-extras/receipt Sun May 27 13:10:46 2018 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="nginx-extras" -VERSION="1.9.4" -CATEGORY="network" -SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy." -MAINTAINER="pascal.bellard@slitaz.org" -LICENSE="BSD" -SUGGESTED="php perl python" -TARBALL="nginx-$VERSION.tar.gz" -WEB_SITE="http://nginx.org/" -WGET_URL="${WEB_SITE}download//$TARBALL" -PROVIDE="lighttpd" -CONFIG_FILES="/etc/nginx" -CONFLICT="nginx" - -DEPENDS="pcre openssl zlib libgd geoip libxslt" -BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev libgd-dev geoip-dev libxslt-dev \ -perl-dev" - -# Rules to configure and make the package. -compile_rules() -{ - ./configure \ - --prefix=/usr \ - --conf-path=/etc/nginx/nginx.conf \ - --pid-path=/var/run/nginx.pid \ - --lock-path=/var/lock/nginx.lock \ - --error-log-path=/var/log/nginx/error.log \ - --http-log-path=/var/log/nginx/access.log \ - --http-client-body-temp-path=/var/spool/nginx/body \ - --http-proxy-temp-path=/var/spool/nginx/proxy \ - --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \ - --with-http_ssl_module \ - --with-http_spdy_module \ - --with-http_realip_module \ - --with-http_addition_module \ - --with-http_xslt_module \ - --with-http_image_filter_module \ - --with-http_geoip_module \ - --with-http_sub_module \ - --with-http_dav_module \ - --with-http_flv_module \ - --with-http_mp4_module \ - --with-http_gunzip_module \ - --with-http_gzip_static_module \ - --with-http_auth_request_module \ - --with-http_random_index_module \ - --with-http_secure_link_module \ - --with-http_degradation_module \ - --with-http_stub_status_module \ - --with-mail \ - --with-mail_ssl_module \ - --with-stream \ - --with-stream_ssl_module \ - --with-pcre \ - --with-pcre-jit \ - --with-http_perl_module \ - --user=80 --group=80 && - make && - make DESTDIR=$DESTDIR install - - # not yet available - perftools dep lib - #--with-google_perftools_module \ -} - -# Rules to gen a SliTaz package suitable for Tazpkg. -# On SliTaz Lighttpd runs as user/group : www/www or 80/80. -genpkg_rules() -{ - cp -a $install/* $fs/ - rm -rf $fs/usr/html - cp -a stuff/* $fs - sed -i 's/#user nobody;/user www;/' $fs/etc/nginx/nginx.conf -} - -# Pre and post install commands for Tazpkg. -# We stop the server by default in case of upgarde. -pre_install() -{ - [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop - # Backup config file. - if [ -d "$1/$CONFIG_FILES" ]; then - cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak" - fi -} - -post_install() -{ - mkdir -p /var/spool/nginx - - # Restore original config. - if [ -d "$1/$CONFIG_FILES.bak" ]; then - rm -rf "$1/$CONFIG_FILES" - mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES" - fi - - # Just in case. - chown www.www "$1/var/log/$PACKAGE" - if [ -z "$1" ]; then - for i in apache lighttpd; do - [ -f /etc/init.d/$i ] && /etc/init.d/$i stop - done - /etc/init.d/$PACKAGE start - fi - - : -} diff -r a8db78a48611 -r 87e24d6b90ad nginx-extras/stuff/etc/init.d/nginx --- a/nginx-extras/stuff/etc/init.d/nginx Sun May 27 13:10:46 2018 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -#!/bin/sh -# /etc/init.d/nginx: Start, stop and restart web server on SliTaz, -# at boot time or with the command line. Daemons options are configured -# with /etc/daemons.conf -# -. /etc/init.d/rc.functions -. /etc/daemons.conf - -NAME=Nginx -DESC="$(_ 'web server')" -DAEMON=/usr/sbin/nginx -OPTIONS=$NGINX_OPTIONS -PIDFILE=/var/run/nginx.pid - -case "$1" in - start) - if active_pidfile $PIDFILE nginx ; then - _ '%s is already running.' $NAME - exit 1 - fi - action 'Starting %s: %s...' "$DESC" $NAME - $DAEMON $OPTIONS - status - ;; - stop) - if ! active_pidfile $PIDFILE nginx ; then - _ '%s is not running.' $NAME - exit 1 - fi - action 'Stopping %s: %s...' "$DESC" $NAME - kill $(cat $PIDFILE) - rm $PIDFILE - status - ;; - restart) - if ! active_pidfile $PIDFILE nginx ; then - _ '%s is not running.' $NAME - exit 1 - fi - action 'Restarting %s: %s...' "$DESC" $NAME - kill $(cat $PIDFILE) - rm $PIDFILE - sleep 2 - $DAEMON $OPTIONS - status - ;; - *) - emsg "$(_ 'Usage:') $0 [start|stop|restart]" - newline - exit 1 - ;; -esac - -exit 0 diff -r a8db78a48611 -r 87e24d6b90ad nginx/receipt --- a/nginx/receipt Sun May 27 13:10:46 2018 +0300 +++ b/nginx/receipt Sun May 27 14:40:56 2018 +0300 @@ -1,40 +1,56 @@ -# SliTaz package receipt. +# SliTaz package receipt v2. PACKAGE="nginx" -VERSION="1.9.4" +VERSION="1.14.0" CATEGORY="network" -SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy." +SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy" MAINTAINER="pascal.bellard@slitaz.org" LICENSE="BSD" -SUGGESTED="php perl python" +WEB_SITE="https://nginx.org/" + TARBALL="$PACKAGE-$VERSION.tar.gz" -WEB_SITE="http://nginx.org/" -WGET_URL="${WEB_SITE}download//$TARBALL" -PROVIDE="lighttpd" -CONFIG_FILES="/etc/nginx" +WGET_URL="https://nginx.org/download/$TARBALL" -DEPENDS="pcre openssl zlib" -BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev" +BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev libgd-dev geoip-dev libxslt-dev \ +perl-dev" +SPLIT="nginx-extras:extras" -# Rules to configure and make the package. -compile_rules() -{ -# --with-rtsig_module enable rtsig module -# --with-select_module enable select module -# --with-poll_module enable poll module -# --with-ipv6 enable ipv6 support -# --with-http_realip_module enable ngx_http_realip_module -# --with-http_addition_module enable ngx_http_addition_module -# --with-http_xslt_module enable ngx_http_xslt_module -# --with-http_image_filter_module enable ngx_http_image_filter_module -# --with-http_geoip_module enable ngx_http_geoip_module -# --with-http_sub_module enable ngx_http_sub_module -# --with-http_random_index_module enable ngx_http_random_index_module -# --with-http_secure_link_module enable ngx_http_secure_link_module -# --with-http_perl_module enable ngx_http_perl_module -# --with-google_perftools_module enable ngx_google_perftools_module +compile_rules() { + case $SET in + '') SET_ARGS="";; + extras) + SET_ARGS="\ + --with-http_ssl_module \ + --with-http_v2_module \ + --with-http_realip_module \ + --with-http_addition_module \ + --with-http_xslt_module \ + --with-http_image_filter_module \ + --with-http_geoip_module \ + --with-http_sub_module \ + --with-http_mp4_module \ + --with-http_gunzip_module \ + --with-http_gzip_static_module \ + --with-http_auth_request_module \ + --with-http_random_index_module \ + --with-http_secure_link_module \ + --with-http_degradation_module \ + --with-http_slice_module \ + --with-http_stub_status_module \ + --with-stream \ + --with-stream_ssl_module \ + --with-stream_realip_module \ + --with-stream_geoip_module \ + --with-stream_ssl_preread_module \ + --with-pcre \ + --with-pcre-jit \ + --with-http_perl_module \ + " + ;; + esac - ./configure --prefix=/usr \ + ./configure \ + --prefix=/usr \ --conf-path=/etc/nginx/nginx.conf \ --pid-path=/var/run/nginx.pid \ --lock-path=/var/lock/nginx.lock \ @@ -43,54 +59,65 @@ --http-client-body-temp-path=/var/spool/nginx/body \ --http-proxy-temp-path=/var/spool/nginx/proxy \ --http-fastcgi-temp-path=/var/spool/nginx/fastcgi \ + --user=80 \ + --group=80 \ + \ --with-http_stub_status_module \ --with-http_flv_module \ --with-http_ssl_module \ --with-http_dav_module \ - --with-mail --with-mail_ssl_module \ - --user=80 --group=80 && + --with-mail \ + --with-mail_ssl_module \ + $SET_ARGS && make && - make DESTDIR=$DESTDIR install + make install || return 1 + + sed -i 's/#user nobody;/user www;/' $install/etc/nginx/nginx.conf + install -Dm755 $stuff/nginx $install/etc/init.d/nginx } -# Rules to gen a SliTaz package suitable for Tazpkg. -# On SliTaz Lighttpd runs as user/group : www/www or 80/80. -genpkg_rules() -{ - cp -a $install/* $fs/ - rm -rf $fs/usr/html - cp -a stuff/* $fs - sed -i 's/#user nobody;/user www;/' $fs/etc/nginx/nginx.conf +genpkg_rules() { + copy @std + CONFIG_FILES="/etc/nginx/" + SUGGESTED="php perl python" + case $PACKAGE in + nginx) + DEPENDS="libpcre openssl zlib" + PROVIDE="lighttpd" + ;; + nginx-extras) + CAT="network|with extra modules" + DEPENDS="geoip libgd libpcre libxml2 libxslt openssl perl-core zlib" + PROVIDE="lighttpd nginx" + ;; + esac } -# Pre and post install commands for Tazpkg. -# We stop the server by default in case of upgarde. -pre_install() -{ - [ -z "$1" ] && for i in httpd lighttpd apache cherokee $PACKAGE ; do - [ -f /etc/init.d/$i ] && /etc/init.d/$i stop - done - # Backup config file. - if [ -d "$1/$CONFIG_FILES" ]; then - cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak" +# We stop the server by default in case of upgarde +pre_install() { + [ -z "$1" -a -f /etc/init.d/nginx ] && /etc/init.d/nginx stop + # Backup config file + if [ -d "$1/etc/nginx" ]; then + cp -a "$1/etc/nginx" "$1/etc/nginx.bak" fi } -post_install() -{ - mkdir -p /var/spool/nginx - # Restore original config. - if [ -d "$1/$CONFIG_FILES.bak" ]; then - rm -rf "$1/$CONFIG_FILES" - mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES" +post_install() { + mkdir -p "$1/var/spool/nginx" + + # Restore original config + if [ -d "$1/etc/nginx.bak" ]; then + rm -rf "$1/etc/nginx" + mv "$1/etc/nginx.bak" "$1/etc/nginx" fi - # Just in case. - chown www.www "$1/var/log/$PACKAGE" + + # Just in case + chown www.www "$1/var/log/nginx/" + if [ -z "$1" ]; then - for i in apache lighttpd ; do + for i in apache lighttpd; do [ -f /etc/init.d/$i ] && /etc/init.d/$i stop done - /etc/init.d/$PACKAGE start + /etc/init.d/nginx start fi - true } diff -r a8db78a48611 -r 87e24d6b90ad nginx/stuff/etc/init.d/nginx --- a/nginx/stuff/etc/init.d/nginx Sun May 27 13:10:46 2018 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -#!/bin/sh -# /etc/init.d/nginx: Start, stop and restart web server on SliTaz, -# at boot time or with the command line. Daemons options are configured -# with /etc/daemons.conf -# -. /etc/init.d/rc.functions -. /etc/daemons.conf - -NAME=Nginx -DESC="$(_ 'web server')" -DAEMON=/usr/sbin/nginx -OPTIONS=$NGINX_OPTIONS -PIDFILE=/var/run/nginx.pid - -case "$1" in - start) - if active_pidfile $PIDFILE nginx ; then - _ '%s is already running.' $NAME - exit 1 - fi - action 'Starting %s: %s...' "$DESC" $NAME - $DAEMON $OPTIONS - status - ;; - stop) - if ! active_pidfile $PIDFILE nginx ; then - _ '%s is not running.' $NAME - exit 1 - fi - action 'Stopping %s: %s...' "$DESC" $NAME - kill $(cat $PIDFILE) - rm $PIDFILE - status - ;; - restart) - if ! active_pidfile $PIDFILE nginx ; then - _ '%s is not running.' $NAME - exit 1 - fi - action 'Restarting %s: %s...' "$DESC" $NAME - kill $(cat $PIDFILE) - rm $PIDFILE - sleep 2 - $DAEMON $OPTIONS - status - ;; - *) - emsg "$(_ 'Usage:') $0 [start|stop|restart]" - newline - exit 1 - ;; -esac - -exit 0 diff -r a8db78a48611 -r 87e24d6b90ad nginx/stuff/nginx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nginx/stuff/nginx Sun May 27 14:40:56 2018 +0300 @@ -0,0 +1,54 @@ +#!/bin/sh +# /etc/init.d/nginx: Start, stop and restart web server on SliTaz, +# at boot time or with the command line. Daemons options are configured +# with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=Nginx +DESC="$(_ 'web server')" +DAEMON=/usr/sbin/nginx +OPTIONS=$NGINX_OPTIONS +PIDFILE=/var/run/nginx.pid + +case "$1" in + start) + if active_pidfile $PIDFILE nginx ; then + _ '%s is already running.' $NAME + exit 1 + fi + action 'Starting %s: %s...' "$DESC" $NAME + $DAEMON $OPTIONS + status + ;; + stop) + if ! active_pidfile $PIDFILE nginx ; then + _ '%s is not running.' $NAME + exit 1 + fi + action 'Stopping %s: %s...' "$DESC" $NAME + kill $(cat $PIDFILE) + rm $PIDFILE + status + ;; + restart) + if ! active_pidfile $PIDFILE nginx ; then + _ '%s is not running.' $NAME + exit 1 + fi + action 'Restarting %s: %s...' "$DESC" $NAME + kill $(cat $PIDFILE) + rm $PIDFILE + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + emsg "$(_ 'Usage:') $0 [start|stop|restart]" + newline + exit 1 + ;; +esac + +exit 0