Accepting request 338840 from server:http
- added Conflicts: apache2-example-pages * both packages provide /srv/www/htdocs/index.html (forwarded request 331803 from vitezslav_cizek) OBS-URL: https://build.opensuse.org/request/show/338840 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/thttpd?expand=0&rev=36
This commit is contained in:
commit
cd69cb6626
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:eee1ce423ec3f6ecd7bd4ceca7bef9cdf5a07f21fca5a8acbac8e152bdc26cbc
|
|
||||||
size 133331
|
|
86
thttpd-initd.script
Normal file
86
thttpd-initd.script
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Copyright (c) 1996-1999 SuSE Gmbh Nuernberg, Germany. All rights reserved.
|
||||||
|
#
|
||||||
|
# /etc/init.d/thttpd
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: thttpd
|
||||||
|
# Required-Start: $network $remote_fs $syslog
|
||||||
|
# Required-Stop: $network $remote_fs $syslog
|
||||||
|
# Default-Start: 3 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
# Short-Description: thttpd
|
||||||
|
# Description: Starts the http daemon thttpd
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
THTTPD_BIN=/usr/sbin/thttpd
|
||||||
|
test -x $THTTPD_BIN || exit 5
|
||||||
|
|
||||||
|
. /etc/rc.status
|
||||||
|
|
||||||
|
rc_reset
|
||||||
|
|
||||||
|
# Return values acc. to LSB for all commands but status:
|
||||||
|
# 0 - success
|
||||||
|
# 1 - generic or unspecified error
|
||||||
|
# 2 - invalid or excess argument(s)
|
||||||
|
# 3 - unimplemented feature (e.g. "reload")
|
||||||
|
# 4 - insufficient privilege
|
||||||
|
# 5 - program is not installed
|
||||||
|
# 6 - program is not configured
|
||||||
|
# 7 - program is not running
|
||||||
|
#
|
||||||
|
# Note that starting an already running service, stopping
|
||||||
|
# or restarting a not-running service as well as the restart
|
||||||
|
# with force-reload (in case signalling is not supported) are
|
||||||
|
# considered a success.
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Starting service thttpd"
|
||||||
|
startproc $THTTPD_BIN -C /etc/thttpd.conf
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
echo -n "Shutting down service thttpd"
|
||||||
|
killproc -TERM $THTTPD_BIN
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
try-restart)
|
||||||
|
## Stop the service and if this succeeds (i.e. the
|
||||||
|
## service was running before), start it again.
|
||||||
|
$0 status >/dev/null && $0 restart
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
## Stop the service and if this succeeds (i.e. the
|
||||||
|
## service was running before), start it again.
|
||||||
|
$0 stop && sleep 1 && $0 start
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
rc_failed 3
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
echo -n "Checking for service thttpd: "
|
||||||
|
checkproc $THTTPD_BIN
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
probe)
|
||||||
|
#
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
rc_exit
|
||||||
|
|
@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 17 14:10:46 UTC 2015 - vcizek@suse.com
|
||||||
|
|
||||||
|
- added Conflicts: apache2-example-pages
|
||||||
|
* both packages provide /srv/www/htdocs/index.html
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jul 5 09:43:36 UTC 2015 - vcizek@suse.com
|
||||||
|
|
||||||
|
- build with pie and full relro
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 18 15:07:51 UTC 2015 - thehejik@suse.com
|
||||||
|
|
||||||
|
- package cleanup (bnc#899218)
|
||||||
|
* removed SUSE branding
|
||||||
|
* added logrotate support
|
||||||
|
* changed note about default codepage
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 4 15:09:12 UTC 2015 - vcizek@suse.com
|
Thu Jun 4 15:09:12 UTC 2015 - vcizek@suse.com
|
||||||
|
|
||||||
|
70
thttpd.conf
Normal file
70
thttpd.conf
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# thttpd.conf -- configuration file for thttpd
|
||||||
|
#
|
||||||
|
# The strategy used is similar to e.g. OpenSSH:
|
||||||
|
# specify options with their default value where possible,
|
||||||
|
# but leave them commented. Uncommented options change
|
||||||
|
# a default value. Parenthesis state the command line option
|
||||||
|
|
||||||
|
# Port to listen on (-p)
|
||||||
|
#port=80
|
||||||
|
|
||||||
|
# www root directory (-d)
|
||||||
|
dir=/srv/www/htdocs
|
||||||
|
|
||||||
|
# The eternal question whether to chroot() or not to chroot()
|
||||||
|
# into "dir" above. If you don't want thttpd to chroot() change
|
||||||
|
# the next line to "nochroot" (-r|-nor)
|
||||||
|
#chroot
|
||||||
|
|
||||||
|
# data directory in the chroot dir
|
||||||
|
# as the default configuration just chroots into "dir"
|
||||||
|
# we leave this unset. Use it for running more complex webs with
|
||||||
|
# thttpd (note, that at some point something more robust
|
||||||
|
# (e.g. apache)might be a better choice). (-dd)
|
||||||
|
#data_dir=
|
||||||
|
|
||||||
|
# Instructs thttpd to check whether symlinked documents really
|
||||||
|
# belong to the document tree. Disable with "nosymlinkcheck",
|
||||||
|
# although this is not recommended (-s|-nos)
|
||||||
|
#symlinkcheck
|
||||||
|
|
||||||
|
# "El-cheapo" webhosting, enable with "vhost" (-v|-nov)
|
||||||
|
#novhost
|
||||||
|
|
||||||
|
# Use server-global .htpasswd file (see man page). Enable with
|
||||||
|
# "globalpasswd" (-g|-nog)
|
||||||
|
#noglobalpasswd
|
||||||
|
|
||||||
|
# User to switch to after initialization when started as root
|
||||||
|
# (-u)
|
||||||
|
#user=wwwrun
|
||||||
|
|
||||||
|
# CGI scripts pattern (-c)
|
||||||
|
#cgipat=/cgi-bin/*|**.cgi
|
||||||
|
|
||||||
|
# File of throttle settings (-t) - see manpage
|
||||||
|
#throttles=
|
||||||
|
|
||||||
|
# Hostname to bind to for multihoming (-h)
|
||||||
|
#host=your.hostname.here
|
||||||
|
|
||||||
|
# Log-file; empty = use syslog(), /dev/null = without log. (-l)
|
||||||
|
logfile=/var/log/thttpd.log
|
||||||
|
|
||||||
|
# File to write the process-id to (-i), can be used for signalling
|
||||||
|
# thttpd
|
||||||
|
pidfile=/var/run/thttpd.pid
|
||||||
|
|
||||||
|
# Character set to use with text MIME types.
|
||||||
|
# Defaults to UTF-8 (-t)
|
||||||
|
#charset=
|
||||||
|
|
||||||
|
# P3P server privacy header is returned with all responses
|
||||||
|
# (see manpage). Use p3p to enable it (-P|-noP)
|
||||||
|
##
|
||||||
|
|
||||||
|
# seconds to be used in a "Cache-Control: max-age" header and
|
||||||
|
# generates equivalent Expires meta tag
|
||||||
|
#max_age=
|
||||||
|
|
||||||
|
# -- end of thttpd.conf
|
10
thttpd.logrotate
Normal file
10
thttpd.logrotate
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/var/log/thttpd.log {
|
||||||
|
compress
|
||||||
|
dateext
|
||||||
|
maxage 365
|
||||||
|
rotate 99
|
||||||
|
size=+4096k
|
||||||
|
notifempty
|
||||||
|
missingok
|
||||||
|
copytruncate
|
||||||
|
}
|
49
thttpd.spec
49
thttpd.spec
@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define serverroot /srv/www
|
||||||
%if 0%{?suse_version} > 1220
|
%if 0%{?suse_version} > 1220
|
||||||
%define with_systemd 1
|
%define with_systemd 1
|
||||||
%else
|
%else
|
||||||
@ -29,8 +30,10 @@ License: BSD-3-Clause
|
|||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
Url: http://www.acme.com/software/thttpd/
|
Url: http://www.acme.com/software/thttpd/
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
Source1: %{name}-SuSE.tar.bz2
|
Source1: %{name}-initd.script
|
||||||
Source2: %{name}.service
|
Source2: %{name}.service
|
||||||
|
Source3: %{name}.logrotate
|
||||||
|
Source4: %{name}.conf
|
||||||
Patch0: %{name}-2.25b-configure.patch
|
Patch0: %{name}-2.25b-configure.patch
|
||||||
Patch1: %{name}-2.25b-dirs.patch
|
Patch1: %{name}-2.25b-dirs.patch
|
||||||
Patch2: %{name}-2.25b-time_h.patch
|
Patch2: %{name}-2.25b-time_h.patch
|
||||||
@ -50,9 +53,12 @@ Patch15: thttpd-crypt_is_in_crypt.h.patch
|
|||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
Requires(post): permissions
|
Requires(post): permissions
|
||||||
Provides: http_daemon
|
Recommends: logrotate
|
||||||
# both packages provide /usr/bin/htpasswd
|
# both packages provide /usr/bin/htpasswd
|
||||||
Conflicts: apache2-utils
|
Conflicts: apache2-utils
|
||||||
|
# both packages provide /srw/www/htdocs/index.html
|
||||||
|
Conflicts: apache2-example-pages
|
||||||
|
Provides: http_daemon
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
@ -70,10 +76,8 @@ in memory use. Basic support for cgi scripts, authentication, and ssi
|
|||||||
is provided for. Advanced features include the ability to throttle
|
is provided for. Advanced features include the ability to throttle
|
||||||
traffic.
|
traffic.
|
||||||
|
|
||||||
%define serverroot /srv/www
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -a 1
|
%setup -q
|
||||||
%patch0
|
%patch0
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
@ -92,25 +96,15 @@ traffic.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
cp %{_datadir}/automake-1.*/config.* .
|
cp %{_datadir}/automake-1.*/config.* .
|
||||||
# update server root path
|
|
||||||
sed -i "s@__SRVROOT__@%{serverroot}/htdocs@g" README.SuSE SuSE%{_sysconfdir}/thttpd.conf
|
|
||||||
sed -i "s@__PREFIX__@%{_prefix}@g;\
|
|
||||||
s@__SYSCONFDIR__@%{_sysconfdir}@g;\
|
|
||||||
s@__NAME__@%{name}@g;\
|
|
||||||
s@__VERSION__@%{version}@g" SuSE%{_initddir}/thttpd
|
|
||||||
chmod 744 SuSE%{_initddir}/thttpd
|
|
||||||
chmod 644 SuSE%{_sysconfdir}/thttpd.conf
|
|
||||||
mv aclocal.m4 acinclude.m4
|
mv aclocal.m4 acinclude.m4
|
||||||
libtoolize --force
|
libtoolize --force
|
||||||
aclocal --force
|
aclocal --force
|
||||||
autoconf -f
|
autoconf -f
|
||||||
V_CCOPT="%{optflags} -Wall" \
|
export V_CCOPT="%{optflags} -fPIC -DPIC -fPIE"
|
||||||
|
export CFLAGS="%{optflags} -fPIC -DPIC -fPIE"
|
||||||
|
export LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
||||||
%configure
|
%configure
|
||||||
%ifarch s390 s390x
|
make
|
||||||
make F_PIE="-fPIE" %{?_smp_mflags}
|
|
||||||
%else
|
|
||||||
make F_PIE="-fpie" %{?_smp_mflags}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -d %{buildroot}%{_bindir} \
|
install -d %{buildroot}%{_bindir} \
|
||||||
@ -119,18 +113,18 @@ install -d %{buildroot}%{_bindir} \
|
|||||||
%{buildroot}%{_mandir}/man8 \
|
%{buildroot}%{_mandir}/man8 \
|
||||||
%{buildroot}%{serverroot}/htdocs/users
|
%{buildroot}%{serverroot}/htdocs/users
|
||||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
cp -a SuSE/* %{buildroot}
|
install -D -m0644 index.html %{buildroot}/%{serverroot}/htdocs/index.html
|
||||||
rm -f %{buildroot}%{serverroot}/htdocs/index.html
|
install -D -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||||
|
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
rm -rf %{buildroot}%{_sysconfdir}/init.d
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
rm %{buildroot}%{_sbindir}/rc%{name}
|
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
|
||||||
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
|
||||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
%else
|
||||||
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_initddir}/%{name}
|
||||||
|
ln -s %{buildroot}%{_initddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%service_add_pre %{name}.service
|
%service_add_pre %{name}.service
|
||||||
%endif
|
%endif
|
||||||
@ -167,13 +161,14 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc README README.SuSE config.h
|
%doc README config.h
|
||||||
%{serverroot}/htdocs/*
|
%{serverroot}/htdocs/*
|
||||||
%attr(775, root, www) %{serverroot}/htdocs/users
|
%attr(775, root, www) %{serverroot}/htdocs/users
|
||||||
%verify(not mode) %attr(2750, root, www) %{_bindir}/makeweb
|
%verify(not mode) %attr(2750, root, www) %{_bindir}/makeweb
|
||||||
%{_bindir}/htpasswd
|
%{_bindir}/htpasswd
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
%config %{_sysconfdir}/logrotate.d/%{name}
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%else
|
%else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user