From f290bf06e4e0a541ebf7457535a8c9f134cf5644 Mon Sep 17 00:00:00 2001 From: Christopher Engelhard Date: Tue, 10 Nov 2020 19:44:19 +0100 Subject: [PATCH] fix occ shebang and make it executable --- 0001-mangle-shebang.patch | 9 +++++++++ nextcloud.spec | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 0001-mangle-shebang.patch diff --git a/0001-mangle-shebang.patch b/0001-mangle-shebang.patch new file mode 100644 index 0000000..5755104 --- /dev/null +++ b/0001-mangle-shebang.patch @@ -0,0 +1,9 @@ +diff -Naur a/occ b/occ +--- a/occ 2020-10-24 10:37:44.000000000 +0200 ++++ b/occ 2020-11-10 19:39:56.523178958 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env php ++#!/usr/bin/php + diff --git a/nextcloud.spec b/nextcloud.spec index f785f25..75eb431 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -33,6 +33,8 @@ Source303: %{name}-MIGRATION.fedora # Remove updater version check, we know that updates across more than one # version are possible Patch0: 0000-disable-update-version-check.patch +# Change occ shebang to /usr/bin/php +Patch1: 0001-mangle-shebang.patch BuildArch: noarch # For the systemd macros @@ -339,10 +341,13 @@ for d in $(find . -mindepth 1 -maxdepth 1 -type d | grep -v config); do cp -a "$d" %{buildroot}%{_datadir}/%{name} done -for f in {*.php,*.html,occ,robots.txt}; do +for f in {*.php,*.html,robots.txt}; do install -pm 644 "$f" %{buildroot}%{_datadir}/%{name} done +# occ should be executable +install -pm 755 occ %{buildroot}%{_datadir}/%{name} + # symlink config dir ln -sf %{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config