nginx: new package

This commit is contained in:
suvari
2019-07-25 20:05:24 +03:00
parent 672ecbe8af
commit 5313d98f6a
19 changed files with 6566 additions and 5406 deletions
+6031 -5404
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
2cf8b014dd0318d3837a2c85c211b6140dfea28c
311efe11e122474e58b15c843572c0582ee49154
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
52304b5860d1c9ea4ab802f34c78dc1a6606a8d3
4ac908534861bfc14ca15c056f01ece2485199ef
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import perlmodules
from pisi.actionsapi import get
NGINX_HOME = '/var/lib/nginx'
NGINX_PID = '/run/nginx.pid'
NGINX_LOCK = '/run/nginx.lock'
NGINX_CONF = '/etc/nginx/nginx.conf'
NGINX_HTML = '/var/www/nginx'
LOG_DIR = '/var/log/nginx'
ERROR_LOG = '%s/error.log' % LOG_DIR
ACCESS_LOG = '%s/access.log' % LOG_DIR
def setup():
autotools.rawConfigure("--user=nginx \
--group=nginx \
--prefix=%(html)s \
--sbin-path=/usr/sbin/nginx \
--conf-path=%(conf)s \
--pid-path=%(pid)s \
--lock-path=%(lock)s \
--error-log-path=%(error)s \
--http-log-path=%(access)s \
--http-client-body-temp-path=%(home)s/client_body \
--http-proxy-temp-path=%(home)s/proxy \
--http-fastcgi-temp-path=%(home)s/fastcgi \
--with-ipv6 \
--with-http_ssl_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_gzip_static_module \
--with-http_stub_status_module \
--with-http_perl_module \
--with-mail \
--with-mail_ssl_module" % {'html': NGINX_HTML, \
'conf': NGINX_CONF, \
'pid': NGINX_PID, \
'lock': NGINX_LOCK, \
'error': ERROR_LOG, \
'access': ACCESS_LOG, \
'home': NGINX_HOME})
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
# For 3rd-party configuration files
pisitools.dodir("/etc/nginx/conf.d")
# Remove empty dir
pisitools.removeDir("/usr/lib/perl5/%s" % get.curPERL())
# Add log dir and touch them :) Nginx needs pre-defined *.log files
pisitools.dodir(LOG_DIR)
shelltools.touch("%s%s" % (get.installDIR(), ERROR_LOG))
shelltools.touch("%s%s" % (get.installDIR(), ACCESS_LOG))
pisitools.dodir(NGINX_HOME + "/client_body")
pisitools.dodir(NGINX_HOME + "/fastcgi")
pisitools.dodir(NGINX_HOME + "/proxy")
pisitools.remove("/usr/lib/perl5/site_perl/*/*/*/*/.packlist")
pisitools.dodoc("README", "LICENSE")
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.system("/bin/chown -R nginx:nginx /var/lib/nginx")
os.system("/bin/chown -R nginx:nginx /var/log/nginx")
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
serviceType = "server"
serviceDesc = _({"en": "Nginx Web Server",
"tr": "Nginx Web Sunucusu"})
from comar.service import *
@synchronized
def start():
startService(command="/usr/sbin/nginx",
donotify=True)
@synchronized
def stop():
stopService(pidfile="/run/nginx.pid",
donotify=True)
def status():
return isServiceRunning("/run/nginx.pid")
@@ -0,0 +1,76 @@
################################################################
#
# Default Pisi Linux Nginx configuration.
#
# For more information, please visit the page below;
#
# * http://wiki.codemongers.com/Main
#
################################################################
server {
listen 80;
server_name localhost;
location / {
root /var/www/nginx/htdocs;
index index.html index.htm;
}
# /home/user/public_html stuff
location ~ /~([a-zA-Z0-9]*)/(.*) {
root /home/;
autoindex on;
index index.html;
rewrite ^/~([a-zA-Z0-9]*)/(.*)$ /$1/public_html/$2 break;
}
error_page 404 /404.html;
location = /404.html {
root /var/www/nginx/htdocs;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx/htdocs;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
+49
View File
@@ -0,0 +1,49 @@
################################################################
#
# Default Pisi Linux Nginx configuration.
#
# For more information, please visit the page below;
#
# * http://wiki.codemongers.com/Main
#
################################################################
user nginx;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type text/plain;
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# include 3rd-party configuration files
include /etc/nginx/conf.d/*.conf;
# include ssl configuration
include /etc/nginx/ssl.conf;
}
+27
View File
@@ -0,0 +1,27 @@
#######################################################
#
# Sample SSL configuration
#
#######################################################
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
@@ -0,0 +1,19 @@
<html>
<head>
<title>The page is not found</title>
<style>
body { font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body bgcolor="white" text="black">
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<p><h2>HTTP/404</h2></p>
<p>The page you are looking for is not found!<br/>
Please check your URL.</p>
</td>
</tr>
</table>
</body>
</html>
@@ -0,0 +1,33 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>Pisi Linux Nginx Web Sunucusu İçin Deneme Sayfası</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="nginx.css" type="text/css">
</head><body>
<center><a href="http://www.pisilinux.org"><img src="pisi-linux.png" alt="PisiLinux" border="0"></a>
<h1>Pisi Linux Web Sunucusu Deneme Sayfası</h1>
<p> <b>Bu sayfanın hazırlandığı diğer diller: [<a href="index.html">İngilizce</a>]
</b><br>
</p>
</center>
<p>Bu sayfayı gördüğünüze göre <a href="http://www.pisilinux.org">Pisi Linux</a> üzerine <a href="http://www.nginx.net/"><b>Nginx Web Sunucusu</b></a>'nu
başarılı bir şekilde kurdunuz demektir. Bu sayfanın bulunduğu dizine
kendi sayfalarınızı ekleyip hemen yayımlamaya başlayabilirsiniz.</p>
<hr size="4" width="80%">
<p><a href="http://www.pisilinux.org">Pisi Linux,</a> Nginx Web
Sunucusu'nun güvenli bir şekilde çalışabileceği özgür bir Linux
dağıtımıdır. <b>Nginx</b> Web Sunucusu'nu kullanırken aşağıdaki Nginx
logosunu kullanabilirsiniz. Pisi Linux ve Nginx'i kullandığınız için
teşekkür ederiz!</p>
<center><img src="nginx.gif" alt="Nginx"></center>
</body></html>
@@ -0,0 +1,29 @@
<html>
<head>
<title>Pisi Linux Nginx Web Server Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="nginx.css" type="text/css" />
</head>
<body>
<center><a href="http://www.pisilinux.org"><img border="0" src="pisi-linux.png" alt="PisiLinux" /></a>
<h1>Pisi Linux Web Server Test Page</h1>
<p> <b>See this page in
[<a href=index-tr.html>Turkish</a>]
</b><br>
</center>
<p> You have successfully installed
<a href="http://www.nginx.net/"><b>Nginx web server</b></a>
under <a href="http://www.pisilinux.org">Pisi Linux</a>. Now it's possible to add HTML pages located in this directory.
</p>
<hr width="80%" size="4" />
<p><a href="http://www.pisilinux.org">Pisi Linux,</a> is a free to use, modify and distribute Linux distribution on which you can run <b>Nginx</b> web server in a secure manner.
You can use the following Nginx logo while using Nginx web server in your web pages. Thanks for using Pisi Linux and Nginx! </p>
<center><img src="nginx.gif" alt="Nginx" /></center>
</body>
</html>
@@ -0,0 +1,89 @@
/* Generated by CaScadeS, a stylesheet editor for Mozilla Composer */
body {
width: 96%;
margin-right: 10px;
margin-left: 10px;
padding-right: 0pt;
padding-left: 0pt;
font-size: 0.8em ! important;
padding-top: 0pt ! important;
padding-bottom: 0pt ! important;
background-color: rgb(255, 255, 255);
color: rgb(0, 0, 0);
margin-bottom: 10px ! important;
margin-top: 10px ! important;
text-align: justify ! important;
font-family: "DejaVu Sans",sans-serif ! important;
}
h1 {
border: 0.5px solid rgb(204, 204, 204);
padding: 10px 10px 4px;
font-family: "DejaVu Sans",Arial,sans-serif;
font-weight: bold;
vertical-align: bottom;
color: rgb(27, 87, 177);
width: 96%;
font-size: 1.75em;
background-color: rgb(247, 247, 247);
text-align: center;
}
h2 {
padding: 0pt;
font-family: "DejaVu Sans",Arial,sans-serif;
font-size: 1.25em;
font-weight: bold;
vertical-align: bottom;
background-color: rgb(255, 255, 255);
color: rgb(27, 87, 177);
width: 95%;
text-align: left;
}
h3 { font-size: 1em;
background-color: rgb(48, 48, 48);
color: rgb(27, 87, 177);
text-align: center;
}
hr { border-style: none none solid;
border-color: rgb(204, 204, 204);
border-width: 0pt 0pt 1px;
text-align: center;
}
a:link {
background-color: rgb(255, 255, 255);
text-decoration:none;
color: rgb(96, 96, 80);
}
a:visited {
background-color: rgb(255, 255, 255);
text-decoration:none;
color: rgb(72, 70, 143);
}
a:hover {
background-color: rgb(255, 255, 255);
color: rgb(255, 34, 0);
}
.pardus-content { border: 1px solid rgb(240, 240, 240);
margin: 7px 7px;
padding: 24px;
min-width: 140px;
color: rgb(0, 0, 0);
background-color: rgb(252, 252, 252);
font-size: 0.8em;
}
div.box { border: 0.5px solid rgb(204, 204, 204);
margin: 0.5em ;
padding: 10px;
background-color: rgb(247, 247, 247);
color: rgb(0, 0, 0)
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

+11
View File
@@ -0,0 +1,11 @@
/var/log/nginx/*log {
daily
rotate 10
missingok
notifempty
compress
sharedscripts
postrotate
[ ! -f /run/nginx.pid ] || kill -USR1 `cat /run/nginx.pid`
endscript
}
+81
View File
@@ -0,0 +1,81 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>nginx</Name>
<Homepage>http://www.nginx.net/</Homepage>
<Packager>
<Name>Kamil Atlı</Name>
<Email>suvari@pisilinux.org</Email>
</Packager>
<License>as-is</License>
<IsA>service</IsA>
<Summary>nginx is an HTTP and reverse proxy server</Summary>
<Description>Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Written by Igor Sysoev in 2005, Nginx now hosts between 1% and 4% of all domains worldwide. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption.</Description>
<Archive sha1sum="7fa3238ead37853bc23931f3a2e1be75130d4ae0" type="targz">http://nginx.org/download/nginx-1.17.2.tar.gz</Archive>
<BuildDependencies>
<Dependency>perl</Dependency>
<Dependency>gd-devel</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>geoip-devel</Dependency>
<Dependency>libxslt-devel</Dependency>
<Dependency>libpcre-devel</Dependency>
<Dependency>openssl-devel</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>nginx</Name>
<RuntimeDependencies>
<Dependency>gd</Dependency>
<Dependency>perl</Dependency>
<Dependency>zlib</Dependency>
<Dependency>geoip</Dependency>
<Dependency>libxslt</Dependency>
<Dependency>libpcre</Dependency>
<Dependency>openssl</Dependency>
<Dependency>libxml2</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="config">/etc/nginx</Path>
<Path fileType="config">/etc/logrotate.d</Path>
<Path fileType="executable">/usr/sbin</Path>
<Path fileType="data">/var/www/nginx</Path>
<Path fileType="data">/var/log/nginx</Path>
<Path fileType="data">/run</Path>
<Path fileType="data">/var/lib/nginx/client_body</Path>
<Path fileType="data">/var/lib/nginx/fastcgi</Path>
<Path fileType="data">/var/lib/nginx/proxy</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/nginx/nginx.conf">conf/nginx.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/nginx/ssl.conf">conf/ssl.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/nginx/conf.d/00_default_vhost.conf">conf/00_default_vhost.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/logrotate.d/nginx">nginx.logrotate</AdditionalFile>
<!-- Default Pisi Linux Page -->
<AdditionalFile owner="root" permission="0755" target="/var/www/nginx/htdocs/index.html">default-page/index.html</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/var/www/nginx/htdocs/index-tr.html">default-page/index-tr.html</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/var/www/nginx/htdocs/404.html">default-page/404.html</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/var/www/nginx/htdocs/nginx.css">default-page/nginx.css</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/var/www/nginx/htdocs/nginx.gif">default-page/nginx.gif</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/var/www/nginx/htdocs/pisi-linux.png">default-page/pisi-linux.png</AdditionalFile>
</AdditionalFiles>
<Provides>
<COMAR script="package.py">System.Package</COMAR>
<COMAR script="service.py">System.Service</COMAR>
</Provides>
</Package>
<History>
<Update release="1">
<Date>2019-07-25</Date>
<Version>1.17.2</Version>
<Comment>First release</Comment>
<Name>Kamil Atlı</Name>
<Email>suvari@pisilinux.org</Email>
</Update>
</History>
</PISI>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>nginx</Name>
<Summary xml:lang="tr">Küçük, sağlam ve yüksek performanslı http ve ters vekil sunucusu</Summary>
<Description xml:lang="tr">nginx, özgür, açık kaynaklı, yüksek performanslı bir HTTP, ters vekil (reverse proxy) ve aynı zamanda IMAP/POP3 sunucusudur.</Description>
</Source>
</PISI>