1561 Commits

Author SHA1 Message Date
Colin Walters
829e0382ab bootloader: fdatasync() bootloader configuration
Let's be a bit more conservative here and actually fdatasync() the
configurations we're generating.

I'm seeing an issue at the moment where syslinux isn't finding the
config sometimes, and while I don't think this is the issue, let's try
it.
2014-04-03 22:32:30 -04:00
Colin Walters
cc8bacf8b4 bootloaders: Always write out bootloader config file
There was an attempted optimization to only write if changed, but this
is broken - we always write the bootloader config into a new
directory.

In theory we should only be writing if it changed, but let's not do a
broken optimization.
2014-04-03 21:08:03 -04:00
Colin Walters
ac40de5773 deploy: Add a debug message for which bootloader is used
Debugging something...
2014-04-03 19:39:08 -04:00
Colin Walters
890d685c79 deploy: Add an assertion that deployment directory exists
I may be seeing something going wrong in rpm-ostree, just adding this
assertion for my own sanity.
2014-04-03 18:29:07 -04:00
Colin Walters
49d736c265 tool: End status line after pull
Otherwise we potentially get overlapped output.
2014-04-03 08:04:32 -04:00
Colin Walters
edc8665206 fetcher: Honor http_proxy environment variable
https://bugzilla.gnome.org/show_bug.cgi?id=706809
2014-04-01 19:12:40 -04:00
Colin Walters
7bd00e3005 checkout: Always do chmod even in _MODE_USER
The previous commit here changed things so that we do mkdir(x, 0700),
then fchmod later only if we created the directory.

However the logic was incorrect; we still need to chmod even in
MODE_USER if we created the directory.
2014-04-01 13:07:17 -04:00
Colin Walters
956b18ace7 tools: Fix unintialized variables 2014-04-01 10:00:18 -04:00
Colin Walters
5bca569506 upgrade: Support --allow-downgrade again
This was unintentially dropped with the OstreeSysrootUpgrader rebase.
2014-03-31 22:27:56 -04:00
Colin Walters
913337c557 sysroot-upgrader: Check merge deployment, not ref for differences
Otherwise this broke atomicity; we could fetch/store the ref, then
crash, and then not upgrade the next time we tried upgrading.

The correct model is: the tree has changed if the new ref is different
from the merge deployment.
2014-03-31 14:41:13 -04:00
Colin Walters
1fd01077a5 ostree(1): Document GPG verification, link to ostree.repo(5) 2014-03-30 19:37:17 -04:00
Colin Walters
e7e6215ae3 doc: Add ostree.repo and ostree.repo-config manual pages
In particular I wanted to document gpg-verify.
2014-03-30 19:32:51 -04:00
Colin Walters
8d13e5bb74 sysroot: Be more conservative with bootlink optimization
Trying to implement "rpm-ostree rollback", in the case where we have 2
deployments with the same bootconfig that we're reordering, we need to
write bootconfig, not just swap the bootlinks.
2014-03-28 21:06:23 -04:00
Colin Walters
ad46467f2b tool: End status line in switch/upgrade too 2014-03-27 07:45:13 -04:00
Colin Walters
11ecf9267e libostree/upgrader: Don't pull if there is no remote
In this case we're just reading the local repo.
2014-03-27 07:36:50 -04:00
Colin Walters
9389b7961c libostree/upgrader: Add an API to retrieve an origin description
This will be used by "rpm-ostree upgrade".
2014-03-25 16:46:39 -04:00
Colin Walters
90883674a9 libostree/upgrader: Throw an error if osname is empty
This shouldn't happen; I'm just adding the check to force a rebuild.
2014-03-25 15:47:20 -04:00
Colin Walters
7baa600e23 Add an OstreeSysrootUpgrader API
This moves some utility code from the ostree tool into the shared
library, which will make it easier to consume by external tools.
2014-03-24 18:08:22 -04:00
Colin Walters
ffb9d34671 Move basic commit API into ostree_sysroot_simple_write_deployment()
The admin commands had this shared in tool common, but we want to
encourage external programs to do this as well.
2014-03-23 11:36:09 -04:00
Michael Scherer
2169c079b3 Add missing admin commands in the man pages 2014-03-22 14:18:59 -04:00
Michael Scherer
bfe542abd8 improve consistency with others admin commands 2014-03-22 14:15:12 -04:00
Michael Scherer
e1a1a1f593 Fix typo in man page ( envrionment => environment ) 2014-03-22 14:15:10 -04:00
Colin Walters
6c463f0b20 Release 2014.3 v2014.3 2014-03-21 14:54:03 -04:00
Colin Walters
a80872afa0 pull: Don't print, just use progress callback
More work on removing g_print() from the library.
2014-03-21 14:52:56 -04:00
Colin Walters
44c386c8f9 pull: End status line on error as well
This way we don't append the error to the current line.
2014-03-19 09:49:55 -04:00
Colin Walters
b68f8f95f0 core: Add "admin instutil set-kargs"
This will be used by Anaconda as a convenience command to set the
bootloader arguments.
2014-03-19 09:49:55 -04:00
Colin Walters
4309b49866 libostree: Add ostree_sysroot_deployment_set_kargs()
It turns out people sometimes want to be able to change the kernel
arguments.  Add a convenient API to do so for the current deployment.

This will be used by Anaconda.
2014-03-19 09:49:55 -04:00
Colin Walters
9fed088d6e libostree: Fix ostree_deployment_clone() to also clone bootconfig
This way one can easily mutate it for a new deployment list.
2014-03-19 09:49:55 -04:00
Colin Walters
606918e763 libostree: Add ostree_bootconfig_parser_clone()
This will be necessary to fix ostree_deployment_clone(), but is
potentially useful on its own for other consumers.
2014-03-19 09:49:55 -04:00
Colin Walters
24b1e9c0ac Add "ostree admin instutil", move selinux-ensure-labeled there
There are going to be a few utilities that are only useful for
installers and disk image creation tools.  Let's not expose them all
at the toplevel; instead, hide them under "instutil".
2014-03-19 09:49:55 -04:00
Colin Walters
a10ddca1da test-sysroot: Use GSystem to spawn subprocess
I was getting a weird hang in the installed tests with the shell as a
zombie process, not reaped by the parent, which was just stuck in
select() on the output pipes.  The thing is we don't actually want to
capture stdout/stderr, we just want to inherit.

GSystem.Subprocess makes that possible, so let's just use it now that
it's a proper installed library.
2014-03-19 09:15:38 -04:00
Colin Walters
efd3a75daa Revert "Disable test-sysroot.test"
This reverts commit 73868a96d14fa13e69d9df778d2363b89f41fef5.
2014-03-19 09:15:38 -04:00
Vadim Rutkovsky
73868a96d1 Disable test-sysroot.test
It hangs on test-sysroot.js:40 during GLib.spawn_command_line_sync - it seems it can't
handle sh -c and the inner process becomes a zombie
2014-03-19 13:08:37 +01:00
Colin Walters
fbc232d72b TODO: update 2014-03-15 19:05:52 -04:00
Colin Walters
ba4f7ac7be Remove custom SELinux policy
This was a temporary hack until the requisite bits landed upstream in
the Fedora SELinux policy.
2014-03-15 13:16:14 -04:00
Colin Walters
b6b7d37c9d libostree: Fix crash if output is not a tty
This was a recent regression.
2014-03-14 21:59:36 -04:00
Colin Walters
cbc11f42e5 libostree: Add API to append a GPG signature
This will be used by rpm-ostree which needs to use an external program
to sign commits.
2014-03-14 21:57:48 -04:00
Colin Walters
4995352fe0 libostree: Add a better error if we fail to read keyring directory
I had accidentally put it in the -devel package and not noticed.
2014-03-14 14:42:46 -04:00
Colin Walters
e11de9357c admin: selinux-ensure-labeled: new builtin
Code like rpm-ostree generates disk images directly.  In order to
ensure SELinux labeling is correct, it currently has a helper program
that runs over the deployment root, then over the whole disk and to
only set a label if none exist.

In order to make it easier to write installers such as Anaconda
without having them depend on rpm-ostree (or whatever other
build-server side program), pull in the helper code here.
2014-03-13 08:21:45 -04:00
Colin Walters
1f7f7382b1 deploy: Less usage of g_print
No need to spam the console here.
2014-03-11 13:16:38 -04:00
Colin Walters
bf918f1586 libostree: Remove g_print() from bootloader code
No need to be so chatty.
2014-03-11 13:15:57 -04:00
Colin Walters
5c839f0267 pull: Drop some g_print(), replace others with async progress
We shouldn't g_print() from a library, particularly when the
expectation is that the client has an async progress set up.

This should fix the pull output extending the status line.
2014-03-11 09:36:54 -04:00
Colin Walters
c2123bfc71 pull: Ensure temporary data that appears corrupted is deleted
If a MITM attacker (or just network corruption) causes a temporary
downloaded object in tmp/ to be corrupted, we'll end up
continually trying to commit it, and fail.

Fix this unlinking the temp file immediately after opening it.  This
will ensure that if we exit due to an error (or crash), the kernel
will clean up the space for us.

https://bugzilla.gnome.org/show_bug.cgi?id=725924
2014-03-07 19:36:55 -05:00
Colin Walters
19d36c540a packaging: Update internal spec file 2014-03-01 15:46:03 -05:00
Colin Walters
cca4cf3e62 build: Add --enable-selinux-custom-policy
Don't use this.

It's just for me, and only temporarily until this stuff all lands in
the Fedora (and ideally upstream) selinux-policy.
2014-03-01 15:10:40 -05:00
Colin Walters
5bda4b4347 Release 2014.2 v2014.2 2014-03-01 13:55:55 -05:00
Colin Walters
79fa7ca692 Add /run/ostree-booted
The idea with this is that things like yum should be able to look for
it and determine whether or not they should assume that they can
change things on the system.

https://bugzilla.gnome.org/show_bug.cgi?id=725380
2014-02-28 03:49:25 -05:00
Colin Walters
4f04a55a5d upgrade/switch: Fix status line being overwritten with pull progress 2014-02-27 16:27:26 -05:00
Colin Walters
d8852d099a checkout: Use fd-relative open of newly created directory
We were walking the full path again on our directories, no need to do
that.
2014-02-27 11:49:49 -05:00
Colin Walters
b6704f8346 checkout: Only fchown/fchmod directories after we're done populating them
See https://mail.gnome.org/archives/ostree-list/2014-February/msg00020.html
2014-02-27 11:19:33 -05:00