Package Details: hath 1.6.1-1

Git Clone URL: https://aur.archlinux.org/hath.git (read-only, click to copy)
Package Base: hath
Description: Open-source Peer-2-Peer gallery distribution system
Upstream URL: https://ehwiki.org/wiki/Hentai@Home
Keywords: Hentai@Home
Licenses: GPL3
Submitter: jtmb
Maintainer: jtmb (dctxmei)
Last Packager: dctxmei
Votes: 5
Popularity: 0.000000
First Submitted: 2017-10-23 01:36 (UTC)
Last Updated: 2021-02-02 08:51 (UTC)

Dependencies (2)

Required by (0)

Sources (5)

Latest Comments

gdkags commented on 2020-07-28 20:32 (UTC)

works for me :D

dctxmei commented on 2020-07-28 17:04 (UTC)

@gdkags Hi, this is the modification I made, please test it: https://pastebin.com/GPL6fQ0U

gdkags commented on 2020-07-28 12:23 (UTC) (edited on 2020-07-28 12:47 (UTC) by gdkags)

Hi, I've added some changes, such that the folders are created through tmpfiles.d (you forgot the download folder btw) and there is a user created via sysusers.d so this can run with lower privileges. I've also changed to Restart=always, since hath usually quits cleanly even on errors. edit: should also add Wants=network-online.target otherwise this won't work

diff --git a/PKGBUILD b/PKGBUILD
index 75a0ef8..0ac9e7e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@

 pkgname=hath
 pkgver=1.6.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Open-source Peer-2-Peer gallery distribution system"
 arch=(any)
 url="https://ehwiki.org/wiki/Hentai@Home"
@@ -12,11 +12,16 @@ depends=(java-runtime)
 makedepends=(java-environment)
 source=("https://repo.e-hentai.org/hath/HentaiAtHome_1.6.0_src.zip"
         "hath.sh"
-           "hath.service")
+           "hath.service"
+   "hath.sysusers"
+   "hath.tmpfiles")
+
 install="${pkgname}.install"
 sha256sums=('3c807dadb3303a407101c428c65a68f55b3463fc3da29133ffe43b73591eaab8'
             '737d8b70150f9e897c3f7413669562f1f92e0df6539403f1936d6463e832c841'
-            '8afd6ff66bfa986c7787e39aaad5d35a5ce1e2b722edb95bc86f76965d8d9fd0')
+            'f5c5fa6ec255f4448fb35b6bc5ca75fb80f4793b736a3a0d6cd70adc384901c6'
+            'f2df34cbda5e358979ac6f6222ef661501947c37636c8bd38f9556711093719b'
+            'f99402a0bd54f8a216817e0ada610ba9edc13acf18134e6716f469d756b87132')

 build() {
     make
@@ -24,12 +29,10 @@ build() {
 }

 package() {
-    mkdir -p -- "$pkgdir/var/lib/hath/cache"
-    mkdir -p -- "$pkgdir/var/lib/hath/data"
-    mkdir -p -- "$pkgdir/var/lib/hath/log"
-    mkdir -p -- "$pkgdir/var/lib/hath/tmp"
     install -Dm755 -- "build/HentaiAtHome.jar" "$pkgdir/usr/share/java/$pkgname/$pkgname.jar"
     install -Dm755 -- "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
     install -Dm644 -- "hath.service" "${pkgdir}/usr/lib/systemd/system/hath.service"
+    install -Dm644 "hath.sysusers" "${pkgdir}/usr/lib/sysusers.d/hath.conf"
+    install -Dm644 "hath.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/hath.conf"
     install -Dm644 -- LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
diff --git a/hath.service b/hath.service
index 885af13..5b06819 100644
--- a/hath.service
+++ b/hath.service
@@ -1,16 +1,18 @@
 [Unit]
 Description=Hentai@Home Service
 After=network-online.target
+Wants=network-online.target
+

 [Service]
-#User=nobody
+User=hath
 WorkingDirectory=/var/lib/hath/ 
 ExecStart=/usr/bin/java -Xms16m -Xmx512m -jar /usr/share/java/hath/hath.jar 
 SuccessExitStatus=143
 TimeoutStopSec=10
-Restart=on-failure
+Restart=always
 RestartSec=5


 [Install]
-WantedBy=multi-user.target
\ No newline at end of file
+WantedBy=multi-user.target
diff --git a/hath.sysusers b/hath.sysusers
new file mode 100644
index 0000000..0c21bdc
--- /dev/null
+++ b/hath.sysusers
@@ -0,0 +1 @@
+u hath   -      "Hentai@Home" /var/lib/hath
diff --git a/hath.tmpfiles b/hath.tmpfiles
new file mode 100644
index 0000000..fbe735f
--- /dev/null
+++ b/hath.tmpfiles
@@ -0,0 +1,6 @@
+d /var/lib/hath 0755 hath hath -
+d /var/lib/hath/cache 0755 hath hath -
+d /var/lib/hath/data 0755 hath hath -
+d /var/lib/hath/download 0755 hath hath -
+d /var/lib/hath/log 0755 hath hath -
+d /var/lib/hath/tmp 0755 hath hath -

dctxmei commented on 2020-01-03 05:37 (UTC)

@jtmb Please update as soon as possible, new PKGBUILD is available here:

https://raw.githubusercontent.com/archlinuxcn/repo/master/archlinuxcn/hath/PKGBUILD

jtmb commented on 2017-11-08 20:25 (UTC)

are you running the systemd hath.service, the command hath, or another way?

laichiaheng commented on 2017-11-08 15:41 (UTC)

It is displayed when I run the program.

jtmb commented on 2017-11-08 09:59 (UTC)

I'm not sure where you're seeing that URL? It's not anywhere in the package or service, and it builds and runs properly for me as of right now.

laichiaheng commented on 2017-11-08 09:39 (UTC)

http://hentaiathome.net/ The requested URL / was not found on this server.