Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ostreedev/ostree
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2f516e7e7eb690ff624823cc0547bca8ce0777d3
Choose a base ref
..
head repository: ostreedev/ostree
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c2301cbd61942af06f1c3c173159940b66b5dc31
Choose a head ref
2 changes: 1 addition & 1 deletion Makefile-boot.am
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ grub2configdir = $(sysconfdir)/grub.d
INSTALL_DATA_HOOKS += install-grub2-config-hook
else
# We're using our internal generator
ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator
ostree_boot_SCRIPTS += src/boot/grub2/ostree-grub-generator
endif

EXTRA_DIST += src/boot/dracut/module-setup.sh \
1 change: 1 addition & 0 deletions Makefile-decls.am
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ typelibdir = $(libdir)/girepository-1.0
typelib_DATA =
gsettings_SCHEMAS =
ostree_bootdir = $(prefix)/lib/ostree
ostree_boot_SCRIPTS =
ostree_boot_PROGRAMS =

# This initializes some more variables
1 change: 1 addition & 0 deletions Makefile-ostree.am
Original file line number Diff line number Diff line change
@@ -123,6 +123,7 @@ ostree_SOURCES += src/ostree/ot-remote-builtin-add-cookie.c \
endif

src/ostree/parse-datetime.c: src/ostree/parse-datetime.y Makefile
mkdir -p src/ostree/
$(AM_V_GEN) $(YACC) $< -o $@

EXTRA_DIST += src/ostree/parse-datetime.y
2 changes: 1 addition & 1 deletion Makefile-switchroot.am
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ if BUILDOPT_USE_STATIC_COMPILER
# to get autotools to install this as an executable but without generating rules
# to make it itself which we have specified manually. See
# https://lists.gnu.org/archive/html/help-gnu-utils/2007-01/msg00007.html
ostree_boot_SCRIPTS = ostree-prepare-root
ostree_boot_SCRIPTS += ostree-prepare-root

ostree-prepare-root : $(ostree_prepare_root_SOURCES)
$(STATIC_COMPILER) -o $@ -static $(top_srcdir)/src/switchroot/ostree-prepare-root.c $(ostree_prepare_root_CPPFLAGS) $(AM_CFLAGS) $(DEFAULT_INCLUDES) -DOSTREE_PREPARE_ROOT_STATIC=1
1 change: 1 addition & 0 deletions Makefile-tests.am
Original file line number Diff line number Diff line change
@@ -84,6 +84,7 @@ _installed_or_uninstalled_test_scripts = \
tests/test-pull-metalink.sh \
tests/test-pull-summary-sigs.sh \
tests/test-pull-resume.sh \
tests/test-pull-basicauth.sh \
tests/test-pull-repeated.sh \
tests/test-pull-untrusted.sh \
tests/test-pull-override-url.sh \
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -74,8 +74,7 @@ systems.
which uses libostree.

The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and
integration tool uses libostree as a caching system to store and share
built artifacts.
integration tool supports importing and exporting from libostree repos.

Fedora [coreos-assembler](https://github.com/coreos/coreos-assembler) is
the build tool used to generate Fedora CoreOS derivatives.
1 change: 1 addition & 0 deletions apidoc/ostree-sections.txt
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
OstreeAsyncProgress
ostree_async_progress_new
ostree_async_progress_new_and_connect
ostree_async_progress_copy_state
ostree_async_progress_get_status
ostree_async_progress_get
ostree_async_progress_get_variant
1 change: 1 addition & 0 deletions buildutil/glib-tap.mk
Original file line number Diff line number Diff line change
@@ -116,6 +116,7 @@ installed_testcases = $(test_programs) $(installed_test_programs) \
installed_test_meta_DATA = $(installed_testcases:=.test)

%.test: %$(EXEEXT) Makefile
@$(MKDIR_P) $(dir $@)
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Exec=env G_TEST_SRCDIR=$(installed_testdir) G_TEST_BUILDDIR=$(installed_testdir) $(installed_testdir)/$(notdir $<)' >> $@.tmp; \
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -247,6 +247,8 @@ LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
FUSE_DEPENDENCY="fuse >= 2.9.2"

AC_CHECK_HEADERS([linux/fsverity.h])
AS_IF([test x$ac_cv_header_linux_fsverity_h = xyes ],
[OSTREE_FEATURES="$OSTREE_FEATURES fsverity"])

# check for gtk-doc
m4_ifdef([GTK_DOC_CHECK], [
3 changes: 2 additions & 1 deletion src/libostree/libostree-devel.sym
Original file line number Diff line number Diff line change
@@ -18,7 +18,8 @@
***/

/* Add new symbols here. Release commits should copy this section into -released.sym. */
LIBOSTREE_2019.5 {
LIBOSTREE_2019.6 {
ostree_async_progress_copy_state;
} LIBOSTREE_2019.4;

/* Stub section for the stable release *after* this development one; don't
34 changes: 34 additions & 0 deletions src/libostree/ostree-async-progress.c
Original file line number Diff line number Diff line change
@@ -424,6 +424,40 @@ ostree_async_progress_set_uint64 (OstreeAsyncProgress *self,
ostree_async_progress_set_variant (self, key, g_variant_new_uint64 (value));
}

/**
* ostree_async_progress_copy_state:
* @self: An #OstreeAsyncProgress to copy from
* @dest: An #OstreeAsyncProgress to copy to
*
* Atomically copies all the state from @self to @dest, without invoking the
* callback.
* This is used for proxying progress objects across different #GMainContexts.
*
* Since: 2019.6
*/
void
ostree_async_progress_copy_state (OstreeAsyncProgress *self,
OstreeAsyncProgress *dest)
{
g_return_if_fail (OSTREE_IS_ASYNC_PROGRESS (self));
g_return_if_fail (OSTREE_IS_ASYNC_PROGRESS (dest));

g_mutex_lock (&self->lock);

if (self->dead)
goto out;

GLNX_HASH_TABLE_FOREACH_KV (self->values, void *, key, GVariant *, value)
{
if (value)
g_variant_ref (value);
g_hash_table_replace (dest->values, key, value);
}

out:
g_mutex_unlock (&self->lock);
}

/**
* ostree_async_progress_new:
*
4 changes: 4 additions & 0 deletions src/libostree/ostree-async-progress.h
Original file line number Diff line number Diff line change
@@ -92,4 +92,8 @@ void ostree_async_progress_set_variant (OstreeAsyncProgress *self,
_OSTREE_PUBLIC
void ostree_async_progress_finish (OstreeAsyncProgress *self);

_OSTREE_PUBLIC
void ostree_async_progress_copy_state (OstreeAsyncProgress *self,
OstreeAsyncProgress *dest);

G_END_DECLS
12 changes: 9 additions & 3 deletions src/libostree/ostree-fetcher-curl.c
Original file line number Diff line number Diff line change
@@ -261,9 +261,8 @@ destroy_and_unref_source (GSource *source)
}

static char *
request_get_uri (FetcherRequest *req, guint idx)
request_get_uri (FetcherRequest *req, SoupURI *baseuri)
{
SoupURI *baseuri = req->mirrorlist->pdata[idx];
if (!req->filename)
return soup_uri_to_string (baseuri, FALSE);
{ g_autofree char *uristr = soup_uri_to_string (baseuri, FALSE);
@@ -715,7 +714,8 @@ initiate_next_curl_request (FetcherRequest *req,

g_assert_cmpint (req->idx, <, req->mirrorlist->len);

{ g_autofree char *uri = request_get_uri (req, req->idx);
SoupURI *baseuri = req->mirrorlist->pdata[req->idx];
{ g_autofree char *uri = request_get_uri (req, baseuri);
curl_easy_setopt (req->easy, CURLOPT_URL, uri);
}

@@ -771,6 +771,12 @@ initiate_next_curl_request (FetcherRequest *req,
if ((self->config_flags & OSTREE_FETCHER_FLAGS_TRANSFER_GZIP) > 0)
curl_easy_setopt (req->easy, CURLOPT_ACCEPT_ENCODING, "");

/* If we have e.g. basic auth in the URL string, let's honor that */
const char *username = soup_uri_get_user (baseuri);
curl_easy_setopt (req->easy, CURLOPT_USERNAME, username);
const char *password = soup_uri_get_password (baseuri);
curl_easy_setopt (req->easy, CURLOPT_PASSWORD, password);

/* We should only speak HTTP; TODO: only enable file if specified */
curl_easy_setopt (req->easy, CURLOPT_PROTOCOLS, (long)(CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
/* Picked the current version in F25 as of 20170127, since
Loading