Skip to content

Commit 9e778f4

Browse files
committed
Update EULA for 5.0 Beta
Change-Id: Ic93896474feef35625cd6b3852cf3c5446d6d9aa Signed-off-by: Tapas Kundu <[email protected]> Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/19291
1 parent af0e5f8 commit 9e778f4

File tree

6 files changed

+270
-411
lines changed

6 files changed

+270
-411
lines changed

EULA.txt

Lines changed: 88 additions & 137 deletions
Large diffs are not rendered by default.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
From 997e619c91efb9fe70160ef2066bf93a82d058ab Mon Sep 17 00:00:00 2001
2+
From: Piyush Gupta <[email protected]>
3+
Date: Fri, 27 Jan 2023 06:51:21 +0000
4+
Subject: [PATCH] customIso: Use branch specific license text and EULA.
5+
6+
Change-Id: I73f64c79a82267e8b7670ab42148a7e99db11b43
7+
---
8+
photon_installer/generate_initrd.sh | 11 +++++++++--
9+
photon_installer/isoBuilder.py | 3 ++-
10+
2 files changed, 11 insertions(+), 3 deletions(-)
11+
12+
diff --git a/photon_installer/generate_initrd.sh b/photon_installer/generate_initrd.sh
13+
index d5eec35e..f823f27b 100755
14+
--- a/photon_installer/generate_initrd.sh
15+
+++ b/photon_installer/generate_initrd.sh
16+
@@ -11,9 +11,16 @@ CUSTOM_PKG_LIST_FILE=$5
17+
PACKAGE_LIST_FILE_BASE_NAME="build_install_options_custom.json"
18+
CUSTOM_PKG_LIST_FILE_BASE_NAME=$(basename "${CUSTOM_PKG_LIST_FILE}")
19+
INITRD=$WORKINGDIR/photon-chroot
20+
+LICENSE_TEXT="VMWARE $PHOTON_RELEASE_VER"
21+
22+
mkdir -m 755 -p $INITRD
23+
24+
+if ! eval "$(grep -m 1 -w 'BETA LICENSE AGREEMENT' $WORKINGDIR/EULA.txt)"; then
25+
+ LICENSE_TEXT+=" BETA"
26+
+fi
27+
+
28+
+LICENSE_TEXT+=" LICENSE AGREEMENT"
29+
+
30+
cat > ${WORKINGDIR}/photon-local.repo <<EOF
31+
[photon-local]
32+
name=VMware Photon Linux
33+
@@ -71,7 +78,7 @@ mv ${INITRD}/boot ${WORKINGDIR}/
34+
35+
mkdir -p $INITRD/installer
36+
cp $SCRIPT_PATH/sample_ui.cfg ${INITRD}/installer
37+
-cp $SCRIPT_PATH/EULA.txt ${INITRD}/installer
38+
+mv ${WORKINGDIR}/EULA.txt ${INITRD}/installer
39+
40+
# TODO: change minimal to custom.json
41+
cat > ${INITRD}/installer/build_install_options_custom.json << EOF
42+
@@ -116,7 +123,7 @@ cat >> ${INITRD}/bin/bootphotoninstaller << EOF
43+
cd /installer
44+
ACTIVE_CONSOLE="\$(< /sys/devices/virtual/tty/console/active)"
45+
install() {
46+
- LANG=en_US.UTF-8 photon-installer -i iso -o $PACKAGE_LIST_FILE_BASE_NAME -e EULA.txt -t "VMWARE 4.0 LICENSE AGREEMENT" -v $PHOTON_RELEASE_VER && shutdown -r now
47+
+ LANG=en_US.UTF-8 photon-installer -i iso -o $PACKAGE_LIST_FILE_BASE_NAME -e EULA.txt -t "$LICENSE_TEXT" -v $PHOTON_RELEASE_VER && shutdown -r now
48+
}
49+
try_run_installer() {
50+
if [ "\$ACTIVE_CONSOLE" == "tty0" ]; then
51+
diff --git a/photon_installer/isoBuilder.py b/photon_installer/isoBuilder.py
52+
index b7167c65..5babef12 100755
53+
--- a/photon_installer/isoBuilder.py
54+
+++ b/photon_installer/isoBuilder.py
55+
@@ -229,7 +229,8 @@ class IsoBuilder(object):
56+
# Download open source license for given branch and extract it in working dir.
57+
files_to_download = [f"https://github.com/vmware/photon/raw/{self.photon_release_version}/support/image-builder/iso/open_source_license.tar.gz",
58+
f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/NOTICE-Apachev2",
59+
- f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/NOTICE-GPL2.0"]
60+
+ f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/NOTICE-GPL2.0",
61+
+ f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/EULA.txt"]
62+
for file in files_to_download:
63+
self.logger.info(f"Downloading file: {file}")
64+
self.cmdUtil.wget(file, f'{self.working_dir}/{os.path.basename(file)}')
65+
--
66+
2.23.3
67+

SPECS/photon-os-installer/photon-os-installer.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Summary: Photon OS Installer
44
Name: photon-os-installer
55
Version: 2.0
6-
Release: 14%{?dist}
6+
Release: 15%{?dist}
77
License: Apache 2.0 and GPL 2.0
88
Group: System Environment/Base
99
Vendor: VMware, Inc.
@@ -27,6 +27,7 @@ Patch12: 0013-isoInstaller-dynamic-retry-mount-media-count.patch
2727
Patch13: 0014-installer.py-Parse-string-before-passing-to-int.patch
2828
Patch14: 0015-Add-support-for-customInitrd-and-customIso.patch
2929
Patch15: 0016-upgrade-ostree-repo.patch
30+
Patch16: 0017-customIso-Use-branch-specific-license-text-and-EULA.patch
3031
BuildRequires: python3-devel
3132
BuildRequires: python3-pyinstaller
3233
BuildRequires: python3-requests
@@ -56,6 +57,8 @@ rm -rf %{buildroot}
5657
%{_bindir}/photon-installer
5758

5859
%changelog
60+
* Fri Jan 27 2023 Tapas Kundu <[email protected]> 2.0-15
61+
- Update EULA for 5.0 Beta
5962
* Fri Jan 20 2023 Him Kalyan Bordoloi <[email protected]> 2.0-14
6063
- Remove depricated package linux-aws from installer
6164
* Tue Jan 17 2023 Piyush Gupta <[email protected]> 2.0-13

support/image-builder/iso/mk-install-iso.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ cd /installer
160160
ACTIVE_CONSOLE="\$(< /sys/devices/virtual/tty/console/active)"
161161
162162
install() {
163-
LANG=en_US.UTF-8 photon-installer -i iso -o $PACKAGE_LIST_FILE_BASE_NAME -e EULA.txt -t "VMWARE 5.0 LICENSE AGREEMENT" -v $PHOTON_RELEASE_VER && shutdown -r now
163+
LANG=en_US.UTF-8 photon-installer -i iso -o $PACKAGE_LIST_FILE_BASE_NAME -e EULA.txt -t "VMWARE 5.0 BETA LICENSE AGREEMENT" -v $PHOTON_RELEASE_VER && shutdown -r now
164164
}
165165
166166
try_run_installer() {

0 commit comments

Comments
 (0)