summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Whited2019-01-02 18:53:33 -0600
committerSam Whited2019-01-02 18:53:33 -0600
commit6ff4d1cf2ef613b575336b6f779a0de14f02eca8 (patch)
treee51c2a36eb517fc582d072cb7097ac23f5902703
downloadaur-6ff4d1cf2ef613b575336b6f779a0de14f02eca8.tar.gz
Initial commit of version 0.4.0
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD50
-rw-r--r--jackal.install10
-rw-r--r--jackal.service19
-rw-r--r--jackal.sysusers1
-rw-r--r--jackal.tmpfiles4
-rw-r--r--jackal.yml102
8 files changed, 222 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..09dfd0fd4ba
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = jackal
+ pkgdesc = An XMPP/Jabber server
+ pkgver = 0.4.0
+ pkgrel = 1
+ url = https://github.com/ortuman/jackal
+ install = jackal.install
+ arch = x86_64
+ arch = i686
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = GPL3
+ makedepends = go>=1.11.0
+ depends = glibc
+ optdepends = mariadb: MariaDB support
+ conflicts = jackal-git
+ backup = etc/jackal/jackal.yml
+ source = https://github.com/ortuman/jackal/archive/v0.4.0.tar.gz
+ source = jackal.service
+ source = jackal.sysusers
+ source = jackal.tmpfiles
+ source = jackal.yml
+ sha512sums = b25065f21dbc674c8d43ffa389fcf7e16b27bdd72186e3ce56412654de6321f9a6c75ee1df1ff320b3d8770e0ee907fdd2310ec696f11ccd88f474464fcc9268
+ sha512sums = d7025628d82371c6ef7a942a918d8970ca54f01ddd513e2577474a31d880355045415c131cf68b8df6f1cc3b19b17135a8d955815f6b4f91d6ce77a70d982f7e
+ sha512sums = 470ec8c5958658e3f264f2186ccfb14a2b9cd6760da86116a89ecfbf147ef38310fb767ae1bb79a0fb6ae3881de399322a52540da7f4b21f4bd791d54cf47b11
+ sha512sums = 8eb4c15f63d1f4028d3dbe8a0861ffa514f6643c8fa918fc54c1fda4d6380d914b12d6cf1a199ee0929c966b311645aa482825f6d8ea29173865da29530bb711
+ sha512sums = c8445899ab3708bd11754e4c1cc74069c8586521d4e9d41c8cc93a7738889817a5502f19484685f3d1b5e658eb40eea1bd1b61c1fc447c5c3e4569faf1b82664
+
+pkgname = jackal
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..f40aaba6967
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg/
+src/
+*.tar.gz
+*.tar.xz
+*.zip
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5af808e643a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Sam Whited <sam@samwhited.com>
+
+pkgname=jackal
+pkgver=0.4.0
+pkgrel=1
+pkgdesc='An XMPP/Jabber server'
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url='https://github.com/ortuman/jackal'
+license=('GPL3')
+depends=('glibc')
+makedepends=('go>=1.11.0')
+optdepends=('mariadb: MariaDB support')
+conflicts=('jackal-git')
+backup=('etc/jackal/jackal.yml')
+source=(https://github.com/ortuman/jackal/archive/v${pkgver}.tar.gz
+ jackal.service
+ jackal.sysusers
+ jackal.tmpfiles
+ jackal.yml)
+sha512sums=('b25065f21dbc674c8d43ffa389fcf7e16b27bdd72186e3ce56412654de6321f9a6c75ee1df1ff320b3d8770e0ee907fdd2310ec696f11ccd88f474464fcc9268'
+ 'd7025628d82371c6ef7a942a918d8970ca54f01ddd513e2577474a31d880355045415c131cf68b8df6f1cc3b19b17135a8d955815f6b4f91d6ce77a70d982f7e'
+ '470ec8c5958658e3f264f2186ccfb14a2b9cd6760da86116a89ecfbf147ef38310fb767ae1bb79a0fb6ae3881de399322a52540da7f4b21f4bd791d54cf47b11'
+ '8eb4c15f63d1f4028d3dbe8a0861ffa514f6643c8fa918fc54c1fda4d6380d914b12d6cf1a199ee0929c966b311645aa482825f6d8ea29173865da29530bb711'
+ 'c8445899ab3708bd11754e4c1cc74069c8586521d4e9d41c8cc93a7738889817a5502f19484685f3d1b5e658eb40eea1bd1b61c1fc447c5c3e4569faf1b82664')
+install=jackal.install
+
+build() {
+ cd jackal-${pkgver}
+ export GO111MODULE=on
+ go build -gcflags "all=-trimpath=${PWD}" \
+ -asmflags "all=-trimpath=${PWD}" \
+ -ldflags "-extldflags ${LDFLAGS}"
+}
+
+package() {
+ install -dm 750 "${pkgdir}/var/lib/jackal/"
+ install -dm 775 "${pkgdir}/usr/share/doc/jackal/"
+ install -dm 775 "${pkgdir}/usr/share/jackal/"
+
+ install -D jackal.yml "${pkgdir}/etc/jackal/jackal.yml"
+ install -Dm444 "${srcdir}/jackal-${pkgver}/README.md" "${pkgdir}/usr/share/doc/jackal/"
+ install -Dm444 "${srcdir}/jackal-${pkgver}/sql/mysql.sql" "${pkgdir}/usr/share/jackal/"
+ install -Dm755 "${srcdir}/jackal-${pkgver}/jackal" "${pkgdir}/usr/bin/jackal"
+
+ install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
+ install -Dm644 "${srcdir}/jackal.service" "${pkgdir}/usr/lib/systemd/system/jackal.service"
+ install -Dm644 "${srcdir}/jackal.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/jackal.conf"
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/jackal.install b/jackal.install
new file mode 100644
index 00000000000..927c4676650
--- /dev/null
+++ b/jackal.install
@@ -0,0 +1,10 @@
+post_upgrade() {
+cat << EOF
+
+Before starting Jackal, the database needs to be initialized.
+The schema files can be found in /usr/share/jackal/ and instructions can be
+found in /usr/share/doc/jackal.
+
+After configuring the database, restart jackal.service.
+EOF
+}
diff --git a/jackal.service b/jackal.service
new file mode 100644
index 00000000000..b204de5194d
--- /dev/null
+++ b/jackal.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Jackal XMPP/Jabber server
+After=syslog.target
+After=network.target
+After=mysqld.service
+After=mariadb.service
+
+[Service]
+RestartSec=1s
+Type=simple
+PIDFile=/var/lib/jackal/data/jackal.pid
+User=jackal
+Group=jackal
+WorkingDirectory=/var/lib/jackal
+ExecStart=/usr/bin/jackal
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/jackal.sysusers b/jackal.sysusers
new file mode 100644
index 00000000000..13790b0c6f8
--- /dev/null
+++ b/jackal.sysusers
@@ -0,0 +1 @@
+u jackal - "Jackal daemon user" /var/lib/jackal /usr/bin/nologin
diff --git a/jackal.tmpfiles b/jackal.tmpfiles
new file mode 100644
index 00000000000..4014ca257aa
--- /dev/null
+++ b/jackal.tmpfiles
@@ -0,0 +1,4 @@
+d /var/lib/jackal 0750
+Z /var/lib/jackal - jackal jackal
+z /etc/jackal 0755 root jackal
+z /etc/jackal/jackal.yml 0640 root jackal
diff --git a/jackal.yml b/jackal.yml
new file mode 100644
index 00000000000..e0311f2ecca
--- /dev/null
+++ b/jackal.yml
@@ -0,0 +1,102 @@
+pid_path: data/jackal.pid
+
+debug:
+ port: 6060
+
+logger:
+ level: debug
+ log_path: jackal.log
+
+storage:
+ type: mysql
+ mysql:
+ host: 127.0.0.1:3306
+ user: jackal
+ password: password
+ database: jackal
+ pool_size: 16
+
+cluster:
+ name: node1
+ port: 5010
+ hosts: [127.0.0.1:5009, 127.0.0.1:5011]
+
+router:
+ hosts:
+ - name: localhost
+ tls:
+ privkey_path: ""
+ cert_path: ""
+
+modules:
+ enabled:
+ - roster # Roster
+ - last_activity # XEP-0012: Last Activity
+ - private # XEP-0049: Private XML Storage
+ - vcard # XEP-0054: vcard-temp
+ - registration # XEP-0077: In-Band Registration
+ - version # XEP-0092: Software Version
+ - blocking_command # XEP-0191: Blocking Command
+ - ping # XEP-0199: XMPP Ping
+ - offline # Offline storage
+
+ mod_roster:
+ versioning: true
+
+ mod_offline:
+ queue_size: 2500
+
+ mod_registration:
+ allow_registration: yes
+ allow_change: yes
+ allow_cancel: yes
+
+ mod_version:
+ show_os: true
+
+ mod_ping:
+ send: no
+ send_interval: 60
+
+components:
+# http_upload:
+# host: upload.jackal.im
+# base_url: https://jackal.im:4430/upload
+# port: 4430
+# upload_path: /var/lib/jackal/httpupload
+# size_limit: 1048576
+# quota: 0
+# expire_after: 600 # secs.
+
+c2s:
+ - id: default
+
+ connect_timeout: 5
+ max_stanza_size: 65536
+ resource_conflict: replace # [override, replace, reject]
+
+ transport:
+ type: socket # websocket
+ bind_addr: 0.0.0.0
+ port: 5222
+ keep_alive: 120
+ # url_path: /xmpp/ws
+
+ compression:
+ level: default
+
+ sasl:
+ - plain
+ - digest_md5
+ - scram_sha_1
+ - scram_sha_256
+
+#s2s:
+# dial_timeout: 15
+# dialback_secret: s3cr3tf0rd14lb4ck
+# max_stanza_size: 131072
+#
+# transport:
+# bind_addr: 0.0.0.0
+# port: 5269
+# keep_alive: 600