From 9143a49d56bfa779e26bf31d690019e3e02dc953 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 23 Oct 2024 00:21:35 +0200 Subject: [PATCH 1/3] luci-app-opkg: fix passing wrong option on opkg update/install Fix passing wrong option on opkg update/install. While starting to introduce support for APK in the opkg module, it was notice that --force-removal-of-dependent-packages was always passed even with update and install command. This was probably a leftover/oversight of old one. To fix this, limit this option only on remove and also update the acl.d to support single call to update or install. Fixes: 9b25031cb29b ("luci-app-opkg: rework backend operations") Signed-off-by: Christian Marangi --- .../luci-app-opkg/htdocs/luci-static/resources/view/opkg.js | 5 ++++- .../root/usr/share/rpcd/acl.d/luci-app-opkg.json | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js index 053d74729f15..1ed27447f1b4 100644 --- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js +++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js @@ -984,7 +984,10 @@ function handleOpkg(ev) _('Waiting for the opkg %h command to complete…').format(cmd)) ]); - var argv = [ cmd, '--force-removal-of-dependent-packages' ]; + var argv = [ cmd ]; + + if (cmd == 'remove') + argv.push('--force-removal-of-dependent-packages') if (rem && rem.checked) argv.push('--autoremove'); diff --git a/applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json b/applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json index d6531a58e440..649666c26034 100644 --- a/applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json +++ b/applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json @@ -17,9 +17,10 @@ }, "write": { "file": { + "/usr/libexec/opkg-call install": [ "exec" ], "/usr/libexec/opkg-call install *": [ "exec" ], "/usr/libexec/opkg-call remove *": [ "exec" ], - "/usr/libexec/opkg-call update *": [ "exec" ], + "/usr/libexec/opkg-call update": [ "exec" ], "/etc/opkg.conf": [ "write" ], "/etc/opkg/*.conf": [ "write" ], "/tmp/upload.ipk": [ "write" ] From 56abbf46e1fad543dcf85a49dbca9ec297d95b41 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 23 Oct 2024 22:33:05 +0200 Subject: [PATCH 2/3] luci-base: add APK as detectable feature Add APK as detectable feature so that generic luci-app-pkg can detect OPKG or APK package manager. Signed-off-by: Christian Marangi --- modules/luci-base/root/usr/share/rpcd/ucode/luci | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci index 9bb8bb88c7d8..26fd3b0e5b00 100644 --- a/modules/luci-base/root/usr/share/rpcd/ucode/luci +++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci @@ -206,6 +206,7 @@ const methods = { dropbear: access('/usr/sbin/dropbear') == true, cabundle: access('/etc/ssl/certs/ca-certificates.crt') == true, relayd: access('/usr/sbin/relayd') == true, + apk: access('/usr/bin/apk') == true, }; const wifi_features = [ 'eap', '11ac', '11ax', '11be', '11r', 'acs', 'sae', 'owe', 'suiteb192', 'wep', 'wps', 'ocv' ]; From 222089347dbe40ded061a675a17fd5498dfd62b8 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 23 Oct 2024 01:29:10 +0200 Subject: [PATCH 3/3] luci-app-package-manager: rename from luci-app-opkg and add APK support Rename luci-app-opkg to luci-app-package-manager and add APK support for it. The idea is to adapt APK to mimik OPKG output to require minimal changes to the luci app. Signed-off-by: Christian Marangi --- .../luci-app-opkg/po/templates/opkg.pot | 387 ------------------ .../luci-app-opkg/root/usr/libexec/opkg-call | 59 --- .../usr/share/luci/menu.d/luci-app-opkg.json | 13 - .../usr/share/rpcd/acl.d/luci-app-opkg.json | 30 -- .../Makefile | 4 +- .../resources/view/package-manager.js} | 65 +-- .../po/ar/package-manager.po} | 0 .../po/bg/package-manager.po} | 0 .../po/bn_BD/package-manager.po} | 0 .../po/ca/package-manager.po} | 0 .../po/cs/package-manager.po} | 0 .../po/da/package-manager.po} | 0 .../po/de/package-manager.po} | 0 .../po/el/package-manager.po} | 0 .../po/en/package-manager.po} | 0 .../po/es/package-manager.po} | 0 .../po/fa/package-manager.po} | 0 .../po/fi/package-manager.po} | 0 .../po/fr/package-manager.po} | 0 .../po/ga/package-manager.po} | 0 .../po/he/package-manager.po} | 0 .../po/hi/package-manager.po} | 0 .../po/hu/package-manager.po} | 0 .../po/it/package-manager.po} | 0 .../po/ja/package-manager.po} | 0 .../po/ko/package-manager.po} | 0 .../po/lt/package-manager.po} | 0 .../po/mr/package-manager.po} | 0 .../po/ms/package-manager.po} | 0 .../po/nb_NO/package-manager.po} | 0 .../po/nl/package-manager.po} | 0 .../po/pl/package-manager.po} | 0 .../po/pt/package-manager.po} | 0 .../po/pt_BR/package-manager.po} | 0 .../po/ro/package-manager.po} | 0 .../po/ru/package-manager.po} | 0 .../po/sk/package-manager.po} | 0 .../po/sv/package-manager.po} | 0 .../po/templates/package-manager.pot | 387 ++++++++++++++++++ .../po/tr/package-manager.po} | 0 .../po/uk/package-manager.po} | 0 .../po/ur/package-manager.po} | 0 .../po/vi/package-manager.po} | 0 .../po/yua/package-manager.po} | 0 .../po/zh_Hans/package-manager.po} | 0 .../po/zh_Hant/package-manager.po} | 0 .../root/usr/libexec/package-manager-call | 111 +++++ .../luci/menu.d/luci-app-package-manager.json | 13 + .../rpcd/acl.d/luci-app-package-manager.json | 31 ++ collections/luci/Makefile | 2 +- 50 files changed, 584 insertions(+), 518 deletions(-) delete mode 100644 applications/luci-app-opkg/po/templates/opkg.pot delete mode 100755 applications/luci-app-opkg/root/usr/libexec/opkg-call delete mode 100644 applications/luci-app-opkg/root/usr/share/luci/menu.d/luci-app-opkg.json delete mode 100644 applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json rename applications/{luci-app-opkg => luci-app-package-manager}/Makefile (79%) rename applications/{luci-app-opkg/htdocs/luci-static/resources/view/opkg.js => luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js} (92%) rename applications/{luci-app-opkg/po/ar/opkg.po => luci-app-package-manager/po/ar/package-manager.po} (100%) rename applications/{luci-app-opkg/po/bg/opkg.po => luci-app-package-manager/po/bg/package-manager.po} (100%) rename applications/{luci-app-opkg/po/bn_BD/opkg.po => luci-app-package-manager/po/bn_BD/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ca/opkg.po => luci-app-package-manager/po/ca/package-manager.po} (100%) rename applications/{luci-app-opkg/po/cs/opkg.po => luci-app-package-manager/po/cs/package-manager.po} (100%) rename applications/{luci-app-opkg/po/da/opkg.po => luci-app-package-manager/po/da/package-manager.po} (100%) rename applications/{luci-app-opkg/po/de/opkg.po => luci-app-package-manager/po/de/package-manager.po} (100%) rename applications/{luci-app-opkg/po/el/opkg.po => luci-app-package-manager/po/el/package-manager.po} (100%) rename applications/{luci-app-opkg/po/en/opkg.po => luci-app-package-manager/po/en/package-manager.po} (100%) rename applications/{luci-app-opkg/po/es/opkg.po => luci-app-package-manager/po/es/package-manager.po} (100%) rename applications/{luci-app-opkg/po/fa/opkg.po => luci-app-package-manager/po/fa/package-manager.po} (100%) rename applications/{luci-app-opkg/po/fi/opkg.po => luci-app-package-manager/po/fi/package-manager.po} (100%) rename applications/{luci-app-opkg/po/fr/opkg.po => luci-app-package-manager/po/fr/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ga/opkg.po => luci-app-package-manager/po/ga/package-manager.po} (100%) rename applications/{luci-app-opkg/po/he/opkg.po => luci-app-package-manager/po/he/package-manager.po} (100%) rename applications/{luci-app-opkg/po/hi/opkg.po => luci-app-package-manager/po/hi/package-manager.po} (100%) rename applications/{luci-app-opkg/po/hu/opkg.po => luci-app-package-manager/po/hu/package-manager.po} (100%) rename applications/{luci-app-opkg/po/it/opkg.po => luci-app-package-manager/po/it/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ja/opkg.po => luci-app-package-manager/po/ja/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ko/opkg.po => luci-app-package-manager/po/ko/package-manager.po} (100%) rename applications/{luci-app-opkg/po/lt/opkg.po => luci-app-package-manager/po/lt/package-manager.po} (100%) rename applications/{luci-app-opkg/po/mr/opkg.po => luci-app-package-manager/po/mr/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ms/opkg.po => luci-app-package-manager/po/ms/package-manager.po} (100%) rename applications/{luci-app-opkg/po/nb_NO/opkg.po => luci-app-package-manager/po/nb_NO/package-manager.po} (100%) rename applications/{luci-app-opkg/po/nl/opkg.po => luci-app-package-manager/po/nl/package-manager.po} (100%) rename applications/{luci-app-opkg/po/pl/opkg.po => luci-app-package-manager/po/pl/package-manager.po} (100%) rename applications/{luci-app-opkg/po/pt/opkg.po => luci-app-package-manager/po/pt/package-manager.po} (100%) rename applications/{luci-app-opkg/po/pt_BR/opkg.po => luci-app-package-manager/po/pt_BR/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ro/opkg.po => luci-app-package-manager/po/ro/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ru/opkg.po => luci-app-package-manager/po/ru/package-manager.po} (100%) rename applications/{luci-app-opkg/po/sk/opkg.po => luci-app-package-manager/po/sk/package-manager.po} (100%) rename applications/{luci-app-opkg/po/sv/opkg.po => luci-app-package-manager/po/sv/package-manager.po} (100%) create mode 100644 applications/luci-app-package-manager/po/templates/package-manager.pot rename applications/{luci-app-opkg/po/tr/opkg.po => luci-app-package-manager/po/tr/package-manager.po} (100%) rename applications/{luci-app-opkg/po/uk/opkg.po => luci-app-package-manager/po/uk/package-manager.po} (100%) rename applications/{luci-app-opkg/po/ur/opkg.po => luci-app-package-manager/po/ur/package-manager.po} (100%) rename applications/{luci-app-opkg/po/vi/opkg.po => luci-app-package-manager/po/vi/package-manager.po} (100%) rename applications/{luci-app-opkg/po/yua/opkg.po => luci-app-package-manager/po/yua/package-manager.po} (100%) rename applications/{luci-app-opkg/po/zh_Hans/opkg.po => luci-app-package-manager/po/zh_Hans/package-manager.po} (100%) rename applications/{luci-app-opkg/po/zh_Hant/opkg.po => luci-app-package-manager/po/zh_Hant/package-manager.po} (100%) create mode 100755 applications/luci-app-package-manager/root/usr/libexec/package-manager-call create mode 100644 applications/luci-app-package-manager/root/usr/share/luci/menu.d/luci-app-package-manager.json create mode 100644 applications/luci-app-package-manager/root/usr/share/rpcd/acl.d/luci-app-package-manager.json diff --git a/applications/luci-app-opkg/po/templates/opkg.pot b/applications/luci-app-opkg/po/templates/opkg.pot deleted file mode 100644 index b48573bd6271..000000000000 --- a/applications/luci-app-opkg/po/templates/opkg.pot +++ /dev/null @@ -1,387 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1095 -msgid "%s used (%1024mB used of %1024mB, %1024mB free)" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1135 -msgid "" -"Warning! Package operations can break your system." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1163 -msgid "Actions" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:792 -msgid "Allow overwriting conflicting package files" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:953 -msgid "Automatically remove unused dependencies" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1218 -msgid "Available" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:878 -msgid "" -"Below is a listing of the various configuration files used by opkg. " -"Use opkg.conf for global settings and customfeeds.conf for " -"custom repository entries. The configuration in the other files may be " -"changed but is usually not preserved by sysupgrade." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:800 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:846 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:893 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:959 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1056 -msgid "Cancel" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1150 -msgid "Clear" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1167 -msgid "Configure opkg…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:744 -msgid "Dependencies" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:750 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:938 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1236 -msgid "Description" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:755 -msgid "Details for package %h" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1142 -msgid "Disk space" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1030 -msgid "Dismiss" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1172 -msgid "Display LuCI translation packages" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1189 -msgid "Display all available translation packages" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1175 -msgid "" -"Display base translation packages and translation packages for already " -"installed languages only" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:354 -msgid "Displaying %d-%d of %d" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1155 -msgid "Download and install package" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1008 -msgid "Errors" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:982 -msgid "Executing package manager" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1147 -msgid "Filter" -msgstr "" - -#: applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json:3 -msgid "Grant access to opkg management" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1202 -msgid "Hide all translation packages" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:808 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:824 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1066 -msgid "Install" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1133 -msgid "Install additional software and upgrade existing packages with opkg." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:780 -msgid "Install suggested translation packages as well" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:299 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:522 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1219 -msgid "Installed" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:830 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1043 -msgid "" -"Installing packages from untrusted sources is a potential security risk! " -"Really attempt to install %h?" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:288 -msgid "Install…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:857 -msgid "Loading configuration data…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1084 -msgid "Loading package information…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1046 -msgid "MD5" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:840 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1042 -msgid "Manually install package" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:510 -msgid "Needs upgrade" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1227 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1245 -msgid "Next page" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:368 -msgid "No information available" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:355 -msgid "No packages" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:372 -msgid "No packages matching \"%h\"." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:542 -msgid "Not available" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:527 -msgid "Not installed" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1158 -msgid "OK" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:856 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:904 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:918 -msgid "OPKG Configuration" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1233 -msgid "Package name" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1157 -msgid "Package name or URL…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1225 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1243 -msgid "Previous page" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:837 -msgid "Really attempt to install %h?" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:967 -msgid "Remove" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:943 -msgid "Remove package %h" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:276 -msgid "Remove…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:737 -msgid "Require approx. %1024mB size for %d package(s) to install." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:517 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:535 -msgid "Require version %h %h, installed %h" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:540 -msgid "" -"Required dependency package %h is not available in any repository." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:508 -msgid "Requires update to %h %h" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:373 -msgid "Reset" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1047 -msgid "SHA256" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:915 -msgid "Save" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:905 -msgid "Saving configuration data…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:758 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:946 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1045 -msgid "Size" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1235 -msgid "Size (.ipk)" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1130 -#: applications/luci-app-opkg/root/usr/share/luci/menu.d/luci-app-opkg.json:3 -msgid "Software" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:761 -msgid "Suggested translations" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:740 -msgid "Suggested translations require approx. %1024mB additional space." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1013 -msgid "The opkg %h command failed with code %d." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:513 -msgid "" -"The installed version of package %h is not compatible, require %s " -"while %s is installed." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:833 -msgid "The package %h is not available in any configured repository." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:530 -msgid "" -"The repository version of package %h is not compatible, require %s " -"but only %s is available." -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1149 -msgid "Type to filter…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1032 -msgid "Unable to execute opkg %s command: %s" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:871 -msgid "Unable to read %s: %s" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:910 -msgid "Unable to save %s: %s" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1165 -msgid "Update lists…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1220 -msgid "Updates" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:265 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:294 -msgid "Upgrade…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1166 -msgid "Upload Package…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:757 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:945 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1234 -msgid "Version" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:519 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:537 -msgid "Version incompatible" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:984 -msgid "Waiting for the opkg %h command to complete…" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1198 -msgctxt "Display translation packages" -msgid "all" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1185 -msgctxt "Display translation packages" -msgid "filtered" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1211 -msgctxt "Display translation packages" -msgid "none" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:673 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:934 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:1143 -msgid "unknown" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:671 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:932 -msgid "~%1024mB compressed" -msgstr "" - -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:669 -#: applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js:930 -msgid "~%1024mB installed" -msgstr "" diff --git a/applications/luci-app-opkg/root/usr/libexec/opkg-call b/applications/luci-app-opkg/root/usr/libexec/opkg-call deleted file mode 100755 index 1234b70330aa..000000000000 --- a/applications/luci-app-opkg/root/usr/libexec/opkg-call +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -. /usr/share/libubox/jshn.sh - -action=$1 -shift - -case "$action" in - list-installed) - cat /usr/lib/opkg/status - ;; - list-available) - lists_dir=$(sed -rne 's#^lists_dir \S+ (\S+)#\1#p' /etc/opkg.conf /etc/opkg/*.conf 2>/dev/null | tail -n 1) - find "${lists_dir:-/usr/lib/opkg/lists}" -type f '!' -name '*.sig' | xargs -r gzip -cd - ;; - install|update|remove) - ( - opkg="opkg" - - while [ -n "$1" ]; do - case "$1" in - --autoremove|--force-overwrite|--force-removal-of-dependent-packages) - opkg="$opkg $1" - shift - ;; - -*) - shift - ;; - *) - break - ;; - esac - done - - if flock -x 200; then - $opkg $action "$@" /tmp/opkg.out 2>/tmp/opkg.err - code=$? - stdout=$(cat /tmp/opkg.out) - stderr=$(cat /tmp/opkg.err) - else - code=255 - stderr="Failed to acquire lock" - fi - - json_init - json_add_int code $code - [ -n "$stdout" ] && json_add_string stdout "$stdout" - [ -n "$stderr" ] && json_add_string stderr "$stderr" - json_dump - ) 200>/tmp/opkg.lock - - rm -f /tmp/opkg.lock /tmp/opkg.err /tmp/opkg.out - ;; - *) - echo "Usage: $0 {list-installed|list-available}" >&2 - echo " $0 {install|upgrade|remove} pkg[ pkg...]" >&2 - exit 1 - ;; -esac diff --git a/applications/luci-app-opkg/root/usr/share/luci/menu.d/luci-app-opkg.json b/applications/luci-app-opkg/root/usr/share/luci/menu.d/luci-app-opkg.json deleted file mode 100644 index 3d06a257cb50..000000000000 --- a/applications/luci-app-opkg/root/usr/share/luci/menu.d/luci-app-opkg.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "admin/system/opkg": { - "title": "Software", - "order": 30, - "action": { - "type": "view", - "path": "opkg" - }, - "depends": { - "acl": [ "luci-app-opkg" ] - } - } -} diff --git a/applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json b/applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json deleted file mode 100644 index 649666c26034..000000000000 --- a/applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "luci-app-opkg": { - "description": "Grant access to opkg management", - "read": { - "cgi-io": [ "exec" ], - "file": { - "/usr/libexec/opkg-list installed": [ "exec" ], - "/usr/libexec/opkg-list available": [ "exec" ], - "/usr/libexec/opkg-call list-installed": [ "exec" ], - "/usr/libexec/opkg-call list-available": [ "exec" ], - "/etc/opkg.conf": [ "read" ], - "/etc/opkg/*.conf": [ "read" ] - }, - "ubus": { - "luci": [ "getMountPoints" ] - } - }, - "write": { - "file": { - "/usr/libexec/opkg-call install": [ "exec" ], - "/usr/libexec/opkg-call install *": [ "exec" ], - "/usr/libexec/opkg-call remove *": [ "exec" ], - "/usr/libexec/opkg-call update": [ "exec" ], - "/etc/opkg.conf": [ "write" ], - "/etc/opkg/*.conf": [ "write" ], - "/tmp/upload.ipk": [ "write" ] - } - } - } -} diff --git a/applications/luci-app-opkg/Makefile b/applications/luci-app-package-manager/Makefile similarity index 79% rename from applications/luci-app-opkg/Makefile rename to applications/luci-app-package-manager/Makefile index b0991ff1c48f..c6dbd87cbbc8 100644 --- a/applications/luci-app-opkg/Makefile +++ b/applications/luci-app-package-manager/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_LICENSE:=Apache-2.0 -LUCI_TITLE:=OPKG package management application -LUCI_DEPENDS:=+luci-base +opkg +LUCI_TITLE:=Package management application +LUCI_DEPENDS:=+luci-base PKG_MAINTAINER:=Jo-Philipp Wich diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js similarity index 92% rename from applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js rename to applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js index 1ed27447f1b4..74614636adf2 100644 --- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js +++ b/applications/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js @@ -803,7 +803,7 @@ function handleInstall(ev) 'data-command': 'install', 'data-package': name, 'class': 'btn cbi-button-action', - 'click': handleOpkg, + 'click': handlePkg, 'disabled': isReadonlyView }, _('Install')) ]) @@ -819,7 +819,7 @@ function handleManualInstall(ev) 'data-package': name_or_url, 'click': function(ev) { document.querySelector('input[name="install"]').value = ''; - handleOpkg(ev); + handlePkg(ev); } }, _('Install')), warning; @@ -852,17 +852,28 @@ function handleManualInstall(ev) function handleConfig(ev) { var conf = {}; + var base_dir = L.hasSystemFeature('apk') ? '/etc/apk' : '/etc/opkg'; - ui.showModal(_('OPKG Configuration'), [ + ui.showModal(_('%s Configuration').format(L.hasSystemFeature('apk') ? 'APK' : 'OPKG'), [ E('p', { 'class': 'spinning' }, _('Loading configuration data…')) ]); - fs.list('/etc/opkg').then(function(partials) { - var files = [ '/etc/opkg.conf' ]; + fs.list(base_dir).then(function(partials) { + var files = []; - for (var i = 0; i < partials.length; i++) - if (partials[i].type == 'file' && partials[i].name.match(/\.conf$/)) - files.push('/etc/opkg/' + partials[i].name); + if (!L.hasSystemFeature('apk')) + files.push(base_dir + '.conf') + + for (var i = 0; i < partials.length; i++) { + if (partials[i].type == 'file') { + if (L.hasSystemFeature('apk')) { + if (partials[i].name == 'repositories') + files.push(base_dir + '/' + partials[i].name); + } else if (partials[i].name.match(/\.conf$/)) { + files.push(base_dir + '/' + partials[i].name); + } + } + } return Promise.all(files.map(function(file) { return fs.read(file) @@ -874,8 +885,10 @@ function handleConfig(ev) }); })); }).then(function() { + var opkg_text = _('Below is a listing of the various configuration files used by opkg. Use opkg.conf for global settings and customfeeds.conf for custom repository entries. The configuration in the other files may be changed but is usually not preserved by sysupgrade.') + var apk_text = _('Below is a listing of the various configuration files used by apk. The configuration in the other files may be changed but is usually not preserved by sysupgrade.') var body = [ - E('p', {}, _('Below is a listing of the various configuration files used by opkg. Use opkg.conf for global settings and customfeeds.conf for custom repository entries. The configuration in the other files may be changed but is usually not preserved by sysupgrade.')) + E('p', {}, L.hasSystemFeature('apk') ? apk_text : opkg_text) ]; Object.keys(conf).sort().forEach(function(file) { @@ -901,7 +914,7 @@ function handleConfig(ev) data[textarea.getAttribute('name')] = textarea.value }); - ui.showModal(_('OPKG Configuration'), [ + ui.showModal(_('%s Configuration').format(L.hasSystemFeature('apk') ? 'APK' : 'OPKG'), [ E('p', { 'class': 'spinning' }, _('Saving configuration data…')) ]); @@ -915,7 +928,7 @@ function handleConfig(ev) }, _('Save')), ])); - ui.showModal(_('OPKG Configuration'), body); + ui.showModal(_('%s Configuration').format(L.hasSystemFeature('apk') ? 'APK' : 'OPKG'), body); }); } @@ -948,7 +961,7 @@ function handleRemove(ev) desc || '', E('div', { 'style': 'display:flex; justify-content:space-between; flex-wrap:wrap' }, [ E('label', { 'class': 'cbi-checkbox', 'style': 'float:left' }, [ - E('input', { 'id': 'autoremove-cb', 'type': 'checkbox', 'checked': 'checked', 'name': 'autoremove', 'disabled': isReadonlyView }), ' ', + E('input', { 'id': 'autoremove-cb', 'type': 'checkbox', 'checked': 'checked', 'name': 'autoremove', 'disabled': isReadonlyView || L.hasSystemFeature('apk') }), ' ', E('label', { 'for': 'autoremove-cb' }), ' ', _('Automatically remove unused dependencies') ]), @@ -962,7 +975,7 @@ function handleRemove(ev) 'data-command': 'remove', 'data-package': name, 'class': 'btn cbi-button-negative', - 'click': handleOpkg, + 'click': handlePkg, 'disabled': isReadonlyView }, _('Remove')) ]) @@ -970,7 +983,7 @@ function handleRemove(ev) ]); } -function handleOpkg(ev) +function handlePkg(ev) { return new Promise(function(resolveFn, rejectFn) { var cmd = ev.target.getAttribute('data-command'), @@ -981,7 +994,7 @@ function handleOpkg(ev) var dlg = ui.showModal(_('Executing package manager'), [ E('p', { 'class': 'spinning' }, - _('Waiting for the opkg %h command to complete…').format(cmd)) + _('Waiting for the %s %h command to complete…').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg', cmd)) ]); var argv = [ cmd ]; @@ -1001,7 +1014,7 @@ function handleOpkg(ev) if (pkg != null) argv.push(pkg); - fs.exec_direct('/usr/libexec/opkg-call', argv, 'json').then(function(res) { + fs.exec_direct('/usr/libexec/package-manager-call', argv, 'json').then(function(res) { dlg.removeChild(dlg.lastChild); if (res.stdout) @@ -1013,7 +1026,7 @@ function handleOpkg(ev) } if (res.code !== 0) - dlg.appendChild(E('p', _('The opkg %h command failed with code %d.').format(cmd, (res.code & 0xff) || -1))); + dlg.appendChild(E('p', _('The %s %h command failed with code %d.').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg', cmd, (res.code & 0xff) || -1))); dlg.appendChild(E('div', { 'class': 'button-row' }, E('div', { @@ -1026,13 +1039,13 @@ function handleOpkg(ev) updateLists(); if (res.code !== 0) - rejectFn(new Error(res.stderr || 'opkg error %d'.format(res.code))); + rejectFn(new Error(res.stderr || '%s error %d'.format(L.hasSystemFeature('apk') ? 'apk' : 'opkg', res.code))); else resolveFn(res); }, this, res) }, _('Dismiss')))); }).catch(function(err) { - ui.addNotification(null, E('p', _('Unable to execute opkg %s command: %s').format(cmd, err))); + ui.addNotification(null, E('p', _('Unable to execute %s %s command: %s').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg', cmd, err))); ui.hideModal(); }); }); @@ -1040,7 +1053,7 @@ function handleOpkg(ev) function handleUpload(ev) { - var path = '/tmp/upload.ipk'; + var path = '/tmp/upload.%s'.format(L.hasSystemFeature('apk') ? 'apk' : 'ipk'); return ui.uploadFile(path).then(L.bind(function(btn, res) { ui.showModal(_('Manually install package'), [ E('p', {}, _('Installing packages from untrusted sources is a potential security risk! Really attempt to install %h?').format(res.name)), @@ -1062,7 +1075,7 @@ function handleUpload(ev) 'data-command': 'install', 'data-package': path, 'click': function(ev) { - handleOpkg(ev).finally(function() { + handlePkg(ev).finally(function() { fs.remove(path) }); } @@ -1076,8 +1089,8 @@ function downloadLists() { return Promise.all([ callMountPoints(), - fs.exec_direct('/usr/libexec/opkg-call', [ 'list-available' ]), - fs.exec_direct('/usr/libexec/opkg-call', [ 'list-installed' ]) + fs.exec_direct('/usr/libexec/package-manager-call', [ 'list-available' ]), + fs.exec_direct('/usr/libexec/package-manager-call', [ 'list-installed' ]) ]); } @@ -1133,7 +1146,7 @@ return view.extend({ E('h2', {}, _('Software')), E('div', { 'class': 'cbi-map-descr' }, [ - E('span', _('Install additional software and upgrade existing packages with opkg.')), + E('span', _('Install additional software and upgrade existing packages with %s.').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg')), E('br'), E('span', _('Warning! Package operations can break your system.').format( 'href="https://openwrt.org/meta/infobox/upgrade_packages_warning" target="_blank" rel="noreferrer"' @@ -1165,9 +1178,9 @@ return view.extend({ E('div', {}, [ E('label', {}, _('Actions') + ':'), ' ', E('span', { 'class': 'control-group' }, [ - E('button', { 'class': 'btn cbi-button-positive', 'data-command': 'update', 'click': handleOpkg, 'disabled': isReadonlyView }, [ _('Update lists…') ]), ' ', + E('button', { 'class': 'btn cbi-button-positive', 'data-command': 'update', 'click': handlePkg, 'disabled': isReadonlyView }, [ _('Update lists…') ]), ' ', E('button', { 'class': 'btn cbi-button-action', 'click': handleUpload, 'disabled': isReadonlyView }, [ _('Upload Package…') ]), ' ', - E('button', { 'class': 'btn cbi-button-neutral', 'click': handleConfig }, [ _('Configure opkg…') ]) + E('button', { 'class': 'btn cbi-button-neutral', 'click': handleConfig }, [ _('Configure %s').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg') ]) ]) ]), diff --git a/applications/luci-app-opkg/po/ar/opkg.po b/applications/luci-app-package-manager/po/ar/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ar/opkg.po rename to applications/luci-app-package-manager/po/ar/package-manager.po diff --git a/applications/luci-app-opkg/po/bg/opkg.po b/applications/luci-app-package-manager/po/bg/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/bg/opkg.po rename to applications/luci-app-package-manager/po/bg/package-manager.po diff --git a/applications/luci-app-opkg/po/bn_BD/opkg.po b/applications/luci-app-package-manager/po/bn_BD/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/bn_BD/opkg.po rename to applications/luci-app-package-manager/po/bn_BD/package-manager.po diff --git a/applications/luci-app-opkg/po/ca/opkg.po b/applications/luci-app-package-manager/po/ca/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ca/opkg.po rename to applications/luci-app-package-manager/po/ca/package-manager.po diff --git a/applications/luci-app-opkg/po/cs/opkg.po b/applications/luci-app-package-manager/po/cs/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/cs/opkg.po rename to applications/luci-app-package-manager/po/cs/package-manager.po diff --git a/applications/luci-app-opkg/po/da/opkg.po b/applications/luci-app-package-manager/po/da/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/da/opkg.po rename to applications/luci-app-package-manager/po/da/package-manager.po diff --git a/applications/luci-app-opkg/po/de/opkg.po b/applications/luci-app-package-manager/po/de/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/de/opkg.po rename to applications/luci-app-package-manager/po/de/package-manager.po diff --git a/applications/luci-app-opkg/po/el/opkg.po b/applications/luci-app-package-manager/po/el/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/el/opkg.po rename to applications/luci-app-package-manager/po/el/package-manager.po diff --git a/applications/luci-app-opkg/po/en/opkg.po b/applications/luci-app-package-manager/po/en/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/en/opkg.po rename to applications/luci-app-package-manager/po/en/package-manager.po diff --git a/applications/luci-app-opkg/po/es/opkg.po b/applications/luci-app-package-manager/po/es/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/es/opkg.po rename to applications/luci-app-package-manager/po/es/package-manager.po diff --git a/applications/luci-app-opkg/po/fa/opkg.po b/applications/luci-app-package-manager/po/fa/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/fa/opkg.po rename to applications/luci-app-package-manager/po/fa/package-manager.po diff --git a/applications/luci-app-opkg/po/fi/opkg.po b/applications/luci-app-package-manager/po/fi/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/fi/opkg.po rename to applications/luci-app-package-manager/po/fi/package-manager.po diff --git a/applications/luci-app-opkg/po/fr/opkg.po b/applications/luci-app-package-manager/po/fr/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/fr/opkg.po rename to applications/luci-app-package-manager/po/fr/package-manager.po diff --git a/applications/luci-app-opkg/po/ga/opkg.po b/applications/luci-app-package-manager/po/ga/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ga/opkg.po rename to applications/luci-app-package-manager/po/ga/package-manager.po diff --git a/applications/luci-app-opkg/po/he/opkg.po b/applications/luci-app-package-manager/po/he/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/he/opkg.po rename to applications/luci-app-package-manager/po/he/package-manager.po diff --git a/applications/luci-app-opkg/po/hi/opkg.po b/applications/luci-app-package-manager/po/hi/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/hi/opkg.po rename to applications/luci-app-package-manager/po/hi/package-manager.po diff --git a/applications/luci-app-opkg/po/hu/opkg.po b/applications/luci-app-package-manager/po/hu/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/hu/opkg.po rename to applications/luci-app-package-manager/po/hu/package-manager.po diff --git a/applications/luci-app-opkg/po/it/opkg.po b/applications/luci-app-package-manager/po/it/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/it/opkg.po rename to applications/luci-app-package-manager/po/it/package-manager.po diff --git a/applications/luci-app-opkg/po/ja/opkg.po b/applications/luci-app-package-manager/po/ja/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ja/opkg.po rename to applications/luci-app-package-manager/po/ja/package-manager.po diff --git a/applications/luci-app-opkg/po/ko/opkg.po b/applications/luci-app-package-manager/po/ko/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ko/opkg.po rename to applications/luci-app-package-manager/po/ko/package-manager.po diff --git a/applications/luci-app-opkg/po/lt/opkg.po b/applications/luci-app-package-manager/po/lt/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/lt/opkg.po rename to applications/luci-app-package-manager/po/lt/package-manager.po diff --git a/applications/luci-app-opkg/po/mr/opkg.po b/applications/luci-app-package-manager/po/mr/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/mr/opkg.po rename to applications/luci-app-package-manager/po/mr/package-manager.po diff --git a/applications/luci-app-opkg/po/ms/opkg.po b/applications/luci-app-package-manager/po/ms/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ms/opkg.po rename to applications/luci-app-package-manager/po/ms/package-manager.po diff --git a/applications/luci-app-opkg/po/nb_NO/opkg.po b/applications/luci-app-package-manager/po/nb_NO/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/nb_NO/opkg.po rename to applications/luci-app-package-manager/po/nb_NO/package-manager.po diff --git a/applications/luci-app-opkg/po/nl/opkg.po b/applications/luci-app-package-manager/po/nl/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/nl/opkg.po rename to applications/luci-app-package-manager/po/nl/package-manager.po diff --git a/applications/luci-app-opkg/po/pl/opkg.po b/applications/luci-app-package-manager/po/pl/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/pl/opkg.po rename to applications/luci-app-package-manager/po/pl/package-manager.po diff --git a/applications/luci-app-opkg/po/pt/opkg.po b/applications/luci-app-package-manager/po/pt/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/pt/opkg.po rename to applications/luci-app-package-manager/po/pt/package-manager.po diff --git a/applications/luci-app-opkg/po/pt_BR/opkg.po b/applications/luci-app-package-manager/po/pt_BR/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/pt_BR/opkg.po rename to applications/luci-app-package-manager/po/pt_BR/package-manager.po diff --git a/applications/luci-app-opkg/po/ro/opkg.po b/applications/luci-app-package-manager/po/ro/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ro/opkg.po rename to applications/luci-app-package-manager/po/ro/package-manager.po diff --git a/applications/luci-app-opkg/po/ru/opkg.po b/applications/luci-app-package-manager/po/ru/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ru/opkg.po rename to applications/luci-app-package-manager/po/ru/package-manager.po diff --git a/applications/luci-app-opkg/po/sk/opkg.po b/applications/luci-app-package-manager/po/sk/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/sk/opkg.po rename to applications/luci-app-package-manager/po/sk/package-manager.po diff --git a/applications/luci-app-opkg/po/sv/opkg.po b/applications/luci-app-package-manager/po/sv/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/sv/opkg.po rename to applications/luci-app-package-manager/po/sv/package-manager.po diff --git a/applications/luci-app-package-manager/po/templates/package-manager.pot b/applications/luci-app-package-manager/po/templates/package-manager.pot new file mode 100644 index 000000000000..c35817593a2d --- /dev/null +++ b/applications/luci-app-package-manager/po/templates/package-manager.pot @@ -0,0 +1,387 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1095 +msgid "%s used (%1024mB used of %1024mB, %1024mB free)" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1135 +msgid "" +"Warning! Package operations can break your system." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1163 +msgid "Actions" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:792 +msgid "Allow overwriting conflicting package files" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:953 +msgid "Automatically remove unused dependencies" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1218 +msgid "Available" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:878 +msgid "" +"Below is a listing of the various configuration files used by ipkg. " +"Use ipkg.conf for global settings and customfeeds.conf for " +"custom repository entries. The configuration in the other files may be " +"changed but is usually not preserved by sysupgrade." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:800 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:846 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:893 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:959 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1056 +msgid "Cancel" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1150 +msgid "Clear" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1167 +msgid "Configure ipkg…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:744 +msgid "Dependencies" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:750 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:938 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1236 +msgid "Description" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:755 +msgid "Details for package %h" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1142 +msgid "Disk space" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1030 +msgid "Dismiss" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1172 +msgid "Display LuCI translation packages" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1189 +msgid "Display all available translation packages" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1175 +msgid "" +"Display base translation packages and translation packages for already " +"installed languages only" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:354 +msgid "Displaying %d-%d of %d" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1155 +msgid "Download and install package" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1008 +msgid "Errors" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:982 +msgid "Executing package manager" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1147 +msgid "Filter" +msgstr "" + +#: applications/luci-app-ipkg/root/usr/share/rpcd/acl.d/luci-app-ipkg.json:3 +msgid "Grant access to ipkg management" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1202 +msgid "Hide all translation packages" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:808 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:824 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1066 +msgid "Install" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1133 +msgid "Install additional software and upgrade existing packages with ipkg." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:780 +msgid "Install suggested translation packages as well" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:299 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:522 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1219 +msgid "Installed" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:830 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1043 +msgid "" +"Installing packages from untrusted sources is a potential security risk! " +"Really attempt to install %h?" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:288 +msgid "Install…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:857 +msgid "Loading configuration data…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1084 +msgid "Loading package information…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1046 +msgid "MD5" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:840 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1042 +msgid "Manually install package" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:510 +msgid "Needs upgrade" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1227 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1245 +msgid "Next page" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:368 +msgid "No information available" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:355 +msgid "No packages" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:372 +msgid "No packages matching \"%h\"." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:542 +msgid "Not available" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:527 +msgid "Not installed" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1158 +msgid "OK" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:856 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:904 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:918 +msgid "OPKG Configuration" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1233 +msgid "Package name" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1157 +msgid "Package name or URL…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1225 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1243 +msgid "Previous page" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:837 +msgid "Really attempt to install %h?" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:967 +msgid "Remove" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:943 +msgid "Remove package %h" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:276 +msgid "Remove…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:737 +msgid "Require approx. %1024mB size for %d package(s) to install." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:517 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:535 +msgid "Require version %h %h, installed %h" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:540 +msgid "" +"Required dependency package %h is not available in any repository." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:508 +msgid "Requires update to %h %h" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:373 +msgid "Reset" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1047 +msgid "SHA256" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:915 +msgid "Save" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:905 +msgid "Saving configuration data…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:758 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:946 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1045 +msgid "Size" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1235 +msgid "Size (.ipk)" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1130 +#: applications/luci-app-ipkg/root/usr/share/luci/menu.d/luci-app-ipkg.json:3 +msgid "Software" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:761 +msgid "Suggested translations" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:740 +msgid "Suggested translations require approx. %1024mB additional space." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1013 +msgid "The ipkg %h command failed with code %d." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:513 +msgid "" +"The installed version of package %h is not compatible, require %s " +"while %s is installed." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:833 +msgid "The package %h is not available in any configured repository." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:530 +msgid "" +"The repository version of package %h is not compatible, require %s " +"but only %s is available." +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1149 +msgid "Type to filter…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1032 +msgid "Unable to execute ipkg %s command: %s" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:871 +msgid "Unable to read %s: %s" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:910 +msgid "Unable to save %s: %s" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1165 +msgid "Update lists…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1220 +msgid "Updates" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:265 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:294 +msgid "Upgrade…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1166 +msgid "Upload Package…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:757 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:945 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1234 +msgid "Version" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:519 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:537 +msgid "Version incompatible" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:984 +msgid "Waiting for the ipkg %h command to complete…" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1198 +msgctxt "Display translation packages" +msgid "all" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1185 +msgctxt "Display translation packages" +msgid "filtered" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1211 +msgctxt "Display translation packages" +msgid "none" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:673 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:934 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:1143 +msgid "unknown" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:671 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:932 +msgid "~%1024mB compressed" +msgstr "" + +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:669 +#: applications/luci-app-ipkg/htdocs/luci-static/resources/view/package_manager.js:930 +msgid "~%1024mB installed" +msgstr "" diff --git a/applications/luci-app-opkg/po/tr/opkg.po b/applications/luci-app-package-manager/po/tr/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/tr/opkg.po rename to applications/luci-app-package-manager/po/tr/package-manager.po diff --git a/applications/luci-app-opkg/po/uk/opkg.po b/applications/luci-app-package-manager/po/uk/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/uk/opkg.po rename to applications/luci-app-package-manager/po/uk/package-manager.po diff --git a/applications/luci-app-opkg/po/ur/opkg.po b/applications/luci-app-package-manager/po/ur/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/ur/opkg.po rename to applications/luci-app-package-manager/po/ur/package-manager.po diff --git a/applications/luci-app-opkg/po/vi/opkg.po b/applications/luci-app-package-manager/po/vi/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/vi/opkg.po rename to applications/luci-app-package-manager/po/vi/package-manager.po diff --git a/applications/luci-app-opkg/po/yua/opkg.po b/applications/luci-app-package-manager/po/yua/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/yua/opkg.po rename to applications/luci-app-package-manager/po/yua/package-manager.po diff --git a/applications/luci-app-opkg/po/zh_Hans/opkg.po b/applications/luci-app-package-manager/po/zh_Hans/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/zh_Hans/opkg.po rename to applications/luci-app-package-manager/po/zh_Hans/package-manager.po diff --git a/applications/luci-app-opkg/po/zh_Hant/opkg.po b/applications/luci-app-package-manager/po/zh_Hant/package-manager.po similarity index 100% rename from applications/luci-app-opkg/po/zh_Hant/opkg.po rename to applications/luci-app-package-manager/po/zh_Hant/package-manager.po diff --git a/applications/luci-app-package-manager/root/usr/libexec/package-manager-call b/applications/luci-app-package-manager/root/usr/libexec/package-manager-call new file mode 100755 index 000000000000..789759d40cab --- /dev/null +++ b/applications/luci-app-package-manager/root/usr/libexec/package-manager-call @@ -0,0 +1,111 @@ +#!/bin/sh + +. /usr/share/libubox/jshn.sh + +action=$1 +shift + +if [ -f /usr/bin/apk ]; then + ipkg_bin="apk" +else + ipkg_bin="opkg" +fi + +case "$action" in + list-installed) + if [ $ipkg_bin = "apk" ]; then + $ipkg_bin list -I --full 2>/dev/null + else + cat /usr/lib/opkg/status + fi + ;; + list-available) + if [ $ipkg_bin = "apk" ]; then + $ipkg_bin list --full 2>/dev/null + else + lists_dir=$(sed -rne 's#^lists_dir \S+ (\S+)#\1#p' /etc/opkg.conf /etc/opkg/*.conf 2>/dev/null | tail -n 1) + find "${lists_dir:-/usr/lib/opkg/lists}" -type f '!' -name '*.sig' | xargs -r gzip -cd + fi + ;; + install|update|remove) + ( + cmd="$ipkg_bin" + + # APK have command renamed + if [ $ipkg_bin = "apk" ]; then + case "$action" in + install) + action="add" + ;; + update) + action="upgrade" + ;; + remove) + action="del" + ;; + esac + fi + + # APK have --autoremove enabled by default and + # --force-removal-of-dependent-packages as -r option + if [ $ipkg_bin = "apk" ]; then + while [ -n "$1" ]; do + case "$1" in + --force-removal-of-dependent-packages) + cmd="$cmd -r" + shift + ;; + --force-overwrite) + cmd="$cmd $1" + shift + ;; + -*) + shift + ;; + *) + break + ;; + esac + done + else + while [ -n "$1" ]; do + case "$1" in + --autoremove|--force-overwrite|--force-removal-of-dependent-packages) + ipkg_bin="$apk $1" + shift + ;; + -*) + shift + ;; + *) + break + ;; + esac + done + fi + + if flock -x 200; then + $cmd $action "$@" /tmp/ipkg.out 2>/tmp/ipkg.err + code=$? + stdout=$(cat /tmp/ipkg.out) + stderr=$(cat /tmp/ipkg.err) + else + code=255 + stderr="Failed to acquire lock" + fi + + json_init + json_add_int code $code + [ -n "$stdout" ] && json_add_string stdout "$stdout" + [ -n "$stderr" ] && json_add_string stderr "$stderr" + json_dump + ) 200>/tmp/ipkg.lock + + rm -f /tmp/ipkg.lock /tmp/ipkg.err /tmp/ipkg.out + ;; + *) + echo "Usage: $0 {list-installed|list-available}" >&2 + echo " $0 {install|upgrade|remove} pkg[ pkg...]" >&2 + exit 1 + ;; +esac diff --git a/applications/luci-app-package-manager/root/usr/share/luci/menu.d/luci-app-package-manager.json b/applications/luci-app-package-manager/root/usr/share/luci/menu.d/luci-app-package-manager.json new file mode 100644 index 000000000000..c54688e22bf6 --- /dev/null +++ b/applications/luci-app-package-manager/root/usr/share/luci/menu.d/luci-app-package-manager.json @@ -0,0 +1,13 @@ +{ + "admin/system/package-manager": { + "title": "Software", + "order": 30, + "action": { + "type": "view", + "path": "package-manager" + }, + "depends": { + "acl": [ "luci-app-package-manager" ] + } + } +} diff --git a/applications/luci-app-package-manager/root/usr/share/rpcd/acl.d/luci-app-package-manager.json b/applications/luci-app-package-manager/root/usr/share/rpcd/acl.d/luci-app-package-manager.json new file mode 100644 index 000000000000..97150058ccc6 --- /dev/null +++ b/applications/luci-app-package-manager/root/usr/share/rpcd/acl.d/luci-app-package-manager.json @@ -0,0 +1,31 @@ +{ + "luci-app-package-manager": { + "description": "Grant access to package management", + "read": { + "cgi-io": [ "exec" ], + "file": { + "/usr/libexec/package-manager-call list-installed": [ "exec" ], + "/usr/libexec/package-manager-call list-available": [ "exec" ], + "/etc/opkg.conf": [ "read" ], + "/etc/opkg/*.conf": [ "read" ], + "/etc/apk/repositories": [ "read" ] + }, + "ubus": { + "luci": [ "getMountPoints" ] + } + }, + "write": { + "file": { + "/usr/libexec/package-manager-call install": [ "exec" ], + "/usr/libexec/package-manager-call install *": [ "exec" ], + "/usr/libexec/package-manager-call remove *": [ "exec" ], + "/usr/libexec/package-manager-call update": [ "exec" ], + "/etc/opkg.conf": [ "write" ], + "/etc/opkg/*.conf": [ "write" ], + "/etc/apk/repositories": [ "write" ], + "/tmp/upload.ipk": [ "write" ], + "/tmp/upload.apk": [ "write" ] + } + } + } +} diff --git a/collections/luci/Makefile b/collections/luci/Makefile index 8efe908ef6ad..40414347c839 100644 --- a/collections/luci/Makefile +++ b/collections/luci/Makefile @@ -13,7 +13,7 @@ LUCI_TITLE:=LuCI interface with Uhttpd as Webserver (default) LUCI_DESCRIPTION:=Standard OpenWrt set including package management and attended sysupgrades support LUCI_DEPENDS:= \ +luci-light \ - +luci-app-opkg + +luci-app-package-manager PKG_LICENSE:=Apache-2.0