Skip to content

Commit

Permalink
Merge pull request #1946 from dbnicholson/ostree-metadata-api
Browse files Browse the repository at this point in the history
ostree-metadata commit API
  • Loading branch information
cgwalters authored Feb 9, 2023
2 parents cff0a17 + 6f86693 commit 8025a83
Show file tree
Hide file tree
Showing 76 changed files with 648 additions and 411 deletions.
7 changes: 4 additions & 3 deletions Makefile-libostree.am
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ endif # USE_GPGME
symbol_files = $(top_srcdir)/src/libostree/libostree-released.sym

# Uncomment this include when adding new development symbols.
# if BUILDOPT_IS_DEVEL_BUILD
# symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
# endif
if BUILDOPT_IS_DEVEL_BUILD
symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
endif

# http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html
wl_versionscript_arg = -Wl,--version-script=
Expand Down Expand Up @@ -251,6 +251,7 @@ libostree_1_la_SOURCES += \
src/libostree/ostree-sign-dummy.h \
src/libostree/ostree-sign-ed25519.c \
src/libostree/ostree-sign-ed25519.h \
src/libostree/ostree-sign-private.h \
$(NULL)

if USE_LIBSODIUM
Expand Down
1 change: 1 addition & 0 deletions apidoc/ostree-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ ostree_repo_verify_commit
ostree_repo_verify_commit_ext
ostree_repo_verify_commit_for_remote
ostree_repo_verify_summary
ostree_repo_regenerate_metadata
ostree_repo_regenerate_summary
<SUBSECTION Standard>
OSTREE_REPO
Expand Down
12 changes: 6 additions & 6 deletions src/libostree/bupsplit.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
* Copyright 2011 Avery Pennarun. All rights reserved.
*
*
* (This license applies to bupsplit.c and bupsplit.h only.)
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY AVERY PENNARUN ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Expand Down Expand Up @@ -96,7 +96,7 @@ int bupsplit_find_ofs(const unsigned char *buf, int len, int *bits)
{
Rollsum r;
int count;

rollsum_init(&r);
for (count = 0; count < len; count++)
{
Expand Down
12 changes: 6 additions & 6 deletions src/libostree/bupsplit.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
* Copyright 2011 Avery Pennarun. All rights reserved.
*
*
* (This license applies to bupsplit.c and bupsplit.h only.)
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY AVERY PENNARUN ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Expand Down Expand Up @@ -48,5 +48,5 @@ int bupsplit_find_ofs(const unsigned char *buf, int len, int *bits);
#ifdef __cplusplus
}
#endif

#endif /* __BUPSPLIT_H */
5 changes: 5 additions & 0 deletions src/libostree/libostree-devel.sym
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
- uncomment the include in Makefile-libostree.am
*/

LIBOSTREE_2023.1 {
global:
ostree_repo_regenerate_metadata;
} LIBOSTREE_2022.7;

/* Stub section for the stable release *after* this development one; don't
* edit this other than to update the year. This is just a copy/paste
* source. Replace $LASTSTABLE with the last stable version, and $NEWVERSION
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-bootconfig-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ G_DEFINE_TYPE (OstreeBootconfigParser, ostree_bootconfig_parser, G_TYPE_OBJECT)
/**
* ostree_bootconfig_parser_clone:
* @self: Bootconfig to clone
*
*
* Returns: (transfer full): Copy of @self
*/
OstreeBootconfigParser *
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-bootloader-uboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static gboolean
_ostree_bootloader_uboot_query (OstreeBootloader *bootloader,
gboolean *out_is_active,
GCancellable *cancellable,
GError **error)
GError **error)
{
OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (bootloader);
struct stat stbuf;
Expand Down
6 changes: 3 additions & 3 deletions src/libostree/ostree-chain-input-stream.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2011 Colin Walters <[email protected]>
* Copyright (C) 2022 Igalia S.L.
*
Expand Down Expand Up @@ -87,7 +87,7 @@ ostree_chain_input_stream_set_property (GObject *object,
GParamSpec *pspec)
{
OstreeChainInputStream *self;

self = OSTREE_CHAIN_INPUT_STREAM (object);

switch (prop_id)
Expand Down Expand Up @@ -165,7 +165,7 @@ ostree_chain_input_stream_read (GInputStream *stream,

if (g_cancellable_set_error_if_cancelled (cancellable, error))
return -1;

if (self->priv->index >= self->priv->streams->len)
return 0;

Expand Down
4 changes: 2 additions & 2 deletions src/libostree/ostree-checksum-input-stream.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2011 Colin Walters <[email protected]>
* Copyright (C) 2022 Igalia S.L.
*
Expand Down Expand Up @@ -80,7 +80,7 @@ ostree_checksum_input_stream_set_property (GObject *object,
GParamSpec *pspec)
{
OstreeChecksumInputStream *self;

self = OSTREE_CHECKSUM_INPUT_STREAM (object);

switch (prop_id)
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-cmd-private.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "otutil.h"

static gboolean
static gboolean
impl_ostree_generate_grub2_config (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error)
{
return _ostree_bootloader_grub2_generate_config (sysroot, bootversion, target_fd, cancellable, error);
Expand Down
4 changes: 2 additions & 2 deletions src/libostree/ostree-content-writer.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* SPDX-License-Identifier: LGPL-2.0+
*
* This library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -46,7 +46,7 @@ ostree_content_writer_class_init (OstreeContentWriterClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GOutputStreamClass *stream_class = G_OUTPUT_STREAM_CLASS (klass);

gobject_class->finalize = ostree_content_writer_finalize;

stream_class->write_fn = ostree_content_writer_write;
Expand Down
6 changes: 3 additions & 3 deletions src/libostree/ostree-core-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ G_BEGIN_DECLS
/*
* File objects are stored as a stream, with one #GVariant header,
* followed by content.
*
*
* The file header is of the following form:
*
* &lt;BE guint32 containing variant length&gt;
* u - uid
* u - gid
* u - mode
* u - rdev (must be 0)
* s - symlink target
* s - symlink target
* a(ayay) - xattrs
*
* Then the rest of the stream is data.
Expand All @@ -71,7 +71,7 @@ G_BEGIN_DECLS
* u - gid
* u - mode
* u - rdev (must be 0)
* s - symlink target
* s - symlink target
* a(ayay) - xattrs
* ---
* zlib-compressed data
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-dummy-enumtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "ostree-dummy-enumtypes.h"

/* Exported for backwards compat - see
/* Exported for backwards compat - see
* https://bugzilla.gnome.org/show_bug.cgi?id=764131
*/
GType
Expand Down
8 changes: 4 additions & 4 deletions src/libostree/ostree-fetcher-soup.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ remove_pending (OstreeFetcherPendingURI *pending)
static void
on_out_splice_complete (GObject *object,
GAsyncResult *result,
gpointer user_data)
gpointer user_data)
{
GTask *task = G_TASK (user_data);
OstreeFetcherPendingURI *pending;
Expand Down Expand Up @@ -944,7 +944,7 @@ on_out_splice_complete (GObject *object,
static void
on_stream_read (GObject *object,
GAsyncResult *result,
gpointer user_data)
gpointer user_data)
{
GTask *task = G_TASK (user_data);
OstreeFetcherPendingURI *pending;
Expand Down Expand Up @@ -1055,7 +1055,7 @@ on_stream_read (GObject *object,
static void
on_request_sent (GObject *object,
GAsyncResult *result,
gpointer user_data)
gpointer user_data)
{
GTask *task = G_TASK (user_data);
/* Hold a ref to the pending across this function, since we remove
Expand Down Expand Up @@ -1175,7 +1175,7 @@ on_request_sent (GObject *object,
}

pending->state = OSTREE_FETCHER_STATE_DOWNLOADING;

pending->content_length = soup_request_get_content_length (pending->request);

g_input_stream_read_bytes_async (pending->request_body,
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-fetcher-uri.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ _ostree_fetcher_uri_to_string (OstreeFetcherURI *uri)
* out invalid input.
*/
gboolean
_ostree_fetcher_uri_validate (OstreeFetcherURI *uri, GError **error)
_ostree_fetcher_uri_validate (OstreeFetcherURI *uri, GError **error)
{
const char *scheme = g_uri_get_scheme ((GUri*)uri);
// TODO only allow file if explicitly requested by a higher level
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-kernel-args.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ ostree_kernel_args_append_if_missing (OstreeKernelArgs *kargs,
// Don't insert a duplicate key.
if (ostree_kernel_args_contains (kargs, arg))
return;

ostree_kernel_args_append (kargs, arg);
}

Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-kernel-args.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ _OSTREE_PUBLIC
char *ostree_kernel_args_to_string (OstreeKernelArgs *kargs);

_OSTREE_PUBLIC
void ostree_kernel_args_append_if_missing (OstreeKernelArgs *kargs,
void ostree_kernel_args_append_if_missing (OstreeKernelArgs *kargs,
const char *arg);

_OSTREE_PUBLIC
Expand Down
4 changes: 2 additions & 2 deletions src/libostree/ostree-libarchive-input-stream.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2011 Colin Walters <[email protected]>
* Copyright (C) 2022 Igalia S.L.
*
Expand Down Expand Up @@ -94,7 +94,7 @@ ostree_libarchive_input_stream_set_property (GObject *object,
GParamSpec *pspec)
{
OstreeLibarchiveInputStream *self;

self = OSTREE_LIBARCHIVE_INPUT_STREAM (object);

switch (prop_id)
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-lzma-compressor.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ _ostree_lzma_compressor_convert (GConverter *converter,
{
OstreeLzmaCompressor *self = OSTREE_LZMA_COMPRESSOR (converter);
int res;
lzma_action action;
lzma_action action;

if (inbuf_size != 0 && outbuf_size == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/libostree/ostree-metalink.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef struct

guint passthrough_depth;
OstreeMetalinkState passthrough_previous;

guint found_a_file_element : 1;
guint found_our_file_element : 1;
guint verification_known : 1;
Expand Down Expand Up @@ -550,7 +550,7 @@ try_metalink_targets (OstreeMetalinkRequest *self,
GError *temp_error = NULL;

target_uri = self->urls->pdata[self->current_url_index];

if (try_one_url (self, target_uri, &ret_data, &temp_error))
break;
else
Expand Down
Loading

0 comments on commit 8025a83

Please sign in to comment.