1966 Commits

Author SHA1 Message Date
Matthew Barnes
f3dcb7a052 libotutil: Add ot_keyfile_copy_group()
Copies all the keys of a group from one GKeyFile to another.
2014-12-08 12:47:19 -05:00
Alexander Larsson
dbf717ac4b Add local-pull archive-z2 <=> bare-user roundtrip test
This creates a archive-z2 repo, pull-locals it to bare-user and then
again back to archive-z2 making sure things fsck along the way.
Then it checks out all repos and makes sure each one reproduces
the same result.

Unfortunately we can't install this as a real test because
it doesn't work in the test-runner because tmpfs doesn't support
user xattrs.

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-08 12:03:27 +01:00
Alexander Larsson
fcd3caf6dd Add test-basic-user.sh testing for bare-user repos
This just does whatever test-basic.sh does, but on a bare-user
repo.

This works standalone, but unfortunately it breaks in
gnome-desktop-testing-runner as /tmp doesn't support
xattrs, so it is not installed atm.

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-08 10:39:44 +01:00
Alexander Larsson
a3422791d4 Split out basic tests from test-basic.sh
This will let us reuse them with other repo types

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-08 10:39:44 +01:00
Alexander Larsson
47c612e5a0 Support for "bare-user" repo format
This format is pretty much the same as the "bare" format, except the
file ownership and xattrs is not stored in the actual filesystem object, but
rather on the side in a user xattr. This means two things:

1) An unprivileged user can store such a repo independent of the types
   of files in it or their xattrs. And you can later (as root)
   reconstruct the real filesystem tree with ownership. Although you
   can't do that using hardlink-sharing. This also means ostree
   fsck does a full verification.

2) Such a repository can be checked out with user-mode (checkout -U)
   as an unprivileged user using hardlinks for space sharing.

Additionally, symlinks are stored as regular files (with the content
being the symlink target) because user xattrs are not supported on
symlinks. We know at checkout time if the file is a symlink because
the original st_mode is stored in the xattr metadata.

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-08 10:39:39 +01:00
Alexander Larsson
26a47b9cca Add ot_lgetxattrat and ot_lsetxattrat utils
These are implementation of the missing corresponding syscalls that
are done with the /proc/self/fd mechanism described at:

https://mail.gnome.org/archives/ostree-list/2014-February/msg00017.html

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-08 10:39:39 +01:00
Colin Walters
b8a06c11f6 README.md: Add a quick blurb on style 2014-12-07 17:19:42 -05:00
Alexander Larsson
22ed7d0fbf union checkout: Fix symlink handling for xattrs
Applying xattrs on a symlink during checkout failed since
it was setting the xattrs on the final filename, not the
temporary name.

This made the "checkout union 1" test in test-basic.sh
fail.

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-05 15:53:42 +01:00
Alexander Larsson
bb82c17701 checkout: fchown symlink to proper uid/gid
When commiting a symlink we do store the uid/gid of the actual
symlink (i.e. not target). However, this was not restored
on non-user-mode checkout as it should.

This commit fixes that, and additionally it ensures xattrs
on symlinks are not set in user-mode checkout.

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-04 20:30:10 +01:00
Colin Walters
37a059925f deploy: Ensure that we can deploy using only /usr/lib/ostree-boot
rpm-ostree at least has the option to generate a tree with just that
instead of /boot, but while we were enumerating the latter, we'd still
return paths from /boot.

https://bugzilla.gnome.org/show_bug.cgi?id=740947
2014-11-30 23:14:05 -05:00
Kenjiro Nakayama
1a3f2cce5d docs: Add verbose option to manual 2014-11-30 13:42:29 -05:00
Colin Walters
2731155950 README.md: Mention patches and test suite 2014-11-30 13:23:06 -05:00
Colin Walters
546237cc6f docs: Fix a pile of Docbook validation errors
At least now validates with RNG mode in Emacs.
2014-11-29 12:15:21 -05:00
Colin Walters
f8a3d82da8 Release 2014.12 v2014.12 2014-11-26 11:56:10 -05:00
Colin Walters
038ba3dade tests: Fix u-boot test failure
This bit needs to be specific to syslinux.
2014-11-25 15:21:12 -05:00
Colin Walters
387ee4cd65 trivial: Fix typo in previous commit 2014-11-25 13:47:54 -05:00
Colin Walters
12187994e2 grub2: If using --sysroot, run in chroot
In Anaconda, we're using "ostree admin --sysroot=/mnt/sysimage
instutil set-kargs", and it was working before, but newer versions of
lorax strip out /etc/system-release which grub2 wants.

That was wrong anyways as we want the /etc/system-release from the
target root.

(Man, grub2 sucks...give me a declarative config file format I can just
 write)

https://bugzilla.gnome.org/show_bug.cgi?id=740697
2014-11-25 12:24:06 -05:00
Matthew Barnes
97558276e4 Refactor command-line parsing
Refactor command-line parsing to better utilize GOptionContext.  This
eliminates most of the manual parsing and global options are now shown
in the help output.

Here's a sample:

    $ ostree admin --help
    Usage:
      ostree admin [OPTION...] --print-current-dir|COMMAND

    Builtin "admin" Commands:
      cleanup
      config-diff
      deploy
      init-fs
      instutil
      os-init
      status
      switch
      undeploy
      upgrade

    Help Options:
      -h, --help         Show help options

    Application Options:
      --sysroot=PATH     Create a new OSTree sysroot at PATH
      -v, --verbose      Print debug information during command processing
      --version          Print version information and exit

https://bugzilla.gnome.org/show_bug.cgi?id=740295
2014-11-24 19:36:07 -05:00
Matthew Barnes
3a9127f103 Various manpage / usage blurb improvements
Corrections, clarifications, consistency.

Not a comprehensive overhaul of the manpages; they do still need work.
These are just flaws I've noted while studying the ostree command syntax.

https://bugzilla.gnome.org/show_bug.cgi?id=740097
2014-11-16 15:52:51 -05:00
Giuseppe Scrivano
f699153f67 ostree-fetcher: move more logic into ostree_fetcher_request_uri_internal
Make _ostree_fetcher_request_uri_with_partial_async and
ostree_fetcher_stream_uri_async simple wrapper around the same
function, all the requests are created in the same place now.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Giuseppe Scrivano
a5491f98cb ostree-fetcher: make _ostree_fetcher_stream_uri_sync private
Rename _ostree_fetcher_contents_membuf_sync to
ostree_fetcher_request_uri_to_membuf and drop unused argument
user_data.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Giuseppe Scrivano
c2bc99bc16 ostree-fetcher: Remove _ostree_fetcher_request_uri_to_stream function
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Giuseppe Scrivano
5546c4d2fc ostree-metalink: use _ostree_fetcher_contents_membuf_sync
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Giuseppe Scrivano
d48aca5645 ostree-fetcher: add max_size argument to change _ostree_metalink_request_sync
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Giuseppe Scrivano
a4a4921d3f ostree-fetcher: remove two unused functions
_ostree_fetcher_query_state_text() and_ostree_fetcher_get_n_requests()
have no callers, so remove them.

If they will be needed, they can be easily copied back from the git
history.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Giuseppe Scrivano
c832e9b751 metalink: have a single entry to the metalink module
Replace _ostree_metalink_request_async with a synchronous version.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Giuseppe Scrivano
d5d73debd8 ostree_fetcher: new function _ostree_fetcher_contents_membuf_sync
Move code from ostree-repo-pull.c

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-12 21:20:28 -05:00
Matthew Barnes
5c9e83c02c syslinux: Adapt to bootloader UI changes
This was a side-effect of the bootloader UI changes in bug 739416,
but should now be sufficiently future-proofed with code comments.
2014-11-10 21:31:32 -05:00
Giuseppe Scrivano
bbd3fd7a22 tests: fix intermittent failure for test-sysroot
libtestExec doesn't run twice the same process now.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-10 19:48:45 +01:00
Giuseppe Scrivano
1c2e20af25 ostree-repo-pull: Remove currently #if 0 static delta code
We can readd this in the static deltas work.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-06 18:48:29 -05:00
Colin Walters
97519b6c22 admin-test: Fix two typos in bootloader UI change
Based on a patch from Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-06 18:22:20 -05:00
Matthew Barnes
59fd2b1e43 repo: Remove unused remote-cache dir
Unused leftover from when ostree had pack files; minor cleanup.

https://bugzilla.gnome.org/show_bug.cgi?id=739746
2014-11-06 13:31:58 -05:00
Matthew Barnes
e4caf3c3cd Fix GFile leak in ostree_repo_constructed() 2014-11-05 15:41:33 -05:00
Matthew Barnes
4cc70dc1e3 build: Distribute grub2-15_ostree 2014-11-04 10:46:27 -05:00
Colin Walters
a35c4a564d commit: Split out file processing into helper function
There should be no logic change here, just reducing indentation.
2014-11-03 21:13:22 -05:00
Matthew Barnes
e5b147c643 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
2014-11-03 20:43:36 -05:00
Colin Walters
a4d82ab6b4 Release 2014.11 v2014.11 2014-10-30 14:16:03 -04:00
Giuseppe Scrivano
0a7c1851d9 diff: Use gs_unref_object not gs_free on a GFile
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-10-30 12:17:32 -04:00
Giuseppe Scrivano
cb053ae0f6 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>
2014-10-30 12:16:59 -04:00
Giuseppe Scrivano
65c0594011 ostree-repo-pull: Fix inverted assert condition for maxdepth
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-10-30 11:46:02 -04:00
Colin Walters
edc3b9a56e Release 2014.10 2014-10-29 14:05:59 -04:00
Colin Walters
bcf40b4902 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
v2014.10
2014-10-28 11:16:55 -04:00
Colin Walters
64dec0add8 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
2014-10-28 11:16:51 -04:00
Colin Walters
fb3ad0037f grub2: Fix bad substitution in review followup
This caused GRUB2+EFI installations to fail.
2014-10-27 12:19:32 -04:00
Colin Walters
159c7537c9 Release 2014.9 v2014.9 2014-10-24 13:33:49 -04:00
Giuseppe Scrivano
7973a58607 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>
2014-10-24 11:18:45 -04:00
Colin Walters
0c89abee6d 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
2014-10-23 21:42:30 -04:00
Colin Walters
b43ce2329e tests: Add some versioning metadata and test it appears in status output
Followup to previous commits.
2014-10-23 11:24:44 -04:00
James Antill
81a484459a admin status: Print the version 2014-10-23 11:24:29 -04:00
James Antill
aab6e7bdf2 dump: Print the version when dumping a commit, log/show/etc. 2014-10-23 10:21:17 -04:00