Commit Graph

1049 Commits

Author SHA1 Message Date
Colin Walters
e4faf0d98e admin: Support installing pregenerated initramfs images from tree
Us running dracut is a hack, basically.  We should default to
generating this on the server.
2013-03-16 17:45:15 -04:00
Colin Walters
a5a46317f1 build: Bump GLib dependency to 2.34.0
Just cleaner than an unstable version.
2013-03-12 18:45:27 -04:00
Colin Walters
ae3945210c config-diff: Properly print files relative to root
Just less ugly.
2013-03-12 08:48:05 -04:00
Colin Walters
d6d2253f5a admin: Fix lookup of active root
This should hopefully *really* fix deleting running deployments

https://bugzilla.gnome.org/show_bug.cgi?id=694762
2013-03-07 16:46:41 -05:00
Colin Walters
30d46f9a02 admin: Don't delete the running deployment
https://bugzilla.gnome.org/show_bug.cgi?id=694762
2013-03-04 22:52:08 -05:00
Colin Walters
dba406bb8f deploy: Don't run triggers if /usr/share/ostree/triggers-run exists
This is preparatory work for a future gnome-ostree commit where we'll
default to running triggers on the build server side.
2013-03-04 11:52:43 -05:00
Colin Walters
a016d744ea Update libgsystem 2013-02-26 12:19:05 -05:00
Colin Walters
202c5e35c9 core: Use default /sysroot/ostree/repo or just /ostree/repo as appropriate
The old logic was just weird, special casing root, and we can easily
autodetect the case where we need /ostree/repo.
2013-02-24 10:00:23 -05:00
Colin Walters
02217ba74a build: Use AC_SYS_LARGEFILE
So we do the right thing on 32 bit.
2013-02-24 06:35:23 -05:00
Colin Walters
99fe7b66b3 pull-local: Don't call g_hash_table_init() on a NULL hash
Not sure why this wasn't crashing before.
2013-02-23 11:15:19 -05:00
Colin Walters
a821420711 core: Add API to convert csum -> checksum without malloc()
Just doing some profiling, this was in the top malloc() callers.
2013-02-23 11:02:56 -05:00
Colin Walters
a305c79f7a pull-local: Fix uninitialized variable ref 2013-02-21 13:05:14 -05:00
Colin Walters
2819f644cf TODO: A few updates 2013-02-21 11:19:00 -05:00
Colin Walters
8521438273 pull-local: Output status even in non-tty case
This way I can see progress when running builddisks.
2013-02-21 08:54:13 -05:00
Colin Walters
420e5f706a admin: Use /sysroot/ostree automatically
When booted inside an ostree system, we want /sysroot/ostree, not
just /ostree by default.
2013-02-19 11:02:33 -05:00
Colin Walters
c9f56564a3 switchroot: Use MS_MOVE to / rather than chroot
This fixes a number of bugs; the two biggest are:

1) On shutdown systemd can correctly umount /
2) We can use linux-user-chroot inside the system, as is
   necessary to do upgrades

See http://lists.freedesktop.org/archives/systemd-devel/2012-September/006703.html
2013-02-11 20:46:53 -05:00
Colin Walters
1d98f8865c pull-deploy: Allow switching trees too
$ ostree admin pull-deploy gnome-ostree trees/gnomeos-3.8-x86_64-devel

Now works to switch your current tree to -devel from the current
runtime.
2013-02-01 10:56:06 -05:00
Colin Walters
42e3f1f4ab pull-local: Fix crasher in previous commit when not connected to tty 2013-01-28 15:44:13 -05:00
Colin Walters
aa5e11af12 pull-local: Port to GSConsole 2013-01-28 15:35:47 -05:00
Colin Walters
13f36aa224 pull-local: Support pulling checksums too
This matches what pull allows.
2013-01-28 15:32:06 -05:00
Colin Walters
5424652a7e libgsystem: Update to the latest 2013-01-25 15:19:34 -05:00
Colin Walters
64934202e4 admin: Don't overwrite previous ref unless it's different
We shouldn't overwrite deploy/<osname>/previous unless we actually
have something new.

This fixes the bug where two consecutive:

$ ostree admin upgrade foo
$ ostree admin upgrade foo

would end up pruning the data for foo/previous from the repo.
2013-01-24 17:32:59 -05:00
Colin Walters
59c98d0a04 pull: Drop dead code to pad output strings too
This is in GSConsole now.
2013-01-24 15:38:06 -05:00
Colin Walters
6fde0b61a8 Port ostree-pull to GSConsole
As part of this, we need to ensure our streams are inherited across
the chain of child processes.
2013-01-24 15:22:16 -05:00
Colin Walters
fafb256f57 Update to the latest libgsystem 2013-01-23 15:20:19 -05:00
Colin Walters
13aefbc096 admin install: Ensure /ostree is initialized first
https://bugzilla.gnome.org/show_bug.cgi?id=692008
2013-01-18 08:38:09 -05:00
Colin Walters
341923b928 admin: Ensure /var/log/journal exists
This is admittedly a hack, since the story is that services should be
handling /var on their own.  But on the other hand the current systemd
story is that admins should create it to enable it.  Possibly a better
fix is --enable-journal-always or something for systemd.
2013-01-17 22:08:21 -05:00
Colin Walters
50ca6b672b update-kernel: Change dracut to use tmpdir on host, fix deploy path lookup
We had a bit of legacy code that looked for "current" if the deploy
path was unspecified; this needs to be deploy/OSNAME/current.

Secondly, we need to point dracut at a tmpdir outside of the root when
doing FUSE, because directories with mode 0700 and owned by root:root
aren't writable.

Also update libgsystem to the latest.
2013-01-09 04:32:51 -05:00
Colin Walters
77fa143bf3 admin: Add --no-bootloader option to update-kernel
Will be used by the QA scripts, since we need to inspect the kernel
configuration and generate a correct grub conf from that, rather than
trying to have update-bootloader reuse an existing config, since there
won't be one initially.
2013-01-08 13:57:24 -05:00
Colin Walters
ecc0d1e07f Update to the latest libgsystem 2013-01-08 07:04:29 -05:00
Colin Walters
1dcf796868 admin update-kernel: Drop support for booting from host kernel
Now that gnome-ostree has a kernel, this functionality is no longer
necessary.  It was always a hack.
2013-01-06 12:37:45 -05:00
Colin Walters
6b868d84d8 admin update-kernel: Ensure initramfs has correct owner/mode
It was 0600, and owned by the creating process (in the fuse case,
non-root!).  We want it 0644/root/root.
2013-01-06 06:43:49 -05:00
Colin Walters
9795f4a67e admin: Propagate --boot-dir to subcommands
Really, I should be using internal functions here...
2013-01-06 06:12:42 -05:00
Colin Walters
ccfdf22bb8 core: Drop dead prototypes from header
Followup to previous commit.
2013-01-04 19:47:56 -05:00
Colin Walters
cd5fce713c core: Reuse more libgsystem API in utils
More code drain to libgsystem.
2013-01-04 19:46:02 -05:00
Colin Walters
c9a840c659 core: Ensure kernel and initramfs are put into place with fdatasync()
Via a new libgsystem API.
2013-01-04 19:32:26 -05:00
Colin Walters
47bd290065 core: Drain fdatasync() API into libgsystem
Just code cleanup.
2013-01-04 17:25:32 -05:00
Colin Walters
2db497fd3f admin: Allow specifying --boot-dir
This is intended for use by QA tools that want to manipulate a
loopback-mounted disk image or the like.
2013-01-02 22:44:06 -05:00
Giovanni Campagna
6c9c7b0173 admin: restore current-etc symlink
It is useful now like it was before, and it is used by the grub
update script.

https://bugzilla.gnome.org/show_bug.cgi?id=690743
2012-12-26 19:42:46 +01:00
Colin Walters
9598efd001 Release 2012.13 2012-12-23 17:36:42 -05:00
Colin Walters
9bd4d35c2b pull: Fix a race condition causing an early exit
This is a little less magical than what we had before.
2012-12-23 17:22:08 -05:00
Colin Walters
3c67c209db pull: Use a basic exponential moving average for bytes/sec
Still should look what other downloading programs do, but this
is better then what we had before.
2012-12-23 14:29:15 -05:00
Colin Walters
0ab1f78ec8 admin: Add new run-triggers command
In some cases we want the ability to run triggers independently of
checking out a tree.  For example, due to kernel limitations which
impact the gnome-ostree build system, we may need to run triggers on
first boot via systemd.

Secondarily, if the user installs a system extension which adds a new
shared library to /usr/lib for example, the system will need to run
the triggers again.

Also, I think I want to take triggers out of the core and put them in
ostree admin anyways.
2012-12-22 14:52:33 -05:00
Colin Walters
3832544ac4 admin: Rework /ostree/deploy to support multiple independent operating systems
The real vision of OSTree is to "multiple versions of multiple
operating systems".  Up until now, it's worked to install gnome-ostree
inside a host distribution, but several things don't work quite right
if you try to do completely different systems.

In the new model, there's the concept of an "osname" which encompasses
a few properties:

1) Its own /var
2) A set of trees deployed in /ostree/deploy/OSNAME/
3) Its own "current" and "previous" links.

Now it no longer really makes sense to boot with "ostree=current".
Instead, you specify e.g. "ostree=gnome/current".

This is an incompatible change to the deployment code - you will need
to run init-os gnome and redeploy.

All "ostree admin" subcommands now take an OSNAME argument.
2012-12-21 13:47:15 -05:00
Colin Walters
16d312e82f admin: Support installing a kernel from the tree, default to it
The "protocol" here is rather lame; we just look for
/boot/vmlinuz-RELEASE and /lib/modules/RELEASE.  But good enough for
now.
2012-12-21 12:20:55 -05:00
Colin Walters
19df2d372d core: Use new libgsystem GSSubprocess API
It's less screwing around with GPtrArray in most cases.
2012-12-21 11:52:28 -05:00
Colin Walters
b3d8c8c0e5 build: Set libsoup min/max defines
So we don't get warnings about soup_requester being deprecated.
2012-12-21 11:33:05 -05:00
Colin Walters
90ccc7b2d2 core: Pick better names for tmpfiles if no prefix given
Just makes it easier to track down where files came from.
2012-12-21 11:30:58 -05:00
Colin Walters
3d41d1d2db OtWorkerQueue: Don't exit until we've fulfilled initial requests
This counts as an implicit "hold" on the first items, which we must
complete.  Otherwise there are race conditions where the queue may
signal idle when in fact the main process is still working.
2012-12-21 09:36:38 -05:00
Colin Walters
fddc11ca74 Update to latest libgsystem
Has a bugfix change to gs_subprocess_new().
2012-12-20 21:14:31 -05:00