summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-checksum.c
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
* ostree: provide command description in a better placeRuixin Bao2017-10-201-1/+1
| | | | | | | | | | | | | | | | | | | This is similar idea as https://github.com/projectatomic/rpm-ostree/pull/916/commits/5c0bf889155573feec108501ce849ac09a0c9567, The duplicated description is now removed, and the description of the command is now displayed beneath the Usage. For example: ostree cat -h will output the following: "Usage: ostree cat [OPTION?] COMMIT PATH... Concatenate contents of files" Closes: #1267 Approved by: cgwalters
* ostree: move flags into command struct, pass down through builtinsRuixin Bao2017-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | This is a similar approach as https://github.com/projectatomic/rpm-ostree/commit/12c34bb2491a07079c911ef26401fee939e5573c. One thing to note is when we parse the admin related functions, we still keep the old admin related flags, and added a new parameter to represent the command struct. This allows us to identify the caller of the function, making it easier for us to possibly deduplicate the subcommand handling in the future. A similar approach is done in rpm-ostree: https://github.com/projectatomic/rpm-ostree/commit/83aeb018c1012c7a43783c09b74ec71bc9c45826 This also makes it easier for us to change the prototype of the function. If we want to add something new in the future, we won't need to touch every prototype. Closes: #1267 Approved by: cgwalters
* lib/core: add ostree_checksum_file_at APIJonathan Lebon2017-10-121-13/+31
| | | | | | | | | | | This is like `ostree_checksum_file` but fd-relative. This will be used by https://github.com/ostreedev/ostree/pull/1258. AFAICT, we actually didn't have any tests that check the `checksum` CLI. Add a basic one here to test the old code as well as the new code. Closes: #1263 Approved by: cgwalters
* ostree/checksum: port to new decl styleJonathan Lebon2017-10-121-29/+21
| | | | | | | | No functional changes, prep for patch. (Well, I did add a new `success` member in the async struct so that we return `FALSE` if we failed). Closes: #1263 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
* ostree: Add naggy comments to help keep options in syncMatthew Barnes2017-08-151-0/+5
| | | | | | | | | | /* ATTENTION: * Please remember to update the bash-completion script (bash/ostree) and * man page (man/ostree-$COMMANDNAME.xml) when changing the option list. */ Closes: #1080 Approved by: cgwalters
* tree-wide: Switch to autoptr for GOptionContextColin Walters2016-12-081-3/+1
| | | | | | | | | | We were leaking in a few places that I noticed in an ASAN run. Also, this was one of the last non-autoptr cleanup sections we have in `out:` cleanup sections, making us a lot closer to a potential full-tree rewrite to `return FALSE`. Closes: #624 Approved by: jlebon
* Remove unnecessary #include "libgsystem.h"Matthew Barnes2015-05-061-1/+0
|
* Use g_autoptr() for GIO object typesMatthew Barnes2015-05-061-1/+1
| | | | | GLib 2.44 supplies all the necessary autocleanup macros for GIO types, and libglnx backports the relevant macros for ostree.
* Use g_autofree instead of gs_freeMatthew Barnes2015-05-061-2/+2
|
* Refactor command-line parsingMatthew Barnes2014-11-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Various manpage / usage blurb improvementsMatthew Barnes2014-11-161-1/+1
| | | | | | | | | 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
* main: Code cleanup by passing OstreeRepo * directly to builtinsColin Walters2013-08-251-1/+1
| | | | | | | | | | It turns out every builtin (with one special exception) that takes a repo argument did the same thing; let's just centralize it. The special exception was "ostree init --repo=foo" where foo is expected to *not* actually be a repo. In that case, simply skip the ostree_repo_check() invocation. https://bugzilla.gnome.org/show_bug.cgi?id=706762
* Use { 0, } for structure initialization rather than memset()Colin Walters2013-08-181-3/+1
| | | | | | | It's cleaner, safer, and I had a totally wrong idea stuck in my head about why memset() should be used. https://bugzilla.gnome.org/show_bug.cgi?id=705968
* Fix use of uninitialized memory in ostree_builtin_checksum()Stef Walter2013-08-171-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=705968
* Install a shared libraryColin Walters2013-07-261-0/+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: Move GCancellable to toplevelColin Walters2013-07-161-2/+2
| | | | | This is just cleaner, and makes the builtins slightly more of a library, which in turn makes it easier to turn them into real API.
* ostree: Some header file cleanupsColin Walters2013-07-091-2/+0
|
* Switch to libgsystem local allocation macrosColin Walters2013-07-071-3/+3
| | | | And drop our compatibility wrapper.
* core: Drop ot_gfile_new_for_pathColin Walters2012-06-301-1/+1
| | | | | Not necessary anymore since we switched to GIO_USE_VFS=local in the binaries.
* core: Re-unify on one OSTREE_OBJECT_TYPE_FILEColin Walters2012-04-111-1/+1
| | | | | | Having the archived vs not distinction in the object system wasn't useful in light of pack files. In fact, we should probably move towards generating a pack file per commit by default.
* core: Clean up checksummingColin Walters2012-04-111-5/+5
| | | | | | | | Don't expose GChecksum in APIs. Add a new stream class which allows us to pass an input stream somewhere, but gather a checksum as it's read. Move some bits of the internals towards binary csums.
* core: Port builtins to local alloc macrosColin Walters2012-04-091-2/+1
|
* core: Use GFile for repo constructor API, and a bit more internallyColin Walters2011-12-221-1/+1
| | | | | Also, ensure that the repo directory GFile is absolute - this avoids a getcwd() syscall every time we construct a GFile object.
* core: INCOMPATIBLE CHANGE: Name repo files with their type (e.g. .dirmeta)Colin Walters2011-12-121-1/+1
| | | | | This makes inspection easier. Internally the code gets simpler because metadata and files are more unified; there is just one object type.
* core: Use ot_clear_checksum()Colin Walters2011-11-291-1/+1
|
* core: checksum builtin: Actually quit main loop on error tooColin Walters2011-11-281-6/+6
|
* core: Add asynchronous checksum API, use it in checksum builtinColin Walters2011-11-271-7/+31
|
* core: Use ot_gfile_ prefix for new local GFile creation functionColin Walters2011-11-181-1/+1
|
* core: Add checksum builtinColin Walters2011-11-181-0/+70
This necessitated reworking things so that builtins can specify no --repo is required.