From ffa9532fc9536097bc8027b9a1f4c79ab1af683d Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Sat, 23 Mar 2024 20:04:20 +0100 Subject: [PATCH] upgpkg: thumbor 7.7.3-4 add missing dep; formatting --- thumbor/.SRCINFO | 6 +++--- thumbor/PKGBUILD | 29 +++++++++++++++-------------- thumbor/thumbor.service | 4 ++++ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/thumbor/.SRCINFO b/thumbor/.SRCINFO index 76c85ba..9a06357 100644 --- a/thumbor/.SRCINFO +++ b/thumbor/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = thumbor pkgdesc = open-source photo thumbnail service pkgver = 7.7.3 - pkgrel = 3 + pkgrel = 4 url = https://github.com/thumbor/thumbor arch = x86_64 license = MIT @@ -22,9 +22,9 @@ pkgbase = thumbor depends = python-piexif depends = python-jpegiptc backup = etc/thumbor.conf - source = https://github.com/thumbor/thumbor/archive/7.7.3.tar.gz + source = thumbor-7.7.3.tar.gz::https://github.com/thumbor/thumbor/archive/7.7.3.tar.gz source = thumbor.service b2sums = 4fcc9f9f3eb74021616c544bf6a8a35935284272d7ab0cfe69e4d98f26dd22159e39dc6e4c9910d4c43789211f50c944bdf89a54e6fabcec166d1c5e8b53dfa8 - b2sums = c0fe21516f245132ac9bb1a833601eabc8348f8c420c76d49ffe7cb25e00712fcbc0fe7c579604616f5008507ec9f7582936596e54e8a311acf949fb031cd5ca + b2sums = 9f5b837710e47654d522c5791cb5c6e01d6452093837a0c57b7158cbc8be6a7a3b5380efe2e975d6396bc1fd23a5f922f6ede9aa921142fd004ff48381f58db3 pkgname = thumbor diff --git a/thumbor/PKGBUILD b/thumbor/PKGBUILD index 6ceed19..509b003 100644 --- a/thumbor/PKGBUILD +++ b/thumbor/PKGBUILD @@ -2,10 +2,10 @@ pkgname=thumbor pkgver=7.7.3 -pkgrel=3 -pkgdesc="open-source photo thumbnail service" +pkgrel=4 +pkgdesc='open-source photo thumbnail service' arch=(x86_64) -url="https://github.com/thumbor/thumbor" +url='https://github.com/thumbor/thumbor' license=(MIT) depends=( python @@ -23,16 +23,16 @@ depends=( ) makedepends=(python-setuptools) checkdepends=(python-pytest python-preggy python-pyssim) -backup=("etc/thumbor.conf") -source=("https://github.com/thumbor/thumbor/archive/$pkgver.tar.gz" - "thumbor.service") +backup=('etc/thumbor.conf') +source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" + 'thumbor.service') b2sums=('4fcc9f9f3eb74021616c544bf6a8a35935284272d7ab0cfe69e4d98f26dd22159e39dc6e4c9910d4c43789211f50c944bdf89a54e6fabcec166d1c5e8b53dfa8' - 'c0fe21516f245132ac9bb1a833601eabc8348f8c420c76d49ffe7cb25e00712fcbc0fe7c579604616f5008507ec9f7582936596e54e8a311acf949fb031cd5ca') + '9f5b837710e47654d522c5791cb5c6e01d6452093837a0c57b7158cbc8be6a7a3b5380efe2e975d6396bc1fd23a5f922f6ede9aa921142fd004ff48381f58db3') prepare() { - cd "$pkgname-$pkgver" + cd $pkgname-$pkgver - # Adjust storage/cache paths to match systemd service + # adjust storage/cache paths to match systemd service sed -e "s|FILE_STORAGE_ROOT_PATH = join(home, 'thumbor', 'storage' )|FILE_STORAGE_ROOT_PATH = '/var/lib/thumbor'|" \ -e "s|RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = join(home, 'thumbor', 'result_storage')|RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = '/var/cache/thumbor'|" \ -i $pkgname/$pkgname.conf @@ -45,16 +45,17 @@ prepare() { #} build() { - cd "$pkgname-$pkgver" + cd $pkgname-$pkgver python setup.py build } package() { - cd "$pkgname-$pkgver" + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm 644 thumbor.service -t "$pkgdir"/usr/lib/systemd/system/ + install -Dm 644 $pkgname-$pkgver/$pkgname/$pkgname.conf -t "$pkgdir"/etc/ + + cd $pkgname-$pkgver python setup.py install --root="$pkgdir" --optimize=1 - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -Dm 644 $srcdir/thumbor.service -t "${pkgdir}"/usr/lib/systemd/system/ - install -Dm 644 $pkgname/$pkgname.conf -t "${pkgdir}"/etc/ } # vim:set ts=2 sw=2 et: diff --git a/thumbor/thumbor.service b/thumbor/thumbor.service index 9de90eb..753a6f6 100644 --- a/thumbor/thumbor.service +++ b/thumbor/thumbor.service @@ -14,6 +14,10 @@ LockPersonality=true ProtectControlGroups=true ProtectKernelModules=true ProtectKernelTunables=true +ProtectHome=true +PrivateDevices=true +NoNewPrivileges=true +MemoryDenyWriteExecute=true ExecStart=/usr/bin/thumbor --conf=/etc/thumbor.conf