summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurefire2017-06-15 19:52:25 +0300
committersurefire2017-06-15 19:52:25 +0300
commitb037e9a93ab3ea32f462f505d8c10499c5a57757 (patch)
tree58d3ce1765bc069b16ab2d15d64c28dfd72250fe
parent9969ca2e332e33e09d7b80787bb51c54c8f79cab (diff)
downloadaur-b037e9a93ab3ea32f462f505d8c10499c5a57757.tar.gz
upgpkg: nxt 1.11.5
-rw-r--r--.SRCINFO40
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD84
-rw-r--r--logging.properties8
-rwxr-xr-xnrs.sh21
-rw-r--r--nxt-tor.service11
-rw-r--r--nxt.desktop (renamed from nrs.desktop)6
-rw-r--r--nxt.install20
-rw-r--r--nxt.properties6
-rw-r--r--nxt.service19
-rw-r--r--nxt.sh13
-rw-r--r--nxt.sysusers1
-rw-r--r--nxt.tmpfiles2
13 files changed, 124 insertions, 112 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 675cb7687539..f6ca0762f922 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,32 +1,34 @@
pkgbase = nxt-git
- pkgdesc = The Nxt Reference Software Client for use with the Nxt Cryptocurrency.
- pkgver = 1.5.12.r5.g5bbafe1
+ pkgdesc = The Nxt Reference Software Client for use with the Nxt Cryptocurrency
+ pkgver = 1.11.5+0+gfc25fd5a2
pkgrel = 1
url = http://nxt.org
- install = nxt.install
arch = any
license = MIT
license = GPL
license = MPL
license = APACHE
- makedepends = java-environment-openjdk=8
- depends = bash
- depends = java-runtime-openjdk=8
- optdepends = flashplugin: NRS clipboard support
- optdepends = libnotify: NRS startup error notification
- optdepends = tor: route NXT traffic through Tor
- source = nxt-git::git+https://bitbucket.org/JeanLucPicard/nxt.git
+ makedepends = java-environment>=8
+ depends = java-runtime>=8
+ depends = systemd
+ backup = etc/nxt/nxt.properties
+ backup = etc/nxt/logging.properties
+ source = git+https://bitbucket.org/JeanLucPicard/nxt.git
+ source = logging.properties
+ source = nxt.properties
+ source = nxt.sysusers
+ source = nxt.tmpfiles
source = nxt.service
- source = nxt-tor.service
- source = nxt.install
- source = nrs.sh
- source = nrs.desktop
+ source = nxt.desktop
+ source = nxt.sh
sha256sums = SKIP
- sha256sums = 293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7
- sha256sums = 87a725d1e2cf5af3554dd8d2775c94a952bc27313287777f0ca8984644f0d9b4
- sha256sums = b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca
- sha256sums = b0429b9fb91f1b7ecd6bac2f93b36e0a0344efa21052fd5b1742067e11ba89e5
- sha256sums = 8381f120b645cca9079b5e958a8917326f71b55f031f15df3324703377638eee
+ sha256sums = e00b9e5a605653faec8a4582ba004eff54c3692f60dc5a8c13c98119041195b1
+ sha256sums = a65abe20dcec9ab4e7f39b5f16daee3e10a0b93dd78cadea47d45289ea145cbf
+ sha256sums = d73213fe300346c548e991af0797b23b3c608e803f741cd0ae89d3bb0549bfe3
+ sha256sums = 2f4775688213f0948364f1594162c12a6ec865501f7434847ce9bb7c73b11c59
+ sha256sums = 9c3ba3fff584e4baae3d9af88aa62418fd701094d2256e6e687300ce35b1f6f8
+ sha256sums = 9c5cd343af10ba63d024280e79453fa92a1c0864b47c77020eaa86fc316f5661
+ sha256sums = c3beaaf62b9d499e023426d4206d8eb775d7dcf6f7b005b3bb34b12d64d9c1af
pkgname = nxt-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..20af7e0b6519
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+nxt/
+src/
+pkg/
+*.pkg.tar.xz
+*.pkg.tar.xz.sig
diff --git a/PKGBUILD b/PKGBUILD
index d0bb3c3211fc..8960963b8c37 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,57 +1,69 @@
# Maintainer: David Parrish <daveparrish@gmail.com>
pkgname=nxt-git
-pkgver=1.5.12.r5.g5bbafe1
+pkgver=1.11.5+0+gfc25fd5a2
pkgrel=1
-pkgdesc="The Nxt Reference Software Client for use with the Nxt Cryptocurrency."
+pkgdesc="The Nxt Reference Software Client for use with the Nxt Cryptocurrency"
arch=('any')
url="http://nxt.org"
license=('MIT' 'GPL' 'MPL' 'APACHE')
-depends=('bash' 'java-runtime-openjdk=8')
-makedepends=('java-environment-openjdk=8')
-optdepends=('flashplugin: NRS clipboard support'
- 'libnotify: NRS startup error notification'
- 'tor: route NXT traffic through Tor')
-source=("${pkgname}::git+https://bitbucket.org/JeanLucPicard/nxt.git"
- "nxt.service"
- "nxt-tor.service"
- "nxt.install"
- "nrs.sh"
- "nrs.desktop")
+depends=('java-runtime>=8' 'systemd')
+makedepends=('java-environment>=8')
+source=('git+https://bitbucket.org/JeanLucPicard/nxt.git'
+ 'logging.properties'
+ 'nxt.properties'
+ 'nxt.sysusers'
+ 'nxt.tmpfiles'
+ 'nxt.service'
+ 'nxt.desktop'
+ 'nxt.sh')
+backup=('etc/nxt/nxt.properties'
+ 'etc/nxt/logging.properties')
sha256sums=('SKIP'
- '293bf1e313677f769e4a12e6e0f78bbd58c796ebe7c34528ba50cd73bbea15a7'
- '87a725d1e2cf5af3554dd8d2775c94a952bc27313287777f0ca8984644f0d9b4'
- 'b7575397d7dd19e9b1bab75e21a433f3bdc98279ad822fe57235b830c062abca'
- 'b0429b9fb91f1b7ecd6bac2f93b36e0a0344efa21052fd5b1742067e11ba89e5'
- '8381f120b645cca9079b5e958a8917326f71b55f031f15df3324703377638eee')
-install='nxt.install'
+ 'e00b9e5a605653faec8a4582ba004eff54c3692f60dc5a8c13c98119041195b1'
+ 'a65abe20dcec9ab4e7f39b5f16daee3e10a0b93dd78cadea47d45289ea145cbf'
+ 'd73213fe300346c548e991af0797b23b3c608e803f741cd0ae89d3bb0549bfe3'
+ '2f4775688213f0948364f1594162c12a6ec865501f7434847ce9bb7c73b11c59'
+ '9c3ba3fff584e4baae3d9af88aa62418fd701094d2256e6e687300ce35b1f6f8'
+ '9c5cd343af10ba63d024280e79453fa92a1c0864b47c77020eaa86fc316f5661'
+ 'c3beaaf62b9d499e023426d4206d8eb775d7dcf6f7b005b3bb34b12d64d9c1af')
pkgver() {
- cd "$pkgname"
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ cd nxt
+ git describe --long --tags | sed 's/-/+/g; s/^v//'
}
build() {
- cd "${pkgname}"
- ./compile.sh
+ cd nxt
+
+ mkdir classes
+ shopt -s globstar
+ javac -encoding utf8 -sourcepath src/java/nxt -classpath "lib/*:classes" -d classes src/java/nxt/**/*.java
+ jar cf nxt.jar -C classes .
}
package() {
- # Copy everything to /opt/nxt
- install -dm755 "$pkgdir/opt/nxt"
- cp -r "${pkgname}"/* "$pkgdir"/opt/nxt/
+ cd nxt
+
+ install -d "$pkgdir/usr/share/java/nxt"
+ cp -rt "$pkgdir/usr/share/java/nxt" nxt.jar lib conf addons
+ rm -rf "$pkgdir/usr/share/java/nxt/"{addons/src,conf/.gitignore}
+
+ install -d "$pkgdir/usr/share/nxt"
+ cp -rt "$pkgdir/usr/share/nxt" ./html
+
+ install -Dm644 -t "$pkgdir/etc/nxt" ../{nxt,logging}.properties
# Service files
- install -Dm644 nxt.service "$pkgdir/usr/lib/systemd/system/nxt.service"
- install -Dm644 nxt-tor.service "$pkgdir/usr/lib/systemd/system/nxt-tor.service"
+ install -Dm644 ../nxt.service "$pkgdir/usr/lib/systemd/system/nxt.service"
+ install -Dm644 ../nxt.sysusers "$pkgdir/usr/lib/sysusers.d/nxt.conf"
+ install -Dm644 ../nxt.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/nxt.conf"
+
+ # Desktop files
+ install -Dm644 html/www/img/nxt_logo.png "${pkgdir}/usr/share/pixmaps/nxt.png"
+ install -Dm644 ../nxt.desktop "${pkgdir}/usr/share/applications/nxt.desktop"
+ install -Dm755 ../nxt.sh "$pkgdir/usr/bin/nxt"
# License files
- install -Dm644 "${pkgname}/COPYING.txt" "$pkgdir/usr/share/licenses/nxt/COPYING.txt"
- install -Dm644 "${pkgname}/3RD-PARTY-LICENSES.txt" "$pkgdir/usr/share/licenses/nxt/3RD-PARTY-LICENSES.txt"
- install -Dm644 "${pkgname}/LICENSE.txt" "$pkgdir/usr/share/licenses/nxt/LICENSES.txt"
-
- # NRS shortcut
- install -Dm644 "${pkgname}/html/nrs/icon.png" "${pkgdir}/usr/share/pixmaps/nrs.png"
- install -Dm644 nrs.desktop "${pkgdir}/usr/share/applications/nrs.desktop"
- install -Dm755 nrs.sh "$pkgdir/usr/bin/nrs"
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" ./{COPYING,3RD-PARTY-LICENSES,LICENSE}.txt
}
diff --git a/logging.properties b/logging.properties
new file mode 100644
index 000000000000..089f4716474c
--- /dev/null
+++ b/logging.properties
@@ -0,0 +1,8 @@
+java.util.logging.FileHandler.pattern = /var/log/nxt/nxt.log
+
+# Default logging level (OFF, FINE, INFO, WARNING, SEVERE)
+.level = SEVERE
+
+# Nxt logging level (OFF, FINE, INFO, WARNING, SEVERE)
+nxt.level = WARNING
+nxt.http.APIProxyServlet.level = INFO
diff --git a/nrs.sh b/nrs.sh
deleted file mode 100755
index 236fee4a03d8..000000000000
--- a/nrs.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-nxt_status=$(systemctl is-active nxt)
-nxt_tor_status=$(systemctl is-active nxt-tor)
-
-which notify-send > /dev/null
-is_libnotify_installed=$?
-
-if [ $libnotify_installed ]; then
- echo "libnotify_installed"
-fi
-
-if [[ $nxt_status != "active" && $nxt_tor_status != "active" ]]; then
- start_nxt_message="NXT service isn't active. Try starting NXT with 'systemctl start nxt' if NRS doesn't load."
- if [ $is_libnotify_installed ]; then
- notify-send "NRS" "$start_nxt_message"
- fi
- echo "$start_nxt_message"
-fi
-
-xdg-open http://localhost:7876/
diff --git a/nxt-tor.service b/nxt-tor.service
deleted file mode 100644
index 83a94a4e0318..000000000000
--- a/nxt-tor.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=NXT Tor
-After=network.target tor.service
-Requires=tor.service
-
-[Service]
-User=nxt
-ExecStart=/usr/bin/bash -c 'cd /opt/nxt/; ./run-tor.sh'
-
-[Install]
-WantedBy=multi-user.target
diff --git a/nrs.desktop b/nxt.desktop
index 2dd9e5cc70b4..164278ee261f 100644
--- a/nrs.desktop
+++ b/nxt.desktop
@@ -1,9 +1,9 @@
[Desktop Entry]
-Name=NRS
+Name=NXT Wallet
GenericName=Nxt Reference Software
Comment=Nxt Reference Software
-Exec=/usr/bin/nrs
-Icon=/usr/share/pixmaps/nrs.png
+Exec=/usr/bin/nxt
+Icon=/usr/share/pixmaps/nxt.png
Terminal=false
Type=Application
Categories=Utility;Finance;
diff --git a/nxt.install b/nxt.install
deleted file mode 100644
index d7c64c3d3746..000000000000
--- a/nxt.install
+++ /dev/null
@@ -1,20 +0,0 @@
-post_install() {
- getent passwd nxt &>/dev/null || {
- echo -n ">>> Creating nxt user... "
- useradd --system --user-group --home /opt/nxt nxt
- echo "done"
- }
- chown -R nxt:nxt /opt/nxt
-}
-
-post_upgrade() {
- chown -R nxt:nxt /opt/nxt
-}
-
-pre_remove() {
- getent passwd nxt &>/dev/null && {
- echo -n ">>> Removing nxt user... "
- userdel nxt
- echo "done"
- }
-}
diff --git a/nxt.properties b/nxt.properties
new file mode 100644
index 000000000000..992a514805f4
--- /dev/null
+++ b/nxt.properties
@@ -0,0 +1,6 @@
+nxt.dbDir=/var/lib/nxt/nxt_db/nxt
+nxt.testDbDir=/var/lib/nxt/nxt_test_db/nxt
+
+nxt.apiResourceBase=/usr/share/nxt/html/www
+nxt.javadocResourceBase=/usr/share/nxt/html/doc
+nxt.uiResourceBase=/usr/share/nxt/html/nrs
diff --git a/nxt.service b/nxt.service
index d897342cd201..666c74204fef 100644
--- a/nxt.service
+++ b/nxt.service
@@ -1,10 +1,25 @@
[Unit]
-Description=NXT
+Description=NXT Cryptocurrency Daemon
After=network.target
[Service]
User=nxt
-ExecStart=/usr/bin/bash -c 'cd /opt/nxt/; ./run.sh'
+WorkingDirectory=/usr/share/java/nxt
+ExecStart=/usr/bin/java \
+ -cp nxt.jar:lib/*:conf:addons/classes:addons/lib/* \
+ -Dnxt.properties=/etc/nxt/nxt.properties \
+ -Dlogging.properties=/etc/nxt/logging.properties \
+ nxt.Nxt
+
+NoNewPrivileges=true
+
+PrivateTmp=true
+PrivateDevices=true
+ProtectHome=true
+
+ReadOnlyPaths=/
+ReadWritePaths=/var/lib/nxt
+ReadWritePaths=/var/log/nxt
[Install]
WantedBy=multi-user.target
diff --git a/nxt.sh b/nxt.sh
new file mode 100644
index 000000000000..0ba94544b67c
--- /dev/null
+++ b/nxt.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ active == $(systemctl is-active nxt) ]; then
+ exec xdg-open http://localhost:7876/
+fi
+
+MSG="Service isn't active. Try starting NXT with 'systemctl start nxt'"
+
+if hash notify-send &>/dev/null; then
+ exec notify-send -u critical "NXT" "$MSG"
+else
+ echo "NXT" "$MSG"
+fi
diff --git a/nxt.sysusers b/nxt.sysusers
new file mode 100644
index 000000000000..a5402d5baa6a
--- /dev/null
+++ b/nxt.sysusers
@@ -0,0 +1 @@
+u nxt - "Nxt Service" /var/lib/nxt
diff --git a/nxt.tmpfiles b/nxt.tmpfiles
new file mode 100644
index 000000000000..8181016de30b
--- /dev/null
+++ b/nxt.tmpfiles
@@ -0,0 +1,2 @@
+d /var/lib/nxt 0700 nxt nxt -
+d /var/log/nxt 0750 nxt log -