Browse code

Merge branch 'master' of https://github.com/vmware/photon

archive authored on 2018/11/09 23:30:11
Showing 46 changed files
... ...
@@ -493,7 +493,7 @@ check-docker-service:
493 493
 	@docker ps >/dev/null 2>&1 || { echo "Docker service is not running. Aborting." >&2; exit 1; }
494 494
 
495 495
 check-docker-py:
496
-	@python3 -c "import docker; assert docker.__version__ == '$(PHOTON_DOCKER_PY_VER)'" >/dev/null 2>&1 || { echo "Error: Python3 package docker-py3 2.3.0 not installed.\nPlease use: pip3 install docker==2.3.0" >&2; exit 1; }
496
+	@python3 -c "import docker; assert docker.__version__ >= '$(PHOTON_DOCKER_PY_VER)'" >/dev/null 2>&1 || { echo "Error: Python3 package docker-py3 $(PHOTON_DOCKER_PY_VER) not installed.\nPlease use: pip3 install docker==$(PHOTON_DOCKER_PY_VER)" >&2; exit 1; }
497 497
 
498 498
 check-bison:
499 499
 	@command -v bison >/dev/null 2>&1 || { echo "Package bison not installed. Aborting." >&2; exit 1; }
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Apache Maven
2 2
 Name:		apache-maven
3 3
 Version:	3.5.4
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	Apache License 2.0
6 6
 URL:		http://maven.apache.org
7 7
 Group:		Applications/System
... ...
@@ -15,6 +15,7 @@ BuildRequires: apache-ant
15 15
 BuildRequires: wget >= 1.15
16 16
 Requires: openjre8
17 17
 Requires: /usr/bin/which
18
+%define ExtraBuildRequires apache-maven
18 19
 
19 20
 %define _prefix /var/opt/%{name}
20 21
 %define _bindir %{_prefix}/bin
... ...
@@ -76,6 +77,8 @@ done
76 76
 %exclude %{_libdir}/jansi-native
77 77
 
78 78
 %changelog
79
+*   Mon Oct 29 2018 Alexey Makhalov <amakhalov@vmware.com> 3.5.4-2
80
+-   Use ExtraBuildRequires
79 81
 *   Tue Sep 18 2018 Ankit Jain <ankitja@vmware.com> 3.5.4-1
80 82
 -   Updated apache-maven to version 3.5.4
81 83
 *   Fri Oct 13 2017 Alexey Makhalov <amakhalov@vmware.com> 3.5.0-5
... ...
@@ -103,18 +106,18 @@ done
103 103
 *   Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 3.3.9-3
104 104
 -   Updated JAVA_HOME path to point to latest JDK.
105 105
 *   Tue Mar 01 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.3.9-2
106
--   Updated the apache-ant version to 1.9.6 
106
+-   Updated the apache-ant version to 1.9.6
107 107
 *   Fri Feb 26 2016 Kumar Kaushik <kaushikk@vmware.com> 3.3.9-2
108 108
 -   Updated JAVA_HOME path to point to latest JDK.
109 109
 *   Thu Jan 21 2016 Xiaolin Li <xiaolinl@vmware.com> 3.3.9-1
110 110
 -   Updated to version 3.3.9
111 111
 *   Tue Jan 5 2016 Xiaolin Li <xiaolinl@vmware.com> 3.3.3-4
112
--   Increase build timeout from 600000 to 1200000 
112
+-   Increase build timeout from 600000 to 1200000
113 113
 *   Mon Nov 16 2015 Sharath George <sharathg@vmware.com> 3.3.3-3
114 114
 -   Change path to /var/opt.
115 115
 *   Wed Sep 16 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.3.3-2
116 116
 -   Updated dependencies after repackaging openjdk.
117 117
 *   Thu Jul 9 2015 	Sarah Choi<sarahc@vmware.com> 3.3.3-1
118
--   Add a script to set environment variables for MAVEN 
118
+-   Add a script to set environment variables for MAVEN
119 119
 *   Fri May 22 2015 Sriram Nambakam <snambakam@vmware.com> 1.9.4
120 120
 -   Initial build.	First version
... ...
@@ -1,29 +1,16 @@
1 1
 Summary:        Bourne-Again SHell
2 2
 Name:           bash
3
-Version:        4.4.12
4
-Release:        3%{?dist}
3
+Version:        4.4.18
4
+Release:        1%{?dist}
5 5
 License:        GPLv3
6 6
 URL:            http://www.gnu.org/software/bash/
7 7
 Group:          System Environment/Base
8 8
 Vendor:         VMware, Inc.
9 9
 Distribution:   Photon
10
-Source0:        http://ftp.gnu.org/gnu/bash/%{name}-4.4.tar.gz
11
-%define sha1    bash=8de012df1e4f3e91f571c3eb8ec45b43d7c747eb
10
+Source0:        http://ftp.gnu.org/gnu/bash/%{name}-%{version}.tar.gz
11
+%define sha1    bash=6cf9b3c23930ba8a721fee177d1558e5b7cb6104
12 12
 Source1:        bash_completion
13 13
 Patch0:         bash-4.4.patch
14
-#Upstream patches
15
-Patch001:       bash44-001
16
-Patch002:       bash44-002
17
-Patch003:       bash44-003
18
-Patch004:       bash44-004
19
-Patch005:       bash44-005
20
-Patch006:       bash44-006
21
-Patch007:       bash44-007
22
-Patch008:       bash44-008
23
-Patch009:       bash44-009
24
-Patch010:       bash44-010
25
-Patch011:       bash44-011
26
-Patch012:       bash44-012
27 14
 Provides:       /bin/sh
28 15
 Provides:       /bin/bash
29 16
 BuildRequires:  readline
... ...
@@ -49,28 +36,15 @@ Requires: bash >= 4.4
49 49
 These are the additional language files of bash.
50 50
 
51 51
 %prep
52
-%setup -q -n bash-4.4
52
+%setup -q -n bash-4.4.18
53 53
 %patch0 -p1
54
-%patch001 -p0
55
-%patch002 -p0
56
-%patch003 -p0
57
-%patch004 -p0
58
-%patch005 -p0
59
-%patch006 -p0
60
-%patch007 -p0
61
-%patch008 -p0
62
-%patch009 -p0
63
-%patch010 -p0
64
-%patch011 -p0
65
-%patch012 -p0
66 54
 %build
67
-./configure \
55
+%configure \
68 56
     "CFLAGS=-fPIC" \
69
-    --prefix=%{_prefix} \
70 57
     --bindir=/bin \
71 58
     --htmldir=%{_defaultdocdir}/%{name}-%{version} \
72 59
     --without-bash-malloc \
73
-    --with-installed-readline 
60
+    --with-installed-readline
74 61
 make %{?_smp_mflags}
75 62
 %install
76 63
 make DESTDIR=%{buildroot} install
... ...
@@ -348,6 +322,8 @@ fi
348 348
 %defattr(-,root,root)
349 349
 
350 350
 %changelog
351
+*   Mon Sep 24 2018 Sujay G <gsujay@vmware.com> 4.4.18-1
352
+-   Bump bash version to 4.4.18
351 353
 *   Fri Jan 26 2018 Alexey Makhalov <amakhalov@vmware.com> 4.4.12-3
352 354
 -   Run bash_completion only for bash interactive shell
353 355
 *   Mon Dec 11 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.4.12-2
... ...
@@ -1,15 +1,25 @@
1 1
 Summary:        Microsoft .NET Core Runtime
2 2
 Name:           dotnet-runtime
3
-Version:        2.0.5
3
+Version:        2.1.4
4 4
 Release:        1%{?dist}
5 5
 Vendor:         VMware, Inc.
6 6
 Distribution:   Photon
7 7
 License:        MIT
8 8
 Url:            https://github.com/dotnet/core
9 9
 Group:          Development/Tools
10
-Source0:        https://download.microsoft.com/download/1/1/0/11046135-4207-40D3-A795-13ECEA741B32/dotnet-runtime-2.0.5-linux-x64.tar.gz
11
-%define sha1    dotnet-runtime=631b1f4a4c07a4488e846fc2142ce74c1b8b84a8
10
+
11
+%ifarch x86_64
12
+Source0:        https://download.microsoft.com/download/A/7/8/A78F1D25-8D5C-4411-B544-C7D527296D5E/dotnet-runtime-2.1.4-linux-x64.tar.gz
13
+%define sha1    dotnet-runtime=f92a51b5e15e0d9f48bde76519de911bd86880a0
12 14
 BuildArch:      x86_64
15
+%endif
16
+
17
+%ifarch aarch64
18
+Source0:        https://download.microsoft.com/download/A/7/8/A78F1D25-8D5C-4411-B544-C7D527296D5E/dotnet-runtime-2.1.4-linux-arm64.tar.gz
19
+%define sha1    dotnet-runtime=0470e1ed3ab4cb3e3321f6dd11f9dc7abac171d6
20
+BuildArch:      aarch64
21
+%endif
22
+
13 23
 Requires:       curl libunwind krb5 lttng-ust
14 24
 
15 25
 %description
... ...
@@ -66,5 +76,8 @@ ln -sf %{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/dotnet
66 66
     %{_libdir}/*
67 67
 
68 68
 %changelog
69
+*   Thu Sep 27 2018 Ajay Kaher <akaher@vmware.com> 2.1.4-1
70
+-   upgraded to version 2.1.4
71
+-   add aarch64 support
69 72
 *   Wed Jan 31 2018 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.0.5-1
70 73
 -   Initial build for photon
... ...
@@ -1,22 +1,20 @@
1 1
 Summary:	OpenPGP standard implementation used for encrypted communication and data storage.
2 2
 Name:		gnupg
3
-Version:	2.1.20
4
-Release:	3%{?dist}
3
+Version:	2.2.10
4
+Release:	1%{?dist}
5 5
 License:	GPLv3+
6 6
 URL:		https://gnupg.org/index.html
7 7
 Group:		Applications/Cryptography.
8 8
 Source0:        https://gnupg.org/ftp/gcrypt/gnupg/%{name}-%{version}.tar.bz2
9
-%define sha1 gnupg=500ddae8e4225ae2e300934090f9b9a427b8def1
9
+%define sha1 gnupg=3e87504e2ca317718aa9b6299947ebf7e906b54e
10 10
 Vendor:		VMware, Inc.
11 11
 Distribution:	Photon
12 12
 BuildRequires:	zlib-devel
13 13
 BuildRequires:  bzip2-devel
14 14
 BuildRequires:  readline-devel
15
-BuildRequires:  npth
16 15
 BuildRequires:  npth-devel
17 16
 BuildRequires:  libassuan
18 17
 BuildRequires:  libksba >= 1.0.7
19
-BuildRequires:  libgcrypt >= 1.7.0
20 18
 BuildRequires:  libgcrypt-devel
21 19
 BuildRequires:  libgpg-error >= 1.24
22 20
 Requires:       libksba
... ...
@@ -30,22 +28,23 @@ Provides:       gpg
30 30
 %description
31 31
 GnuPG is a complete and free implementation of the OpenPGP standard as defined
32 32
 by RFC4880 (also known as PGP). GnuPG allows to encrypt and sign your data and
33
-communication, features a versatile key management system as well as access 
34
-modules for all kinds of public key directories. GnuPG, also known as GPG, is 
33
+communication, features a versatile key management system as well as access
34
+modules for all kinds of public key directories. GnuPG, also known as GPG, is
35 35
 a command line tool with features for easy integration with other applications.
36 36
 
37 37
 %prep
38 38
 %setup -q -n %{name}-%{version}
39 39
 
40 40
 %build
41
-./configure --prefix=%{_prefix}      \
42
-            --sysconfdir=%{_sysconfdir} \
43
-            --with-libusb=no
41
+%configure
42
+make %{?_smp_mflags}
44 43
 
45
-make
46 44
 %install
47 45
 make DESTDIR=%{buildroot} install
48 46
 
47
+%check
48
+make %{?_smp_mflags} check
49
+
49 50
 %files
50 51
 %defattr(-,root,root)
51 52
 %{_bindir}/*
... ...
@@ -59,6 +58,8 @@ make DESTDIR=%{buildroot} install
59 59
 %exclude /usr/share/doc/*
60 60
 
61 61
 %changelog
62
+*   Sat Oct 20 2018 Ankit Jain <ankitja@vmware.com> 2.2.10-1
63
+-   Update to 2.2.10
62 64
 *   Wed Aug 30 2017 Alexey Makhalov <amakhalov@vmware.com> 2.1.20-3
63 65
 -   Add requires libgcrypt
64 66
 *   Wed Jun 07 2017 Danut Moraru <dmoraru@vmware.com> 2.1.20-2
... ...
@@ -13,7 +13,7 @@
13 13
 Summary:        Go
14 14
 Name:           go
15 15
 Version:        1.10.4
16
-Release:        1%{?dist}
16
+Release:        2%{?dist}
17 17
 License:        BSD
18 18
 URL:            https://golang.org
19 19
 Group:          System Environment/Security
... ...
@@ -22,6 +22,7 @@ Distribution:   Photon
22 22
 Source0:        https://dl.google.com/go/%{name}%{version}.src.tar.gz
23 23
 %define sha1    go=adcd9d0bbbc764fa4ff20c08eb4a5a527fa95d96
24 24
 Requires:       glibc
25
+%define ExtraBuildRequires go
25 26
 
26 27
 %description
27 28
 Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
... ...
@@ -109,5 +110,7 @@ rm -rf %{buildroot}/*
109 109
 %{_bindir}/*
110 110
 
111 111
 %changelog
112
+*   Mon Oct 29 2018 Alexey Makhalov <amakhalov@vmware.com> 1.10.4-2
113
+-   Use ExtraBuildRequires
112 114
 *   Mon Sep 24 2018 Tapas Kundu <tkundu@vmware.com> 1.10.4-1
113 115
 -   Initial build for 1.10.4
... ...
@@ -14,7 +14,7 @@
14 14
 Summary:        Go
15 15
 Name:           go
16 16
 Version:        1.9.4
17
-Release:        2%{?dist}
17
+Release:        3%{?dist}
18 18
 License:        BSD
19 19
 URL:            https://golang.org
20 20
 Group:          System Environment/Security
... ...
@@ -25,6 +25,8 @@ Source0:        https://dl.google.com/go/%{name}%{version}.src.tar.gz
25 25
 Patch0:         go_imports_fix.patch
26 26
 Patch1:         CVE-2018-7187.patch
27 27
 Requires:       glibc
28
+# to avoid cyclic dependency use prebuilt publish go rpm
29
+%define ExtraBuildRequires go
28 30
 
29 31
 %description
30 32
 Go is an open source programming language that makes it easy to build simple, reliable, and efficient software
... ...
@@ -114,6 +116,8 @@ rm -rf %{buildroot}/*
114 114
 %{_bindir}/*
115 115
 
116 116
 %changelog
117
+*   Wed Oct 24 2018 Alexey Makhalov <amakhalov@vmware.com> 1.9.4-3
118
+-   Use extra build requires
117 119
 *   Mon Apr 02 2018 Dheeraj Shetty <dheerajs@vmware.com> 1.9.4-2
118 120
 -   Fix for CVE-2018-7187
119 121
 *   Thu Mar 15 2018 Xiaolin Li <xiaolinl@vmware.com> 1.9.4-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	High-Level Crypto API
2 2
 Name:		gpgme
3 3
 Version:	1.11.1
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	GPLv2+
6 6
 URL:		https://www.gnupg.org/(it)/related_software/gpgme/index.html
7 7
 Group:		System Environment/Security
... ...
@@ -18,7 +18,7 @@ BuildRequires:	libgpg-error-devel >= 1.32
18 18
 BuildRequires:	libassuan >= 2.2.0
19 19
 
20 20
 %description
21
-The GPGME package is a C language library that allows to add support for cryptography to a program. It is designed to make access to public key crypto engines like GnuPG or GpgSM easier for applications. GPGME provides a high-level crypto API for encryption, decryption, signing, signature verification and key management.  
21
+The GPGME package is a C language library that allows to add support for cryptography to a program. It is designed to make access to public key crypto engines like GnuPG or GpgSM easier for applications. GPGME provides a high-level crypto API for encryption, decryption, signing, signature verification and key management.
22 22
 
23 23
 %package 	devel
24 24
 Group:          Development/Libraries
... ...
@@ -33,10 +33,8 @@ Static libraries and header files from GPGME, GnuPG Made Easy.
33 33
 %setup -q
34 34
 
35 35
 %build
36
-sed -i 's/GPG = gpg/GPG = gpg2/g' tests/gpg/Makefile.am
37 36
 ./autogen.sh
38
-./configure \
39
-	--prefix=%{_prefix} \
37
+%configure \
40 38
  	--disable-fd-passing \
41 39
 	--disable-static \
42 40
 	--enable-languages=cl \
... ...
@@ -55,7 +53,7 @@ cd tests && make check-TESTS
55 55
 
56 56
 %postun	-p /sbin/ldconfig
57 57
 
58
-%files 
58
+%files
59 59
 %defattr(-,root,root)
60 60
 %{_libdir}/*.so.*
61 61
 
... ...
@@ -68,6 +66,8 @@ cd tests && make check-TESTS
68 68
 %{_datadir}/common-lisp/source/gpgme/*
69 69
 
70 70
 %changelog
71
+*   Sat Oct 20 2018 Ankit Jain <ankitja@vmware.com> 1.11.1-2
72
+-   Removed gpg2, gnupg-2.2.10 doesn't provide gpg2
71 73
 *   Tue Sep 11 2018 Anish Swaminathan <anishs@vmware.com> 1.11.1-1
72 74
 -   Update version to 1.11.1
73 75
 *   Wed Aug 30 2017 Alexey Makhalov <amakhalov@vmware.com> 1.9.0-3
74 76
deleted file mode 100644
... ...
@@ -1,49 +0,0 @@
1
-Summary:        This library exports a gssapi interface
2
-Name:           libgssglue
3
-Version:        0.4
4
-Release:        2%{?dist}
5
-License:        BSD
6
-URL:            http://www.citi.umich.edu/projects/nfsv4/linux/
7
-Group:          System Environment/Libraries
8
-Vendor:         VMware, Inc.
9
-Distribution:   Photon
10
-Source0:        http://www.citi.umich.edu/projects/nfsv4/linux/libgssglue/%{name}-%{version}.tar.gz
11
-%define sha1    libgssglue=a8edc4f6a1d4dcd80ad52d18226fc65fa8850af1
12
-
13
-%description
14
-This library exports a gssapi interface, but doesn't implement any gssapi mechanisms itself; instead it calls gssapi routines in other libraries, depending on the mechanism.
15
-
16
-%package        devel
17
-Summary:        Header and development files
18
-Requires:       %{name} = %{version}
19
-%description    devel
20
-It contains the libraries and header files to create applications 
21
-
22
-%prep
23
-%setup -q
24
-%build
25
-%configure --prefix=/usr --disable-static
26
-
27
-make %{?_smp_mflags}
28
-
29
-%install
30
-make DESTDIR=%{buildroot} install
31
-find %{buildroot}/%{_libdir} -name '*.la' -delete
32
-
33
-%post
34
-
35
-%files
36
-%defattr(-,root,root)
37
-%{_libdir}/libgssglue.so.*
38
-
39
-%files  devel
40
-%defattr(-,root,root)
41
-%{_includedir}/*
42
-%{_libdir}/libgssglue.so
43
-%{_libdir}/pkgconfig/*.pc
44
-
45
-%changelog
46
-*   Thu Jul 26 2018 Ajay Kaher <akaher@vmware.com> 0.4-2
47
--   Resolved compilation error for aarch64
48
-*   Mon Jan 22 2018 Xiaolin Li <xiaolinl@vmware.com> 0.4-1
49
--   Initial build. First version
50 1
new file mode 100644
... ...
@@ -0,0 +1,51 @@
0
+Summary:        This library exports a gssapi interface
1
+Name:           libgssglue
2
+Version:        0.4
3
+Release:        3%{?dist}
4
+License:        BSD
5
+URL:            http://www.citi.umich.edu/projects/nfsv4/linux/
6
+Group:          System Environment/Libraries
7
+Vendor:         VMware, Inc.
8
+Distribution:   Photon
9
+Source0:        http://www.citi.umich.edu/projects/nfsv4/linux/libgssglue/%{name}-%{version}.tar.gz
10
+%define sha1    libgssglue=a8edc4f6a1d4dcd80ad52d18226fc65fa8850af1
11
+
12
+%description
13
+This library exports a gssapi interface, but doesn't implement any gssapi mechanisms itself; instead it calls gssapi routines in other libraries, depending on the mechanism.
14
+
15
+%package        devel
16
+Summary:        Header and development files
17
+Requires:       %{name} = %{version}
18
+%description    devel
19
+It contains the libraries and header files to create applications
20
+
21
+%prep
22
+%setup -q
23
+%build
24
+%configure --prefix=/usr --disable-static
25
+
26
+make %{?_smp_mflags}
27
+
28
+%install
29
+make DESTDIR=%{buildroot} install
30
+find %{buildroot}/%{_libdir} -name '*.la' -delete
31
+
32
+%post
33
+
34
+%files
35
+%defattr(-,root,root)
36
+%{_libdir}/libgssglue.so.*
37
+
38
+%files  devel
39
+%defattr(-,root,root)
40
+%{_includedir}/*
41
+%{_libdir}/libgssglue.so
42
+%{_libdir}/pkgconfig/*.pc
43
+
44
+%changelog
45
+*   Thu Oct 25 2018 Ajay Kaher <akaher@vmware.com> 0.4-3
46
+-   Corrected spec file name
47
+*   Thu Jul 26 2018 Ajay Kaher <akaher@vmware.com> 0.4-2
48
+-   Resolved compilation error for aarch64
49
+*   Mon Jan 22 2018 Xiaolin Li <xiaolinl@vmware.com> 0.4-1
50
+-   Initial build. First version
... ...
@@ -1,14 +1,14 @@
1 1
 Summary:        Programs for finding and viewing man pages
2 2
 Name:           man-db
3
-Version:        2.7.6
4
-Release:        4%{?dist}
3
+Version:        2.8.4
4
+Release:        1%{?dist}
5 5
 License:        GPLv2+
6 6
 URL:            http://www.nongnu.org/man-db
7 7
 Group:          Applications/System
8 8
 Vendor:         VMware, Inc.
9 9
 Distribution:   Photon
10 10
 Source0:        %{name}-%{version}.tar.xz
11
-%define sha1    man-db=919dcb34d604faac9b18a38ead07f457d0dab501
11
+%define sha1    man-db=729096a35fec13df8b7b350fdc1b323f990b6144
12 12
 Requires:       libpipeline
13 13
 Requires:       gdbm
14 14
 Requires:       xz
... ...
@@ -27,12 +27,10 @@ BuildRequires:  groff
27 27
 The Man-DB package contains programs for finding and viewing man pages.
28 28
 
29 29
 %prep
30
-%setup -qn %{name}-%{version}.1
30
+%setup -qn %{name}-%{version}
31 31
 %build
32
-./configure \
33
-    --prefix=%{_prefix} \
32
+%configure \
34 33
     --docdir=%{_defaultdocdir}/%{name}-%{version} \
35
-    --sysconfdir=%{_sysconfdir} \
36 34
     --disable-setuid \
37 35
     --with-browser=%{_bindir}/lynx \
38 36
     --with-vgrind=%{_bindir}/vgrind \
... ...
@@ -78,6 +76,8 @@ fi
78 78
 %{_libdir}/tmpfiles.d/man-db.conf
79 79
 
80 80
 %changelog
81
+*   Mon Oct 22 2018 Sujay G <gsujay@vmware.com> 2.8.4-1
82
+-   Bump man-db version to 2.8.4
81 83
 *   Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 2.7.6-4
82 84
 -   Remove shadow from requires and use explicit tools for post actions
83 85
 *   Fri Aug 04 2017 Chang Lee <changlee@vmware.com> 2.7.6-3
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        High-performance HTTP server and reverse proxy
2 2
 Name:           nginx
3 3
 Version:        1.15.3
4
-Release:        2%{?dist}
4
+Release:        3%{?dist}
5 5
 License:        BSD-2-Clause
6 6
 URL:            http://nginx.org/download/nginx-%{version}.tar.gz
7 7
 Group:          Applications/System
... ...
@@ -53,13 +53,30 @@ install -p -m 0644 %{SOURCE1} %{buildroot}/usr/lib/systemd/system/nginx.service
53 53
 
54 54
 %files
55 55
 %defattr(-,root,root)
56
-%{_sysconfdir}/*
56
+%config(noreplace) %{_sysconfdir}/%{name}/fastcgi.conf
57
+%config(noreplace) %{_sysconfdir}/%{name}/fastcgi.conf.default
58
+%config(noreplace) %{_sysconfdir}/%{name}/fastcgi_params
59
+%config(noreplace) %{_sysconfdir}/%{name}/fastcgi_params.default
60
+%config(noreplace) %{_sysconfdir}/%{name}/koi-utf
61
+%config(noreplace) %{_sysconfdir}/%{name}/koi-win
62
+%config(noreplace) %{_sysconfdir}/%{name}/mime.types
63
+%config(noreplace) %{_sysconfdir}/%{name}/mime.types.default
64
+%config(noreplace) %{_sysconfdir}/%{name}/nginx.conf
65
+%config(noreplace) %{_sysconfdir}/%{name}/nginx.conf.default
66
+%config(noreplace) %{_sysconfdir}/%{name}/scgi_params
67
+%config(noreplace) %{_sysconfdir}/%{name}/scgi_params.default
68
+%config(noreplace) %{_sysconfdir}/%{name}/uwsgi_params
69
+%config(noreplace) %{_sysconfdir}/%{name}/uwsgi_params.default
70
+%{_sysconfdir}/%{name}/win-utf
71
+%{_sysconfdir}/%{name}/html/*
57 72
 %{_sbindir}/*
58 73
 %{_libdir}/systemd/system/nginx.service
59 74
 %dir %{_var}/opt/nginx/log
60 75
 %{_var}/log/nginx
61 76
 
62 77
 %changelog
78
+*   Wed Nov 07 2018 Ajay Kaher <akaher@vmware.com> 1.15.3-3
79
+-   mark config files as non replaceable on upgrade.
63 80
 *   Mon Sep 17 2018 Keerthana K <keerthanak@vmware.com> 1.15.3-2
64 81
 -   Adding http_auth_request_module and http_sub_module.
65 82
 *   Fri Sep 7 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 1.15.3-1
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:	OpenJDK
4 4
 Name:		openjdk10
5 5
 Version:	1.10.0.23
6
-Release:	1%{?dist}
6
+Release:	2%{?dist}
7 7
 License:	GNU GPL
8 8
 URL:		https://openjdk.java.net
9 9
 Group:		Development/Tools
... ...
@@ -23,8 +23,10 @@ Requires:       openjre10 = %{version}-%{release}
23 23
 Requires:       chkconfig
24 24
 Obsoletes:      openjdk <= %{version}
25 25
 AutoReqProv: 	no
26
+%define ExtraBuildRequires icu-devel, cups, cups-devel, xorg-proto-devel, libXtst, libXtst-devel, libXfixes, libXfixes-devel, libXi, libXi-devel, openjdk, openjre, icu, alsa-lib, alsa-lib-devel, xcb-proto, libXdmcp-devel, libXau-devel, util-macros, xtrans, libxcb-devel, proto, libXdmcp, libxcb, libXau, xtrans-devel, libX11, libX11-devel, libXext, libXext-devel, libICE-devel, libSM, libICE, libSM-devel, libXt, libXmu, libXt-devel, libXmu-devel, libXrender, libXrender-devel
26 27
 %define bootstrapjdkversion 1.8.0.112
27 28
 %define jdk_major_version 1.10.0
29
+
28 30
 %description
29 31
 The OpenJDK package installs java class library and javac java compiler.
30 32
 
... ...
@@ -57,10 +59,9 @@ This package provides the runtime library class sources.
57 57
 %setup -qn openjdk-%{version}
58 58
 
59 59
 %build
60
-chmod a+x ./configure
61 60
 unset JAVA_HOME &&
62 61
 ENABLE_HEADLESS_ONLY="true" &&
63
-./configure \
62
+sh configure \
64 63
 	--with-target-bits=64 \
65 64
 	--with-boot-jdk=/var/opt/OpenJDK-%bootstrapjdkversion-bin \
66 65
 	--enable-headless-only \
... ...
@@ -83,7 +84,7 @@ make \
83 83
 
84 84
 %install
85 85
 unset JAVA_HOME &&
86
-make install 
86
+make install
87 87
 
88 88
 install -vdm755 %{buildroot}%{_libdir}/jvm/OpenJDK-%{version}
89 89
 chown -R root:root %{buildroot}%{_libdir}/jvm/OpenJDK-%{version}
... ...
@@ -219,5 +220,7 @@ rm -rf %{buildroot}/*
219 219
 %{_libdir}/jvm/OpenJDK-%{version}/lib/src.zip
220 220
 
221 221
 %changelog
222
-*   Thu Apr 23 2018 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.0.23-1
222
+*   Mon Oct 29 2018 Alexey Makhalov <amakhalov@vmware.com> 1.10.0.23-2
223
+-   Use ExtraBuildRequires
224
+*   Mon Apr 23 2018 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.0.23-1
223 225
 -   Initial build. First version
... ...
@@ -2,15 +2,15 @@
2 2
 %global security_hardening none
3 3
 Summary:	OpenJDK
4 4
 Name:		openjdk8
5
-Version:	1.8.0.181
6
-Release:	1%{?dist}
5
+Version:	1.8.0.192
6
+Release:	2%{?dist}
7 7
 License:	GNU GPL
8 8
 URL:		https://openjdk.java.net
9 9
 Group:		Development/Tools
10 10
 Vendor:		VMware, Inc.
11 11
 Distribution:   Photon
12 12
 Source0:	http://www.java.net/download/openjdk/jdk8/promoted/b162/openjdk-%{version}.tar.gz
13
-%define sha1 openjdk=c4b9a0d9820f58cd8aa9acd191727eabea62faf6
13
+%define sha1 openjdk=e8df20e8bb8fad4ed08867cbc42202039b356b2d
14 14
 Patch0:		Awt_build_headless_only.patch
15 15
 Patch1:		check-system-ca-certs.patch
16 16
 BuildRequires:  pcre-devel
... ...
@@ -25,7 +25,9 @@ Requires:       openjre8 = %{version}-%{release}
25 25
 Requires:       chkconfig
26 26
 Obsoletes:      openjdk <= %{version}
27 27
 AutoReqProv: 	no
28
+%define ExtraBuildRequires icu-devel, cups, cups-devel, xorg-proto-devel, libXtst, libXtst-devel, libXfixes, libXfixes-devel, libXi, libXi-devel, openjdk, openjre, icu, alsa-lib, alsa-lib-devel, xcb-proto, libXdmcp-devel, libXau-devel, util-macros, xtrans, libxcb-devel, proto, libXdmcp, libxcb, libXau, xtrans-devel, libX11, libX11-devel, libXext, libXext-devel, libICE-devel, libSM, libICE, libSM-devel, libXt, libXmu, libXt-devel, libXmu-devel, libXrender, libXrender-devel
28 29
 %define bootstrapjdkversion 1.8.0.112
30
+
29 31
 %description
30 32
 The OpenJDK package installs java class library and javac java compiler.
31 33
 
... ...
@@ -84,7 +86,8 @@ unset JAVA_HOME &&
84 84
 	--with-extra-cflags="-std=gnu++98 -fno-delete-null-pointer-checks -Wno-error -fno-lifetime-dse" \
85 85
 	--with-freetype-include=/usr/include/freetype2 \
86 86
 	--with-freetype-lib=/usr/lib \
87
-	--with-stdc++lib=dynamic
87
+	--with-stdc++lib=dynamic \
88
+	--disable-zip-debug-info
88 89
 
89 90
 make \
90 91
     DEBUG_BINARIES=true \
... ...
@@ -238,6 +241,10 @@ rm -rf %{buildroot}/*
238 238
 %{_libdir}/jvm/OpenJDK-%{version}/src.zip
239 239
 
240 240
 %changelog
241
+*   Mon Oct 29 2018 Alexey Makhalov <amakhalov@vmware.com> 1.8.0.192-2
242
+-   Use ExtraBuildRequires
243
+*   Thu Oct 18 2018 Tapas Kundu <tkundu@vmware.com> 1.8.0.192-1
244
+-   Upgraded to version 1.8.0.192
241 245
 *   Fri Sep 21 2018 Srinidhi Rao <srinidhir@vmware.com> 1.8.0.181-1
242 246
 -   Upgraded to 1.8.0.181 version.
243 247
 *   Mon Apr 23 2018 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.8.0.172-1
... ...
@@ -8,7 +8,7 @@
8 8
 Summary:	OpenJDK
9 9
 Name:		openjdk8
10 10
 Version:	1.8.0.151
11
-Release:	1%{?dist}
11
+Release:	2%{?dist}
12 12
 License:	GNU GPL
13 13
 URL:		http://hg.openjdk.java.net/aarch64-port/jdk8u/
14 14
 Group:		Development/Tools
... ...
@@ -44,7 +44,9 @@ Requires:       openjre8 = %{version}-%{release}
44 44
 Requires:       chkconfig
45 45
 Obsoletes:      openjdk <= %{version}
46 46
 AutoReqProv: 	no
47
+%define ExtraBuildRequires icu-devel, openjdk8, openjre8, icu, alsa-lib, alsa-lib-devel, xcb-proto, libXdmcp-devel, libXau-devel, util-macros, xtrans, libxcb-devel, proto, libXdmcp, libxcb, libXau, xtrans-devel, libX11, libX11-devel, libXext, libXext-devel, libICE-devel, libSM, libICE, libSM-devel, libXt, libXmu, libXt-devel, libXmu-devel, libXrender, libXrender-devel
47 48
 %define bootstrapjdk /usr/lib/jvm/OpenJDK-1.8.0.151
49
+
48 50
 %description
49 51
 The OpenJDK package installs java class library and javac java compiler.
50 52
 
... ...
@@ -95,9 +97,8 @@ sed -i "s#\"ft2build.h\"#<ft2build.h>#g" jdk/src/share/native/sun/font/freetypeS
95 95
 sed -i '0,/BUILD_LIBMLIB_SRC/s/BUILD_LIBMLIB_SRC/BUILD_HEADLESS_ONLY := 1\nOPENJDK_TARGET_OS := linux\n&/' jdk/make/lib/Awt2dLibraries.gmk
96 96
 
97 97
 %build
98
-chmod a+x ./configure
99 98
 unset JAVA_HOME &&
100
-./configure \
99
+sh configure \
101 100
 	CUPS_NOT_NEEDED=yes \
102 101
 	--with-target-bits=64 \
103 102
 	--with-boot-jdk=%{bootstrapjdk} \
... ...
@@ -260,6 +261,8 @@ rm -rf %{buildroot}/*
260 260
 %{_libdir}/jvm/OpenJDK-%{version}/src.zip
261 261
 
262 262
 %changelog
263
+*   Mon Oct 29 2018 Alexey Makhalov <amakhalov@vmware.com> 1.8.0.151-2
264
+-   Use ExtraBuildRequires
263 265
 *   Thu Dec 21 2017 Alexey Makhalov <amakhalov@vmware.com> 1.8.0.151-1
264 266
 -   Initial version of OpenJDK for aarch64. SPEC file was forked from
265 267
     openjdk8-1.8.0.152-1 of x86_64
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:	OpenJDK
4 4
 Name:		openjdk9
5 5
 Version:	1.9.0.181
6
-Release:	1%{?dist}
6
+Release:	2%{?dist}
7 7
 License:	GNU GPL
8 8
 URL:		https://openjdk.java.net
9 9
 Group:		Development/Tools
... ...
@@ -23,8 +23,10 @@ Requires:       openjre9 = %{version}-%{release}
23 23
 Requires:       chkconfig
24 24
 Obsoletes:      openjdk <= %{version}
25 25
 AutoReqProv: 	no
26
+%define ExtraBuildRequires icu-devel, cups, cups-devel, xorg-proto-devel, libXtst, libXtst-devel, libXfixes, libXfixes-devel, libXi, libXi-devel, openjdk, openjre, icu, alsa-lib, alsa-lib-devel, xcb-proto, libXdmcp-devel, libXau-devel, util-macros, xtrans, libxcb-devel, proto, libXdmcp, libxcb, libXau, xtrans-devel, libX11, libX11-devel, libXext, libXext-devel, libICE-devel, libSM, libICE, libSM-devel, libXt, libXmu, libXt-devel, libXmu-devel, libXrender, libXrender-devel
26 27
 %define bootstrapjdkversion 1.8.0.112
27 28
 %define jdk_major_version 1.9.0
29
+
28 30
 %description
29 31
 The OpenJDK package installs java class library and javac java compiler.
30 32
 
... ...
@@ -57,10 +59,9 @@ This package provides the runtime library class sources.
57 57
 %setup -qn openjdk-%{version}
58 58
 
59 59
 %build
60
-chmod a+x ./configure
61 60
 unset JAVA_HOME &&
62 61
 ENABLE_HEADLESS_ONLY="true" &&
63
-./configure \
62
+sh configure \
64 63
 	--with-target-bits=64 \
65 64
 	--with-boot-jdk=/var/opt/OpenJDK-%bootstrapjdkversion-bin \
66 65
 	--enable-headless-only \
... ...
@@ -223,5 +224,7 @@ rm -rf %{buildroot}/*
223 223
 %{_libdir}/jvm/OpenJDK-%{version}/lib/src.zip
224 224
 
225 225
 %changelog
226
+*   Mon Oct 29 2018 Alexey Makhalov <amakhalov@vmware.com> 1.9.0.181-2
227
+-   Use ExtraBuildRequires
226 228
 *   Thu Apr 19 2018 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.9.0.181-1
227 229
 -   Initial build. First version
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:	OpenLdap-2.4.43
3 3
 Name:		openldap
4 4
 Version:	2.4.46
5
-Release:	1%{?dist}
5
+Release:	2%{?dist}
6 6
 License:	OpenLDAP
7 7
 URL:		http://cyrusimap.web.cmu.edu/
8 8
 Group:		System Environment/Security
... ...
@@ -37,7 +37,8 @@ autoconf
37 37
 
38 38
 sed -i '/6.0.20/ a\\t__db_version_compat' configure
39 39
 
40
-CPPFLAGS="-D_REENTRANT -DLDAP_CONNECTIONLESS -D_GNU_SOURCE -D_AVL_H" \
40
+export CPPFLAGS="-D_REENTRANT -DLDAP_CONNECTIONLESS -D_GNU_SOURCE -D_AVL_H"
41
+
41 42
 %configure \
42 43
         --disable-static    \
43 44
         --disable-debug     \
... ...
@@ -74,6 +75,8 @@ rm -rf %{buildroot}/*
74 74
 /etc/openldap/*
75 75
 
76 76
 %changelog
77
+*   Mon Nov 5 2018 Sriram Nambakam <snambakam@vmware.com> 2.4.46-2
78
+-   export CPPFLAGS before invoking configure
77 79
 *   Mon Sep 10 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 2.4.46-1
78 80
 -   Upgrade to 2.4.46
79 81
 *   Fri Oct 13 2017 Alexey Makhalov <amakhalov@vmware.com> 2.4.44-3
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        PowerShell is an automation and configuration management platform.
2 2
 Name:           powershell
3 3
 Version:        6.0.1
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 Vendor:         VMware, Inc.
6 6
 Distribution:   Photon
7 7
 License:        MIT
... ...
@@ -12,7 +12,7 @@ Source0:        %{name}-%{version}.tar.gz
12 12
 Source1:        build.sh
13 13
 BuildArch:      x86_64
14 14
 BuildRequires:  dotnet-sdk = 2.1.4
15
-BuildRequires:  dotnet-runtime = 2.0.5
15
+BuildRequires:  dotnet-runtime = 2.1.4
16 16
 BuildRequires:  cmake
17 17
 BuildRequires:  clang
18 18
 BuildRequires:  git
... ...
@@ -50,5 +50,7 @@ ln -sf %{_libdir}/powershell/pwsh %{buildroot}%{_bindir}/pwsh
50 50
     %{_docdir}/*
51 51
 
52 52
 %changelog
53
+*   Thu Sep 27 2018 Ajay Kaher <akaher@vmware.com> 6.0.1-2
54
+-   upgrade version of dotnet-runtime
53 55
 *   Wed Jan 31 2018 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 6.0.1-1
54 56
 -   Initial build for photon
... ...
@@ -1,11 +1,11 @@
1 1
 Summary:	Very fast, header only, C++ logging library.
2 2
 Name:		spdlog
3
-Version:	0.13.0
3
+Version:	1.1.0
4 4
 Release:	1%{?dist}
5 5
 License:	MIT
6 6
 URL:		https://github.com/gabime/spdlog
7
-Source0:	%{name}-v%{version}.tar.gz
8
-%define sha1    spdlog=e9968ab555f9f7bb86d6257e98d7a92313a91297
7
+Source0:	%{name}-%{version}.tar.gz
8
+%define sha1    spdlog=9b428a0eb4ace8f4916896dd2b3c021a9dc77f79
9 9
 Group:		Development/Tools
10 10
 Vendor:		VMware, Inc.
11 11
 Distribution: 	Photon
... ...
@@ -34,9 +34,11 @@ make DESTDIR=%{buildroot} install
34 34
 %files
35 35
 %defattr(-,root,root)
36 36
 %{_includedir}/%{name}/*
37
-%{_libdir}/cmake/%{name}/*.cmake
38
-%{_libdir}/pkgconfig/spdlog.pc
37
+%{_lib64dir}/cmake/%{name}/*.cmake
38
+%{_lib64dir}/pkgconfig/spdlog.pc
39 39
 
40 40
 %changelog
41
+*    Fri Sep 21 2018 Srinidhi Rao <srinidhir@vmware.com> 1.1.0-1
42
+-    Updating the version to 1.1.0-1.
41 43
 *    Wed Jul 05 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.13.0-1
42 44
 -    Initial version of spdlog package for Photon.
... ...
@@ -141,9 +141,9 @@ class Installer(object):
141 141
             if versionindex == -1:
142 142
                 raise Exception("Invalid pkg name: " + pkg)
143 143
             package = pkg[:versionindex]
144
-            if package in pkg_to_rpm_map:
145
-                if pkg_to_rpm_map[package]['rpm'] is not None:
146
-                    name = pkg_to_rpm_map[package]['rpm']
144
+            if pkg in pkg_to_rpm_map:
145
+                if pkg_to_rpm_map[pkg]['rpm'] is not None:
146
+                    name = pkg_to_rpm_map[pkg]['rpm']
147 147
                     basename = os.path.basename(name)
148 148
                     self.rpms_tobeinstalled.append({'filename': basename, 'path': name,
149 149
                                                     'package' : package})
150 150
deleted file mode 100644
... ...
@@ -1,47 +0,0 @@
1
-# pylint: disable=invalid-name,missing-docstring
2
-import os.path
3
-from Logger import Logger
4
-from CommandUtils import CommandUtils
5
-from constants import constants
6
-
7
-class ChrootUtils(object):
8
-
9
-    def __init__(self, logName=None, logPath=None):
10
-        if logName is None:
11
-            logName = "ChrootUtils"
12
-        if logPath is None:
13
-            logPath = constants.logPath
14
-        self.logName = logName
15
-        self.logPath = logPath
16
-        self.logger = Logger.getLogger(logName, logPath, constants.logLevel)
17
-
18
-    def createChroot(self, chrootName):
19
-        chrootID = constants.buildRootPath + "/" + chrootName
20
-        if os.path.isdir(chrootID):
21
-            if not self.destroyChroot(chrootID):
22
-                self.logger.error("Given chroot " + chrootID +
23
-                                  " is already exists. unable to destroy it ")
24
-                return False, None
25
-        # need to add timeout for this step
26
-        # http://stackoverflow.com/questions/1191374/subprocess-with-timeout
27
-        cmdUtils = CommandUtils()
28
-        returnVal = cmdUtils.runCommandInShell("mkdir -p " + chrootID)
29
-        if not returnVal:
30
-            self.logger.error("Unable to create chroot:" + chrootID + ".Unknown error.")
31
-            return False, None
32
-        return True, chrootID
33
-
34
-    def destroyChroot(self, chrootID):
35
-        # need to add timeout for this step
36
-        # http://stackoverflow.com/questions/1191374/subprocess-with-timeout
37
-        cmdUtils = CommandUtils()
38
-        returnVal = cmdUtils.runCommandInShell("./clean-up-chroot.py " + chrootID)
39
-        if not returnVal:
40
-            self.logger.error("Unable to destroy chroot:" + chrootID + ".Unknown error.")
41
-            return False
42
-
43
-        returnVal = cmdUtils.runCommandInShell("rm -rf " + chrootID)
44
-        if not returnVal:
45
-            self.logger.error("Unable to destroy chroot:" + chrootID + ".Unknown error.")
46
-            return False
47
-        return True
... ...
@@ -2,12 +2,11 @@
2 2
 import subprocess
3 3
 import os
4 4
 
5
-class CommandUtils(object):
6
-    def __init__(self):
7
-        self.findBinary = "find"
5
+class CommandUtils:
8 6
 
9
-    def findFile(self, filename, sourcePath):
10
-        process = subprocess.Popen([self.findBinary, "-L", sourcePath, "-name", filename,
7
+    @staticmethod
8
+    def findFile(filename, sourcePath):
9
+        process = subprocess.Popen(["find", "-L", sourcePath, "-name", filename,
11 10
                                     "-not", "-type", "d"], stdout=subprocess.PIPE)
12 11
         # We don't check the return val here because find could return 1 but still be
13 12
         # able to find
... ...
@@ -26,23 +25,17 @@ class CommandUtils(object):
26 26
         return result.decode().split()
27 27
 
28 28
     @staticmethod
29
-    def runCommandInShell(cmd, logfilePath=None, chrootCmd=None):
30
-        if chrootCmd is not None:
31
-            cmd = chrootCmd + " " + cmd
32
-        if logfilePath is None:
33
-            logfilePath = os.devnull
34
-        with open(logfilePath, "w") as logfile:
35
-            process = subprocess.Popen("%s" %cmd, shell=True, stdout=logfile, stderr=logfile)
29
+    def runCommandInShell(cmd, logfile=None, logfn=None):
30
+        retval = 0
31
+        if logfn:
32
+            process = subprocess.Popen("%s" %cmd, shell=True, stdout=subprocess.PIPE)
36 33
             retval = process.wait()
37
-            if retval == 0:
38
-                return True
39
-        return False
40
-    @staticmethod
41
-    def runCommandInShell2(cmd, chrootCmd=None):
42
-        if chrootCmd is not None:
43
-            cmd = chrootCmd + " " + cmd
44
-        process = subprocess.Popen("%s" %cmd, shell=True, stdout=subprocess.PIPE)
45
-        retval = process.wait()
46
-        if retval != 0:
47
-            return None
48
-        return process.communicate()[0]
34
+            logfn(process.communicate()[0].decode())
35
+        else:
36
+            if logfile is None:
37
+                logfile = os.devnull
38
+            with open(logfile, "w") as f:
39
+                process = subprocess.Popen("%s" %cmd, shell=True, stdout=f, stderr=f)
40
+            retval = process.wait()
41
+        return retval
42
+
... ...
@@ -216,7 +216,7 @@ def buildSRPMList(srpmPath, yamlDir, blackListPkgs, dist_tag, logger, singleFile
216 216
                 srpmName = os.path.basename(srpmFullPath)
217 217
                 cpcmd = "cp " + srpmFullPath + " " + yamlSrpmDir + "/"
218 218
                 returnVal = cmdUtils.runCommandInShell(cpcmd)
219
-                if not returnVal:
219
+                if returnVal != 0:
220 220
                     logger.error("Copy SRPM File is failed for package:" + ossname)
221 221
             else:
222 222
                 logger.error("SRPM file is not found:" + ossname)
223 223
deleted file mode 100644
... ...
@@ -1,36 +0,0 @@
1
-import os.path
2
-
3
-class MiscUtils(object):
4
-
5
-    @staticmethod
6
-    def isOutdated(listInputFiles, listOutputFiles):
7
-        thresholdTimeStamp = None
8
-        if not listInputFiles:
9
-            return False
10
-        if not listOutputFiles:
11
-            return True
12
-        for f in listOutputFiles:
13
-            t = os.path.getmtime(f)
14
-            if thresholdTimeStamp is None:
15
-                thresholdTimeStamp = t
16
-            if t < thresholdTimeStamp:
17
-                thresholdTimeStamp = t
18
-        for f in listInputFiles:
19
-            t = os.path.getmtime(f)
20
-            if t > thresholdTimeStamp:
21
-                return True
22
-        return False
23
-
24
-    @staticmethod
25
-    def getListSpecFiles(listSpecFiles, path):
26
-        for dirEntry in os.listdir(path):
27
-            dirEntryPath = os.path.join(path, dirEntry)
28
-            if os.path.isfile(dirEntryPath) and dirEntryPath.endswith(".spec"):
29
-                listSpecFiles.append(dirEntryPath)
30
-            elif os.path.isdir(dirEntryPath):
31
-                MiscUtils.getListSpecFiles(listSpecFiles, dirEntryPath)
32
-
33
-if __name__ == "__main__":
34
-    inputFiles = ["SpecParser.py", "Logger.py"]
35
-    outputFiles = ["builder.py"]
36
-    print(MiscUtils.isOutdated(inputFiles, outputFiles))
... ...
@@ -2,14 +2,12 @@ import sys
2 2
 import os.path
3 3
 from PackageUtils import PackageUtils
4 4
 from Logger import Logger
5
-from ChrootUtils import ChrootUtils
6 5
 from ToolChainUtils import ToolChainUtils
7 6
 from CommandUtils import CommandUtils
8 7
 from constants import constants
9 8
 from SpecData import SPECS
10
-import docker
11
-from distutils.version import LooseVersion
12 9
 from StringUtils import StringUtils
10
+from Sandbox import Chroot, Container
13 11
 
14 12
 class PackageBuilderBase(object):
15 13
     def __init__(self, mapPackageToCycles, pkgBuildType):
... ...
@@ -63,12 +61,9 @@ class PackageBuilderBase(object):
63 63
         pkg = rpmfile[0:releaseindex]
64 64
         return pkg
65 65
 
66
-    def _findInstalledPackages(self, instanceID):
66
+    def _findInstalledPackages(self, sandbox):
67 67
         pkgUtils = PackageUtils(self.logName, self.logPath)
68
-        if self.pkgBuildType == "chroot":
69
-            listInstalledRPMs = pkgUtils.findInstalledRPMPackages(instanceID)
70
-        elif self.pkgBuildType == "container":
71
-            listInstalledRPMs = pkgUtils.findInstalledRPMPackagesInContainer(instanceID)
68
+        listInstalledRPMs = pkgUtils.findInstalledRPMPackages(sandbox)
72 69
         listInstalledPackages = []
73 70
         for installedRPM in listInstalledRPMs:
74 71
             pkg = self._findPackageNameAndVersionFromRPMFile(installedRPM)
... ...
@@ -96,7 +91,7 @@ class PackageBuilderBase(object):
96 96
     def _findBuildTimeCheckRequiredPackages(self):
97 97
         return SPECS.getData().getCheckBuildRequiresForPackage(self.package, self.version)
98 98
 
99
-    def _installPackage(self, pkgUtils, package,packageVersion, instanceID, destLogPath,
99
+    def _installPackage(self, pkgUtils, package, packageVersion, sandbox, destLogPath,
100 100
                         listInstalledPackages, listInstalledRPMs):
101 101
         rpmfile = pkgUtils.findRPMFileForGivenPackage(package,packageVersion);
102 102
         if rpmfile is None:
... ...
@@ -109,19 +104,16 @@ class PackageBuilderBase(object):
109 109
         # mark it as installed -  to avoid cyclic recursion
110 110
         listInstalledPackages.append(pkg)
111 111
         listInstalledRPMs.append(specificRPM)
112
-        self._installDependentRunTimePackages(pkgUtils, package, packageVersion, instanceID, destLogPath,
112
+        self._installDependentRunTimePackages(pkgUtils, package, packageVersion, sandbox, destLogPath,
113 113
                                               listInstalledPackages, listInstalledRPMs)
114 114
         noDeps = False
115 115
         if (package in self.mapPackageToCycles or
116 116
                 package in self.listNodepsPackages or
117 117
                 package in constants.noDepsPackageList):
118 118
             noDeps = True
119
-        if self.pkgBuildType == "chroot":
120
-            pkgUtils.installRPM(package, packageVersion,instanceID, noDeps, destLogPath)
121
-        elif self.pkgBuildType == "container":
122
-            pkgUtils.prepRPMforInstallInContainer(package,packageVersion, instanceID, noDeps, destLogPath)
119
+        pkgUtils.prepRPMforInstall(package,packageVersion, noDeps, destLogPath)
123 120
 
124
-    def _installDependentRunTimePackages(self, pkgUtils, package, packageVersion, instanceID, destLogPath,
121
+    def _installDependentRunTimePackages(self, pkgUtils, package, packageVersion, sandbox, destLogPath,
125 122
                                          listInstalledPackages, listInstalledRPMs):
126 123
         listRunTimeDependentPackages = self._findRunTimeRequiredRPMPackages(package, packageVersion)
127 124
         if listRunTimeDependentPackages:
... ...
@@ -133,10 +125,10 @@ class PackageBuilderBase(object):
133 133
                     pkgUtils.findRPMFileForGivenPackage(packageName, packageVersion)).replace(".rpm", "")
134 134
                 if pkg in listInstalledPackages and latestPkgRPM in listInstalledRPMs:
135 135
                     continue
136
-                self._installPackage(pkgUtils, packageName,packageVersion, instanceID, destLogPath,listInstalledPackages, listInstalledRPMs)
136
+                self._installPackage(pkgUtils, packageName,packageVersion, sandbox, destLogPath,listInstalledPackages, listInstalledRPMs)
137 137
 
138
-    def _findDependentPackagesAndInstalledRPM(self, instanceID):
139
-        listInstalledPackages, listInstalledRPMs = self._findInstalledPackages(instanceID)
138
+    def _findDependentPackagesAndInstalledRPM(self, sandbox):
139
+        listInstalledPackages, listInstalledRPMs = self._findInstalledPackages(sandbox)
140 140
         self.logger.debug(listInstalledPackages)
141 141
         listDependentPackages = self._findBuildTimeRequiredPackages()
142 142
         listTestPackages=[]
... ...
@@ -158,181 +150,77 @@ class PackageBuilderBase(object):
158 158
 
159 159
 class PackageBuilderContainer(PackageBuilderBase):
160 160
     def __init__(self, mapPackageToCycles, pkgBuildType):
161
-        self.buildContainerImage = "photon_build_container:latest"
162
-        self.dockerClient = docker.from_env(version="auto")
163
-
164 161
         PackageBuilderBase.__init__(self, mapPackageToCycles, pkgBuildType)
165 162
 
166
-    def _prepareBuildContainer(self, containerTaskName, packageName, packageVersion,
167
-                               isToolChainPackage=False):
168
-        # Prepare an empty chroot environment to let docker use the BUILD folder.
169
-        # This avoids docker using overlayFS which will cause make check failure.
170
-        chrootName = packageName + "-" + packageVersion
171
-        chrUtils = ChrootUtils(self.logName, self.logPath)
172
-        returnVal, chrootID = chrUtils.createChroot(chrootName)
173
-        if not returnVal:
174
-            raise Exception("Unable to prepare build root")
175
-        cmdUtils = CommandUtils()
176
-        cmdUtils.runCommandInShell("mkdir -p " + chrootID + constants.topDirPath)
177
-        cmdUtils.runCommandInShell("mkdir -p " + chrootID + constants.topDirPath + "/BUILD")
178
-
179
-        containerID = None
180
-        mountVols = {
181
-            constants.prevPublishRPMRepo: {'bind': '/publishrpms', 'mode': 'ro'},
182
-            constants.prevPublishXRPMRepo: {'bind': '/publishxrpms', 'mode': 'ro'},
183
-            constants.tmpDirPath: {'bind': '/tmp', 'mode': 'rw'},
184
-            constants.rpmPath: {'bind': constants.topDirPath + "/RPMS", 'mode': 'rw'},
185
-            constants.sourceRpmPath: {'bind': constants.topDirPath + "/SRPMS", 'mode': 'rw'},
186
-            constants.logPath + "/" + self.logName: {'bind': constants.topDirPath + "/LOGS",
187
-                                                     'mode': 'rw'},
188
-            chrootID + constants.topDirPath + "/BUILD": {'bind': constants.topDirPath + "/BUILD",
189
-                                                         'mode': 'rw'},
190
-            constants.dockerUnixSocket: {'bind': constants.dockerUnixSocket, 'mode': 'rw'}
191
-            }
192
-
193
-        containerName = containerTaskName
194
-        containerName = containerName.replace("+", "p")
195
-        try:
196
-            oldContainerID = self.dockerClient.containers.get(containerName)
197
-            if oldContainerID is not None:
198
-                oldContainerID.remove(force=True)
199
-        except docker.errors.NotFound:
200
-            try:
201
-                sys.exc_clear()
202
-            except:
203
-                pass
204
-
205
-        try:
206
-            self.logger.debug("BuildContainer-prepareBuildContainer: " +
207
-                             "Starting build container: " + containerName)
208
-            #TODO: Is init=True equivalent of --sig-proxy?
209
-            privilegedDocker = False
210
-            cap_list = ['SYS_PTRACE']
211
-            if packageName in constants.listReqPrivilegedDockerForTest:
212
-                privilegedDocker = True
213
-
214
-            containerID = self.dockerClient.containers.run(self.buildContainerImage,
215
-                                                           detach=True,
216
-                                                           cap_add=cap_list,
217
-                                                           privileged=privilegedDocker,
218
-                                                           name=containerName,
219
-                                                           network_mode="host",
220
-                                                           volumes=mountVols,
221
-                                                           command="/bin/bash -l -c /wait.sh")
222
-
223
-            self.logger.debug("Started Photon build container for task " + containerTaskName +
224
-                              " ID: " + containerID.short_id)
225
-            if not containerID:
226
-                raise Exception("Unable to start Photon build container for task " +
227
-                                containerTaskName)
228
-        except Exception as e:
229
-            self.logger.debug("Unable to start Photon build container for task " +
230
-                              containerTaskName)
231
-            raise e
232
-        return containerID, chrootID
233
-
234 163
     def _buildPackage(self):
235 164
         #should initialize a logger based on package name
236
-        containerTaskName = "build-" + self.package
237
-        containerID = None
238
-        chrootID = None
239
-        isToolChainPackage = False
240
-        if self.package in constants.listToolChainPackages:
241
-            isToolChainPackage = True
242
-        destLogPath = constants.logPath + "/build-" + self.package
165
+        containerTaskName = "build-" + self.package + "-" + self.version
166
+        container = None
243 167
         try:
244
-            containerID, chrootID = self._prepareBuildContainer(
245
-                containerTaskName, self.package, self.version, isToolChainPackage)
168
+            container = Container(self.logger)
169
+            container.create(containerTaskName)
246 170
 
247 171
             tcUtils = ToolChainUtils(self.logName, self.logPath)
248
-            if self.package in constants.perPackageToolChain:
249
-                self.logger.debug(constants.perPackageToolChain[self.package])
250
-                tcUtils.installCustomToolChainRPMSinContainer(
251
-                    containerID,
252
-                    constants.perPackageToolChain[self.package].get(platform.machine(), []),
253
-                    self.package)
172
+            tcUtils.installCustomToolChainRPMS(container, self.package, self.version)
254 173
 
255 174
             listDependentPackages, listTestPackages, listInstalledPackages, listInstalledRPMs = (
256
-                self._findDependentPackagesAndInstalledRPM(containerID))
175
+                self._findDependentPackagesAndInstalledRPM(container))
257 176
 
258 177
             pkgUtils = PackageUtils(self.logName, self.logPath)
178
+
259 179
             if listDependentPackages:
260
-                self.logger.debug("BuildContainer-buildPackage: " +
261
-                                 "Installing dependent packages..")
262
-                self.logger.debug(listDependentPackages)
180
+                self.logger.debug("Installing the build time dependent packages......")
263 181
                 for pkg in listDependentPackages:
264 182
                     packageName, packageVersion = StringUtils.splitPackageNameAndVersion(pkg)
265
-                    self._installPackage(pkgUtils, packageName, packageVersion, containerID, destLogPath,listInstalledPackages, listInstalledRPMs)
183
+                    self._installPackage(pkgUtils, packageName, packageVersion, container, self.logPath,listInstalledPackages, listInstalledRPMs)
266 184
                 for pkg in listTestPackages:
267
-                    packageName, packageVersion = StringUtils.splitPackageNameAndVersion(pkg)
268 185
                     flag = False
186
+                    packageName, packageVersion = StringUtils.splitPackageNameAndVersion(pkg)
269 187
                     for depPkg in listDependentPackages:
270 188
                         depPackageName, depPackageVersion = StringUtils.splitPackageNameAndVersion(depPkg)
271 189
                         if depPackageName == packageName:
272 190
                             flag = True
273 191
                             break;
274 192
                     if flag == False:
275
-                        self._installPackage(pkgUtils, packageName,packageVersion, containerID, destLogPath,listInstalledPackages, listInstalledRPMs)
276
-                pkgUtils.installRPMSInAOneShotInContainer(containerID, destLogPath)
193
+                        self._installPackage(pkgUtils, packageName,packageVersion, container, self.logPath,listInstalledPackages, listInstalledRPMs)
194
+                pkgUtils.installRPMSInOneShot(container)
277 195
                 self.logger.debug("Finished installing the build time dependent packages....")
278 196
 
279 197
             self.logger.debug("BuildContainer-buildPackage: Start building the package: " +
280 198
                              self.package)
281
-            pkgUtils.adjustGCCSpecsInContainer(self.package, self.version, containerID, destLogPath)
282
-            pkgUtils.buildRPMSForGivenPackageInContainer(
283
-                self.package,
284
-                self.version,
285
-                containerID,
286
-                destLogPath)
199
+            pkgUtils.adjustGCCSpecs(container, self.package, self.version)
200
+            pkgUtils.buildRPMSForGivenPackage(container, self.package, self.version, self.logPath)
287 201
             self.logger.debug("BuildContainer-buildPackage: Successfully built the package: " +
288 202
                              self.package)
289 203
         except Exception as e:
290 204
             self.logger.error("Failed while building package:" + self.package)
291
-            if containerID is not None:
292
-                self.logger.debug("Container " + containerID.short_id +
205
+            if container is not None:
206
+                self.logger.debug("Container " + container.getID() +
293 207
                                   " retained for debugging.")
294
-            logFileName = os.path.join(destLogPath, self.package + ".log")
208
+            logFileName = os.path.join(self.logPath, self.package + ".log")
295 209
             fileLog = os.popen('tail -n 20 ' + logFileName).read()
296 210
             self.logger.debug(fileLog)
297 211
             raise e
298 212
 
299 213
         # Remove the container
300
-        if containerID is not None:
301
-            containerID.remove(force=True)
302
-        # Remove the dummy chroot
303
-        if chrootID is not None:
304
-            chrUtils = ChrootUtils(self.logName, self.logPath)
305
-            chrUtils.destroyChroot(chrootID)
214
+        if container:
215
+            container.destroy()
306 216
 
307 217
 class PackageBuilderChroot(PackageBuilderBase):
308 218
     def __init__(self, mapPackageToCycles, pkgBuildType):
309 219
         PackageBuilderBase.__init__(self, mapPackageToCycles, pkgBuildType)
310 220
 
311
-    def _prepareBuildRoot(self):
312
-        chrootID = None
313
-        chrootName = self.package + "-" + self.version
221
+    def _buildPackage(self):
222
+        chroot = None
314 223
         try:
315
-            chrUtils = ChrootUtils(self.logName, self.logPath)
316
-            returnVal, chrootID = chrUtils.createChroot(chrootName)
317
-            self.logger.debug("Created new chroot: " + chrootID)
318
-            if not returnVal:
319
-                raise Exception("Unable to prepare build root")
224
+            chroot = Chroot(self.logger)
225
+            chroot.create(self.package + "-" + self.version)
226
+
320 227
             tUtils = ToolChainUtils(self.logName, self.logPath)
321
-            tUtils.installToolChainRPMS(self.package, self.version, chrootID, self.logPath)
322
-        except Exception as e:
323
-            if chrootID is not None:
324
-                self.logger.debug("Deleting chroot: " + chrootID)
325
-                chrUtils.destroyChroot(chrootID)
326
-            raise e
327
-        return chrootID
228
+            tUtils.installToolChainRPMS(chroot, self.package, self.version, self.logPath)
328 229
 
329
-    def _buildPackage(self):
330
-        chrUtils = ChrootUtils(self.logName, self.logPath)
331
-        chrootID = None
332
-        try:
333
-            chrootID = self._prepareBuildRoot()
334 230
             listDependentPackages, listTestPackages, listInstalledPackages, listInstalledRPMs = (
335
-                self._findDependentPackagesAndInstalledRPM(chrootID))
231
+                self._findDependentPackagesAndInstalledRPM(chroot))
336 232
 
337 233
             pkgUtils = PackageUtils(self.logName, self.logPath)
338 234
 
... ...
@@ -340,31 +228,31 @@ class PackageBuilderChroot(PackageBuilderBase):
340 340
                 self.logger.debug("Installing the build time dependent packages......")
341 341
                 for pkg in listDependentPackages:
342 342
                     packageName, packageVersion = StringUtils.splitPackageNameAndVersion(pkg)
343
-                    self._installPackage(pkgUtils, packageName, packageVersion, chrootID, self.logPath,listInstalledPackages, listInstalledRPMs)
343
+                    self._installPackage(pkgUtils, packageName, packageVersion, chroot, self.logPath,listInstalledPackages, listInstalledRPMs)
344 344
                 for pkg in listTestPackages:
345 345
                     flag = False
346 346
                     packageName, packageVersion = StringUtils.splitPackageNameAndVersion(pkg)
347 347
                     for depPkg in listDependentPackages:
348 348
                         depPackageName, depPackageVersion = StringUtils.splitPackageNameAndVersion(depPkg)
349 349
                         if depPackageName == packageName:
350
-                                flag = True
351
-                                break;
350
+                            flag = True
351
+                            break;
352 352
                     if flag == False:
353
-                        self._installPackage(pkgUtils, packageName,packageVersion, chrootID, self.logPath,listInstalledPackages, listInstalledRPMs)
354
-                pkgUtils.installRPMSInAOneShot(chrootID, self.logPath)
353
+                        self._installPackage(pkgUtils, packageName,packageVersion, chroot, self.logPath,listInstalledPackages, listInstalledRPMs)
354
+                pkgUtils.installRPMSInOneShot(chroot)
355 355
                 self.logger.debug("Finished installing the build time dependent packages....")
356 356
 
357
-            pkgUtils.adjustGCCSpecs(self.package, self.version, chrootID, self.logPath)
358
-            pkgUtils.buildRPMSForGivenPackage(self.package, self.version, chrootID,
357
+            pkgUtils.adjustGCCSpecs(chroot, self.package, self.version)
358
+            pkgUtils.buildRPMSForGivenPackage(chroot, self.package, self.version,
359 359
                                               self.logPath)
360 360
             self.logger.debug("Successfully built the package:" + self.package)
361 361
         except Exception as e:
362 362
             self.logger.error("Failed while building package:" + self.package)
363
-            self.logger.debug("Chroot with ID: " + chrootID +
363
+            self.logger.debug("Chroot: " + chroot.getPath() +
364 364
                               " not deleted for debugging.")
365 365
             logFileName = os.path.join(self.logPath, self.package + ".log")
366 366
             fileLog = os.popen('tail -n 100 ' + logFileName).read()
367 367
             self.logger.info(fileLog)
368 368
             raise e
369
-        if chrootID is not None:
370
-            chrUtils.destroyChroot(chrootID)
369
+        if chroot:
370
+            chroot.destroy()
... ...
@@ -21,7 +21,6 @@ class PackageInfo(object):
21 21
     def loadPackagesData(self):
22 22
         listPackages = SPECS.getData().getListPackages()
23 23
         listPackages.sort()
24
-        listRPMFiles = []
25 24
         cmdUtils = CommandUtils()
26 25
         for package in listPackages:
27 26
             for version in SPECS.getData().getVersions(package):
... ...
@@ -39,13 +38,12 @@ class PackageInfo(object):
39 39
                     debugrpmFile = debugrpmFiles[0]
40 40
                 pkgUtils = PackageUtils(self.logName, self.logPath)
41 41
                 for rpmPkg in listRPMPackages:
42
-                    rpmFile = pkgUtils.findRPMFileForGivenPackage(rpmPkg)
42
+                    rpmFile = pkgUtils.findRPMFileForGivenPackage(rpmPkg, version)
43 43
                     if rpmFile is not None:
44
-                        listRPMFiles.append(rpmFile)
45 44
                         listPkgAttributes = {"sourcerpm":srpmFile, "rpm":rpmFile,
46 45
                                              "debugrpm":debugrpmFile}
47
-                        self.pkgList[rpmPkg] = listPkgAttributes
48
-                        self.logger.debug("Added " + rpmPkg + " rpm package to the list")
46
+                        self.pkgList[rpmPkg+"-"+version] = listPkgAttributes
47
+                        self.logger.debug("Added " + rpmPkg + "-" + version + " to the package info json")
49 48
                     else:
50 49
                         self.logger.debug("Missing rpm file for package:" + rpmPkg)
51 50
 
... ...
@@ -5,7 +5,6 @@ from PackageBuildDataGenerator import PackageBuildDataGenerator
5 5
 from Logger import Logger
6 6
 from constants import constants
7 7
 import docker
8
-from ChrootUtils import ChrootUtils
9 8
 from CommandUtils import CommandUtils
10 9
 from PackageUtils import PackageUtils
11 10
 from ToolChainUtils import ToolChainUtils
... ...
@@ -13,6 +12,7 @@ from Scheduler import Scheduler
13 13
 from ThreadPool import ThreadPool
14 14
 from SpecData import SPECS
15 15
 from StringUtils import StringUtils
16
+from Sandbox import Chroot, Container
16 17
 
17 18
 class PackageManager(object):
18 19
 
... ...
@@ -49,7 +49,7 @@ class PackageManager(object):
49 49
         if self.pkgBuildType == "container":
50 50
             # Stage 1 build container
51 51
             #TODO image name constants.buildContainerImageName
52
-            if pkgCount > 0 or not self.dockerClient.images.list("photon_build_container:latest"):
52
+            if pkgCount > 0 or not self.dockerClient.images.list(constants.buildContainerImage):
53 53
                 self._createBuildContainer()
54 54
         self.logger.info("Step 2 : Building stage 2 of the toolchain...")
55 55
         self.logger.info(constants.listToolChainPackages)
... ...
@@ -104,7 +104,7 @@ class PackageManager(object):
104 104
                 packageIsAlreadyBuilt=True
105 105
                 listRPMPackages = SPECS.getData().getRPMPackages(package, version)
106 106
                 for rpmPkg in listRPMPackages:
107
-                    if pkgUtils.findRPMFileForGivenPackage(rpmPkg) is None:
107
+                    if pkgUtils.findRPMFileForGivenPackage(rpmPkg, version) is None:
108 108
                         packageIsAlreadyBuilt=False
109 109
                         break;
110 110
                 if packageIsAlreadyBuilt:
... ...
@@ -229,46 +229,41 @@ class PackageManager(object):
229 229
         self.logger.debug("Generating photon build container..")
230 230
         try:
231 231
             #TODO image name constants.buildContainerImageName
232
-            self.dockerClient.images.remove("photon_build_container:latest", force=True)
232
+            self.dockerClient.images.remove(constants.buildContainerImage, force=True)
233 233
         except Exception as e:
234 234
             #TODO - better handling
235 235
             self.logger.debug("Photon build container image not found.")
236 236
 
237 237
         # Create toolchain chroot and install toolchain RPMs
238
-        chrootID = None
238
+        chroot = None
239 239
         try:
240 240
             #TODO: constants.tcrootname
241
-            chrUtils = ChrootUtils("toolchain-chroot", self.logPath)
242
-            returnVal, chrootID = chrUtils.createChroot("toolchain-chroot")
243
-            self.logger.debug("Created tool-chain chroot: " + chrootID)
244
-            if not returnVal:
245
-                raise Exception("Unable to prepare tool-chain chroot")
241
+            chroot = Chroot(self.logger)
242
+            chroot.create("toolchain-chroot")
246 243
             tcUtils = ToolChainUtils("toolchain-chroot", self.logPath)
247
-            tcUtils.installToolChainRPMS(chrootID, "dummy")
244
+            tcUtils.installToolChainRPMS(chroot)
248 245
         except Exception as e:
249
-            if chrootID is not None:
250
-                self.logger.debug("Deleting chroot: " + chrootID)
251
-                chrUtils.destroyChroot(chrootID)
246
+            if chroot:
247
+                chroot.destroy()
252 248
             raise e
253
-        self.logger.debug("createBuildContainer: chrootID: " + chrootID)
249
+        self.logger.debug("createBuildContainer: " + chroot.getPath())
254 250
 
255 251
         # Create photon build container using toolchain chroot
252
+        chroot.unmountAll()
256 253
         #TODO: Coalesce logging
257 254
         cmdUtils = CommandUtils()
258
-        cmd = "./umount-build-root.sh " + chrootID
259
-        cmdUtils.runCommandInShell(cmd, self.logPath + "/toolchain-chroot1.log")
260
-        cmd = "cd " + chrootID + " && tar -czvf ../tcroot.tar.gz ."
261
-        cmdUtils.runCommandInShell(cmd, self.logPath + "/toolchain-chroot2.log")
262
-        cmd = "mv " + chrootID + "/../tcroot.tar.gz ."
263
-        cmdUtils.runCommandInShell(cmd, self.logPath + "/toolchain-chroot3.log")
255
+        cmd = "cd " + chroot.getPath() + " && tar -czf ../tcroot.tar.gz ."
256
+        cmdUtils.runCommandInShell(cmd, logfn=self.logger.debug)
257
+        cmd = "mv " + chroot.getPath() + "/../tcroot.tar.gz ."
258
+        cmdUtils.runCommandInShell(cmd, logfn=self.logger.debug)
264 259
         #TODO: Container name, docker file name from constants.
265
-        self.dockerClient.images.build(tag="photon_build_container:latest",
260
+        self.dockerClient.images.build(tag=constants.buildContainerImage,
266 261
                                        path=".",
267 262
                                        rm=True,
268 263
                                        dockerfile="Dockerfile.photon_build_container")
269 264
 
270 265
         # Cleanup
271 266
         cmd = "rm -f ./tcroot.tar.gz"
272
-        cmdUtils.runCommandInShell(cmd, self.logPath + "/toolchain-chroot4.log")
273
-        chrUtils.destroyChroot(chrootID)
267
+        cmdUtils.runCommandInShell(cmd, logfn=self.logger.debug)
268
+        chroot.destroy()
274 269
         self.logger.debug("Photon build container successfully created.")
... ...
@@ -21,8 +21,6 @@ class PackageUtils(object):