Stef Walter
f9b2c45fc0
Add 'ostree reset' command to undo a bad commit
...
Accepts the following arguments: ref checksum
Checks that the checksum is a parent of the ref before rewriting
the ref.
https://bugzilla.gnome.org/show_bug.cgi?id=705979
2013-08-16 17:28:43 +02:00
Colin Walters
5a4b7d708f
configure: Use AS_IF() consistently
...
See https://bugzilla.gnome.org/show_bug.cgi?id=681413
2013-08-15 18:33:19 -04:00
Sjoerd Simons
a00eb681a0
Install systemd units in the right location
...
Debian uses /lib/systemd/system for system unit files, while i'm
putting ostree under the /usr prefix which means the hardcoded path
fails. Leave it to configure to work out the right location for systemd
units (method copied from pollkit).
Furthermore instead of installing the unit in local-fs.target.wants by
hand add a [Install] section so systemctl enable does the right thing
https://bugzilla.gnome.org/show_bug.cgi?id=705864
2013-08-15 18:28:04 -04:00
Colin Walters
a04bda126c
core: Use gs_stream_fstat()
...
Just a cleanup.
2013-08-15 14:21:26 -04:00
Colin Walters
6bb4ea46ab
core: Add some more gtk-doc
2013-08-15 11:17:16 -04:00
Colin Walters
1f35655ac1
core: Add some gtk-doc
...
Just documenting a few functions to get in the habit of things.
2013-08-15 07:04:29 -04:00
Stef Walter
3989e0d397
Add 'ostree log' command
...
Follows the parent of commits showing each in turn until it reaches
the top of the commit tree.
https://bugzilla.gnome.org/show_bug.cgi?id=705973
2013-08-15 07:01:30 +02:00
Stef Walter
5efb8e86e9
Add ostree_commit_get_parent() to get parent from variant
...
https://bugzilla.gnome.org/show_bug.cgi?id=705973
2013-08-15 06:52:53 +02:00
Stef Walter
790132a81a
Intelligible display for 'ostree show'
...
Show something similar to git metadata display. Show raw variant
data when --raw is specified
https://bugzilla.gnome.org/show_bug.cgi?id=705973
2013-08-15 06:48:25 +02:00
Colin Walters
11bdbe1fb8
repo: Add API to load any object as a stream
...
We have APIs to load metadata as variants, and files as parsed
content/info/xattrs, but for some cases such as static deltas, all we
want is to operate on all objects in their canonical representation.
https://bugzilla.gnome.org/show_bug.cgi?id=706031
2013-08-14 21:50:37 -04:00
Colin Walters
c77908bf51
libotutil: Make use of GBytes in ot_variant_read()
...
This is just cleaner; we avoid using GObject data, etc.
https://bugzilla.gnome.org/show_bug.cgi?id=706031
2013-08-14 19:55:34 -04:00
Colin Walters
d9f59c6fd5
core: Add API to convert checksum -> csum in place
...
We already have the opposite, and this will be used in some
places to avoid a malloc.
https://bugzilla.gnome.org/show_bug.cgi?id=706031
2013-08-14 19:49:54 -04:00
Colin Walters
76cd7ae4ea
libotutil: Add API to create an "ay" GVariant from GBytes
...
We used to have a version of this, but since I'm trying to use
GBytes more, this became a more common operation, and it's annoying
to type out the whole G_VARIANT_TYPE ("ay") each time, and pass
TRUE for trusted.
https://bugzilla.gnome.org/show_bug.cgi?id=706031
2013-08-14 19:23:33 -04:00
Jeremy Whiting
71f6f10cd2
trivial-httpd: Add --force-range-requests option to force range requests
...
This will be used to test resuming interrupted downloads for
ostree-pull.
With this option, if a whole file is asked for, only half of the file
is given. Then the client should retry with a range request, and
we'll give them the other half.
https://bugzilla.gnome.org/show_bug.cgi?id=705925
2013-08-14 17:33:23 -04:00
Colin Walters
f68ac018c2
test-xattrs: Skip if current FS doesn't support user_xattr
...
tmpfs doesn't =(
2013-08-14 20:46:46 +02:00
Colin Walters
61773f6ca4
core: Add a comment header about the format
...
This should probably be a design document or something, but this is
useful for now.
2013-08-14 17:35:46 +02:00
Stef Walter
1904e3e0f4
Don't pass non-checksums to ostree_repo_has_object()
...
The 'ostree show' command passed non-checksum arguments
to the ostree_repo_has_object() function which led to
an assertion.
https://bugzilla.gnome.org/show_bug.cgi?id=705967
2013-08-14 16:08:18 +02:00
Colin Walters
8c31e6fda7
tests: Add xattr test case
...
Since it was broken up until now for multiple attributes =(
2013-08-14 15:07:14 +02:00
Stef Walter
860cc11160
Fix crasher when running 'ostree cat'
...
Cause was a buffer read overrun.
https://bugzilla.gnome.org/show_bug.cgi?id=705964
2013-08-14 14:53:17 +02:00
Stef Walter
97947373ee
Add some verbose log output when xattr functions fail
...
If any of the system xattr functions fail, clearly write out the
reason in the verbose log output.
https://bugzilla.gnome.org/show_bug.cgi?id=705893
2013-08-14 07:50:49 +02:00
Stef Walter
3f9c150b77
Don't use XATTR_REPLACE with lsetxattr()
...
If we pass XATTR_REPLACE then the attribute must already exist, which
is not our intent. Passing zero creates the attribute if necessary,
or replaces it when it already exists.
https://bugzilla.gnome.org/show_bug.cgi?id=705893
2013-08-13 15:42:54 +02:00
Stef Walter
c246c4194f
Properly separate sorted xattr names
...
We expect to be handling a string delimited by \0 characters, as
returned by llistxattr(). So stick to that behavior here.
https://bugzilla.gnome.org/show_bug.cgi?id=705893
2013-08-13 15:42:54 +02:00
Stef Walter
0111ec1307
Add some verbose logging to 'ostree commit'
...
This is so we can see near which file we fail when 'ostree commit'
falls over.
https://bugzilla.gnome.org/show_bug.cgi?id=705905
2013-08-13 15:38:51 +02:00
Stef Walter
462bcd86de
Add --verbose and -v arguments to ostree for details
...
Use the GLib debug mechanism to handle verbose output.
https://bugzilla.gnome.org/show_bug.cgi?id=705905
2013-08-13 15:37:12 +02:00
Stef Walter
1f8c7a2524
Better parsing for global ostree options
...
* Specifying global options after the command for a more natural:
# ostree commit --repo=/path/to/repo ...
* Support asking for --help without --repo
# ostree commit --help
* Support short form of -h
* Support specifying --repo without equals sign
# ostree --repo /path/to/repo commit ...
* Support global --help and -h
# ostree --help
* Ditto for ostree admin sub commands
* Removed some leaky code
https://bugzilla.gnome.org/show_bug.cgi?id=705903
2013-08-13 14:28:36 +02:00
Stef Walter
4765726ea1
Ignore some built files
...
https://bugzilla.gnome.org/show_bug.cgi?id=705900
2013-08-13 14:12:04 +02:00
Colin Walters
44012dbdd9
Update libgsystem
...
With fd leak fix.
2013-08-07 10:36:52 +02:00
Colin Walters
71c4ea67f7
core: Clean up temporary file creation
...
Use new libgsystem API, don't expose the repo's tmpdir.
2013-08-06 23:58:29 +02:00
Colin Walters
9e480cd6a9
core: Finish making object path API private
...
This allows us to more easily change the internals later.
2013-07-31 03:48:33 -04:00
Colin Walters
0dec1b287c
core: Reduce API surface for file access
...
This function was only used by internals, make it private.
2013-07-31 00:35:53 -04:00
Colin Walters
2e3f893b73
TODO: Update
2013-07-30 20:51:43 -04:00
Colin Walters
8d5b8dd740
admin: Clean up builtin prototype
...
Pass through GCancellable, and just use GFile *sysroot, since that's
all OtAdminBuiltinOpts was.
2013-07-29 18:44:41 -04:00
Colin Walters
760b866104
main: Assume / for ls if no path given
...
Since it just is kind of a sane default.
2013-07-27 20:12:07 -04:00
Colin Walters
7c5c3f2af8
core: Fix all introspection warnings
...
Still lots more docs to write and API to cleanup, but this is better.
2013-07-27 10:13:30 -04:00
Colin Walters
a5d43bb959
Install a shared library
...
This required a fair bit of surgery because previously ostree.h
included otutil.h, but that's supposed to be a private library.
2013-07-26 19:25:07 -04:00
Colin Walters
74b2c7aab3
core: Work around libguestfs/FUSE issue with setuid binaries
...
For some reason, the setuid bits are being stripped. This
workaround is enough for now.
2013-07-26 14:48:15 -04:00
Colin Walters
5aea9db3f2
Add API to retrieve statistics from transactions, use it in commit
...
It's just interesting to see =) This is also kind of prototyping out
some more "structured" output.
2013-07-25 19:23:25 -04:00
Colin Walters
6fc9483887
lib: Use -export-symbol-regex
...
Just a small step towards being a better library.
2013-07-25 17:09:00 -04:00
Colin Walters
8aa48a5f9c
fsck: Fix crash on repositories with < 10 objects
2013-07-25 12:06:21 -04:00
Colin Walters
2bcb024824
pull: Tweak status line again, do what git does
...
Almost, we don't have bytes transferred. And we lie about percentages
since as metadata comes in the total number of objects to fetch goes
up.
2013-07-24 18:20:19 -04:00
Colin Walters
89430bbe71
main: Fix previous commit to find repo in cwd over /ostree/repo
...
The tests when run inside gnome-ostree broke, and this is better
behavior.
2013-07-24 14:46:53 -04:00
Colin Walters
187c75eae5
main: Support using repo from current directory
...
$ cd repo
$ ostree ls foo /
...
Can be a lot more convenient than typing --repo=repo a lot.
2013-07-24 14:05:12 -04:00
Colin Walters
3de1d6589a
TODO: More bits about commit objects
2013-07-24 13:10:28 -04:00
Colin Walters
c9b61cbfee
Drop support for related objects and metadata in commit objects
...
While the actual commit object format is presently the same, for a
number of reasons we'd like to change it fairly radically. Among
other things, we need to drop our a{sv} types in objects, to protect
against GVariant changing format.
Since now gnome-ostree now longer uses related objects, and nothing
ever used metadata, just drop them both.
2013-07-24 12:59:27 -04:00
Colin Walters
1e7c0bb70b
main: Fix an uninitialized variable
2013-07-24 09:36:51 -04:00
Colin Walters
688d8f176b
pull: Always scan for commit object, even if ref is unchanged
...
If the admin encounters corruption and does:
$ ostree admin fsck --delete
We want them to be able to recover the objects easily from the
network; with this patch, they do:
$ ln -s dummyvalue /ostree/repo/transaction
$ ostree refs --delete remotename:branchname
$ ostree pull remotename
This patch avoids the need for the refs --delete; we might as well
force scan the commit, and with this patch we still print that it
changed.
2013-07-23 19:36:15 -04:00
Colin Walters
3ea62abe75
main: ls: Behave like standard Unix "ls" with directories
...
Default to listing directory contents, add -d/--dironly to suppress
this.
2013-07-23 18:41:03 -04:00
Colin Walters
4de1d51266
main: Squash a compiler warning
2013-07-23 18:34:34 -04:00
Colin Walters
7b056e3c50
main: Consistently use "opt_" as a prefix for option local variables
...
This makes it easier to find where we're using global state, which is
useful when refactoring code into libostree.
2013-07-23 18:33:29 -04:00
Colin Walters
b6ab480272
main: commit: Drop broken --parent option
...
No idea why we had this, it didn't do anything in the current code.
Noticed while doing other refactoring.
2013-07-23 18:24:52 -04:00