summaryrefslogtreecommitdiff
path: root/src/ostree/ot-admin-functions.h
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* tree-wide: Remove Emacs modelinesColin Walters2017-09-211-2/+1
| | | | | | | | | We added a `.dir-locals.el` in commit: 9a77017d87b74c5e2895cdd64ad098018929403f There's no need to have it per-file, with that people might think to add other editors, which is the wrong direction. Closes: #1206 Approved by: jlebon
* Use GSubprocess instead of GSSubprocess (libgsystem removal)Colin Walters2016-03-231-0/+3
| | | | | | Since we hard-depend on GLib 2.40, we can start using GSubprocess. This is part of dropping our dependency on libgsystem, which is deprecated in favor of libglnx (as well as migrating things to GLib).
* sysroot: Add a try_lock() APIColin Walters2015-05-101-0/+4
| | | | | | | | | | | | | The blocking locking API wasn't sufficient for use in the rpm-ostree daemon; it really wants to know if the lock is held, then continue to do other things (like service DBus requests), and get notification when the lock is available. We also add an async variant that can be called if the lock is not available. Implement a higher level "loop until lock is available" method in the `ostree admin` commandline.
* syntax-check: Remove empty lines at the end of fileGiuseppe Scrivano2015-02-021-1/+0
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* admin: (cleanup) Add internal API to find a deployment given an indexColin Walters2015-01-191-0/+6
| | | | | | | | | At some point, we might want to expose a uniform way to refer to deployments by an index. At the moment undeploy is the only command that does. I plan to introduce another command which optionally takes an index, so prepare a helper function for this.
* admin: Add ot_admin_checksum_version to get a dup of the version for a commitJames Antill2014-10-231-0/+4
|
* Add an OstreeSysrootUpgrader APIColin Walters2014-03-241-11/+0
| | | | | This moves some utility code from the ostree tool into the shared library, which will make it easier to consume by external tools.
* Move basic commit API into ostree_sysroot_simple_write_deployment()Colin Walters2014-03-231-9/+0
| | | | | The admin commands had this shared in tool common, but we want to encourage external programs to do this as well.
* deploy/main: Unify some bits between admin-switch and admin-upgradeColin Walters2014-01-191-0/+10
|
* sysroot: Move ostree_sysroot_origin_new_from_refspec hereColin Walters2013-10-031-2/+0
| | | | | Rather than having it live in admin. This is useful for other consumers like the test suite.
* sysroot: Support more arbitrary deployment changesColin Walters2013-10-021-0/+9
| | | | | | | | | This commit changes the sysroot API so that one can create arbitrary new deployment checkouts, then commit them as one step. This is to enable things like an automatic bisection tool which say create 50 deployments at once, then when done clean them up. This also moves some printfs from the library into src/ostree.
* sysroot: Clean up APIColin Walters2013-09-161-0/+6
| | | | | | | | | | | | | Now that we have a real GObject for the sysroot, we have a convenient place to keep track of 4 pieces of state: * The current deployment list * The current bootversion * The current subbootversion * The current booted deployment (if any) Avoid requiring callers to pass all of this around and load it piecemeal; instead the new thing is ostree_sysroot_load().
* libostree: Nearly complete move of API into OstreeSysrootColin Walters2013-09-151-47/+0
| | | | Move the deployment code too.
* libostree: Move a lot more sysroot API hereColin Walters2013-09-151-42/+0
| | | | OstreeBootloader is temporarily public API.
* Move Deployment and BootconfigParser into libostreeColin Walters2013-09-151-8/+7
| | | | | | As part of moving admin functionality there. While we are doing this, rename OtConfigParser to OstreeBootConfig parser since it's a better name.
* admin: Extract ot_admin_join_config_lines() helper functionJavier Martinez Canillas2013-08-201-0/+2
| | | | | | | | | | ot-bootloader-syslinux.c has a join_lines() function that is rather generic and can be used in other places. Let's add it as a helper function. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> https://bugzilla.gnome.org/show_bug.cgi?id=706370
* Switch to #pragma once for headersColin Walters2013-07-091-3/+1
| | | | It's just less tedious, and we're GCC/LLVM specific anyways.
* admin: Use internal pull API instead of subprocessColin Walters2013-07-091-6/+0
| | | | So we're doing more of the library thing.
* admin: Fix various compiler warningsColin Walters2013-07-071-2/+1
|
* admin: Split up the monstrous ot-admin-functions.cColin Walters2013-07-071-1/+13
| | | | Now util, cleanup, and functions.
* [INCOMPATIBLE CHANGE] Implement new deployment modelColin Walters2013-07-071-31/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | See https://wiki.gnome.org/OSTree/DeploymentModel2 This is a major rework of the on-disk filesystem layout, and the boot process. OSTree now explicitly supports upgrading kernels, and these upgrades are also atomic. The core concept of the new model is the "deployment list", which is an ordered list of bootable operating system trees. The deployment list is reflected in the bootloader configuration; which has a kernel argument that tells the initramfs (dracut) which operating system root to use. Invidiual notable changes that come along with this: 1) Operating systems should now come with their etc in usr/etc; OSTree will perform a 3-way merge at deployment time, and place etc in the actual root. This avoids the need for a bind mount, and is just a lot cleaner. 2) OSTree no longer bind mounts /root, /home, and /tmp. It is expected that the the OS/ has these as symbolic links into /var. At the moment, OSTree only supports managing syslinux; other bootloader backends will follow.
* admin: Add -r option to upgrade to initiate a reboot if tree changesColin Walters2013-05-161-0/+17
| | | | | | $ ostree admin upgrade -r is convenient to fire off inside a VM and come back to it later.
* admin: Don't delete the running deploymentColin Walters2013-03-041-0/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=694762
* admin: Use /sysroot/ostree automaticallyColin Walters2013-02-191-3/+3
| | | | | When booted inside an ostree system, we want /sysroot/ostree, not just /ostree by default.
* admin: Add new run-triggers commandColin Walters2012-12-221-0/+4
| | | | | | | | | | | | | | In some cases we want the ability to run triggers independently of checking out a tree. For example, due to kernel limitations which impact the gnome-ostree build system, we may need to run triggers on first boot via systemd. Secondarily, if the user installs a system extension which adds a new shared library to /usr/lib for example, the system will need to run the triggers again. Also, I think I want to take triggers out of the core and put them in ostree admin anyways.
* admin: Rework /ostree/deploy to support multiple independent operating systemsColin Walters2012-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | The real vision of OSTree is to "multiple versions of multiple operating systems". Up until now, it's worked to install gnome-ostree inside a host distribution, but several things don't work quite right if you try to do completely different systems. In the new model, there's the concept of an "osname" which encompasses a few properties: 1) Its own /var 2) A set of trees deployed in /ostree/deploy/OSNAME/ 3) Its own "current" and "previous" links. Now it no longer really makes sense to boot with "ostree=current". Instead, you specify e.g. "ostree=gnome/current". This is an incompatible change to the deployment code - you will need to run init-os gnome and redeploy. All "ostree admin" subcommands now take an OSNAME argument.
* admin prune: New builtin for cleaning up deployments and repoColin Walters2012-11-161-0/+4
| | | | | | | | | | | After a while of pull-deploy cycles, you start to accumulate a lot of them. While the deployment read-only part is hardlinked, the -etc space adds up. Additionally, the repository itself just gets large. The new command "ostree admin prune" deletes everything except the "current" and "previous" deployments.
* Move "ostadmin" => "ostree admin"Colin Walters2012-09-081-0/+41
This helps us avoid polluting the global binary namespace.