Commit Graph

1470 Commits

Author SHA1 Message Date
Colin Walters
26795ffc0f TODO: Update 2014-01-22 11:11:50 +00:00
Colin Walters
9c701b6ae5 tests: Only install test-corruption if gjs is found
It now uses a gjs-based helper.
2014-01-21 19:53:06 +00:00
Colin Walters
390b781d3a pull: Add remotename:ref syntax
This is really the common case.
2014-01-21 08:57:34 +00:00
Colin Walters
35c1fe324f README: Just link to wiki, move most of it to README-historical.md 2014-01-20 18:00:09 -05:00
Colin Walters
43fdfa0649 repo: Document ostree_repo_sign_commit(), and add introspection data
The important bit for introspection is (allow-none) on the homedir.
2014-01-20 12:13:37 -05:00
Colin Walters
9640171711 pull: Close another race
Only send _IDLE messages if and only if we state transition the main
thread (from idle -> !idle or !idle -> idle).  This ensures that we
don't send IDLE, then get it back, and process that when we're !idle.
2014-01-20 06:26:49 -05:00
Colin Walters
3cd866556c pull: Hopefully squash race where we would exit early
This is a redesign (again) of the pull code.  It is simpler and
survives 20 minutes of testing in a loop, whereas the old code would
only go from 30 seconds to 2 minutes.

The problem with the old code was that there was a race where we might
determine idle state even when there are content requests in flight
between the metadata thread and the main one.

This code majorly reworks things - there's now only one IDLE message,
sent in a circle from the main thread, through the metadata scanner,
and back to the main one.

Crucially it's only sent when the *main* thread is idle.  Previously
we were looking at whether the metadata scanner is idle, but that
doesn't make a lot of sense.  First let's make sure the main thread is
idle, then verify that the metadata one is.

This closes the loop because we'll have ensured we get any pending
requests.

https://bugzilla.gnome.org/show_bug.cgi?id=706456
2014-01-19 18:12:44 -05:00
Colin Walters
3802a0679b tests/pull-corruption: Ensure we corrupt an object to be pulled
This test had some nondeterminism because we chose a random
object to corrupt, but because there were multiple commits, it
was possible that we chose an object that was not being pulled.

Fix this by writing some custom GJS code to find an explicitly random
object that exists in a given ref, an change a random byte offset.
This adds a lot more randomness to the testing too.
2014-01-19 13:19:10 -05:00
Colin Walters
f841313206 libostree: Ensure we set standard::type when querying files
This makes the obvious code to recursively enumerate directories
operate more sanely.

Noticed this while trying to write corrupt-repo-ref.js.
2014-01-19 13:19:10 -05:00
Colin Walters
3ce687ef1b pull: Add a few more g_debug() and assertions
To help track down the race condition better.
2014-01-19 12:39:18 -05:00
Colin Walters
0a9f246016 tests: Small tweaks to pull corruption test
This one is failing here, I suspect it's the generic pull race
condition, but these fixes should make it slightly more reliable.
2014-01-19 11:48:27 -05:00
Colin Walters
14e1cf61d9 Update .gitignore 2014-01-19 11:33:52 -05:00
Colin Walters
d98eb901c4 deploy/main: Unify some bits between admin-switch and admin-upgrade 2014-01-19 11:28:30 -05:00
Colin Walters
1a20ab4420 test-sysroot: Update for API change 2014-01-18 17:50:22 -05:00
Colin Walters
878a43411e admin/switch: New builtin to switch between trees
This is something I want to make easier, as it better showcases the
flexibility of OSTree.
2014-01-18 17:47:16 -05:00
Colin Walters
4fff43da1b Squash some harmless compiler warnings
None of these AFAICS actually can occur, but let's silence gcc.
2014-01-18 04:53:16 -05:00
Colin Walters
d0d98d3abe libotutil: Fix a possible uninitialized free() in error path
Spotted by gcc.
2014-01-18 04:52:45 -05:00
Colin Walters
b38fb802f9 packaging: Update infrastructure
The Makefile.dist-packaging lives canonically in rpm-ostree/ for now,
it's my latest hack to automate git -> (s)rpm.

Update the spec.in from current Fedora.
2014-01-18 04:49:17 -05:00
Colin Walters
5034bf3a9d commit: Reject non-regular/non-symlinks earlier with better error message
Also avoid _NOT_SUPPORTED as that triggers the --help behavior from
the commandline; just use _FAILED.

https://bugzilla.gnome.org/show_bug.cgi?id=722410
2014-01-17 10:39:36 -05:00
Colin Walters
b2d0ba7ac1 deploy: Rework kernel arguments, add --karg-append to "admin deploy"
The "ordered hash" code was really just for kernel arguments.  And it
turns out it needs to be a multihash (for e.g. multiple console=
arguments).

So turn the OstreeOrderedHash into OstreeKernelArgs, and move the bits
to split key=value and such into there.

Now we're not making this public API yet - the public OstreeSysroot
just takes char **kargs.  To facilitate code reuse between ostree/ and
libostree/, make it a noinst libtool library.  It'll be duplicated in
the binary and library, but that's OK for now.  We can investigate
making OstreeKernelArgs public later.

https://bugzilla.gnome.org/show_bug.cgi?id=721136
2014-01-16 15:07:55 -05:00
Colin Walters
7db2031fa0 COPYING: Update to latest FSF with current address
Hooray for rpmlint.
2014-01-16 10:22:30 -05:00
Colin Walters
5bf6099a8b Unify uboot and syslinux test cases
The test-admin-deploy-1 was copied into -uboot at some point.  But
really they should be testing exactly the same thing, except for
the bootloader backend.

Unify these tests by extracting a common test core.
2014-01-15 09:48:04 -05:00
Colin Walters
fd8bd356ae Update libgsystem
This has a GsConsole fix.
2014-01-15 09:19:32 -05:00
Colin Walters
108546c08c admin: Add --karg-proc-cmdline argument
When installing a new tree inside an existing OS, this is a convenient
way to include the command line arguments one needs (such as root=).
2014-01-15 09:19:32 -05:00
Colin Walters
54e58a51ca deploy: Write bootloader config even if just kernel arguments changed
The official way to add bootloader arguments to the current deployment
is to redeploy with --karg.  However, doing so tripped up an
optimization made inside the deployment code to just swap the
bootlinks if we're keeping the same "bootcsum".

Change this optimization to look at the pair of (bootcsum, options).
2014-01-15 09:19:32 -05:00
Colin Walters
211d9c7985 build: Don't use += for ACLOCAL_AMFLAGS
It confuses the autotools.
2014-01-11 10:02:34 -07:00
Colin Walters
ff2c592ac9 pull: Ensure we begin a status line
Otherwise if the operation completes before anything happens, we hit
an assertion trying to end a status line when we didn't begin one.
2014-01-10 08:15:54 -05:00
Colin Walters
091523a3bd sysroot: Error out on deploy --os=<unknown> which has not been initialized
We should hard require "ostree admin os-init foo" before letting
deployments go there; it's too easy to typo the argument.
2014-01-08 18:30:38 -05:00
Colin Walters
c6cc7412bf Makefile-decls.am: Some minor fixes from hotssh 2014-01-03 11:43:31 -05:00
Colin Walters
ac1a6534e2 build: Add Makefile-decls.am
I'll be sharing this across more of my projects.
2014-01-03 11:39:27 -05:00
Colin Walters
aaeeb45fba Remove 'write-refs' builtin
See https://bugzilla.gnome.org/show_bug.cgi?id=705979

This was just a performance hack for gnome-continuous back before it
used libostree via g-i.
2013-12-25 14:24:49 -05:00
Colin Walters
39e3c1bb8a ostree/remote-add: Add --no-gpg-verify option
To more conveniently disable GPG verification.
2013-12-25 14:17:36 -05:00
Colin Walters
9adbc165e7 repo: Introspect _sign_commit() and _verify_commit()
We can't use #ifdef in the headers, since then g-ir-scanner won't pick
up the functions (unless we included config.h).  Let's instead always
have the symbols, but just set an error if we were built without
support for it, just like how pull works.
2013-12-23 11:40:57 -05:00
Colin Walters
a58d3d079c prune: Remove redundant 'bytes' in format string 2013-12-20 17:44:13 -05:00
Colin Walters
76d9d92916 repo: Provide a friendlier error message if no signatures are found
I always forget the key to disable it...
2013-12-17 23:00:01 -05:00
Colin Walters
68c9c45e15 repo-pull: Remove leftover unused %s 2013-12-16 18:24:03 -05:00
Roddy Shuler
fe5ed36461 core: Set mtime of content objects to 0
This is necessary to satisfy tools such as guile and python, which
compare mtimes to determine whether or not source files need to be
compiled.

https://bugzilla.gnome.org/show_bug.cgi?id=720363
2013-12-15 11:32:34 -05:00
Colin Walters
38a286f157 TODO: Add a few items 2013-11-28 23:45:56 -05:00
Colin Walters
41df7efc88 Update libgsystem 2013-11-28 23:45:48 -05:00
Colin Walters
a24afd68f0 Move xattr handling into libgsystem, fix sysroot to handle directory ownership/perms
This large patch moves the core xattr logic down into libgsystem,
which allows the gs_shutil_cp_a() API to copy them.  In turn, this
allows us to just use that API instead of rolling our own recursive
copy here.

As noted in the new comment though, one case that we are explicitly
regressing is where the new /etc removes a parent directory that's
needed by a modified file.  This seems unlikely for most vendors now,
but let's do that as a separate bug.

https://bugzilla.gnome.org/show_bug.cgi?id=711058
2013-11-28 23:28:13 -05:00
Colin Walters
a897b42a7a ostree-remount.service: Run before systemd-random-seed.service
It's essential that we've mounted /var read-write in order for
random-seed.service to work.
2013-11-22 16:42:20 -05:00
Colin Walters
2b8c717c33 fetcher: Display incremental download progress
Previously the progress meter would bump in large chunks after we
completed a download.  Instead, poll in progress files via fstat() for
their size, and add those to the running total.
2013-11-21 14:34:47 -05:00
Colin Walters
e9b35deba8 Update libgsystem
For https://bugzilla.gnome.org/show_bug.cgi?id=711057
2013-11-03 21:35:45 -05:00
Colin Walters
affccb343a main: Treat default osname more consistently
The libostree already treats passing NULL for osname as "booted
osname, if any".  We should do the same inside the tools.  The upgrade
builtin had this logic duplicated there; we should be able to safely
remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=710970
2013-10-28 09:15:32 -04:00
Daniel Narvaez
7ecfbff26e Fix crash when deploying with implicit os name
When booted into an ostree you can deploy without passing
an --os option. That was crashing though, because
ot_admin_complete_deploy_one is called with NULL
osname but it was not handling it properly.

https://bugzilla.gnome.org/show_bug.cgi?id=710970
2013-10-28 09:15:32 -04:00
Daniel Narvaez
03aa10f17d main/remote: Add a show-url operation to the remote command
Useful to get the remote url in scripts.

https://bugzilla.gnome.org/show_bug.cgi?id=710967
2013-10-28 09:14:23 -04:00
Colin Walters
73ff642b15 libostree: Remove extra : in comment
g-ir-scanner handles this, but it stuck out.
2013-10-24 20:32:20 -04:00
Colin Walters
379db715d7 libostree: Squash a compiler warning 2013-10-24 14:37:50 -04:00
Colin Walters
87922259ee libostree: Squash two g-ir-scanner warnings 2013-10-24 14:37:35 -04:00
Daniel Narvaez
ccb10d592d Add support for mkinitcpio
https://bugzilla.gnome.org/show_bug.cgi?id=710682
2013-10-24 14:27:49 -04:00