From 6390a19367fced6efda4290824ab5885b2a6a146 Mon Sep 17 00:00:00 2001 From: slowy07 Date: Wed, 18 Aug 2021 08:55:39 +0700 Subject: [PATCH] fix: typo spelling grammar --- toolkit/docs/building/building.md | 12 ++++++------ toolkit/docs/how_it_works/3_package_building.md | 4 ++-- toolkit/docs/security/ca-certificates.md | 2 +- toolkit/tools/grapher/grapher.go | 4 ++-- toolkit/tools/graphoptimizer/graphoptimizer.go | 4 ++-- toolkit/tools/imagegen/configuration/systemconfig.go | 2 +- toolkit/tools/imagegen/diskutils/encryption.go | 2 +- toolkit/tools/imagegen/diskutils/initramfs.go | 2 +- toolkit/tools/imagegen/diskutils/verity.go | 2 +- toolkit/tools/imagegen/installutils/installutils.go | 8 ++++---- toolkit/tools/imager/imager.go | 4 ++-- toolkit/tools/internal/exe/exe.go | 2 +- toolkit/tools/internal/pkggraph/pkggraph.go | 2 +- toolkit/tools/internal/safechroot/safechroot.go | 2 +- toolkit/tools/specreader/specreader.go | 2 +- toolkit/tools/unravel/formats/makefile.go | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/toolkit/docs/building/building.md b/toolkit/docs/building/building.md index e224dc6eb53..0742d3ac047 100644 --- a/toolkit/docs/building/building.md +++ b/toolkit/docs/building/building.md @@ -105,7 +105,7 @@ cd CBL-Mariner/toolkit git checkout 1.0-stable ``` -**IMPORTANT:** The 1.0-stable tag always points to the latest known good build of CBL-Mariner. At this time, only the Mariner 1.0 branch is buildable. This branch is continually updated with bug fixes, security vulnerability fixes or occassional feature enhancements. Fixes may be applied to this branch at any time. As those fixes are integrated into the branch the head of a branch may be temporarily unstable. The 1.0-stable tag will remain fixed until the tip of the branch is validated and the latest source and binary packages (SRPMs and RPMs) are published. At that point, the 1.0-stable tag is advanced. To ensure you have the latest invoke _git fetch --tags_ before building. +**IMPORTANT:** The 1.0-stable tag always points to the latest known good build of CBL-Mariner. At this time, only the Mariner 1.0 branch is buildable. This branch is continually updated with bug fixes, security vulnerability fixes or occasional feature enhancements. Fixes may be applied to this branch at any time. As those fixes are integrated into the branch the head of a branch may be temporarily unstable. The 1.0-stable tag will remain fixed until the tip of the branch is validated and the latest source and binary packages (SRPMs and RPMs) are published. At that point, the 1.0-stable tag is advanced. To ensure you have the latest invoke _git fetch --tags_ before building. It is also possible to build an older version of CBL-Mariner from the 1.0 branch. CBL-Mariner may be updated at any time, but an aggregate release is declared monthly and [tagged in github](https://github.com/microsoft/CBL-Mariner/releases). These monthly builds are stable and their tags can be substituted for the 1.0-stable label above. @@ -190,7 +190,7 @@ sudo make image CONFIG_FILE=./imageconfigs/core-legacy.json REBUILD_TOOLS=y SOUR # To build a Mariner VHDX Image (VHDX folder ../out/images/core-efi) sudo make image CONFIG_FILE=./imageconfigs/core-efi.json REBUILD_TOOLS=y SOURCE_URL=https://cblmarinerstorage.blob.core.windows.net/sources/core -# To build a Mariner Contianer Image (Container Folder: ../out/images/core-container/*.tar.gz +# To build a Mariner Container Image (Container Folder: ../out/images/core-container/*.tar.gz sudo make image CONFIG_FILE=./imageconfigs/core-container.json REBUILD_TOOLS=y SOURCE_URL=https://cblmarinerstorage.blob.core.windows.net/sources/core ``` @@ -374,11 +374,11 @@ If that is not desired all remote sources can be disabled by clearing the follow #### `PACKAGE_URL_LIST=...` -> Space seperated list of URLs to download toolchain RPM packages from, used to populate the toolchain packages if `$(REBUILD_TOOLCHAIN)` is set to `y`. +> Space separated list of URLs to download toolchain RPM packages from, used to populate the toolchain packages if `$(REBUILD_TOOLCHAIN)` is set to `y`. #### `SRPM_URL_LIST=...` -> Space seperated list of URLs to download packed SRPM packages from prior to build if `$(DOWNLOAD_SRPMS)` is set to `y`. +> Space separated list of URLs to download packed SRPM packages from prior to build if `$(DOWNLOAD_SRPMS)` is set to `y`. #### `REPO_LIST=...` @@ -615,8 +615,8 @@ To reproduce an ISO build, run the same make invocation as before, but set: | Variable | Default | Description |:------------------------------|:---------------------------------------------------------------------------------------------------------|:--- | SOURCE_URL | | URL to request package sources from -| SRPM_URL_LIST | `https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR_ID)/prod/base/srpms` | Space seperated list of URLs to request packed SRPMs from if `$(DOWNLOAD_SRPMS)` is set to `y` -| PACKAGE_URL_LIST | `https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR_ID)/prod/base/$(build_arch)/rpms` | Space seperated list of URLs to download toolchain RPM packages from, used to populate the toolchain packages if `$(REBUILD_TOOLCHAIN)` is set to `y`. +| SRPM_URL_LIST | `https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR_ID)/prod/base/srpms` | Space separated list of URLs to request packed SRPMs from if `$(DOWNLOAD_SRPMS)` is set to `y` +| PACKAGE_URL_LIST | `https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR_ID)/prod/base/$(build_arch)/rpms` | Space separated list of URLs to download toolchain RPM packages from, used to populate the toolchain packages if `$(REBUILD_TOOLCHAIN)` is set to `y`. | REPO_LIST | | Space separated list of repo files for tdnf to pull packages form | CA_CERT | | CA cert to access the above resources, in addition to the system certificate store | TLS_CERT | | TLS cert to access the above resources diff --git a/toolkit/docs/how_it_works/3_package_building.md b/toolkit/docs/how_it_works/3_package_building.md index bc114881ad9..54e30fc366b 100644 --- a/toolkit/docs/how_it_works/3_package_building.md +++ b/toolkit/docs/how_it_works/3_package_building.md @@ -215,8 +215,8 @@ In this case the example package has no other dependencies, so it only depends o ### Stage 5: Pkgworker The `pkgworker` tool is not invoked directly by the build system, instead it is invoked from a recursive `Make` call to the dynamically generated `workplan.mk` file. -`Pkgworker` uses the `worker_chroot` (see [Chroot Worker](1_initial_prep.md#chroot_worker)) environment to build each package independently. First it creates an empty folder to build in (one for each package to build) and extracts the chroot archive into it. This preps the environment with all the toolchain packages which were made available during the prep stage (see [Toolchain](1_initial_prep.md#toolchain)). It then mounts the local RPM folder into the environment so the worker can access any build dependencies it has. Using `tdnf` and `rpmbuild` the worker installs the build dependencies from the local packages, then builds the require package. Once the build is complete the freshly build pacakge is placed into the `./../out/RPMS/` folder to be available to future workers. +`Pkgworker` uses the `worker_chroot` (see [Chroot Worker](1_initial_prep.md#chroot_worker)) environment to build each package independently. First it creates an empty folder to build in (one for each package to build) and extracts the chroot archive into it. This preps the environment with all the toolchain packages which were made available during the prep stage (see [Toolchain](1_initial_prep.md#toolchain)). It then mounts the local RPM folder into the environment so the worker can access any build dependencies it has. Using `tdnf` and `rpmbuild` the worker installs the build dependencies from the local packages, then builds the require package. Once the build is complete the freshly build package is placed into the `./../out/RPMS/` folder to be available to future workers. -Because the dependency information has been encoded in `workplan.mk` it is possible to build multiple pacakges in parallel. `Make` will guarantee that no package is built before its `BuildRequires` are all satisfied as encoded in the graph. +Because the dependency information has been encoded in `workplan.mk` it is possible to build multiple packages in parallel. `Make` will guarantee that no package is built before its `BuildRequires` are all satisfied as encoded in the graph. ## Prev: [Initial Prep](2_local_packages.md), Next: [Image Generation](4_image_generation.md) \ No newline at end of file diff --git a/toolkit/docs/security/ca-certificates.md b/toolkit/docs/security/ca-certificates.md index 8fb69382fc4..040f2a24846 100644 --- a/toolkit/docs/security/ca-certificates.md +++ b/toolkit/docs/security/ca-certificates.md @@ -11,7 +11,7 @@ This package contains the basic SSL CA certificates available to use on all images. The certificates are split into two sub packages: - `ca-certificates-base` - package containing the minimal set of certificates required by the package management tools to authenticate the package repositories. -- `ca-certificates` - package containig a collection of Mozilla certificates listed in [Mozzila's certdata.txt file](https://hg.mozilla.org/releases/mozilla-release/file/tip/security/nss/lib/ckfw/builtins/certdata.txt). For exact version information please consult the [`ca-certificates.spec`](../../../SPECS/ca-certificates/ca-certificates.spec). Installing this package will automatically pull in `ca-certificates-base`. +- `ca-certificates` - package containing a collection of Mozilla certificates listed in [Mozzila's certdata.txt file](https://hg.mozilla.org/releases/mozilla-release/file/tip/security/nss/lib/ckfw/builtins/certdata.txt). For exact version information please consult the [`ca-certificates.spec`](../../../SPECS/ca-certificates/ca-certificates.spec). Installing this package will automatically pull in `ca-certificates-base`. In addition to the certificates, the `ca-certificates-tools` package provides tooling for [installation of custom certificates](#custom-configuration-of-the-ca-certificates). diff --git a/toolkit/tools/grapher/grapher.go b/toolkit/tools/grapher/grapher.go index dad6c949999..521ef6134f6 100644 --- a/toolkit/tools/grapher/grapher.go +++ b/toolkit/tools/grapher/grapher.go @@ -68,7 +68,7 @@ func main() { } // addUnresolvedPackage adds an unresolved node to the graph representing the -// packged described in the PackgetVer structure. Returns an error if the node +// packaged described in the PackgetVer structure. Returns an error if the node // could not be created. func addUnresolvedPackage(g *pkggraph.PkgGraph, pkgVer *pkgjson.PackageVer) (newRunNode *pkggraph.PkgNode, err error) { logger.Log.Debugf("Adding unresolved %s", pkgVer) @@ -134,7 +134,7 @@ func addNodesForPackage(g *pkggraph.PkgGraph, pkgVer *pkgjson.PackageVer, pkg *p } } - // A "run" node has an implicit dependency on its coresponding "build" node, encode that here. + // A "run" node has an implicit dependency on its corresponding "build" node, encode that here. // SetEdge panics on error, and does not support looping edges. newEdge := g.NewEdge(newRunNode, newBuildNode) defer func() { diff --git a/toolkit/tools/graphoptimizer/graphoptimizer.go b/toolkit/tools/graphoptimizer/graphoptimizer.go index ab4025698c1..ea68ca1f829 100644 --- a/toolkit/tools/graphoptimizer/graphoptimizer.go +++ b/toolkit/tools/graphoptimizer/graphoptimizer.go @@ -43,8 +43,8 @@ var ( outputGraphFile = exe.OutputFlag(app, "Path to save the optimized DOT graph file.") pkgsToBuild = app.Flag("packages", "Space seperated list of top-level packages that should be built. Omit for all packages.").String() - pkgsToRebuild = app.Flag("rebuild-packages", "Space seperated list of base package names packages that should be rebuilt.").String() - pkgsToIgnore = app.Flag("ignore-packages", "Space seperated list of base package names that should never be rebuilt (ie name of spec file).").String() + pkgsToRebuild = app.Flag("rebuild-packages", "Space separated list of base package names packages that should be rebuilt.").String() + pkgsToIgnore = app.Flag("ignore-packages", "Space separated list of base package names that should never be rebuilt (ie name of spec file).").String() imageConfig = app.Flag("image-config-file", "Optional image config file to extract a package list from.").String() baseDirPath = app.Flag("base-dir", "Base directory for relative file paths from the config. Defaults to config's directory.").ExistingDir() rpmDir = app.Flag("rpm-dir", "Directory that contains already built RPMs. Should contain top level directories for architecture.").Required().ExistingDir() diff --git a/toolkit/tools/imagegen/configuration/systemconfig.go b/toolkit/tools/imagegen/configuration/systemconfig.go index c937e528514..5c09d714609 100644 --- a/toolkit/tools/imagegen/configuration/systemconfig.go +++ b/toolkit/tools/imagegen/configuration/systemconfig.go @@ -38,7 +38,7 @@ type SystemConfig struct { func (s *SystemConfig) GetRootPartitionSetting() (rootPartitionSetting *PartitionSetting) { for i, p := range s.PartitionSettings { if p.MountPoint == "/" { - // We want to refernce the actual object in the slice + // We want to reference the actual object in the slice return &s.PartitionSettings[i] } } diff --git a/toolkit/tools/imagegen/diskutils/encryption.go b/toolkit/tools/imagegen/diskutils/encryption.go index 52d077adb66..be21c4cd175 100644 --- a/toolkit/tools/imagegen/diskutils/encryption.go +++ b/toolkit/tools/imagegen/diskutils/encryption.go @@ -46,7 +46,7 @@ func AddDefaultKeyfile(keyFileDir, devPath string, encrypt configuration.RootEnc _, stderr, err := shell.ExecuteWithStdin(encrypt.Password, "cryptsetup", "luksAddKey", devPath, fullKeyPath) if err != nil { - logger.Log.Warnf("Unable to add keyfile to encrypted devce: %v", stderr) + logger.Log.Warnf("Unable to add keyfile to encrypted device: %v", stderr) return } diff --git a/toolkit/tools/imagegen/diskutils/initramfs.go b/toolkit/tools/imagegen/diskutils/initramfs.go index 634d7535fd6..a57a960f494 100644 --- a/toolkit/tools/imagegen/diskutils/initramfs.go +++ b/toolkit/tools/imagegen/diskutils/initramfs.go @@ -161,7 +161,7 @@ func (i *InitramfsMount) Close() (err error) { } logger.Log.Infof("Bytes writen to file: %d", bytesIO) - // Explicit call to fsync, archive corruption was occuring occasionally otherwise. + // Explicit call to fsync, archive corruption was occurring occasionally otherwise. err = i.initramfsOutputFile.Sync() if err != nil { logger.Log.Errorf("Failed to sync initramfs file: '%s'", err.Error()) diff --git a/toolkit/tools/imagegen/diskutils/verity.go b/toolkit/tools/imagegen/diskutils/verity.go index 85b837c0a4a..03f1bd3b362 100644 --- a/toolkit/tools/imagegen/diskutils/verity.go +++ b/toolkit/tools/imagegen/diskutils/verity.go @@ -265,7 +265,7 @@ func (v *VerityDevice) CleanupVerityDevice() (err error) { } // SwitchDeviceToReadOnly switches the root device linear map to read only -// Will also re-mount the moint point to respect this. +// Will also re-mount the mount point to respect this. // - mountPointOrDevice is either the location of the mount, or the device which was mounted (mount command will take either) // - mountArgs are any special mount options used which should continue to be used func (v *VerityDevice) SwitchDeviceToReadOnly(mountPointOrDevice, mountArgs string) (err error) { diff --git a/toolkit/tools/imagegen/installutils/installutils.go b/toolkit/tools/imagegen/installutils/installutils.go index 463631b00cd..67282bda5b2 100644 --- a/toolkit/tools/imagegen/installutils/installutils.go +++ b/toolkit/tools/imagegen/installutils/installutils.go @@ -1712,7 +1712,7 @@ func setGrubCfgAdditionalCmdLine(grubPath string, kernelCommandline configuratio logger.Log.Debugf("Adding ExtraCommandLine('%s') to '%s'", kernelCommandline.ExtraCommandLine, grubPath) err = sed(extraPattern, kernelCommandline.ExtraCommandLine, kernelCommandline.GetSedDelimeter(), grubPath) if err != nil { - logger.Log.Warnf("Failed to append extra paramters to grub.cfg: %v", err) + logger.Log.Warnf("Failed to append extra parameters to grub.cfg: %v", err) } return @@ -1902,9 +1902,9 @@ func setGrubCfgRootDevice(rootDevice, grubPath, luksUUID string) (err error) { // ExtractPartitionArtifacts scans through the SystemConfig and generates all the partition-based artifacts specified. // - setupChrootDirPath is the path to the setup root dir where the build takes place // - workDirPath is the directory to place the artifacts -// - diskIndex is the index of the disk this is added to the parition artifact generated +// - diskIndex is the index of the disk this is added to the partition artifact generated // - disk configuration settings for the disk -// - systemConfig system configration corresponding to the disk configuration +// - systemConfig system configuration corresponding to the disk configuration // - partIDToDevPathMap is a map of partition IDs to partition device paths // - mountPointToOverlayMap is a map of mountpoints to the overlay details for this mount if any func ExtractPartitionArtifacts(setupChrootDirPath, workDirPath string, diskIndex int, disk configuration.Disk, systemConfig configuration.SystemConfig, partIDToDevPathMap map[string]string, mountPointToOverlayMap map[string]*Overlay) (err error) { @@ -2074,7 +2074,7 @@ func stopGPGAgent(installChroot *safechroot.Chroot) { installChroot.UnsafeRun(func() error { err := shell.ExecuteLiveWithCallback(logger.Log.Debug, logger.Log.Warn, false, "gpgconf", "--kill", "gpg-agent") if err != nil { - // This is non-fatal, as there is no guarentee the image has gpg agent started. + // This is non-fatal, as there is no guarantee the image has gpg agent started. logger.Log.Warnf("Failed to stop gpg-agent. This is expected if it is not installed: %s", err) } diff --git a/toolkit/tools/imager/imager.go b/toolkit/tools/imager/imager.go index b476fe703db..93695994e89 100644 --- a/toolkit/tools/imager/imager.go +++ b/toolkit/tools/imager/imager.go @@ -170,7 +170,7 @@ func buildSystemConfig(systemConfig configuration.SystemConfig, disks []configur setupChrootDir := filepath.Join(buildDir, setupRoot) - // Create Parition to Mountpoint map + // Create Partition to Mountpoint map mountPointMap, mountPointToFsTypeMap, mountPointToMountArgsMap, diffDiskBuild := installutils.CreateMountPointPartitionMap(partIDToDevPathMap, partIDToFsTypeMap, systemConfig) if diffDiskBuild { mountPointToOverlayMap, err = installutils.UpdatePartitionMapWithOverlays(partIDToDevPathMap, partIDToFsTypeMap, mountPointMap, mountPointToFsTypeMap, mountPointToMountArgsMap, systemConfig) @@ -560,7 +560,7 @@ func configureDiskBootloader(systemConfig configuration.SystemConfig, installChr bootPrefix := "" if !ok { bootDevice = installMap[rootMountPoint] - // If we do not have a seperate boot partition we will need to add a prefix to all paths used in the configs. + // If we do not have a separate boot partition we will need to add a prefix to all paths used in the configs. bootPrefix = "/boot" } diff --git a/toolkit/tools/internal/exe/exe.go b/toolkit/tools/internal/exe/exe.go index 95fcf16bfd8..e325a84a96a 100644 --- a/toolkit/tools/internal/exe/exe.go +++ b/toolkit/tools/internal/exe/exe.go @@ -55,7 +55,7 @@ func PlaceHolderize(thing []string) string { return fmt.Sprintf("(%s)", strings.Join(thing, "|")) } -// ParseListArgument takes a user provided string list that is space seperated +// ParseListArgument takes a user provided string list that is space separated // and returns a slice of the split and trimmed elements. func ParseListArgument(input string) (results []string) { const delimiter = " " diff --git a/toolkit/tools/internal/pkggraph/pkggraph.go b/toolkit/tools/internal/pkggraph/pkggraph.go index fcca757f1d5..63b7568d867 100644 --- a/toolkit/tools/internal/pkggraph/pkggraph.go +++ b/toolkit/tools/internal/pkggraph/pkggraph.go @@ -332,7 +332,7 @@ func (g *PkgGraph) addToLookup(pkgNode *PkgNode, deferSort bool) (err error) { } } - // Sort the updated list unless we are defering until all nodes are added + // Sort the updated list unless we are deferring until all nodes are added if !deferSort { sort.Slice(g.lookupTable()[pkgName], func(i, j int) bool { intervalI, _ := g.lookupTable()[pkgName][i].RunNode.VersionedPkg.Interval() diff --git a/toolkit/tools/internal/safechroot/safechroot.go b/toolkit/tools/internal/safechroot/safechroot.go index 12c57a9566a..99549c5ea65 100644 --- a/toolkit/tools/internal/safechroot/safechroot.go +++ b/toolkit/tools/internal/safechroot/safechroot.go @@ -150,7 +150,7 @@ func NewChroot(rootDir string, isExistingDir bool) *Chroot { // mount inside the chroot. // - extraMountPoints is an optional slice of additional mount points that should be created inside the chroot, // they will automatically be unmounted on a Chroot Close. -// This call will block until the chroot initializes succesfully. +// This call will block until the chroot initializes successfully. // Only one Chroot will initialize at a given time. func (c *Chroot) Initialize(tarPath string, extraDirectories []string, extraMountPoints []*MountPoint) (err error) { // On failed initialization, cleanup all chroot files diff --git a/toolkit/tools/specreader/specreader.go b/toolkit/tools/specreader/specreader.go index 4060788673f..ca2ca9210ee 100644 --- a/toolkit/tools/specreader/specreader.go +++ b/toolkit/tools/specreader/specreader.go @@ -185,7 +185,7 @@ func readspec(specfile, distTag, srpmDir string, wg *sync.WaitGroup, ch chan []* providerList[i].BuildRequires = condensePackageVersionArray(buildRequiresList, specfile) } - // Submit the result to the main thread, the defered function will clear the semaphore. + // Submit the result to the main thread, the deferred function will clear the semaphore. ch <- providerList } diff --git a/toolkit/tools/unravel/formats/makefile.go b/toolkit/tools/unravel/formats/makefile.go index 374032e9979..a3cd2f896a0 100644 --- a/toolkit/tools/unravel/formats/makefile.go +++ b/toolkit/tools/unravel/formats/makefile.go @@ -92,7 +92,7 @@ func (m *Makefile) Save(w io.StringWriter) (err error) { return } - // dependencyList will be a space seperated list of targets + // dependencyList will be a space separated list of targets dependencyList = fmt.Sprintf("%s %s", dependencyList, dependencyAsTarget) logger.Log.Tracef("\tDependency of %s -> %s", currentNodeAsTarget, dependencyAsTarget) }