Compare commits
7 Commits
show
...
release/1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
521c0a44bc | ||
|
|
5dddf5e5b5 | ||
|
|
c12f1c769a | ||
|
|
8985dfb75a | ||
|
|
43499a2dbb | ||
|
|
2d49d7ce93 | ||
|
|
10db90a7cf |
@@ -50,7 +50,7 @@ option(MG_ENTERPRISE "Build Memgraph Enterprise Edition" ON)
|
||||
# Set the current version here to override the automatic version detection. The
|
||||
# version must be specified as `X.Y.Z`. Primarily used when building new patch
|
||||
# versions.
|
||||
set(MEMGRAPH_OVERRIDE_VERSION "")
|
||||
set(MEMGRAPH_OVERRIDE_VERSION "1.0.0")
|
||||
|
||||
# Custom suffix that this version should have. The suffix can be any arbitrary
|
||||
# string. Primarily used when building a version for a specific customer.
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
cd ..
|
||||
mkdir build_community
|
||||
cd build_community
|
||||
cmake -DCMAKE_BUILD_TYPE=release -DMG_ENTERPRISE=OFF ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_READLINE=OFF -DMG_ENTERPRISE=OFF ..
|
||||
TIMEOUT=1200 make -j$THREADS
|
||||
|
||||
# Create Debian package.
|
||||
|
||||
@@ -215,6 +215,8 @@ import_external_library(libbcrypt STATIC
|
||||
import_external_library(mgclient STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mgclient/lib/libmgclient.a
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mgclient/include
|
||||
CMAKE_ARGS -DBUILD_TESTING=OFF)
|
||||
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DBUILD_TESTING=OFF)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(mgclient INTERFACE ${OPENSSL_LIBRARIES})
|
||||
|
||||
@@ -135,3 +135,4 @@ sed -i 's/TARGETS ${ROCKSDB_SHARED_LIB}/TARGETS ${ROCKSDB_SHARED_LIB} OPTIONAL/'
|
||||
mgclient_tag="fe94b3631385ef5dbe40a3d8458860dbcc33e6ea" # May 27, 2019
|
||||
# git clone https://github.com/memgraph/mgclient.git
|
||||
clone git://deps.memgraph.io/mgclient.git mgclient $mgclient_tag
|
||||
sed -i 's/\${CMAKE_INSTALL_LIBDIR}/lib/' mgclient/src/CMakeLists.txt
|
||||
|
||||
@@ -65,12 +65,12 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "openssl (>= 1.1.0), python3 (>= 3.5.0)")
|
||||
# RPM specific
|
||||
set(CPACK_RPM_PACKAGE_URL https://memgraph.com)
|
||||
set(CPACK_RPM_PACKAGE_VERSION "${MEMGRAPH_VERSION_RPM}")
|
||||
set(CPACK_RPM_FILE_NAME "memgraph_${MEMGRAPH_VERSION_RPM}.x86_64.rpm")
|
||||
set(CPACK_RPM_FILE_NAME "memgraph-${MEMGRAPH_VERSION_RPM}-1.x86_64.rpm")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
|
||||
/var /var/lib /var/log /etc/logrotate.d
|
||||
/lib /lib/systemd /lib/systemd/system /lib/systemd/system/memgraph.service)
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES_PRE "shadow-utils")
|
||||
if (ME_ENTERPRISE)
|
||||
if (MG_ENTERPRISE)
|
||||
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_SOURCE_DIR}/rpm/enterprise/memgraph.spec.in")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "Memgraph Enterprise Trial License")
|
||||
else()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/etc/memgraph/memgraph.conf
|
||||
/etc/memgraph/auth_module/ldap.example.yaml
|
||||
/etc/logrotate.d/memgraph
|
||||
/etc/logrotate.d/memgraph_audit
|
||||
|
||||
@@ -3,9 +3,12 @@ FROM debian:stretch
|
||||
ARG deb_release
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openssl libcurl3 libssl1.1 python3 libpython3.5 \
|
||||
openssl libcurl3 libssl1.1 python3 libpython3.5 python3-pip \
|
||||
--no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN pip3 install networkx
|
||||
|
||||
COPY ${deb_release} /
|
||||
|
||||
# Install memgraph package
|
||||
|
||||
@@ -3,9 +3,12 @@ FROM debian:stretch
|
||||
ARG deb_release
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openssl libcurl3 libssl1.1 libseccomp2 python3 libpython3.5 \
|
||||
openssl libcurl3 libssl1.1 libseccomp2 python3 libpython3.5 python3-pip \
|
||||
--no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN pip3 install networkx
|
||||
|
||||
COPY ${deb_release} /
|
||||
|
||||
# Install memgraph package
|
||||
|
||||
@@ -75,7 +75,7 @@ do
|
||||
pushd "$script_dir/$snapshots_dir/" >/dev/null
|
||||
|
||||
# remove all unnecessary directories
|
||||
for name in *; do
|
||||
for name in * .[a-zA-Z0-9]*; do
|
||||
if [ "$name" == "snapshots" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -75,18 +75,18 @@ import sys
|
||||
#
|
||||
# The RPM package version is determined using the following two templates:
|
||||
# Release version:
|
||||
# <VERSION>-1.<OFFERING>[.<SUFFIX>]
|
||||
# <VERSION>_1.<OFFERING>[.<SUFFIX>]
|
||||
# Development version:
|
||||
# <VERSION>-0.<DISTANCE>.<SHORTHASH>.<OFFERING>[.<SUFFIX>]
|
||||
# <VERSION>_0.<DISTANCE>.<SHORTHASH>.<OFFERING>[.<SUFFIX>]
|
||||
# Examples:
|
||||
# Release version:
|
||||
# 0.50.1-1.community
|
||||
# 0.50.1-1.enterprise
|
||||
# 0.50.1-1.enterprise.veryimportantcustomer
|
||||
# 0.50.1_1.community
|
||||
# 0.50.1_1.enterprise
|
||||
# 0.50.1_1.enterprise.veryimportantcustomer
|
||||
# Development version:
|
||||
# 0.50.0-0.12.7e1eef94.community
|
||||
# 0.50.0-0.12.7e1eef94.enterprise
|
||||
# 0.50.0-0.12.7e1eef94.enterprise.veryimportantcustomer
|
||||
# 0.50.0_0.12.7e1eef94.community
|
||||
# 0.50.0_0.12.7e1eef94.enterprise
|
||||
# 0.50.0_0.12.7e1eef94.enterprise.veryimportantcustomer
|
||||
# For more documentation about the RPM package naming conventions see:
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
|
||||
# https://fedoraproject.org/wiki/Package_Versioning_Examples
|
||||
@@ -112,8 +112,8 @@ def format_version(variant, version, offering, distance=None, shorthash=None,
|
||||
ret += "-1"
|
||||
return ret
|
||||
elif variant == "rpm":
|
||||
# <VERSION>-1.<OFFERING>[.<SUFFIX>]
|
||||
ret = "{}-1.{}".format(version, offering)
|
||||
# <VERSION>_1.<OFFERING>[.<SUFFIX>]
|
||||
ret = "{}_1.{}".format(version, offering)
|
||||
if suffix:
|
||||
ret += "." + suffix
|
||||
return ret
|
||||
@@ -133,8 +133,8 @@ def format_version(variant, version, offering, distance=None, shorthash=None,
|
||||
ret += "-1"
|
||||
return ret
|
||||
elif variant == "rpm":
|
||||
# <VERSION>-0.<DISTANCE>.<SHORTHASH>.<OFFERING>[.<SUFFIX>]
|
||||
ret = "{}-0.{}.{}.{}".format(
|
||||
# <VERSION>_0.<DISTANCE>.<SHORTHASH>.<OFFERING>[.<SUFFIX>]
|
||||
ret = "{}_0.{}.{}.{}".format(
|
||||
version, distance, shorthash, offering)
|
||||
if suffix:
|
||||
ret += "." + suffix
|
||||
|
||||
@@ -27,6 +27,19 @@ BuildRequires: systemd
|
||||
|
||||
@TMP_RPM_DEBUGINFO@
|
||||
|
||||
# This is needed to prevent Python compilation errors when building the RPM
|
||||
# package
|
||||
# https://github.com/scylladb/scylla/issues/2235
|
||||
%global __os_install_post \
|
||||
/usr/lib/rpm/redhat/brp-compress \
|
||||
%{!?__debug_package:\
|
||||
/usr/lib/rpm/redhat/brp-strip %{__strip} \
|
||||
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
|
||||
} \
|
||||
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
||||
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \
|
||||
%{nil}
|
||||
|
||||
%define _rpmdir %_topdir/RPMS
|
||||
%define _srcrpmdir %_topdir/SRPMS
|
||||
@FILE_NAME_DEFINE@
|
||||
@@ -76,13 +89,16 @@ for i in /usr/share/memgraph/examples/*; do
|
||||
if [ ! -d $i/telemetry ]; then
|
||||
mkdir $i/telemetry || exit 1
|
||||
fi
|
||||
# Make snapshots directory immutable (optional)
|
||||
chattr +i -R $i/snapshots || true
|
||||
done
|
||||
|
||||
# Change ownership of all examples
|
||||
chown -R memgraph:memgraph /usr/share/memgraph/examples || exit 1
|
||||
|
||||
# Make snapshots directory immutable (optional)
|
||||
for i in /usr/share/memgraph/examples/*; do
|
||||
chattr +i -R $i/snapshots || true
|
||||
done
|
||||
|
||||
# Generate SSL certificates
|
||||
if [ ! -d /etc/memgraph/ssl ]; then
|
||||
mkdir /etc/memgraph/ssl || exit 1
|
||||
|
||||
@@ -27,6 +27,19 @@ BuildRequires: systemd
|
||||
|
||||
@TMP_RPM_DEBUGINFO@
|
||||
|
||||
# This is needed to prevent Python compilation errors when building the RPM
|
||||
# package
|
||||
# https://github.com/scylladb/scylla/issues/2235
|
||||
%global __os_install_post \
|
||||
/usr/lib/rpm/redhat/brp-compress \
|
||||
%{!?__debug_package:\
|
||||
/usr/lib/rpm/redhat/brp-strip %{__strip} \
|
||||
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
|
||||
} \
|
||||
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
||||
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \
|
||||
%{nil}
|
||||
|
||||
%define _rpmdir %_topdir/RPMS
|
||||
%define _srcrpmdir %_topdir/SRPMS
|
||||
@FILE_NAME_DEFINE@
|
||||
@@ -76,13 +89,16 @@ for i in /usr/share/memgraph/examples/*; do
|
||||
if [ ! -d $i/telemetry ]; then
|
||||
mkdir $i/telemetry || exit 1
|
||||
fi
|
||||
# Make snapshots directory immutable (optional)
|
||||
chattr +i -R $i/snapshots || true
|
||||
done
|
||||
|
||||
# Change ownership of all examples
|
||||
chown -R memgraph:memgraph /usr/share/memgraph/examples || exit 1
|
||||
|
||||
# Make snapshots directory immutable (optional)
|
||||
for i in /usr/share/memgraph/examples/*; do
|
||||
chattr +i -R $i/snapshots || true
|
||||
done
|
||||
|
||||
# Generate SSL certificates
|
||||
if [ ! -d /etc/memgraph/ssl ]; then
|
||||
mkdir /etc/memgraph/ssl || exit 1
|
||||
@@ -121,6 +137,7 @@ chattr -i -R /usr/share/memgraph/examples || true
|
||||
# Override CPACK_RPM_ABSOLUTE_INSTALL_FILES with our %config(noreplace), cpack
|
||||
# uses plain %config.
|
||||
%config(noreplace) "/etc/memgraph/memgraph.conf"
|
||||
%config(noreplace) "/etc/memgraph/auth_module/ldap.example.yaml"
|
||||
%config(noreplace) "/etc/logrotate.d/memgraph"
|
||||
%config(noreplace) "/etc/logrotate.d/memgraph_audit"
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <sched.h>
|
||||
#include <seccomp.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -133,7 +134,9 @@ const std::vector<int> kSeccompSyscallsBlacklist = {
|
||||
SCMP_SYS(kexec_load),
|
||||
SCMP_SYS(mknodat),
|
||||
SCMP_SYS(unshare),
|
||||
#ifdef SYS_seccomp
|
||||
SCMP_SYS(seccomp),
|
||||
#endif
|
||||
};
|
||||
|
||||
bool SetupSeccomp() {
|
||||
|
||||
@@ -15,12 +15,6 @@
|
||||
#include <gflags/gflags.h>
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include "communication/bolt/v1/exceptions.hpp"
|
||||
#include "communication/bolt/v1/session.hpp"
|
||||
#include "communication/init.hpp"
|
||||
#include "communication/server.hpp"
|
||||
#include "communication/session.hpp"
|
||||
#include "glue/communication.hpp"
|
||||
#include "helpers.hpp"
|
||||
#include "py/py.hpp"
|
||||
#include "query/exceptions.hpp"
|
||||
@@ -39,6 +33,24 @@
|
||||
#include "utils/terminate_handler.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
// Communication libraries must be included after query libraries are included.
|
||||
// This is to enable compilation of the binary when linking with old OpenSSL
|
||||
// libraries (as on CentOS 7).
|
||||
//
|
||||
// The OpenSSL library available on CentOS 7 is v1.0.0, that version includes
|
||||
// `libkrb5` in its public API headers (that we include in our communication
|
||||
// stack). The `libkrb5` library has `#define`s for `TRUE` and `FALSE`. Those
|
||||
// defines clash with Antlr's usage of `TRUE` and `FALSE` as enumeration keys.
|
||||
// Because of that the definitions of `TRUE` and `FALSE` that are inherited
|
||||
// from `libkrb5` must be included after the Antlr includes. Hence,
|
||||
// communication headers must be included after query headers.
|
||||
#include "communication/bolt/v1/exceptions.hpp"
|
||||
#include "communication/bolt/v1/session.hpp"
|
||||
#include "communication/init.hpp"
|
||||
#include "communication/server.hpp"
|
||||
#include "communication/session.hpp"
|
||||
#include "glue/communication.hpp"
|
||||
|
||||
#ifdef MG_ENTERPRISE
|
||||
#include "audit/log.hpp"
|
||||
#include "auth/auth.hpp"
|
||||
|
||||
Reference in New Issue
Block a user