Commit Graph

2533 Commits

Author SHA1 Message Date
Colin Walters bdf24cdc04 tests: Make failing to kill the GPG agent non-fatal
It's not working for me in `make check` on a RHEL 7 Workstation,
apparently because no GPG agent is spawned.  I'm guessing this has
something to do with the GPG version?

The downside of this is we will be less likely to notice if GPG
changes again and we start leaking agents like we're in The Matrix
Reloaded.  But the real solution to that is containers anyways.

Closes: #233
Approved by: smcv
2016-03-31 18:43:31 +00:00
Simon McVittie 4c3a6272a5 debian/gbp.conf: disable numbered patches 2016-03-31 16:12:26 +01:00
Simon McVittie 3c5fbc0662 Add a patch to skip a test with non-GNU parallel more reliably 2016-03-31 16:10:15 +01:00
Simon McVittie f428f329b2 Update patches, upstreamed 2016-03-31 16:09:35 +01:00
Simon McVittie 9dafc82024 Probe for GNU parallel more accurately
moreutils parallel isn't compatible with the command-line syntax
used here. Because it doesn't implement GNU-style --help and exits 1
when that option is given, this test was correctly skipped when
using moreutils parallel, but only by mistake.

moreutils parallel might conceivably gain --help and --version in
future, but hopefully nothing incompatible with GNU parallel is going
to gain a --gnu option.

Also use the --gnu option to force the new command-line semantics;
some versions optionally supported an incompatible command-line syntax
taken from moreutils parallel.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Jonathan Lebon 8cda8b6866 basic-test: commit with a non-empty subject
[smcv: split out from a larger commit, part of PR #231; add commit message]
Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Jonathan Lebon 7835fcdc68 test-pull-untrusted.sh: always corrupt a regular file, not a symlink
test-pull-untrusted.sh would pass when run as root, but fail when run
as testuser. It turned out that the way the files were stored in the
repo when running as a testuser were different, which meant that a
different .file object was chosen for corruption. Except that file
turned out to be a symlink, so the echo "broke" actually just wrote
to the no_such_file symlink target, thus keeping the actual symlink
file's checksum the same and causing the pull-local to pass when it
should have failed.

[smcv: split this out of a larger commit, part of PR #231]
Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie e1ce859368 Skip tests that run rofiles-fuse if /dev/fuse or /etc/mtab unavailable
Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie d458399615 Force libreaddir-rand to be a shared library
If installed-tests are disabled, it would normally be a static
(convenience) library, which isn't something we can LD_PRELOAD.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie 1dd85513e5 tests/admin-test.sh: this is a bash script, not a POSIX sh script
The "function foo()" syntax is bash-specific, and Colin indicated in
PR #226 that he prefers to require bash rather than trying to support
every POSIX shell.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie 07aa8e1c76 Load g-i bindings from builddir during build-time testing
Previously, the build-time tests would only pass if the g-i bindings to
OSTree were already installed, with a reasonably similar version.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie 2b9032f016 .gitignore: update
Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie b25ddd29ab In tests that use gpg, terminate the gpg-agent after testing
Otherwise we leak those processes.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie 47fd5c74f1 tap-test: clean up temporary test directories as intended
The script created ./.testtmp but looked for ./.test, which isn't
going to work.

This means the various "ostree trivial-httpd --autoexit" processes
actually exit, because their web roots are cleaned up now.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie f8bef792cb Symlink libreaddir-rand.so into tests directory
This means it can be LD_PRELOADed during build-time testing.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie 3e3755c497 various tests: skip if temp directory lacks xattr support
Some autobuilder environments place the entire build chroot on tmpfs, so
even /var/tmp might not have this.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie c276025466 test-xattrs: use TAP syntax to skip test
Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
2016-03-31 14:22:06 +00:00
Simon McVittie 75bca9173e Skip tests involving rofiles-fuse if unavailable 2016-03-31 13:44:58 +01:00
Simon McVittie 8d30b20a8b Run dh_auto_test with VERBOSE=1, to get logs with older debhelper 2016-03-31 13:22:53 +01:00
Simon McVittie d064f20bfc Fix no-xattrs patch so it does the check after sourcing libtest.sh
Otherwise the creation of `test-xattrs` breaks the check for an empty
directory in libtest.sh, breaking installed-tests.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-31 11:08:20 +01:00
Simon McVittie e059debbb6 Mark patches as forwarded 2016-03-31 10:40:12 +01:00
Simon McVittie f7ca51a754 Add patch to mark admin-test as a bash script, not a POSIX sh script 2016-03-31 09:49:33 +01:00
Simon McVittie 85d1af2a65 debian/ostree-tests.lintian-overrides: override a couple of false positives 2016-03-31 09:41:00 +01:00
Simon McVittie 2e4ac65c4a fixup symbols 2016-03-31 09:38:38 +01:00
Simon McVittie e8723aca57 debian/rules, debian/ostree-tests.install: adjust for new installation directory for installed-tests 2016-03-31 09:24:00 +01:00
Simon McVittie 00272963ef debian/rules: clean up stale gpg-agent processes after testing 2016-03-31 09:21:59 +01:00
Simon McVittie bbac523213 debian/patches: add patches to get the build-time tests passing under sbuild 2016-03-31 09:02:34 +01:00
Simon McVittie a15d353b49 debian/rules: warn if there are leftover daemon processes after testing 2016-03-31 08:52:22 +01:00
Simon McVittie 81df52da0e debian/control: build-depend on attr, for the tests (only required if /var/tmp supports extended attributes) 2016-03-31 08:51:48 +01:00
Colin Walters 39777ded54 docs/CONTRIBUTING.md: Update for github move, Homu etc.
Closes: #230
Approved by: jlebon
2016-03-30 16:17:21 +00:00
Jonathan Lebon 9260d3dba1 commit: support editor for orphan commits
This is a follow up to #227 to allow ostree to open the editor also for
orphan commits when no subject or body is given on the cmdline.

Closes: #229
Approved by: cgwalters
2016-03-30 12:19:06 +00:00
Colin Walters 23d26d5f65 commit: Support writing orphans
The API supports this, and it's not hard for us to do in the command
line as well.  One possible use case is separating "content
generation" in a separate server.

Related: https://github.com/ostreedev/ostree/pull/223

Closes: #227
Approved by: jlebon
2016-03-30 03:10:50 +00:00
Colin Walters c6b4ecd474 commit: Support generating commits with no parent, or a custom one
When I'm doing local development builds, it's quite common for me not
to want to accumulate history.  There are also use cases for this on
build servers as well.

In particular, using this, one could write a build system that didn't
necessarily need to have access to (a copy of) the OSTree repository.
Instead, the build system would determine the last commit ID on the
branch, and pass that to a worker node, then sync the generated
content back.

The API supported generating custom commits that don't necessarily
reference the previous commit on the same branch, let's just expose
this in the command line for convenience.

I plan to also support this rpm-ostree.

Closes: #223
Approved by: jlebon
2016-03-29 14:31:29 +00:00
Colin Walters a50df5daf7 docs: Add a section on repository management
Just keeping my promise to write more documentation.  There could be a
lot more to write here, but I'm trying to get a start done.

Closes: #222
Approved by: jlebon
2016-03-29 14:10:24 +00:00
Simon McVittie b4646c7095 debian/copyright: update 2016-03-28 12:59:14 +01:00
Simon McVittie 8943fb61fb Build-depend on libmount-dev 2016-03-28 12:53:16 +01:00
Simon McVittie 955d6fc6de Fix ITP bug number in changelog (was #813308, should have been #697477) 2016-03-28 12:52:14 +01:00
Simon McVittie 45a6c109d9 packaging: fix bashism in dist-snapshot target
On Debian and its derivatives, /bin/sh is a lightweight POSIX shell
(currently dash) which does not support the bash {foo,bar} syntax.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #226
Approved by: cgwalters
2016-03-28 11:50:11 +00:00
Simon McVittie 580b672ec4 debian/libostree-1-1.symbols: update for new versioned symbols 2016-03-28 12:49:25 +01:00
Simon McVittie 1bd12183ee Remove all patches, applied upstream 2016-03-28 12:46:03 +01:00
Simon McVittie 401e2c2faf New upstream release 2016-03-28 12:43:47 +01:00
Simon McVittie cce1f8bc52 Merge tag 'upstream/2016.4' into debian/master
Upstream version 2016.4
2016-03-28 12:33:21 +01:00
Simon McVittie 36b5deae48 Imported Upstream version 2016.4 2016-03-28 12:33:19 +01:00
Simon McVittie c650515521 debian/gbp.conf: use DEP-14 branch names 2016-03-28 12:03:20 +01:00
Dan Nicholson b1e1e51660 main: Set log handler for OSTree domain
Now that OSTree is used as G_LOG_DOMAIN, set the main handler to match
so the appropriate messages are filtered. It would probably be more
appropriate to spell out "OSTree" in the code, but since G_LOG_DOMAIN is
being defined globally in the project, might as well reuse it here.

https://bugzilla.gnome.org/show_bug.cgi?id=764237

Closes: #225
Approved by: cgwalters
2016-03-26 18:22:59 +00:00
Dan Nicholson e9c58fe706 build: Set G_LOG_DOMAIN to OSTree
This will allow ostree programs to filter log messages specifically for
OSTree instead of using the NULL domain for ostree debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=764237

Closes: #225
Approved by: cgwalters
2016-03-26 18:22:59 +00:00
Dan Nicholson 750e2cbf33 core: Add debug messages for traversing
If you have a repo where a needed object has been inadvertantly removed,
all you'll get is a "No such metadata object" error with no clue about
where it was referenced from.

Add some debug messages to provide clues about which objects are being
traversed and found.

https://bugzilla.gnome.org/show_bug.cgi?id=764006

Closes: #224
Approved by: cgwalters
2016-03-26 13:50:16 +00:00
Dan Nicholson 31240982e7 core: Add verbose messages for pruning
When prune fails, it can be really difficult to figure out why. This at
least lets you know which objects are being considered.

https://bugzilla.gnome.org/show_bug.cgi?id=764006

Closes: #224
Approved by: cgwalters
2016-03-26 13:50:16 +00:00
Jonathan Lebon b7a04d51f8 OstreeSePolicy: add ostree_sepolicy_get_csum()
This can be used as a fingerprint to determine whether two
OstreeSePolicy objects are equivalent.

Also add documentation for ostree_sepolicy_get_name().

Closes: #219
Approved by: cgwalters
2016-03-25 15:28:29 +00:00
Alexander Larsson 456f515522 Add --untrusted option to pull and pull-local
https://bugzilla.gnome.org/show_bug.cgi?id=764125

Closes: #221
Approved by: cgwalters
2016-03-25 12:56:55 +00:00