Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > b47a61ccdd60f0f846172b7d60929ca7 > files > 5

lighttpd-1.4.45-1.mga6.src.rpm

# Following modules bring no additionnal dependencies
# Other ones go into separate packages
%define base_modules	mod_access.so,mod_accesslog.so,mod_alias.so,mod_cgi.so,mod_dirlisting.so,mod_evhost.so,mod_expire.so,mod_extforward.so,mod_fastcgi.so,mod_flv_streaming.so,mod_indexfile.so,mod_proxy.so,mod_redirect.so,mod_rewrite.so,mod_rrdtool.so,mod_scgi.so,mod_secdownload.so,mod_setenv.so,mod_simple_vhost.so,mod_ssi.so,mod_staticfile.so,mod_status.so,mod_userdir.so,mod_usertrack.so,mod_evasive.so

Name:		lighttpd
Version:	1.4.45
Release:	%mkrel 1
Summary:	A fast webserver with minimal memory-footprint
License:	BSD
Group:		System/Servers
URL:		http://lighttpd.net/
Source0:	http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.xz
Source2:	lighttpd.service
Source3:	lighttpd.tmpfiles
Source4:	php.d-lighttpd.ini
Patch0:		lighttpd-defaultroot.patch
Patch2:		lighttpd-1.4.41-ssi-index-page-fix.patch
BuildRequires:	attr-devel
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	bzip2-devel
BuildRequires:	fam-devel
BuildRequires:	gdbm-devel
BuildRequires:	geoip-devel
BuildRequires:	lua5.1-devel
BuildRequires:	libmemcached-devel
BuildRequires:	mysql-devel
BuildRequires:	openldap-devel
BuildRequires:	pkgconfig(libpcre)
BuildRequires:	pkgconfig(libxml-2.0)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	pkgconfig(sqlite3)
BuildRequires:	pkgconfig(zlib)
Requires(pre):	webserver-base
Requires:       webserver-base
Requires(post):  rpm-helper >= 0.24.8-1
Requires(preun): rpm-helper >= 0.24.8-1
Provides:	webserver

%description
Security, speed, compliance, and flexibility--all of these describe LightTPD
which is rapidly redefining efficiency of a webserver; as it is designed and
optimized for high performance environments. With a small memory
footprint compared to other web-servers, effective management of the
cpu-load, and advanced feature set (FastCGI, CGI, Auth,
Output-Compression, URL-Rewriting and many more) LightTPD is the
perfect solution for every server that is suffering load problems.

This packages contains the server and base modules :
%(for mod in $(echo %base_modules | tr ',' '\n'); do echo ${mod%%.so}; done)

%package mod_auth
Summary:	Authentification module for %{name}
Group:		System/Servers
Requires:	%{name}
Requires:	%{name}-mod_authn_file = %{version}

%description mod_auth
lighttpd supportes both authentication method described by RFC 2617:

 - basic
 - digest

Depending on the method lighttpd provides various way to store the credentials
used for the authentication.

for basic auth:
 - plain (mod_authn_file)
 - htpasswd (mod_authn_file)
 - htdigest (mod_authn_file)
 - ldap (mod_authn_ldap)
 - mysql (mod_authn_mysql)

for digest auth:
 - plain (mod_authn_file)
 - htdigest (mod_authn_file)

%package mod_authn_file
Summary:	Authentication module for lighttpd that uses files
Group:		System/Servers
Requires:	%{name}

%description mod_authn_file
Authentication module for lighttpd that uses files.

%package mod_authn_ldap
Summary:        Authentication module for lighttpd that uses a LDAP
Group:          System/Servers
Requires:       %{name}

%description mod_authn_ldap
Authentication module for lighttpd that uses a LDAP.

%package mod_authn_mysql
Summary:	Authentication module for lighttpd that uses a MySQL database
Group:		System/Servers
Requires:	%{name}

%description mod_authn_mysql
Authentication module for lighttpd that uses a MySQL database.

%package mod_cml
Summary:	CML (Cache Meta Language) module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_cml
CML (Cache Meta Language) is a Meta language to describe the dependencies
of a page at one side and building a page from its fragments on the other side
using LUA.

%package mod_compress
Summary:	Output Compression module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_compress
Output compression reduces the network load and can improve the
overall throughput of the webserver. All major http-clients support
compression by announcing it in the Accept-Encoding header. This
is used to negotiate the most suitable compression method.
We support deflate, gzip and bzip2.

%package mod_deflate
Summary:	Output Compression module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_deflate
Output compression reduces the network load and can improve the
overall throughput of the webserver.

mod_deflate differs from mod_compress in that mod_deflate can compress
any output from lighttpd static or dynamic. mod_deflate does not support
caching compressed output like mod_compress.

%package mod_mysql_vhost
Summary:	MySQL-based vhosting module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_mysql_vhost
With MySQL-based vhosting you can store the path to a given
host's document root in a MySQL database.

%package mod_trigger_b4_dl
Summary:	Trigger before Download module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_trigger_b4_dl
Anti Hotlinking:
 - if user requests ''download-url'' directly, the request is denied
   and he is redirected to ''deny-url'
 - if user visits ''trigger-url'' before requesting ''download-url'',
    access is granted
 - if user visits ''download-url'' again after ''trigger-timeout'' has
   elapsed, the request is denied and he is redirected to ''deny-url''

The trigger information is either stored locally in a gdbm file or
remotely in memcached.

%package mod_webdav
Summary:	WebDAV module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_webdav
The WebDAV module for %{name} is a very minimalistic implementation of
RFC 2518.

%package mod_magnet
Summary:	Module to control the request handling in %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_magnet
mod_magnet can attract a request in several stages in the request-handling.

* either at the same level as mod_rewrite, before any parsing of the URL is
  done
* or at a later stage, when the doc-root is known and the physical-path is
  already setup

Keep in mind that the magnet is executed in the core of lighty. EVERY long-
running operation is blocking ALL connections in the server. You are warned.
For time-consuming or blocking scripts use mod_fastcgi and friends.

%package mod_geoip
Summary:	Geographic location by IP address module for %{name}
Group:		System/Servers
Requires:	%{name}
Requires:	geoip

%description mod_geoip
The GeoIP module for %{name} allows determination of the geographical
location of a large proportion of requesting IP addresses.

%package mod_uploadprogress
Summary:	Upload progress tracking module for %{name}
Group:		System/Servers
Requires:	%{name}

%description mod_uploadprogress
Upload progress tracking module for %{name}.

%prep
%setup -q
%autopatch -p1

%build
autoreconf -vfi
%configure2_5x \
  --libdir=%{_libdir}/%{name}/ \
  --with-attr \
  --with-bzip2 \
  --with-fam \
  --with-gdbm \
  --with-geoip \
  --with-ldap \
  --with-lua \
  --with-memcached \
  --with-mysql \
  --with-openssl \
  --with-pcre \
  --with-webdav-props
%make_build

%install
%make_install

install -d -m 755 %{buildroot}%{_unitdir}
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}

install -d -m 755 %{buildroot}%{_prefix}/lib/tmpfiles.d/
install -m 644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/lighttpd.conf

install -d -m 755 %{buildroot}%{_sysconfdir}/php.d
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini

install -d -m 755 %{buildroot}%{_sysconfdir}/lighttpd
install -d -m 755 %{buildroot}%{_sysconfdir}/lighttpd/conf.d
install -m 644 doc/config/*.conf %{buildroot}%{_sysconfdir}/lighttpd
install -m 644 doc/config/conf.d/*.conf %{buildroot}%{_sysconfdir}/lighttpd/conf.d

install -d -m 750 %{buildroot}%{_var}/lib/lighttpd/sockets

perl -pi \
    -e 's!.*server.username[\t ]*= .*$!server.username = "apache"!;' \
    -e 's!.*server.groupname[\t ]*= .*$!server.groupname = "apache"!;' \
    -e 's!^server.document-root.*$!server.document-root = "%{_var}/www/html"!;' \
    -e 's!^var.state_dir.*$!var.state_dir   = "/run/lighttpd"!;' \
    -e 's!^server.errorlog.*$!server.errorlog = "%{_logdir}/lighttpd/error.log"!;' \
    %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf

perl -pi \
    -e 's!^accesslog.filename.*$!accesslog.filename = "%{_logdir}/lighttpd/access.log"!' \
    %{buildroot}%{_sysconfdir}/lighttpd/conf.d/access_log.conf

sed -i \
    -e '/cgi.fix_pathinfo/d' \
    %{buildroot}%{_sysconfdir}/lighttpd/conf.d/fastcgi.conf

sed -i \
    -e 's!\(.*\"bin-path\"\).*php5.*!\1 => \"/usr/bin/php-fcgi",!g' \
    %{buildroot}%{_sysconfdir}/lighttpd/conf.d/fastcgi.conf

sed -e '1,/^\/\*\*/d' -e '/^ *\*\//,$d' src/mod_geoip.c > geoip.txt
printf ' *\tThis module only works if server.use-ipv6 = "disable" is set\n' >>geoip.txt

cat >lighttpd-mod_compress-clean <<EOF
#!/bin/bash
[[ -f %{_sysconfdir}/sysconfig/lighttpd ]] && . %{_sysconfdir}/sysconfig/lighttpd
find /var/cache/%{name}/compress -type f -mtime +\${LIGHTTPD_COMPRESS_CACHE_DAYS:-10} -delete
EOF
install -D -m 755 lighttpd-mod_compress-clean %{buildroot}%{_sysconfdir}/cron.daily/lighttpd-mod_compress-clean
mkdir -p %{buildroot}/var/cache/%{name}/compress

mkdir -p %{buildroot}%{_logdir}/lighttpd

mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
cat > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} <<EOF
%{_logdir}/%{name}/*.log {
    size=20M
    rotate 5
    weekly
    missingok
    notifempty
    postrotate
        /usr/bin/killall -HUP lighttpd &>/dev/null || :
    endscript
}
EOF

rm -f %{buildroot}%{_libdir}/%{name}/*.la

echo %{_libdir}/%{name}/{%{base_modules}} | tr ' ' '\n' > base.list
for i in doc/outdated/*.txt
do
	mod=`cat "$i" | tr -d '\\r' | sed -n "s/^Module:.*\\(mod_.*\\)$/\\1/p"`
	if [ -z "$mod" ]
	then
		echo  "%doc $i" >> base.list
	else
		if echo "%{base_modules}" | grep "$mod" > /dev/null
		then
			echo "%doc $i" >> base.list
		else
			echo "%doc $i" >> "$mod"
		fi
	fi
done

%post
# Fix rights on logs after upgrade, else the server can not start
if [ $1 -gt 1 ]; then
	if grep '^server.username = "apache"' %{_sysconfdir}/lighttpd/lighttpd.conf >/dev/null; then
		if [ `stat -c %U /var/log/lighttpd/` != "apache" ]; then
			chown -R apache /var/log/lighttpd/
		fi
	fi
fi
%_tmpfilescreate %{name}
%_post_service %{name}

%preun
%_preun_service %{name}

%files -f base.list
%doc doc/config/lighttpd.conf README INSTALL NEWS COPYING AUTHORS
%{_unitdir}/lighttpd.service
%{_prefix}/lib/tmpfiles.d/lighttpd.conf
%dir %{_sysconfdir}/lighttpd/
%dir %{_sysconfdir}/lighttpd/conf.d/
%dir %attr(0750,apache,apache) %{_var}/lib/lighttpd/
%dir %attr(0750,apache,apache) %{_var}/lib/lighttpd/sockets/
%config(noreplace) %{_sysconfdir}/lighttpd/*.conf
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/*.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/php.d/lighttpd.ini
%attr(0755,apache,apache) %{_logdir}/lighttpd
%{_mandir}/*/*
%{_sbindir}/*

%files mod_auth -f mod_auth
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/auth.conf
%{_libdir}/%{name}/mod_auth.so

%files mod_authn_file
%{_libdir}/%{name}/mod_authn_file.so

%files mod_authn_ldap
%{_libdir}/%{name}/mod_authn_ldap.so

%files mod_authn_mysql
%{_libdir}/%{name}/mod_authn_mysql.so

%files mod_cml -f mod_cml
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/cml.conf
%{_libdir}/%{name}/mod_cml.so

%files mod_compress -f mod_compress
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/compress.conf
%dir %attr(0750,apache,apache) /var/cache/%{name}/compress
%{_sysconfdir}/cron.daily/lighttpd-mod_compress-clean
%{_libdir}/%{name}/mod_compress.so

%files mod_deflate
%{_libdir}/%{name}/mod_deflate.so

%files mod_mysql_vhost -f mod_mysql_vhost
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/mysql_vhost.conf
%{_libdir}/%{name}/mod_mysql_vhost.so

%files mod_trigger_b4_dl -f mod_trigger_b4_dl
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/trigger_b4_dl.conf
%{_libdir}/%{name}/mod_trigger_b4_dl.so

%files mod_webdav -f mod_webdav
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/webdav.conf
%{_libdir}/%{name}/mod_webdav.so

%files mod_geoip
%doc geoip.txt
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/geoip.conf
%{_libdir}/%{name}/mod_geoip.so

%files mod_magnet -f mod_magnet
%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/magnet.conf
%{_libdir}/%{name}/mod_magnet.so

%files mod_uploadprogress
%{_libdir}/%{name}/mod_uploadprogress.so



%changelog
* Sun Jan 29 2017 wally <wally> 1.4.45-1.mga6
+ Revision: 1083971
- new version 1.4.45
- drop unneeded geoip patch
- add patch to include index.shtml as index file when SSI module is enabled (mga#20200)
- add new module pkgs
  * mod_authn_file
  * mod_authn_mysql
  * mod_authn_ldap
  * mod_deflate
  * mod_uploadprogress

* Fri Aug 12 2016 shlomif <shlomif> 1.4.41-1.mga6
+ Revision: 1046011
- Update to 1.4.41 for some security fixes (MGA#19111).

* Fri Mar 25 2016 wally <wally> 1.4.39-4.mga6
+ Revision: 995448
- fix bin-paths in fastcgi.conf default example
- drop note about adding cgi.fix_pathinfo=1 to php.ini as we already ship php.d/lighttpd.ini

* Fri Mar 25 2016 wally <wally> 1.4.39-3.mga6
+ Revision: 995436
- install home_dir and socket_dir
- drop old Mdv era obsoletes/provides

* Wed Mar 02 2016 umeabot <umeabot> 1.4.39-2.mga6
+ Revision: 983609
- Rebuild for openssl

* Sun Jan 03 2016 luigiwalser <luigiwalser> 1.4.39-1.mga6
+ Revision: 919073
- 1.4.39

* Thu Dec 17 2015 shlomif <shlomif> 1.4.38-1.mga6
+ Revision: 911314
- Add a missing source
- New version 1.4.38

* Wed Sep 02 2015 luigiwalser <luigiwalser> 1.4.37-1.mga6
+ Revision: 872170
- 1.4.37

* Fri Aug 07 2015 luigiwalser <luigiwalser> 1.4.36-1.mga6
+ Revision: 861602
- 1.4.36
- rediff patch 1

* Tue May 19 2015 luigiwalser <luigiwalser> 1.4.35-5.mga5
+ Revision: 822403
- systemd apparently does not support double ampersand, using semicolon instead
- service implementation updates from Luca Olivetti:
- drop unused sysconfig file
- use lighttpd-angel to start service so config can be reloaded (mga#15980)
- test config file before starting or reloading lighttpd
- do not daemonize, service type is no longer forking

* Mon May 18 2015 luigiwalser <luigiwalser> 1.4.35-4.mga5
+ Revision: 822339
- use HUP instead of reload for logrotate, reload not supported by service (mga#15948)

* Wed Oct 15 2014 umeabot <umeabot> 1.4.35-3.mga5
+ Revision: 744835
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.4.35-2.mga5
+ Revision: 681938
- Mageia 5 Mass Rebuild

* Mon Sep 01 2014 luigiwalser <luigiwalser> 1.4.35-1.mga5
+ Revision: 670759
- back to lua 5.1
- 1.4.35
- rediff patch 1
- remove upstream patches

  + tv <tv>
    - rebuild with lua-5.2

* Wed Mar 12 2014 luigiwalser <luigiwalser> 1.4.33-5.mga5
+ Revision: 602639
- add upstream patch to fix CVE-2014-2323 and CVE-2014-2324

* Mon Nov 18 2013 luigiwalser <luigiwalser> 1.4.33-4.mga4
+ Revision: 551799
- add upstream patch to fix regression in CVE-2013-4508 patch

* Tue Nov 12 2013 luigiwalser <luigiwalser> 1.4.33-3.mga4
+ Revision: 550869
- add upstream patches to fix CVE-2013-4508, CVE-2013-4559, and CVE-2013-4560

* Mon Oct 21 2013 umeabot <umeabot> 1.4.33-2.mga4
+ Revision: 537964
- Mageia 4 Mass Rebuild

* Sat Sep 28 2013 fwang <fwang> 1.4.33-1.mga4
+ Revision: 488160
- new version 1.4.33

* Tue Aug 13 2013 luigiwalser <luigiwalser> 1.4.32-8.mga4
+ Revision: 466004
- use apache user for tmpfiles config
- remove unneeded patch

* Mon Aug 12 2013 tmb <tmb> 1.4.32-7.mga4
+ Revision: 465918
- fix state_dir config

* Mon Aug 12 2013 luigiwalser <luigiwalser> 1.4.32-6.mga4
+ Revision: 465795
- follow system service policy

* Mon Aug 12 2013 guillomovitch <guillomovitch> 1.4.32-5.mga4
+ Revision: 465650
- fix PID file location (#10447)

* Sat Jul 20 2013 danf <danf> 1.4.32-4.mga4
+ Revision: 456633
- added mod_geoip module for geographic IP address lookup
- created a directory /var/cache/lighttpd/compress for the compress module so
  compress caching works out of the box
- created a daily cron job to clean the compress cache

* Sat Jan 12 2013 umeabot <umeabot> 1.4.32-3.mga3
+ Revision: 358788
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Dec 01 2012 fwang <fwang> 1.4.32-2.mga3
+ Revision: 323695
- rebuild for new pcre

* Fri Nov 23 2012 fwang <fwang> 1.4.32-1.mga3
+ Revision: 321209
- new version 1.4.32

* Wed Aug 15 2012 guillomovitch <guillomovitch> 1.4.31-3.mga3
+ Revision: 281433
- don't ship /var/www, it is already in webserver-base

* Tue Aug 14 2012 guillomovitch <guillomovitch> 1.4.31-2.mga3
+ Revision: 281318
- drop sysinit support

* Fri Jun 01 2012 fwang <fwang> 1.4.31-1.mga3
+ Revision: 252639
- new version 1.4.31

* Sat Apr 28 2012 tmb <tmb> 1.4.30-5.mga2
+ Revision: 233769
- Require rpm-helper >= 0.24.8-1 for systemd support

* Wed Apr 18 2012 pterjan <pterjan> 1.4.30-4.mga2
+ Revision: 231280
- Add LSB header to initscript

* Thu Mar 15 2012 guillomovitch <guillomovitch> 1.4.30-3.mga2
+ Revision: 223520
- ship additional sample configuration files
- add php configuration file from fedora package

* Mon Mar 12 2012 guillomovitch <guillomovitch> 1.4.30-2.mga2
+ Revision: 222895
- add systemd support
- spec cleanup
- no need for apache, just for webserver-base

* Sun Dec 18 2011 fwang <fwang> 1.4.30-1.mga2
+ Revision: 183915
- new version 1.4.30

* Tue Dec 06 2011 fwang <fwang> 1.4.29-3.mga2
+ Revision: 177188
- sync with stable 1 patches

* Sun Sep 18 2011 dmorgan <dmorgan> 1.4.29-2.mga2
+ Revision: 144690
- Change apache-conf require

* Tue Jul 05 2011 fwang <fwang> 1.4.29-1.mga2
+ Revision: 118585
- update file list
- new version 1.4.29

* Tue Mar 29 2011 rtp <rtp> 1.4.28-6.mga1
+ Revision: 78842
- add missing configuration files (#539)
- fix some rpmlint warnings

* Thu Mar 24 2011 ennael <ennael> 1.4.28-5.mga1
+ Revision: 76946
- clean spec file
- imported package lighttpd