Unverified Commit 9b4deeff authored by Doron Somech's avatar Doron Somech Committed by GitHub

Merge pull request #3679 from bluca/nss_pkg

Problems: packages not building with nss, build fails on SUSE Tumbleweed, too many Travis builds
parents adf348b6 3e4c90bb
...@@ -44,13 +44,6 @@ matrix: ...@@ -44,13 +44,6 @@ matrix:
- env: BUILD_TYPE=default CURVE=tweetnacl IPv6=ON - env: BUILD_TYPE=default CURVE=tweetnacl IPv6=ON
os: linux os: linux
dist: precise dist: precise
- env: BUILD_TYPE=default CURVE=tweetnacl USE_NSS=yes
os: linux
dist: precise
addons:
apt:
packages:
- libnss3-dev
- env: BUILD_TYPE=coverage CURVE=tweetnacl DRAFT=enabled - env: BUILD_TYPE=coverage CURVE=tweetnacl DRAFT=enabled
os: linux os: linux
addons: addons:
...@@ -77,7 +70,7 @@ matrix: ...@@ -77,7 +70,7 @@ matrix:
- libsodium-dev - libsodium-dev
- asciidoc - asciidoc
- xmlto - xmlto
- env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled GSSAPI=enabled PGM=enabled NORM=enabled TIPC=enabled - env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled GSSAPI=enabled PGM=enabled NORM=enabled TIPC=enabled USE_NSS=yes
os: linux os: linux
addons: addons:
apt: apt:
...@@ -89,6 +82,7 @@ matrix: ...@@ -89,6 +82,7 @@ matrix:
- libnorm-dev - libnorm-dev
- libpgm-dev - libpgm-dev
- libsodium-dev - libsodium-dev
- libnss3-dev
- env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled - env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled
os: osx os: osx
- env: BUILD_TYPE=default CURVE=tweetnacl DRAFT=enabled ADDRESS_SANITIZER=enabled - env: BUILD_TYPE=default CURVE=tweetnacl DRAFT=enabled ADDRESS_SANITIZER=enabled
......
...@@ -949,6 +949,20 @@ AX_CHECK_COMPILE_FLAG([-Wno-tautological-constant-compare], ...@@ -949,6 +949,20 @@ AX_CHECK_COMPILE_FLAG([-Wno-tautological-constant-compare],
[], [],
[-Werror]) [-Werror])
# LTO is enabled by default on SUSE Tumbleweed and RPM lint generates an error if
# the flag is not used to compile archives:
# E: lto-no-text-in-archive
AC_LANG_PUSH([C])
AX_CHECK_COMPILE_FLAG([-ffat-lto-objects],
[CFLAGS+=" -ffat-lto-objects"],
[],
[-Werror])
AC_LANG_POP([C])
AX_CHECK_COMPILE_FLAG([-ffat-lto-objects],
[CXXFLAGS+=" -ffat-lto-objects"],
[],
[-Werror])
# Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS # Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS
AC_SUBST(LIBZMQ_EXTRA_CFLAGS) AC_SUBST(LIBZMQ_EXTRA_CFLAGS)
AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS) AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS)
......
...@@ -9,6 +9,7 @@ Build-Depends: debhelper (>= 9), ...@@ -9,6 +9,7 @@ Build-Depends: debhelper (>= 9),
libpgm-dev, libpgm-dev,
libsodium-dev, libsodium-dev,
libunwind-dev | libunwind8-dev | libunwind7-dev, libunwind-dev | libunwind8-dev | libunwind7-dev,
libnss3-dev,
pkg-config, pkg-config,
asciidoc-base | asciidoc, xmlto, asciidoc-base | asciidoc, xmlto,
Standards-Version: 3.9.8 Standards-Version: 3.9.8
...@@ -38,6 +39,7 @@ Depends: libzmq5 (= ${binary:Version}), ${misc:Depends}, ...@@ -38,6 +39,7 @@ Depends: libzmq5 (= ${binary:Version}), ${misc:Depends},
libpgm-dev, libpgm-dev,
libsodium-dev, libsodium-dev,
libunwind-dev | libunwind8-dev | libunwind7-dev, libunwind-dev | libunwind8-dev | libunwind7-dev,
libnss3-dev,
Conflicts: libzmq-dev, libzmq5-dev Conflicts: libzmq-dev, libzmq5-dev
Replaces: libzmq5-dev Replaces: libzmq5-dev
Provides: libzmq5-dev Provides: libzmq5-dev
......
...@@ -43,7 +43,7 @@ override_dh_clean: ...@@ -43,7 +43,7 @@ override_dh_clean:
rm -f config.log rm -f config.log
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- --with-pgm --with-libsodium --enable-drafts=$(DRAFTS) --with-libgssapi_krb5=yes --with-norm=yes dh_auto_configure -- --with-pgm --with-libsodium --enable-drafts=$(DRAFTS) --with-libgssapi_krb5=yes --with-norm=yes --with-nss=yes
override_dh_auto_test: override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
......
...@@ -6,7 +6,7 @@ Version: 4.3.3 ...@@ -6,7 +6,7 @@ Version: 4.3.3
Maintainer: libzmq Developers <zeromq-dev@lists.zeromq.org> Maintainer: libzmq Developers <zeromq-dev@lists.zeromq.org>
Homepage: http://www.zeromq.org/ Homepage: http://www.zeromq.org/
Standards-Version: 3.9.8 Standards-Version: 3.9.8
Build-Depends: debhelper (>= 9), dh-autoreconf, libkrb5-dev, libpgm-dev, libnorm-dev, libsodium-dev, libunwind-dev | libunwind8-dev | libunwind7-dev, pkg-config, asciidoc-base | asciidoc, xmlto Build-Depends: debhelper (>= 9), dh-autoreconf, libkrb5-dev, libpgm-dev, libnorm-dev, libsodium-dev, libunwind-dev | libunwind8-dev | libunwind7-dev, libnss3-dev, pkg-config, asciidoc-base | asciidoc, xmlto
Package-List: Package-List:
libzmq3-dev deb libdevel optional arch=any libzmq3-dev deb libdevel optional arch=any
libzmq5 deb libs optional arch=any libzmq5 deb libs optional arch=any
......
...@@ -45,6 +45,13 @@ BuildRequires: libsodium-devel ...@@ -45,6 +45,13 @@ BuildRequires: libsodium-devel
%else %else
%define SODIUM no %define SODIUM no
%endif %endif
%bcond_with nss
%if %{with nss}
BuildRequires: nss-devel
%define NSS yes
%else
%define NSS no
%endif
BuildRequires: gcc, make, gcc-c++, libstdc++-devel, asciidoc, xmlto BuildRequires: gcc, make, gcc-c++, libstdc++-devel, asciidoc, xmlto
Requires: libstdc++ Requires: libstdc++
...@@ -60,6 +67,7 @@ Requires: libstdc++ ...@@ -60,6 +67,7 @@ Requires: libstdc++
%{!?_with_libgssapi_krb5: %{!?_without_libgssapi_krb5: %define _without_libgssapi_krb5 --without-liblibgssapi_krb5}} %{!?_with_libgssapi_krb5: %{!?_without_libgssapi_krb5: %define _without_libgssapi_krb5 --without-liblibgssapi_krb5}}
%{!?_with_libsodium: %{!?_without_libsodium: %define _without_libsodium --without-libsodium}} %{!?_with_libsodium: %{!?_without_libsodium: %define _without_libsodium --without-libsodium}}
%{!?_with_pgm: %{!?_without_pgm: %define _without_pgm --without-pgm}} %{!?_with_pgm: %{!?_without_pgm: %define _without_pgm --without-pgm}}
%{!?_with_nss: %{!?_without_nss: %define _without_nss --without-nss}}
# It's an error if both --with and --without options are specified # It's an error if both --with and --without options are specified
%{?_with_libgssapi_krb5: %{?_without_libgssapi_krb5: %{error: both _with_libgssapi_krb5 and _without_libgssapi_krb5}}} %{?_with_libgssapi_krb5: %{?_without_libgssapi_krb5: %{error: both _with_libgssapi_krb5 and _without_libgssapi_krb5}}}
...@@ -75,6 +83,9 @@ Requires: libstdc++ ...@@ -75,6 +83,9 @@ Requires: libstdc++
%{?_with_pgm:BuildRequires: openpgm-devel} %{?_with_pgm:BuildRequires: openpgm-devel}
%{?_with_pgm:Requires: openpgm} %{?_with_pgm:Requires: openpgm}
%{?_with_nss:BuildRequires: nss-devel}
%{?_with_nss:Requires: nss}
%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64
%{!?_with_pic: %{!?_without_pic: %define _with_pic --with-pic}} %{!?_with_pic: %{!?_without_pic: %define _with_pic --with-pic}}
%{!?_with_gnu_ld: %{!?_without_gnu_ld: %define _with_gnu_ld --with-gnu_ld}} %{!?_with_gnu_ld: %{!?_without_gnu_ld: %define _with_gnu_ld --with-gnu_ld}}
...@@ -110,7 +121,6 @@ This package contains the ZeroMQ shared library. ...@@ -110,7 +121,6 @@ This package contains the ZeroMQ shared library.
Summary: Development files and static library for the ZeroMQ library Summary: Development files and static library for the ZeroMQ library
Group: Development/Libraries Group: Development/Libraries
Requires: %{lib_name} = %{version}-%{release}, pkgconfig Requires: %{lib_name} = %{version}-%{release}, pkgconfig
Requires: libsodium-devel
%bcond_with pgm %bcond_with pgm
%if %{with pgm} %if %{with pgm}
Requires: openpgm-devel Requires: openpgm-devel
...@@ -123,6 +133,10 @@ Requires: krb5-devel ...@@ -123,6 +133,10 @@ Requires: krb5-devel
%if %{with libsodium} %if %{with libsodium}
Requires: libsodium-devel Requires: libsodium-devel
%endif %endif
%bcond_with nss
%if %{with nss}
Requires: nss-devel
%endif
%description devel %description devel
The 0MQ lightweight messaging kernel is a library which extends the The 0MQ lightweight messaging kernel is a library which extends the
...@@ -164,6 +178,7 @@ autoreconf -fi ...@@ -164,6 +178,7 @@ autoreconf -fi
--with-pgm=%{PGM} \ --with-pgm=%{PGM} \
--with-libsodium=%{SODIUM} \ --with-libsodium=%{SODIUM} \
--with-libgssapi_krb5=%{GSSAPI} \ --with-libgssapi_krb5=%{GSSAPI} \
--with-nss=%{NSS} \
%{?_with_pic} \ %{?_with_pic} \
%{?_without_pic} \ %{?_without_pic} \
%{?_with_gnu_ld} \ %{?_with_gnu_ld} \
...@@ -216,6 +231,9 @@ autoreconf -fi ...@@ -216,6 +231,9 @@ autoreconf -fi
%{_bindir}/curve_keygen %{_bindir}/curve_keygen
%changelog %changelog
* Wed Sep 11 2019 Luca Boccassi <luca.boccassi@gmail.com>
- Add macro for optional NSS dependency
* Sat Aug 19 2017 Luca Boccassi <luca.boccassi@gmail.com> * Sat Aug 19 2017 Luca Boccassi <luca.boccassi@gmail.com>
- Fix parsing and usage of conditionals for sodium/pgm/krb5 so that they work - Fix parsing and usage of conditionals for sodium/pgm/krb5 so that they work
in OBS in OBS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment