summaryrefslogtreecommitdiff
path: root/www-servers/webfs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /www-servers/webfs
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'www-servers/webfs')
-rw-r--r--www-servers/webfs/Manifest9
-rw-r--r--www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch15
-rw-r--r--www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch12
-rw-r--r--www-servers/webfs/files/webfs.confd27
-rw-r--r--www-servers/webfs/files/webfs.initd29
-rw-r--r--www-servers/webfs/files/webfs.service10
-rw-r--r--www-servers/webfs/files/webfs.service.conf27
-rw-r--r--www-servers/webfs/metadata.xml8
-rw-r--r--www-servers/webfs/webfs-1.21.ebuild55
9 files changed, 192 insertions, 0 deletions
diff --git a/www-servers/webfs/Manifest b/www-servers/webfs/Manifest
new file mode 100644
index 000000000000..1e086984e35c
--- /dev/null
+++ b/www-servers/webfs/Manifest
@@ -0,0 +1,9 @@
+AUX webfs-1.21-CVE-2013-0347.patch 333 BLAKE2B 67061f02f66391d0c4ca8f99b9c4503ae164134d0cfd9c481591819ad09375e70557b1ddf8ae1d7b9730608d71cf5bb9d846e5d2e49e4192d52626cc11329a15 SHA512 8c9e5fd120beac459bb79e236d608e28c1ce7c8c042e99c274637683a3d59381462ac437f4b6fe52d59a0d594d8d208b5bc5ff5c403ec47e3eec8a54d7547aee
+AUX webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch 478 BLAKE2B 63db1e3d023a50fac14a16643ab5082205ac84b93b96c6b3365cae8191902a4f74ae76d14ebf56d2477b29687f0cd188fff647511b367ea292ea615e9dec638c SHA512 c77374124f2b7fea459f5ec594f0a03d4900ca7d4f5c2c8d2518372e59143d3f0be014d803df374f90fe615be1edd96253dbb878d3d727724032b1b0d5569377
+AUX webfs.confd 606 BLAKE2B f84396436c60525469a04dee5d9267d2449829865bc2cc7cd7f3d0ebca721df8f99881e733ada274544908e6073fd42ccdcc9ff99353c0d589d6225a3bcfa8ec SHA512 ec7bbba41e68972c4139ddbfd00b54b956a3dfe747c5a6a22702d2ded53cc1dd07aa4383540a120b1e62c9d514c38bc3c96bcea5b3f00b10f72269acd32f4526
+AUX webfs.initd 1056 BLAKE2B d1c1504eb79d6f7ec7a2738107730ae2d45142186e5767ac6580dd2e99b158e90c836495c1aaa93bf3d5979343e92f26f7c9f29252b56b1dba4607e3ed802226 SHA512 2bfaab3aaa1b2dd3cbadea026faf5e8c294588559ce79ebbf482c34bfa94f2b6dd17c9c147a5f89c5a971893c2fdea97c461af9343067474da5e23a128027f90
+AUX webfs.service 243 BLAKE2B 0c4481b9fe3866301b820adb711f54ef566873bf8d3fd89ec9813b1af84203070a5ca02192a79532d13ea6451f81d13763fe49513ebbb7704e74e25f13a5ce31 SHA512 d0b6ec45f150f2fd3ab2863c43dd81e2281958cf4ad039e61a16b918d4b42c2cb7d5efd85726f121917c518dc0e2335216d1e95855df72c2ead91dd7ff9c0ef8
+AUX webfs.service.conf 594 BLAKE2B 44d3f9b2b6e51b6e69a899fe006f9036394dee48fa66d272f8939b95b1263939f1b0e3d8bde469f0e79f4c57aee305b7f4a1f4c40a0707c424c38396d14525c5 SHA512 5c2bb4cf4a405251d45b86417da2904b5781aad5db9e2b6b1952fb6c8a3f4b36abc867e9efe05bbda8bd5c995124f9fe0bb64a9d155cd1508079700944bb78ed
+DIST webfs-1.21.tar.gz 44249 BLAKE2B 3d1bf7023f271f06079378a9a8e957deb611d567209ebd0ee947cae9852aecc2704ec8ce115b1f03ec39299040f44d7caf53fb30241f4990521aeda7b5815f3f SHA512 68b9b3163a21be8a549e395295b27dd8ce9b575183d6c36b05b98bdc310917cf2dc653ff73bdb78a8c063674a8e9480211ec5c28b8a676f9cee41fa962cfd473
+EBUILD webfs-1.21.ebuild 1387 BLAKE2B d7da1147620759aea239d3c6079a268b01cfaff8af361d46b6e9935999f77b7712abdec6ce83e4690cc9836107b61497096e1fb605b25fbe3563dfb2505331af SHA512 fa489d885dc81c9696ad3447dda493eee4338db943e037b40576ee582df4d32867ee5dd78d56b3462f4aff67b680215274df0affbe51993f8b1abb93f3497fac
+MISC metadata.xml 249 BLAKE2B 0d8c6b8e9873180a796f77c5194270389ae642d0d888d7fa1bbada89861dc1ba1bd9f238acd76f7a07a3eb694ac8bdb19927012814a03ed8d3e87f40676979d1 SHA512 1ac8ddbe837cb8db85bb6e4ee59a6e98554c04231c54cb5158fbe7dda3230aaeb02ab66ff374f5bb348e84159588b0740c43acd99ed590939db70bbd2f15d265
diff --git a/www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch b/www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch
new file mode 100644
index 000000000000..26e225def360
--- /dev/null
+++ b/www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch
@@ -0,0 +1,15 @@
+--- ./webfsd.c
++++ ./webfsd.c
+@@ -918,8 +918,11 @@
+ } else {
+ if (NULL == (logfh = fopen(logfile,"a")))
+ xperror(LOG_WARNING,"open access log",NULL);
+- else
++ else {
+ close_on_exec(fileno(logfh));
++ if (0 != chmod(logfile,S_IRUSR|S_IWUSR))
++ xperror(LOG_WARNING,"chmod access log",NULL);
++ }
+ }
+ }
+
diff --git a/www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch b/www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch
new file mode 100644
index 000000000000..03f2f5c59816
--- /dev/null
+++ b/www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch
@@ -0,0 +1,12 @@
+diff -Naur webfs-1.21.orig/mk/Variables.mk webfs-1.21/mk/Variables.mk
+--- webfs-1.21.orig/mk/Variables.mk 2009-02-03 01:14:18.000000000 +0100
++++ webfs-1.21/mk/Variables.mk 2009-02-03 01:16:01.000000000 +0100
+@@ -23,7 +23,7 @@
+ CXX ?= g++
+ MOC ?= $(if $(QTDIR),$(QTDIR)/bin/moc,moc)
+ INSTALL ?= install
+-INSTALL_BINARY := $(INSTALL) -s
++INSTALL_BINARY := $(INSTALL)
+ INSTALL_SCRIPT := $(INSTALL)
+ INSTALL_DATA := $(INSTALL) -m 644
+ INSTALL_DIR := $(INSTALL) -d
diff --git a/www-servers/webfs/files/webfs.confd b/www-servers/webfs/files/webfs.confd
new file mode 100644
index 000000000000..5c4de3ad9b74
--- /dev/null
+++ b/www-servers/webfs/files/webfs.confd
@@ -0,0 +1,27 @@
+# Configuration for webfsd init script
+
+WEBFS_PORT=80
+WEBFS_DOCROOT=/var/www/localhost/htdocs
+WEBFS_INDEX=index.html
+WEBFS_LOG=/var/log/webfsd.log
+
+# set server name
+#WEBFS_SERVNAME=
+
+# uncomment to chroot to specified dir
+#WEBFS_CHROOT="/var/www/localhost"
+
+# max allowed connections (defaults to 32)
+#WEBFS_MAXCONN=50
+
+# uncomment to enable directory listings
+#WEBFS_DIR_LIST=true
+
+# uncomment to enable SSL (you'll need to add -C <cert> -P <pass> to WEBFS_OPTS)
+#WEBFS_SSL=true
+
+# uncomment to enable ipv6
+#WEBFS_IPV6=true
+
+# Add any extra options here. See webfsd for more information.
+#WEBFS_OPTS=""
diff --git a/www-servers/webfs/files/webfs.initd b/www-servers/webfs/files/webfs.initd
new file mode 100644
index 000000000000..ec328b662f83
--- /dev/null
+++ b/www-servers/webfs/files/webfs.initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ WEBFS_OPTS="-p ${WEBFS_PORT:-80} -f ${WEBFS_INDEX:-index.html} ${WEBFS_OPTS}"
+ [ -n "${WEBFS_DOCROOT}" ] && WEBFS_OPTS="${WEBFS_OPTS} -r ${WEBFS_DOCROOT}"
+ [ -n "${WEBFS_CHROOT}" ] && WEBFS_OPTS="${WEBFS_OPTS} -R ${WEBFS_CHROOT}"
+ [ -n "${WEBFS_LOG}" ] && WEBFS_OPTS="${WEBFS_OPTS} -L ${WEBFS_LOG}"
+ [ -n "${WEBFS_MAXCONN}" ] && WEBFS_OPTS="${WEBFS_OPTS} -c ${WEBFS_MAXCONN}"
+ [ -n "${WEBFS_IPV6}" ] && WEBFS_OPTS="${WEBFS_OPTS} -6"
+ [ -n "${WEBFS_SSL}" ] && WEBFS_OPTS="${WEBFS_OPTS} -S"
+ [ -n "${WEBFS_SERVNAME}" ] && WEBFS_OPTS="${WEBFS_OPTS} -n ${WEBFS_SERVNAME}"
+ [ -n "${WEBFS_DIR_LIST}" ] || WEBFS_OPTS="${WEBFS_OPTS} -j"
+
+ ebegin "Starting webfsd"
+ start-stop-daemon --start --quiet --exec /usr/bin/webfsd -- ${WEBFS_OPTS}
+ eend $? "Failed to start webfsd"
+}
+
+stop() {
+ ebegin "Stopping webfsd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/webfsd
+ eend $? "Failed to stop webfsd"
+}
diff --git a/www-servers/webfs/files/webfs.service b/www-servers/webfs/files/webfs.service
new file mode 100644
index 000000000000..f8857655e28f
--- /dev/null
+++ b/www-servers/webfs/files/webfs.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Simple and instant http server.
+Documentation=man:webfsd(1)
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/webfsd -p ${WEBFS_PORT:-80} -f ${WEBFS_INDEX:-index.html} ${WEBFS_OPTS} -F
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-servers/webfs/files/webfs.service.conf b/www-servers/webfs/files/webfs.service.conf
new file mode 100644
index 000000000000..80daa14dc7ae
--- /dev/null
+++ b/www-servers/webfs/files/webfs.service.conf
@@ -0,0 +1,27 @@
+# Configuration for webfsd
+
+WEBFS_PORT=80
+WEBFS_DOCROOT=/var/www/localhost/htdocs
+WEBFS_INDEX=index.html
+WEBFS_LOG=/var/log/webfsd.log
+
+# set server name
+#WEBFS_SERVNAME=
+
+# uncomment to chroot to specified dir
+#WEBFS_CHROOT="/var/www/localhost"
+
+# max allowed connections (defaults to 32)
+#WEBFS_MAXCONN=50
+
+# uncomment to enable directory listings
+#WEBFS_DIR_LIST=true
+
+# uncomment to enable SSL (you'll need to add -C <cert> -P <pass> to WEBFS_OPTS)
+#WEBFS_SSL=true
+
+# uncomment to enable ipv6
+#WEBFS_IPV6=true
+
+# Add any extra options here. See webfsd for more information.
+#WEBFS_OPTS=""
diff --git a/www-servers/webfs/metadata.xml b/www-servers/webfs/metadata.xml
new file mode 100644
index 000000000000..34f42ecf020c
--- /dev/null
+++ b/www-servers/webfs/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-servers/webfs/webfs-1.21.ebuild b/www-servers/webfs/webfs-1.21.ebuild
new file mode 100644
index 000000000000..7b512f519cdf
--- /dev/null
+++ b/www-servers/webfs/webfs-1.21.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+DESCRIPTION="Lightweight HTTP server for static content"
+SRC_URI="http://dl.bytesex.org/releases/${PN}/${P}.tar.gz"
+HOMEPAGE="http://linux.bytesex.org/misc/webfs.html"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl threads"
+
+DEPEND="ssl? ( dev-libs/openssl:0= )"
+
+RDEPEND="${DEPEND}
+ app-misc/mime-types"
+
+PATCHES=(
+ "${FILESDIR}/${P}-Variables.mk-dont-strip-binaries-on-install.patch"
+ "${FILESDIR}/${P}-CVE-2013-0347.patch"
+)
+
+src_prepare() {
+ sed -e "s:/etc/mime.types:${EPREFIX}\\0:" -i GNUmakefile || die "sed failed"
+ default
+}
+
+src_compile() {
+ local myconf
+ use ssl || myconf="${myconf} USE_SSL=no"
+ use threads && myconf="${myconf} USE_THREADS=yes"
+
+ emake prefix="${EPREFIX}/usr" ${myconf}
+}
+
+src_install() {
+ local myconf
+ use ssl || myconf="${myconf} USE_SSL=no"
+ use threads && myconf="${myconf} USE_THREADS=yes"
+ emake DESTDIR="${D}" install prefix="${EPREFIX}/usr" ${myconf} mandir="${ED}/usr/share/man"
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+ dodoc README
+}
+
+pkg_preinst() {
+ # Fix existing log permissions for bug #458892.
+ chmod 0600 "${EROOT}/var/log/webfsd.log" 2>/dev/null
+}