buildPod(runAsUser:0) {
checkout scm
shwrap("""
- # Jenkins by default only fetches the branch it's testing. Explicitly fetch master
+ # Jenkins by default only fetches the branch it's testing. Explicitly fetch main
# for ci-commitmessage-submodules.sh
- git fetch origin +refs/heads/master:refs/remotes/origin/master
+ git fetch origin +refs/heads/main:refs/remotes/origin/main
ci/ci-commitmessage-submodules.sh
""")
}
- Prepare local environment:
- [ ] `git remote get-url --push origin`
- [ ] validate that the output above points to `git@github.com:ostreedev/ostree.git`
- - [ ] `git checkout master && git pull`
+ - [ ] `git checkout main && git pull`
- [ ] `git clean -fd`
- [ ] `RELEASE_VER=yyyy.n` (matching `package_version` in `configure.ac`)
- [ ] `git checkout -b release-${RELEASE_VER}`
- Clean up:
- [ ] `git clean -fd`
- - [ ] `git checkout master`
+ - [ ] `git checkout main`
- [ ] `git pull`
- [ ] `git push origin :release-${RELEASE_VER}`
- [ ] `git branch -d release-${RELEASE_VER}`
on:
pull_request:
- branches: [master]
+ branches: [main]
paths:
- 'configure.ac'
name: Rust
on:
push:
- branches: [master]
+ branches: [main]
pull_request:
- branches: [master]
+ branches: [main]
env:
CARGO_TERM_COLOR: always
- job: production_build
trigger: commit
metadata:
- branch: master
+ branch: main
targets: f34-coreos-continuous
specfile_path: ostree.spec
actions:
submodules. If you're packaging OSTree and want a tarball, I
recommend using a "recursive git archive" script. There are several
available online;
-[this code](https://github.com/ostreedev/ostree/blob/master/packaging/Makefile.dist-packaging#L11)
+[this code](https://github.com/ostreedev/ostree/blob/main/packaging/Makefile.dist-packaging#L11)
in OSTree is an example.
Once you have a git clone or recursive archive, building is the
## Licensing
The licensing for the *code* of libostree can be canonically found in the individual files;
-and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/master/COPYING)
+and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/main/COPYING)
file in the source. Currently, that's LGPLv2+. This also covers the man pages and API docs.
The license for the manual documentation in the `doc/` directory is:
# require a newer git, we could use `git worktree`.
cp -a ${gitdir} ${tmpd}/workdir
cd ${tmpd}/workdir
-git log --pretty=oneline origin/master..$HEAD | while read logline; do
+git log --pretty=oneline origin/main..$HEAD | while read logline; do
commit=$(echo ${logline} | cut -f 1 -d ' ')
# For merge commits, just check that they're empty (i.e. no conflict
# resolution was needed). Otherwise, let's just error out. Conflicts should
**Editing a Committed Message:**
-To edit the message from the most recent commit run `git commit --amend`. To change older commits on the branch use `git rebase -i`. For a successful rebase have the branch track `upstream master`. Once the changes have been made and saved, run `git push --force origin <branch-name>`.
+To edit the message from the most recent commit run `git commit --amend`. To change older commits on the branch use `git rebase -i`. For a successful rebase have the branch track `upstream main`. Once the changes have been made and saved, run `git push --force origin <branch-name>`.
## Running the test suite
gh_edit_link: true
gh_edit_link_text: "Edit this page on GitHub"
gh_edit_repository: "https://github.com/ostreedev/ostree"
-gh_edit_branch: "master"
+gh_edit_branch: "main"
gh_edit_source: docs
gh_edit_view_mode: "tree"
If you are not using dracut or systemd, using OSTree should still be
possible, but you will have to write the integration code. See the
existing sources in
-[src/switchroot](https://github.com/ostreedev/ostree/tree/master/src/switchroot)
+[src/switchroot](https://github.com/ostreedev/ostree/tree/main/src/switchroot)
as a reference.
Patches to support other initramfs technologies and init systems, if
```bash
$ git clone https://github.com/<username>/ostree && cd ostree
$ git remote add upstream https://github.com/ostreedev/ostree
-$ git checkout master
-$ git fetch upstream && git branch --set-upstream-to=upstream/master master
+$ git checkout main
+$ git fetch upstream && git branch --set-upstream-to=upstream/main main
```
-Make a branch from master for your patch.
+Make a branch from main for your patch.
```bash
$ git checkout -b <name-of-branch>
-$ git branch --set-upstream-to=upstream/master <name-of-branch>
+$ git branch --set-upstream-to=upstream/main <name-of-branch>
```
## Building OSTree
apt-get build-dep ostree
```
-[build.sh](https://github.com/ostreedev/ostree/blob/master/ci/build.sh) will have a list of packages needed to build ostree.
+[build.sh](https://github.com/ostreedev/ostree/blob/main/ci/build.sh) will have a list of packages needed to build ostree.
### OSTree Build Commands
dnf -y builddep ostree && \
dnf clean all
-# clone ostree and update master branch
+# clone ostree and update main branch
COPY ostree-git.sh /
RUN ../ostree-git.sh
#!/bin/bash
# ostree-git.sh
-# Clone ostree and update master branch
+# Clone ostree and update main branch
set -euo pipefail
git clone https://github.com/$USERNAME/ostree.git
cd ostree
-# Add upstream as remote and update master branch
-git checkout master
+# Add upstream as remote and update main branch
+git checkout main
git remote add upstream https://github.com/ostreedev/ostree.git
-git pull --rebase upstream master
+git pull --rebase upstream main
```
```bash
After you have committed your changes and tested, you are ready to submit your patch!
-You should make sure your commits are placed on top of the latest changes from `upstream/master`:
+You should make sure your commits are placed on top of the latest changes from `upstream/main`:
```bash
-$ git pull --rebase upstream master
+$ git pull --rebase upstream main
```
-To submit your patch, open a pull request from your forked repository. Most often, you'll be merging into `ostree:master` from `<username>:<branch name>`.
+To submit your patch, open a pull request from your forked repository. Most often, you'll be merging into `ostree:main` from `<username>:<branch name>`.
If some of your changes are complete and you would like feedback, you may also open a pull request that has WIP (Work In Progress) in the title.
### Returning Workflow
-When returning to work on a patch, it is recommended to update your fork with the latest changes in the upstream master branch.
+When returning to work on a patch, it is recommended to update your fork with the latest changes in the upstream main branch.
If creating a new branch:
```bash
-$ git checkout master
-$ git pull upstream master
+$ git checkout main
+$ git pull upstream main
$ git checkout -b <name-of-patch>
```
```bash
$ git checkout <name-of-patch>
-$ git pull --rebase upstream master
+$ git pull --rebase upstream main
```
submodules. If you're packaging OSTree and want a tarball, I
recommend using a "recursive git archive" script. There are several
available online;
-[this code](https://github.com/ostreedev/ostree/blob/master/packaging/Makefile.dist-packaging#L11)
+[this code](https://github.com/ostreedev/ostree/blob/main/packaging/Makefile.dist-packaging#L11)
in OSTree is an example.
Once you have a git clone or recursive archive, building is the
## Licensing
The licensing for the *code* of libostree can be canonically found in the individual files;
-and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/master/COPYING)
+and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/main/COPYING)
file in the source. Currently, that's LGPLv2+. This also covers the man pages and API docs.
The license for the manual documentation in the `doc/` directory is:
commits. See the
[Git Documentation](https://git-scm.com/book/en/v2/Git-Internals-Git-References)
for information on how git uses them. Unlike git though, it doesn't
-usually make sense to have a "master" branch. There is a convention
+usually make sense to have a "main" branch. There is a convention
for references in OSTree that looks like this:
`exampleos/buildmaster/x86_64-runtime` and
`exampleos/buildmaster/x86_64-devel-debug`. These two refs point to
commit `aec070645fe53` that passed the smoketests.
For a more sophisticated implementation of this model, see the
-[do-release-tags](https://github.com/ostreedev/ostree-releng-scripts/blob/master/do-release-tags)
+[do-release-tags](https://github.com/ostreedev/ostree-releng-scripts/blob/main/do-release-tags)
script, which includes support for things like propagating version
numbers across commit promotion.