diff options
author | 2013-01-11 10:43:39 +0000 | |
---|---|---|
committer | 2013-01-11 10:43:39 +0000 | |
commit | 58cf3090d8c0717470ad6899d8d60fa5a5bcdd4c (patch) | |
tree | 4cbfbfaf11d0402cd98d9eafa729ea43d2894e8c /www-apps | |
parent | Initial commit, required for www-apps/webdavcgi. (diff) | |
download | historical-58cf3090d8c0717470ad6899d8d60fa5a5bcdd4c.tar.gz historical-58cf3090d8c0717470ad6899d8d60fa5a5bcdd4c.tar.bz2 historical-58cf3090d8c0717470ad6899d8d60fa5a5bcdd4c.zip |
Initial commit, required for www-apps/webdavcgi.
Package-Manager: portage-2.1.11.38/cvs/Linux x86_64
Manifest-Sign-Key: 0xAE9C1E30!
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/webdavcgi/ChangeLog | 11 | ||||
-rw-r--r-- | www-apps/webdavcgi/Manifest | 19 | ||||
-rw-r--r-- | www-apps/webdavcgi/files/0.8.3-logout-var-expansion.patch | 21 | ||||
-rw-r--r-- | www-apps/webdavcgi/files/postinstall-en.txt | 29 | ||||
-rw-r--r-- | www-apps/webdavcgi/files/postinstall-webdavwrapper-en.txt | 32 | ||||
-rwxr-xr-x | www-apps/webdavcgi/files/reconfig | 32 | ||||
-rwxr-xr-x | www-apps/webdavcgi/files/reconfig-suid | 26 | ||||
-rw-r--r-- | www-apps/webdavcgi/metadata.xml | 24 | ||||
-rw-r--r-- | www-apps/webdavcgi/webdavcgi-0.8.3.ebuild | 105 |
9 files changed, 299 insertions, 0 deletions
diff --git a/www-apps/webdavcgi/ChangeLog b/www-apps/webdavcgi/ChangeLog new file mode 100644 index 000000000000..3149e39314fb --- /dev/null +++ b/www-apps/webdavcgi/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for www-apps/webdavcgi +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/webdavcgi/ChangeLog,v 1.1 2013/01/11 10:43:38 dev-zero Exp $ + +*webdavcgi-0.8.3 (11 Jan 2013) + + 11 Jan 2013; Tiziano Müller <dev-zero@gentoo.org> + +files/0.8.3-logout-var-expansion.patch, +files/postinstall-en.txt, + +files/postinstall-webdavwrapper-en.txt, +files/reconfig, + +files/reconfig-suid, +metadata.xml, +webdavcgi-0.8.3.ebuild: + Initial commit, required for www-apps/webdavcgi. diff --git a/www-apps/webdavcgi/Manifest b/www-apps/webdavcgi/Manifest new file mode 100644 index 000000000000..b17bc41e940d --- /dev/null +++ b/www-apps/webdavcgi/Manifest @@ -0,0 +1,19 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX 0.8.3-logout-var-expansion.patch 612 SHA256 606e3b10563b11069dfd5c3ece18cb3e5ace6c3f64271616769e06f0da42307d SHA512 8089e9f3614739c98b710da3c873f6667a012b16bbcfc13cb04707cdf9603677294d45a76d82a0c1e194dc15d4d8b09709448187f010181d86fcc68aae104943 WHIRLPOOL 9d1fec10272bea5e5cc657a803051e20fb98f63db6fbb5ecc312542a975355603ddc398b3e40d406a48217445826ae752e7227f2607232f8fe3e5d240dae64fb +AUX postinstall-en.txt 1133 SHA256 0c749d3de883357c4bd7beee1dfbe9ce1410a56726079c0286a35f5dc84b009e SHA512 207132fd11a1df46e2198fe7134da5db7a15de9b0778481059b088c41d5d8c7bcf2b39d4675cd8a9e65cd546f85693b1ab4ae9b64737985180eb3ff18d292c96 WHIRLPOOL 9f231bce94dfc2effa5cc254eb7e2bebc758b9b502fd1bdced07830b95c3e579234d36a4346771dd8924f3207e5cae7ebcdbb1922754e1d68a97ecda2158233b +AUX postinstall-webdavwrapper-en.txt 1279 SHA256 d3aafde60e52fe3506cc5c6d3fdc5d4b1b20d1a26b054cdaaaffe29b88b42ea3 SHA512 b670dba1bbd11e764bf7244c0b2194de475c16228ec7c7b0864b0131c0a9a10c2a2980df9caecabfa7252a4024c6976ee7060ef94bb2d5b6e3f985d3fa9ab031 WHIRLPOOL b589e1bc128ab2bb9735a837b5ea15e525f63ce93088e43d84961a10fe56b495101361b5257569456c8c4564474d2ec9afac62592d5a15b3869af277746627a1 +AUX reconfig 784 SHA256 4a5a7689b82e55fd9abf25f2abd52e26d3396b67c15360923695ed4791fee854 SHA512 415c692c26693296fc23161d70521d233543f37aeadfc12992cf4b36ee0f25c7c2eed354831767ccf2a386d4479c53534c23800c756cc7b678ef1f5ed60e32f4 WHIRLPOOL 2786c586fd1931c57548c60146c29c3acf35b781e6ec80f69e004a92cdf60ded6e9db78e0079f29fbb5e2ce6bedd981b6fc5b514eaa794910c46c1f75d3a8485 +AUX reconfig-suid 602 SHA256 dcb3e341cfd4bffe52adfa687b603043d73c989724a3a25b9abcd72166372759 SHA512 aa1563edce254668fb43110dc7d24293e926a6d5083da4a3879bcd5b4d205f1f9feae7bd6e0e00bda5303143346f6951e65318276720013ed7744a6d2c609eb2 WHIRLPOOL e09f6845fd0550a781845d5b0a5d8280e647531fa5c61c7184a1c4dd01734c999bcca9d175342559a50eaa3eb47f2325775eef85114ceb4394a83b4b37385eee +DIST webdavcgi-0.8.3.tar.bz2 1190975 SHA256 d8ca7feb1f25f6acce67a5ea769a089edd404660c85633dfbd6303696f1cd294 SHA512 f50e6bb1e78a88ab6bc6452c04f2e5d0cec86f6641d1813556ae3b06c33e2c9250e623926bf1a71ea10f6ca3912e708cb54cd0956b344329de1499887e48e784 WHIRLPOOL e05d0b2e5d6905d3c86e807c1f6b7544c1fa9629f310496648088c2a1a5bb491e507e492b80fa4beb6ab43f9f1d1bbfd095d1b670e3ca88e89b3605f5d790743 +EBUILD webdavcgi-0.8.3.ebuild 2759 SHA256 4d69d5e57ac1636759d79eb76c572fad57f14692c396f52c300d56c9e9efa8bf SHA512 0e3e5117f23837f0a58cac24a79fc2c2ceed0043b22e4e08cbb7b15ba739738ef615621269f6232283e26f0aedc8be5454ad02acbd1a04ce3292b1a24341f491 WHIRLPOOL 2aa78f521a97d0487094d32c205e9e8e2626a21425801edebc2f742fe837037916d2ddb18a6ea7e244123881f065f27a1a2dfee26c5d785c853fd21c9d1d4377 +MISC ChangeLog 541 SHA256 ece02672be5cd4134cc21fbf114af770329d1aafef643107465e98a5b7a19183 SHA512 223a6c63a7aa23c24a06f20c3cec1428eaebb65450d1ba48b0588500108e2ad046b76640fd12f87f90353523a09c5bc6b2dfa6d264ce455e9674a1e2ba260de8 WHIRLPOOL 543cc79bd413da7e1d8202edc4684b9a6429af14b4a7699a39ae9fcf69923dc2a2c3efb0d5a1f6033f05029d970566fa5930d765ddde4dcd87ece78dc2db88eb +MISC metadata.xml 994 SHA256 8d4aabf544e10106b79c9cecca330297df9a1f4728c1e24ace9bd15815167f56 SHA512 971a1c120fc7d4b3f6e574579e6b1bb3bebbdd7fe69389be3b89833258b4bcc6cb71381a5a6bbb75f0baa67c595e1ea29a6da1dfa49707b4490c8783c3f0b2d2 WHIRLPOOL fd9f148188e3b4a89e728b4be16410477b5f0cba0bbdcca6375c13fbbb69be6fc7e04d9b11d7f60cd7cd61ff251be118d94ffac6677892f7833df87f0e7a4705 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iEYEAREIAAYFAlDv7NsACgkQGwVqY66cHjCRhwCeNh4vd55kAkwDXu3YoP9wzIV6 +4V4AnR48gIEkD031Z5HZaidcjKj9hgMy +=/jek +-----END PGP SIGNATURE----- diff --git a/www-apps/webdavcgi/files/0.8.3-logout-var-expansion.patch b/www-apps/webdavcgi/files/0.8.3-logout-var-expansion.patch new file mode 100644 index 000000000000..739ff7f4c79b --- /dev/null +++ b/www-apps/webdavcgi/files/0.8.3-logout-var-expansion.patch @@ -0,0 +1,21 @@ +diff -ru cgi-bin.orig/logout-dist cgi-bin/logout-dist +--- cgi-bin.orig/logout-dist 2011-03-22 17:25:52.000000000 +0100 ++++ cgi-bin/logout-dist 2012-10-03 21:44:35.057437306 +0200 +@@ -34,13 +34,13 @@ + # ----- + ### REALM: the basic authentication realm + ### (must be equal to your AuthName value for Apache) +-REALM="Change Me" ++REALM="${REALM:=Change Me}" + + ### HOMEURL: the home URL +-HOMEURL="/changemyhomeurl" ++HOMEURL="${HOMEURL:=/changemyhomeurl}" + +-### TIMEOUT: the refresh timeout for the logut page +-TIMEOUT=0 ++### TIMEOUT: the refresh timeout for the logout page ++TIMEOUT=${TIMEOUT:=0} + + # SETUP END + diff --git a/www-apps/webdavcgi/files/postinstall-en.txt b/www-apps/webdavcgi/files/postinstall-en.txt new file mode 100644 index 000000000000..8aa6f95d87a2 --- /dev/null +++ b/www-apps/webdavcgi/files/postinstall-en.txt @@ -0,0 +1,29 @@ +Before you can run WebDAV CGI you need to configure your web server and WebDAV +CGI itself. + +The following configuration snippet serves as an example for the Apache HTTPD +web server. You will have to adapt it to suite your own server and configuration +needs. + + ScriptAlias /cgi-bin/ "${VHOST_CGIBINDIR}/" + + <Location /${VHOST_CGIBINDIR##*/}/> + AuthType Basic + AuthName "WebDAV-CGI" + AuthUserFile ${VHOST_ROOT}/etc/users.htpasswd + Require valid-user + Order Allow,Deny + Allow from all + </Location> + + RewriteEngine On + RewriteRule ^/${VHOST_APPDIR}/logout /${VHOST_CGIBINDIR##*/}/logout [PT,E=REALM:WebDAV-CGI,E=HOMEURL:/${VHOST_APPDIR},L] + RewriteRule ^/${VHOST_APPDIR} /${VHOST_CGIBINDIR##*/}/webdav.pl [PT,E=WEBDAVCONF:${VHOST_ROOT}/etc/webdav.conf,E=PERLLIB:${VHOST_ROOT}/lib/perl,L] + + +Afterwards you need to copy the default configuration file and edit it: +cp -p ${VHOST_ROOT}/etc/{webdav.conf-dist,webdav.conf} +\$EDITOR ${VHOST_ROOT}/etc/webdav.conf + +For further informations study the online documentation which is located at: +http://webdavcgi.sourceforge.net/doc.html diff --git a/www-apps/webdavcgi/files/postinstall-webdavwrapper-en.txt b/www-apps/webdavcgi/files/postinstall-webdavwrapper-en.txt new file mode 100644 index 000000000000..5f30d81be7b6 --- /dev/null +++ b/www-apps/webdavcgi/files/postinstall-webdavwrapper-en.txt @@ -0,0 +1,32 @@ +Before you can run WebDAV CGI you need to configure your web server and WebDAV +CGI itself. + +The following configuration snippet serves as an example for the Apache HTTPD +web server. You will have to adapt it to suite your own server and configuration +needs. + + ScriptAlias /cgi-bin/ "${VHOST_CGIBINDIR}/" + + <Location /${VHOST_CGIBINDIR##*/}/> + AuthType Basic + AuthName "WebDAV-CGI" + AuthUserFile ${VHOST_ROOT}/etc/users.htpasswd + Require valid-user + Order Allow,Deny + Allow from all + </Location> + + RewriteEngine On + RewriteRule ^/${VHOST_APPDIR}/logout /${VHOST_CGIBINDIR##*/}/logout [PT,E=REALM:WebDAV-CGI,E=HOMEURL:/${VHOST_APPDIR},L] + RewriteRule ^/${VHOST_APPDIR} /${VHOST_CGIBINDIR##*/}/webdavwrapper [PT,E=WEBDAVCONF:${VHOST_ROOT}/etc/webdav.conf,E=PERLLIB:${VHOST_ROOT}/lib/perl,L] + + +Afterwards you need to copy the default configuration file and edit it: +cp -p ${VHOST_ROOT}/etc/{webdav.conf-dist,webdav.conf} +\$EDITOR ${VHOST_ROOT}/etc/webdav.conf + +Also make sure that all system users which should be able to login to WebDAV CGI +are able to access the installed files below ${VHOST_ROOT}. + +For further informations study the online documentation which is located at: +http://webdavcgi.sourceforge.net/doc.html diff --git a/www-apps/webdavcgi/files/reconfig b/www-apps/webdavcgi/files/reconfig new file mode 100755 index 000000000000..07710dd7c3e9 --- /dev/null +++ b/www-apps/webdavcgi/files/reconfig @@ -0,0 +1,32 @@ +#!/bin/bash + +confDir="etc" +distConfFile="webdav.conf-dist" + +sedCmd="/bin/sed" + + +function die () +{ + echo "reconfig error: $1" >&2 + exit 1 +} + + +if [ $1 != "install" ]; then + # nothing to be done, exit + exit 0 +fi + +# Set the correct path within the config file +distConfFilePath="${VHOST_ROOT}/${confDir}/${distConfFile}" +if ! ${sedCmd} -i -e "s|^\(\$INSTALL_BASE\)=.*|\1='${VHOST_ROOT}/';|" \ + ${distConfFilePath} +then + die "Setting INSTALL_BASE path in ${distConfFilePath} failed" +fi + + +# Adding logout support +# see: http://webdavcgi.sourceforge.net/doc.html#logout +echo "\$HEADER = '<div class=\"header\">WebDAV CGI - Web interface: You are logged in as <span title="'.`id -a`.'">' .\$ENV{REMOTE_USER}.'</span> (<a href="/logout">Logout</a>).</div>';" >> ${distConfFilePath} diff --git a/www-apps/webdavcgi/files/reconfig-suid b/www-apps/webdavcgi/files/reconfig-suid new file mode 100755 index 000000000000..d7fb87722614 --- /dev/null +++ b/www-apps/webdavcgi/files/reconfig-suid @@ -0,0 +1,26 @@ +#!/bin/bash + +webDavWrapper="webdavwrapper" +webDavWrapperPath="${VHOST_CGIBINDIR}/${webDavWrapper}" + +chmodCmd="/bin/chmod" +chownCmd="/bin/chown" + + +function die () +{ + echo "reconfig error: $1" >&2 + exit 1 +} + +if [ $1 = "install" ]; 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) + if ! ${chownCmd} root:root ${webDavWrapperPath}; then + die "Chown for ${webDavWrapperPath} failed" + fi + + if ! ${chmodCmd} 6755 ${webDavWrapperPath}; then + die "Setting SUID and SGID bit on ${webDavWrapperPath} failed" + fi +fi diff --git a/www-apps/webdavcgi/metadata.xml b/www-apps/webdavcgi/metadata.xml new file mode 100644 index 000000000000..8a6e558dc2d6 --- /dev/null +++ b/www-apps/webdavcgi/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>christian.affolter@stepping-stone.ch</email> + <description>Maintainer</description> + </maintainer> + <maintainer> + <email>dev-zero@gentoo.org</email> + <description>Proxy maintainer</description> + </maintainer> + <longdescription> + WebDAV CGI is a Perl CGI script that enables the WebDAV protocol + (class 1,2,3) for Web server to manage Web sites or to use a Web server + as a Web drive for files, or for calendar/addressbook sharing. If you + need correct permissions for files and folders you can install this + WebDAV CGI script and a UID/GID wrapper. The Apache module mod_dav does + not support UID/GID wrapping, so this implementation fills up this gap + as a complete replacement. + </longdescription> + <use> + <flag name="rcs">Adds support for a revision controlled backend with RCS (<pkg>dev-vcs/rcs</pkg>)</flag> + </use> +</pkgmetadata> diff --git a/www-apps/webdavcgi/webdavcgi-0.8.3.ebuild b/www-apps/webdavcgi/webdavcgi-0.8.3.ebuild new file mode 100644 index 000000000000..20f27cd6735d --- /dev/null +++ b/www-apps/webdavcgi/webdavcgi-0.8.3.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/webdavcgi/webdavcgi-0.8.3.ebuild,v 1.1 2013/01/11 10:43:38 dev-zero Exp $ + +EAPI=4 + +inherit eutils toolchain-funcs webapp + +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" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="~amd64" +IUSE="mysql postgres rcs samba +sqlite +suid" + +DEPEND="" +RDEPEND="dev-perl/Archive-Zip + dev-perl/File-Copy-Link + dev-perl/PerlIO-gzip + dev-perl/Quota + dev-perl/TimeDate + dev-perl/URI + dev-perl/UUID-Tiny + dev-perl/XML-Simple + media-gfx/graphicsmagick[perl] + mysql? ( dev-perl/DBD-mysql ) + perl-core/Module-Load + postgres? ( dev-perl/DBD-Pg ) + rcs? ( dev-perl/Rcs ) + samba? ( dev-perl/Filesys-SmbClient ) + sqlite? ( dev-perl/DBD-SQLite ) + virtual/perl-CGI + virtual/perl-File-Spec" + +need_httpd_cgi + +REQUIRED_USE="|| ( mysql postgres sqlite )" + +CGIBINDIR="cgi-bin" + +src_prepare() { + epatch "${FILESDIR}/${PV}-logout-var-expansion.patch" +} + +src_compile() { + if use suid; then + $(tc-getCC) ${LDFLAGS} ${CFLAGS} \ + -o "${CGIBINDIR}/webdavwrapper" \ + helper/webdavwrapper.c || die "compile webdavwrapper failed" + fi +} + +src_install() { + webapp_src_preinst + + local htdocsDir='htdocs' + local confDir='etc' + + local installDirs="$confDir lib locale" + + insinto "${MY_HTDOCSDIR}" + doins -r "${htdocsDir}"/* + + exeinto "${MY_CGIBINDIR}" + newexe "${CGIBINDIR}/logout-dist" logout + + doexe "${CGIBINDIR}/webdav.pl" + use suid && doexe "${CGIBINDIR}/webdavwrapper" + + local currentDir + for currentDir in ${installDirs}; do + dodir "${MY_HOSTROOTDIR}/${currentDir}" + insinto "${MY_HOSTROOTDIR}/${currentDir}" + doins -r "${currentDir}"/* + done + + webapp_configfile "${MY_HOSTROOTDIR}/${confDir}"/{webdav.conf-dist,mime.types} + + use mysql && webapp_sqlscript mysql sql/mysql.sql + use postgres && webapp_sqlscript postgres sql/postgresql.sql + + dodoc CHANGELOG TODO + dohtml -r doc/* + + webapp_hook_script "${FILESDIR}/reconfig" + + webapp_src_install + + # 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) + if use suid; then + einfo "Setting SUID and SGID bit for webdavwrapper" + fowners root:root "${MY_CGIBINDIR}/webdavwrapper" + fperms 6755 "${MY_CGIBINDIR}/webdavwrapper" + webapp_postinst_txt en "${FILESDIR}/postinstall-webdavwrapper-en.txt" + webapp_hook_script "${FILESDIR}/reconfig-suid" + else + ewarn "You have the 'suid' USE flag disabled" + ewarn "WebDAV CGI won't be able to switch user ids" + webapp_postinst_txt en "${FILESDIR}/postinstall-en.txt" + fi +} |