summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCody Schafer2023-12-28 23:30:57 +0000
committerCody Schafer2023-12-28 23:31:27 +0000
commit40697f3d9ad0325579869a5a8a69730cb50d5ddf (patch)
tree8476a74d99b0725c3223f93f60165f4d7245dac7 /PKGBUILD
parentbff01a25adbca630bdfb62c4c142d60473c655d5 (diff)
downloadaur-40697f3d9ad0325579869a5a8a69730cb50d5ddf.tar.gz
use sysusers more in line with other packages (postgreqsl)
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD20
1 files changed, 16 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b81998d219f2..2a1edbcf0c99 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,19 +26,21 @@ depends=(
)
backup=('etc/cowrie/cowrie.cfg')
-install=cowrie.install
_pkgdir="${pkgname}-${pkgver}"
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/cowrie/${pkgname}/archive/v${pkgver}.tar.gz
- '0001-patch-service.patch')
+ 0001-patch-service.patch
+ cowrie.sysusers
+)
# _pkgdir="${pkgname}-${_gitrev}"
#_gitrev="c5e9a6b21c8908e892c2169b33f560ccd1fd98ff"
#source=(${pkgname}-${_gitrev}.tar.gz::https://github.com/micheloosterhof/${pkgname}/archive/${_gitrev}.tar.gz
# '0001-patch-service.patch')
-sha512sums=('e87f2794edd0db7cd599a5bb9ffdda12c9ceab06ffe1e31714cb988796dadea01ca093c66ed4a2ca6065634773c296cebca14a13e2a6ca1862e716e767838bcd'
- 'a79904d764829b246fce7691f90d1de7a478985217eb458d441a2fad0aed4558d70eb2d38208d2bfb393bc42f662dba129678fc14765392959d1316c0d1a8dd1')
+sha256sums=('9db15102675729783a4d65617fb4355e366a7fdcd8f5705f6d41541eb1f5919b'
+ '8001a666e05d224858a7a71fcf767461d6b8bc22293273c6f012452bb125e4fc'
+ '50114e6c538945945439ad36a08d4a42305db09f0eb7b09649abac69063308de')
prepare() {
cd "${_pkgdir}"
@@ -52,8 +54,18 @@ package() {
install -Dm 644 etc/cowrie.cfg.dist "${pkgdir}/etc/cowrie/cowrie.cfg"
install -Dm 644 docs/systemd/etc/systemd/system/cowrie.service -t "${pkgdir}/usr/lib/systemd/system"
install -Dm 644 docs/systemd/etc/systemd/system/cowrie.socket -t "${pkgdir}/usr/lib/systemd/system"
+ install -Dm 644 ../${pkgname}.sysusers "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
install -d "${pkgdir}/opt/cowrie"
+
+ # FIXME: instead of copying the entiry repo here, install the python bits
+ # normally (via `python -m installer` or similar) and only copy the data
+ # components. Really, data components belong elsewhere as well, and we should
+ # place the recorded logs/downloads into another directory.
+ #
+ # All of the above would allow us to move out of using `/opt`. Note when
+ # doing this that changes to the systemd service may be needed due to
+ # sandboxing there.
cp -a . "${pkgdir}/opt/cowrie"
rm "${pkgdir}/opt/cowrie/etc/cowrie.cfg.dist"