Merge pull request #11412 from matejc/master-owncloud
re owncloud latest
This commit is contained in:
commit
05eb4c8928
|
@ -70,7 +70,7 @@ let
|
||||||
"proxyuserpwd" => "",
|
"proxyuserpwd" => "",
|
||||||
|
|
||||||
/* List of trusted domains, to prevent host header poisoning ownCloud is only using these Host headers */
|
/* List of trusted domains, to prevent host header poisoning ownCloud is only using these Host headers */
|
||||||
'trusted_domains' => array('${config.trustedDomain}'),
|
${if config.trustedDomain != "" then "'trusted_domains' => array('${config.trustedDomain}')," else ""}
|
||||||
|
|
||||||
/* Theme to use for ownCloud */
|
/* Theme to use for ownCloud */
|
||||||
"theme" => "",
|
"theme" => "",
|
||||||
|
@ -331,7 +331,7 @@ let
|
||||||
*/
|
*/
|
||||||
'share_folder' => '/',
|
'share_folder' => '/',
|
||||||
|
|
||||||
'version' => '${pkgs.owncloud.version}',
|
'version' => '${config.package.version}',
|
||||||
|
|
||||||
'openssl' => '${pkgs.openssl}/bin/openssl'
|
'openssl' => '${pkgs.openssl}/bin/openssl'
|
||||||
|
|
||||||
|
@ -345,16 +345,15 @@ rec {
|
||||||
|
|
||||||
extraConfig =
|
extraConfig =
|
||||||
''
|
''
|
||||||
ServerName ${config.siteName}
|
${if config.urlPrefix != "" then "Alias ${config.urlPrefix} ${config.package}" else ''
|
||||||
ServerAdmin ${config.adminAddr}
|
|
||||||
DocumentRoot ${documentRoot}
|
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
||||||
|
''}
|
||||||
|
|
||||||
<Directory ${pkgs.owncloud}>
|
<Directory ${config.package}>
|
||||||
${builtins.readFile "${pkgs.owncloud}/.htaccess"}
|
${builtins.readFile "${config.package}/.htaccess"}
|
||||||
</Directory>
|
</Directory>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -362,12 +361,29 @@ rec {
|
||||||
{ name = "OC_CONFIG_PATH"; value = "${config.dataDir}/config/"; }
|
{ name = "OC_CONFIG_PATH"; value = "${config.dataDir}/config/"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
documentRoot = pkgs.owncloud;
|
documentRoot = if config.urlPrefix == "" then config.package else null;
|
||||||
|
|
||||||
enablePHP = true;
|
enablePHP = true;
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.owncloud70;
|
||||||
|
example = literalExample "pkgs.owncloud70";
|
||||||
|
description = ''
|
||||||
|
PostgreSQL package to use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
urlPrefix = mkOption {
|
||||||
|
default = "";
|
||||||
|
example = "/owncloud";
|
||||||
|
description = ''
|
||||||
|
The URL prefix under which the owncloud service appears.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
id = mkOption {
|
id = mkOption {
|
||||||
default = "main";
|
default = "main";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -552,7 +568,7 @@ rec {
|
||||||
cp ${owncloudConfig} ${config.dataDir}/config/config.php
|
cp ${owncloudConfig} ${config.dataDir}/config/config.php
|
||||||
mkdir -p ${config.dataDir}/storage
|
mkdir -p ${config.dataDir}/storage
|
||||||
mkdir -p ${config.dataDir}/apps
|
mkdir -p ${config.dataDir}/apps
|
||||||
cp -r ${pkgs.owncloud}/apps/* ${config.dataDir}/apps/
|
cp -r ${config.package}/apps/* ${config.dataDir}/apps/
|
||||||
chmod -R ug+rw ${config.dataDir}
|
chmod -R ug+rw ${config.dataDir}
|
||||||
chmod -R o-rwx ${config.dataDir}
|
chmod -R o-rwx ${config.dataDir}
|
||||||
chown -R wwwrun:wwwrun ${config.dataDir}
|
chown -R wwwrun:wwwrun ${config.dataDir}
|
||||||
|
@ -566,7 +582,11 @@ rec {
|
||||||
${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/psql -h "/tmp" -U postgres -d ${config.dbName} -Atw -c "$QUERY" || true
|
${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/psql -h "/tmp" -U postgres -d ${config.dbName} -Atw -c "$QUERY" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${php}/bin/php ${pkgs.owncloud}/occ upgrade || true
|
if [ -e ${config.package}/config/ca-bundle.crt ]; then
|
||||||
|
cp -f ${config.package}/config/ca-bundle.crt ${config.dataDir}/config/
|
||||||
|
fi
|
||||||
|
|
||||||
|
${php}/bin/php ${config.package}/occ upgrade >> ${config.dataDir}/upgrade.log || true
|
||||||
|
|
||||||
chown wwwrun:wwwrun ${config.dataDir}/owncloud.log || true
|
chown wwwrun:wwwrun ${config.dataDir}/owncloud.log || true
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,59 @@
|
||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl }:
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
name= "owncloud-${version}";
|
common = { versiona, sha256 } @ args: stdenv.mkDerivation (rec {
|
||||||
version = "7.0.5";
|
|
||||||
|
|
||||||
src = fetchurl {
|
name= "owncloud-${version}";
|
||||||
url = "https://download.owncloud.org/community/${name}.tar.bz2";
|
version= versiona;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://download.owncloud.org/community/${name}.tar.bz2";
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase =
|
||||||
|
''
|
||||||
|
mkdir -p $out
|
||||||
|
find . -maxdepth 1 -execdir cp -r '{}' $out \;
|
||||||
|
|
||||||
|
substituteInPlace $out/lib/base.php \
|
||||||
|
--replace 'OC_Config::$object = new \OC\Config(self::$configDir);' \
|
||||||
|
'self::$configDir = getenv("OC_CONFIG_PATH"); OC_Config::$object = new \OC\Config(self::$configDir);'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "An enterprise file sharing solution for online collaboration and storage";
|
||||||
|
homepage = https://owncloud.org;
|
||||||
|
maintainers = with stdenv.lib.maintainers; [ matejc ];
|
||||||
|
license = stdenv.lib.licenses.agpl3Plus;
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
owncloud705 = common {
|
||||||
|
versiona = "7.0.5";
|
||||||
sha256 = "1j21b7ljvbhni9l0b1cpzlhsjy36scyas1l1j222mqdg2srfsi9y";
|
sha256 = "1j21b7ljvbhni9l0b1cpzlhsjy36scyas1l1j222mqdg2srfsi9y";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase =
|
owncloud70 = common {
|
||||||
''
|
versiona = "7.0.10";
|
||||||
mkdir -p $out
|
sha256 = "7e77f27137f37a721a8827b0436a9e71c100406d9745c4251c37c14bcaf31d0b";
|
||||||
find . -maxdepth 1 -execdir cp -r '{}' $out \;
|
};
|
||||||
|
|
||||||
substituteInPlace $out/lib/base.php \
|
owncloud80 = common {
|
||||||
--replace 'OC_Config::$object = new \OC\Config(self::$configDir);' \
|
versiona = "8.0.9";
|
||||||
'self::$configDir = getenv("OC_CONFIG_PATH"); OC_Config::$object = new \OC\Config(self::$configDir);'
|
sha256 = "0c1f915f4123dbe07d564cf0172930568690ab5257d2fca4fec4ec515858bef1";
|
||||||
'';
|
};
|
||||||
|
|
||||||
meta = {
|
owncloud81 = common {
|
||||||
description = "An enterprise file sharing solution for online collaboration and storage";
|
versiona = "8.1.4";
|
||||||
homepage = https://owncloud.org;
|
sha256 = "e0f4bf0c85821fc1b6e7f6268080ad3ca3e98c41baa68a9d616809d74a77312d";
|
||||||
maintainers = with stdenv.lib.maintainers; [ matejc ];
|
};
|
||||||
license = stdenv.lib.licenses.agpl3Plus;
|
|
||||||
|
owncloud82 = common {
|
||||||
|
versiona = "8.2.0";
|
||||||
|
sha256 = "fcfe99cf1c3aa06ff369e5b1a602147c08dd977af11800fe06c6a661fa5f770c";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2573,7 +2573,14 @@ let
|
||||||
|
|
||||||
otpw = callPackage ../os-specific/linux/otpw { };
|
otpw = callPackage ../os-specific/linux/otpw { };
|
||||||
|
|
||||||
owncloud = callPackage ../servers/owncloud { };
|
owncloud = owncloud70;
|
||||||
|
|
||||||
|
inherit (callPackages ../servers/owncloud { })
|
||||||
|
owncloud705
|
||||||
|
owncloud70
|
||||||
|
owncloud80
|
||||||
|
owncloud81
|
||||||
|
owncloud82;
|
||||||
|
|
||||||
owncloudclient = callPackage ../applications/networking/owncloud-client { };
|
owncloudclient = callPackage ../applications/networking/owncloud-client { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue