From fc6ca4c87739b2ac232daf53cecb4b26f3bc1117 Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Sat, 18 Feb 2017 14:26:35 +0100 Subject: [PATCH] Made TTRSS-API extension work --- Dockerfile | 13 ++++++++----- change-ttrss-file-path.patch | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 change-ttrss-file-path.patch diff --git a/Dockerfile b/Dockerfile index 83ecd94..3f20ebc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,11 +20,14 @@ RUN mkdir -p /app/data \ && mv data data-orig \ && ln -s /app/data data -RUN mkdir /app/code/extensions-orig \ - && wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.tar.gz -O - \ - | tar -xz --strip-components=1 -C /app/code/extensions-orig \ - && rm -rf /app/code/extensions \ - && ln -s /app/data/extensions /app/code/extensions +ADD change-ttrss-file-path.patch /app/code/change-ttrss-file-path.patch + +RUN wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.tar.gz -O - \ + | tar -xz --strip-components=1 -C /app/code/extensions \ + && patch -p1 -d /app/code/extensions < /app/code/change-ttrss-file-path.patch \ + && mv /app/code/extensions /app/code/extensions-orig \ + && ln -s /app/data/extensions /app/code/extensions \ + && ln -s /app/data/extensions/ttrss.php /app/code/p/api/ttrss.php ADD apache2.conf /etc/apache2/sites-available/freshrss.conf diff --git a/change-ttrss-file-path.patch b/change-ttrss-file-path.patch new file mode 100644 index 0000000..02c203b --- /dev/null +++ b/change-ttrss-file-path.patch @@ -0,0 +1,21 @@ +diff -ru extensions-orig/xExtension-TTRSS_API/extension.php extensions/xExtension-TTRSS_API/extension.php +--- extensions-orig/xExtension-TTRSS_API/extension.php 2016-12-15 10:24:17.000000000 +0000 ++++ extensions/xExtension-TTRSS_API/extension.php 2017-02-18 13:06:59.640761922 +0000 +@@ -9,7 +9,7 @@ + public function install() { + $filename = 'ttrss.php'; + $file_source = join_path($this->getPath(), $filename); +- $path_destination = join_path(PUBLIC_PATH, 'api'); ++ $path_destination = '/app/data/extensions'; + $file_destination = join_path($path_destination, $filename); + + if (!is_writable($path_destination)) { +@@ -35,7 +35,7 @@ + + public function uninstall() { + $filename = 'ttrss.php'; +- $file_destination = join_path(PUBLIC_PATH, 'api', $filename); ++ $file_destination = join_path('/app/data/extensions', $filename); + + if (file_exists($file_destination) && !unlink($file_destination)) { + return 'API file cannot be removed';