fsck: report the correct error when a present file cannot be loaded

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
corrupt-repo-ref.js: more aggressive file corruption

changing only a byte may not generate a corrupted file, so play very
safe and change 10 bytes.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
admin: Add ot_admin_checksum_version to get a dup of the version for a commit
dump: Print the version when dumping a commit, log/show/etc.
admin status: Print the version
tests: Add some versioning metadata and test it appears in status output

Followup to previous commits.
Add (non-atomic) support for GRUB2 + UEFI

We need basic support for UEFI - many newer servers don't support
BIOS compatibility mode anymore.

However, this patch only implements non-atomic because UEFI is FAT, and
we can't do the previous design for OSTree of atomic swap of
/boot/loader.

The Fedora/RHEL UEFI layout has the kernels on a "real" /boot
partition, and /boot/efi/EFI/$vendor just holds the grub2 UEFI binary
and grub.cfg.

Following this, /boot/loader is still on the OS boot partition, and we
still atomically swap it.  This potentially paves the way to atomic
upgrades in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=724246
checkout: permit checkout of a single file

fixes a coredump when using a command like:

$ ostree --repo=repo checkout -U --subpath=/usr/lib/passwd \
  fedora-atomic/rawhide/x86_64/docker-host usrlib-new

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Release 2014.9
grub2: Fix bad substitution in review followup

This caused GRUB2+EFI installations to fail.
libostree: Add ostree_repo_pull_with_options()

We potentially need a lot of argument types for pull.  Rather than
have a C function with tons of arguments, let's use a GVariant a{sv}
as a handy extensible (and immutable) bag of properties.

This is prepratory work for adding an option to pull to traverse
history.

https://bugzilla.gnome.org/show_bug.cgi?id=737844
pull: Add depth support

For mirroring in particular, we really want to be able to traverse
all history.

$ ostree --repo=repo pull --mirror --depth=-1

https://bugzilla.gnome.org/show_bug.cgi?id=739240
Release 2014.10
ostree-repo-pull: Fix inverted assert condition for maxdepth

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
pull: Fix a used before initialization warning

src/libostree/ostree-repo-pull.c:1676:22: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
diff: Use gs_unref_object not gs_free on a GFile

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Release 2014.11
libostree: Reformat bootloader titles

Use the pattern:

  $PRETTY_NAME [$COMMIT_VERSION] (ostree[:$OSNAME][:$DEPLOYMENT_INDEX])

$OSNAME is only shown if there are multiple values.

$COMMIT_VERSION refers to the version tag in the commit's metadata.

$DEPLOYMENT_INDEX is only shown if no $COMMIT_VERSION is available.

https://bugzilla.gnome.org/show_bug.cgi?id=739416
commit: Split out file processing into helper function

There should be no logic change here, just reducing indentation.