diff --git a/base/Dockerfile b/base/Dockerfile index 34d7c474a45d6df0daccdd6adb07dd3bc35ce9d9..ecb5e2ab873417e4671778db3ed5144e6488975c 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -25,6 +25,12 @@ COPY ./img/logo /usr/src/nextcloud/core/img/logo COPY ./img/favicon.ico /usr/src/nextcloud/core/img/favicon.ico COPY install.sh /install.sh COPY refresh_config.sh /refresh_config.sh +COPY patches /usr/src/nextcloud/patches +RUN for patch in /usr/src/nextcloud/patches/*.diff; \ + do \ + patch -p0 < $patch; \ + done; \ + rm -r /usr/src/nextcloud/patches/; RUN for app in $(cat /usr/src/nextcloud/apps/remove-list);do \ echo "removing app $app"; \ rm -R /usr/src/nextcloud/apps/$app; \ diff --git a/base/patches/TableManager-patch.diff b/base/patches/TableManager-patch.diff new file mode 100644 index 0000000000000000000000000000000000000000..600b3da434d9c6c40be5a67e5da8f111e76807f7 --- /dev/null +++ b/base/patches/TableManager-patch.diff @@ -0,0 +1,25 @@ +--- apps/polls/lib/Db/TableManager.php 2023-06-21 12:38:02.300193982 +0200 ++++ apps/polls/lib/Db/TableManager-patched.php 2023-06-21 12:48:45.144957659 +0200 +@@ -312,12 +312,18 @@ + if ($this->schema->hasTable($this->dbPrefix . $table)) { + // identify duplicates + $selection = $qb->selectDistinct('t1.id') +- ->from($table, 't1') +- ->innerJoin('t1', $table, 't2') +- ->where($qb->expr()->lt('t1.id', 't2.id')); ++ ->from($table, 't1') ++ ->innerJoin('t1', $table, 't2', $qb->expr()->lt('t1.id', 't2.id')); ++ ++ $i = 0; + + foreach ($columns as $column) { +- $selection->andWhere($qb->expr()->eq('t1.' . $column, 't2.' . $column)); ++ if ($i > 0) { ++ $selection->andWhere($qb->expr()->eq('t1.' . $column, 't2.' . $column)); ++ } else { ++ $selection->where($qb->expr()->eq('t1.' . $column, 't2.' . $column)); ++ } ++ $i++; + } + + $duplicates = $qb->executeQuery()->fetchAll(PDO::FETCH_COLUMN); diff --git a/base/patches/pgmigrator-patch.diff b/base/patches/pgmigrator-patch.diff new file mode 100644 index 0000000000000000000000000000000000000000..28875220b2c368c01fdfcce0928c77bfe6e98194 --- /dev/null +++ b/base/patches/pgmigrator-patch.diff @@ -0,0 +1,11 @@ +--- lib/private/DB/PostgreSqlMigrator.php 2023-06-21 12:07:32.451928839 +0200 ++++ ../PostgreSqlMigrator.php 2023-06-21 12:07:28.165261718 +0200 +@@ -42,7 +42,7 @@ + } + $fromDefault = $column->fromColumn->getDefault(); + $toDefault = $column->column->getDefault(); +- $fromDefault = trim($fromDefault, "()"); ++ $fromDefault = trim((string) $fromDefault, '()'); + + // by intention usage of != + return $fromDefault != $toDefault;