diff --git a/Makefile b/Makefile index 438a6414b3bf..43599daf80db 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ core_vendor=core/vendor core_doc_files=AUTHORS COPYING README.md CHANGELOG.md core_src_files=$(wildcard *.php) index.html db_structure.xml .htaccess .user.ini robots.txt -core_src_dirs=apps core l10n lib occ ocs ocs-provider ocm-provider resources settings +core_src_dirs=apps apps-external core l10n lib occ ocs ocs-provider ocm-provider resources settings core_test_dirs=tests core_all_src=$(core_src_files) $(core_src_dirs) $(core_doc_files) core_config_files=config/config.sample.php config/config.apps.sample.php @@ -265,7 +265,7 @@ $(dist_dir)/owncloud: $(composer_deps) $(core_vendor) $(core_all_src) rm -Rf $@/core/vendor/*/{.bower.json,bower.json,package.json,testem.json} rm -Rf $@/l10n/ find $@/core/ -iname \*.sh -delete - find $@/{apps/,lib/composer/,core/vendor/} \( \ + find $@/{apps/,apps-external/,lib/composer/,core/vendor/} \( \ -name bin -o \ -name test -o \ -name tests -o \ @@ -276,7 +276,7 @@ $(dist_dir)/owncloud: $(composer_deps) $(core_vendor) $(core_all_src) -name travis -o \ -iname \*.sh \ \) -print | xargs rm -Rf - find $@/{apps/,lib/composer/} -iname \*.exe -delete + find $@/{apps/,apps-external/,lib/composer/} -iname \*.exe -delete # Set build $(eval _BUILD="$(shell date -u --iso-8601=seconds) $(shell git rev-parse HEAD)") # Replace channel in version.php @@ -316,7 +316,7 @@ $(dist_dir)/qa/owncloud: $(composer_dev_deps) $(core_vendor) $(core_all_src) $(c rm -Rf $@/core/vendor/*/{.bower.json,bower.json,package.json,testem.json} rm -Rf $@/l10n/ find $@/core/ -iname \*.sh -delete - find $@/{apps/,lib/composer/,core/vendor/} \( \ + find $@/{apps/,apps-external/,lib/composer/,core/vendor/} \( \ -name test -o \ -name examples -o \ -name demo -o \ @@ -325,7 +325,7 @@ $(dist_dir)/qa/owncloud: $(composer_dev_deps) $(core_vendor) $(core_all_src) $(c -name travis -o \ -iname \*.sh \ \) -print | xargs rm -Rf - find $@/{apps/,lib/composer/} -iname \*.exe -delete + find $@/{apps/,apps-external/,lib/composer/} -iname \*.exe -delete # Set build $(eval _BUILD="$(shell date -u --iso-8601=seconds) $(shell git rev-parse HEAD)") # Replace channel in version.php diff --git a/apps-external/.gitkeep b/apps-external/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/lib/private/Setup.php b/lib/private/Setup.php index a7da05d06b60..e25dd363bc83 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -383,6 +383,29 @@ public function install($options) { $config->setSystemValue('logtimezone', \date_default_timezone_get()); } + // adding the apps-external directory by default using apps_path + $apps2Key = \OC::$server->getSystemConfig()->getValue('apps_paths', false); + + // add the key only if it does not exist (protect against overwriting) + if ($apps2Key === false) { + $defaultAppsPaths = [ + 'apps_paths' => [ + [ + "path" => \OC::$SERVERROOT . '/apps', + "url" => "/apps", + "writable" => false + ], + [ + "path" => \OC::$SERVERROOT . '/apps-external', + "url" => "/apps-external", + "writable" => true + ] + ] + ]; + + $config->setSystemValues($defaultAppsPaths); + } + self::installBackgroundJobs(); // save the origin version that we installed at @@ -390,6 +413,8 @@ public function install($options) { //and we are done $config->setSystemValue('installed', true); + + // finished initial setup } return $error;