[arch-commits] Commit in nextcloud/trunk (PKGBUILD nextcloud.install nextcloud.occ.sh)

David Runge dvzrv at archlinux.org
Sun Feb 21 09:25:52 UTC 2021


    Date: Sunday, February 21, 2021 @ 09:25:51
  Author: dvzrv
Revision: 867612

upgpkg: nextcloud 21.0.0-6: Rebuild to make file installation more generic.

Make the find call to install files of the web app more generic.
Remove the user change by environment variable of the /usr/bin/occ command,
as it caused issues due to sudo not picking it up properly.
Change the group ownership of directories below /usr/share/webapps/nextcloud
back to root in the .install file (with nextcloud < 21.0.0 the files were
recursively assigned to the http group, but this is not necessary).

Modified:
  nextcloud/trunk/PKGBUILD
  nextcloud/trunk/nextcloud.install
  nextcloud/trunk/nextcloud.occ.sh

-------------------+
 PKGBUILD          |   45 ++++-----------------------------------------
 nextcloud.install |    1 +
 nextcloud.occ.sh  |   11 +----------
 3 files changed, 6 insertions(+), 51 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-02-21 09:10:34 UTC (rev 867611)
+++ PKGBUILD	2021-02-21 09:25:51 UTC (rev 867612)
@@ -4,7 +4,7 @@
 pkgname=nextcloud
 # NOTE: do not package x.0.0 versions as they are considered beta
 pkgver=21.0.0
-pkgrel=5
+pkgrel=6
 pkgdesc="A cloud server to store your files centrally on a hardware controlled by you"
 arch=('any')
 url="https://nextcloud.com"
@@ -54,7 +54,7 @@
             '6f9f284d78d414a3bb7c159a812b105e31e8cd2393afee44465701e6f18169709f6d492d790e403e1e66f308c51b6b6496d29ddce29e4fac2c73a3c84a10c7fe'
             '92592f9a76ee534d0ae6d3aedf2257c147337debe7e2d6dbec1daff66a682e3abc74611e08662058de314bf3ea6ff1c85efd678674b782d71251c38786e446f9'
             '7b18b73ee369607b8ee3d00d2a054262a7b8f3033fc4873eb333c9b9333d7338870c035910ae123b564a65d7d245730178137311048f0713d5bc524de3654923'
-            'cd86397e08459c9f06cfd44ff27a35879157166f5e8aab95d51bc7c4bb11f93e7c414a08ec1cbe9e81f1b4edfbf5eb5eaba7c6904da80a2c92c765bcb546aa66'
+            '23f963f17dd760825417644fdd1a24ef04109a30daf601771ea94c480d5ae9190c37227f0de6779f6876bcd22f41eaa3a96e9d5127cc0472e1ad744526e97c36'
             '1d06f339c43d57e5f5406c2698b815241fd9e39039a9e55f777face510c9a5ddae5ccd4e051393e8f16f391301a6aa03fff2462837a2d3441d969ea7195e7d84'
             '220837083fe6ea19f506642d7bc465f4ad8c4daa7d374875f6f9026cc2e893d5a077d161b6e6e8f335718c6b8f488378649273218db19c30fa48e391afb5fb5e'
             'a3ebcabcdb8c2d2653f44a248abd213bc4dbb317766b82c8f3e93b31e72ace350d7e8037bd4e22a632ab33f739e1941467b0e9d2cf7d0a7433227b4169030051')
@@ -63,7 +63,7 @@
         'a7e1aa1d8cb2b0ff7832bb7d6d857987733253317c0f3727e744502aeaa3b2008351b47ecc24e348fe7b252cefaffe2418797523ee288dfd55e128917e8fbe2c'
         '4ad061efbc20b4d0e9f8cfd01c5e8e612fa5af29bce754b77f90c1835b98ee445ef4de3d8c83da91461053622620af14d880eb9014b51f2383c75f1860d479f4'
         '772a9571fe7d88dbcbeb46351a188354e237dfe8e020131f2752b3a36cff0ff177423b4cfd6a1a5f28946f86a8581f3e24ee06ebda7260c5f862ca4071908e43'
-        '6a90659bf0ab7163fe0cf591abed9b58b9ff09c548698e7f8844ecc710917cf05561bad754f6d7543593d13b41e9ec630042b4fc3fbad43e1011b0e45868e4ed'
+        'eb0ff4fbcc95cbd1463d53fedb1e30bba08f62c0f2684899fa75286bfac74eb0ec5358a9488cbc6385d048a4f4b42292202d54f628c6358548cd02e032693e24'
         '1a61a89531636b65dade03cd7edca8747b3e1e880f9bbd4d5a53cffa452d70fe17e345cfed739ae92e99e336d4c1f2633c84a5c84a4ee6da518762bf1396b1db'
         '30e5f0e67ce8004cc3a1d08009c452549c65041b0da4d8f5d630b62ea7cc77a028907c388144f37774b839ca449d0977afb95145501ef620bface8e714754e38'
         'd3c66e22c3cc1b8de1c0b60cd32701080d599dc9853af41d9d9d493ffe3a8d9a2573455d80dd0de019dfe9992187cb23b9df90c18f0ca5962912566014c6779c')
@@ -95,44 +95,7 @@
   rm -rf config
 
   # webapp
-  find . -type f \( \
-    -iname "*.php" \
-    -or -iname "*.bcmap" \
-    -or -iname "*.crl" \
-    -or -iname "*.crt" \
-    -or -iname "*.css" \
-    -or -iname "*.dist" \
-    -or -iname "*.docx" \
-    -or -iname "*.handlebars" \
-    -or -iname "*.gif" \
-    -or -iname "*.ico" \
-    -or -iname "*.ini" \
-    -or -iname "*.jpg" \
-    -or -iname "*.js" \
-    -or -iname "*.json" \
-    -or -iname "*.lock" \
-    -or -iname "*.map" \
-    -or -iname "*.md" \
-    -or -iname "*.odp" \
-    -or -iname "*.ods" \
-    -or -iname "*.odt" \
-    -or -iname "*.pdf" \
-    -or -iname "*.png" \
-    -or -iname "*.properties" \
-    -or -iname "*.scss" \
-    -or -iname "*.svg" \
-    -or -iname "*.ttf" \
-    -or -iname "*.txt" \
-    -or -iname "*.whiteboard" \
-    -or -iname "*.woff" \
-    -or -iname "*.yml" \
-    -or -iname "*.xml" \
-    -or -iname "*.xsd" \
-    -or -iname "*COPYING*" \
-    -or -iname "*LICENSE*" \
-    -or -iname "*CAN_INSTALL" \
-    -or -iname "*.htaccess" \
-    \) -exec install -vDm 644 {} "${pkgdir}/usr/share/webapps/${pkgname}/"{} \;
+  find . -type f -exec install -vDm 644 {} "${pkgdir}/usr/share/webapps/${pkgname}/"{} \;
 
   # symlink config directory into place
   ln -sv "/etc/webapps/${pkgname}/config" "${pkgdir}/usr/share/webapps/${pkgname}/"

Modified: nextcloud.install
===================================================================
--- nextcloud.install	2021-02-21 09:10:34 UTC (rev 867611)
+++ nextcloud.install	2021-02-21 09:25:51 UTC (rev 867612)
@@ -8,4 +8,5 @@
     printf "         The configuration file is now in /etc/webapps/nextcloud/config.php.\n"
     printf "         A convenience wrapper around occ is provided in /usr/bin/occ.\n"
   fi
+  find /usr/share/webapps/nextcloud -type d -exec chgrp root {} \;
 }

Modified: nextcloud.occ.sh
===================================================================
--- nextcloud.occ.sh	2021-02-21 09:10:34 UTC (rev 867611)
+++ nextcloud.occ.sh	2021-02-21 09:25:51 UTC (rev 867612)
@@ -2,11 +2,9 @@
 
 readonly default_config="/etc/php/php.ini"
 readonly default_php_command="/usr/bin/php"
-readonly default_user="nextcloud"
 
 config=""
 php_command=""
-user=""
 
 check_sudo() {
   if ! command -v sudo > /dev/null; then
@@ -31,11 +29,4 @@
   php_command="${default_php_command}"
 fi
 
-# allow overriding the user to run as
-if [[ -n "${USER}" ]]; then
-  user="${USER}"
-else
-  user="${default_user}"
-fi
-
-sudo -u "${user}" "$php_command" -c "${config}" /usr/share/webapps/nextcloud/occ "$@"
+sudo -u nextcloud "$php_command" -c "${config}" /usr/share/webapps/nextcloud/occ "$@"



More information about the arch-commits mailing list