summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Affolter <c.affolter@stepping-stone.ch>2016-10-23 13:25:41 +0200
committerGöktürk Yüksek <gokturk@gentoo.org>2016-11-16 18:49:34 -0500
commit4c4dd65a7b97bab2fd4fffe39f33f637652d1711 (patch)
tree641e0b8875ab5009a2572db51100b6e32c6aa58f /www-apps/webdavcgi
parentdev-perl/DateTime-Format-Human-Duration: Initial ebuild (diff)
downloadgentoo-4c4dd65a7b97bab2fd4fffe39f33f637652d1711.tar.gz
gentoo-4c4dd65a7b97bab2fd4fffe39f33f637652d1711.tar.bz2
gentoo-4c4dd65a7b97bab2fd4fffe39f33f637652d1711.zip
www-apps/webdavcgi: Version bump to 1.1.1
Added new upstream 1.1.1 WebDAV CGI release with the following changes: * Switched to EAPI 6 * Updated dependencies * Moved temporary directories from /var/cache to /var/tmp (to make QA happy) * Pre-create trash and optimizer directory * Added updated Apache HTTP configuration snipped for version 2.4 * Added updated wedav 1.1 configuration * Added note for systemd users Gentoo-Bug: 595060
Diffstat (limited to 'www-apps/webdavcgi')
-rw-r--r--www-apps/webdavcgi/Manifest1
-rw-r--r--www-apps/webdavcgi/files/apache-webdavcgi-1.1-example.conf63
-rw-r--r--www-apps/webdavcgi/files/webdav-1.1.conf125
-rw-r--r--www-apps/webdavcgi/webdavcgi-1.1.1.ebuild185
4 files changed, 374 insertions, 0 deletions
diff --git a/www-apps/webdavcgi/Manifest b/www-apps/webdavcgi/Manifest
index a60eeb13801..125ed7386cb 100644
--- a/www-apps/webdavcgi/Manifest
+++ b/www-apps/webdavcgi/Manifest
@@ -1,2 +1,3 @@
DIST webdavcgi-0.8.3.tar.bz2 1190975 SHA256 d8ca7feb1f25f6acce67a5ea769a089edd404660c85633dfbd6303696f1cd294 SHA512 f50e6bb1e78a88ab6bc6452c04f2e5d0cec86f6641d1813556ae3b06c33e2c9250e623926bf1a71ea10f6ca3912e708cb54cd0956b344329de1499887e48e784 WHIRLPOOL e05d0b2e5d6905d3c86e807c1f6b7544c1fa9629f310496648088c2a1a5bb491e507e492b80fa4beb6ab43f9f1d1bbfd095d1b670e3ca88e89b3605f5d790743
DIST webdavcgi-0.8.4.tar.bz2 1195935 SHA256 d04438a515a770502117b4219ebb5406ed1ab949420802d0ce623fe3f61038ef SHA512 17d9dcfe68012820bf809bc3bd54a881fc9e66a9ddfd87d9381ec0cb08abe3f81638afba4d28ab3079ed56cf1e263b4a764b8348691f17a06743bb1ddf3a2a4e WHIRLPOOL 86d65aad94cd6461f72c39d39f1beb0c24b049a50072ef3b4e16629b388ec562136ee0cb2f93674eaf9342feac077540e98f78b22ad186cf4592cf8d53cbc530
+DIST webdavcgi-1.1.1.tar.bz2 11623234 SHA256 0806ac2c80ad1aba9e8bf9a562ee7884601ece7a59728a91dd83ca542255f0b8 SHA512 660b3e54d72c5b96c1fb329d8e0838b1dbf68e1671af3880f7e096bfdfe559909cf3e1e3069fe4877e0ffbd67d24dc4a38c3db8baaae6d62db05bde31cea789f WHIRLPOOL 952a98c2a15db429ecc3f01f526212d8f4940149ce8585bfb2aa43c0378a8036700c46cd3e1d43a1af9763a665f49e8effbe5e9472a673b8a3e1acdd0ce4220d
diff --git a/www-apps/webdavcgi/files/apache-webdavcgi-1.1-example.conf b/www-apps/webdavcgi/files/apache-webdavcgi-1.1-example.conf
new file mode 100644
index 00000000000..4ee926fbd7c
--- /dev/null
+++ b/www-apps/webdavcgi/files/apache-webdavcgi-1.1-example.conf
@@ -0,0 +1,63 @@
+# Example Apache HTTP server configuration snippet for WebDAV CGI
+#
+# Add the following lines to the Apache HTTP virtual host which should run
+# WebDAV CGI.
+#
+# WebDAV CGI will be accessible via http://www.example.com/webdav/ and uses
+# basic HTTP authentication (by default). For this to work, you need to add all
+# valid users to the AuthUserFile with the help of the htpasswd command:
+#
+# htpasswd -c /etc/webdavcgi-1.1/default/users.htpasswd user1
+# htpasswd /etc/webdavcgi-1.1/default/users.htpasswd user2
+#
+# Note, that if you have the UID/GID wrapper enabled (USE=suid), WebDAV CGI will
+# switch to the login user after a successful login, thus the users within the
+# AuthType need to be present on the system as well.
+#
+# You probably want to review and change the following settings:
+# - /webdavcgi should point to your desired webdavwrapper, which is either
+# webdavwrapper, webdavwrapper-afs, webdavwrapper-krb or in case you disabled
+# the UID/GID wrapper (USE=-suid), webdav.pl
+#
+# - The /webdav location
+# If you change this location, make sure to reflect the new path within the
+# WebDAV CGI configuration (WEBDAVCONF -> $VIRTUAL_BASE) as well.
+#
+# - The authentication provider and/or AuthUserFile
+#
+# - The HOMEURL environment variable. After a user logs out, the browser will
+# be redirected to this URL.
+#
+# - The WEBDAVCONF environment variable has to point to your configuration
+#
+# For further informations and other configuration possibilities consult the
+# WebDAV CGI documentation which is located at http://webdavcgi.sourceforge.net
+# and the Apache HTTP server documentation at https://httpd.apache.org/docs/
+#
+ ScriptAlias /webdavcgi "/usr/libexec/webdavcgi-1.1/cgi-bin/webdavwrapper"
+ ScriptAlias /webdav/logout "/usr/libexec/webdavcgi-1.1/cgi-bin/logout"
+
+ <Location /webdav>
+ Require all granted
+ # Disable the line above and enable the two lines below
+ # if you're still on Apache 2.2
+ #Order Allow,Deny
+ #Allow from all
+ </Location>
+
+ <Location /webdavcgi>
+ AuthType Basic
+ AuthName "WebDAV-CGI"
+ AuthUserFile /etc/webdavcgi-1.1/default/users.htpasswd
+ Require valid-user
+ # Also enable the following two lines if you're still on Apache 2.2
+ #Order Allow,Deny
+ #Allow from all
+ </Location>
+
+
+ RewriteEngine On
+
+ RewriteRule ^/webdav/logout - [L,E=REALM:WebDAV-CGI,E=HOMEURL:/webdav,E=TIMEOUT:5]
+
+ RewriteRule ^/webdav /webdavcgi [PT,L,E=WEBDAVCONF:/etc/webdavcgi-1.1/default/webdav.conf,E=PERLLIB:/usr/share/webdavcgi-1.1/lib/perl,E=LOGOUTURL:/webdav/logout]
diff --git a/www-apps/webdavcgi/files/webdav-1.1.conf b/www-apps/webdavcgi/files/webdav-1.1.conf
new file mode 100644
index 00000000000..60a08c81922
--- /dev/null
+++ b/www-apps/webdavcgi/files/webdav-1.1.conf
@@ -0,0 +1,125 @@
+#########################################################################
+############ S E T U P #################################################
+
+## -- INSTALL_BASE
+## folder path to the webdav.conf, .css, .js, and. msg files for the Web interface
+## (don't forget the trailing slash)
+## DEFAULT: $INSTALL_BASE=q{} # use webdav.pl script path
+$INSTALL_BASE = '/usr/share/webdavcgi-1.1/';
+
+## -- VIRTUAL_BASE
+## only neccassary if you use redirects or rewrites from a VIRTUAL_BASE to the DOCUMENT_ROOT;
+## regular expressions are allowed
+## EXAMPLE: $VIRTUAL_BASE = qr{/}xms
+$VIRTUAL_BASE = '/webdav';
+
+## -- DOCUMENT_ROOT
+## by default the server document root
+## (don't forget a trailing slash q{/}):
+$DOCUMENT_ROOT = '/home/';
+
+## -- UMASK
+## mask for file/folder creation
+## (it does not change permission of existing files/folders):
+## DEFAULT: $UMASK = oct 2; # read/write/execute for users and groups, others get read/execute permissions
+$UMASK = 0007;
+
+## -- MIMEFILE
+## path to your MIME types file
+## EXAMPLE: $MIMEFILE = '/etc/mime.types';
+$MIMEFILE = '/etc/webdavcgi-1.1/default/mime.types';
+
+## -- ENABLE_COMPRESSION
+## enables/disables gzip content encoding for the Web interface
+## EXAMPLE: $ENABLE_COMPRESSION = 1;
+$ENABLE_COMPRESSION = 0;
+
+## -- ENABLE_DAVMOUNT
+## enables DAV mount button in the folder navigation of the Web interface
+## DEFAULT: $ENABLE_DAVMOUNT = 0;
+$ENABLE_DAVMOUNT = 1;
+
+
+## -- HEADER
+## content after body tag in the Web interface
+$HEADER =
+q{<div class="header">WebDAV CGI - Web interface: You are logged in as ${USER} (<a href="$ENV{LOGOUTURL}" style="color:inherit;">Logout</a>) <div style="float:right;font-size:0.8em;">$NOW</div></div>.};
+
+## -- DBI_(SRC/USER/PASS)
+## database setup for LOCK/UNLOCK/PROPPATCH/PROPFIND data
+##
+## SQLite config
+## If users share the same folder they should use the same database
+## in this case you have to use a single file writeable for all users.
+#$DBI_SRC='dbi:SQLite:dbname=/var/lib/webdavcgi/1.1/default/webdav.db';
+#$DBI_USER='';
+#$DBI_PASS='';
+#$CREATE_DB = !-e '/var/lib/webdavcgi/1.1/default/webdav.db';
+
+## MySQL config
+#$DBI_SRC='DBI:mysql:database=webdavcgi;host=localhost;port=3306';
+#$DBI_USER='mysqluser';
+#$DBI_PASS='changeme';
+#$CREATE_DB=0;
+
+## PostgreSQL config
+#$DBI_SRC='dbi:Pg:dbname=webdavcgi;host=localhost;port=5432';
+#$DBI_USER='pguser';
+#$DBI_PASS='changeme';
+#$CREATE_DB = 0;
+
+## -- ENABLE_CALDAV
+## enable CalDAV support for Lightning/Sunbird/iCal/iPhone calender/task support
+$ENABLE_CALDAV = 0;
+
+## -- ENABLE_CARDDAV
+## enable CardDAV support for Apple's Addressbook
+$ENABLE_CARDDAV = 0;
+
+## -- ENABLE_TRASH
+## enables the server-side trash can (don't forget to setup $TRASH_FOLDER)
+$ENABLE_TRASH = 0;
+
+## -- TRASH_FOLDER
+## neccessary if you enable trash
+## it should be writable by your users (chmod a+rwxt <trash folder>)
+## EXAMPLE: $TRASH_FOLDER = '/tmp/trash';
+$TRASH_FOLDER = '/var/tmp/webdavcgi/1.1/default/trash';
+
+## -- ENABLE_GROUPDAV
+## enables GroupDAV (http://groupdav.org/draft-hess-groupdav-01.txt)
+## EXAMPLE: $ENABLE_GROUPDAV = 0;
+$ENABLE_GROUPDAV = 0;
+
+## -- ENABLE_THUMBNAIL
+## enables image thumbnail support and media rss feed for folder listings of the Web interface.
+## If enabled the default icons for images will be replaced by thumbnails
+## and if the mouse is over a icon the icon will be zoomed to the size of $THUMBNAIL_WIDTH.
+## DEFAULT: $ENABLE_THUMBNAIL = 0;
+$ENABLE_THUMBNAIL = 0;
+
+## -- THUMBNAIL_CACHEDIR
+## defines the path to a cache directory for image thumbnails
+## this is neccessary if you enable the thumbnail cache ($ENABLE_THUMBNAIL_CACHE)
+## EXAMPLE: $THUMBNAIL_CACHEDIR=".thumbs";
+$THUMBNAIL_CACHEDIR = '/var/tmp/webdavcgi/1.1/default/thumbnails';
+
+## -- OPTIMIZERTMP
+### defines absolute path to a cache directory
+$OPTIMIZERTMP = '/var/tmp/webdavcgi/1.1/default/optimized';
+
+## -- BACKEND
+## defines the WebDAV/Web interface backend (see $INSTALL_BASE/lib/perl/Backend/<BACKEND> for supported backends)
+$BACKEND = 'FS';
+
+## -- BACKEND_CONFIG
+## allowes backend specific configurations (see doc/doc.html)
+## EXAMPLE: $BACKEND_CONFIG{FS}={ fsvlink=> { '/home/testuser/' => {'testlink' => '/home/testuser/testlinkdest' } }}
+
+## -- DEBUG
+## enables/disables debug output
+## you can find the debug output in your web server error log
+$DEBUG = 0;
+
+############ S E T U P - END ###########################################
+#########################################################################
diff --git a/www-apps/webdavcgi/webdavcgi-1.1.1.ebuild b/www-apps/webdavcgi/webdavcgi-1.1.1.ebuild
new file mode 100644
index 00000000000..501abfcebe8
--- /dev/null
+++ b/www-apps/webdavcgi/webdavcgi-1.1.1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils toolchain-funcs versionator
+
+DESCRIPTION="A Perl CGI for accessing and sharing files, or calendar/addressbooks via WebDAV."
+HOMEPAGE="http://webdavcgi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+
+# Provide slotting on minor versions. WebDAV CGI is a web application which
+# can be shared by multiple instances and thus major updates shouldn't be
+# enforced to all users/instances at the same time.
+SLOT="$(get_version_component_range 1-2)"
+
+KEYWORDS="~amd64"
+IUSE="afs git kerberos ldap mysql pdf postgres rcs samba +sqlite +suid"
+
+DEPEND=""
+RDEPEND="afs? ( net-fs/openafs )
+ dev-lang/perl
+ dev-perl/Archive-Zip
+ dev-perl/CGI
+ dev-perl/DateTime
+ dev-perl/DateTime-Format-Human-Duration
+ dev-perl/File-Copy-Link
+ dev-perl/JSON
+ dev-perl/List-MoreUtils
+ dev-perl/MIME-tools
+ dev-perl/PerlIO-gzip
+ dev-perl/Quota
+ dev-perl/TimeDate
+ dev-perl/URI
+ dev-perl/UUID-Tiny
+ dev-perl/XML-Simple
+ git? ( dev-vcs/git )
+ kerberos? ( virtual/krb5 )
+ ldap? ( dev-perl/perl-ldap )
+ media-gfx/graphicsmagick[perl]
+ media-libs/exiftool
+ mysql? ( dev-perl/DBD-mysql )
+ pdf? ( app-text/ghostscript-gpl )
+ postgres? ( dev-perl/DBD-Pg )
+ rcs? ( dev-perl/Rcs )
+ samba? ( net-fs/cifs-utils dev-perl/Filesys-SmbClient )
+ sqlite? ( dev-perl/DBD-SQLite )
+ virtual/perl-File-Spec
+ virtual/perl-Module-Load
+ || ( virtual/httpd-cgi virtual/httpd-fastcgi )"
+
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+
+CGIBINDIR="cgi-bin"
+
+src_compile() {
+ if use suid; then
+ WEBDAVWRAPPERS="webdavwrapper" # Standard UID/GID wrapper
+
+ use afs && WEBDAVWRAPPERS+=" webdavwrapper-afs"
+ use kerberos && WEBDAVWRAPPERS+=" webdavwrapper-krb"
+
+ export WEBDAVWRAPPERS
+
+ local wrapper
+ for wrapper in ${WEBDAVWRAPPERS}; do
+ $(tc-getCC) ${LDFLAGS} ${CFLAGS} \
+ -o "${CGIBINDIR}/${wrapper}" \
+ "helper/${wrapper}.c" || die "compile ${wrapper} failed"
+ done
+ fi
+}
+
+src_install() {
+ exeinto "/usr/libexec/${PN}-${SLOT}/${CGIBINDIR}"
+ newexe "${CGIBINDIR}/logout-dist" "logout"
+ doexe "${CGIBINDIR}/webdav.pl"
+
+ use afs && doexe "${CGIBINDIR}/afswrapper"
+ use samba && doexe "${CGIBINDIR}/smbwrapper"
+
+ if use suid; then
+ # In order to change the user and group ID at runtime, the webdavwrapper
+ # needs to be run as root (set-user-ID and set-group-ID bit)
+ exeopts -o root -g root -m 6755
+
+ local wrapper
+ for wrapper in ${WEBDAVWRAPPERS}; do
+ einfo "Installing UID/GID wrapper ${wrapper}"
+ doexe "${CGIBINDIR}/${wrapper}"
+ done
+
+ # reset install opts
+ exeopts
+ else
+ ewarn "You have the 'suid' USE flag disabled"
+ ewarn "WebDAV CGI won't be able to switch user ids"
+ fi
+
+ local confDir='etc'
+ local webdavConfDir="/etc/${PN}-${SLOT}/default"
+
+ export WEBDAVCONFIG="${webdavConfDir}/webdav.conf"
+
+ insinto "${webdavConfDir}"
+ doins "${confDir}/mime.types"
+ newins "${FILESDIR}/webdav-${SLOT}.conf" "webdav.conf"
+
+ local installBaseDir="/usr/share/${PN}-${SLOT}"
+ local currentDir
+ for currentDir in htdocs lib locale templates; do
+ insinto "${installBaseDir}/${currentDir}"
+ doins -r "${currentDir}"/*
+ done
+
+ if use mysql || use postgres; then
+ local sqlDir='sql'
+ insinto "${installBaseDir}/${sqlDir}"
+ use mysql && doins "${sqlDir}/mysql.sql"
+ use postgres && doins "${sqlDir}/postgresql.sql"
+ fi
+
+ if use sqlite; then
+ # Directory where the SQLite database resides
+ local sqliteRootDir="/var/lib/${PN}/${SLOT}"
+ keepdir "${sqliteRootDir}"
+
+ # Default database directory where all users are able to create and
+ # share the databases, this can be changed within the config file and
+ # restricted to user/group only access if required.
+ export SQLITEDIR="${sqliteRootDir}/default"
+ keepdir "${SQLITEDIR}"
+ fperms 1777 "${SQLITEDIR}"
+ fi
+
+ # Create default temporary directories, writable by all users
+ export TMPDIRS="trash thumbnails optimized"
+ for tmpDir in ${TMPDIRS}; do
+ keepdir "/var/tmp/${PN}/${SLOT}/default/${tmpDir}"
+ fperms 1777 "/var/tmp/${PN}/${SLOT}/default/${tmpDir}"
+ done
+
+ export APACHEEXAMPLECONFIG="apache-webdavcgi-${SLOT}-example.conf"
+ dodoc CHANGELOG
+ dodoc etc/webdav.conf.complete
+ dodoc "${FILESDIR}/${APACHEEXAMPLECONFIG}"
+ dodoc -r "doc/"
+}
+
+pkg_postinst() {
+ ewarn "In order to allow different users to create and share files,"
+ ewarn "some directories were installed with world write access by default."
+ ewarn "To set restrictive permissions, add all WebDAV CGI users to a"
+ ewarn "common group, and allow access to the following directories by this"
+ ewarn "group only."
+ ewarn "Temp directories: /var/tmp/${PN}/${SLOT}/default/*"
+ use sqlite && ewarn "SQLite directory: ${SQLITEDIR}"
+
+ elog
+ elog "The WebDAV CGI config is located at ${WEBDAVCONFIG}."
+ elog
+ elog "An example Apache HTTP server configuration snippet is available in"
+ elog "${ROOT%/}/usr/share/doc/${PF} in the file ${APACHEEXAMPLECONFIG}"
+ elog
+ elog "An important note to systemd user's running the Apache HTTP server:"
+ elog "The default apache2.service will be started with private file system"
+ elog "namespaces for /var/tmp and /tmp enabled (PrivateTmp=true)."
+ elog "This means that you either need to disable PrivateTmp, relocate the"
+ elog "directories starting with /var/tmp within ${WEBDAVCONFIG}"
+ elog "or pre-create the directory structure with a user defined systemd"
+ elog "companion unit using the JoinsNamespaceOf directive."
+ elog
+ elog "To disable the private file system namespace, override the existing"
+ elog "service:"
+ elog "systemctl edit apache2.service"
+ elog "[Service]"
+ elog "PrivateTmp=false"
+
+ einfo
+ einfo "Detailed installation and configuration instructions can be found at"
+ einfo "http://webdavcgi.sourceforge.net/"
+}