[Libreoffice-commits] online.git: configure.ac debian/rules loolwsd.spec.in Makefile.am
Makefile.am | 14 +++--- configure.ac| 21 + debian/rules|6 +- loolwsd.spec.in |7 --- 4 files changed, 33 insertions(+), 15 deletions(-) New commits: commit 51993b8990c8eb0123e860088df09e3ad6436079 Author: Christian Glombek <christian.glom...@rwth-aachen.de> Date: Thu Feb 1 14:49:44 2018 +0100 Adds ENABLE_SETCAP build variable to avoid using env in build system. Change-Id: Id38d2225238f8b3a48481a08e62cfa7544958cc9 Reviewed-on: https://gerrit.libreoffice.org/49097 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/Makefile.am b/Makefile.am index 2fce7fdd..542f8d53 100644 --- a/Makefile.am +++ b/Makefile.am @@ -314,13 +314,13 @@ clang-tidy: # installing the RPM or Debian package. all-local: loolforkit @JAILS_PATH@ $(SYSTEM_STAMP) - @if test "$$BUILDING_FROM_RPMBUILD" != yes; then \ - sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit; \ - sudo @SETCAP@ cap_sys_admin=ep loolmount; \ - echo "Set required capabilities"; \ - else \ - echo "Skipping capability setting"; \ - fi +if ENABLE_SETCAP + sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit + sudo @SETCAP@ cap_sys_admin=ep loolmount + echo "Set required capabilities" +else + echo "Skipping capability setting" +endif # just run the build without any tests build-nocheck: all-am diff --git a/configure.ac b/configure.ac index 3172f12b..ff96e7a6 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,10 @@ AC_ARG_WITH([compiler-plugins], [Experimental! Unlikely to work for anyone except Noel! Enable compiler plugins that will perform additional checks during building.])) +AC_ARG_ENABLE([setcap], +AS_HELP_STRING([--disable-setcap], + [Do not set capabilities on files. For packaging builds])) + # Handle options AS_IF([test "$enable_debug" = yes -a -n "$with_poco_libs"], [POCO_DEBUG_SUFFIX=d], @@ -395,6 +399,22 @@ AC_SUBST(LOOLWSD_CONFIGDIR) LOOLWSD_DATADIR=${datadir}/${PACKAGE} AC_SUBST(LOOLWSD_DATADIR) +AS_IF([test "$enable_setcap" != "no"], + [AC_DEFINE([ENABLE_SETCAP],1,[Whether to enable setting of capabilities])], + [AC_DEFINE([ENABLE_SETCAP],0,[Whether to enable setting of capabilities])]) + +AM_CONDITIONAL([ENABLE_SETCAP], [test "$enable_setcap" != "no"]) + +ENABLE_SETCAP= +if test "$enable_setcap" != "no"; then +ENABLE_SETCAP=true +setcap_msg="setcap enabled" +else +setcap_msg="setcap disabled" +fi + +AC_SUBST(ENABLE_SETCAP) + AC_CONFIG_FILES([Makefile test/Makefile loleaflet/Makefile @@ -414,6 +434,7 @@ Configuration: LO integration tests${lo_msg} SSL support $ssl_msg Debug & low security$debug_msg +Set capabilities$setcap_msg \$ make # to compile" if test -n "$with_lo_path"; then diff --git a/debian/rules b/debian/rules index 976dbde7..fe3d10b3 100755 --- a/debian/rules +++ b/debian/rules @@ -5,11 +5,7 @@ DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk -CONFFLAGS = --enable-silent-rules --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-lokit-path=`pwd`/bundled/include $(CONFIG_OPTIONS) - -# Avoid setcap when doing "make", when building for packaging -# the setcap is done at installation time -export BUILDING_FROM_RPMBUILD=yes +CONFFLAGS = --enable-silent-rules --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-lokit-path=`pwd`/bundled/include --disable-setcap $(CONFIG_OPTIONS) # main packaging script based on dh7 syntax %: diff --git a/loolwsd.spec.in b/loolwsd.spec.in index 0933b1a3..ebfdf7f7 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -65,17 +65,18 @@ Obsoletes: loleaflet <= 1.5.8 --enable-silent-rules \ --with-lokit-path=bundled/include \ --with-lo-path=%{loroot} \ + --disable-setcap \ %if 0%{?config_options:1} %{config_options} %endif -env BUILDING_FROM_RPMBUILD=yes make %{?_smp_mflags} +make %{?_smp_mflags} %check -#env BUILDING_FROM_RPMBUILD=yes make check +#make check %install -env BUILDING_FROM_RPMBUILD=yes make install DESTDIR=%{buildroot} +make install DESTDIR=%{buildroot} %__install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service install -d -m 755 %{buildroot}/var/adm/fillup-templates %if 0%{?fedora} || 0%{?rhel} >= 7 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - loleaflet/Makefile.am
loleaflet/Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 51fb37bfb345aacd3f33ff8d9801ce1b635b2621 Author: Christian Glombek <christian.glom...@rwth-aachen.de> Date: Fri Aug 25 09:08:13 2017 +0200 Fix build from non-git source archives like tar or zip Change-Id: I359056c9ad2550b625eb3e7b8e71d841eedea93b Reviewed-on: https://gerrit.libreoffice.org/41553 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> (cherry picked from commit b61bcd2e5381b9cc9615a2c7b1267620a58b3898) Reviewed-on: https://gerrit.libreoffice.org/49006 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 87c39079..248a1888 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -14,7 +14,7 @@ L10N_JSON = $(patsubst po/%.po,dist/l10n/%.json,$(L10N_PO)) L10N_STYLES_PO = $(wildcard po/styles/*.po) L10N_STYLES_JSON = $(patsubst po/styles/%.po,dist/l10n/styles/%.json,$(L10N_STYLES_PO)) -EXTRA_DIST = $(shell git ls-files) +EXTRA_DIST = $(shell find . -type f -not -path './.git/*' | sed 's/.\///') all-local: node_modules $(L10N_JSON) $(L10N_STYLES_JSON) rm -rf dist/plugins/draw-$(DRAW_VERSION) && mkdir -p dist/plugins/draw-$(DRAW_VERSION) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - net/Ssl.cpp
net/Ssl.cpp | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) New commits: commit 7d2f40a8068bebc18b9f705ecd1184d9c2689bbc Author: Christian Glombek <christian.glom...@rwth-aachen.de> Date: Sat Sep 16 08:38:01 2017 +0200 Add Support for OpenSSL 1.1.0 Change-Id: I0aa58b893e8577bba94fa45c0c4c81449b12e4e2 Reviewed-on: https://gerrit.libreoffice.org/42356 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> (cherry picked from commit 702bbdd5d8dd31eda8a2dfdb726be3c6cd978ec2) Reviewed-on: https://gerrit.libreoffice.org/44713 Reviewed-by: Aron Budea <aron.bu...@collabora.com> Tested-by: Aron Budea <aron.bu...@collabora.com> diff --git a/net/Ssl.cpp b/net/Ssl.cpp index e350257c..64f279d4 100644 --- a/net/Ssl.cpp +++ b/net/Ssl.cpp @@ -42,13 +42,18 @@ SslContext::SslContext(const std::string& certFilePath, _mutexes.emplace_back(new std::mutex); } -#if OPENSSL_VERSION_NUMBER >= 0x0907000L +#if OPENSSL_VERSION_NUMBER >= 0x0907000L && OPENSSL_VERSION_NUMBER < 0x1013L OPENSSL_config(nullptr); #endif +#if OPENSSL_VERSION_NUMBER >= 0x1013L +SSL_CTX_set_options(nullptr, 0); +OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL); +#else SSL_library_init(); SSL_load_error_strings(); OpenSSL_add_all_algorithms(); +#endif CRYPTO_set_locking_callback(::lock); CRYPTO_set_id_callback(::id); @@ -233,10 +238,19 @@ void SslContext::initDH() throw std::runtime_error("Error creating Diffie-Hellman parameters: " + msg); } +#if OPENSSL_VERSION_NUMBER >= 0x1013L +// OpenSSL v1.1.0 has public API changes +// p, g and length of the Diffie-Hellman param can't be set directly anymore, +// instead DH_set0_pqg and DH_set_length are used +BIGNUM* p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0); +BIGNUM* g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0); +if ((DH_set0_pqg(dh, p, NULL, g) == 0) || (DH_set_length(dh, 160) == 0)) +#else dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0); dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0); dh->length = 160; if ((!dh->p) || (!dh->g)) +#endif { DH_free(dh); throw std::runtime_error("Error creating Diffie-Hellman parameters"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - net/Ssl.cpp
net/Ssl.cpp | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) New commits: commit fa6cdb4db0a80b85042d2ebc43bbf28d2e30d7eb Author: Christian Glombek <christian.glom...@rwth-aachen.de> Date: Sat Sep 16 08:38:01 2017 +0200 Add Support for OpenSSL 1.1.0 Change-Id: I0aa58b893e8577bba94fa45c0c4c81449b12e4e2 Reviewed-on: https://gerrit.libreoffice.org/42511 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/net/Ssl.cpp b/net/Ssl.cpp index e350257c..64f279d4 100644 --- a/net/Ssl.cpp +++ b/net/Ssl.cpp @@ -42,13 +42,18 @@ SslContext::SslContext(const std::string& certFilePath, _mutexes.emplace_back(new std::mutex); } -#if OPENSSL_VERSION_NUMBER >= 0x0907000L +#if OPENSSL_VERSION_NUMBER >= 0x0907000L && OPENSSL_VERSION_NUMBER < 0x1013L OPENSSL_config(nullptr); #endif +#if OPENSSL_VERSION_NUMBER >= 0x1013L +SSL_CTX_set_options(nullptr, 0); +OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL); +#else SSL_library_init(); SSL_load_error_strings(); OpenSSL_add_all_algorithms(); +#endif CRYPTO_set_locking_callback(::lock); CRYPTO_set_id_callback(::id); @@ -233,10 +238,19 @@ void SslContext::initDH() throw std::runtime_error("Error creating Diffie-Hellman parameters: " + msg); } +#if OPENSSL_VERSION_NUMBER >= 0x1013L +// OpenSSL v1.1.0 has public API changes +// p, g and length of the Diffie-Hellman param can't be set directly anymore, +// instead DH_set0_pqg and DH_set_length are used +BIGNUM* p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0); +BIGNUM* g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0); +if ((DH_set0_pqg(dh, p, NULL, g) == 0) || (DH_set_length(dh, 160) == 0)) +#else dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0); dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0); dh->length = 160; if ((!dh->p) || (!dh->g)) +#endif { DH_free(dh); throw std::runtime_error("Error creating Diffie-Hellman parameters"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: net/Ssl.cpp
net/Ssl.cpp | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) New commits: commit 702bbdd5d8dd31eda8a2dfdb726be3c6cd978ec2 Author: Christian Glombek <christian.glom...@rwth-aachen.de> Date: Sat Sep 16 08:38:01 2017 +0200 Add Support for OpenSSL 1.1.0 Change-Id: I0aa58b893e8577bba94fa45c0c4c81449b12e4e2 Reviewed-on: https://gerrit.libreoffice.org/42356 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/net/Ssl.cpp b/net/Ssl.cpp index 7c04cbd9..5a9f8280 100644 --- a/net/Ssl.cpp +++ b/net/Ssl.cpp @@ -42,13 +42,18 @@ SslContext::SslContext(const std::string& certFilePath, _mutexes.emplace_back(new std::mutex); } -#if OPENSSL_VERSION_NUMBER >= 0x0907000L +#if OPENSSL_VERSION_NUMBER >= 0x0907000L && OPENSSL_VERSION_NUMBER < 0x1013L OPENSSL_config(nullptr); #endif +#if OPENSSL_VERSION_NUMBER >= 0x1013L +SSL_CTX_set_options(nullptr, 0); +OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL); +#else SSL_library_init(); SSL_load_error_strings(); OpenSSL_add_all_algorithms(); +#endif CRYPTO_set_locking_callback(::lock); CRYPTO_set_id_callback(::id); @@ -234,10 +239,19 @@ void SslContext::initDH() throw std::runtime_error("Error creating Diffie-Hellman parameters: " + msg); } +#if OPENSSL_VERSION_NUMBER >= 0x1013L +// OpenSSL v1.1.0 has public API changes +// p, g and length of the Diffie-Hellman param can't be set directly anymore, +// instead DH_set0_pqg and DH_set_length are used +BIGNUM* p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0); +BIGNUM* g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0); +if ((DH_set0_pqg(dh, p, NULL, g) == 0) || (DH_set_length(dh, 160) == 0)) +#else dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0); dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0); dh->length = 160; if ((!dh->p) || (!dh->g)) +#endif { DH_free(dh); throw std::runtime_error("Error creating Diffie-Hellman parameters"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/Makefile.am
loleaflet/Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b61bcd2e5381b9cc9615a2c7b1267620a58b3898 Author: Christian Glombek <christian.glom...@rwth-aachen.de> Date: Fri Aug 25 09:08:13 2017 +0200 Fix build from non-git source archives like tar or zip Change-Id: I359056c9ad2550b625eb3e7b8e71d841eedea93b Reviewed-on: https://gerrit.libreoffice.org/41553 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index be4678fe..aa0492f0 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -14,7 +14,7 @@ L10N_JSON = $(patsubst po/%.po,dist/l10n/%.json,$(L10N_PO)) L10N_STYLES_PO = $(wildcard po/styles/*.po) L10N_STYLES_JSON = $(patsubst po/styles/%.po,dist/l10n/styles/%.json,$(L10N_STYLES_PO)) -EXTRA_DIST = $(shell git ls-files) +EXTRA_DIST = $(shell find . -type f -not -path './.git/*' | sed 's/.\///') all-local: node_modules $(L10N_JSON) $(L10N_STYLES_JSON) rm -rf dist/plugins/draw-$(DRAW_VERSION) && mkdir -p dist/plugins/draw-$(DRAW_VERSION) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits