[arch-commits] Commit in (7 files)
George Rawlinson
grawlinson at gemini.archlinux.org
Sun Jan 9 07:21:34 UTC 2022
Date: Sunday, January 9, 2022 @ 07:21:33
Author: grawlinson
Revision: 1098265
addpkg: sonic 1.3.2-2
Added:
sonic/
sonic/repos/
sonic/trunk/
sonic/trunk/PKGBUILD
sonic/trunk/systemd.service
sonic/trunk/sysusers.conf
sonic/trunk/tmpfiles.conf
-----------------+
PKGBUILD | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
systemd.service | 46 +++++++++++++++++++++++++++++++++++
sysusers.conf | 1
tmpfiles.conf | 1
4 files changed, 118 insertions(+)
Added: sonic/trunk/PKGBUILD
===================================================================
--- sonic/trunk/PKGBUILD (rev 0)
+++ sonic/trunk/PKGBUILD 2022-01-09 07:21:33 UTC (rev 1098265)
@@ -0,0 +1,70 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Bruce Zhang
+
+pkgname=sonic
+pkgver=1.3.2
+pkgrel=2
+pkgdesc="Fast, lightweight & schema-less search backend"
+arch=('x86_64')
+url="https://github.com/valeriansaliou/sonic"
+license=('MPL2')
+depends=('gcc-libs')
+makedepends=('git' 'rust' 'clang' 'llvm')
+backup=('etc/sonic.cfg')
+options=('!lto')
+_commit='ec3c660eadff232b864e8f57dfdfaf7912de9930'
+source=(
+ "$pkgname::git+$url.git#commit=$_commit"
+ 'systemd.service'
+ 'sysusers.conf'
+ 'tmpfiles.conf'
+)
+sha512sums=('SKIP'
+ 'f623f4076210f5387d3b3b6e61e0d45323a5d9fbc139a3a658d3f8c317cbf863976e0e9c604eb1f03ca42f2f339d733382961b2b73d33464ec8154d8a9e18475'
+ '0fd64f7959024ecab487924d277679b81c78d1ba7d57d2dc63f654409f23bb0cbb0109ac513b25f1b1785115c3a9916f8c4e230fe94963f0bbe84f2784ec76e4'
+ '62b0bb63ba2eda59d530b38aeaf581f5b5fc5187c4615694be9e4a7e38dcb5ed55367b461ac483ab3d6c931d1754b980c8e48b5518388b8476437d988956883b')
+b2sums=('SKIP'
+ 'f4e605968aa9cc8a5dccf98c60bbce77502e7bcba74f7d3d7ffbe6fedd7e7ac21006837d7c99cba0bf2dfc50a58fc78744861d16aa902dadbbb367ec26d7e0be'
+ '5e75e9b670baded2f3956849d2b7b0a90f5a573629f5812d8332b26d203425f14e131eabb2bb485cddf533c27a67ebdb4e87671324d316fa083d7ecdbeba6221'
+ 'ea9795c42003660522d89156eced726bc7db686ef8545bc57504e55341982be2e2336e9d872ce17d5c1607e0cd98e9a2f28f5836bd60b56e510ec5fd59c77143')
+
+pkgver() {
+ cd "$pkgname"
+ git describe --tags | sed "s/^v//"
+}
+
+prepare() {
+ cd "$pkgname"
+
+ # download dependencies
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$pkgname"
+ cargo build --frozen --release
+}
+
+check() {
+ cd "$pkgname"
+ cargo test --frozen
+}
+
+package() {
+ # systemd integration
+ install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/sonic.service"
+ install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/sonic.conf"
+ install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/sonic.conf"
+
+ cd "$pkgname"
+
+ # binary
+ install -vDm755 -t "$pkgdir/usr/bin" target/release/sonic
+
+
+ # configuration
+ install -vDm644 config.cfg "$pkgdir/etc/sonic.cfg"
+
+ # documentation
+ install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" *.md
+}
Added: sonic/trunk/systemd.service
===================================================================
--- sonic/trunk/systemd.service (rev 0)
+++ sonic/trunk/systemd.service 2022-01-09 07:21:33 UTC (rev 1098265)
@@ -0,0 +1,46 @@
+[Unit]
+Description=Sonic Search Index
+Documentation=https://github.com/valeriansaliou/sonic
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=simple
+User=sonic
+Group=sonic
+ExecStart=/bin/sonic -c /etc/sonic.cfg
+Restart=on-failure
+RestartSec=5
+
+# Hardening
+WorkingDirectory=/var/lib/sonic
+ReadWritePaths=/var/lib/sonic
+UMask=0027
+NoNewPrivileges=true
+LimitNOFILE=1048576
+ProtectSystem=strict
+ProtectHome=true
+PrivateUsers=yes
+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=
+SystemCallFilter=@system-service
+SystemCallFilter=~@privileged @resources
+SystemCallArchitectures=native
+
+[Install]
+WantedBy=multi-user.target
Added: sonic/trunk/sysusers.conf
===================================================================
--- sonic/trunk/sysusers.conf (rev 0)
+++ sonic/trunk/sysusers.conf 2022-01-09 07:21:33 UTC (rev 1098265)
@@ -0,0 +1 @@
+u sonic - "Sonic daemon user" /var/lib/sonic
Added: sonic/trunk/tmpfiles.conf
===================================================================
--- sonic/trunk/tmpfiles.conf (rev 0)
+++ sonic/trunk/tmpfiles.conf 2022-01-09 07:21:33 UTC (rev 1098265)
@@ -0,0 +1 @@
+d /var/lib/sonic/ 0755 sonic sonic
More information about the arch-commits
mailing list