Introduce new basic spec contains only essential tools.
basic iso will contain only minimum list of packages and
minimal-iso is also a minimal iso but contains more tools which are
useful in cloud instances.
Change-Id: Ib57671da4b1ccbd528fbd98e842ab5411ee9fe62
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/c/photon/+/20516
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,41 @@ |
| 0 |
+Name: basic |
|
| 1 |
+Summary: Metapackage to install minimal profile |
|
| 2 |
+Version: 5.0 |
|
| 3 |
+Release: 1%{?dist}
|
|
| 4 |
+License: Apache 2.0 |
|
| 5 |
+Group: System Environment/Base |
|
| 6 |
+URL: https://vmware.github.io/photon |
|
| 7 |
+Vendor: VMware, Inc. |
|
| 8 |
+Distribution: Photon |
|
| 9 |
+ |
|
| 10 |
+Requires: Linux-PAM |
|
| 11 |
+Requires: bash |
|
| 12 |
+Requires: coreutils-selinux |
|
| 13 |
+Requires: cracklib |
|
| 14 |
+Requires: cracklib-dicts |
|
| 15 |
+Requires: dbus |
|
| 16 |
+Requires: filesystem |
|
| 17 |
+Requires: findutils |
|
| 18 |
+Requires: grep |
|
| 19 |
+Requires: grub2-efi-image |
|
| 20 |
+Requires: grub2-theme |
|
| 21 |
+Requires: openssh |
|
| 22 |
+Requires: photon-release |
|
| 23 |
+Requires: photon-repos |
|
| 24 |
+Requires: sed |
|
| 25 |
+Requires: systemd |
|
| 26 |
+Requires: systemd-udev |
|
| 27 |
+Requires: tdnf |
|
| 28 |
+ |
|
| 29 |
+%description |
|
| 30 |
+Metapackage to install minimal profile |
|
| 31 |
+ |
|
| 32 |
+%prep |
|
| 33 |
+%build |
|
| 34 |
+ |
|
| 35 |
+%files |
|
| 36 |
+%defattr(-,root,root,0755) |
|
| 37 |
+ |
|
| 38 |
+%changelog |
|
| 39 |
+* Sat Jul 15 2023 Shreenidhi Shedi <sshedi@vmware.com> 5.0-1 |
|
| 40 |
+- Basic set packages required for Photon |
| ... | ... |
@@ -1,55 +1,42 @@ |
| 1 |
-Name: minimal |
|
| 2 |
-Summary: Metapackage to install minimal profile |
|
| 3 |
-Version: 0.1 |
|
| 4 |
-Release: 7%{?dist}
|
|
| 5 |
-License: Apache 2.0 |
|
| 6 |
-Group: System Environment/Base |
|
| 7 |
-URL: https://vmware.github.io/photon/ |
|
| 8 |
-Vendor: VMware, Inc. |
|
| 1 |
+Name: minimal |
|
| 2 |
+Summary: Metapackage to install minimal profile for cloud images |
|
| 3 |
+Version: 5.0 |
|
| 4 |
+Release: 1%{?dist}
|
|
| 5 |
+License: Apache 2.0 |
|
| 6 |
+Group: System Environment/Base |
|
| 7 |
+URL: https://vmware.github.io/photon |
|
| 8 |
+Vendor: VMware, Inc. |
|
| 9 | 9 |
Distribution: Photon |
| 10 | 10 |
|
| 11 |
-Requires: bc |
|
| 12 |
-Requires: bridge-utils |
|
| 13 |
-Requires: bzip2 |
|
| 14 |
-Requires: cloud-init |
|
| 15 |
-Requires: cpio |
|
| 16 |
-Requires: cracklib-dicts |
|
| 17 |
-Requires: dbus |
|
| 18 |
-Requires: docker |
|
| 19 |
-Requires: e2fsprogs |
|
| 20 |
-Requires: file |
|
| 21 |
-Requires: filesystem |
|
| 22 |
-Requires: findutils |
|
| 23 |
-Requires: gdbm |
|
| 24 |
-Requires: grep |
|
| 25 |
-Requires: grub2-efi-image |
|
| 26 |
-Requires: grub2-theme |
|
| 27 |
-Requires: gzip |
|
| 28 |
-Requires: iana-etc |
|
| 29 |
-Requires: iproute2 |
|
| 30 |
-Requires: iptables |
|
| 31 |
-Requires: iputils |
|
| 32 |
-Requires: Linux-PAM |
|
| 33 |
-Requires: motd |
|
| 34 |
-Requires: net-tools |
|
| 35 |
-Requires: openssh |
|
| 36 |
-Requires: photon-release |
|
| 37 |
-Requires: photon-repos |
|
| 38 |
-Requires: procps-ng |
|
| 39 |
-Requires: rpm |
|
| 40 |
-Requires: rpm-plugin-systemd-inhibit |
|
| 41 |
-Requires: sed |
|
| 42 |
-Requires: systemd |
|
| 43 |
-Requires: systemd-libs |
|
| 44 |
-Requires: systemd-pam |
|
| 45 |
-Requires: systemd-rpm-macros |
|
| 46 |
-Requires: systemd-udev |
|
| 47 |
-Requires: tdnf |
|
| 48 |
-Requires: tzdata |
|
| 49 |
-Requires: util-linux |
|
| 50 |
-Requires: vim |
|
| 51 |
-Requires: which |
|
| 52 |
-Requires: open-vm-tools-gosc |
|
| 11 |
+Requires: bc |
|
| 12 |
+Requires: bridge-utils |
|
| 13 |
+Requires: bzip2 |
|
| 14 |
+Requires: cloud-init |
|
| 15 |
+Requires: cpio |
|
| 16 |
+Requires: docker |
|
| 17 |
+Requires: dracut |
|
| 18 |
+Requires: e2fsprogs |
|
| 19 |
+Requires: file |
|
| 20 |
+Requires: gdbm |
|
| 21 |
+Requires: grep |
|
| 22 |
+Requires: gzip |
|
| 23 |
+Requires: iana-etc |
|
| 24 |
+Requires: initramfs |
|
| 25 |
+Requires: iproute2 |
|
| 26 |
+Requires: iptables |
|
| 27 |
+Requires: iputils |
|
| 28 |
+Requires: basic |
|
| 29 |
+Requires: motd |
|
| 30 |
+Requires: net-tools |
|
| 31 |
+Requires: open-vm-tools |
|
| 32 |
+Requires: open-vm-tools-gosc |
|
| 33 |
+Requires: procps-ng |
|
| 34 |
+Requires: rpm |
|
| 35 |
+Requires: rpm-plugin-systemd-inhibit |
|
| 36 |
+Requires: tzdata |
|
| 37 |
+Requires: util-linux |
|
| 38 |
+Requires: vim |
|
| 39 |
+Requires: which |
|
| 53 | 40 |
|
| 54 | 41 |
%description |
| 55 | 42 |
Metapackage to install minimal profile |
| ... | ... |
@@ -57,10 +44,15 @@ Metapackage to install minimal profile |
| 57 | 57 |
%prep |
| 58 | 58 |
%build |
| 59 | 59 |
|
| 60 |
+%clean |
|
| 61 |
+rm -rf %{buildroot}/*
|
|
| 62 |
+ |
|
| 60 | 63 |
%files |
| 61 | 64 |
%defattr(-,root,root,0755) |
| 62 | 65 |
|
| 63 | 66 |
%changelog |
| 67 |
+* Sat Jul 15 2023 Shreenidhi Shedi <sshedi@vmware.com> 5.0-1 |
|
| 68 |
+- Sort the require list and chop down package into basic |
|
| 64 | 69 |
* Mon Jul 18 2022 <okurth@vmware.com> 0.1-7 |
| 65 | 70 |
- Remove pkg-config and libtool |
| 66 | 71 |
* Wed Oct 20 2021 Shreenidhi Shedi <sshedi@vmware.com> 0.1-6 |
| ... | ... |
@@ -54,11 +54,13 @@ targetDict = {
|
| 54 | 54 |
"k8s-docker-images", |
| 55 | 55 |
"all-images", |
| 56 | 56 |
"minimal-iso", |
| 57 |
+ "basic-iso", |
|
| 57 | 58 |
"rt-iso", |
| 58 | 59 |
], |
| 59 | 60 |
"rpmBuild": [ |
| 60 | 61 |
"packages", |
| 61 | 62 |
"packages-minimal", |
| 63 |
+ "packages-basic", |
|
| 62 | 64 |
"packages-rt", |
| 63 | 65 |
"packages-initrd", |
| 64 | 66 |
"packages-docker", |
| ... | ... |
@@ -298,6 +300,7 @@ class Utilities: |
| 298 | 298 |
runBashCmd( |
| 299 | 299 |
f"cp {Build_Config.dataDir}/build_install_options_all.json"
|
| 300 | 300 |
f" {Build_Config.dataDir}/build_install_options_minimal.json"
|
| 301 |
+ f" {Build_Config.dataDir}/build_install_options_basic.json"
|
|
| 301 | 302 |
f" {Build_Config.dataDir}/build_install_options_rt.json"
|
| 302 | 303 |
f" {Build_Config.generatedDataPath}"
|
| 303 | 304 |
) |
| ... | ... |
@@ -790,6 +793,24 @@ class RpmBuildTarget: |
| 790 | 790 |
BuildEnvironmentSetup.packages_cached() |
| 791 | 791 |
check_prerequesite["packages-minimal"] = True |
| 792 | 792 |
|
| 793 |
+ def packages_basic(self): |
|
| 794 |
+ if check_prerequesite["packages-basic"]: |
|
| 795 |
+ return |
|
| 796 |
+ |
|
| 797 |
+ if not configdict["additional-path"]["photon-cache-path"]: |
|
| 798 |
+ Builder.buildPackagesInJson( |
|
| 799 |
+ os.path.join( |
|
| 800 |
+ Build_Config.dataDir, "packages_basic.json" |
|
| 801 |
+ ), |
|
| 802 |
+ Build_Config.buildThreads, |
|
| 803 |
+ Build_Config.pkgBuildType, |
|
| 804 |
+ Build_Config.pkgInfoFile, |
|
| 805 |
+ self.logger, |
|
| 806 |
+ ) |
|
| 807 |
+ else: |
|
| 808 |
+ BuildEnvironmentSetup.packages_cached() |
|
| 809 |
+ check_prerequesite["packages-basic"] = True |
|
| 810 |
+ |
|
| 793 | 811 |
def packages_rt(self): |
| 794 | 812 |
if check_prerequesite["packages-rt"]: |
| 795 | 813 |
return |
| ... | ... |
@@ -1145,8 +1166,8 @@ class BuildImage: |
| 1145 | 1145 |
self.src_iso_path = None |
| 1146 | 1146 |
imgType = "photon" |
| 1147 | 1147 |
|
| 1148 |
- if imgName in ["minimal-iso", "rt-iso"]: |
|
| 1149 |
- flavor = imgName.split("-iso")[0]
|
|
| 1148 |
+ if imgName in ["minimal-iso", "rt-iso", "basic-iso"]: |
|
| 1149 |
+ flavor = imgName.strip("-iso").replace("-", "_")
|
|
| 1150 | 1150 |
imgType = f"photon-{flavor}"
|
| 1151 | 1151 |
self.package_list_file = ( |
| 1152 | 1152 |
f"{Build_Config.dataDir}/build_install_options_{flavor}.json"
|
| ... | ... |
@@ -1158,7 +1179,11 @@ class BuildImage: |
| 1158 | 1158 |
) |
| 1159 | 1159 |
self.package_list_file = Build_Config.packageListFile |
| 1160 | 1160 |
|
| 1161 |
- self.iso_path = f"{Build_Config.stagePath}/{imgType}-{constants.releaseVersion}-{constants.buildNumber}.{constants.currentArch}.iso"
|
|
| 1161 |
+ self.iso_path = ( |
|
| 1162 |
+ f"{Build_Config.stagePath}/{imgType}-"
|
|
| 1163 |
+ f"{constants.releaseVersion}-"
|
|
| 1164 |
+ f"{constants.buildNumber}.{constants.currentArch}.iso"
|
|
| 1165 |
+ ) |
|
| 1162 | 1166 |
self.debug_iso_path = self.iso_path.rpartition(".")[0] + ".debug.iso"
|
| 1163 | 1167 |
|
| 1164 | 1168 |
if "SKIP_DEBUG_ISO" in os.environ: |
| ... | ... |
@@ -1172,7 +1197,10 @@ class BuildImage: |
| 1172 | 1172 |
def img_present(self, img): |
| 1173 | 1173 |
build_num = constants.buildNumber |
| 1174 | 1174 |
release_ver = constants.releaseVersion |
| 1175 |
- img_fn = f"{Build_Config.stagePath}/{img}/photon-{img}-{release_ver}-{build_num}.{constants.currentArch}"
|
|
| 1175 |
+ img_fn = ( |
|
| 1176 |
+ f"{Build_Config.stagePath}/{img}/photon-{img}-{release_ver}-"
|
|
| 1177 |
+ f"{build_num}.{constants.currentArch}"
|
|
| 1178 |
+ ) |
|
| 1176 | 1179 |
|
| 1177 | 1180 |
if img == "ova": |
| 1178 | 1181 |
img_fn = f"{img_fn}.ova"
|
| ... | ... |
@@ -1180,11 +1208,20 @@ class BuildImage: |
| 1180 | 1180 |
img_fn = f"{img_fn}.tar.gz"
|
| 1181 | 1181 |
elif img == "azure": |
| 1182 | 1182 |
img_fn = f"{img_fn}.vhd.tar.gz"
|
| 1183 |
- elif img in {"iso", "minimal-iso", "rt-iso", "src-iso"}:
|
|
| 1183 |
+ elif img in {
|
|
| 1184 |
+ "iso", |
|
| 1185 |
+ "rt-iso", |
|
| 1186 |
+ "src-iso", |
|
| 1187 |
+ "minimal-iso", |
|
| 1188 |
+ "basic-iso", |
|
| 1189 |
+ }: |
|
| 1184 | 1190 |
img = img.strip("-iso")
|
| 1185 | 1191 |
if img: |
| 1186 | 1192 |
img = f"-{img}"
|
| 1187 |
- img_fn = f"{Build_Config.stagePath}/photon{img}-{release_ver}-{build_num}.{constants.currentArch}.iso"
|
|
| 1193 |
+ img_fn = ( |
|
| 1194 |
+ f"{Build_Config.stagePath}/photon{img}-{release_ver}-"
|
|
| 1195 |
+ f"{build_num}.{constants.currentArch}.iso"
|
|
| 1196 |
+ ) |
|
| 1188 | 1197 |
elif img in {"rpi", "ls1012afrwy"}:
|
| 1189 | 1198 |
img_fn = f"{img_fn}.xz"
|
| 1190 | 1199 |
else: |
| ... | ... |
@@ -1206,15 +1243,17 @@ class BuildImage: |
| 1206 | 1206 |
rpmBuildTarget.packages() |
| 1207 | 1207 |
elif self.img_name == "rt-iso": |
| 1208 | 1208 |
rpmBuildTarget.packages_rt() |
| 1209 |
+ elif self.img_name == "basic-iso": |
|
| 1210 |
+ rpmBuildTarget.packages_basic() |
|
| 1209 | 1211 |
else: |
| 1210 | 1212 |
rpmBuildTarget.packages_minimal() |
| 1211 | 1213 |
|
| 1212 |
- if self.img_name in ["rt-iso", "minimal-iso"]: |
|
| 1214 |
+ if self.img_name in ["rt-iso", "minimal-iso", "basic-iso"]: |
|
| 1213 | 1215 |
rpmBuildTarget.packages_initrd() |
| 1214 | 1216 |
|
| 1215 | 1217 |
RpmBuildTarget.create_repo() |
| 1216 | 1218 |
|
| 1217 |
- if self.img_name != "minimal-iso": |
|
| 1219 |
+ if self.img_name not in ["minimal-iso", "basic-iso"]: |
|
| 1218 | 1220 |
RpmBuildTarget.ostree_repo() |
| 1219 | 1221 |
self.generated_data_path = Build_Config.generatedDataPath |
| 1220 | 1222 |
|
| ... | ... |
@@ -1325,10 +1364,11 @@ class BuildImage: |
| 1325 | 1325 |
"all-images", |
| 1326 | 1326 |
"src-iso", |
| 1327 | 1327 |
"minimal-iso", |
| 1328 |
+ "basic-iso", |
|
| 1328 | 1329 |
] |
| 1329 | 1330 |
for img in images: |
| 1330 | 1331 |
self.img_name = img |
| 1331 |
- if img in ["iso", "src-iso", "minimal-iso"]: |
|
| 1332 |
+ if img in ["iso", "src-iso", "minimal-iso", "basic-iso"]: |
|
| 1332 | 1333 |
self.set_Iso_Parameters(img) |
| 1333 | 1334 |
self.build_iso() |
| 1334 | 1335 |
else: |
| ... | ... |
@@ -1727,7 +1767,13 @@ def main(): |
| 1727 | 1727 |
attr = None |
| 1728 | 1728 |
if targetName in targetDict["image"]: |
| 1729 | 1729 |
buildImage = BuildImage(targetName) |
| 1730 |
- if targetName in ["iso", "src-iso", "minimal-iso", "rt-iso"]: |
|
| 1730 |
+ if targetName in [ |
|
| 1731 |
+ "iso", |
|
| 1732 |
+ "src-iso", |
|
| 1733 |
+ "minimal-iso", |
|
| 1734 |
+ "rt-iso", |
|
| 1735 |
+ "basic-iso", |
|
| 1736 |
+ ]: |
|
| 1731 | 1737 |
buildImage.set_Iso_Parameters(targetName) |
| 1732 | 1738 |
buildImage.build_iso() |
| 1733 | 1739 |
elif targetName in buildImage.ova_cloud_images + [ |