Commit Graph

1242 Commits

Author SHA1 Message Date
Colin Walters 871be4b75a libostree: Extend gtk-doc coverage for refs and prune APIs 2013-08-19 10:32:08 -04:00
Colin Walters 6a8e9d7151 ostree.doap: Update description based on docs. 2013-08-19 10:32:08 -04:00
Colin Walters 16c36fbc34 main: Use macro to reduce duplication among builtin prototypes
Just less code.
2013-08-19 10:32:08 -04:00
Colin Walters 326be41d12 Revert "libotutil: Make use of GBytes in ot_variant_read()"
This reverts commit c77908bf514d61e75798932f61b5b414d9e36a3c; we can't
do this since g_variant_get_data_as_bytes() is a GLib 2.36 API.
2013-08-18 07:51:25 -04:00
Colin Walters b35840e1b8 libotutil: Drop accidental use of GLib 2.36 API
Sticking with 2.34 for a while longer.
2013-08-18 07:50:50 -04:00
Colin Walters eaee309112 Use { 0, } for structure initialization rather than memset()
It's cleaner, safer, and I had a totally wrong idea stuck in my head
about why memset() should be used.

https://bugzilla.gnome.org/show_bug.cgi?id=705968
2013-08-18 07:20:46 -04:00
Colin Walters 5f90502482 Release 2013.5 2013-08-17 17:05:17 -04:00
Colin Walters 12ccbffad7 build: Fix and prettify build option output
The documentation one was broken by the gtk-doc changes, and let's
align things.
2013-08-17 15:21:31 -04:00
Sjoerd Simons e5d9bd97aa ostree init: Fix mode list help string
It's archive-z2, not archive-z.

https://bugzilla.gnome.org/show_bug.cgi?id=705849
2013-08-17 15:05:04 -04:00
Sjoerd Simons d1babde95e Fix make distcheck
make distcheck was unhappy for various reasons:
  * headers aren't data, so use _HEADERS otherwise compilation fails
  * Mark the gir & typelib data as cleanfiles so they aren't left around
    after make clean
  * Don't nuke the .la file. This breaks make uninstall, leave it up to
    distributions to not install .la files if they don't want them.

https://bugzilla.gnome.org/show_bug.cgi?id=705850
2013-08-17 14:57:05 -04:00
Colin Walters 00c352ba67 libostree: Delete some leftover remnant API for archive files 2013-08-17 14:08:04 -04:00
Colin Walters 35d7b9cdbf libostree: Increase gtk-doc coverage of ostree-repo.[ch] 2013-08-17 13:57:22 -04:00
Colin Walters 1fea88e64b libostree: Add gtk-doc section for ostree-repo.c 2013-08-17 13:22:58 -04:00
Colin Walters 0f9d7d2179 libostree: More gtk-doc updates for ostree-core 2013-08-17 10:54:00 -04:00
Colin Walters 75cd17d9d9 docs: Add an overview section, migrate some content from the wiki 2013-08-17 10:16:02 -04:00
Colin Walters abe2320039 libostree: Fix many gtk-doc warnings 2013-08-17 08:41:31 -04:00
Colin Walters 06d1a56bc9 core: Drop duplicated type declarations
3 fewer gtk-doc warnings, 99 still left on the wall...
2013-08-17 08:23:28 -04:00
Colin Walters c3121b52bc libostree: Document more core macros 2013-08-17 08:21:04 -04:00
Stef Walter 349d7958f3 Fix use of uninitialized memory in ostree_builtin_checksum()
https://bugzilla.gnome.org/show_bug.cgi?id=705968
2013-08-17 07:07:54 +02:00
Colin Walters aecac2fd8e TODO: Tweak 2013-08-16 23:19:30 -04:00
Colin Walters 9c79b352a1 build: Fix the build without documentation
Just key everything of gtk-doc.
2013-08-16 23:14:30 -04:00
Colin Walters 1ec7c30408 core: Remove old "archive" mode
We'll always have "bare" mode for keeping files-as-hardlinks as root.
But "archive" was my second attempt at a format for non-root file
storage, used by the gnome-ostree buildsystem which runs as non-root.

It was really handy to have a "tar" like mode where I can create
tarballs as a user, that contain files owned by root for example.

The "archive" mode stored content files as two pieces in the
filesystem; ".file" contained metadata, and ".filecontent" was the
actual content, uncompressed.  The nice thing about this was that to
check out a tree as non-root, you could just hardlink into the repo.

However, archive was fairly bad for serving via HTTP; it required
*two* HTTP requests per content object, greatly magnifing the already
inefficient fetch process.  So "archive-z2" was introduced.

To allow gnome-ostree to still check out trees as a user, the
"uncompressed-object-cache" was introduced, and that's how things have
been working for a while.

So we should just be able to kill this code.  Specifically note just
how much better the stage_object() function became.

https://bugzilla.gnome.org/show_bug.cgi?id=706057
2013-08-16 22:56:42 -04:00
Colin Walters 17560a57bf Add gtk-doc support
Yes, it's really me.  Colin Walters.  Writing documentation.  You
don't need to do a DNA test.
2013-08-16 22:56:12 -04:00
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