Rework this port to make it work with nginx(8) by default.
This commit is contained in:
parent
5fed2c67d3
commit
c53475efba
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.62 2014/03/16 09:58:10 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.63 2014/03/22 09:40:21 ajacoutot Exp $
|
||||
|
||||
COMMENT= easy and universal access to shared and/or personnal files
|
||||
|
||||
V= 6.0.2
|
||||
DISTNAME= owncloud-${V}
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
CATEGORIES= www
|
||||
|
||||
@ -39,13 +39,13 @@ SUBST_VARS= INSTDIR TINSTDIR MODPHP_BIN
|
||||
|
||||
RUN_DEPENDS= lang/php/${MODPHP_VERSION},-curl \
|
||||
lang/php/${MODPHP_VERSION},-gd \
|
||||
lang/php/${MODPHP_VERSION},-intl \
|
||||
lang/php/${MODPHP_VERSION},-mcrypt \
|
||||
lang/php/${MODPHP_VERSION},-xmlrpc \
|
||||
lang/php/${MODPHP_VERSION},-zip
|
||||
|
||||
do-install:
|
||||
cp -Rp ${WRKSRC} ${INSTDIR}
|
||||
${SUBST_CMD} -c ${FILESDIR}/owncloud.conf \
|
||||
${INSTDIR}/owncloud.conf.dist
|
||||
mv ${INSTDIR}/.htaccess ${INSTDIR}/.htaccess.dist
|
||||
find ${INSTDIR} -name '*.orig' -print0 | xargs -r0 rm
|
||||
chown -R ${BINOWN}:${BINGRP} ${INSTDIR}
|
||||
|
@ -1,11 +0,0 @@
|
||||
# $OpenBSD: owncloud.conf,v 1.3 2012/06/02 06:54:57 ajacoutot Exp $
|
||||
|
||||
<IfModule !mod_rewrite.c>
|
||||
LoadModule rewrite_module /usr/lib/apache/modules/mod_rewrite.so
|
||||
</IfModule>
|
||||
|
||||
Alias /owncloud ${TINSTDIR}
|
||||
|
||||
<Directory "${TINSTDIR}">
|
||||
AllowOverride All
|
||||
</Directory>
|
12
www/owncloud/patches/patch-lib_private_setup_php
Normal file
12
www/owncloud/patches/patch-lib_private_setup_php
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-lib_private_setup_php,v 1.1 2014/03/22 09:40:21 ajacoutot Exp $
|
||||
--- lib/private/setup.php.orig Mon Mar 3 15:11:46 2014
|
||||
+++ lib/private/setup.php Sat Mar 22 10:08:40 2014
|
||||
@@ -66,7 +66,7 @@ class OC_Setup {
|
||||
|
||||
//write the config file
|
||||
OC_Config::setValue('trusted_domains', array(OC_Request::serverHost()));
|
||||
- OC_Config::setValue('datadirectory', $datadir);
|
||||
+ OC_Config::setValue('datadirectory', '/owncloud-data');
|
||||
OC_Config::setValue('dbtype', $dbtype);
|
||||
OC_Config::setValue('version', implode('.', OC_Util::getVersion()));
|
||||
try {
|
12
www/owncloud/patches/patch-lib_private_util_php
Normal file
12
www/owncloud/patches/patch-lib_private_util_php
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-lib_private_util_php,v 1.1 2014/03/22 09:40:21 ajacoutot Exp $
|
||||
--- lib/private/util.php.orig Sat Mar 22 09:35:38 2014
|
||||
+++ lib/private/util.php Sat Mar 22 09:36:58 2014
|
||||
@@ -339,7 +339,7 @@ class OC_Util {
|
||||
);
|
||||
}
|
||||
}
|
||||
- $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
|
||||
+ $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", "/owncloud-data" );
|
||||
// Create root dir.
|
||||
if(!is_dir($CONFIG_DATADIRECTORY)) {
|
||||
$success=@mkdir($CONFIG_DATADIRECTORY);
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.34 2014/03/16 09:58:10 ajacoutot Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.35 2014/03/22 09:40:21 ajacoutot Exp $
|
||||
@extra owncloud/config/config.php
|
||||
owncloud/
|
||||
owncloud/.htaccess.dist
|
||||
@ -2785,8 +2785,8 @@ owncloud/3rdparty/zxcvbn/js/zxcvbn.js
|
||||
owncloud/3rdparty/zxcvbn/js/zxcvbn.min.js
|
||||
owncloud/AUTHORS
|
||||
owncloud/COPYING-AGPL
|
||||
@group www
|
||||
@mode 0775
|
||||
@group www
|
||||
owncloud/apps/
|
||||
@mode
|
||||
@group
|
||||
@ -11099,8 +11099,6 @@ owncloud/ocs/
|
||||
owncloud/ocs/providers.php
|
||||
owncloud/ocs/routes.php
|
||||
owncloud/ocs/v1.php
|
||||
owncloud/owncloud.conf.dist
|
||||
@sample /var/www/conf/modules.sample/owncloud.conf
|
||||
owncloud/public.php
|
||||
owncloud/remote.php
|
||||
owncloud/robots.txt
|
||||
@ -11262,7 +11260,7 @@ owncloud/themes/README
|
||||
owncloud/version.php
|
||||
@mode 0770
|
||||
@group www
|
||||
@sample owncloud/data/
|
||||
@sample owncloud-data/
|
||||
@mode
|
||||
@group
|
||||
@cwd ${LOCALBASE}/share/doc/pkg-readmes
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: README,v 1.22 2014/03/16 09:58:10 ajacoutot Exp $
|
||||
$OpenBSD: README,v 1.23 2014/03/22 09:40:21 ajacoutot Exp $
|
||||
|
||||
+-----------------------------------------------------------------------
|
||||
| Running ${FULLPKGNAME} on OpenBSD
|
||||
@ -6,47 +6,96 @@ $OpenBSD: README,v 1.22 2014/03/16 09:58:10 ajacoutot Exp $
|
||||
|
||||
ownCloud is installed under
|
||||
${INSTDIR}
|
||||
It should point to the root directory of the HTTP server. e.g.
|
||||
# ln -s ../owncloud /var/www/htdocs/owncloud
|
||||
|
||||
Post-installation instructions
|
||||
==============================
|
||||
With Apache, AllowOverride settings are required on the ${INSTDIR}
|
||||
directory. You can configure this as follows:
|
||||
# ln -sf /var/www/conf/modules.sample/owncloud.conf /var/www/conf/modules
|
||||
|
||||
"allow_url_fopen" needs to be enabled in PHP using _one_ of the
|
||||
following methods:
|
||||
1. ${SYSCONFDIR}/php-${MODPHP_VERSION}.ini
|
||||
allow_url_fopen = On
|
||||
2. /var/www/conf/httpd.conf (main server or VirtualHost)
|
||||
php_admin_value allow_url_fopen 1
|
||||
|
||||
The maximum upload size for files can be modified in
|
||||
${INSTDIR}/.htaccess
|
||||
|
||||
When not using Apache, make _sure_ to set the data directory to a
|
||||
location outside of the document root.
|
||||
|
||||
ownCloud attempts to use the UTF-8 locale, which does not work inside
|
||||
the /var/www chroot by default. This causes warning messages in
|
||||
ownCloud's admin configuration page and log. To prevent this problem,
|
||||
ownCloud attempts to use the UTF-8 locale, which does not work by
|
||||
default inside the /var/www chroot. This causes warning messages in
|
||||
ownCloud's admin configuration page and logs. To prevent this problem,
|
||||
run the following as root:
|
||||
# mkdir -p /var/www/usr/share/locale/UTF-8/
|
||||
# cp /usr/share/locale/UTF-8/LC_CTYPE \
|
||||
/var/www/usr/share/locale/UTF-8/
|
||||
|
||||
Database Configuration
|
||||
nginx(8) configuration
|
||||
----------------------
|
||||
|
||||
The following configuration chunk must be added to the server {} block:
|
||||
|
||||
-8<---------------------------------------------------------------------
|
||||
client_max_body_size 10G; # set max upload size
|
||||
fastcgi_buffers 64 4K;
|
||||
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
|
||||
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
|
||||
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
|
||||
error_page 403 /core/templates/403.php;
|
||||
error_page 404 /core/templates/404.php;
|
||||
|
||||
|
||||
location ~ ^(.+?\.php)(/.*)?$ {
|
||||
try_files $1 = 404;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
||||
fastcgi_param PATH_INFO $2;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
}
|
||||
|
||||
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
# The following 2 rules are only needed with webfinger
|
||||
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
|
||||
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
|
||||
|
||||
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
|
||||
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
|
||||
|
||||
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
|
||||
|
||||
try_files $uri $uri/ index.php;
|
||||
}
|
||||
|
||||
# Optional: set long EXPIRES header on static assets
|
||||
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
||||
expires 30d;
|
||||
# Optional: Don't log access to assets
|
||||
access_log off;
|
||||
}
|
||||
-8<---------------------------------------------------------------------
|
||||
|
||||
PHP configuration
|
||||
-----------------
|
||||
Default PHP values should be adapted according to the setup by editing:
|
||||
${SYSCONFDIR}/php-${MODPHP_VERSION}.ini
|
||||
|
||||
allow_url_fopen = On
|
||||
memory_limit = 512M
|
||||
upload_max_filesize = 513M # to accept large files upload
|
||||
post_max_size = 513M # sync with above value
|
||||
|
||||
For enhanced performance one of these PHP packages can be installed:
|
||||
pecl-APC or xcache
|
||||
|
||||
Database configuration
|
||||
----------------------
|
||||
ownCloud can work with a PostgreSQL, MySQL or SQLite3 database.
|
||||
Support for SQLite3 is included with the main php package; to use
|
||||
another database, the corresponding package needs to be installed
|
||||
*before* setting up ownCloud (the web server will also need to be
|
||||
restarted to detect the new PHP module):
|
||||
*before* setting up ownCloud:
|
||||
php-pdo_pgsql or php-pdo_mysql
|
||||
|
||||
Configuration is done under:
|
||||
${INSTDIR}/config/config.php
|
||||
When running chrooted, /var/www must be stripped from paths.
|
||||
|
||||
By default, "datadirectory" is set to:
|
||||
/owncloud-data
|
||||
which expends to ${PREFIX}/owncloud-data outside the chroot.
|
||||
|
||||
Cron job
|
||||
--------
|
||||
ownCloud needs to run background jobs on a regular basis. By default, it
|
||||
@ -63,7 +112,7 @@ e.g. "crontab -u www -e"
|
||||
-> "Cron" (does *not* work in chroot)
|
||||
*/15 * * * * ${MODPHP_BIN} -f ${INSTDIR}/cron.php
|
||||
|
||||
LDAP User Backend
|
||||
LDAP user backend
|
||||
-----------------
|
||||
If the LDAP user backend is enabled, the "php-ldap" package will need to
|
||||
be installed.
|
||||
@ -71,7 +120,7 @@ be installed.
|
||||
Finishing and validating the installation
|
||||
-----------------------------------------
|
||||
Make sure the web server can resolve its hostname (e.g. if chrooted, by
|
||||
creating /var/www/etc/hosts).
|
||||
creating /var/www/etc/hosts and/or /var/www/etc/resolv.conf).
|
||||
|
||||
Accessing http://<hostname>/owncloud with a Web browser will finish the
|
||||
installation and create a new admin user.
|
||||
@ -103,7 +152,6 @@ files with ownCloud. e.g.
|
||||
|
||||
Encryption app and chroot
|
||||
=========================
|
||||
|
||||
To provide server side-encryption, the "Encryption" app can be enabled
|
||||
in the ownCloud admin interface. When running a chrooted web server,
|
||||
some manual steps are required to make it work.
|
||||
@ -121,7 +169,7 @@ chroot. As root:
|
||||
> done
|
||||
|
||||
Make sure to update the openssl binary and libraries in the chroot
|
||||
whenever they get updated on the system.
|
||||
whenever they are updated on the system.
|
||||
|
||||
Apps and dependencies
|
||||
=====================
|
||||
|
@ -1,6 +1,4 @@
|
||||
To completely deinstall ownCloud you need to perform the following step
|
||||
as root:
|
||||
rm -f /var/www/conf/modules/owncloud.conf
|
||||
and remove the "backgroundjobs" cron(8) job if it exists.
|
||||
The directory /var/www/usr/share/locale/en_US.UTF-8/ may also need
|
||||
to be removed, if it was created for ownCloud.
|
||||
To completely deinstall ownCloud you need to remove the "backgroundjobs"
|
||||
cron(8) job if it exists.
|
||||
The directory /var/www/usr/share/locale/en_US.UTF-8/ must also be
|
||||
removed, if it was created for ownCloud.
|
||||
|
Loading…
x
Reference in New Issue
Block a user