Commit Graph

2454 Commits

Author SHA1 Message Date
Simon McVittie 03171dc0d9 Add yet more patches to make the installed-tests work 2016-04-01 06:59:13 +01: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 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
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 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
Colin Walters 80698543c2 Release 2016.4 2016-03-23 15:45:59 -04:00
Dan Nicholson 7524e904b9 traverse: Require variant when traversing dirtree
The dirtree object is required for traversing, so don't use the
load_variant_if_exists() function. This will return a
G_IO_ERROR_NOT_FOUND to the caller rather than trying to ref a NULL
variant in ostree_repo_commit_traverse_iter_init_dirtree() if the object
is missing.

https://bugzilla.gnome.org/show_bug.cgi?id=764091
2016-03-23 15:36:04 -04:00
Colin Walters 7232b2940b tests: Add a commitpartial + prune test
Followup for previous commit.
2016-03-23 15:34:17 -04:00
Dan Nicholson 2ae7f619b2 prune: Don't fail on partial commits
If a commit only pull has been done, then the commit object exists in
the object store in addition to the commitpartial file. Traversing this
partial commit will likely fail, but that's expected. If traverse
returns a G_IO_ERROR_NOT_FOUND in this case, continue with pruning.

https://bugzilla.gnome.org/show_bug.cgi?id=764091
2016-03-23 15:34:17 -04:00
Alexander Larsson ddf0a02f88 pull local: Don't import objects we already have
In particular, I noticed this because the pull failed when trying to
pull from a shallow repo which only had the new objects that was
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=764059
2016-03-23 14:58:08 -04:00
Stef Walter 2454957e8d Fix building without libarchive
Although libarchive is an optional build option, the build
fails without it.

https://bugzilla.gnome.org/show_bug.cgi?id=764056
2016-03-23 13:55:34 -04:00
Colin Walters 09238da065 admin: Add an `unlock` command, and libostree API
I'm trying to improve the developer experience on OSTree-managed
systems, and I had an epiphany the other day - there's no reason we
have to be absolutely against mutating the current rootfs live.  The
key should be making it easy to rollback/reset to a known good state.

I see this command as useful for two related but distinct workflows:

 - `ostree admin unlock` will assume you're doing "development".  The
   semantics hare are that we mount an overlayfs on `/usr`, but the
   overlay data is in `/var/tmp`, and is thus discarded on reboot.
 - `ostree admin unlock --hotfix` first clones your current deployment,
   then creates an overlayfs over `/usr` persistent
   to this deployment.  Persistent in that now the initramfs switchroot
   tool knows how to mount it as well.  In this model, if you want
   to discard the hotfix, at the moment you roll back/reboot into
   the clone.

Note originally, I tried using `rofiles-fuse` over `/usr` for this,
but then everything immediately explodes because the default (at least
CentOS 7) SELinux policy denies tons of things (including `sshd_t`
access to `fusefs_t`).  Sigh.

So the switch to `overlayfs` came after experimentation.  It still
seems to have some issues...specifically `unix_chkpwd` is broken,
possibly because it's setuid?  Basically I can't ssh in anymore.

But I *can* `rpm -Uvh strace.rpm` which is handy.

NOTE: I haven't tested the hotfix path fully yet, specifically
the initramfs bits.
2016-03-23 11:09:09 -04:00
Colin Walters 0b1d301d81 libglnx porting: Use glnx_opendirat()
This unfortunately adds *more* `gs_file_get_path_cached()`, but we'll
fix that all in one go.
2016-03-23 10:26:01 -04:00
Colin Walters 18530894c7 libglnx porting: Use glnx_shutil_rm_rf_at()
In some cases (such as `ostree-sysroot-cleanup.c`), the surrounding
code would be substantially cleaner if it was also ported to
fd-relative, but I'm going to do that in a separate patch.

That way these patches are easier to review for mechanical
correctness.  I used an Emacs keyboard macro as the poor man's
[Coccinelle](http://coccinelle.lip6.fr/).
2016-03-23 10:26:01 -04:00
Colin Walters d456fe5adb libglnx porting: Use glnx_set_error_from_errno
⚠️ There is a notable spiked pit trap here around
`posix_fallocate()` and `errno`.  This has bit other projects,
see e.g.
7bb87460e6

Otherwise the port was straightforward.
2016-03-23 10:26:01 -04:00
Colin Walters 614483ecd1 Use GSubprocess instead of GSSubprocess (libgsystem removal)
Since we hard-depend on GLib 2.40, we can start using GSubprocess.
This is part of dropping our dependency on libgsystem, which is
deprecated in favor of libglnx (as well as migrating things to GLib).
2016-03-23 10:26:01 -04:00
Colin Walters afb6105a51 admin-switch: Add missing reboot argument
Spotted by jlebon in https://github.com/GNOME/ostree/pull/211
2016-03-23 09:42:17 -04:00
Simon McVittie 3f6f2e2a2f test-libarchive: fix underlinking
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-21 13:03:06 -04:00
Simon McVittie 0a7e128782 Skip test_libarchive_ignore_device_file if we cannot write xattrs
The test tries to get a filesystem that supports xattrs by writing
to /var/tmp, but in some automated build environments the entire
build chroot is on a tmpfs.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-21 13:02:49 -04:00
Simon McVittie 35f412c86a tests/admin-test.sh: add #!/bin/sh
This is executable and appears to be intended to be executed directly,
so it should have a #! line.
2016-03-21 13:02:25 -04:00
Colin Walters 63e1c86dcd mkdocs: Fix the site name 2016-03-21 12:53:40 -04:00
Colin Walters 8894bb3949 deploy: Handle a read-only /boot
I'd like to encourage people to make OSTree-managed systems more
strictly read-only in multiple places.  Ideally everywhere is
read-only normally besides `/var/`, `/tmp/`, and `/run`.

`/boot` is a good example of something to make readonly.  Particularly
now that there's work on the `admin unlock` verb, we need to protect
the system better against things like `rpm -Uvh kernel.rpm` because
the RPM-packaged kernel won't understand how to do OSTree right.

In order to make this work of course, we *do* need to remount `/boot`
as writable when we're doing an upgrade that changes the kernel
configuration.  So the strategy is to detect whether it's read-only,
and if so, temporarily mount read-write, then remount read-only when
the upgrade is done.

We can generalize this in the future to also do `/etc` (and possibly
`/sysroot/ostree/` although that gets tricky).

One detail: In order to detect "is this path a mountpoint" is
nontrivial - I looked at copying the systemd code, but the right place
is to use `libmount` anyways.
2016-03-21 12:49:05 -04:00
Simon McVittie 934241a5e0 2016.3-1 2016-03-19 17:56:32 +00:00
Simon McVittie 1137fffe6b Add a missing #!/bin/sh to one test 2016-03-19 17:56:15 +00:00
Simon McVittie fb4568be2e Fix permissions of installed scripts, not the copy in debian/tmp
dh_fixperms runs after dh_install, so chmod on debian/tmp is not
effective.
2016-03-19 17:53:43 +00:00
Simon McVittie 75f85052e2 Stop dh_makeshlibs thinking that the LD_PRELOAD module libreaddir-rand.so (part of the tests) is meant to be a shared library 2016-03-19 17:33:52 +00:00
Simon McVittie 277fe5620f Re-run `wrap-and-sort -abst` 2016-03-19 16:52:30 +00:00
Colin Walters b842429bf2 manual: Migrate related projects wiki page into manual
This content currently lives here:
<https://wiki.gnome.org/Projects/OSTree/RelatedProjects>.  Moving it
into the manual in Markdown:

 - Makes it look better
 - It's more useful alongside the rest of the docs
 - Is much less crummy in general than the GNOME wiki
2016-03-18 13:11:54 -04:00
Alexander Larsson cb60de0f95 Don't fail "ostree remote refs" if writing the summary cache is not permitted
It used to be allowed to run something like "ostree remote refs" on
a read-only (e.g. system) repo. However, the summary cache caused that to
break. This commit just makes it not save the cache if we get some kind
of permission error when writing it. It'll still work, even without the
cache.

https://bugzilla.gnome.org/show_bug.cgi?id=763855
2016-03-18 17:33:39 +01:00
Colin Walters c58ad36840 libglnx porting: gs_transfer_out_value -> g_steal_pointer
It's a bit more verbose but...eh.
2016-03-18 12:08:19 -04:00