summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien LEFEBVRE (d1ceward)2024-04-08 17:08:41 +0200
committerFabien LEFEBVRE (d1ceward)2024-04-08 17:08:41 +0200
commit5128de1fd1e1801017d49f1188d160971f6ce26b (patch)
tree9d0831d04f559737afad99f6bf11fc5a3366a640
parent7761eb977f4bde99efb0553796f1995ddec8a538 (diff)
downloadaur-5128de1fd1e1801017d49f1188d160971f6ce26b.tar.gz
upgpkg: dokku 0.34.4-2
-rw-r--r--.SRCINFO8
-rw-r--r--LICENSE7
-rw-r--r--PKGBUILD15
-rw-r--r--dokku.install4
-rw-r--r--scheduler-docker-local.patch34
5 files changed, 51 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c8a759a66ed..e76427fa944f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dokku
pkgdesc = Docker-powered PaaS that helps build and manage the lifecycle of applications
pkgver = 0.34.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/dokku/dokku
install = dokku.install
arch = x86_64
@@ -36,9 +36,9 @@ pkgbase = dokku
depends = unzip
source = https://github.com/dokku/dokku/archive/v0.34.4.zip
source = dokku.install
- source = LICENSE
+ source = scheduler-docker-local.patch
sha256sums = 41c38226d13234ac4bb25a9245a19a82b10a3a5bd9a728e2d4feccf09f6cded4
- sha256sums = 743c53127dc91c660a2aa0ff94cf8faa6aa763c6e76c5696438c97a5c97bd199
- sha256sums = b1ac2fed5ac269fb7bbf651a3d37ef5fd56d2c33320e17cb6e23a22a93f5c046
+ sha256sums = 2394e06cae4f0492d1bf63837c09e6c3b8272818bcc9dfecc30f3170a7c678ba
+ sha256sums = fd979a3d612396316603f7677cdcdb7d25c7fecf99c97a8d1458262684913fdd
pkgname = dokku
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index f600f8e8b30a..000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (C) 2014 Jeff Lindsay
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index 84e80ceead92..51e31ddf958e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=dokku
pkgver=0.34.4
-pkgrel=1
+pkgrel=2
pkgdesc='Docker-powered PaaS that helps build and manage the lifecycle of applications'
arch=('x86_64')
url='https://github.com/dokku/dokku'
@@ -39,10 +39,10 @@ depends=(
)
source=("${url}/archive/v${pkgver}.zip"
"${pkgname}.install"
- "LICENSE")
+ "scheduler-docker-local.patch")
sha256sums=('41c38226d13234ac4bb25a9245a19a82b10a3a5bd9a728e2d4feccf09f6cded4'
- '743c53127dc91c660a2aa0ff94cf8faa6aa763c6e76c5696438c97a5c97bd199'
- 'b1ac2fed5ac269fb7bbf651a3d37ef5fd56d2c33320e17cb6e23a22a93f5c046')
+ '2394e06cae4f0492d1bf63837c09e6c3b8272818bcc9dfecc30f3170a7c678ba'
+ 'fd979a3d612396316603f7677cdcdb7d25c7fecf99c97a8d1458262684913fdd')
install="${pkgname}.install"
build() {
@@ -55,6 +55,9 @@ build() {
cd "${pkgname}-${pkgver}"
+ # Fix privilege issue with crontab -u
+ patch -p1 -i "${srcdir}/scheduler-docker-local.patch"
+
# Add .core and build go plugins
for plugin in plugins/*; do
if [ -e "${plugin}/Makefile" ]; then make -C $plugin build; fi
@@ -72,11 +75,11 @@ package() {
# Install executable and license
install -Dm755 "${pkgname}-${pkgver}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 "${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# Move all files in place
mkdir -p "${pkgdir}/var/lib/dokku/core-plugins/available"
- cp -R "${srcdir}/${pkgname}-${pkgver}/plugins/." "${pkgdir}/var/lib/dokku/core-plugins/available"
+ cp -R "${pkgname}-${pkgver}/plugins/." "${pkgdir}/var/lib/dokku/core-plugins/available"
# Version
echo $pkgver > "${pkgdir}/var/lib/dokku/VERSION"
diff --git a/dokku.install b/dokku.install
index be08c90b417d..85ca93db1a9f 100644
--- a/dokku.install
+++ b/dokku.install
@@ -81,6 +81,9 @@ setup-plugins() {
BASH_BIN=/tmp/login-basher dokku plugin:install --core
rm /tmp/login-basher
+ echo "%dokku ALL=(ALL) NOPASSWD:/usr/bin/crontab -l -u dokku" > /etc/sudoers.d/dokku-crontab
+ chmod 440 /etc/sudoers.d/dokku-crontab
+
rm -f /etc/update-motd.d/99-dokku
sed -i 's/ syslog dokku$/ root dokku/g' /etc/logrotate.d/dokku
}
@@ -143,6 +146,7 @@ post_remove() {
rm -f /etc/systemd/system/dokku-retire.timer
rm -f /etc/systemd/system/dokku-retire.service
rm -f /etc/logrotate.d/dokku
+ rm -f /etc/sudoers.d/dokku-crontab
# Remove nginx configuration
rm -f /etc/nginx/conf.d/dokku.conf
diff --git a/scheduler-docker-local.patch b/scheduler-docker-local.patch
new file mode 100644
index 000000000000..2dde83c57428
--- /dev/null
+++ b/scheduler-docker-local.patch
@@ -0,0 +1,34 @@
+--- a/plugins/scheduler-docker-local/functions.go 2024-04-07 07:41:27.000000000 +0200
++++ b/plugins/scheduler-docker-local/functions.go 2024-04-08 16:44:44.999643158 +0200
+@@ -16,16 +16,16 @@
+
+ func deleteCrontab() error {
+ result, err := common.CallExecCommand(common.ExecCommandInput{
+- Command: "crontab",
+- Args: []string{"-l", "-u", "dokku"},
++ Command: "sudo",
++ Args: []string{"crontab", "-l", "-u", "dokku"},
+ })
+ if err != nil || result.ExitCode != 0 {
+ return nil
+ }
+
+ result, err = common.CallExecCommand(common.ExecCommandInput{
+- Command: "crontab",
+- Args: []string{"-r", "-u", "dokku"},
++ Command: "sudo",
++ Args: []string{"crontab", "-r", "-u", "dokku"},
+ })
+ if err != nil {
+ return fmt.Errorf("Unable to remove schedule file: %w", err)
+@@ -153,8 +153,8 @@
+ }
+
+ result, err := common.CallExecCommand(common.ExecCommandInput{
+- Command: "crontab",
+- Args: []string{"-u", "dokku", tmpFile.Name()},
++ Command: "sudo",
++ Args: []string{"crontab", "-u", "dokku", tmpFile.Name()},
+ })
+ if err != nil {
+ return fmt.Errorf("Unable to update schedule file: %w", err)