Skip to content

Commit 95e3cde

Browse files
fix: remove Oracle/OCI support from installer and setup (#41555)
* fix: remove Oracle/OCI database option from installer Oracle is no longer a supported database. Remove the --database-connection-string option from maintenance:install, drop OCI from the setup class registry and supported databases list, clean up the web installer template and JS, and update the SetupTest assertions accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> * fix: delete OC\Setup\OCI class Oracle is no longer supported, so the setup class used during installation is no longer needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> * fix: remove remaining Oracle/OCI setup and CI references - Drop dbconnectionstring and dbConnectionString from AbstractDatabase - Remove dbtablespace default from SetupController - Remove oci from DBCONFIGS, Oracle docker spin-up, and oci notes in autotest.sh and autotest-external.sh - Remove plugin_wait_for_oracle(), oracle) case, and --database-connection-string branch from install-server.sh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --------- Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 41fe372 commit 95e3cde

11 files changed

Lines changed: 17 additions & 339 deletions

File tree

build/autotest-external.sh

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DATABASEUSER=oc_autotest$EXECUTOR_NUMBER
1414
ADMINLOGIN=admin$EXECUTOR_NUMBER
1515
BASEDIR=$PWD
1616

17-
DBCONFIGS="sqlite mysql pgsql oci"
17+
DBCONFIGS="sqlite mysql pgsql"
1818
if test -z "$PHPUNIT"; then
1919
PHPUNIT=$(which phpunit)
2020
fi
@@ -118,33 +118,6 @@ function execute_tests {
118118
if [ "$1" == "pgsql" ] ; then
119119
dropdb -U $DATABASEUSER $DATABASENAME || true
120120
fi
121-
if [ "$1" == "oci" ] ; then
122-
echo "drop the database"
123-
sqlplus -s -l / as sysdba <<EOF
124-
drop user $DATABASENAME cascade;
125-
EOF
126-
127-
echo "create the database"
128-
sqlplus -s -l / as sysdba <<EOF
129-
create user $DATABASENAME identified by owncloud;
130-
alter user $DATABASENAME default tablespace users
131-
temporary tablespace temp
132-
quota unlimited on users;
133-
grant create session
134-
, create table
135-
, create procedure
136-
, create sequence
137-
, create trigger
138-
, create view
139-
, create synonym
140-
, alter session
141-
to $DATABASENAME;
142-
exit;
143-
EOF
144-
DATABASEUSER=$DATABASENAME
145-
DATABASENAME='XE'
146-
fi
147-
148121
# copy autoconfig
149122
cp "$BASEDIR/tests/autoconfig-$1.php" "$BASEDIR/config/autoconfig.php"
150123

@@ -264,9 +237,3 @@ fi
264237
#
265238
# - for parallel executor support with EXECUTOR_NUMBER=0:
266239
# - createuser -P oc_autotest0 (enter password and enable superuser)
267-
#
268-
# NOTES on oci:
269-
# - it's a pure nightmare to install Oracle on a Linux-System
270-
# - DON'T TRY THIS AT HOME!
271-
# - if you really need it: we feel sorry for you
272-
#

build/autotest.sh

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ADMINLOGIN=admin$EXECUTOR_NUMBER
2121
BASEDIR=$PWD
2222

2323
PRIMARY_STORAGE_CONFIGS="local swift"
24-
DBCONFIGS="sqlite mysql mariadb pgsql oci mysqlmb4"
24+
DBCONFIGS="sqlite mysql mariadb pgsql mysqlmb4"
2525

2626
# $PHP_EXE is run through 'which' and as such e.g. 'php' or 'hhvm' is usually
2727
# sufficient. Due to the behaviour of 'which', $PHP_EXE may also be a path
@@ -35,10 +35,6 @@ if test -z "$PHPUNIT"; then
3535
PHPUNIT=$(which phpunit)
3636
fi
3737

38-
if [ -z "$SQLPLUS" ]; then
39-
SQLPLUS=$(which sqlplus 2>/dev/null)
40-
fi
41-
4238
set -e
4339

4440
_XDEBUG_CONFIG=$XDEBUG_CONFIG
@@ -278,31 +274,6 @@ function execute_tests {
278274
dropdb -U "$DATABASEUSER" "$DATABASENAME" || true
279275
fi
280276
fi
281-
if [ "$DB" == "oci" ] ; then
282-
echo "Fire up the oracle docker"
283-
DOCKER_CONTAINER_ID=$(docker run -d deepdiver/docker-oracle-xe-11g)
284-
DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
285-
286-
echo "Waiting for Oracle initialization ... "
287-
288-
if [ ! -z "$SQLPLUS" ]; then
289-
# Try to connect to the OCI host via sqlplus to ensure that the connection is already running
290-
for i in {1..48}
291-
do
292-
if "$SQLPLUS" "autotest/owncloud@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=$DATABASEHOST)(Port=1521))(CONNECT_DATA=(SID=XE)))" < /dev/null | grep 'Connected to'; then
293-
break;
294-
fi
295-
sleep 5
296-
done
297-
else
298-
echo "sqlplus not found, using sleep to wait for Oracle initialization"
299-
sleep 120
300-
fi
301-
302-
DATABASEUSER=autotest
303-
DATABASENAME='XE'
304-
fi
305-
306277
# trigger installation
307278
echo "Installing ...."
308279
"$PHP" ./occ maintenance:install -vvv --database="$_DB" --database-name="$DATABASENAME" --database-host="$DATABASEHOST" --database-user="$DATABASEUSER" --database-pass=owncloud --database-table-prefix=oc_ --admin-user="$ADMINLOGIN" --admin-pass=admin --data-dir="$DATADIR"
@@ -373,9 +344,3 @@ fi
373344
# - for parallel executor support with EXECUTOR_NUMBER=0:
374345
# - createuser -P oc_autotest0 (enter password "owncloud")
375346
# - psql -c 'ALTER USER oc_autotest0 CREATEDB;' (to give the user the privileged to create databases)
376-
#
377-
# NOTES on oci:
378-
# - it's a pure nightmare to install Oracle on a Linux-System
379-
# - DON'T TRY THIS AT HOME!
380-
# - if you really need it: we feel sorry for you
381-
#

core/Command/Maintenance/Install.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ protected function configure() {
4949
->setName('maintenance:install')
5050
->setDescription('Install ownCloud.')
5151
->addOption('database', null, InputOption::VALUE_REQUIRED, 'Supported database type.', 'sqlite')
52-
->addOption('database-connection-string', null, InputOption::VALUE_REQUIRED, 'Oracle specific connection string. As soon as this parameter is provided other parameters like database-host and database-name are not used and do not need to be provided')
5352
->addOption('database-name', null, InputOption::VALUE_REQUIRED, 'Name of the database.')
5453
->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database.', 'localhost')
5554
->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'User name to connect to the database.')
@@ -112,13 +111,7 @@ protected function validateInput(InputInterface $input, OutputInterface $output,
112111
$dbUser = $input->getOption('database-user');
113112
$dbPass = $input->getOption('database-pass');
114113
$dbName = $input->getOption('database-name');
115-
$dbConnectionString = $input->getOption('database-connection-string');
116-
if ($db === 'oci') {
117-
// an empty hostname needs to be read from the raw parameters
118-
$dbHost = $input->getParameterOption('--database-host', '');
119-
} else {
120-
$dbHost = $input->getOption('database-host');
121-
}
114+
$dbHost = $input->getOption('database-host');
122115
$dbTablePrefix = 'oc_';
123116
if ($input->hasParameterOption('--database-table-prefix')) {
124117
$dbTablePrefix = (string) $input->getOption('database-table-prefix');
@@ -135,8 +128,8 @@ protected function validateInput(InputInterface $input, OutputInterface $output,
135128
if ($dbUser === null) {
136129
throw new InvalidArgumentException("Database user not provided.");
137130
}
138-
if ($dbName === null && $dbConnectionString === null) {
139-
throw new InvalidArgumentException('Database name and connection string not provided.');
131+
if ($dbName === null) {
132+
throw new InvalidArgumentException('Database name not provided.');
140133
}
141134
if ($dbPass === null) {
142135
/** @var $dialog \Symfony\Component\Console\Helper\QuestionHelper */
@@ -163,7 +156,6 @@ protected function validateInput(InputInterface $input, OutputInterface $output,
163156
'dbpass' => $dbPass,
164157
'dbname' => $dbName,
165158
'dbhost' => $dbHost,
166-
'dbconnectionstring' => $dbConnectionString,
167159
'dbtableprefix' => $dbTablePrefix,
168160
'adminlogin' => $adminLogin,
169161
'adminpass' => $adminPassword,

core/Controller/SetupController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public function display($post) {
8383
'dbuser' => '',
8484
'dbpass' => '',
8585
'dbname' => '',
86-
'dbtablespace' => '',
8786
'dbhost' => 'localhost',
8887
'dbtype' => '',
8988
];

core/js/setup.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ $(document).ready(function() {
33
dbtypes={
44
sqlite:!!$('#hasSQLite').val(),
55
mysql:!!$('#hasMySQL').val(),
6-
postgresql:!!$('#hasPostgreSQL').val(),
7-
oracle:!!$('#hasOracle').val()
6+
postgresql:!!$('#hasPostgreSQL').val()
87
};
98

109
$('#selectDbType').buttonset();
@@ -13,7 +12,6 @@ $(document).ready(function() {
1312

1413
if($('#hasSQLite').val()){
1514
$('#use_other_db').hide();
16-
$('#use_oracle_db').hide();
1715
} else {
1816
$('#sqliteInformation').hide();
1917
}
@@ -22,25 +20,16 @@ $(document).ready(function() {
2220
});
2321
$('#sqlite').click(function() {
2422
$('#use_other_db').slideUp(250);
25-
$('#use_oracle_db').slideUp(250);
2623
$('#sqliteInformation').show();
2724
$('#dbname').attr('pattern','[0-9a-zA-Z$_-]+');
2825
});
2926

3027
$('#mysql,#pgsql').click(function() {
3128
$('#use_other_db').slideDown(250);
32-
$('#use_oracle_db').slideUp(250);
3329
$('#sqliteInformation').hide();
3430
$('#dbname').attr('pattern','[0-9a-zA-Z$_-]+');
3531
});
3632

37-
$('#oci').click(function() {
38-
$('#use_other_db').slideDown(250);
39-
$('#use_oracle_db').show(250);
40-
$('#sqliteInformation').hide();
41-
$('#dbname').attr('pattern','[0-9a-zA-Z$_-.]+');
42-
});
43-
4433
$('input[checked]').trigger('click');
4534

4635
$('#showAdvanced').click(function(e) {

core/templates/installation.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<input type='hidden' id='hasMySQL' value='<?php p($_['hasMySQL']) ?>'>
88
<input type='hidden' id='hasSQLite' value='<?php p($_['hasSQLite']) ?>'>
99
<input type='hidden' id='hasPostgreSQL' value='<?php p($_['hasPostgreSQL']) ?>'>
10-
<input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'>
1110
<form action="index.php" method="post" autocapitalize="none">
1211
<input type="hidden" name="install" value="true">
1312
<?php if (\count($_['errors']) > 0): ?>
@@ -65,7 +64,7 @@
6564

6665
<?php if (!$_['dbIsSet'] or \count($_['errors']) > 0): ?>
6766
<fieldset id='databaseBackend'>
68-
<?php if ($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) {
67+
<?php if ($_['hasMySQL'] or $_['hasPostgreSQL']) {
6968
$hasOtherDB = true;
7069
} else {
7170
$hasOtherDB =false;
@@ -117,17 +116,6 @@
117116
autocomplete="off" autocorrect="off"
118117
pattern="[0-9a-zA-Z$_-]+">
119118
</p>
120-
<?php if ($_['hasOracle']): ?>
121-
<div id="use_oracle_db">
122-
<p class="groupmiddle">
123-
<label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label>
124-
<input type="text" name="dbtablespace" id="dbtablespace"
125-
placeholder="<?php p($l->t('Database tablespace')); ?>"
126-
value="<?php p($_['dbtablespace']); ?>"
127-
autocomplete="off" autocorrect="off">
128-
</p>
129-
</div>
130-
<?php endif; ?>
131119
<p class="groupbottom">
132120
<label for="dbhost" class="infield"><?php p($l->t('Database host')); ?></label>
133121
<input type="text" name="dbhost" id="dbhost"

lib/private/Setup.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public function __construct(
8585
public static $dbSetupClasses = [
8686
'mysql' => \OC\Setup\MySQL::class,
8787
'pgsql' => \OC\Setup\PostgreSQL::class,
88-
'oci' => \OC\Setup\OCI::class,
8988
'sqlite' => \OC\Setup\Sqlite::class,
9089
'sqlite3' => \OC\Setup\Sqlite::class,
9190
];
@@ -143,11 +142,6 @@ public function getSupportedDatabases(bool $allowAllDatabases = false): array {
143142
'call' => 'pg_connect',
144143
'name' => 'PostgreSQL'
145144
],
146-
'oci' => [
147-
'type' => 'function',
148-
'call' => 'oci_connect',
149-
'name' => 'Oracle'
150-
]
151145
];
152146
if ($allowAllDatabases) {
153147
$configuredDatabases = \array_keys($availableDatabases);
@@ -242,7 +236,6 @@ public function getSystemInfo(bool $allowAllDatabases = false): array {
242236
'hasSQLite' => isset($databases['sqlite']),
243237
'hasMySQL' => isset($databases['mysql']),
244238
'hasPostgreSQL' => isset($databases['pgsql']),
245-
'hasOracle' => isset($databases['oci']),
246239
'databases' => $databases,
247240
'directory' => $dataDir,
248241
'errors' => $errors,

lib/private/Setup/AbstractDatabase.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ abstract class AbstractDatabase {
4242
/** @var string */
4343
protected $dbHost;
4444
/** @var string */
45-
protected $dbConnectionString;
46-
/** @var string */
4745
protected $tablePrefix;
4846
/** @var string */
4947
protected $dbprettyname;
@@ -78,13 +76,11 @@ public function initialize($config) {
7876
$dbUser = $config['dbuser'];
7977
$dbPass = $config['dbpass'];
8078
$dbName = $config['dbname'];
81-
$dbConnectionString = $config['dbconnectionstring'] ?? '';
8279
$dbHost = !empty($config['dbhost']) ? $config['dbhost'] : 'localhost';
8380
$dbTablePrefix = isset($config['dbtableprefix']) ? $config['dbtableprefix'] : 'oc_';
8481

8582
$this->config->setSystemValues([
8683
'dbname' => $dbName,
87-
'dbconnectionstring' => $dbConnectionString,
8884
'dbhost' => $dbHost,
8985
'dbtableprefix' => $dbTablePrefix,
9086
]);
@@ -93,7 +89,6 @@ public function initialize($config) {
9389
$this->dbPassword = $dbPass;
9490
$this->dbName = $dbName;
9591
$this->dbHost = $dbHost;
96-
$this->dbConnectionString = $dbConnectionString;
9792
$this->tablePrefix = $dbTablePrefix;
9893
}
9994

0 commit comments

Comments
 (0)