mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
Merge pull request #2358 from travier/rename
*: rename master branch to main
This commit is contained in:
commit
6c904c630f
@ -1,4 +1,4 @@
|
||||
// Documentation: https://github.com/coreos/coreos-ci/blob/master/README-upstream-ci.md
|
||||
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
|
||||
|
||||
stage("Build") {
|
||||
parallel normal: {
|
||||
@ -57,9 +57,9 @@ codestyle: {
|
||||
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
|
||||
""")
|
||||
}
|
||||
|
4
.github/ISSUE_TEMPLATE/release-checklist.md
vendored
4
.github/ISSUE_TEMPLATE/release-checklist.md
vendored
@ -18,7 +18,7 @@ This guide requires:
|
||||
- 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}`
|
||||
@ -56,7 +56,7 @@ This guide requires:
|
||||
|
||||
- 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}`
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -3,7 +3,7 @@ name: Release
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'configure.ac'
|
||||
|
||||
|
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -2,9 +2,9 @@
|
||||
name: Rust
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
@ -1,14 +1,14 @@
|
||||
# build into f32-coreos-continuous on every commit to master
|
||||
# build into f34-coreos-continuous on every commit to main
|
||||
jobs:
|
||||
- job: production_build
|
||||
trigger: commit
|
||||
metadata:
|
||||
branch: master
|
||||
targets: f32-coreos-continuous
|
||||
branch: main
|
||||
targets: f34-coreos-continuous
|
||||
specfile_path: ostree.spec
|
||||
actions:
|
||||
# https://packit.dev/faq/#how-can-i-download-rpm-spec-file-if-it-is-not-part-of-upstream-repository
|
||||
post-upstream-clone:
|
||||
- "wget https://src.fedoraproject.org/rpms/ostree/raw/master/f/ostree.spec"
|
||||
- "wget https://src.fedoraproject.org/rpms/ostree/raw/rawhide/f/ostree.spec"
|
||||
# we don't want any downstream patches
|
||||
- "sed -ie 's/^Patch/# Patch/g' ostree.spec"
|
||||
|
@ -130,7 +130,7 @@ However, in order to build from a git clone, you must update the
|
||||
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
|
||||
@ -157,7 +157,7 @@ See [Contributing](CONTRIBUTING.md).
|
||||
## 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:
|
||||
|
@ -40,7 +40,7 @@ gitdir=$(realpath $(pwd))
|
||||
# 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
|
||||
|
@ -72,7 +72,7 @@ For more information see [How to Write a Git Commit Message](https://chris.beams
|
||||
|
||||
**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
|
||||
|
||||
|
@ -28,7 +28,7 @@ last_edit_time_format: "%b %e %Y at %I:%M %p"
|
||||
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"
|
||||
|
||||
|
@ -92,7 +92,7 @@ After these steps, systemd switches root.
|
||||
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
|
||||
|
@ -25,8 +25,8 @@ implements this.
|
||||
|
||||
To begin a simple upgrade, OSTree fetches the contents of the ref from
|
||||
the remote server. Suppose we're tracking a ref named
|
||||
`exampleos/buildmaster/x86_64-runtime`. OSTree fetches the URL
|
||||
`http://example.com/repo/refs/heads/exampleos/buildmaster/x86_64-runtime`,
|
||||
`exampleos/buildmain/x86_64-runtime`. OSTree fetches the URL
|
||||
`http://example.com/repo/refs/heads/exampleos/buildmain/x86_64-runtime`,
|
||||
which contains a SHA256 checksum. This determines the tree to deploy,
|
||||
and `/etc` will be merged from currently booted tree.
|
||||
|
||||
|
@ -17,14 +17,14 @@ Fork https://github.com/ostreedev/ostree, then run the following commands.
|
||||
```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
|
||||
@ -55,7 +55,7 @@ apt-get install build-essential && \
|
||||
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
|
||||
|
||||
@ -120,7 +120,7 @@ RUN dnf update -y && \
|
||||
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
|
||||
|
||||
@ -142,7 +142,7 @@ Save the following bash scripts in the same directory as the Dockerfile. Then ch
|
||||
#!/bin/bash
|
||||
|
||||
# ostree-git.sh
|
||||
# Clone ostree and update master branch
|
||||
# Clone ostree and update main branch
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@ -153,10 +153,10 @@ USERNAME=""
|
||||
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
|
||||
@ -407,13 +407,13 @@ Tests for OSTree are done by shell scripting, by running OSTree commands and exa
|
||||
|
||||
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.
|
||||
|
||||
@ -423,13 +423,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md#submitting-patches) for information on squ
|
||||
|
||||
### 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>
|
||||
```
|
||||
|
||||
@ -437,5 +437,5 @@ If continuing on a branch already created:
|
||||
|
||||
```bash
|
||||
$ git checkout <name-of-patch>
|
||||
$ git pull --rebase upstream master
|
||||
$ git pull --rebase upstream main
|
||||
```
|
||||
|
@ -127,7 +127,7 @@ However, in order to build from a git clone, you must update the
|
||||
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
|
||||
@ -148,7 +148,7 @@ See [Contributing](docs/CONTRIBUTING.md).
|
||||
## 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:
|
||||
|
10
docs/repo.md
10
docs/repo.md
@ -121,18 +121,18 @@ Like git, OSTree uses the terminology "references" (abbreviated
|
||||
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
|
||||
`exampleos/buildmain/x86_64-runtime` and
|
||||
`exampleos/buildmain/x86_64-devel-debug`. These two refs point to
|
||||
two different generated filesystem trees. In this example, the
|
||||
"runtime" tree contains just enough to run a basic system, and
|
||||
"devel-debug" contains all of the developer tools and debuginfo.
|
||||
|
||||
The `ostree` supports a simple syntax using the caret `^` to refer to
|
||||
the parent of a given commit. For example,
|
||||
`exampleos/buildmaster/x86_64-runtime^` refers to the previous build,
|
||||
and `exampleos/buildmaster/x86_64-runtime^^` refers to the one before
|
||||
`exampleos/buildmain/x86_64-runtime^` refers to the previous build,
|
||||
and `exampleos/buildmain/x86_64-runtime^^` refers to the one before
|
||||
that.
|
||||
|
||||
## The summary file
|
||||
|
@ -80,7 +80,7 @@ Then, what you'll want to do is promote content from "dev" to "prod".
|
||||
We'll discuss this later, but first, let's talk about promotion
|
||||
*inside* our "dev" repository.
|
||||
|
||||
## Promoting content along OSTree branches - "buildmaster", "smoketested"
|
||||
## Promoting content along OSTree branches - "buildmain", "smoketested"
|
||||
|
||||
Besides multiple repositories, OSTree also supports multiple branches
|
||||
inside one repository, equivalent to git's branches. We saw in an
|
||||
@ -88,16 +88,16 @@ earlier section an example branch name like
|
||||
`exampleos/x86_64/standard`. Choosing the branch name for your "prod"
|
||||
repository is absolutely critical as client systems will reference it.
|
||||
It becomes an important part of your face to the world, in the same
|
||||
way the "master" branch in a git repository is.
|
||||
way the "main" branch in a git repository is.
|
||||
|
||||
But with your "dev" repository internally, it can be very useful to
|
||||
use OSTree's branching concepts to represent different stages in a
|
||||
software delivery pipeline.
|
||||
|
||||
Deriving from `exampleos/x86_64/standard`, let's say our "dev"
|
||||
repository contains `exampleos/x86_64/buildmaster/standard`. We choose the
|
||||
term "buildmaster" to represent something that came straight from git
|
||||
master. It may not be tested very much.
|
||||
repository contains `exampleos/x86_64/buildmain/standard`. We choose the
|
||||
term "buildmain" to represent something that came straight from git
|
||||
main. It may not be tested very much.
|
||||
|
||||
Our next step should be to hook up a testing system (Jenkins,
|
||||
Buildbot, etc.) to this. When a build (commit) passes some tests, we
|
||||
@ -106,18 +106,18 @@ want to "promote" that commit. Let's create a new branch called
|
||||
complete system. This might be where human testers get involved, for
|
||||
example.
|
||||
|
||||
This is a basic way to "promote" the `buildmaster` commit that passed testing:
|
||||
This is a basic way to "promote" the `buildmain` commit that passed testing:
|
||||
|
||||
```
|
||||
ostree commit -b exampleos/x86_64/smoketested/standard -s 'Passed tests' --tree=ref=aec070645fe53...
|
||||
```
|
||||
|
||||
Here we're generating a new commit object (perhaps include in the commit
|
||||
log links to build logs, etc.), but we're reusing the *content* from the `buildmaster`
|
||||
log links to build logs, etc.), but we're reusing the *content* from the `buildmain`
|
||||
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.
|
||||
|
||||
|
@ -146,12 +146,12 @@ Boston, MA 02111-1307, USA.
|
||||
<para><command>$ ostree admin status</command></para>
|
||||
<programlisting>
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1ce3.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</programlisting>
|
||||
|
||||
<para><command>$ ostree admin deploy gnome-ostree/buildmaster/x86_64-runtime</command></para>
|
||||
<para><command>$ ostree admin deploy gnome-ostree/buildmain/x86_64-runtime</command></para>
|
||||
<programlisting>
|
||||
ostadmin: Creating deployment /ostree/deploy/gnome-ostree/deploy/7e382b11d213a402a5313e61cbc69dfd5ab93cb07.1
|
||||
ostadmin: Processing /etc: 3 modified, 0 removed, 29 added
|
||||
@ -161,9 +161,9 @@ Boston, MA 02111-1307, USA.
|
||||
<para><command>$ ostree admin status</command></para>
|
||||
<programlisting>
|
||||
gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.1
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</programlisting>
|
||||
|
||||
</refsect1>
|
||||
|
@ -93,6 +93,6 @@ Boston, MA 02111-1307, USA.
|
||||
<refsect1>
|
||||
<title>Example</title>
|
||||
|
||||
<para><command>$ ostree admin set-origin exampleos http://os.example.com/repo exampleos/10.0/master/router</command></para>
|
||||
<para><command>$ ostree admin set-origin exampleos http://os.example.com/repo exampleos/10.0/main/router</command></para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -68,9 +68,9 @@ Boston, MA 02111-1307, USA.
|
||||
<para><command>$ ostree admin status</command></para>
|
||||
<programlisting>
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</programlisting>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -68,9 +68,9 @@ Boston, MA 02111-1307, USA.
|
||||
<para><command>$ ostree admin status</command></para>
|
||||
<programlisting>
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</programlisting>
|
||||
<para><command>$ ostree admin undeploy 1</command></para>
|
||||
<programlisting>
|
||||
@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA.
|
||||
<para><command>$ ostree admin status</command></para>
|
||||
<programlisting>
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmaster/x86_64-runtime
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</programlisting>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -144,7 +144,7 @@ Boston, MA 02111-1307, USA.
|
||||
<para><command>$ ostree refs</command></para>
|
||||
<programlisting>
|
||||
my-branch
|
||||
gnome-ostree/buildmaster/x86_64-runtime
|
||||
gnome-ostree/buildmain/x86_64-runtime
|
||||
</programlisting>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -160,11 +160,11 @@ ostree_validate_checksum_string (const char *sha256,
|
||||
* @out_ref: (out) (not nullable) (optional): Return location for the ref name
|
||||
* @error: Error
|
||||
*
|
||||
* Split a refspec like `gnome-ostree:gnome-ostree/buildmaster` or just
|
||||
* `gnome-ostree/buildmaster` into two parts. In the first case, @out_remote
|
||||
* will be set to `gnome-ostree`, and @out_ref to `gnome-ostree/buildmaster`.
|
||||
* Split a refspec like `gnome-ostree:gnome-ostree/buildmain` or just
|
||||
* `gnome-ostree/buildmain` into two parts. In the first case, @out_remote
|
||||
* will be set to `gnome-ostree`, and @out_ref to `gnome-ostree/buildmain`.
|
||||
* In the second case (a local ref), @out_remote will be %NULL, and @out_ref
|
||||
* will be `gnome-ostree/buildmaster`. In both cases, %TRUE will be returned.
|
||||
* will be `gnome-ostree/buildmain`. In both cases, %TRUE will be returned.
|
||||
*
|
||||
* Returns: %TRUE on successful parsing, %FALSE otherwise
|
||||
*/
|
||||
|
@ -53,11 +53,11 @@ assert_ostree_deployment_refs() {
|
||||
}
|
||||
|
||||
orig_mtime=$(stat -c '%.Y' sysroot/ostree/deploy)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
new_mtime=$(stat -c '%.Y' sysroot/ostree/deploy)
|
||||
assert_not_streq "${orig_mtime}" "${new_mtime}"
|
||||
${CMD_PREFIX} ostree admin status | tee status.txt
|
||||
@ -66,9 +66,9 @@ assert_not_file_has_content status.txt "rollback"
|
||||
validate_bootloader
|
||||
|
||||
# Test the bootable and linux keys
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.linux show testos:testos/buildmaster/x86_64-runtime >out.txt
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.linux show testos:testos/buildmain/x86_64-runtime >out.txt
|
||||
assert_file_has_content_literal out.txt 3.6.0
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.bootable show testos:testos/buildmaster/x86_64-runtime >out.txt
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo --print-metadata-key=ostree.bootable show testos:testos/buildmain/x86_64-runtime >out.txt
|
||||
assert_file_has_content_literal out.txt true
|
||||
|
||||
echo "ok deploy command"
|
||||
@ -92,14 +92,14 @@ assert_ostree_deployment_refs 1/1/0
|
||||
${CMD_PREFIX} ostree admin status
|
||||
echo "ok layout"
|
||||
|
||||
if ${CMD_PREFIX} ostree admin deploy --stage --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then
|
||||
if ${CMD_PREFIX} ostree admin deploy --stage --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then
|
||||
fatal "staged when not booted"
|
||||
fi
|
||||
assert_file_has_content_literal err.txt "Cannot stage deployment: Not currently booted into an OSTree system"
|
||||
echo "ok staging does not work when not booted"
|
||||
|
||||
orig_mtime=$(stat -c '%.Y' sysroot/ostree/deploy)
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
new_mtime=$(stat -c '%.Y' sysroot/ostree/deploy)
|
||||
assert_not_streq "${orig_mtime}" "${new_mtime}"
|
||||
# Need a new bootversion, sine we now have two deployments
|
||||
@ -119,7 +119,7 @@ validate_bootloader
|
||||
|
||||
echo "ok second deploy"
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
# Keep the same bootversion
|
||||
assert_has_dir sysroot/boot/loader.0
|
||||
assert_not_has_dir sysroot/boot/loader.1
|
||||
@ -134,7 +134,7 @@ echo "ok third deploy (swap)"
|
||||
|
||||
${CMD_PREFIX} ostree admin os-init otheros
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --os=otheros testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=otheros testos/buildmain/x86_64-runtime
|
||||
assert_not_has_dir sysroot/boot/loader.0
|
||||
assert_has_dir sysroot/boot/loader.1
|
||||
assert_has_file sysroot/boot/loader/entries/ostree-2-testos.conf
|
||||
@ -147,7 +147,7 @@ validate_bootloader
|
||||
|
||||
echo "ok independent deploy"
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/boot/loader.0
|
||||
assert_not_has_dir sysroot/boot/loader.1
|
||||
assert_has_file sysroot/boot/loader/entries/ostree-4-testos.conf
|
||||
@ -164,7 +164,7 @@ echo "a new local config file" > sysroot/ostree/deploy/testos/deploy/${rev}.3/et
|
||||
rm -r sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/testdirectory
|
||||
rm sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/aconfigfile
|
||||
ln -s /ENOENT sysroot/ostree/deploy/testos/deploy/${rev}.3/etc/a-new-broken-symlink
|
||||
${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_not_has_dir sysroot/boot/loader.0
|
||||
assert_has_dir sysroot/boot/loader.1
|
||||
link=sysroot/ostree/deploy/testos/deploy/${rev}.4/etc/a-new-broken-symlink
|
||||
@ -189,7 +189,7 @@ done
|
||||
assert_has_file sysroot/boot/loader/entries/ostree-1-testos.conf
|
||||
assert_not_has_file sysroot/boot/loader/entries/ostree-2-testos.conf
|
||||
assert_not_has_file sysroot/boot/loader/entries/ostree-3-otheros.conf
|
||||
${CMD_PREFIX} ostree admin deploy --not-as-default --os=otheros testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --not-as-default --os=otheros testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/boot/loader.0
|
||||
assert_not_has_dir sysroot/boot/loader.1
|
||||
assert_has_file sysroot/boot/loader/entries/ostree-2-testos.conf
|
||||
@ -199,7 +199,7 @@ validate_bootloader
|
||||
|
||||
echo "ok deploy --not-as-default"
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --retain-rollback --os=otheros testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --retain-rollback --os=otheros testos:testos/buildmain/x86_64-runtime
|
||||
assert_not_has_dir sysroot/boot/loader.0
|
||||
assert_has_dir sysroot/boot/loader.1
|
||||
assert_has_file sysroot/boot/loader/entries/ostree-3-otheros.conf
|
||||
@ -211,12 +211,12 @@ validate_bootloader
|
||||
echo "ok deploy --retain-rollback"
|
||||
|
||||
os_repository_new_commit
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmain/x86_64-runtime)
|
||||
export newrev
|
||||
assert_not_streq ${rev} ${newrev}
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS'
|
||||
# New files in /usr/etc
|
||||
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/a-new-default-config-file "a new default config file"
|
||||
@ -234,24 +234,24 @@ if env OSTREE_EX_STAGE_DEPLOYMENTS=1 ${CMD_PREFIX} ostree admin upgrade --os=tes
|
||||
fi
|
||||
echo "ok upgrade failed when staged"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
origrev=${rev}
|
||||
rev=${newrev}
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
assert_not_streq ${rev} ${newrev}
|
||||
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/os-release 'NAME=TestOS'
|
||||
${CMD_PREFIX} ostree admin status
|
||||
validate_bootloader
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo refs testos:testos > reftest.txt
|
||||
assert_file_has_content reftest.txt testos:buildmaster/x86_64-runtime
|
||||
assert_file_has_content reftest.txt testos:buildmain/x86_64-runtime
|
||||
|
||||
echo "ok upgrade"
|
||||
|
||||
originfile=$(${CMD_PREFIX} ostree admin --print-current-dir).origin
|
||||
cp ${originfile} saved-origin
|
||||
${CMD_PREFIX} ostree admin set-origin --index=0 bacon --set=gpg-verify=false http://tasty.com
|
||||
assert_file_has_content "${originfile}" "bacon:testos/buildmaster/x86_64-runtime"
|
||||
assert_file_has_content "${originfile}" "bacon:testos/buildmain/x86_64-runtime"
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote list -u > remotes.txt
|
||||
assert_file_has_content remotes.txt 'bacon.*http://tasty\.com'
|
||||
cp saved-origin ${originfile}
|
||||
@ -272,22 +272,22 @@ validate_bootloader
|
||||
|
||||
echo "ok undeploy"
|
||||
|
||||
if ${CMD_PREFIX} ostree admin deploy --os=unknown testos:testos/buildmaster/x86_64-runtime; then
|
||||
if ${CMD_PREFIX} ostree admin deploy --os=unknown testos:testos/buildmain/x86_64-runtime; then
|
||||
assert_not_reached "Unexpected successful deploy of unknown OS"
|
||||
fi
|
||||
echo "ok deploy with unknown OS"
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=console=/dev/foo --karg-append=console=/dev/bar testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=console=/dev/foo --karg-append=console=/dev/bar testos:testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf 'console=/dev/foo.*console=/dev/bar'
|
||||
validate_bootloader
|
||||
|
||||
echo "ok deploy with multiple kernel args"
|
||||
|
||||
origrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
origrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
os_repository_new_commit 0 "test upgrade multiple kernel args"
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
assert_not_streq ${origrev} ${newrev}
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf 'console=/dev/foo.*console=/dev/bar'
|
||||
validate_bootloader
|
||||
@ -297,7 +297,7 @@ echo "ok upgrade with multiple kernel args"
|
||||
os_repository_new_commit
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf "^title TestOS 42 ${version} (ostree:testos:0)$"
|
||||
os_repository_new_commit 0 0 testos/buildmaster/x86_64-runtime 42
|
||||
os_repository_new_commit 0 0 testos/buildmain/x86_64-runtime 42
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-4-testos.conf "^title TestOS 42 (ostree:testos:0)$"
|
||||
|
||||
@ -310,8 +310,8 @@ sleep 1
|
||||
os_repository_new_commit
|
||||
# upgrade to the latest
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
head_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime)
|
||||
prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime^)
|
||||
head_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime)
|
||||
prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime^)
|
||||
assert_not_streq ${head_rev} ${prev_rev}
|
||||
# Don't use `ostree admin status | head -n 1` directly here because `head`
|
||||
# exiting early might cause SIGPIPE to ostree, which with `set -euo pipefail`
|
||||
@ -342,14 +342,14 @@ sleep 1
|
||||
os_repository_new_commit
|
||||
sleep 1
|
||||
os_repository_new_commit
|
||||
${CMD_PREFIX} ostree pull --repo=sysroot/ostree/repo --commit-metadata-only --depth=-1 testos:testos/buildmaster/x86_64-runtime
|
||||
curr_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime)
|
||||
prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmaster/x86_64-runtime^)
|
||||
${CMD_PREFIX} ostree pull --repo=sysroot/ostree/repo --commit-metadata-only --depth=-1 testos:testos/buildmain/x86_64-runtime
|
||||
curr_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime)
|
||||
prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buildmain/x86_64-runtime^)
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos --override-commit=${prev_rev}
|
||||
echo "ok upgrade to newer version older than branch tip"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string "version=${version}" \
|
||||
--add-metadata-string 'ostree.source-title=libtest os_repository_new_commit()' -b testos/buildmaster/x86_64-runtime \
|
||||
--add-metadata-string 'ostree.source-title=libtest os_repository_new_commit()' -b testos/buildmain/x86_64-runtime \
|
||||
-s "Build" --tree=dir=${test_tmpdir}/osdata
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
${CMD_PREFIX} ostree admin status | tee status.txt
|
||||
@ -381,7 +381,7 @@ assert_file_has_content sysroot/ostree/repo/config remote-test-config-dir
|
||||
echo "ok remote add nonphysical sysroot add-remotes-config-dir false"
|
||||
|
||||
if env OSTREE_SYSROOT_DEBUG="${OSTREE_SYSROOT_DEBUG},test-fifreeze" \
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then
|
||||
fatal "fifreeze-test exited successfully?"
|
||||
fi
|
||||
assert_file_has_content err.txt "fifreeze watchdog was run"
|
||||
|
@ -1017,7 +1017,7 @@ if ! skip_one_without_user_xattrs; then
|
||||
fi
|
||||
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=repo remote --set=tls-permissive=true add aremote http://remote.example.com/repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=repo remote --set=tls-permissive=true add aremote http://remote.example.com/repo testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content repo/config 'tls-permissive=true'
|
||||
assert_file_has_content repo/config 'remote\.example\.com'
|
||||
echo "ok remote add with set"
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Test that interrupting an upgrade is safe.
|
||||
//!
|
||||
//! This test builds on coreos-assembler's "external tests":
|
||||
//! https://github.com/coreos/coreos-assembler/blob/master/mantle/kola/README-kola-ext.md
|
||||
//! https://github.com/coreos/coreos-assembler/blob/main/mantle/kola/README-kola-ext.md
|
||||
//! Key to this in particular is coreos-assembler implementing the Debian autopkgtest reboot API.
|
||||
//!
|
||||
//! The basic model of this test is:
|
||||
|
@ -455,12 +455,12 @@ EOF
|
||||
mkdir -p usr/etc/testdirectory
|
||||
echo "a default daemon file" > usr/etc/testdirectory/test
|
||||
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-runtime -s "Build"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-runtime -s "Build"
|
||||
|
||||
# Ensure these commits have distinct second timestamps
|
||||
sleep 2
|
||||
echo "a new executable" > usr/bin/sh
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.10 -b testos/buildmain/x86_64-runtime -s "Build"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
rm -rf osdata-devel
|
||||
@ -469,7 +469,7 @@ EOF
|
||||
cd osdata-devel
|
||||
mkdir -p usr/include
|
||||
echo "a development header" > usr/include/foo.h
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-devel -s "Build"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit ${bootable_flag} --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-devel -s "Build"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo fsck -q
|
||||
|
||||
@ -516,7 +516,7 @@ os_repository_new_commit ()
|
||||
{
|
||||
boot_checksum_iteration=${1:-0}
|
||||
content_iteration=${2:-0}
|
||||
branch=${3:-testos/buildmaster/x86_64-runtime}
|
||||
branch=${3:-testos/buildmain/x86_64-runtime}
|
||||
export version=${4:-$(date "+%Y%m%d.${content_iteration}")}
|
||||
echo "BOOT ITERATION: $boot_checksum_iteration"
|
||||
cd ${test_tmpdir}/osdata
|
||||
|
@ -28,11 +28,11 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..8"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
|
||||
|
||||
echo "ok deploy command"
|
||||
@ -40,14 +40,14 @@ echo "ok deploy command"
|
||||
# Commit + upgrade twice, so that we'll rotate out the original deployment
|
||||
bootcsum1=${bootcsum}
|
||||
os_repository_new_commit
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
bootcsum2=${bootcsum}
|
||||
os_repository_new_commit "1"
|
||||
bootcsum3=${bootcsum}
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
assert_not_streq ${rev} ${newrev}
|
||||
assert_not_streq ${bootcsum1} ${bootcsum2}
|
||||
assert_not_streq ${bootcsum2} ${bootcsum3}
|
||||
|
@ -28,16 +28,16 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..1"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
os_repository_new_commit
|
||||
|
||||
rm sysroot/ostree/repo/tmp/* -rf
|
||||
export TEST_BOOTID=4072029c-8b10-60d1-d31b-8422eeff9b42
|
||||
if env OSTREE_REPO_TEST_ERROR=pre-commit OSTREE_BOOTID=${TEST_BOOTID} \
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then
|
||||
assert_not_reached "Should have hit OSTREE_REPO_TEST_ERROR_PRE_COMMIT"
|
||||
fi
|
||||
stagepath=$(ls -d sysroot/ostree/repo/tmp/staging-${TEST_BOOTID}-*)
|
||||
@ -47,12 +47,12 @@ assert_has_dir "${stagepath}"
|
||||
|
||||
export NEW_TEST_BOOTID=5072029c-8b10-60d1-d31b-8422eeff9b42
|
||||
if env OSTREE_REPO_TEST_ERROR=pre-commit OSTREE_BOOTID=${NEW_TEST_BOOTID} \
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=FOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=FOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime 2>err.txt; then
|
||||
assert_not_reached "Should have hit OSTREE_REPO_TEST_ERROR_PRE_COMMIT"
|
||||
fi
|
||||
newstagepath=$(ls -d sysroot/ostree/repo/tmp/staging-${NEW_TEST_BOOTID}-*)
|
||||
assert_has_dir "${newstagepath}"
|
||||
env OSTREE_BOOTID=${NEW_TEST_BOOTID} ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
env OSTREE_BOOTID=${NEW_TEST_BOOTID} ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
newstagepath=$(echo sysroot/ostree/repo/tmp/staging-${NEW_TEST_BOOTID}-*)
|
||||
assert_not_has_dir "${stagepath}"
|
||||
assert_not_has_dir "${newstagepath}"
|
||||
|
@ -28,10 +28,10 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..1"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin undeploy 0
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo refs > refs.txt
|
||||
assert_not_file_has_content refs.txt '^ostree/'
|
||||
|
@ -28,12 +28,12 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..2"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
echo "rev=${rev}"
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
|
||||
|
||||
etc=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc
|
||||
@ -58,9 +58,9 @@ rm ${etc}/testdirectory -rf
|
||||
|
||||
# Now deploy a new commit
|
||||
os_repository_new_commit
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
echo "newrev=${newrev}"
|
||||
newroot=sysroot/ostree/deploy/testos/deploy/${newrev}.0
|
||||
newetc=${newroot}/etc
|
||||
@ -94,32 +94,32 @@ echo "ok"
|
||||
# Add /etc/initially-empty
|
||||
cd "${test_tmpdir}/osdata"
|
||||
mkdir -p usr/etc/initially-empty
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Add empty directory"
|
||||
cd ${test_tmpdir}
|
||||
|
||||
# Upgrade, check that we have it
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty
|
||||
|
||||
# Now add a two files in initially-empty
|
||||
cd "${test_tmpdir}/osdata"
|
||||
touch usr/etc/initially-empty/{afile,bfile}
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Add empty directory"
|
||||
|
||||
# Upgrade, check that we have the two new files
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/afile
|
||||
assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/bfile
|
||||
|
||||
# Replace config file with default directory
|
||||
cd "${test_tmpdir}/osdata"
|
||||
mkdir usr/etc/somenewdir
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add default dir"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Add default dir"
|
||||
cd ${test_tmpdir}
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
newconfpath=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/somenewdir
|
||||
echo "some content blah" > ${newconfpath}
|
||||
if ${CMD_PREFIX} ostree admin upgrade --os=testos 2>err.txt; then
|
||||
@ -131,12 +131,12 @@ rm ${newconfpath}
|
||||
# Remove parent directory of modified config file
|
||||
cd "${test_tmpdir}/osdata"
|
||||
rm -rf usr/etc/initially-empty
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Remove default dir"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmain/x86_64-runtime -s "Remove default dir"
|
||||
cd ${test_tmpdir}
|
||||
newconfpath=sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/initially-empty/mynewfile
|
||||
touch ${newconfpath}
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
assert_not_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/usr/etc/initially-empty
|
||||
assert_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/initially-empty/mynewfile
|
||||
rm ${newconfpath}
|
||||
|
@ -28,23 +28,23 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..3"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=FOO=BAR --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=TESTARG=TESTVALUE --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=FOO=BAR --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=TESTARG=TESTVALUE --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*FOO=BAR'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*FOO=BAR'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE'
|
||||
${CMD_PREFIX} ostree admin deploy --karg=ANOTHERARG=ANOTHERVALUE --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=ANOTHERARG=ANOTHERVALUE --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*ANOTHERARG=ANOTHERVALUE'
|
||||
|
||||
echo "ok deploy with --karg, but same config"
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --karg-proc-cmdline --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg-proc-cmdline --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case "$arg" in
|
||||
ostree=*) # Skip ostree arg that gets stripped out
|
||||
@ -61,13 +61,13 @@ echo "ok deploy --karg-proc-cmdline"
|
||||
${CMD_PREFIX} ostree admin status
|
||||
${CMD_PREFIX} ostree admin undeploy 0
|
||||
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=APPENDARG=VALAPPEND --karg-append=APPENDARG=2NDAPPEND testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=APPENDARG=VALAPPEND --karg-append=APPENDARG=2NDAPPEND testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*FOO=BAR'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND'
|
||||
|
||||
# Check correct ordering of different-valued args of the same key.
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=FOO=TESTORDERED --karg-append=APPENDARG=3RDAPPEND testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=FOO=TESTORDERED --karg-append=APPENDARG=3RDAPPEND testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND .*FOO=TESTORDERED .*APPENDARG=3RDAPPEND'
|
||||
|
||||
echo "ok deploy --karg-append"
|
||||
|
@ -25,15 +25,15 @@ set -euo pipefail
|
||||
|
||||
# Exports OSTREE_SYSROOT so --sysroot not needed.
|
||||
setup_os_repository "archive" "syslinux"
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
|
||||
echo "1..1"
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=LABEL=foo --karg=testkarg=1 testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=LABEL=foo --karg=testkarg=1 testos:testos/buildmain/x86_64-runtime
|
||||
origdeployment=$(${CMD_PREFIX} ostree admin --sysroot=sysroot --print-current-dir)
|
||||
testconfig=etc/modified-config-file-that-will-be-removed
|
||||
touch "${origdeployment}"/"${testconfig}"
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf "^options.*root=LABEL=foo.*testkarg"
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --no-merge --karg=root=LABEL=bar testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --no-merge --karg=root=LABEL=bar testos:testos/buildmain/x86_64-runtime
|
||||
deployment=$(${CMD_PREFIX} ostree admin --sysroot=sysroot --print-current-dir)
|
||||
assert_not_streq "${origdeployment}" "${deployment}"
|
||||
assert_not_has_file "${deployment}/${testconfig}"
|
||||
|
@ -34,12 +34,12 @@ extra_admin_tests=1
|
||||
cd ${test_tmpdir}
|
||||
rm httpd osdata testos-repo sysroot -rf
|
||||
setup_os_repository "archive" "sysroot.bootloader none"
|
||||
${CMD_PREFIX} ostree pull-local --repo=sysroot/ostree/repo --remote testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree pull-local --repo=sysroot/ostree/repo --remote testos testos-repo testos/buildmain/x86_64-runtime
|
||||
# Test that configuring sysroot.bootloader="none" is a workaround for previous
|
||||
# grub2 bootloader issue (see https://github.com/ostreedev/ostree/issues/1774)
|
||||
mkdir -p sysroot/boot/grub2
|
||||
touch sysroot/boot/grub2/grub.cfg
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os testos testos/buildmaster/x86_64-runtime > out.txt
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os testos testos/buildmain/x86_64-runtime > out.txt
|
||||
assert_file_has_content out.txt "Bootloader updated.*"
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO'
|
||||
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel'
|
||||
|
@ -29,23 +29,23 @@ setup_os_repository "archive" "syslinux"
|
||||
echo "1..4"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmain/x86_64-runtime)
|
||||
assert_not_has_file sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h
|
||||
if ${CMD_PREFIX} ostree admin switch --os=testos testos/buildmaster/x86_64-runtime; then
|
||||
if ${CMD_PREFIX} ostree admin switch --os=testos testos/buildmain/x86_64-runtime; then
|
||||
assert_not_reached "Switch to same ref unexpectedly succeeded"
|
||||
fi
|
||||
echo "ok switch expected error"
|
||||
|
||||
${CMD_PREFIX} ostree admin switch --os=testos testos/buildmaster/x86_64-devel
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmaster/x86_64-devel)
|
||||
${CMD_PREFIX} ostree admin switch --os=testos testos/buildmain/x86_64-devel
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos:testos/buildmain/x86_64-devel)
|
||||
assert_file_has_content sysroot/ostree/deploy/testos/deploy/$newrev.0/usr/include/foo.h 'header'
|
||||
|
||||
echo "ok switch"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false anothertestos file://$(pwd)/testos-repo
|
||||
${CMD_PREFIX} ostree admin switch --os=testos anothertestos:testos/buildmaster/x86_64-devel
|
||||
${CMD_PREFIX} ostree admin switch --os=testos anothertestos:testos/buildmain/x86_64-devel
|
||||
# Ok this is lame, need a better shell command to extract config, or switch to gjs
|
||||
${CMD_PREFIX} ostree admin status > status.txt
|
||||
assert_file_has_content status.txt anothertestos
|
||||
|
@ -35,9 +35,9 @@ for test_bootdir in "boot" "usr/lib/ostree-boot"; do
|
||||
cd ${test_tmpdir}
|
||||
rm httpd osdata testos-repo sysroot -rf
|
||||
setup_os_repository "archive" "syslinux" $test_bootdir
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* quiet'
|
||||
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel'
|
||||
@ -59,11 +59,11 @@ setup_os_repository "archive" "syslinux" "usr/lib/ostree-boot"
|
||||
cd osdata
|
||||
echo "this is a kernel without an initramfs like Fedora 26" > usr/lib/modules/3.6.0/vmlinuz
|
||||
usrlib_modules_bootcsum=$(cat usr/lib/modules/3.6.0/vmlinuz | sha256sum | cut -f 1 -d ' ')
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-runtime -s "Build"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-runtime -s "Build"
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO'
|
||||
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel'
|
||||
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/initramfs-3.6.0.img 'an initramfs'
|
||||
|
@ -46,7 +46,7 @@ loadramdisk=load mmc ${bootpart} ${rdaddr} ${ramdisk_image}
|
||||
mmcargs=setenv bootargs $bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
|
||||
mmcboot=run loadramdisk; echo Booting from mmc ....; run mmcargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
|
||||
EOF
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
assert_file_has_content sysroot/boot/uEnv.txt "loadfdt="
|
||||
assert_file_has_content sysroot/boot/uEnv.txt "kernel_image="
|
||||
@ -71,7 +71,7 @@ bootcsum=$(
|
||||
cat ${devicetree_path} ${devicetree_overlay_path} ) |
|
||||
sha256sum | cut -f 1 -d ' ')
|
||||
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
assert_file_has_content sysroot/boot/uEnv.txt "fdtdir="
|
||||
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/dtb/asoc-board.dtb 'a device tree'
|
||||
|
@ -82,12 +82,12 @@ EOF
|
||||
mkdir -p usr/etc/testdirectory
|
||||
echo "a default daemon file" > usr/etc/testdirectory/test
|
||||
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome
|
||||
|
||||
# Ensure these commits have distinct second timestamps
|
||||
sleep 2
|
||||
echo "a new executable" > usr/bin/sh
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmain/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome
|
||||
|
||||
cd ${test_tmpdir}
|
||||
rm -rf osdata-devel
|
||||
@ -96,7 +96,7 @@ EOF
|
||||
cd osdata-devel
|
||||
mkdir -p usr/include
|
||||
echo "a development header" > usr/include/foo.h
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmaster/x86_64-devel -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.9 -b testos/buildmain/x86_64-devel -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome
|
||||
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo fsck -q
|
||||
|
||||
@ -137,9 +137,9 @@ setup_os_repository_signed "archive" "syslinux"
|
||||
echo "1..2"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --gpg-verify=true --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --gpg-verify=true --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
|
||||
|
||||
echo "ok deploy command"
|
||||
|
@ -29,8 +29,8 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..5"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
|
||||
${CMD_PREFIX} ostree admin instutil set-kargs FOO=BAR
|
||||
${CMD_PREFIX} ostree admin instutil set-kargs FOO=BAZ FOO=BIF TESTARG=TESTVALUE KEYWORD EMPTYLIST=
|
||||
@ -50,7 +50,7 @@ assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'option
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*TESTARG=TESTVALUE KEYWORD EMPTYLIST='
|
||||
echo "ok instutil set-kargs --replace"
|
||||
|
||||
${CMD_PREFIX} ostree admin instutil set-kargs --merge --append=FOO=BAR --append=APPENDARG=VALAPPEND --append=APPENDARG=2NDAPPEND testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin instutil set-kargs --merge --append=FOO=BAR --append=APPENDARG=VALAPPEND --append=APPENDARG=2NDAPPEND testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*FOO=XXX.*FOO=BAR'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND'
|
||||
echo "ok instutil set-kargs --append"
|
||||
|
@ -36,12 +36,12 @@ echo "1..1"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
echo "rev=${rev}"
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
|
||||
|
||||
parallel_cmd="parallel --gnu"
|
||||
@ -50,7 +50,7 @@ if parallel --help | grep -q -e --no-notice; then
|
||||
fi
|
||||
|
||||
count=$(($(getconf _NPROCESSORS_ONLN) * 2))
|
||||
seq "${count}" | ${parallel_cmd} -n0 ${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
seq "${count}" | ${parallel_cmd} -n0 ${CMD_PREFIX} ostree admin deploy --retain --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
|
||||
${CMD_PREFIX} ostree admin status > status.txt
|
||||
grep "testos ${rev}" status.txt | wc -l > status-matches.txt
|
||||
|
@ -31,8 +31,8 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
parent_rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse ${rev}^)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos ${parent_rev}
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos ${parent_rev}
|
||||
|
@ -31,11 +31,11 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
parent_rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse ${rev}^)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime@${parent_rev}
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime@${parent_rev}
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0
|
||||
assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0
|
||||
# Do a pull, this one should get us new content
|
||||
@ -47,7 +47,7 @@ assert_not_file_has_content out.txt 'No update available'
|
||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/${parent_rev}.0
|
||||
assert_not_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'TestOS 42 1\.0\.9'
|
||||
assert_streq "${rev}" $(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
assert_streq "${rev}" $(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
# Now, generate new content upstream; we shouldn't pull it
|
||||
os_repository_new_commit
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only --os=testos > out.txt
|
||||
|
@ -36,27 +36,27 @@ echo "1..3"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
echo "rev=${rev}"
|
||||
|
||||
# Now sysroot/ostree has the objects from the testos-repo (obtained over http
|
||||
# and kept in remote "testos"), but there is no deployment
|
||||
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/boot/ostree/testos-${bootcsum}
|
||||
|
||||
echo "ok deploy"
|
||||
|
||||
# Create a new branch which we want to migrate to
|
||||
os_repository_new_commit 1 1 testos/buildmaster/newbranch
|
||||
os_repository_new_commit 1 1 testos/buildmain/newbranch
|
||||
# bootcsum now refers to this new commit
|
||||
|
||||
# Create a new commit with an empty tree, which marks the original branch as
|
||||
# EOL, redirecting to the new one.
|
||||
mkdir empty
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=$(pwd)/empty --add-metadata-string "ostree.endoflife=Product discontinued" --add-metadata-string "ostree.endoflife-rebase=testos/buildmaster/newbranch" -b testos/buildmaster/x86_64-runtime -s "EOL redirect to new branch"
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=$(pwd)/empty --add-metadata-string "ostree.endoflife=Product discontinued" --add-metadata-string "ostree.endoflife-rebase=testos/buildmain/newbranch" -b testos/buildmain/x86_64-runtime -s "EOL redirect to new branch"
|
||||
|
||||
echo "ok new branch"
|
||||
|
||||
@ -66,7 +66,7 @@ ${CMD_PREFIX} ostree admin upgrade --os=testos --deploy-only
|
||||
|
||||
# Check we got redirected to the new branch
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf "${bootcsum}"
|
||||
rev=$(${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo rev-parse testos/buildmaster/newbranch)
|
||||
rev=$(${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo rev-parse testos/buildmain/newbranch)
|
||||
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.0/usr/bin/content-iteration "1"
|
||||
|
||||
assert_file_has_content sysroot/ostree/deploy/testos/deploy/${rev}.0.origin "newbranch"
|
||||
|
@ -28,7 +28,7 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..2"
|
||||
|
||||
ref=testos/buildmaster/x86_64-runtime
|
||||
ref=testos/buildmain/x86_64-runtime
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos ${ref}
|
||||
|
@ -29,9 +29,9 @@ echo "1..2"
|
||||
# Setup a deployment
|
||||
cd ${test_tmpdir}
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0/usr
|
||||
assert_has_dir sysroot/ostree/deploy/testos/deploy/${rev}.0/etc
|
||||
assert_has_dir sysroot/ostree/deploy/testos/var
|
||||
@ -50,7 +50,7 @@ touch -r ${usr} sysroot/ostree/deploy/testos/var/.updated
|
||||
# (current) deployment
|
||||
os_repository_new_commit
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
newrev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
assert_not_has_file sysroot/ostree/deploy/testos/deploy/${newrev}.0/etc/.updated
|
||||
assert_not_has_file sysroot/ostree/deploy/testos/var/.updated
|
||||
assert_has_file sysroot/ostree/deploy/testos/deploy/${rev}.0/etc/.updated
|
||||
|
@ -28,15 +28,15 @@ setup_os_repository "archive" "syslinux"
|
||||
|
||||
echo "1..2"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
rev=$(${CMD_PREFIX} ostree --repo=sysroot/ostree/repo rev-parse testos/buildmain/x86_64-runtime)
|
||||
export rev
|
||||
echo "rev=${rev}"
|
||||
# This initial deployment gets kicked off with some kernel arguments
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
echo "unconfigured-state=Use \"subscription-manager\" to enable online updates for example.com OS" >> sysroot/ostree/deploy/testos/deploy/${rev}.0.origin
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime
|
||||
if ${CMD_PREFIX} ostree admin upgrade --os=testos 2>err.txt; then
|
||||
assert_not_reached "upgrade unexpectedly succeeded"
|
||||
fi
|
||||
@ -44,7 +44,7 @@ assert_file_has_content err.txt "Use.*subscription.*online"
|
||||
|
||||
echo "ok error"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false otheros file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin switch --os=testos otheros:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false otheros file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin switch --os=testos otheros:testos/buildmain/x86_64-runtime
|
||||
|
||||
echo "ok switch"
|
||||
|
@ -43,7 +43,7 @@ mkdir os-collection
|
||||
ostree_repo_init os-collection --collection-id org.example.OsCollection
|
||||
mkdir -p files
|
||||
pushd files
|
||||
${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 1" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum
|
||||
${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 1" -b os/amd64/main --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum
|
||||
popd
|
||||
${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2}
|
||||
|
||||
@ -54,16 +54,16 @@ ${CMD_PREFIX} ostree --repo=local remote add apps-remote file://$(pwd)/apps-coll
|
||||
${CMD_PREFIX} ostree --repo=local remote add os-remote file://$(pwd)/os-collection --collection-id org.example.OsCollection --gpg-import=${test_tmpdir}/gpghome/key2.asc
|
||||
|
||||
${CMD_PREFIX} ostree --repo=local pull apps-remote app1
|
||||
${CMD_PREFIX} ostree --repo=local pull os-remote os/amd64/master
|
||||
${CMD_PREFIX} ostree --repo=local pull os-remote os/amd64/main
|
||||
|
||||
${CMD_PREFIX} ostree --repo=local refs > refs
|
||||
assert_file_has_content refs "^apps-remote:app1$"
|
||||
assert_file_has_content refs "^os-remote:os/amd64/master$"
|
||||
assert_file_has_content refs "^os-remote:os/amd64/main$"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=local refs --collections > refs
|
||||
cat refs | wc -l > refscount
|
||||
assert_file_has_content refs "^(org\.example\.AppsCollection, app1)$"
|
||||
assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/master)$"
|
||||
assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/main)$"
|
||||
assert_file_has_content refscount "^2$"
|
||||
|
||||
# Create a local mirror repository where we pull the branches *in mirror mode* from the two remotes.
|
||||
@ -74,7 +74,7 @@ ${CMD_PREFIX} ostree --repo=local-mirror remote add apps-remote file://$(pwd)/ap
|
||||
${CMD_PREFIX} ostree --repo=local-mirror remote add os-remote file://$(pwd)/os-collection --collection-id org.example.OsCollection --gpg-import=${test_tmpdir}/gpghome/key2.asc
|
||||
|
||||
${CMD_PREFIX} ostree --repo=local-mirror pull --mirror apps-remote app1
|
||||
${CMD_PREFIX} ostree --repo=local-mirror pull --mirror os-remote os/amd64/master
|
||||
${CMD_PREFIX} ostree --repo=local-mirror pull --mirror os-remote os/amd64/main
|
||||
|
||||
${CMD_PREFIX} ostree --repo=local-mirror refs | wc -l > refscount
|
||||
assert_file_has_content refscount "^0$"
|
||||
@ -83,10 +83,10 @@ assert_file_has_content remotescount "^0$"
|
||||
|
||||
${CMD_PREFIX} ostree --repo=local-mirror refs --collections > refs
|
||||
assert_file_has_content refs "^(org\.example\.AppsCollection, app1)$"
|
||||
assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/master)$"
|
||||
assert_file_has_content refs "^(org\.example\.OsCollection, os/amd64/main)$"
|
||||
|
||||
assert_file_has_content local-mirror/refs/mirrors/org.example.AppsCollection/app1 "^$(cat app1-checksum)$"
|
||||
assert_file_has_content local-mirror/refs/mirrors/org.example.OsCollection/os/amd64/master "^$(cat os-checksum)$"
|
||||
assert_file_has_content local-mirror/refs/mirrors/org.example.OsCollection/os/amd64/main "^$(cat os-checksum)$"
|
||||
|
||||
for repo in local local-mirror; do
|
||||
# Try finding an update for an existing branch.
|
||||
@ -98,25 +98,25 @@ for repo in local local-mirror; do
|
||||
assert_not_file_has_content find "^No results\.$"
|
||||
|
||||
# Find several updates for several existing branches.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > find
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.OsCollection os/amd64/main > find
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
||||
assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$"
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum)$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum)$"
|
||||
assert_file_has_content find "^2/2 refs were found\.$"
|
||||
assert_not_file_has_content find "^No results\.$"
|
||||
|
||||
# Find some updates and a new branch.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > find
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/main > find
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$"
|
||||
assert_file_has_content find "^ - Keyring: apps-remote\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.AppsCollection, app1) = $(cat app1-checksum)$"
|
||||
assert_file_has_content find "^ - (org\.example\.AppsCollection, app2) = $(cat app2-checksum)$"
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum)$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum)$"
|
||||
assert_file_has_content find "^3/3 refs were found\.$"
|
||||
assert_not_file_has_content find "^No results\.$"
|
||||
|
||||
@ -138,20 +138,20 @@ for repo in local local-mirror; do
|
||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||
assert_ref $repo app1 $(cat app1-checksum)
|
||||
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > pull
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.OsCollection os/amd64/main > pull
|
||||
assert_file_has_content pull "^2/2 refs were found\.$"
|
||||
assert_file_has_content pull "^Pulled 2/2 refs successfully\.$"
|
||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||
assert_ref $repo app1 $(cat app1-checksum)
|
||||
assert_ref $repo os/amd64/master $(cat os-checksum)
|
||||
assert_ref $repo os/amd64/main $(cat os-checksum)
|
||||
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > pull
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/main > pull
|
||||
assert_file_has_content pull "^3/3 refs were found\.$"
|
||||
assert_file_has_content pull "^Pulled 3/3 refs successfully\.$"
|
||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||
assert_ref $repo app1 $(cat app1-checksum)
|
||||
assert_ref $repo app2 $(cat app2-checksum)
|
||||
assert_ref $repo os/amd64/master $(cat os-checksum)
|
||||
assert_ref $repo os/amd64/main $(cat os-checksum)
|
||||
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.AppsCollection app1 org.example.AppsCollection not-an-app > pull
|
||||
assert_file_has_content pull "^1/2 refs were found\.$"
|
||||
@ -162,30 +162,30 @@ done
|
||||
|
||||
# Test pulling a new commit into the local mirror from one of the repositories.
|
||||
pushd files
|
||||
${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 2" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-2
|
||||
${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 2" -b os/amd64/main --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-2
|
||||
popd
|
||||
${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2}
|
||||
|
||||
for repo in local-mirror; do
|
||||
# Try finding an update for that branch.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/main > find
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-2)$"
|
||||
assert_file_has_content find "^1/1 refs were found\.$"
|
||||
assert_not_file_has_content find "^No results\.$"
|
||||
|
||||
# Pull it.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/main > pull || true
|
||||
assert_file_has_content pull "^1/1 refs were found\.$"
|
||||
assert_file_has_content pull "^Pulled 1/1 refs successfully\.$"
|
||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||
assert_ref $repo os/amd64/master $(cat os-checksum-2)
|
||||
assert_ref $repo os/amd64/main $(cat os-checksum-2)
|
||||
|
||||
# We need to manually update the refs afterwards, since the original pull
|
||||
# into the local-mirror was a --mirror pull — so it wrote refs/mirrors/blah.
|
||||
# This pull was not, so it wrote refs/remotes/blah.
|
||||
${CMD_PREFIX} ostree --repo=$repo refs --collections --create org.example.OsCollection:os/amd64/master os-remote:os/amd64/master
|
||||
${CMD_PREFIX} ostree --repo=$repo refs --collections --create org.example.OsCollection:os/amd64/main os-remote:os/amd64/main
|
||||
done
|
||||
|
||||
# Add the local mirror to the local repository as a remote, so that the local repo
|
||||
@ -195,46 +195,46 @@ ${CMD_PREFIX} ostree --repo=local remote add os-remote-local-mirror file://$(pwd
|
||||
|
||||
for repo in local; do
|
||||
# Try finding an update for that branch.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/main > find
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-2)$"
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/local-mirror$"
|
||||
assert_file_has_content find "^ - Keyring: os-remote-local-mirror\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-2)$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-2)$"
|
||||
assert_file_has_content find "^1/1 refs were found\.$"
|
||||
assert_not_file_has_content find "^No results\.$"
|
||||
|
||||
# Pull it.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/main > pull || true
|
||||
assert_file_has_content pull "^1/1 refs were found\.$"
|
||||
assert_file_has_content pull "^Pulled 1/1 refs successfully\.$"
|
||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||
assert_ref $repo os/amd64/master $(cat os-checksum-2)
|
||||
assert_ref $repo os/amd64/main $(cat os-checksum-2)
|
||||
done
|
||||
|
||||
# Add another commit to the OS collection, but don’t update the mirror. Then try pulling
|
||||
# into the local repository again, and check that the outdated ref in the mirror is ignored.
|
||||
pushd files
|
||||
${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 3" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-3
|
||||
${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 3" -b os/amd64/main --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-3
|
||||
popd
|
||||
${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2}
|
||||
|
||||
for repo in local; do
|
||||
# Try finding an update for that branch.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/master > find
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config org.example.OsCollection os/amd64/main > find
|
||||
assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$"
|
||||
assert_file_has_content find "^ - Keyring: os-remote\.trustedkeys\.gpg$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/master) = $(cat os-checksum-3)$"
|
||||
assert_file_has_content find "^ - (org\.example\.OsCollection, os/amd64/main) = $(cat os-checksum-3)$"
|
||||
assert_file_has_content find "^1/1 refs were found\.$"
|
||||
assert_not_file_has_content find "^No results\.$"
|
||||
|
||||
# Pull it.
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/master > pull || true
|
||||
${CMD_PREFIX} ostree --repo=$repo find-remotes --finders=config --pull org.example.OsCollection os/amd64/main > pull || true
|
||||
assert_file_has_content pull "^1/1 refs were found\.$"
|
||||
assert_file_has_content pull "^Pulled 1/1 refs successfully\.$"
|
||||
assert_not_file_has_content pull "Failed to pull some refs from the remotes"
|
||||
assert_ref $repo os/amd64/master $(cat os-checksum-3)
|
||||
assert_ref $repo os/amd64/main $(cat os-checksum-3)
|
||||
done
|
||||
|
||||
echo "ok find-remotes"
|
||||
|
@ -9,8 +9,8 @@ setup_os_repository "archive-z2" "uboot"
|
||||
cd ${test_tmpdir}
|
||||
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=rootfs --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=rootfs --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'root=LABEL=rootfs'
|
||||
assert_not_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'init='
|
||||
@ -47,8 +47,8 @@ pull_test_tree() {
|
||||
exit 1
|
||||
fi
|
||||
cd -
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree pull testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree pull testos:testos/buildmain/x86_64-runtime
|
||||
}
|
||||
|
||||
get_key_from_bootloader_conf() {
|
||||
@ -62,7 +62,7 @@ get_key_from_bootloader_conf() {
|
||||
for layout in /usr/lib/modules /usr/lib/ostree-boot /boot;
|
||||
do
|
||||
pull_test_tree "the kernel only"
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=/dev/sda2 --karg=rootwait testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=/dev/sda2 --karg=rootwait testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'rootwait'
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'init='
|
||||
assert_not_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'initrd'
|
||||
@ -70,7 +70,7 @@ do
|
||||
echo "ok switching to bootdir with no initramfs layout=$layout"
|
||||
|
||||
pull_test_tree "the kernel" "initramfs to assist the kernel"
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-none --karg=root=LABEL=rootfs testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-none --karg=root=LABEL=rootfs testos:testos/buildmain/x86_64-runtime
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'initrd'
|
||||
assert_file_has_content sysroot/boot/$(get_key_from_bootloader_conf sysroot/boot/loader/entries/ostree-2-testos.conf "initrd") "initramfs to assist the kernel"
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'root=LABEL=rootfs'
|
||||
@ -80,7 +80,7 @@ do
|
||||
echo "ok switching from no initramfs to initramfs enabled sysroot layout=$layout"
|
||||
|
||||
pull_test_tree "the kernel" "" "my .dtb file"
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
|
||||
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'init='
|
||||
assert_file_has_content sysroot/boot/"$(get_key_from_bootloader_conf sysroot/boot/loader/entries/ostree-2-testos.conf 'devicetree')" "my \.dtb file"
|
||||
|
@ -41,17 +41,17 @@ echo "a device tree" > ${devicetree_path}
|
||||
mkdir -p osdata/${modulesdir}/dtb/overlays
|
||||
echo "a device tree overlay" > ${devicetree_overlay_path}
|
||||
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} env OSTREE_SYSROOT_DEBUG=${OSTREE_SYSROOT_DEBUG},no-dtb ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos file://$(pwd)/testos-repo testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} env OSTREE_SYSROOT_DEBUG=${OSTREE_SYSROOT_DEBUG},no-dtb ostree admin deploy --os=testos testos:testos/buildmain/x86_64-runtime
|
||||
assert_has_file sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0
|
||||
assert_not_has_file sysroot/boot/ostree/testos-${bootcsum}/dtb/asoc-board.dtb 'a device tree'
|
||||
assert_streq $(ls sysroot/boot/ostree | wc -l) 1
|
||||
assert_streq $(find sysroot/boot/ostree -name '*.dtb' | wc -l) 0
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime
|
||||
env OSTREE_SYSROOT_DEBUG=${OSTREE_SYSROOT_DEBUG},no-dtb ${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmain/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
assert_streq $(ls sysroot/boot/ostree | wc -l) 2
|
||||
# Note that the bootcsum computed by the test suite doesn't include devicetree
|
||||
|
@ -112,7 +112,7 @@ test_repo_finder_config_no_configs (Fixture *fixture,
|
||||
g_autoptr(GPtrArray) results = NULL; /* (element-type OstreeRepoFinderResult) */
|
||||
g_autoptr(GError) error = NULL;
|
||||
const OstreeCollectionRef ref1 = { "org.example.Os", "exampleos/x86_64/standard" };
|
||||
const OstreeCollectionRef ref2 = { "org.example.Os", "exampleos/x86_64/buildmaster/standard" };
|
||||
const OstreeCollectionRef ref2 = { "org.example.Os", "exampleos/x86_64/buildmain/standard" };
|
||||
const OstreeCollectionRef * const refs[] = { &ref1, &ref2, NULL };
|
||||
|
||||
context = g_main_context_new ();
|
||||
|
@ -125,7 +125,7 @@ test_repo_finder_mount_no_mounts (Fixture *fixture,
|
||||
g_autoptr(GPtrArray) results = NULL; /* (element-type OstreeRepoFinderResult) */
|
||||
g_autoptr(GError) error = NULL;
|
||||
const OstreeCollectionRef ref1 = { "org.example.Collection1", "exampleos/x86_64/standard" };
|
||||
const OstreeCollectionRef ref2 = { "org.example.Collection1", "exampleos/x86_64/buildmaster/standard" };
|
||||
const OstreeCollectionRef ref2 = { "org.example.Collection1", "exampleos/x86_64/buildmain/standard" };
|
||||
const OstreeCollectionRef ref3 = { "org.example.Collection2", "exampleos/x86_64/standard" };
|
||||
const OstreeCollectionRef ref4 = { "org.example.Collection2", "exampleos/arm64/standard" };
|
||||
const OstreeCollectionRef * const refs[] = { &ref1, &ref2, &ref3, &ref4, NULL };
|
||||
|
@ -53,10 +53,10 @@ test_sysroot_reload (gconstpointer data)
|
||||
goto out;
|
||||
g_assert (!changed);
|
||||
|
||||
if (!run_sync ("ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime", &error))
|
||||
if (!run_sync ("ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmain/x86_64-runtime", &error))
|
||||
goto out;
|
||||
|
||||
if (!run_sync ("ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmaster/x86_64-runtime", &error))
|
||||
if (!run_sync ("ostree admin --sysroot=sysroot deploy --karg=root=LABEL=MOO --karg=quiet --os=testos testos:testos/buildmain/x86_64-runtime", &error))
|
||||
goto out;
|
||||
|
||||
if (!ostree_sysroot_load_if_changed (sysroot, &changed, NULL, &error))
|
||||
|
@ -49,7 +49,7 @@ GLib.setenv("OSTREE_SYSROOT_DEBUG", "mutable-deployments", true);
|
||||
let upstreamRepo = OSTree.Repo.new(Gio.File.new_for_path('testos-repo'));
|
||||
upstreamRepo.open(null);
|
||||
|
||||
let runtimeRef = 'testos/buildmaster/x86_64-runtime';
|
||||
let runtimeRef = 'testos/buildmain/x86_64-runtime';
|
||||
let [,rev] = upstreamRepo.resolve_rev(runtimeRef, false);
|
||||
|
||||
print("testos => " + rev);
|
||||
|
Loading…
Reference in New Issue
Block a user