Skip to content

Damcilva/2.0/docs/developer guide v2 #5218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

dmcilvaney
Copy link
Contributor

@dmcilvaney dmcilvaney commented Apr 4, 2023

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Refresh our documentation to better match the current best practices for our toolkit.

Change Log
  • Update build documentation
Does this affect the toolchain?

NO

@microsoft-github-policy-service microsoft-github-policy-service bot added the main PR Destined for main label Apr 4, 2023
@dmcilvaney dmcilvaney force-pushed the damcilva/2.0/docs/developer_guide_v2 branch 2 times, most recently from bd9a336 to dc590b8 Compare April 4, 2023 20:32
@dmcilvaney dmcilvaney force-pushed the damcilva/2.0/docs/developer_guide_v2 branch from dc590b8 to 4c80f24 Compare April 5, 2023 00:35
Copy link
Contributor

@rlmenge rlmenge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments :)

dmcilvaney and others added 4 commits April 7, 2023 11:10
Co-authored-by: rlmenge <rlmenge@gmail.com>
Co-authored-by: rlmenge <rlmenge@gmail.com>
…ilvaney/CBL-Mariner into damcilva/2.0/docs/developer_guide_v2
@dmcilvaney dmcilvaney marked this pull request as ready for review April 7, 2023 18:48
@dmcilvaney dmcilvaney requested review from a team as code owners April 7, 2023 18:48
@dmcilvaney
Copy link
Contributor Author

These docs contain references to flags in #5199, will need to merge that first.

@aadhar-agarwal
Copy link
Contributor

The docs seem easier to read and understand on first glance! Still going through them :)


######## QUICKREBUILD AUTO CONFIGURE ########

# The QUICKREBUILD* flags are special flags that will try to build the toolchain and packages as quickly as possible. They will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change leak from #5199?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, makes my life easier to validating the commands. Will clean up before the final merge.

Copy link
Contributor

@christopherco christopherco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the first half with @dmcilvaney . Will review 2nd half next week.

Copy link
Contributor

@htaubenfeld htaubenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend running these markdowns through ChatGPT and requesting suggestions on tutorial and GitHub docs language and corrections. Let me know if you want to work together on this!


|Task | Where to go |
|:---------------------------------|-------------------------------------------------------------------------------|
|Just add or build my own packages | **[CBL-MarinerTutorials](https://github.com/microsoft/CBL-MarinerTutorials)** |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why CBL-MarinerTutorials is bolded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to direct people to the tutorial repo as much as possible. This is the wrong document for 90% of people to be reading and I want to give them as many offramps as possible.

dmcilvaney and others added 3 commits April 10, 2023 14:32
Co-authored-by: Christopher Co <35273088+christopherco@users.noreply.github.com>
Co-authored-by: htaubenfeld <htaubenfeld@microsoft.com>
Co-authored-by: Christopher Co <35273088+christopherco@users.noreply.github.com>
Co-authored-by: htaubenfeld <htaubenfeld@microsoft.com>
Co-authored-by: htaubenfeld <htaubenfeld@microsoft.com>
@dmcilvaney
Copy link
Contributor Author

Updated to use actual commits from the quickbuild PR.

# OPTIONAL:
# If you want a fast (but possibly less accurate) build, only pack the specific packages we want to build and
# use upstream stable packages to fulfill all dependencies.
pkg_filter="SRPM_PACK_LIST='$packages'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean packages here or package_list from line 85?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! package_list is right, will fix.

# $toolchain Where to get our toolchain (see above)
# PACKAGE_REBUILD_LIST List of packages to ALWAYS rebuild, even if they look unchanged (PACKAGE_BUILD_LIST will build them only if they are missing)
# SRPM_FILE_SIGNATURE_HANDLING Auto update the signature files
sudo make build-packages -j$(nproc) QUICK_REBUILD_PACKAGES=y CONFIG_FILE="" REBUILD_TOOLS=y $pkg_filter $toolchain PACKAGE_REBUILD_LIST="$packages" $signature_handle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again -- packages or package_list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


# Modify your package
touch ../SPECS/nano/nano.spec
touch ../SPECS/nano/opessh.spec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this be ../SPECS/openssh/openssh.spec

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly, I'm just adding a new ssh protocol specialized for use in the Midwest (fixed).

Copy link
Member

@trungams trungams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some quick comments, will go through the big building.md doc later

When starting to develop for CBL-Mariner, use the [CBL-MarinerTutorials](https://github.com/microsoft/CBL-MarinerTutorials) repo. This repository guides developers on using CBL-Mariner's tools to customize or add new packages or images. Once you have confirmed your change builds and functions as expected, consider whether it should be added to the core repo, [CBL-Mariner](https://github.com/microsoft/CBL-Mariner). Please see our [quickstart](toolkit/docs/quick_start/quickstart.md) for a tutorial and [building instructions](toolkit/docs/building/building.md) for an in-depth overview of building within CBL-Mariner. Please adhere to the [Pull Request guidelines](pull-request-guidelines) when contributing.
Start with [CBL-MarinerTutorials](https://github.com/microsoft/CBL-MarinerTutorials) repo. This repository guides developers on using CBL-Mariner's tools to customize or add new packages or images.

Once you have confirmed your change builds and functions as expected, consider whether it should be added to the core repo, [CBL-Mariner](https://github.com/microsoft/CBL-Mariner). Please see our [building instructions](toolkit/README.md) for tutorials and build guides. Please adhere to the [Pull Request guidelines](pull-request-guidelines) when contributing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Once you have confirmed your change builds and functions as expected, consider whether it should be added to the core repo, [CBL-Mariner](https://github.com/microsoft/CBL-Mariner). Please see our [building instructions](toolkit/README.md) for tutorials and build guides. Please adhere to the [Pull Request guidelines](pull-request-guidelines) when contributing.
Once you have confirmed your change builds and functions as expected, consider whether it should be added to the core repo, [CBL-Mariner](https://github.com/microsoft/CBL-Mariner). Please see our [building instructions](toolkit/README.md) for tutorials and build guides. Please adhere to the [Pull Request guidelines](#pull-request-guidelines) when contributing.

probably need the # for anchor links to work


### [CBL-MarinerTutorials](https://github.com/microsoft/CBL-MarinerTutorials)

The [CBL-MarinerTutorials](https://github.com/microsoft/CBL-MarinerTutorials) repo includes several guides for starting with CBL-Mariner images. The full documentation above also links to it where relaxant.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relaxant -> relevant?

@@ -14,4 +14,4 @@ Support for CBL-Mariner is limited to the resources listed above.
[gh-bug]: https://github.com/microsoft/CBL-Mariner/issues/new?labels=bug
[gh-feature]: https://github.com/microsoft/CBL-Mariner/issues/new?labels=enhancement
[tutorial]: https://github.com/Microsoft/CBL-MarinerTutorials
[contributor]: https://github.com/microsoft/CBL-Mariner/blob/main/CONTRIBUTING.md
[contributor]: https://github.com/microsoft/CBL-Mariner/blob/-/CONTRIBUTING.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole list fails to render in the actual md page, probably bad formatting?

@@ -80,17 +95,16 @@ choose DVD Drive and press Add.
1. Select _Image File:_ and browse to the meta-user-data.iso file.
1. Select _Apply_ to apply all changes.

**Boot and Sign-In to your VHD**
### Boot and Sign-In to your VHD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Boot and Sign-In to your VHD
### Boot and Sign-In to your VHD(X)

sudo make go-tools REBUILD_TOOLS=y

# Build a specific tool
sudo make go-depsearch REBUILD_TOOLS=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be a bit confusing if someone doesn't know depsearch refers to one of the tools' name

# OPTIONAL:
# Build the latest toolchain **if you are NOT working on a stable branch**
git checkout main
sudo make toolchain QUICK_REBUILD_TOOLCHAIN=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have some kind of prerequisites before someone goes through a doc..? I would find these different magic build flags overwhelming with little to no background in the build systems.

The building.md doc is a very comprehensive reference but I'm not sure if that's a good place to start

sudo make clean QUICK_REBUILD=y
```

### Build a toolchain if using an unstable branch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there's many overlaps with the build images doc. Maybe we can separate these first few steps in another doc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
main PR Destined for main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants