Skip to content

Commit

Permalink
Merge from upstream dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyesh Padmavilasom committed Jun 11, 2015
2 parents e57a3bb + f9a3d22 commit 05413b7
Show file tree
Hide file tree
Showing 71 changed files with 3,535 additions and 1,642 deletions.
82 changes: 53 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
# Copyright VMware, Inc 2015
#

SRCROOT := .
SRCROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
MAKEROOT=$(SRCROOT)/support/make

# do not build these targets as '%'
$(MAKEROOT)/makedefs.mk: ;
Makefile: ;

include $(MAKEROOT)/makedefs.mk

ifdef PHOTON_CACHE_PATH
Expand All @@ -18,66 +23,72 @@ else
PHOTON_SOURCES := sources
endif

ifdef PHOTON_PUBLISH_RPMS_PATH
PHOTON_PUBLISH_RPMS := publish-rpms-cached
else
PHOTON_PUBLISH_RPMS := publish-rpms
endif

.PHONY : all iso clean toolchain toolchain-minimal photon-build-machine photon-vagrant-build photon-vagrant-local \
check check-bison check-g++ check-gawk check-createrepo check-vagrant check-packer check-packer-ovf-plugin
check check-bison check-g++ check-gawk check-createrepo check-vagrant check-packer check-packer-ovf-plugin \
clean-install clean-chroot

all: iso

iso: check $(PHOTON_PACKAGES) $(PHOTON_TOOLCHAIN_MINIMAL)
iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES) $(PHOTON_TOOLCHAIN_MINIMAL)
@echo "Building Photon ISO..."
@cd $(PHOTON_INSTALLER_DIR) && \
$(PHOTON_INSTALLER) -i $(PHOTON_STAGE)/photon.iso \
-w $(PHOTON_STAGE)/photon_iso \
-t $(PHOTON_STAGE) \
-p $(PHOTON_INSTALLER_PACKAGE_LIST) \
-f > \
$(PHOTON_LOGS_DIR)/installer.log 2>&1

packages: check $(PHOTON_TOOLCHAIN_MINIMAL) $(PHOTON_SOURCES)
packages: check $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES)
@echo "Building all RPMS..."
@cd $(PHOTON_PKG_BUILDER_DIR) && \
$(PHOTON_PACKAGE_BUILDER) -a \
-b $(PHOTON_CHROOT_PATH) \
$(PHOTON_PACKAGE_BUILDER) -o full \
-s $(PHOTON_SPECS_DIR) \
-r $(PHOTON_RPMS_DIR) \
-o $(PHOTON_SRCS_DIR) \
-p $(PHOTON_STAGE) \
-l $(PHOTON_LOGS_DIR)
-x $(PHOTON_SRCS_DIR) \
-b $(PHOTON_STAGE) \
-l $(PHOTON_LOGS_DIR) \
-p $(PHOTON_PUBLISH_RPMS_DIR) \
-j $(PHOTON_PACKAGE_LIST)

packages-cached: check $(PHOTON_TOOLCHAIN_MINIMAL)
packages-cached:
@echo "Using cached RPMS..."
@$(RM) -f $(PHOTON_RPMS_DIR_NOARCH)/* && \
$(RM) -f $(PHOTON_RPMS_DIR_X86_64)/* && \
$(CP) -f $(PHOTON_CACHE_PATH)/RPMS/noarch/* $(PHOTON_RPMS_DIR_NOARCH)/ && \
$(CP) -f $(PHOTON_CACHE_PATH)/RPMS/x86_64/* $(PHOTON_RPMS_DIR_X86_64)/

package: check $(PHOTON_TOOLCHAIN_MINIMAL) $(PHOTON_SOURCES)
@if [ -z $(PKG_NAME) ]; then \
echo "Error: PKG_NAME is undefined"; \
exit 1; \
fi
@echo "Building package $(PKG_NAME) ..."
@cd $(PHOTON_PKG_BUILDER_DIR) && \
$(PHOTON_PACKAGE_BUILDER) -i \
-b $(PHOTON_CHROOT_PATH) \
-s $(PHOTON_SPECS_DIR) \
-r $(PHOTON_RPMS_DIR) \
-o $(PHOTON_SRCS_DIR) \
-p $(PHOTON_STAGE) \
-l $(PHOTON_LOGS_DIR) \
$(PKG_NAME)

sources:
@echo "Pulling sources from bintray..."
@cd $(PHOTON_PULL_SOURCES_DIR) && \
$(PHOTON_PULL_SOURCES) $(PHOTON_SRCS_DIR)
@$(MKDIR) -p $(PHOTON_SRCS_DIR) && \
cd $(PHOTON_PULL_SOURCES_DIR) && \
$(PHOTON_PULL_SOURCES) -c $(PHOTON_BINTRAY_CONFIG) $(PHOTON_SRCS_DIR)

sources-cached:
@echo "Using cached SOURCES..."
@$(MKDIR) -p $(PHOTON_SRCS_DIR) && \
$(CP) -rf $(PHOTON_SOURCES_PATH)/* $(PHOTON_SRCS_DIR)/

publish-rpms:
@echo "Pulling publish rpms from bintray..."
@cd $(PHOTON_PULL_PUBLISH_RPMS_DIR) && \
$(PHOTON_PULL_PUBLISH_RPMS) $(PHOTON_PUBLISH_RPMS_DIR)

publish-rpms-cached:
@echo "Using cached publish rpms..."
@$(MKDIR) -p $(PHOTON_PUBLISH_RPMS_DIR) && \
$(CP) -rf $(PHOTON_PUBLISH_RPMS_PATH)/* $(PHOTON_PUBLISH_RPMS_DIR)/

toolchain-minimal : $(PHOTON_TOOLCHAIN_MINIMAL)

$(PHOTON_TOOLCHAIN_MIN_LIST): ;

$(PHOTON_TOOLCHAIN_MINIMAL) : $(PHOTON_TOOLCHAIN) $(PHOTON_TOOLCHAIN_MIN_LIST)
echo "Building minimal toolchain..."
@$(RMDIR) $(PHOTON_TOOLS_DIR) && \
Expand Down Expand Up @@ -172,7 +183,6 @@ PACKER_ARGS="-only=$(VAGRANT_BUILD)"
endif

photon-vagrant-local: check-packer check-vagrant

@echo "Building a Photon Vagrant box with Packer..."
@if [ -e $(PHOTON_STAGE)/photon.iso ]; then \
cd $(PHOTON_PACKER_TEMPLATES) && \
Expand Down Expand Up @@ -217,3 +227,17 @@ endif

check-packer-ovf-plugin:
@[[ -e ~/.packer.d/plugins/packer-post-processor-vagrant-vmware-ovf ]] || { echo "Packer OVF post processor not installed. Aborting" >&2; exit 1; }

%: check $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES)
$(eval PKG_NAME = $@)
@echo "Building package $(PKG_NAME) ..."
@cd $(PHOTON_PKG_BUILDER_DIR) && \
$(PHOTON_PACKAGE_BUILDER) -i $(PKG_NAME)\
-b $(PHOTON_CHROOT_PATH) \
-s $(PHOTON_SPECS_DIR) \
-r $(PHOTON_RPMS_DIR) \
-x $(PHOTON_SRCS_DIR) \
-p $(PHOTON_PUBLISH_RPMS_DIR) \
-l $(PHOTON_LOGS_DIR)


41 changes: 41 additions & 0 deletions SPECS/ant-contrib/ant-contrib.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Summary: Ant contrib
Name: ant-contrib
Version: 1.0b3
Release: 0%{?dist}
License: Apache
URL: http://ant-contrib.sourceforget.net
Group: Applications/System
Vendor: VMware, Inc.
Distribution: Photon
BuildArch: noarch
Source0: http://dl.bintray.com/vmware/photon_release_1.0_TP1_x86_64/%{name}-%{version}-src.tar.gz
Requires: openjdk >= 1.8.0.45, apache-ant >= 1.9.4
BuildRequires: openjdk >= 1.8.0.45, apache-ant >= 1.9.4

%define _prefix /opt/ant-contrib

%description
The Ant Contrib project is a collection of tasks for Apache Ant.

%prep

%setup -n %{name}
%build
ANT_HOME=/opt/apache-ant-1.9.4
export JAVA_HOME=/opt/OpenJDK-1.8.0.45-bin
mkdir -p -m 700 %{_prefix}
$ANT_HOME/bin/ant -Ddist.dir="%{_prefix}" -Dproject.version="1.0b3" dist
%install
ANT_HOME=/opt/apache-ant-1.9.4
ANT_CONTRIB_DIST_DIR=%{buildroot}%{name}-%{version}
[ %{buildroot} != "/" ] && rm -rf %{buildroot}/*
mkdir -p -m 700 %{buildroot}/opt
cd %{buildroot}/opt && tar xvzf %{_prefix}/ant-contrib-1.0b3-bin.tar.gz --wildcards "*.jar"
%files
%defattr(-,root,root)
%{_prefix}/*.jar
%{_prefix}/lib/*.jar

%changelog
* Fri Jun 9 2015 Sriram Nambakam <[email protected]> 1.0b3.0-0
- Initial commit
39 changes: 39 additions & 0 deletions SPECS/asciidoc/asciidoc.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Summary: AsciiDoc is a human readable text document format
Name: asciidoc
Version: 8.6.9
Release: 1
License: GPLv2
URL: http://asciidoc.org/
Group: System Environment/Development
Vendor: VMware, Inc.
Distribution: Photon
Source0: http://sourceforge.net/projects/asciidoc/files/asciidoc/%{version}/%{name}-%{version}.tar.gz

%description
AsciiDoc is a human readable text document format that can be easily converted to other document formats.

%prep
%setup -q

%build
export CFLAGS="%{optflags}"
./configure --prefix=%{_prefix}

make %{?_smp_mflags}

%install
rm -rf %{buildroot}%{_infodir}
make DESTDIR=%{buildroot} install

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
/usr/bin/*
/usr/etc/*
/usr/share/man/*

%changelog
* Fri Jun 5 2015 Touseef Liaqat <[email protected]> 8.6.9-1
- Initial build. First version
13 changes: 10 additions & 3 deletions SPECS/autoconf/autoconf.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Summary: The package automatically configure source code
Name: autoconf
Version: 2.69
Release: 1%{?dist}
Release: 3%{?dist}
License: GPLv2
URL: http://www.gnu.org/software/autoconf
Group: System Environment/Base
Vendor: VMware, Inc.
Distribution: Photon
Source0: http://ftp.gnu.org/gnu/autoconf/%{name}-%{version}.tar.xz
Distribution: Photon
Source0: http://ftp.gnu.org/gnu/autoconf/%{name}-%{version}.tar.xz
Requires: perl
BuildRequires: m4
Requires: m4
%description
The package contains programs for producing shell scripts that can
automatically configure source code.
Expand All @@ -27,5 +30,9 @@ rm -rf %{buildroot}%{_infodir}
%{_mandir}/*/*
%{_datarootdir}/autoconf/*
%changelog
* Fri Jun 5 2015 Divya Thaluru <[email protected]> 2.69-3
- Adding m4 package to build and run time required package
* Wed Jun 3 2015 Divya Thaluru <[email protected]> 2.69-2
- Adding perl packages to required packages
* Wed Nov 5 2014 Divya Thaluru <[email protected]> 2.69-1
- Initial build. First version
9 changes: 6 additions & 3 deletions SPECS/automake/automake.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Summary: Programs for generating Makefiles
Name: automake
Version: 1.14.1
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
URL: http://www.gnu.org/software/automake/
Group: System Environment/Base
Vendor: VMware, Inc.
Distribution: Photon
Source0: http://ftp.gnu.org/gnu/automake/%{name}-%{version}.tar.xz
Distribution: Photon
Source0: http://ftp.gnu.org/gnu/automake/%{name}-%{version}.tar.xz
BuildRequires: autoconf
%description
Contains programs for generating Makefiles for use with Autoconf.
%prep
Expand All @@ -33,5 +34,7 @@ rm -rf %{buildroot}%{_infodir}
%{_defaultdocdir}/%{name}-%{version}/*
%{_mandir}/*/*
%changelog
* Wed Jun 3 2015 Divya Thaluru <[email protected]> 1.14.1-2
- Adding autoconf package to build time requires packages
* Wed Nov 5 2014 Divya Thaluru <[email protected]> 1.14.1-1
- Initial build. First version
8 changes: 7 additions & 1 deletion SPECS/bison/bison.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
Summary: Contains a parser generator
Name: bison
Version: 3.0.2
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/bison
Group: System Environment/Base
Vendor: VMware, Inc.
Distribution: Photon
Source0: http://ftp.gnu.org/gnu/bison/%{name}-%{version}.tar.xz
BuildRequires: m4
Requires: m4
BuildRequires: flex
Requires: flex
%description
This package contains a parser generator
%prep
Expand Down Expand Up @@ -69,5 +73,7 @@ make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
%lang(zh_TW) %{_datarootdir}/locale/zh_TW/LC_MESSAGES/bison-runtime.mo
%{_mandir}/*/*
%changelog
* Fri Jun 5 2015 Divya Thaluru <[email protected]> 3.0.2-2
- Adding m4, flex package to build and run time required package
* Wed Nov 5 2014 Divya Thaluru <[email protected]> 3.0.2-1
- Initial build. First version.
9 changes: 6 additions & 3 deletions SPECS/bzip2/bzip2.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: Contains programs for compressing and decompressing files
Name: bzip2
Version: 1.0.6
Release: 2%{?dist}
Release: 3%{?dist}
License: BSD
URL: http://www.bzip.org/
Group: System Environment/Base
Expand All @@ -15,6 +15,7 @@ decompressing files. Compressing text files with bzip2 yields a much better
compression percentage than with the traditional gzip.
%package devel
Summary: Header and development files for bzip2
Requires: bzip2
%description devel
It contains the libraries and header files to create applications
%prep
Expand Down Expand Up @@ -72,7 +73,9 @@ make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
%files devel
%{_includedir}/bzlib.h
%changelog
* Mon May 18 2015 Touseef Liaqat <[email protected]> 1.0.6-2
- Update according to UsrMove.
* Fri Jun 5 2015 Divya Thaluru <[email protected]> 1.0.6-3
- Adding bzip2 package run time required package for bzip2-devel package
* Mon May 18 2015 Touseef Liaqat <[email protected]> 1.0.6-2
- Update according to UsrMove.
* Wed Nov 5 2014 Divya Thaluru <[email protected]> 1.0.6-1
- Initial build. First version
9 changes: 6 additions & 3 deletions SPECS/diffutils/diffutils.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Summary: Programs that show the differences between files or directories
Name: diffutils
Version: 3.3
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/diffutils
Group: System Environment/Base
Vendor: VMware, Inc.
Distribution: Photon
Source0: http://ftp.gnu.org/gnu/diffutils/%{name}-%{version}.tar.xz
Distribution: Photon
Source0: http://ftp.gnu.org/gnu/diffutils/%{name}-%{version}.tar.xz
BuildRequires: coreutils
%description
The Diffutils package contains programs that show the
differences between files or directories.
Expand All @@ -30,5 +31,7 @@ make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
%{_bindir}/*
%{_mandir}/*/*
%changelog
* Wed Jun 3 2015 Divya Thaluru <[email protected]> 3.3-2
- Adding coreutils package to build requires
* Wed Nov 5 2014 Divya Thaluru <[email protected]> 3.3-1
- Initial build. First version
6 changes: 6 additions & 0 deletions SPECS/docker/docker.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ install -vd %{buildroot}/lib/systemd/system
cat > %{buildroot}/lib/systemd/system/docker.service <<- "EOF"
[Unit]
Description=Docker Daemon
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/bin/docker -d -s overlay
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity

[Install]
WantedBy=multi-user.target
Expand Down
Loading

0 comments on commit 05413b7

Please sign in to comment.