diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | config.patch | 82 | ||||
-rw-r--r-- | config.yaml | 146 |
5 files changed, 176 insertions, 103 deletions
@@ -1,7 +1,7 @@ pkgbase = jackal pkgdesc = An XMPP/Jabber server - pkgver = 0.10.1 - pkgrel = 2 + pkgver = 0.52.0 + pkgrel = 1 url = https://github.com/ortuman/jackal install = jackal.install arch = x86_64 @@ -12,17 +12,18 @@ pkgbase = jackal optdepends = postgresql: PostgreSQL support optdepends = mariadb: MariaDB support conflicts = jackal-git - backup = etc/jackal/jackal.yml - source = jackal-0.10.1.tar.gz::https://github.com/ortuman/jackal/archive/v0.10.1.tar.gz + backup = etc/jackal/jackal.yml, + backup = etc/jackal/config.yaml + source = jackal-0.52.0.tar.gz::https://github.com/ortuman/jackal/archive/v0.52.0.tar.gz source = jackal.service source = jackal.sysusers source = jackal.tmpfiles - source = config.patch - sha256sums = 0de245fadcbff0e1848d9abe58e5c693154b6df98745c3b0ae0287292bfd237d + source = config.yaml + sha256sums = 0dac7d62cb4edfca5608b3e1378f182f80d1e66637c0f386a44568ce89292bae sha256sums = 0a9a9065957e5b0576e5443b29bf0cae81281194664376569a91c51f85e7d7ff sha256sums = 5fec4f4053ac15cd597bb32ba03c35d85f52438204fd801edf333403ec2c4bf3 sha256sums = 20b7e5a5fee727e72fdbac54182b594a838340c0625036ca9d117e2a9d710045 - sha256sums = 81aa44135b7b773846c428757f9e5d8a40251a3f716d87c32ad2f280cb18a394 + sha256sums = a6b361f52bb1ffb7b872c0ab43086048680cbe462ea95e72d85771d2418e52fe pkgname = jackal diff --git a/.gitignore b/.gitignore index 13ebca0ec59c..e1fba51e90dc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ src/ *.tar *.tar.gz *.tar.xz +*.tar.zst *.tar.zstd *.zip @@ -1,8 +1,8 @@ # Maintainer: Sam Whited <sam@samwhited.com> pkgname=jackal -pkgver=0.10.1 -pkgrel=2 +pkgver=0.52.0 +pkgrel=1 pkgdesc='An XMPP/Jabber server' arch=('x86_64' 'i686') url='https://github.com/ortuman/jackal' @@ -12,39 +12,46 @@ makedepends=('go>=1.11') optdepends=('postgresql: PostgreSQL support' 'mariadb: MariaDB support') conflicts=('jackal-git') -backup=('etc/jackal/jackal.yml') +backup=('etc/jackal/jackal.yml', 'etc/jackal/config.yaml') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ortuman/jackal/archive/v${pkgver}.tar.gz" jackal.service jackal.sysusers jackal.tmpfiles - config.patch) -sha256sums=('0de245fadcbff0e1848d9abe58e5c693154b6df98745c3b0ae0287292bfd237d' + config.yaml) +sha256sums=('0dac7d62cb4edfca5608b3e1378f182f80d1e66637c0f386a44568ce89292bae' '0a9a9065957e5b0576e5443b29bf0cae81281194664376569a91c51f85e7d7ff' '5fec4f4053ac15cd597bb32ba03c35d85f52438204fd801edf333403ec2c4bf3' '20b7e5a5fee727e72fdbac54182b594a838340c0625036ca9d117e2a9d710045' - '81aa44135b7b773846c428757f9e5d8a40251a3f716d87c32ad2f280cb18a394') + 'a6b361f52bb1ffb7b872c0ab43086048680cbe462ea95e72d85771d2418e52fe') install=jackal.install -prepare() { - cd jackal-${pkgver}/ - patch -Np1 -i ../config.patch -} - build() { cd jackal-${pkgver} export GO111MODULE=on - go build -trimpath \ + go build -tags netgo \ + -trimpath \ + -buildmode=pie \ + -ldflags "-extldflags ${LDFLAGS}" \ + "github.com/ortuman/jackal/cmd/jackalctl" + # This is not safe. + # Remove it when https://github.com/ortuman/jackal/issues/132 is fixed. + rm go.sum + go mod tidy + go build -tags netgo \ + -trimpath \ -buildmode=pie \ - -ldflags "-extldflags ${LDFLAGS}" + -ldflags "-extldflags ${LDFLAGS}" \ + "github.com/ortuman/jackal/cmd/jackal" } package() { install -dm 775 "${pkgdir}/usr/share/doc/jackal/" install -dm 775 "${pkgdir}/usr/share/jackal/" - install -D "${srcdir}/jackal-${pkgver}/example.jackal.yml" "${pkgdir}/etc/jackal/jackal.yml" + install -D "${srcdir}/config.yaml" "${pkgdir}/etc/jackal/config.yaml" install -Dm444 "${srcdir}/jackal-${pkgver}/README.md" "${pkgdir}/usr/share/doc/jackal/" cp -r "${srcdir}/jackal-${pkgver}/sql/" "${pkgdir}/usr/share/jackal/" + install -Dm755 "${srcdir}/jackal-${pkgver}/jackalctl" "${pkgdir}/usr/bin/jackalctl" install -Dm755 "${srcdir}/jackal-${pkgver}/jackal" "${pkgdir}/usr/bin/jackal" install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf diff --git a/config.patch b/config.patch deleted file mode 100644 index c715f149eff1..000000000000 --- a/config.patch +++ /dev/null @@ -1,82 +0,0 @@ ---- a/example.jackal.yml 2020-03-23 13:24:49.000000000 -0400 -+++ b/example.jackal.yml 2020-03-24 11:13:12.283234139 -0400 -@@ -1,32 +1,23 @@ - # jackal default configuration file - --pid_path: jackal.pid -+pid_path: data/jackal.pid - --debug: -- port: 6060 -+# debug: -+# port: 6060 - - logger: - level: debug - log_path: jackal.log - - storage: -- type: mysql -- mysql: -- host: 127.0.0.1:3306 -+ type: pgsql -+ pgsql: -+ host: 127.0.0.1:5432 - user: jackal - password: password - database: jackal - pool_size: 16 - --#storage: --# type: pgsql --# pgsql: --# host: 127.0.0.1:5432 --# user: jackal --# password: password --# database: jackal --# pool_size: 16 -- - hosts: - - name: localhost - tls: -@@ -55,10 +46,10 @@ - # type: http - # pass: http://127.0.0.1:6666 - -- mod_registration: -- allow_registration: yes -- allow_change: yes -- allow_cancel: yes -+ # mod_registration: -+ # allow_registration: yes -+ # allow_change: yes -+ # allow_cancel: yes - - mod_version: - show_os: true -@@ -76,19 +67,17 @@ - max_stanza_size: 65536 - resource_conflict: replace # [override, replace, reject] - -- transport: -- type: socket # websocket -- bind_addr: 0.0.0.0 -- port: 5222 -- # url_path: /xmpp/ws -+ # transport: -+ # type: socket # websocket -+ # bind_addr: 0.0.0.0 -+ # port: 5222 -+ # # url_path: /xmpp/ws - -- compression: -- level: default -+ # compression: -+ # level: default - - sasl: - - plain -- - digest_md5 - - scram_sha_1 - - scram_sha_256 -- - scram_sha_512 diff --git a/config.yaml b/config.yaml new file mode 100644 index 000000000000..da31a33b2a9a --- /dev/null +++ b/config.yaml @@ -0,0 +1,146 @@ +###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~### +### jackal configuration file ### +###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~### +# +# +# WARNING: search for "TODO" in this document and replace secrets with something +# custom before uncommenting them. + +peppers: + keys: + #v1: m7FFfnHf2g3KsPRPvVjjEiu6uss8tAHg # <-- TODO: please, use your custom key here! + use: v1 + +#logger: +# level: "debug" +# output_path: "jackal.log" + +# Prometheus metrics and pprof +#http_port: 6060 + +#admin: +# port: 15280 + +#hosts: +# - domain: jackal.im +# tls: +# cert_file: "" +# privkey_file: "" + +storage: + type: pgsql + pgsql: + host: 127.0.0.1:5432 + user: jackal + password: password + database: jackal + max_open_conns: 16 + +cluster: + etcd: + endpoints: + - http://127.0.0.1:2379 + port: 14369 + +shapers: + #- name: super + # max_sessions: 20 + # rate: + # limit: 131072 + # burst: 65536 + # matching: + # jid: + # # in: [admin@localhost] + # regex: ^(admin|otheradmin)@localhost + + - name: normal + max_sessions: 10 + rate: + limit: 65536 + burst: 32768 + +listeners: + - type: c2s + port: 5222 + req_timeout: 60s + transport: socket + sasl: + mechanisms: [scram_sha_1, scram_sha_256] + + # Authentication gateway + # (proto: https://github.com/jackal-xmpp/jackal-proto/blob/master/jackal/proto/authenticator/v1/authenticator.proto) + external: + address: 127.0.0.1:4567 + is_secure: false + + - type: c2s + port: 5223 + direct_tls: true + req_timeout: 60s + transport: socket + sasl: + mechanisms: [scram_sha_1, scram_sha_256] + + - type: s2s + port: 5269 + req_timeout: 60s + max_stanza_size: 131072 + + - type: s2s + port: 5270 + direct_tls: true + req_timeout: 60s + max_stanza_size: 131072 + +s2s_out: + # dialback_secret: s3cr3tf0rd14lb4ck <-- TODO: Use a custom secret here + dial_timeout: 5s + req_timeout: 60s + max_stanza_size: 131072 + +modules: +# enabled: +# - roster +# - offline +# - disco +# - private +# - vcard +# - version +# - caps +# - ping +# - carbons +# +# version: +# show_os: true +# +# offline: +# queue_size: 300 +# +# ping: +# ack_timeout: 90s +# interval: 3m +# send_pings: true +# timeout_action: kill +# +# external: +# - name: ext_mod_1 +# address: 127.0.0.1:4569 +# is_secure: false +# request_timeout: 60s +# +# event_handler: +# topics: # notify c2s connect/disconnect events +# - c2s.stream.registered +# - c2s.stream.unregistered +# +# iq_handler: +# namespace: +# in: [ https://jackal.im ] +# # reg_ex: ^org.jackal.+ +# +# message_handler: +# pre_processor: true +# pre_router: true + +components: + |