Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit f916b44

Browse files
committed
Touch release note - Start testing 6.5.2 upgrades.
1 parent 964afa6 commit f916b44

File tree

7 files changed

+322
-0
lines changed

7 files changed

+322
-0
lines changed

core/src/conf/RELEASE_NOTE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ Pydio ##VERSION_NUMBER## Release Note
22

33
TODO : This is a temporary package for testing upgrade from v6 to v7
44

5+
Second beta for Pydio 7
6+
7+
----
8+
Pydio Core 6.5.1
9+
10+
Very first beta for Pydio 7
11+
512
----
613
Pydio Core 6.4.2
714

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?php
2+
/*
3+
* Copyright 2007-2016 Abstrium <contact (at) pydio.com>
4+
* This file is part of Pydio.
5+
*
6+
* Pydio is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Affero General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* Pydio is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Affero General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Affero General Public License
17+
* along with Pydio. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* The latest code can be found at <https://pydio.com/>.
20+
*/
21+
22+
/**
23+
* @param string $version
24+
* @throws Exception
25+
*/
26+
function checkPhpVersion($version){
27+
if(version_compare(PHP_VERSION, $version) < 0){
28+
throw new Exception("For Pydio 7, PHP version must be greater or equal to $version, detected version is ".PHP_VERSION." - Upgrade aborted.");
29+
}else{
30+
echo "Checking Php Version (".PHP_VERSION.") : OK\n";
31+
}
32+
}
33+
34+
/**
35+
* @param string $type
36+
* @param string $name
37+
* @throws Exception
38+
*/
39+
function checkPluginUsed($type, $name){
40+
41+
if($type === "conf"){
42+
$p = ConfService::getConfStorageImpl();
43+
if($p->getName() === $name){
44+
throw new Exception("You are currently using $type.$name as configuration storage. This was deprecated in Pydio 6 and is now removed in Pydio7. Aborting upgrade");
45+
}else{
46+
echo "Checking plugin $type ($name) : OK\n";
47+
}
48+
}else if($type === "auth") {
49+
$p = ConfService::getAuthDriverImpl();
50+
if ($p->getName() === $name) {
51+
throw new Exception("You are currently using $type.$name for authentication backend. This was deprecated in Pydio 6 and is now removed in Pydio7. Aborting upgrade");
52+
} else {
53+
if ($p->getName() === "multi") {
54+
$drivers = $p->drivers;
55+
if (isSet($drivers[$name])) {
56+
throw new Exception("You are currently using $type.$name for authentication backend. This was deprecated in Pydio 6 and is nowremoved in Pydio7. Aborting upgrade");
57+
} else {
58+
echo "Checking plugin $type (" . implode(", ", array_keys($drivers)) . ") : OK\n";
59+
}
60+
}
61+
echo "Checking plugin $type ($name) : OK\n";
62+
}
63+
}else if($type === "access"){
64+
65+
// Check if a workspace is currently using this plugin
66+
echo "Should check usage of plugin $type ($name) in active workspaces : TODO\n";
67+
68+
69+
}else{
70+
$plugs = AJXP_PluginsService::getInstance()->getActivePluginsForType($type);
71+
if(isSet($plugs[$name])){
72+
throw new Exception("You are currently using plugin $type.$name. This is removed in Pydio7. Please disable it before running upgrade. Aborting upgrade");
73+
}
74+
echo "Checking plugin $type ($name) : OK\n";
75+
}
76+
77+
}
78+
79+
/**
80+
* @param string $themeName
81+
* @throws Exception
82+
*/
83+
function checkThemeUsed($themeName){
84+
85+
$p = AJXP_PluginsService::getInstance()->findPlugin("gui", "ajax");
86+
$options = $p->getConfigs();
87+
if(isSet($options["GUI_THEME"]) && $options["GUI_THEME"] === $themeName){
88+
throw new Exception("You are currently using theme ".$options["GUI_THEME"]." which was removed from Pydio 7. If you want to be able to upgrade, you have to switch to Orbit theme. Aborting upgrade.");
89+
}else{
90+
echo "Checking usage of remove theme ($themeName): OK\n";
91+
}
92+
93+
}
94+
95+
checkPhpVersion('5.5.9');
96+
checkPluginUsed("conf", "serial");
97+
checkPluginUsed("auth", "serial");
98+
checkPluginUsed("auth", "cmsms");
99+
checkPluginUsed("access", "remote_fs");
100+
checkThemeUsed("vision");
101+
checkThemeUsed("umbra");

dist/php/6.5.2.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div style='font-family: "Open sans", "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; font-size: 13px;line-height: 1.5em;'
2+
xmlns="http://www.w3.org/1999/html">
3+
4+
<h2>Pydio Core 6.5.2 - Beta2 for Pydio 7</h2>
5+
6+
This is the second first beta for next major release.
7+
<p style="font-size: 14px;color: red;">
8+
<b>Please update at your own risks!! Do not update servers that are live in production!</b>
9+
</p>
10+
11+
If you want to participate to the beta program and get access to dedicated resources, please fill in <a target="_blank" href="https://pydio.typeform.com/to/hf6K4O">this small form</a>, we will be in contact soon.
12+
13+
</div>

dist/php/6.5.2.mysql

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
DROP TABLE IF EXISTS ajxp_tasks;
2+
3+
CREATE TABLE IF NOT EXISTS ajxp_tasks (
4+
uid VARCHAR(255) NOT NULL ,
5+
type INTEGER NOT NULL,
6+
parent_uid VARCHAR(255) DEFAULT NULL,
7+
flags INTEGER NOT NULL,
8+
label VARCHAR(255) NOT NULL,
9+
user_id VARCHAR(255) NOT NULL,
10+
ws_id VARCHAR(32) NOT NULL,
11+
status INTEGER NOT NULL,
12+
status_msg VARCHAR(500) NOT NULL,
13+
progress INTEGER NOT NULL,
14+
schedule INTEGER NOT NULL,
15+
schedule_value VARCHAR(255) DEFAULT NULL,
16+
action VARCHAR(255) NOT NULL,
17+
parameters VARCHAR(500) NOT NULL,
18+
nodes VARCHAR(500) NOT NULL,
19+
creation_date INTEGER NOT NULL DEFAULT 0,
20+
status_update INTEGER NOT NULL DEFAULT 0,
21+
22+
PRIMARY KEY (uid)
23+
);
24+
25+
26+
CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks (user_id);
27+
CREATE INDEX ajxp_task_status_idx ON ajxp_tasks (status);
28+
CREATE INDEX ajxp_task_type ON ajxp_tasks (type);
29+
CREATE INDEX ajxp_task_schedule ON ajxp_tasks (schedule);
30+
CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);

dist/php/6.5.2.pgsql

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
DROP TABLE IF EXISTS ajxp_tasks;
2+
3+
CREATE TABLE IF NOT EXISTS ajxp_tasks (
4+
uid VARCHAR(255) NOT NULL ,
5+
type INTEGER NOT NULL,
6+
parent_uid VARCHAR(255) DEFAULT NULL,
7+
flags INTEGER NOT NULL,
8+
label VARCHAR(255) NOT NULL,
9+
user_id VARCHAR(255) NOT NULL,
10+
ws_id VARCHAR(32) NOT NULL,
11+
status INTEGER NOT NULL,
12+
status_msg VARCHAR(500) NOT NULL,
13+
progress INTEGER NOT NULL,
14+
schedule INTEGER NOT NULL,
15+
schedule_value VARCHAR(255) DEFAULT NULL,
16+
action VARCHAR(255) NOT NULL,
17+
parameters VARCHAR(500) NOT NULL,
18+
nodes VARCHAR(500) NOT NULL,
19+
creation_date INTEGER NOT NULL DEFAULT 0,
20+
status_update INTEGER NOT NULL DEFAULT 0,
21+
22+
PRIMARY KEY (uid)
23+
);
24+
25+
26+
CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks (user_id);
27+
CREATE INDEX ajxp_task_status_idx ON ajxp_tasks (status);
28+
CREATE INDEX ajxp_task_type ON ajxp_tasks (type);
29+
CREATE INDEX ajxp_task_schedule ON ajxp_tasks (schedule);
30+
CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);

dist/php/6.5.2.php

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?php
2+
/*
3+
* Copyright 2007-2016 Abstrium <contact (at) pydio.com>
4+
* This file is part of Pydio.
5+
*
6+
* Pydio is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Affero General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* Pydio is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Affero General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Affero General Public License
17+
* along with Pydio. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* The latest code can be found at <https://pydio.com/>.
20+
*/
21+
22+
function updateSharePhpContent($installPath, $publicFolder){
23+
24+
$publicFolder = preg_replace("/^".str_replace(array("\\","/"), array("\\\\", "\/"), $installPath)."/", "", $publicFolder);
25+
$sharePhpPath = $installPath."/".trim($publicFolder, "/")."/"."share.php";
26+
if(!is_file($sharePhpPath)){
27+
echo "No share.php file was found in public folder. If it does exist, you may have to manually upgrade its content.\n";
28+
return;
29+
}
30+
echo "Upgrading content of $sharePhpPath file\n";
31+
$folders = array_map(function($value){
32+
return "..";
33+
}, explode("/", trim($publicFolder, "/")));
34+
$baseConfPath = implode("/", $folders);
35+
36+
$content = '
37+
<?php
38+
include_once("'.$baseConfPath.'/base.conf.php");
39+
define(\'AJXP_EXEC\', true);
40+
require_once AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/action.share/vendor/autoload.php";
41+
$base = rtrim(dirname($_SERVER["SCRIPT_NAME"]), "/");
42+
\Pydio\Share\ShareCenter::publicRoute($base, "/proxy", ["hash" => $_GET["hash"]]);
43+
';
44+
file_put_contents($sharePhpPath, $content);
45+
46+
}
47+
48+
function updateHtAccessContent($htAccessPath){
49+
50+
if(!is_file($htAccessPath)){
51+
echo "No htaccess file found. Skipping Htaccess update.\n";
52+
return;
53+
}
54+
echo "Upgrading content of Htaccess file\n";
55+
$lines = file($htAccessPath, FILE_IGNORE_NEW_LINES);
56+
$removeFlag = false;
57+
$newLines = [];
58+
// Remove unnecessary lines
59+
foreach($lines as $index => $line){
60+
if(!$removeFlag){
61+
$newLines[] = $line;
62+
if(trim($line) === "RewriteCond %{REQUEST_FILENAME} !-d"){
63+
$removeFlag = true;
64+
}
65+
}else{
66+
if(trim($line) === 'RewriteRule (.*) index.php [L]'){
67+
$newLines[] = $line;
68+
$removeFlag = false;
69+
}
70+
}
71+
}
72+
$contents = implode("\n", $newLines);
73+
if(is_writable($htAccessPath)){
74+
file_put_contents($htAccessPath, $contents);
75+
}else{
76+
echo "ERROR: Htaccess file could not be written. Update it manually to the following content: <pre>$contents</pre>";
77+
}
78+
79+
}
80+
81+
function awsSdkVersion(){
82+
83+
$s3Options = ConfService::getConfStorageImpl()->loadPluginConfig("access", "s3");
84+
if($s3Options["SDK_VERSION"] === "v2"){
85+
$s3Options["SDK_VERSION"] = "v3";
86+
ConfService::getConfStorageImpl()->savePluginConfig("access.s3", $s3Options);
87+
}
88+
89+
}
90+
91+
function forceRenameConfFile($prefix){
92+
93+
// FORCE bootstrap_repositories copy
94+
if (is_file(AJXP_INSTALL_PATH."/conf/$prefix.php".".new-".date("Ymd"))) {
95+
rename(AJXP_INSTALL_PATH."/conf/$prefix.php", AJXP_INSTALL_PATH."/conf/$prefix.php.pre-update");
96+
rename(AJXP_INSTALL_PATH."/conf/$prefix.php".".new-".date("Ymd"), AJXP_INSTALL_PATH."/conf/$prefix.php");
97+
}
98+
99+
100+
}
101+
102+
if(AJXP_VERSION === '6.4.2'){
103+
awsSdkVersion();
104+
updateHtAccessContent(AJXP_INSTALL_PATH."/.htaccess");
105+
updateSharePhpContent(AJXP_INSTALL_PATH, ConfService::getCoreConf("PUBLIC_DOWNLOAD_FOLDER"));
106+
forceRenameConfFile("bootstrap_conf");
107+
forceRenameConfFile("bootstrap_context");
108+
forceRenameConfFile("extensions.conf");
109+
}else if(AJXP_VERSION === '6.5.1'){
110+
forceRenameConfFile("bootstrap_context");
111+
}

dist/php/6.5.2.sqlite

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
DROP TABLE IF EXISTS ajxp_tasks;
2+
3+
CREATE TABLE IF NOT EXISTS ajxp_tasks (
4+
uid VARCHAR(255) NOT NULL ,
5+
type INTEGER NOT NULL,
6+
parent_uid VARCHAR(255) DEFAULT NULL,
7+
flags INTEGER NOT NULL,
8+
label VARCHAR(255) NOT NULL,
9+
user_id VARCHAR(255) NOT NULL,
10+
ws_id VARCHAR(32) NOT NULL,
11+
status INTEGER NOT NULL,
12+
status_msg VARCHAR(500) NOT NULL,
13+
progress INTEGER NOT NULL,
14+
schedule INTEGER NOT NULL,
15+
schedule_value VARCHAR(255) DEFAULT NULL,
16+
action VARCHAR(255) NOT NULL,
17+
parameters VARCHAR(500) NOT NULL,
18+
nodes VARCHAR(500) NOT NULL,
19+
creation_date INTEGER NOT NULL DEFAULT 0,
20+
status_update INTEGER NOT NULL DEFAULT 0,
21+
22+
PRIMARY KEY (uid)
23+
);
24+
25+
26+
CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks (user_id);
27+
CREATE INDEX ajxp_task_status_idx ON ajxp_tasks (status);
28+
CREATE INDEX ajxp_task_type ON ajxp_tasks (type);
29+
CREATE INDEX ajxp_task_schedule ON ajxp_tasks (schedule);
30+
CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);

0 commit comments

Comments
 (0)