rebuild *tox*
This commit is contained in:
@@ -8,6 +8,7 @@ from pisi.actionsapi import shelltools, cmaketools, pisitools, get
|
||||
|
||||
j = ''.join([
|
||||
' -DCMAKE_BUILD_TYPE=Release',
|
||||
' -DDHT_BOOTSTRAP=OFF',
|
||||
' -DENABLE_STATIC=OFF '
|
||||
])
|
||||
|
||||
@@ -20,5 +21,6 @@ def build():
|
||||
cmaketools.make()
|
||||
|
||||
def install():
|
||||
pisitools.insinto("/etc", "other/bootstrap_daemon/tox-bootstrapd.conf")
|
||||
shelltools.cd("_build")
|
||||
cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
|
||||
DIR = "/var/lib/tox-bootstrapd"
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
try:
|
||||
os.system("useradd -r -m -d %s -s /sbin/nologin -U tox-bootstrapd" % DIR)
|
||||
except:
|
||||
pass
|
||||
os.chmod(DIR, 0700)
|
||||
|
||||
def postRemove():
|
||||
try:
|
||||
os.system("userdel -r tox-bootstrapd")
|
||||
os.system("groupdel tox-bootstrapd")
|
||||
except:
|
||||
pass
|
||||
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from comar.service import *
|
||||
import os
|
||||
|
||||
serviceType = "server"
|
||||
serviceDesc = _({"en": "Tox DHT bootstrap daemon"})
|
||||
|
||||
serviceDefault = "off"
|
||||
|
||||
CFGFILE = "/etc/tox-bootstrapd.conf"
|
||||
PIDDIR = "/var/run/tox-bootstrapd"
|
||||
PIDFILE = "%s/tox-bootstrapd.pid" % PIDDIR
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
if not os.path.exists(PIDDIR):
|
||||
try:
|
||||
os.makedirs(PIDDIR)
|
||||
except:
|
||||
pass
|
||||
|
||||
startService(command="/usr/bin/tox-bootstrapd",
|
||||
args="--config %s" % CFGFILE,
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(pidfile=PIDFILE,
|
||||
donotify=True)
|
||||
|
||||
try:
|
||||
os.unlink(PIDFILE)
|
||||
except:
|
||||
pass
|
||||
|
||||
def status():
|
||||
return isServiceRunning(pidfile=PIDFILE)
|
||||
@@ -37,10 +37,15 @@
|
||||
<Dependency>msgpack-c</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="cfgfile">/etc/tox-bootstrapd.conf</Path>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="data">/usr/share/bash-completion/completions</Path>
|
||||
</Files>
|
||||
<Provides>
|
||||
<COMAR script="package.py">System.Package</COMAR>
|
||||
<COMAR script="service.py">System.Service</COMAR>
|
||||
</Provides>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
@@ -61,7 +66,7 @@
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2022-04-14</Date>
|
||||
<Date>2022-04-25</Date>
|
||||
<Version>0.2.17</Version>
|
||||
<Comment>First build.</Comment>
|
||||
<Name>fury</Name>
|
||||
|
||||
Reference in New Issue
Block a user