From 147f735333b3bbb88a5c8c5d832c8a18b9755952 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 27 Jun 2016 14:21:54 -0700 Subject: [PATCH] More build fixes. --- linux-build-farm/centos-6/x64/Dockerfile | 11 +++++++---- linux-build-farm/centos-6/x86/Dockerfile | 8 ++++---- linux-build-farm/centos-7/x64/Dockerfile | 10 ++++++++++ linux-build-farm/centos-7/x86/Dockerfile | 17 +++++++++++++++++ zerotier-one.spec | 4 ++++ 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 linux-build-farm/centos-7/x64/Dockerfile create mode 100644 linux-build-farm/centos-7/x86/Dockerfile diff --git a/linux-build-farm/centos-6/x64/Dockerfile b/linux-build-farm/centos-6/x64/Dockerfile index 8ae110aa9..8599dc31e 100644 --- a/linux-build-farm/centos-6/x64/Dockerfile +++ b/linux-build-farm/centos-6/x64/Dockerfile @@ -5,10 +5,13 @@ RUN yum update -y RUN yum install -y epel-release RUN yum install -y make development-tools rpmdevtools http-parser-devel lz4-devel libnatpmp-devel -RUN yum install -y centos-release-scl -RUN yum install -y devtoolset-4-gcc-c++ +#RUN yum install -y centos-release-scl +#RUN yum install -y devtoolset-4-gcc-c++ -RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/gcc /usr/bin/gcc -RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/g++ /usr/bin/g++ +RUN yum install -y clang +RUN yum install -y gcc-c++ + +#RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/gcc /usr/bin/gcc +#RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/g++ /usr/bin/g++ ADD zt1-src.tar.gz / diff --git a/linux-build-farm/centos-6/x86/Dockerfile b/linux-build-farm/centos-6/x86/Dockerfile index 1e0da5704..c46320c5d 100644 --- a/linux-build-farm/centos-6/x86/Dockerfile +++ b/linux-build-farm/centos-6/x86/Dockerfile @@ -17,7 +17,7 @@ RUN yum install -y gcc-c++ ADD zt1-src.tar.gz / -RUN mv /ZeroTierOne/make-linux.mk /ZeroTierOne/make-linux.mk.old -RUN echo 'CFLAGS=-O3 -fstack-protector' >/ZeroTierOne/make-linux.mk -RUN echo 'CXXFLAGS=-O3 -fstack-protector' >>/ZeroTierOne/make-linux.mk -RUN cat /ZeroTierOne/make-linux.mk.old >>/ZeroTierOne/make-linux.mk +#RUN mv /ZeroTierOne/make-linux.mk /ZeroTierOne/make-linux.mk.old +#RUN echo 'CFLAGS=-O3 -fstack-protector' >/ZeroTierOne/make-linux.mk +#RUN echo 'CXXFLAGS=-O3 -fstack-protector' >>/ZeroTierOne/make-linux.mk +#RUN cat /ZeroTierOne/make-linux.mk.old >>/ZeroTierOne/make-linux.mk diff --git a/linux-build-farm/centos-7/x64/Dockerfile b/linux-build-farm/centos-7/x64/Dockerfile new file mode 100644 index 000000000..3b764d282 --- /dev/null +++ b/linux-build-farm/centos-7/x64/Dockerfile @@ -0,0 +1,10 @@ +FROM centos:7 +MAINTAINER Adam Ierymenko + +RUN yum update -y +RUN yum install -y epel-release +RUN yum install -y make development-tools rpmdevtools http-parser-devel lz4-devel libnatpmp-devel + +RUN yum install -y clang gcc-c++ + +ADD zt1-src.tar.gz / diff --git a/linux-build-farm/centos-7/x86/Dockerfile b/linux-build-farm/centos-7/x86/Dockerfile new file mode 100644 index 000000000..fe0744bc7 --- /dev/null +++ b/linux-build-farm/centos-7/x86/Dockerfile @@ -0,0 +1,17 @@ +#FROM zerotier/centos7-32bit +#MAINTAINER Adam Ierymenko + +#RUN echo 'i686-redhat-linux' >/etc/rpm/platform + +#RUN yum update -y +#RUN yum install -y make development-tools rpmdevtools http-parser-devel lz4-devel libnatpmp-devel + +#RUN yum install -y gcc-c++ +#RUN rpm --install --force https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm +#RUN rpm --install --force ftp://rpmfind.net/linux/centos/6.8/os/i386/Packages/libffi-3.0.5-3.2.el6.i686.rpm +#RUN yum install -y clang + +FROM zerotier/zt1-build-centos-7-x86-base +MAINTAINER Adam Ierymenko + +ADD zt1-src.tar.gz / diff --git a/zerotier-one.spec b/zerotier-one.spec index d35298b4a..d4405aab3 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -64,7 +64,11 @@ rm -f %{name}-%{version} cp -a %{getenv:PWD}/* . %build +%if 0%{?rhel} <= 7 make CFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" CXXFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one manpages selftest +%else +make CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one manpages selftest +%endif %install rm -rf $RPM_BUILD_ROOT