Date: Thursday, September 23, 2021 @ 07:56:39 Author: grawlinson Revision: 1021739
archrelease: copy trunk to community-x86_64 Added: promscale/repos/community-x86_64/ promscale/repos/community-x86_64/PKGBUILD (from rev 1021738, promscale/trunk/PKGBUILD) promscale/repos/community-x86_64/systemd.service (from rev 1021738, promscale/trunk/systemd.service) promscale/repos/community-x86_64/sysusers.conf (from rev 1021738, promscale/trunk/sysusers.conf) -----------------+ PKGBUILD | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ systemd.service | 47 +++++++++++++++++++++++++++++++++++ sysusers.conf | 1 3 files changed, 119 insertions(+) Copied: promscale/repos/community-x86_64/PKGBUILD (from rev 1021738, promscale/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2021-09-23 07:56:39 UTC (rev 1021739) @@ -0,0 +1,71 @@ +# Maintainer: George Rawlinson <geo...@rawlinson.net.nz> + +pkgname=promscale +pkgver=0.6.0 +pkgrel=1 +pkgdesc="An analytical platform for Prometheus metrics" +arch=('x86_64') +url="https://github.com/timescale/promscale" +license=('Apache') +depends=('glibc') +makedepends=('go') +optdepends=( + 'timescaledb: for a local timescaledb instance' + 'prometheus: for a local prometheus instance' + 'promscale_extension: for optimised postgresql performance' +) +source=( + "$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" + 'systemd.service' + 'sysusers.conf' +) +sha512sums=('354c5a1f0c3d7672197c457a50d5b1d78e26f9c13964f6c2e5c2e0ce5b9b2f42c2d53d3882ffb298fe47a47e38949063645e1771442e4ad82f4a4c59f93ece73' + '926bfd97c57d8d146a260aaa0983f7e7181688662537f803679b7bf82a43f41197ddc82ad8fa5087dfc5daca95adef0a35c19e5fbfbb29012944e42ba9f651a3' + 'ec5e6ec6b967119722d8fdaaaaf1a4d8dea9ad0b78707a1ddd6b55da524b571c7ecd4c2b97776c6ce9f49d4549d760482a2346c11ab287650469448d9c662726') +b2sums=('0f3cbec2d782cff20cd1cf9bc3dd1ea070d4347c9e8916aec6e231dc194188dbe79a210be5c75d528ee887e2454a72e3fefdd5c28181ae454ad010a813c5176f' + '98ad7412c94ff5a6643e9eec7a1cf4c7828ef84b25ec18b4469b70cc11ccbe933cde4e822c9b33977ae8bb25bf10de6baef13f84a83bde82b3922c7056f2f712' + '1e720f8e453d9acad5f0ed39a51b59c429322b9e9e885f3d71d0e2fd37276268e639422f8d39ca9fca14e0e5ccf646d717fbe89e0dd696980d03467cfb7d3e0f') + +prepare() { + cd "$pkgname-$pkgver" + + # create directory for build output + mkdir build_output + + # download dependencies + go mod vendor +} + +build() { + cd "$pkgname-$pkgver" + + # set Go flags + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + + go build -v \ + -buildmode=pie \ + -trimpath \ + -mod=vendor \ + -modcacherw \ + -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \ + -o build_output ./cmd/... +} + +package() { + # systemd integration + install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service" + install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" + + # documentation + cd "$pkgname-$pkgver" + install -vDm644 cmd/prom-migrator/README.md "$pkgdir/usr/share/doc/$pkgname/prom-migrator.md" + install -vDm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" + cp -vr docs "$pkgdir/usr/share/doc/$pkgname" + + # binaries + install -vDm755 -t "$pkgdir/usr/bin" \ + "build_output/$pkgname" \ + build_output/prom-migrator +} Copied: promscale/repos/community-x86_64/systemd.service (from rev 1021738, promscale/trunk/systemd.service) =================================================================== --- community-x86_64/systemd.service (rev 0) +++ community-x86_64/systemd.service 2021-09-23 07:56:39 UTC (rev 1021739) @@ -0,0 +1,47 @@ +[Unit] +Description=Promscale service +Documentation=https://github.com/timescale/promscale +Requires=network-online.target +After=network-online.target + +[Service] +User=promscale +Group=promscale +Restart=on-failure +RestartSec=5s +# If PROMSCALE_ARGS is required, it should be applied using a drop-in +# systemd file. See `man 5 systemd.unit` for details. +ExecStart=/usr/bin/promscale $PROMSCALE_ARGS +ExecReload=/bin/kill -HUP $MAINPID + +NoNewPrivileges=true +ProtectSystem=strict +ProtectHome=true +PrivateTmp=true +PrivateDevices=true +ProtectHostname=true +ProtectClock=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=true +LockPersonality=true +MemoryDenyWriteExecute=true +RestrictRealtime=true +RestrictSUIDSGID=true +RemoveIPC=true +CapabilityBoundingSet= +AmbientCapabilities= +PrivateUsers=true + +SystemCallFilter=@system-service +SystemCallFilter=~@privileged @resources +SystemCallArchitectures=native + +LimitNOFILE=1048576 +UMask=0077 + +[Install] +WantedBy=multi-user.target Copied: promscale/repos/community-x86_64/sysusers.conf (from rev 1021738, promscale/trunk/sysusers.conf) =================================================================== --- community-x86_64/sysusers.conf (rev 0) +++ community-x86_64/sysusers.conf 2021-09-23 07:56:39 UTC (rev 1021739) @@ -0,0 +1 @@ +u promscale - "Promscale daemon user"