summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHal Gentz2018-07-03 01:55:17 -0600
committerHal Gentz2018-07-03 01:59:27 -0600
commit91bb74daff41788e13eedcaa3b2357db30663156 (patch)
tree02cd2970a614838998640483420a23a00f836e40
parentb82e4efa0f9c4ff77a33b99c57ce4aa99248f03b (diff)
downloadaur-91bb74daff41788e13eedcaa3b2357db30663156.tar.gz
Initial
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
-rw-r--r--.SRCINFO30
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD162
-rwxr-xr-xneo4j8
-rwxr-xr-xneo4j-admin8
-rwxr-xr-xneo4j-import8
-rwxr-xr-xneo4j-shell8
-rw-r--r--neo4j-tmpfile.conf1
-rw-r--r--neo4j.conf28
-rw-r--r--neo4j.service15
10 files changed, 177 insertions, 95 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c141b86e51de..5bd35fcb1620 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,28 +1,38 @@
-pkgbase = neo4j-community
+pkgbase = neo4j-git
pkgdesc = A fully transactional graph database implemented in Java
- pkgver = 3.2.6
- pkgrel = 2
+ pkgver = 3.5.0.alpha02.r224.25bd3fa979e
+ pkgrel = 1
url = http://neo4j.org/
install = neo4j.install
arch = any
license = custom
+ makedepends = git
makedepends = patch
+ makedepends = maven
+ makedepends = tar
depends = java-runtime-headless>=8
conflicts = neo4j-enterprise
+ conflicts = neo4j-community
options = !strip
backup = etc/neo4j/neo4j.conf
- source = http://dist.neo4j.org/neo4j-community-3.2.6-unix.tar.gz
+ source = neo4j-git::git+https://github.com/neo4j/neo4j.git
source = bin.patch
source = neo4j.conf
source = neo4j.install
source = neo4j.service
- source = neo4j-tmpfile.conf
- sha256sums = 6d68363595c9288dc734301de6d8f935b7a0febcb59b88ff77676b95cd0a8950
+ source = neo4j
+ source = neo4j-admin
+ source = neo4j-import
+ source = neo4j-shell
+ sha256sums = SKIP
sha256sums = 163a1fad08a26c1367ea24a09e3231dab9aa0ed6b86b6421663cad622e2b680b
- sha256sums = 8b58f52fc827a02eda8aa58fd40c3a19aab9f5ea0687f5eebc421ba49828713b
+ sha256sums = 9eea28f61efcdcee6b927d8a941adf2409fd0375619727ff5070d12b09153096
sha256sums = f95936abc4a519b01d2cd987cd38a253003cf4cd39bfab29948708e82d98de66
- sha256sums = cf3148bd65ddc06f5ca8cf2ad37013d2e1aa561c5759e4b295f361465e603928
- sha256sums = e1311352e05b1e698599b91883141b938ceb418abd7e6bc11cc964854f0a21e1
+ sha256sums = 2abeee5f8dc350a67ae0e6329b3d8d1c12332041a9bea764c2b1c17f8d91239a
+ sha256sums = 2537ae4599ba36525754c753bb6e0ee940244f4c9e2acf7e1ae8a431f53d092c
+ sha256sums = 2537ae4599ba36525754c753bb6e0ee940244f4c9e2acf7e1ae8a431f53d092c
+ sha256sums = 2537ae4599ba36525754c753bb6e0ee940244f4c9e2acf7e1ae8a431f53d092c
+ sha256sums = 2537ae4599ba36525754c753bb6e0ee940244f4c9e2acf7e1ae8a431f53d092c
-pkgname = neo4j-community
+pkgname = neo4j-git
diff --git a/.gitignore b/.gitignore
index 8ab503be0037..04a7a18be0bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-neo4j-community-*-any.pkg.tar.xz
-neo4j-community-*-unix.tar.gz
+neo4j-git
+neo4j-git-*
pkg/
src/
diff --git a/PKGBUILD b/PKGBUILD
index 76f3a561b692..31885488acd5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,92 +1,118 @@
-# Maintainer: Marcel Campello Ferreira <marcel.campello.ferreira@gmail.com>
-pkgname=neo4j-community
-pkgver=3.2.6
-pkgrel=2
+# Maintainer: Hal Gentz <zegentzy@protonmail.com>
+# Contributer: Marcel Campello Ferreira <marcel.campello.ferreira@gmail.com>
+
+pkgname=neo4j-git
+pkgver=3.5.0.alpha02.r224.25bd3fa979e
+pkgrel=1
pkgdesc='A fully transactional graph database implemented in Java'
-arch=(any)
-url=http://neo4j.org/
-license=(custom)
-makedepends=(patch)
+arch=('any')
+url="http://neo4j.org/"
+license=("custom")
+makedepends=('git' 'patch' 'maven' 'tar')
depends=('java-runtime-headless>=8')
-conflicts=(neo4j-enterprise)
-backup=(etc/neo4j/neo4j.conf)
+conflicts=('neo4j-enterprise' 'neo4j-community')
+backup=('etc/neo4j/neo4j.conf')
options=(!strip)
install=neo4j.install
-source=(http://dist.neo4j.org/neo4j-community-$pkgver-unix.tar.gz
- bin.patch
- neo4j.conf
- neo4j.install
- neo4j.service
- neo4j-tmpfile.conf)
-sha256sums=('6d68363595c9288dc734301de6d8f935b7a0febcb59b88ff77676b95cd0a8950'
+source=("$pkgname::git+https://github.com/neo4j/neo4j.git"
+ "bin.patch"
+ "neo4j.conf"
+ "neo4j.install"
+ "neo4j.service"
+ "neo4j"
+ "neo4j-admin"
+ "neo4j-import"
+ "neo4j-shell")
+sha256sums=('SKIP'
'163a1fad08a26c1367ea24a09e3231dab9aa0ed6b86b6421663cad622e2b680b'
- '8b58f52fc827a02eda8aa58fd40c3a19aab9f5ea0687f5eebc421ba49828713b'
+ '9eea28f61efcdcee6b927d8a941adf2409fd0375619727ff5070d12b09153096'
'f95936abc4a519b01d2cd987cd38a253003cf4cd39bfab29948708e82d98de66'
- 'cf3148bd65ddc06f5ca8cf2ad37013d2e1aa561c5759e4b295f361465e603928'
- 'e1311352e05b1e698599b91883141b938ceb418abd7e6bc11cc964854f0a21e1')
+ '4604cd10e0c274ed8d2306f1ab3d6e62c31cfc7f0aee4de9feb97759740c38d7'
+ '4b5573eac61334163ad1fd45b9edaf2aa281e80596c0c61d0e18525a63baa640'
+ '4b5573eac61334163ad1fd45b9edaf2aa281e80596c0c61d0e18525a63baa640'
+ '4b5573eac61334163ad1fd45b9edaf2aa281e80596c0c61d0e18525a63baa640'
+ '4b5573eac61334163ad1fd45b9edaf2aa281e80596c0c61d0e18525a63baa640')
-prepare() {
+pkgver()
+{
+ cd "$srcdir/${pkgname}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
+}
- cd $srcdir/neo4j-community-$pkgver
- patch -Np1 -i ../bin.patch
+build() {
+ cd "$srcdir/$pkgname"
+ export MAVEN_OPTS="-Xmx512m"
+ mvn clean install -DskipTests
+ VERSION=$(cat pom.xml | grep "<version>" | head -n 1 | sed "s/^[[:space:]]*<version>//" | sed "s/<\/version>//")
+ cd packaging/standalone/target
+ tar -xvzf "neo4j-community-$VERSION-unix.tar.gz"
+ cd "neo4j-community-$VERSION"
+ patch -Np1 -i "$srcdir/bin.patch"
}
package() {
- cd $srcdir/neo4j-community-$pkgver
+ cd "$srcdir/$pkgname"
+ VERSION=$(cat pom.xml | grep "<version>" | head -n 1 | sed "s/^[[:space:]]*<version>//" | sed "s/<\/version>//")
+ cd "packaging/standalone/target/neo4j-community-$VERSION"
- # Config files
- CONFIG_DIR=etc/neo4j
- install -dm755 $pkgdir/$CONFIG_DIR
- install -dm700 $pkgdir/$CONFIG_DIR/certificates
- install -Dm644 $srcdir/neo4j.conf $pkgdir/etc/neo4j/neo4j.conf
+ # NOTE: We copy the structure of their debian package, which is why we don't
+ # copy everything
- # Data, import and log files
- DATA_DIR=var/lib/neo4j/data
- install -dm755 $pkgdir/$DATA_DIR
- [[ $(ls -A data/* 2>/dev/null) ]] && cp -r data/* $pkgdir/$DATA_DIR
+ # Config files
+ CONFIG_DIR=etc/neo4j
+ install -dm755 "$pkgdir/$CONFIG_DIR"
+ install -dm700 "$pkgdir/$CONFIG_DIR/certificates"
+ install -Dm644 "$srcdir/neo4j.conf" "$pkgdir/etc/neo4j/neo4j.conf"
- IMPORT_DIR=var/lib/neo4j/import
- install -dm755 $pkgdir/$IMPORT_DIR
- [[ $(ls -A import/* 2>/dev/null) ]] && cp -r import/* $pkgdir/$IMPORT_DIR
+ # Service definition files
+ install -Dm644 "$srcdir/neo4j.service" "$pkgdir/usr/lib/systemd/system/neo4j.service"
- LOG_DIR=var/log/neo4j
- install -dm755 $pkgdir/$LOG_DIR
- [[ $(ls -A logs/* 2>/dev/null) ]] && cp -r logs/* $pkgdir/$LOG_DIR
+ # JAR files
+ BIN_DIR=usr/share/neo4j
+ install -dm755 "$pkgdir/$BIN_DIR"
- # Copy JARs in lib and plugins
- LIB_DIR=usr/share/java/neo4j/lib
- install -dm755 $pkgdir/$LIB_DIR
- [[ $(ls -A lib/* 2>/dev/null) ]] && cp -r lib/* $pkgdir/$LIB_DIR
+ install -dm755 "$pkgdir/$BIN_DIR/tools"
+ for f in ./bin/tools/*; do
+ b_file=$(basename $f)
+ install -Dm755 "./bin/tools/$b_file" "$pkgdir/$BIN_DIR/tools/$b_file"
+ done
- PLUGINS_DIR=usr/share/java/neo4j/plugins
- install -dm755 $pkgdir/$PLUGINS_DIR
- [[ $(ls -A plugins/* 2>/dev/null) ]] && cp -r plugins/* $pkgdir/$PLUGINS_DIR
+ install -dm755 "$pkgdir/$BIN_DIR/lib"
+ for f in ./lib/*; do
+ b_file=$(basename $f)
+ install -Dm755 "./lib/$b_file" "$pkgdir/$BIN_DIR/lib/$b_file"
+ done
- # Executable files
- BIN_DIR=usr/share/neo4j/bin
- install -dm755 $pkgdir/$BIN_DIR
- [[ $(ls -A bin/* 2>/dev/null) ]] && cp -r bin/* $pkgdir/$BIN_DIR
+ install -dm755 "$pkgdir/$BIN_DIR/bin"
+ install -dm755 "$pkgdir/$BIN_DIR/bin/tools"
+ for f in ./bin/tools/*; do
+ b_file=$(basename $f)
+ install -Dm755 "./bin/tools/$b_file" "$pkgdir/$BIN_DIR/bin/tools/$b_file"
+ done
- SYSTEM_BIN_DIR=usr/bin
- install -dm755 $pkgdir/$SYSTEM_BIN_DIR
- for file in $(find $pkgdir/$BIN_DIR -maxdepth 1 -type f); do
- b_file=$(basename $file)
- ln -s /$BIN_DIR/$b_file $pkgdir/$SYSTEM_BIN_DIR/$b_file;
- done
+ for f in $(find bin -maxdepth 1 -type f); do
+ b_file=$(basename $f)
+ install -Dm755 "./bin/$b_file" "$pkgdir/$BIN_DIR/bin/$b_file"
+ done
- # Documentation
- DOC_DIR=usr/share/doc/neo4j
- install -dm755 $pkgdir/$DOC_DIR
- cp README.txt UPGRADE.txt $pkgdir/$DOC_DIR
+ install -Dm755 "$srcdir/neo4j" "$pkgdir/usr/bin/neo4j"
+ install -Dm755 "$srcdir/neo4j-admin" "$pkgdir/usr/bin/neo4j-admin"
+ install -Dm755 "$srcdir/neo4j-import" "$pkgdir/usr/bin/neo4j-import"
+ install -Dm755 "$srcdir/neo4j-shell" "$pkgdir/usr/bin/neo4j-shell"
- # License files
- LICENSES_DIR=usr/share/licenses/neo4j
- install -dm755 $pkgdir/$LICENSES_DIR
- cp LICENSE.txt LICENSES.txt NOTICE.txt $pkgdir/$LICENSES_DIR
+ # License files
+ LICENSES_DIR=usr/share/licenses/neo4j
+ install -dm755 $pkgdir/$LICENSES_DIR
+ cp LICENSE.txt LICENSES.txt NOTICE.txt $pkgdir/$LICENSES_DIR
- # Service definition files
- install -Dm644 $srcdir/neo4j.service $pkgdir/usr/lib/systemd/system/neo4j.service
+ # Documentation
+ DOC_DIR=usr/share/doc/neo4j
+ install -dm755 $pkgdir/$DOC_DIR
+ cp README.txt UPGRADE.txt $pkgdir/$DOC_DIR
- # Runtime files
- install -Dm644 $srcdir/neo4j-tmpfile.conf $pkgdir/usr/lib/tmpfiles.d/neo4j.conf
+ # Some directories
+ install -dm755 $pkgdir/var/log/neo4j
+ install -dm755 $pkgdir/var/lib/neo4j/data/databases
+ install -dm755 $pkgdir/var/lib/neo4j/import
+ install -dm755 $pkgdir/var/lib/neo4j/plugins
}
diff --git a/neo4j b/neo4j
new file mode 100755
index 000000000000..4f72cfa4d344
--- /dev/null
+++ b/neo4j
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
+NEO4J_BIN=/usr/share/neo4j/bin
+SCRIPT_NAME="$(basename "$0")"
+SCRIPT_PATH=""${NEO4J_BIN}"/"${SCRIPT_NAME}""
+
+NEO4J_HOME="${NEO4J_HOME:-/var/lib/neo4j}" NEO4J_CONF="${NEO4J_CONF:-/etc/neo4j}" exec "${SCRIPT_PATH}" "$@"
diff --git a/neo4j-admin b/neo4j-admin
new file mode 100755
index 000000000000..4f72cfa4d344
--- /dev/null
+++ b/neo4j-admin
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
+NEO4J_BIN=/usr/share/neo4j/bin
+SCRIPT_NAME="$(basename "$0")"
+SCRIPT_PATH=""${NEO4J_BIN}"/"${SCRIPT_NAME}""
+
+NEO4J_HOME="${NEO4J_HOME:-/var/lib/neo4j}" NEO4J_CONF="${NEO4J_CONF:-/etc/neo4j}" exec "${SCRIPT_PATH}" "$@"
diff --git a/neo4j-import b/neo4j-import
new file mode 100755
index 000000000000..4f72cfa4d344
--- /dev/null
+++ b/neo4j-import
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
+NEO4J_BIN=/usr/share/neo4j/bin
+SCRIPT_NAME="$(basename "$0")"
+SCRIPT_PATH=""${NEO4J_BIN}"/"${SCRIPT_NAME}""
+
+NEO4J_HOME="${NEO4J_HOME:-/var/lib/neo4j}" NEO4J_CONF="${NEO4J_CONF:-/etc/neo4j}" exec "${SCRIPT_PATH}" "$@"
diff --git a/neo4j-shell b/neo4j-shell
new file mode 100755
index 000000000000..4f72cfa4d344
--- /dev/null
+++ b/neo4j-shell
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH
+NEO4J_BIN=/usr/share/neo4j/bin
+SCRIPT_NAME="$(basename "$0")"
+SCRIPT_PATH=""${NEO4J_BIN}"/"${SCRIPT_NAME}""
+
+NEO4J_HOME="${NEO4J_HOME:-/var/lib/neo4j}" NEO4J_CONF="${NEO4J_CONF:-/etc/neo4j}" exec "${SCRIPT_PATH}" "$@"
diff --git a/neo4j-tmpfile.conf b/neo4j-tmpfile.conf
deleted file mode 100644
index 6553f9e1d47d..000000000000
--- a/neo4j-tmpfile.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/neo4j 0755 neo4j neo4j -
diff --git a/neo4j.conf b/neo4j.conf
index 0cfb10bcd149..2b8a586ea41a 100644
--- a/neo4j.conf
+++ b/neo4j.conf
@@ -10,10 +10,10 @@
# Paths of directories in the installation.
dbms.directories.data=/var/lib/neo4j/data
-dbms.directories.plugins=/usr/share/java/neo4j/plugins
-dbms.directories.certificates=/etc/neo4j/certificates
+dbms.directories.plugins=/var/lib/neo4j/plugins
+dbms.directories.certificates=/var/lib/neo4j/certificates
dbms.directories.logs=/var/log/neo4j
-dbms.directories.lib=/usr/share/java/neo4j/lib
+dbms.directories.lib=/usr/share/neo4j/lib
dbms.directories.run=/run/neo4j
# This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or comment it out to
@@ -26,7 +26,7 @@ dbms.directories.import=/var/lib/neo4j/import
#dbms.security.auth_enabled=false
# Enable this to be able to upgrade a store from an older version.
-#dbms.allow_format_migration=true
+#dbms.allow_upgrade=true
# Java Heap Size: by default the Java heap size is dynamically
# calculated based on available system resources.
@@ -75,7 +75,7 @@ dbms.connector.http.enabled=true
#dbms.connector.http.listen_address=:7474
# HTTPS Connector. There can be zero or one HTTPS connectors.
-#dbms.connector.https.enabled=true
+dbms.connector.https.enabled=true
#dbms.connector.https.listen_address=:7473
# Number of Neo4j worker threads.
@@ -172,7 +172,7 @@ dbms.connector.http.enabled=true
#dbms.ssl.policy.default.client_auth=require
# A comma-separated list of allowed TLS versions.
-# By default TLSv1, TLSv1.1 and TLSv1.2 are allowed.
+# By default only TLSv1.2 is allowed.
#dbms.ssl.policy.default.tls_versions=
@@ -226,6 +226,19 @@ dbms.connector.http.enabled=true
# clauses that load data from the file system.
#dbms.security.allow_csv_import_from_file_urls=true
+
+# Value of the Access-Control-Allow-Origin header sent over any HTTP or HTTPS
+# connector. This defaults to '*', which allows broadest compatibility. Note
+# that any URI provided here limits HTTP/HTTPS access to that URI only.
+#dbms.security.http_access_control_allow_origin=*
+
+# Value of the HTTP Strict-Transport-Security (HSTS) response header. This header
+# tells browsers that a webpage should only be accessed using HTTPS instead of HTTP.
+# It is attached to every HTTPS response. Setting is not set by default so
+# 'Strict-Transport-Security' header is not sent. Value is expected to contain
+# dirictives like 'max-age', 'includeSubDomains' and 'preload'.
+#dbms.security.http_strict_transport_security=
+
# Retention policy for transaction logs needed to perform recovery and backups.
dbms.tx_log.rotation.retention_policy=1 days
@@ -301,6 +314,9 @@ dbms.jvm.additional=-XX:+DisableExplicitGC
# This is to protect the server from any potential passive eavesdropping.
dbms.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048
+# This mitigates a DDoS vector.
+dbms.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true
+
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
diff --git a/neo4j.service b/neo4j.service
index 37a6f9aeb69a..0254596d52fa 100644
--- a/neo4j.service
+++ b/neo4j.service
@@ -1,15 +1,14 @@
[Unit]
-Description=Neo4j
+Description=Neo4j Graph Database
+After=network-online.target
+Wants=network-online.target
[Service]
+ExecStart=/bin/neo4j console
User=neo4j
-Type=forking
-Environment=NEO4J_CONF=/etc/neo4j
-Environment=NEO4J_HOME=/usr/share/neo4j
-ExecStart=/usr/bin/neo4j start
-ExecStop=/usr/bin/neo4j stop
-PIDFile=/run/neo4j/neo4j.pid
-LimitNOFILE=40000
+Group=neo4j
+LimitNOFILE=60000
+TimeoutSec=120
[Install]
WantedBy=multi-user.target