Repository: aurora-packaging Updated Branches: refs/heads/master 72e262bc2 -> d5d41691c
Remove some dependencies linked to docker usage An operator should be able to build Aurora on his platform without relying on Docker. Even if this is an interesting way of doing it, it sometimes introduce missed (build-)dependencies (in this case openssl) and context-specific behaviour (here, the way pants.ini was added to the build context) Testing Done: Able to build on CentOS 6 using mock. Able to build on Debian. Limitation = need the patched version of Gradle. Still able to build using the current Docker build system Bugs closed: AURORA-1568 Reviewed at https://reviews.apache.org/r/45298/ Project: http://git-wip-us.apache.org/repos/asf/aurora-packaging/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora-packaging/commit/d5d41691 Tree: http://git-wip-us.apache.org/repos/asf/aurora-packaging/tree/d5d41691 Diff: http://git-wip-us.apache.org/repos/asf/aurora-packaging/diff/d5d41691 Branch: refs/heads/master Commit: d5d41691c476fdfe32a595efcd53fc3a007d4d9e Parents: 72e262b Author: Pierre Cheynier <[email protected]> Authored: Wed Apr 20 15:39:21 2016 -0600 Committer: John Sirois <[email protected]> Committed: Wed Apr 20 15:39:21 2016 -0600 ---------------------------------------------------------------------- builder/deb/debian-jessie/Dockerfile | 1 - builder/deb/debian-jessie/pants.ini | 5 ----- builder/deb/ubuntu-trusty/Dockerfile | 1 - builder/deb/ubuntu-trusty/pants.ini | 5 ----- builder/rpm/centos-7/Dockerfile | 1 - builder/rpm/centos-7/pants.ini | 5 ----- specs/debian/aurora-pants.ini | 5 +++++ specs/debian/control | 1 + specs/debian/rules | 2 +- specs/rpm/Makefile | 6 ++++-- specs/rpm/SOURCES/aurora-pants.ini | 5 +++++ specs/rpm/aurora.spec | 15 +++++++++++---- 12 files changed, 27 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/builder/deb/debian-jessie/Dockerfile ---------------------------------------------------------------------- diff --git a/builder/deb/debian-jessie/Dockerfile b/builder/deb/debian-jessie/Dockerfile index fd15dfe..50b5081 100644 --- a/builder/deb/debian-jessie/Dockerfile +++ b/builder/deb/debian-jessie/Dockerfile @@ -45,4 +45,3 @@ RUN git clone --depth 1 https://github.com/benley/gradle-packaging \ && cd .. && rm -rf gradle-packaging ADD build.sh /build.sh -ADD pants.ini /pants.ini http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/builder/deb/debian-jessie/pants.ini ---------------------------------------------------------------------- diff --git a/builder/deb/debian-jessie/pants.ini b/builder/deb/debian-jessie/pants.ini deleted file mode 100644 index 446ea8d..0000000 --- a/builder/deb/debian-jessie/pants.ini +++ /dev/null @@ -1,5 +0,0 @@ -[GLOBAL] -print_exception_stacktrace: True - -[python-repos] -repos: ['third_party/', 'https://svn.apache.org/repos/asf/incubator/aurora/3rdparty/ubuntu/trusty64/python/'] http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/builder/deb/ubuntu-trusty/Dockerfile ---------------------------------------------------------------------- diff --git a/builder/deb/ubuntu-trusty/Dockerfile b/builder/deb/ubuntu-trusty/Dockerfile index a4a9e64..21617e7 100644 --- a/builder/deb/ubuntu-trusty/Dockerfile +++ b/builder/deb/ubuntu-trusty/Dockerfile @@ -49,4 +49,3 @@ RUN git clone --depth 1 https://github.com/benley/gradle-packaging \ && cd .. && rm -rf gradle-packaging ADD build.sh /build.sh -ADD pants.ini /pants.ini http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/builder/deb/ubuntu-trusty/pants.ini ---------------------------------------------------------------------- diff --git a/builder/deb/ubuntu-trusty/pants.ini b/builder/deb/ubuntu-trusty/pants.ini deleted file mode 100644 index 446ea8d..0000000 --- a/builder/deb/ubuntu-trusty/pants.ini +++ /dev/null @@ -1,5 +0,0 @@ -[GLOBAL] -print_exception_stacktrace: True - -[python-repos] -repos: ['third_party/', 'https://svn.apache.org/repos/asf/incubator/aurora/3rdparty/ubuntu/trusty64/python/'] http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/builder/rpm/centos-7/Dockerfile ---------------------------------------------------------------------- diff --git a/builder/rpm/centos-7/Dockerfile b/builder/rpm/centos-7/Dockerfile index a4d9dfc..3431860 100644 --- a/builder/rpm/centos-7/Dockerfile +++ b/builder/rpm/centos-7/Dockerfile @@ -38,4 +38,3 @@ RUN yum install -y \ zlib-devel ADD build.sh /build.sh -ADD pants.ini /pants.ini http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/builder/rpm/centos-7/pants.ini ---------------------------------------------------------------------- diff --git a/builder/rpm/centos-7/pants.ini b/builder/rpm/centos-7/pants.ini deleted file mode 100644 index 3c994e8..0000000 --- a/builder/rpm/centos-7/pants.ini +++ /dev/null @@ -1,5 +0,0 @@ -[GLOBAL] -print_exception_stacktrace: True - -[python-repos] -repos: ['third_party/', 'https://svn.apache.org/repos/asf/incubator/aurora/3rdparty/centos/7/python/'] http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/specs/debian/aurora-pants.ini ---------------------------------------------------------------------- diff --git a/specs/debian/aurora-pants.ini b/specs/debian/aurora-pants.ini new file mode 100644 index 0000000..446ea8d --- /dev/null +++ b/specs/debian/aurora-pants.ini @@ -0,0 +1,5 @@ +[GLOBAL] +print_exception_stacktrace: True + +[python-repos] +repos: ['third_party/', 'https://svn.apache.org/repos/asf/incubator/aurora/3rdparty/ubuntu/trusty64/python/'] http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/specs/debian/control ---------------------------------------------------------------------- diff --git a/specs/debian/control b/specs/debian/control index 9dd927d..23afb2b 100644 --- a/specs/debian/control +++ b/specs/debian/control @@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 9), python-all-dev, libkrb5-dev, curl, + openssl, git, wget, thrift-compiler (>= 0.9.1) http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/specs/debian/rules ---------------------------------------------------------------------- diff --git a/specs/debian/rules b/specs/debian/rules index 974fddf..fc74d1c 100755 --- a/specs/debian/rules +++ b/specs/debian/rules @@ -21,7 +21,7 @@ gradle = $(shell which gradle) pants = $(CURDIR)/pants -PANTS_CONFIG_OVERRIDE = ['/pants.ini'] +PANTS_CONFIG_OVERRIDE = ["$(CURDIR)/debian/aurora-pants.ini"] export PANTS_CONFIG_OVERRIDE override_dh_auto_build: __gradle_build __pants_build http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/specs/rpm/Makefile ---------------------------------------------------------------------- diff --git a/specs/rpm/Makefile b/specs/rpm/Makefile index 0476bcb..a939465 100644 --- a/specs/rpm/Makefile +++ b/specs/rpm/Makefile @@ -18,10 +18,10 @@ RPM_TOPDIR ?= $(DIST_DIR) DATETIME ?= $(shell date +%Y%m%d%H%M) -AURORA_VERSION ?= $(shell cat $(TOPDIR)/.auroraversion | tr '-' '.') MESOS_VERSION ?= $(shell tr -d "'\" \t" < $(TOPDIR)/3rdparty/python/BUILD | sed -n 's/MESOS_REV=\(.*\)/\1/p' ) -SOURCE_TARGET ?= $(RPM_TOPDIR)/rpmbuild/SOURCES/$(AURORA_VERSION).tar.gz +AURORA_INTERNAL_VERSION ?= $(shell cat $(TOPDIR)/.auroraversion) +SOURCE_TARGET ?= $(RPM_TOPDIR)/rpmbuild/SOURCES/apache-aurora-$(AURORA_VERSION).tar.gz PHONY: all nightly_version release_version get_source_target clean mkdir srpm nightly_srpm nightly_rpm release_srpm release_rpm tar_source @@ -55,6 +55,7 @@ srpm: mkdir --define "_specdir %(pwd)" \ --define "_sourcedir %{_topdir}/rpmbuild/SOURCES" \ --define "AURORA_VERSION $(AURORA_VERSION)" \ + --define "AURORA_INTERNAL_VERSION $(AURORA_INTERNAL_VERSION)" \ --define "MESOS_VERSION $(MESOS_VERSION)" \ --nodeps -bs aurora.spec @@ -68,6 +69,7 @@ rpm: mkdir --define "_specdir %(pwd)" \ --define "_sourcedir %{_topdir}/rpmbuild/SOURCES" \ --define "AURORA_VERSION $(AURORA_VERSION)" \ + --define "AURORA_INTERNAL_VERSION $(AURORA_INTERNAL_VERSION)" \ --define "MESOS_VERSION $(MESOS_VERSION)" \ -ba aurora.spec http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/specs/rpm/SOURCES/aurora-pants.ini ---------------------------------------------------------------------- diff --git a/specs/rpm/SOURCES/aurora-pants.ini b/specs/rpm/SOURCES/aurora-pants.ini new file mode 100644 index 0000000..3c994e8 --- /dev/null +++ b/specs/rpm/SOURCES/aurora-pants.ini @@ -0,0 +1,5 @@ +[GLOBAL] +print_exception_stacktrace: True + +[python-repos] +repos: ['third_party/', 'https://svn.apache.org/repos/asf/incubator/aurora/3rdparty/centos/7/python/'] http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/d5d41691/specs/rpm/aurora.spec ---------------------------------------------------------------------- diff --git a/specs/rpm/aurora.spec b/specs/rpm/aurora.spec index fa89242..d400706 100644 --- a/specs/rpm/aurora.spec +++ b/specs/rpm/aurora.spec @@ -17,6 +17,10 @@ %global AURORA_VERSION 0.9.0 %endif +%if %{?!AURORA_INTERNAL_VERSION:1}0 +%global AURORA_INTERNAL_VERSION %{AURORA_VERSION} +%endif + %if %{?!AURORA_USER:1}0 %global AURORA_USER aurora %endif @@ -58,7 +62,7 @@ Group: Applications/System License: ASL 2.0 URL: https://aurora.apache.org/ -Source0: https://github.com/apache/aurora/archive/rel/%{version}.tar.gz +Source0: http://www.apache.org/dyn/closer.cgi?action=download&filename=aurora/%{version}/apache-aurora-%{version}.tar.gz#/apache-aurora-%{version}.tar.gz Source1: aurora.service Source2: thermos-observer.service Source3: aurora.init.sh @@ -70,6 +74,7 @@ Source8: thermos-observer.sysconfig Source9: aurora.logrotate Source10: thermos-observer.logrotate Source11: clusters.json +Source12: aurora-pants.ini BuildRequires: apr-devel BuildRequires: cyrus-sasl-devel @@ -79,6 +84,7 @@ BuildRequires: git BuildRequires: java-%{JAVA_VERSION}-openjdk-devel BuildRequires: krb5-devel BuildRequires: libcurl-devel +BuildRequires: openssl BuildRequires: patch %if 0%{?rhel} && 0%{?rhel} < 7 BuildRequires: python27 @@ -141,8 +147,7 @@ state of all running tasks. %prep -%setup -n apache-aurora-%{version} - +%setup -n apache-aurora-%{AURORA_INTERNAL_VERSION} %build # Preferences SCL-installed Python 2.7 if we're building on EL6. @@ -168,7 +173,9 @@ unzip gradle-%{GRADLE_VERSION}-bin.zip # Configures pants to use our distributed platform-specific eggs. # This avoids building mesos to produce them. -export PANTS_CONFIG_OVERRIDE="['/pants.ini']" +%{__mkdir_p} %{buildroot} +%{__cp} %{SOURCE12} %{buildroot} +export PANTS_CONFIG_OVERRIDE="['%{buildroot}/aurora-pants.ini']" # Builds Aurora client PEX binaries. ./pants binary src/main/python/apache/aurora/kerberos:kaurora
