-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ic93896474feef35625cd6b3852cf3c5446d6d9aa Signed-off-by: Tapas Kundu <[email protected]> Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/19291
- Loading branch information
Showing
6 changed files
with
270 additions
and
411 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
SPECS/photon-os-installer/0017-customIso-Use-branch-specific-license-text-and-EULA.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
From 997e619c91efb9fe70160ef2066bf93a82d058ab Mon Sep 17 00:00:00 2001 | ||
From: Piyush Gupta <[email protected]> | ||
Date: Fri, 27 Jan 2023 06:51:21 +0000 | ||
Subject: [PATCH] customIso: Use branch specific license text and EULA. | ||
|
||
Change-Id: I73f64c79a82267e8b7670ab42148a7e99db11b43 | ||
--- | ||
photon_installer/generate_initrd.sh | 11 +++++++++-- | ||
photon_installer/isoBuilder.py | 3 ++- | ||
2 files changed, 11 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/photon_installer/generate_initrd.sh b/photon_installer/generate_initrd.sh | ||
index d5eec35e..f823f27b 100755 | ||
--- a/photon_installer/generate_initrd.sh | ||
+++ b/photon_installer/generate_initrd.sh | ||
@@ -11,9 +11,16 @@ CUSTOM_PKG_LIST_FILE=$5 | ||
PACKAGE_LIST_FILE_BASE_NAME="build_install_options_custom.json" | ||
CUSTOM_PKG_LIST_FILE_BASE_NAME=$(basename "${CUSTOM_PKG_LIST_FILE}") | ||
INITRD=$WORKINGDIR/photon-chroot | ||
+LICENSE_TEXT="VMWARE $PHOTON_RELEASE_VER" | ||
|
||
mkdir -m 755 -p $INITRD | ||
|
||
+if ! eval "$(grep -m 1 -w 'BETA LICENSE AGREEMENT' $WORKINGDIR/EULA.txt)"; then | ||
+ LICENSE_TEXT+=" BETA" | ||
+fi | ||
+ | ||
+LICENSE_TEXT+=" LICENSE AGREEMENT" | ||
+ | ||
cat > ${WORKINGDIR}/photon-local.repo <<EOF | ||
[photon-local] | ||
name=VMware Photon Linux | ||
@@ -71,7 +78,7 @@ mv ${INITRD}/boot ${WORKINGDIR}/ | ||
|
||
mkdir -p $INITRD/installer | ||
cp $SCRIPT_PATH/sample_ui.cfg ${INITRD}/installer | ||
-cp $SCRIPT_PATH/EULA.txt ${INITRD}/installer | ||
+mv ${WORKINGDIR}/EULA.txt ${INITRD}/installer | ||
|
||
# TODO: change minimal to custom.json | ||
cat > ${INITRD}/installer/build_install_options_custom.json << EOF | ||
@@ -116,7 +123,7 @@ cat >> ${INITRD}/bin/bootphotoninstaller << EOF | ||
cd /installer | ||
ACTIVE_CONSOLE="\$(< /sys/devices/virtual/tty/console/active)" | ||
install() { | ||
- 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 | ||
+ 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 | ||
} | ||
try_run_installer() { | ||
if [ "\$ACTIVE_CONSOLE" == "tty0" ]; then | ||
diff --git a/photon_installer/isoBuilder.py b/photon_installer/isoBuilder.py | ||
index b7167c65..5babef12 100755 | ||
--- a/photon_installer/isoBuilder.py | ||
+++ b/photon_installer/isoBuilder.py | ||
@@ -229,7 +229,8 @@ class IsoBuilder(object): | ||
# Download open source license for given branch and extract it in working dir. | ||
files_to_download = [f"https://github.com/vmware/photon/raw/{self.photon_release_version}/support/image-builder/iso/open_source_license.tar.gz", | ||
f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/NOTICE-Apachev2", | ||
- f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/NOTICE-GPL2.0"] | ||
+ f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/NOTICE-GPL2.0", | ||
+ f"https://raw.githubusercontent.com/vmware/photon/{self.photon_release_version}/EULA.txt"] | ||
for file in files_to_download: | ||
self.logger.info(f"Downloading file: {file}") | ||
self.cmdUtil.wget(file, f'{self.working_dir}/{os.path.basename(file)}') | ||
-- | ||
2.23.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
Summary: Photon OS Installer | ||
Name: photon-os-installer | ||
Version: 2.0 | ||
Release: 14%{?dist} | ||
Release: 15%{?dist} | ||
License: Apache 2.0 and GPL 2.0 | ||
Group: System Environment/Base | ||
Vendor: VMware, Inc. | ||
|
@@ -27,6 +27,7 @@ Patch12: 0013-isoInstaller-dynamic-retry-mount-media-count.patch | |
Patch13: 0014-installer.py-Parse-string-before-passing-to-int.patch | ||
Patch14: 0015-Add-support-for-customInitrd-and-customIso.patch | ||
Patch15: 0016-upgrade-ostree-repo.patch | ||
Patch16: 0017-customIso-Use-branch-specific-license-text-and-EULA.patch | ||
BuildRequires: python3-devel | ||
BuildRequires: python3-pyinstaller | ||
BuildRequires: python3-requests | ||
|
@@ -56,6 +57,8 @@ rm -rf %{buildroot} | |
%{_bindir}/photon-installer | ||
|
||
%changelog | ||
* Fri Jan 27 2023 Tapas Kundu <[email protected]> 2.0-15 | ||
- Update EULA for 5.0 Beta | ||
* Fri Jan 20 2023 Him Kalyan Bordoloi <[email protected]> 2.0-14 | ||
- Remove depricated package linux-aws from installer | ||
* Tue Jan 17 2023 Piyush Gupta <[email protected]> 2.0-13 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.