summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-file.c
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* lib: add some missing (out) annotationsFelix Krull2019-05-191-0/+24
| | | | | Closes: #1861 Approved by: cgwalters
* 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
* lib/repo-file: Add casts to appease GLib g_object_ref cast PRColin Walters2017-12-071-2/+2
| | | | | | | This fixes the build with https://bugzilla.gnome.org/show_bug.cgi?id=790697 Closes: #1363 Approved by: jlebon
* 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
* lib/repofile: Follow symlinks for `g_file_read()`Colin Walters2017-06-071-2/+16
| | | | | | | | This avoids `ostree cat /path/to/symlink` crashing, a longstanding embarassing issue. Closes: #915 Approved by: jlebon
* lib/repofile: Port mostly to new code styleColin Walters2017-06-071-78/+41
| | | | | | | Prep for a bugfix. Closes: #915 Approved by: jlebon
* core: Use OSTREE_SHA256_STRING_LEN instead of 64Mathnerd3142016-06-221-6/+6
| | | | | Closes: #359 Approved by: cgwalters
* small cleanupsJonathan Lebon2016-04-081-48/+2
| | | | | | | | | - Revert 'cannot' --> 'can not' (it's the exception!) - Remove duplicate function - Squelch compiler warnings Closes: #248 Approved by: cgwalters
* repo: Validate checksums have correct lengthMatthew Barnes2015-11-171-4/+14
| | | | | | | | | ostree_checksum_bytes_peek() can return NULL if the checksum has an incorrect length (most likely from disk corruption) but most callers are not prepared to handle this and would likely crash. Use ostree_checksum_bytes_peek_validate() instead, which sets a GError on an invalid checksum.
* Use g_autoptr(GVariant) instead of gs_unref_variantMatthew Barnes2015-05-061-17/+17
|
* Use g_autoptr() for GIO object typesMatthew Barnes2015-05-061-4/+4
| | | | | 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-1/+1
|
* repofile: Avoid segfault if querying child in non-directoryColin Walters2014-07-211-0/+7
| | | | | | | | | | | | The user might "ostree ls /usr/bin/bash/blah", which previously would segfault. A somewhat related future enhancement here would be for "ostree ls" to follow symbolic links. Reported-by: Dusty Mabe <dustymabe@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=733476
* core: Fix g_file_get_uri/get_parse_name for non-root ostree filesJames Antill2014-06-181-1/+2
|
* libostree: Ensure we set standard::type when querying filesColin Walters2014-01-191-0/+3
| | | | | | | This makes the obvious code to recursively enumerate directories operate more sanely. Noticed this while trying to write corrupt-repo-ref.js.
* repo: Change the pairs of checksums to instead be based on OstreeRepoFilesJasper St. Pierre2013-09-091-6/+6
| | | | | | | | | | | | | | We want an OstreeRepoFile to be the way to reference a "filesystem tree" that's stored in the repo, which is a combination of a DIR_TREE and a DIR_META. The idea is that once you write an mtree to the repo using ostree_repo_write_mtree, it becomes serialized and you get an OstreeRepoFile in return. Change any APIs that care about DIR_TREE / DIR_META checksums to care about OstreeRepoFiles instead, which right now is mostly is ostree_repo_write_commit. https://bugzilla.gnome.org/show_bug.cgi?id=707727
* repo-file: Base OstreeRepoFile on trees instead of commitsJasper St. Pierre2013-09-091-88/+84
| | | | | | | | | | | We want an OstreeRepoFile to be the way to represent a filesystem tree inside an ostree repository. In order to do this, we need to drop the commit from an OstreeRepoFile, and make that go to callers. Switch all current users of ostree_repo_file_new_root to ostree_repo_read_commit, and make the actual constructor private. https://bugzilla.gnome.org/show_bug.cgi?id=707727
* core: Delete unused OstreeRepoFile APIColin Walters2013-09-081-11/+0
| | | | Was just unused, and it was using further API i want to remove.
* builtin-commit: Don't parse the parent's GVariant by handJasper St. Pierre2013-09-081-0/+6
| | | | | | | | Instead, use OstreeRepoFile as a handle for the parent commit. We need to add an accessor for the metadata checksum, as that hasn't been exposed before. https://bugzilla.gnome.org/show_bug.cgi?id=707727
* repo-file: s/content_checksum/contents_checksum/Jasper St. Pierre2013-09-081-1/+1
| | | | | | | This is what we call it everywhere else, so just be consistent. It also lines up with metadata_checksum better. https://bugzilla.gnome.org/show_bug.cgi?id=707727
* repo: Drop ostree_repo_load_variant_c APIColin Walters2013-09-031-7/+12
| | | | | | Originally we had this to avoid forcing callers to malloc() if they had a csum, but nowadays we have in-place conversion APIs that are fast enough.
* Fix warnings about unused variablesTobias Hunger2013-08-301-2/+0
|
* core: Reduce API surface for file accessColin Walters2013-07-311-2/+2
| | | | This function was only used by internals, make it private.
* core: Fix all introspection warningsColin Walters2013-07-271-1/+31
| | | | Still lots more docs to write and API to cleanup, but this is better.
* 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.
* Switch to libgsystem local allocation macrosColin Walters2013-07-071-24/+24
| | | | And drop our compatibility wrapper.
* core: Add API to convert csum -> checksum without malloc()Colin Walters2013-02-231-5/+5
| | | | Just doing some profiling, this was in the top malloc() callers.
* Drop some bits from libotutil that are now merged in libgsystemColin Walters2012-11-291-6/+6
|
* core: Drop ot_clear_gvariant() in favor of g_clear_pointerColin Walters2012-07-171-9/+9
|
* core: Add valgrind framework, plug various memory leaksColin Walters2012-05-041-3/+4
|
* core: Re-unify on one OSTREE_OBJECT_TYPE_FILEColin Walters2012-04-111-14/+4
| | | | | | 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: Drop wrapping of metadata variantsColin Walters2012-04-111-19/+6
|
* core: Switch to 'ay' for checksums, drop versions/metadataColin Walters2012-04-111-52/+60
|
* core: Port libostree to local allocColin Walters2012-04-091-35/+25
|
* core: Fix xattr API to conform to coding styleColin Walters2012-04-091-1/+2
|
* core: Add pack filesColin Walters2012-03-311-54/+22
| | | | | | This concept is also directly inspired by git. At present, our implementation is quite similar, except we don't have delta compression.
* core: Fix "cat" crashing when it should have returned ENOENTColin Walters2012-03-081-0/+3
|
* core: Add ostree-types.hColin Walters2012-03-061-1/+2
| | | | This allows us to have circular references between the headers.
* core: Add 'cat' builtinColin Walters2012-03-061-8/+10
|
* core: Add standard::size to info we get from archivesColin Walters2012-01-191-0/+18
| | | | This makes "ostree ls" show the file size.
* core: Change compose to operate purely in-memoryColin Walters2011-12-211-0/+6
| | | | | This is *significantly* faster than checking out each branch into the real filesystem, then importing it again.
* core: Make OstreeRepoFile "public"Colin Walters2011-12-211-31/+30
| | | | | | * "ls" used it * It's not like our internal API is 100% stable anyways * The _ is ugly
* core: Remove dead code from OstreeRepoFileColin Walters2011-12-211-198/+0
| | | | | Originally I thought it would make sense for OstreeRepoFile to be mutable, and it probably does, but we should do it in a different way.
* core: INCOMPATIBLE CHANGE: Split archive files in two parts (meta and content)Colin Walters2011-12-151-2/+14
| | | | | | | | | | This will allow us to have hardlink checkouts of archives. A key use case here is an archive repo of an OS (with root-owned files etc.) where we want to do builds in a user tree. A positive side effect of doing things this way is that now the SHA256 checksums for a given file should be identical regardless of whether it's stored in an archive or bare repository.
* core: INCOMPATIBLE CHANGE: Name repo files with their type (e.g. .dirmeta)Colin Walters2011-12-121-29/+23
| | | | | This makes inspection easier. Internally the code gets simpler because metadata and files are more unified; there is just one object type.
* core: s/pack/archived/Colin Walters2011-12-081-2/+2
| | | | This completes the rename from the previous commit.
* core: Make ot_transfer_out_value() take a & for the second argumentColin Walters2011-12-081-3/+3
| | | | | As Ray Strode argued, it's confusing to have something that looks like a function be magical. And OT_TRANSFER_OUT_VALUE is uglier.
* core: Switch is_archive to an enumerationColin Walters2011-12-081-3/+3
| | | | This is in preparation for adding a third mode.
* core: Clean up filename utility APIColin Walters2011-12-041-1/+1
| | | | | Remove more unused functions, and change pathname splitting to handle more cases like duplicate //, and to throw an error on .. as a filename.