summaryrefslogtreecommitdiff
path: root/tests/test-basic-user-only.sh
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* tests: update several bare-user-only checksLuca BRUNO2021-08-241-17/+8
|
* lib/commit: autofix permissions for bare-user-onlyLuca BRUNO2021-08-201-1/+13
| | | | | This tweaks commit logic to detect bare-user-only repositories and canonicalize permissions automatically.
* lib/repo/checkout: use canonical perms in bare-user-only modeLuca BRUNO2021-08-191-1/+14
| | | | | This automatically enables canonical permissions for checkouts in bare-user-only mode.
* lib/commit: Try checksum+hardlink for untrusted local same-uid reposColin Walters2018-12-041-1/+2
| | | | | | | | | | | | This mainly helps flatpak for enabling a hardlink-able local pull during deploy in the --system case. We assume the files are immutable when owned by the same uid. See https://github.com/ostreedev/ostree/issues/1723 and https://github.com/flatpak/flatpak/pull/2342 Closes: #1776 Approved by: uajain
* Use Python 3 for testsSimon McVittie2018-02-231-1/+1
| | | | | | | Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #1463 Approved by: cgwalters
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* tests,ci: Move "test-basic" (bare mode) to installed testColin Walters2017-09-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Our CI uses default Docker, which has SELinux labeling but is rather evil in returning `EOPNOTSUPP` to any attempts to set `security.selinux`, even if to the same value. The previous fire 🔥 for this was: https://github.com/ostreedev/ostree/pull/759 The `bare` repo mode really only makes sense as uid 0, so our installed test framework is a good match for this. However, the unit tests *do* work in a privileged container even as non-root, and *also* should work on SELinux-disabled systems. So let's teach the test framework how to skip in those situations. I tested this both in a priv container (my default builder) and an unpriv container (like our CI). At the same time, start executing the `test-basic.sh` from an installed test, so we get better coverage than before. This is just the start - all of the sysroot tests really need the same treatment. Closes: #1217 Approved by: jlebon
* lib: Move bareuseronly verification into commit/coreColin Walters2017-09-211-1/+1
| | | | | | | | | | | | | | | | Conceptually `ostree-repo-pull.c` should be be written using just public APIs; we theoretically support building without HTTP for people who just want to use the object store portion and do their own fetching. We have some nontrivial behaviors in the pull layer though; one of those is the "bareuseronly" verification. Make a new internal API that accepts flags, move it into `commit.c`. This is prep for further work in changing object import to support reflinks. Closes: #1193 Approved by: jlebon
* test-basic-user-only: Skip final step if no user xattrsSimon McVittie2017-08-291-17/+19
| | | | | | | | | | | | We don't want to skip the entire test, because the whole point of bare-user-only is that it works in the absence of xattrs; but we do need to skip this last stage, which explicitly uses a bare-user repository. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #1120 Approved by: cgwalters
* lib/repo: Support hardlink conversions from bare-user to bu-onlyColin Walters2017-06-131-1/+20
| | | | | | | | | | | | | | | Thinking about the problem of flatpak converting from `bare-user` to `bare-user-only` "in place" by creating a new repo and doing a `pull-local`, I realized that we can optimize this process by doing hardlinks for both metadata and regular files. The repo formats are *almost* compatible, the exception being symlinks. An earlier patch caused us to do hardlinks for metadata, this patch takes things to the next step and special cases this specific conversion. In this case we need to parse the source object to determine whether or not it's a symlink. Closes: #922 Approved by: alexlarsson
* lib/checkout: Ignore world-writable dirs for bare-user-only checkoutColin Walters2017-06-121-1/+13
| | | | | | | | | | | | | | | | See https://github.com/ostreedev/ostree/pull/909 for more information on the rationale. Basically there's no reason for flatpak (which uses `bare-user-only`) to have world-writable dirs. Particularly with the presence of the system helper. An approach I considered instead was to parse and validate directory metadata objects at commit time. We still may do that in addition; for file objects we *had* to do it that way because the actual files would be laid down suid. But directories live only as inert `.dirmeta` objects until we do a checkout (i.e. `mkdir()`), so we can solve the problem at checkout time. Closes: #914 Approved by: alexlarsson
* repo/commit: Support group-writable files for bare-user-onlyColin Walters2017-06-081-1/+13
| | | | | | | | | | These exist in the wild for flatpak, and aren't really a problem. The canonical permissions are still either `0755` or `0644`, we just support the additional writable bit for the group (i.e. extend the set to include `0775` and `0664`) now to avoid breaking some flatpak content. Closes: #913 Approved by: alexlarsson
* tests: Add a test for bare-user-only failing to commit suid contentColin Walters2017-06-081-0/+24
| | | | | | | | We didn't have coverage of this before, and adding the test infrastructure will help ensure we have coverage for more changes here. Closes: #913 Approved by: alexlarsson
* Add basic tests for bare-user-only repo modesAlexander Larsson2017-03-271-0/+25
This is somewhat complicated by such repos only properly supporting some subset of file metadata (uid/gid 0, etc). We fix this by always commiting with filters that make it work. Closes: #750 Approved by: cgwalters