summaryrefslogtreecommitdiff
path: root/Makefile-ostree.am
Commit message (Collapse)AuthorAgeFilesLines
* admin: Add an `unlock` command, and libostree APIColin Walters2016-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm trying to improve the developer experience on OSTree-managed systems, and I had an epiphany the other day - there's no reason we have to be absolutely against mutating the current rootfs live. The key should be making it easy to rollback/reset to a known good state. I see this command as useful for two related but distinct workflows: - `ostree admin unlock` will assume you're doing "development". The semantics hare are that we mount an overlayfs on `/usr`, but the overlay data is in `/var/tmp`, and is thus discarded on reboot. - `ostree admin unlock --hotfix` first clones your current deployment, then creates an overlayfs over `/usr` persistent to this deployment. Persistent in that now the initramfs switchroot tool knows how to mount it as well. In this model, if you want to discard the hotfix, at the moment you roll back/reboot into the clone. Note originally, I tried using `rofiles-fuse` over `/usr` for this, but then everything immediately explodes because the default (at least CentOS 7) SELinux policy denies tons of things (including `sshd_t` access to `fusefs_t`). Sigh. So the switch to `overlayfs` came after experimentation. It still seems to have some issues...specifically `unix_chkpwd` is broken, possibly because it's setuid? Basically I can't ssh in anymore. But I *can* `rpm -Uvh strace.rpm` which is handy. NOTE: I haven't tested the hotfix path fully yet, specifically the initramfs bits.
* build: Link ostree with libarchiveJoaquim Rocha2016-02-221-0/+5
| | | | | | | libarchive (when available) is being used in ot-builtin-export.c so it is necessary to link ostree with it. https://bugzilla.gnome.org/show_bug.cgi?id=762457
* Add an `export` builtin, and API to write to libarchiveColin Walters2016-02-141-0/+1
| | | | | | | | | | At the moment I'm looking at using rpm-ostree to manage RPM inputs which can then be converted into Docker images. It's most convenient if we can stream directly out of libostree rather than doing a checkout + tar combination. There are also backup/debugging etc. reasons to implement `export` as well.
* build: 'make clean' removes parse-datetime.cGiuseppe Scrivano2016-02-071-0/+2
| | | | | | and fix make dist while at it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* remote: Add "ostree remote summary" commandMatthew Barnes2015-12-171-1/+2
| | | | | | | | Downloads and prints a remote summary file and any signatures in an easy-to-read format, or alternatively with the --raw option, prints the summary GVariant data directly. https://bugzilla.gnome.org/show_bug.cgi?id=759250
* build: Delete generated parse-datetime.c file, use AM_V_GENColin Walters2015-12-071-2/+2
| | | | | | | | Bison is a well known external dependency, so just require it. Including the generated content in git means it may or may not be regenerated based randomly on timestamps, etc. Also use `$(AM_V_GEN)` so we get prettier output.
* parse-datetime: use the module from gnulibGiuseppe Scrivano2015-12-041-0/+4
| | | | | | | | | | | | | Use the parse-datetime module from gnulib, and adapt it to not require other modules as portability is not really an issue for us. DATE can be specified in different formats, such as: "-1 week", "last monday", "1 week ago". Include the generated .c file in the repository so to not add another dependency to Bison. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* prune: add --keep-younger-than=DATEGiuseppe Scrivano2015-11-161-0/+2
| | | | | | The format used for DATE is "%Y-%m-%d %H:%M:%S %z" Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* ostree: Add a "remote refs" commandMatthew Barnes2015-06-261-0/+1
| | | | | | | Works like "ostree refs" but fetches refs from a remote repo. This depends on the remote repo having a summary file, but any repo being served over HTTP *ought* to have one.
* ostree: Add a "remote gpg-import" commandMatthew Barnes2015-05-131-0/+1
| | | | Imports GPG keys into a remote-specific keyring.
* ostree: Split up "remote" subcommandsMatthew Barnes2015-05-011-0/+9
| | | | | | | To make room for "remote gpg-import", which will be non-trivial. ot-builtin-remote.c was already a little too crowded anyway. Also while we're at it, port this bit of code away from libgsystem.
* src: Move ot-tool-util from ostree/ to libotutil/Giuseppe Scrivano2015-03-061-2/+0
| | | | | | These utilities are not actually specific to the ostree commandline. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Add bsdiff submoduleGiuseppe Scrivano2015-03-031-1/+1
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* ostree: Add gpg-sign commandMatthew Barnes2015-02-261-0/+1
| | | | Signs a commit with one or more GPG keys.
* Use libglnxColin Walters2015-02-221-2/+2
| | | | | | Starting down the path of not using libgsystem. The main win here will be code sharing between ostree/rpm-ostree as well as going down the path of not using GFile * for local files.
* admin: Add set-origin commandColin Walters2015-01-191-0/+1
| | | | | | | | See projectatomic/rpm-ostree#42 for rationale. There are two high level use cases: - If the OS comes unconfigured, this is a way to point it at a repo of your choice. - To switch between repositories while keeping the same branch easily.
* checkout: Add --fsync=falseColin Walters2015-01-071-0/+2
| | | | | | | | | | | Some use cases for checkouts don't need to fsync during checkout. Installer programs for example will just do a global fsync at the end. In the future, the default "ostree admin" core could also be rearchitected to only do a transaction commit right before reboot, and do the fsync then. https://bugzilla.gnome.org/show_bug.cgi?id=742482
* Add ostree_repo_pull_default_console_progress_changed()Matthew Barnes2014-12-181-2/+0
| | | | | Replaces ot_common_pull_progress() in ostree binary, so it can be shared with rpm-ostree.
* libostree: Add initial GRUB2 supportColin Walters2014-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | In this approach, we drop a /etc/grub.d/15_ostree file which is a hybrid of shell/C that picks up bits from the GRUB2 library (e.g. the block device script generation), and then calls into libostree's GRUB2 code which knows about the BLS entries. This is admittedly ugly. There exists another approach for GRUB2 to learn the BLS specification. However, the spec has a few issues: https://www.redhat.com/archives/anaconda-devel-list/2014-July/msg00002.html This approach also gives a bit more control to the admin via the naming of the 15_ostree symlink; they can easily disable it: Or reorder the ostree entries ahead of 10_linux: Also, this approach doesn't require patches for grub2, which is an issue with the pressure to backport (rpm-)OSTree to EL7.
* build: Unify CPPFLAGS settingsColin Walters2014-09-081-1/+0
| | | | | | | The libostree core uses SYSCONFDIR now, so we should ensure it's used consistently. Someone else was seeing SYSCONFDIR not being defined while compiling with a newer automake version, which may process CPPFLAGS more precisely.
* Add repository "summary" file and metalink supportColin Walters2014-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | For Fedora and potentially other distributions which use globally distributed mirrors, metalink is a popular solution to redirect clients to a dynamic set of mirrors. In order to make metalink work though, it needs *one* file which can be checksummed. (Well, potentially we could explode all refs into the metalink.xml, but that would be a lot more invasive, and a bit weird as we'd end up checksumming the checksum file). This commit adds a new command: $ ostree summary -u To regenerate the summary file. Can only be run by one process at a time. After that's done, the metalink can be generated based on it, and the client fetch code will parse and load it. https://bugzilla.gnome.org/show_bug.cgi?id=729585
* Support /etc/ostree/remotes.dColin Walters2014-05-081-1/+3
| | | | | | | | | | | | | | | For many OS install scenarios, one runs through an installer which may come with embedded data, and then the OS is configured post-install to receive updates. In this model, it'd be nice to avoid the post-install having to rewrite the /ostree/repo/config file. Additionally, it feels weird for admins to interact with "/ostree" - let's make the system feel more like Unix and have our important configuration in /etc. https://bugzilla.gnome.org/show_bug.cgi?id=729343
* Use external libgsystem 2014.2Colin Walters2014-04-041-1/+1
| | | | | | | It's been split off for a while, let's kill the code duplication. Among other things, this fixes the systemd detection for the journal logging.
* core: Add "admin instutil set-kargs"Colin Walters2014-03-191-0/+1
| | | | | This will be used by Anaconda as a convenience command to set the bootloader arguments.
* Add "ostree admin instutil", move selinux-ensure-labeled thereColin Walters2014-03-191-1/+3
| | | | | | 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".
* admin: selinux-ensure-labeled: new builtinColin Walters2014-03-131-0/+1
| | | | | | | | | | | 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.
* Initial basic static delta code dropColin Walters2014-02-041-0/+1
| | | | | | | | | This has a very basic level of functionality (deltas can be generated, and applied offline). There is only some stubbed out pull code to fetch them via HTTP. But, better to commit this now and improve it from a known starting point, rather than have it languish in a branch.
* admin/switch: New builtin to switch between treesColin Walters2014-01-181-0/+1
| | | | | This is something I want to make easier, as it better showcases the flexibility of OSTree.
* deploy: Rework kernel arguments, add --karg-append to "admin deploy"Colin Walters2014-01-161-1/+1
| | | | | | | | | | | | | | | | | The "ordered hash" code was really just for kernel arguments. And it turns out it needs to be a multihash (for e.g. multiple console= arguments). So turn the OstreeOrderedHash into OstreeKernelArgs, and move the bits to split key=value and such into there. Now we're not making this public API yet - the public OstreeSysroot just takes char **kargs. To facilitate code reuse between ostree/ and libostree/, make it a noinst libtool library. It'll be duplicated in the binary and library, but that's OK for now. We can investigate making OstreeKernelArgs public later. https://bugzilla.gnome.org/show_bug.cgi?id=721136
* Remove 'write-refs' builtinColin Walters2013-12-251-1/+0
| | | | | | | See https://bugzilla.gnome.org/show_bug.cgi?id=705979 This was just a performance hack for gnome-continuous back before it used libostree via g-i.
* Add OstreeAsyncProgress, use it for ostree_repo_pullColin Walters2013-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | | Several APIs in libostree were moved there from the commandline code, and have hardcoded g_print() for progress and notifications. This isn't useful for people who want to write PackageKit backends, custom GUIs and the like. From what I can tell, there isn't really a winning precedent in GLib for progress notifications. PackageKit has the model where the source has GObject properties that change as async ops execute, which isn't bad...but I'd like something a bit more general where say you can have multiple outstanding async ops and sensibly track their state. So, OstreeAsyncProgress is basically a threadsafe property bag with a change notification signal. Use this new API to move the GSConsole usage (i.e. g_print()) out from libostree/ and into ostree/.
* libostree: Nearly complete move of API into OstreeSysrootColin Walters2013-09-151-5/+0
| | | | Move the deployment code too.
* libostree: Move a lot more sysroot API hereColin Walters2013-09-151-7/+0
| | | | OstreeBootloader is temporarily public API.
* Move Deployment and BootconfigParser into libostreeColin Walters2013-09-151-4/+0
| | | | | | As part of moving admin functionality there. While we are doing this, rename OtConfigParser to OstreeBootConfig parser since it's a better name.
* ostree: Support for using EDITOR to fill commit subject/bodyStef Walter2013-08-291-0/+2
| | | | | | | | | | | Behave similar to git when 'ostree commit' is run without a --subject or --body. Bring up an editor. The first line becomes the subject and following lines become the --body after an optional blank line. Use similar logic to git in determining EDITOR https://bugzilla.gnome.org/show_bug.cgi?id=707063
* main: Add U-Boot bootlader backend supportJavier Martinez Canillas2013-08-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support to generate files that can be used by Universal Bootloader (U-Boot). U-Boot allows to modify boards default boot commands by reading and executing a bootscript file or importing a plain text file that contains environment variables that could parameterize the boot command or a bootscript. OSTree generates a uEnv.txt file that contains booting information that is taken from Boot Loader Specification snippets files as defined in the new OSTree deployment model: https://wiki.gnome.org/OSTree/DeploymentModel2 On deploy or upgrade an uEnv.txt env var file is created in the path /boot/loader.${bootversion}/uEnv.txt. Also, a /boot/uEnv.txt symbolic link to loader/uEnv.txt is created so U-Boot can always import the file from a fixed path. Since U-Boot does not support a menu to list a set of Operative Systems, the most recent bootloader configuration from the list is used. To boot an OSTree using the generated uEnv.txt file, a board has to parameterize its default boot command using the following variables defined by OSTree: ${kernel_image}: path to the Linux kernel image ${ramdisk_image}: path to the initial ramdisk image ${bootargs}: parameters passed to the kernel command line Alternatively, for boards that don't support this scheme, a bootscript that overrides the default boot command can be used. An example of such a bootscript could be: setenv scriptaddr 40008000 setenv kernel_addr 0x40007000 setenv ramdisk_addr 0x42000000 ext2load mmc 0:1 ${scriptaddr} uEnv.txt env import -t ${scriptaddr} ${filesize} ext2load mmc 0:1 ${kernel_addr} ${kernel_image} ext2load mmc 0:1 ${ramdisk_addr} ${ramdisk_image} bootm ${kernel_addr} ${ramdisk_addr} Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> https://bugzilla.gnome.org/show_bug.cgi?id=706370
* build: Fix the build without documentationColin Walters2013-08-161-2/+0
| | | | Just key everything of gtk-doc.
* Add 'ostree reset' command to undo a bad commitStef Walter2013-08-161-0/+1
| | | | | | | | | 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
* Add 'ostree log' commandStef Walter2013-08-151-0/+1
| | | | | | | 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
* Intelligible display for 'ostree show'Stef Walter2013-08-151-0/+2
| | | | | | | Show something similar to git metadata display. Show raw variant data when --raw is specified https://bugzilla.gnome.org/show_bug.cgi?id=705973
* Install a shared libraryColin Walters2013-07-261-1/+1
| | | | | This required a fair bit of surgery because previously ostree.h included otutil.h, but that's supposed to be a private library.
* main: Drop log builtinColin Walters2013-07-231-1/+0
| | | | | | | | | We may revive this later, but commits in their current form aren't very useful for humans to read, so it doesn't make sense to have a tool to show a history of useless stuff. More interesting things are diffs between commits, object statistics, etc.
* admin: Add an "undeploy" commandColin Walters2013-07-231-0/+1
| | | | | | Otherwise it's really easy to keep accumulating deployments. Also, we may want to run this after rebooting, so we're back down to one operating system.
* admin: Rename prune -> cleanup, avoid doing repo prune twiceColin Walters2013-07-151-1/+1
| | | | | | | Calling it "cleanup" is better since it does more than repo pruning. We were also doing a prune twice; ot_admin_cleanup() already does one, so drop the bits to do it in cleanup.c.
* Build without libsoup againColin Walters2013-07-091-2/+4
|
* cmd: Drop "ostree admin install" and curl fetcherColin Walters2013-07-091-3/+0
| | | | | | It isn't useful at the moment, since the deploy stuff all changed. It will make sense to bring back later, but for now let's not carry broken untested code.
* libostree: Move pull code into hereColin Walters2013-07-091-7/+1
| | | | More library work.
* libostree: Move prune into OstreeRepo namespaceColin Walters2013-07-091-2/+0
| | | | More library work.
* core: Move pull logic into an APIColin Walters2013-07-091-0/+2
| | | | | The general trend should be becoming more of a shared library with command line wrappers.
* Drop obsolete GRUB2 and kernel update hooksColin Walters2013-07-071-23/+0
| | | | | We only support syslinux at the moment; grub2 should learn to parse the bootloader spec.