[Pkg-owncloud-commits] [SCM] owncloud.git branch, master, updated. debian/5.0.8+dfsg-2-7-gc45fe57
David Prévot
taffit at debian.org
Sun Jul 14 20:25:23 UTC 2013
The following commit has been merged in the master branch:
commit cb627a636ef05d2502b6cf0d09ca8ad69e1c8941
Author: David Prévot <taffit at debian.org>
Date: Sun Jul 14 15:31:05 2013 -0400
Get rid of path patch
Path specific to Debian are already handled via symlinks.
diff --git a/debian/patches/01_fix_data_path.diff b/debian/patches/01_fix_data_path.diff
deleted file mode 100644
index 68925aa..0000000
--- a/debian/patches/01_fix_data_path.diff
+++ /dev/null
@@ -1,340 +0,0 @@
-Description: Path to data, config and backup folder changed
- ownCloud expects to find data, config and backup folder in the same
- location as where the code is living.
- In Debian we seperate the code (/usr/share/owncloud) from the
- data (/var/lib/owncloud)
- Thanks to Jonathan Riddell <jriddell at ubuntu.com>
-Author: Thomas Mueller <thomas.mueller at tmit.eu>
-Bug-Debian: http://bugs.debian.org/648674
-Forwarded: not-needed
-Reviewed-by: David Prévot <taffit at debian.org>
-Last-Update: 2013-07-10
---- a/lib/config.php
-+++ b/lib/config.php
-@@ -130,12 +130,12 @@
- return true;
- }
-
-- if( !file_exists( OC::$SERVERROOT."/config/config.php" )) {
-+ if( !file_exists( "/etc/owncloud/config.php" )) {
- return false;
- }
-
- // Include the file, save the data from $CONFIG
-- include OC::$SERVERROOT."/config/config.php";
-+ include "/etc/owncloud/config.php";
- if( isset( $CONFIG ) && is_array( $CONFIG )) {
- self::$cache = $CONFIG;
- }
-@@ -161,7 +161,7 @@
- $content .= var_export(self::$cache, true);
- $content .= ";\n";
-
-- $filename = OC::$SERVERROOT."/config/config.php";
-+ $filename = "/etc/owncloud/config.php";
- // Write the file
- $result=@file_put_contents( $filename, $content );
- if(!$result) {
---- a/lib/util.php
-+++ b/lib/util.php
-@@ -36,7 +36,7 @@
- self::$fsSetup=true;
- }
-
-- $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
-+ $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" );
- //first set up the local "root" storage
- if(!self::$rootMounted) {
- \OC\Files\Filesystem::mount('\OC\Files\Storage\Local', array('datadir'=>$CONFIG_DATADIRECTORY), '/');
-@@ -186,7 +186,7 @@
- .'<a href="' . $defaults->getDocBaseUrl() . '/server/5.0/admin_manual/installation/installation_source.html#set-the-directory-permissions" target="_blank">giving the webserver write access to the root directory</a>.';
-
- // Check if config folder is writable.
-- if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
-+ if(!is_writable("/etc/owncloud/") or !is_readable("/etc/owncloud/")) {
- $errors[] = array(
- 'error' => "Can't write into config directory",
- 'hint' => 'This can usually be fixed by '
-@@ -207,7 +207,7 @@
- );
- }
- }
-- $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
-+ $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" );
- // Create root dir.
- if(!is_dir($CONFIG_DATADIRECTORY)) {
- $success=@mkdir($CONFIG_DATADIRECTORY);
-@@ -545,7 +545,7 @@
- $testcontent='testcontent';
-
- // creating a test file
-- $testfile = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$filename;
-+ $testfile = OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" ).'/'.$filename;
-
- if(file_exists($testfile)) {// already running this test, possible recursive call
- return false;
---- a/apps/updater/lib/helper.php
-+++ b/apps/updater/lib/helper.php
-@@ -134,7 +134,7 @@
- public static function filterLocations($locations, $basePath) {
- $fullPath = array_values(self::getDirectories());
- $fullPath[] = rtrim(App::getBackupBase(), '/');
-- $fullPath[] = \OC_Config::getValue( "datadirectory", \OC::$SERVERROOT."/data" );
-+ $fullPath[] = \OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" );
-
- $exclusions = array(
- 'full' => $fullPath,
---- a/lib/MDB2/Driver/Manager/sqlite3.php
-+++ b/lib/MDB2/Driver/Manager/sqlite3.php
-@@ -45,7 +45,7 @@
- */
- function createDatabase($name, $options = array())
- {
-- $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
-+ $datadir=OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" );
- $db =$this->getDBInstance();
- if (PEAR::isError($db)) {
- return $db;
---- a/lib/MDB2/Driver/sqlite3.php
-+++ b/lib/MDB2/Driver/sqlite3.php
-@@ -326,7 +326,7 @@
- if($this->connection instanceof SQLite3) {
- return MDB2_OK;
- }
-- $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
-+ $datadir=OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" );
- $database_file = $this->_getDatabaseFile($this->database_name);
- if (is_resource($this->connection)) {
- //if (count(array_diff($this->connected_dsn, $this->dsn)) == 0
---- a/lib/base.php
-+++ b/lib/base.php
-@@ -202,7 +202,7 @@
- // set the right include path
- set_include_path(
- OC::$SERVERROOT . '/lib' . PATH_SEPARATOR .
-- OC::$SERVERROOT . '/config' . PATH_SEPARATOR .
-+ '/etc/owncloud' . PATH_SEPARATOR .
- OC::$THIRDPARTYROOT . '/3rdparty' . PATH_SEPARATOR .
- implode($paths, PATH_SEPARATOR) . PATH_SEPARATOR .
- get_include_path() . PATH_SEPARATOR .
-@@ -211,8 +211,8 @@
- }
-
- public static function checkConfig() {
-- if (file_exists(OC::$SERVERROOT . "/config/config.php")
-- and !is_writable(OC::$SERVERROOT . "/config/config.php")) {
-+ if (file_exists("/etc/owncloud/config.php")
-+ and !is_writable("/etc/owncloud/config.php")) {
- $defaults = new OC_Defaults();
- $tmpl = new OC_Template('', 'error', 'guest');
- $tmpl->assign('errors', array(1 => array(
---- a/lib/migrate.php
-+++ b/lib/migrate.php
-@@ -466,7 +466,7 @@
- if(!self::$MDB2) {
- require_once 'MDB2.php';
-
-- $datadir = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
-+ $datadir = OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" );
-
- // DB type
- if( class_exists( 'SQLite3' ) ) {
---- a/lib/user.php
-+++ b/lib/user.php
-@@ -223,7 +223,7 @@
- OC_Preferences::deleteUser($uid);
-
- // Delete user files in /data/
-- OC_Helper::rmdirr(OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ) . '/'.$uid.'/');
-+ OC_Helper::rmdirr(OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" ) . '/'.$uid.'/');
-
- // Emit and exit
- OC_Hook::emit( "OC_User", "post_deleteUser", array( "uid" => $uid ));
-@@ -496,7 +496,7 @@
- }
- }
- }
-- return OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ) . '/' . $uid;
-+ return OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" ) . '/' . $uid;
- }
-
- /**
---- a/lib/user/database.php
-+++ b/lib/user/database.php
-@@ -253,7 +253,7 @@
- */
- public function getHome($uid) {
- if($this->userExists($uid)) {
-- return OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ) . '/' . $uid;
-+ return OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" ) . '/' . $uid;
- }else{
- return false;
- }
---- a/lib/user/http.php
-+++ b/lib/user/http.php
-@@ -98,7 +98,7 @@
- */
- public function getHome($uid) {
- if($this->userExists($uid)) {
-- return OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ) . '/' . $uid;
-+ return OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" ) . '/' . $uid;
- }else{
- return false;
- }
---- a/apps/user_ldap/user_ldap.php
-+++ b/apps/user_ldap/user_ldap.php
-@@ -204,7 +204,7 @@
- $homedir = $path;
- } else {
- $homedir = \OCP\Config::getSystemValue('datadirectory',
-- \OC::$SERVERROOT.'/data' ) . '/' . $homedir[0];
-+ '/var/lib/owncloud/data' ) . '/' . $homedir[0];
- }
- $this->connection->writeToCache($cacheKey, $homedir);
- return $homedir;
---- a/core/setup.php
-+++ b/core/setup.php
-@@ -1,7 +1,7 @@
- <?php
-
- // Check for autosetup:
--$autosetup_file = OC::$SERVERROOT."/config/autoconfig.php";
-+$autosetup_file = "/etc/owncloud/autoconfig.php";
- if( file_exists( $autosetup_file )) {
- OC_Log::write('core', 'Autoconfig file found, setting up owncloud...', OC_Log::INFO);
- include $autosetup_file;
-@@ -17,7 +17,7 @@
- $hasPostgreSQL = is_callable('pg_connect');
- $hasOracle = is_callable('oci_connect');
- $hasMSSQL = is_callable('sqlsrv_connect');
--$datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data');
-+$datadir = OC_Config::getValue('datadirectory', '/var/lib/owncloud/data');
- $vulnerableToNullByte = false;
- if(@file_exists(__FILE__."\0Nullbyte")) { // Check if the used PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243)
- $vulnerableToNullByte = true;
---- a/cron.php
-+++ b/cron.php
-@@ -75,7 +75,7 @@
-
- if( OC::$CLI ) {
- // Create lock file first
-- my_temporary_cron_class::$lockfile = OC_Config::getValue( "datadirectory", OC::$SERVERROOT.'/data' ).'/cron.lock';
-+ my_temporary_cron_class::$lockfile = OC_Config::getValue( "datadirectory", '/var/lib/owncloud/data' ).'/cron.lock';
-
- // We call ownCloud from the CLI (aka cron)
- if( $appmode != 'cron' ) {
---- a/lib/db.php
-+++ b/lib/db.php
-@@ -137,7 +137,7 @@
- $port=false;
- }
- $opts = array();
-- $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT.'/data' );
-+ $datadir=OC_Config::getValue( "datadirectory", '/var/lib/owncloud/data' );
-
- // do nothing if the connection already has been established
- if(!self::$PDO) {
-@@ -227,7 +227,7 @@
- $pass = OC_Config::getValue( "dbpassword", "" );
- $type = OC_Config::getValue( "dbtype", "sqlite" );
- $SERVERROOT=OC::$SERVERROOT;
-- $datadir=OC_Config::getValue( "datadirectory", "$SERVERROOT/data" );
-+ $datadir=OC_Config::getValue( "datadirectory", "/var/lib/owncloud/data" );
-
- // do nothing if the connection already has been established
- if(!self::$MDB2) {
---- a/lib/files/filesystem.php
-+++ b/lib/files/filesystem.php
-@@ -222,18 +222,18 @@
-
- $root = \OC_User::getHome($user);
- self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
-- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
-+ $datadir = \OC_Config::getValue("datadirectory", "/var/lib/owncloud/data");
-
- //move config file to it's new position
-- if (is_file(\OC::$SERVERROOT . '/config/mount.json')) {
-- rename(\OC::$SERVERROOT . '/config/mount.json', $datadir . '/mount.json');
-+ if (is_file('/etc/owncloud/mount.json')) {
-+ rename('/etc/owncloud/mount.json', $datadir . '/mount.json');
- }
- // Load system mount points
-- if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($datadir . '/mount.json')) {
-+ if (is_file('/etc/owncloud/mount.php') or is_file($datadir . '/mount.json')) {
- if (is_file($datadir . '/mount.json')) {
- $mountConfig = json_decode(file_get_contents($datadir . '/mount.json'), true);
-- } elseif (is_file(\OC::$SERVERROOT . '/config/mount.php')) {
-- $mountConfig = $parser->parsePHP(file_get_contents(\OC::$SERVERROOT . '/config/mount.php'));
-+ } elseif (is_file('/etc/owncloud/mount.php')) {
-+ $mountConfig = $parser->parsePHP(file_get_contents('/etc/owncloud/mount.php'));
- }
- if (isset($mountConfig['global'])) {
- foreach ($mountConfig['global'] as $mountPoint => $options) {
---- a/lib/log/owncloud.php
-+++ b/lib/log/owncloud.php
-@@ -33,7 +33,7 @@
- * Init class data
- */
- public static function init() {
-- $defaultLogFile = OC_Config::getValue("datadirectory", OC::$SERVERROOT.'/data').'/owncloud.log';
-+ $defaultLogFile = OC_Config::getValue("datadirectory", '/var/lib/owncloud/data').'/owncloud.log';
- self::$logFile = OC_Config::getValue("logfile", $defaultLogFile);
- if (!file_exists(self::$logFile)) {
- self::$logFile = $defaultLogFile;
---- a/lib/setup.php
-+++ b/lib/setup.php
-@@ -851,8 +851,8 @@
- public static function protectDataDirectory() {
- $content = "deny from all\n";
- $content.= "IndexIgnore *";
-- file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content);
-- file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/index.html', '');
-+ file_put_contents(OC_Config::getValue('datadirectory', '/var/lib/owncloud/data').'/.htaccess', $content);
-+ file_put_contents(OC_Config::getValue('datadirectory', '/var/lib/owncloud/data').'/index.html', '');
- }
-
- /**
---- a/apps/updater/appinfo/app.php
-+++ b/apps/updater/appinfo/app.php
-@@ -31,7 +31,7 @@
- * @return string
- */
- public static function getBackupBase() {
-- return \OC::$SERVERROOT . '/backup/';
-+ return '/var/lib/owncloud/backup/';
- }
-
- public static function getSource($url, $version) {
---- a/apps/updater/lib/updater.php
-+++ b/apps/updater/lib/updater.php
-@@ -122,7 +122,7 @@
- // move old config files
- $backupConfigPath = $backupBase . "/" . Helper::CORE_DIRNAME . "/config/";
- foreach (glob($backupConfigPath . "*.php") as $configFile){
-- $target = \OC::$SERVERROOT . "/config/" . basename($configFile);
-+ $target = "/etc/owncloud/" . basename($configFile);
- if (!file_exists($target)){
- copy($configFile, $target);
- }
---- a/apps/files_external/lib/config.php
-+++ b/apps/files_external/lib/config.php
-@@ -307,8 +307,8 @@
- $phpFile = OC_User::getHome(OCP\User::getUser()).'/mount.php';
- $jsonFile = OC_User::getHome(OCP\User::getUser()).'/mount.json';
- } else {
-- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
-- $phpFile = OC::$SERVERROOT.'/config/mount.php';
-+ $datadir = \OC_Config::getValue("datadirectory", "/var/lib/owncloud/data");
-+ $phpFile = '/etc/owncloud/mount.php';
- $jsonFile = $datadir . '/mount.json';
- }
- if (is_file($jsonFile)) {
-@@ -334,7 +334,7 @@
- if ($isPersonal) {
- $file = OC_User::getHome(OCP\User::getUser()).'/mount.json';
- } else {
-- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
-+ $datadir = \OC_Config::getValue("datadirectory", "/var/lib/owncloud/data");
- $file = $datadir . '/mount.json';
- }
- $content = json_encode($data);
diff --git a/debian/patches/fix_log_path.diff b/debian/patches/fix_log_path.diff
index 396f120..86108ce 100644
--- a/debian/patches/fix_log_path.diff
+++ b/debian/patches/fix_log_path.diff
@@ -21,7 +21,7 @@ Last-Update: 2013-07-14
* Init class data
*/
public static function init() {
-- $defaultLogFile = OC_Config::getValue("datadirectory", '/var/lib/owncloud/data').'/owncloud.log';
+- $defaultLogFile = OC_Config::getValue("datadirectory", OC::$SERVERROOT.'/data').'/owncloud.log';
+ $defaultLogFile = '/var/log/owncloud.log';
self::$logFile = OC_Config::getValue("logfile", $defaultLogFile);
if (!file_exists(self::$logFile)) {
diff --git a/debian/patches/series b/debian/patches/series
index 13e1940..8fd3802 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-01_fix_data_path.diff
03_fix_phpmailer.diff
05_no_app_store.diff
fix_tar_require.diff
--
owncloud.git
More information about the Pkg-owncloud-commits
mailing list