Commit Graph

1299 Commits

Author SHA1 Message Date
Colin Walters 8724565291 core: Drop a leftover unnecessary #define _GNU_SOURCE
We now use AC_USE_SYSTEM_EXTENSIONS.
2013-07-16 09:22:42 -04:00
Colin Walters 444234e7db core: Use gsystem API for generating temporary names
Drops duplicated code.
2013-07-16 08:51:53 -04:00
Colin Walters acdf1ca4fe core: Use gs_file_create()
This allows us to drop a chmod() invocation, since the regular file
path was the only thing that didn't handle mode.
2013-07-16 08:51:53 -04:00
Colin Walters ed55998f36 Update libgsystem 2013-07-16 08:51:53 -04:00
Colin Walters fb93b95807 admin: Rename prune -> cleanup, avoid doing repo prune twice
Calling it "cleanup" is better since it does more than repo pruning.

We were also doing a prune twice; ot_admin_cleanup() already does one,
so drop the bits to do it in cleanup.c.
2013-07-15 16:13:12 -04:00
Colin Walters d5f1ce4e17 admin: Initialize sysroot to / by default, not garbage from the stack
Oops.
2013-07-11 17:29:04 -04:00
Colin Walters 60f5183298 admin status: Print out origin too
This is useful data.
2013-07-11 17:07:14 -04:00
Colin Walters e95935a3f6 main: Also make ostree admin foo --help work
A followup for the previous commit.
2013-07-10 18:42:58 -04:00
Colin Walters b7460cf0b6 main: Only parse options in subcommands
This makes e.g. "ostree commit --help" work, which is really good.
2013-07-10 18:23:52 -04:00
Colin Walters be2bebaf3e main: Don't look for /sysroot/ostree too
No longer necessary now that we expect OS/ trees to have
/ostree -> /sysroot/ostree.
2013-07-10 18:13:55 -04:00
Colin Walters 124416d832 Use AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCE
It's less copy/paste, works everywhere, etc.

Also fix some missing #include "config.h".
2013-07-10 13:25:35 -04:00
Colin Walters 8cb348315e main: Print "error: " prefix on errors
It's just clearer that something went wrong.
2013-07-10 13:25:15 -04:00
Colin Walters 32d2cd57c1 admin: Add a warm fuzzy message to deploy about transactions
Since it sounds cool and stuff.
2013-07-10 02:30:26 -04:00
Colin Walters 1b1268d3f4 TODO: Misc updates 2013-07-10 00:00:11 -04:00
Colin Walters 12c76188c0 Delete leftover kernel update hooks 2013-07-09 20:38:05 -04:00
Colin Walters 89181c4e8e Build without libsoup again 2013-07-09 20:35:15 -04:00
Colin Walters 88cca89317 ostree: Some header file cleanups 2013-07-09 20:30:00 -04:00
Colin Walters 45c7536697 cmd: Drop "ostree admin install" and curl fetcher
It isn't useful at the moment, since the deploy stuff all changed.  It
will make sense to bring back later, but for now let's not carry
broken untested code.
2013-07-09 20:18:29 -04:00
Colin Walters 2535f32c56 libostree: Move pull code into here
More library work.
2013-07-09 20:14:53 -04:00
Colin Walters 5dd0d5da40 libostree: Move prune into OstreeRepo namespace
More library work.
2013-07-09 20:05:31 -04:00
Colin Walters 2aa0251b1b libostree: Rename ostree-traverse.h into OstreeRepo namespace
This operates on the repo, it might as well be methods on it.
2013-07-09 19:59:39 -04:00
Colin Walters cb6b69616c libostree: Split off -refs.c
Continuing to break up ostree-repo.c.
2013-07-09 19:49:00 -04:00
Colin Walters 3b6a94d272 libostree: Split off libarchive code 2013-07-09 19:11:37 -04:00
Colin Walters dbffd31017 libostree: Start splitting up the monstrous ostree-repo.c
Checkout now lives in its own file.
2013-07-09 19:02:38 -04:00
Colin Walters 5ad0671cd2 Switch to #pragma once for headers
It's just less tedious, and we're GCC/LLVM specific anyways.
2013-07-09 18:53:22 -04:00
Colin Walters 7f48c77204 pull: Explicitly use thread-default main context
As preparation for pushing our own temporary context.
2013-07-09 18:46:00 -04:00
Colin Walters 13e33cd76b admin: Use internal pull API instead of subprocess
So we're doing more of the library thing.
2013-07-09 18:34:05 -04:00
Colin Walters 4c2a8bc210 pull: Destroy queue watching GSource
When being more of a library, we can't leave garbage attached to the
default main context.
2013-07-09 18:33:30 -04:00
Colin Walters b18e21be1d core: Move pull logic into an API
The general trend should be becoming more of a shared library with
command line wrappers.
2013-07-09 17:58:03 -04:00
Colin Walters a181310a49 pull: Add "tls-permissive" config option to disable SSL/TLS certificate checks
Like GIT_SSL_NO_VERIFY=true, available for the same reasons.
2013-07-09 15:40:20 -04:00
Colin Walters 7092e88eac pull: Verify SSL/TLS certificates against system CA file by default
We also need a mechanism like GIT_SSL_NO_VERIFY...probably an option
in the config.
2013-07-09 15:02:48 -04:00
Colin Walters b5b2aca592 prepare-root: Don't be strict about the sysroot mount name here
While the systemd integration effectively requires /sysroot, it will
help people trying to use OSTree with other initramfs systems
(e.g. initramfs-tools) if we don't hardcode that requirement in this
tool.
2013-07-09 12:04:02 -04:00
Colin Walters 420763e90d tests: Add a test of corruption during a pull process
These corruption tests could be a lot better...like randomly try
single bit flips, range flips.  Better, content-aware fuzzing.  But
this is useful for now.
2013-07-09 11:28:49 -04:00
Colin Walters 43d69ac8a3 tests: Drop numeric prefix
Theoretically it's useful to have layers of tests, but in practice
it's just annoying to assign numbers.
2013-07-09 10:41:07 -04:00
Colin Walters bea4a7538f Fix test reference to obsolete ostree-pull
It was leftover in my buildroot =/
2013-07-09 09:28:02 -04:00
Colin Walters 56f8584fe4 repo: Store transaction file, use it to optimize for pull resumes
If pull is interrupted, we may have downloaded an arbitrary subset of
the requested objects.  Previously, we handled this by scanning for
all objects each time.

However, there's an easy optimization - this patch creates a lock file
in the repo.  If we don't see that file when starting a pull, we know
we don't need to stat() every file; presence of a dirtree object for
example implies the existence of everything it references.
2013-07-08 09:05:34 -04:00
Colin Walters 305cd02e0c Drop obsolete GRUB2 and kernel update hooks
We only support syslinux at the moment; grub2 should learn to parse
the bootloader spec.
2013-07-07 21:56:54 -04:00
Colin Walters 48f7186e13 Release 2013.3 2013-07-07 21:35:29 -04:00
Colin Walters d45ded3921 Add a few more bits to EXTRA_DIST 2013-07-07 21:35:29 -04:00
Colin Walters 53dcb3a68d Remove stub daemon code
This really shouldn't have lived so long...it does nothing now, and we
should probably just be exposing an API for packagekit anyways.
2013-07-07 18:14:53 -04:00
Colin Walters 26cef497a6 Remove built in "triggers"
Originally, the idea was that clients would replicate "OS/tree"s from
a build server, but we'd run things like "ldconfig" on the client.
This was to allow adding e.g. the nVidia binary driver.

However, the triggers were the only thing in the system at the moment
that really had expected knowledge of the *contents* of the OS, like
the location of binaries.

For now, it's architecturally cleaner if we move the burden of
triggers to the tree builder (e.g. gnome-ostree or RPM).  Eventually
we may want OSTree to assist with this type of thing (perhaps
something like RPM %ghost), but this is the right thing to do now.
2013-07-07 14:37:59 -04:00
Colin Walters f6bca20551 admin: Fix various compiler warnings 2013-07-07 14:30:01 -04:00
Colin Walters c66148160c admin: Also delete unsed boot directories
My VM filled up /boot.  Oops.
2013-07-07 13:45:18 -04:00
Colin Walters 1fa1443bae admin: Split up the monstrous ot-admin-functions.c
Now util, cleanup, and functions.
2013-07-07 12:42:02 -04:00
Colin Walters 4b170d656c Switch to libgsystem local allocation macros
And drop our compatibility wrapper.
2013-07-07 12:27:44 -04:00
Colin Walters bb6eedfb25 [INCOMPATIBLE CHANGE] Implement new deployment model
See https://wiki.gnome.org/OSTree/DeploymentModel2

This is a major rework of the on-disk filesystem layout, and the boot
process.  OSTree now explicitly supports upgrading kernels, and these
upgrades are also atomic.

The core concept of the new model is the "deployment list", which is
an ordered list of bootable operating system trees.  The deployment
list is reflected in the bootloader configuration; which has a kernel
argument that tells the initramfs (dracut) which operating system root
to use.

Invidiual notable changes that come along with this:

1) Operating systems should now come with their etc in usr/etc; OSTree
   will perform a 3-way merge at deployment time, and place etc in
   the actual root.  This avoids the need for a bind mount, and is
   just a lot cleaner.
2) OSTree no longer bind mounts /root, /home, and /tmp.  It is expected
   that the the OS/ has these as symbolic links into /var.

At the moment, OSTree only supports managing syslinux; other
bootloader backends will follow.
2013-07-07 11:31:26 -04:00
Colin Walters ecb3f0de03 deploy: Error out if we see usr/etc
This version of the code doesn't know what to do with new-model trees,
so just abort if we see that.  We'll likely never care about upgrades
from 1.0 to 2.0.
2013-07-05 17:29:07 -04:00
Colin Walters e8cba55a34 core: Allow '.' in refspecs too
For version numbers.
2013-07-05 16:51:47 -04:00
Colin Walters ec21dc4242 Add "trivial-httpd" builtin, use it in tests
A simple HTTP server implementation is so few lines of code when one
is linking to libsoup anyways, so let's just have one here in ostree
that will be used for the test suite.

This allows us to run the archive tests that previously required
apache even in gnome-ostree.
2013-07-05 16:28:40 -04:00
Colin Walters 2ed49a3749 tests: Pull from file:/// only works with archive-z right now 2013-07-02 11:24:07 -04:00