Commit Graph

3205 Commits

Author SHA1 Message Date
Colin Walters 7f2960db43 Define an initializer for GVariant{Builder,Dict}
So we build warning-free on GLib (< 2.50, >= 2.50).  This
is a band aid until we hard-require >= 2.50.

Closes: #547
Approved by: jlebon
2016-10-27 18:49:15 +00:00
Jonathan Lebon cde7928496 .redhat-ci.yml: add clang
Clang has better detection for unused vars when using auto cleanup
functions. We should eventually just fold this back into the first
testsuite. But let's just turn it on for now, at least until it's
satisfied with the whole codebase.

Closes: #549
Approved by: cgwalters
2016-10-27 18:12:05 +00:00
Colin Walters 835d97d659 deploy: Suppress unused variable warning for fscreatecon cleanup
Fixes the clang build.

Closes: #551
Approved by: jlebon
2016-10-27 17:50:56 +00:00
Colin Walters cbbfb5369f parse-datetime: Use labs() for long input value
Fixes a compliation warning with CLang, I didn't study it to
see whether this was a major issue or not.

Closes: #548
Approved by: jlebon
2016-10-27 17:02:01 +00:00
Colin Walters 21ca60f987 otutil: Note that ot_log_structured takes a printf format
This notably fixes compilation with CLang.

Closes: #548
Approved by: jlebon
2016-10-27 17:02:01 +00:00
Colin Walters b77edf24a3 tree-wide: Remove unused variables detected by CLang
CLang finds these, whereas GCC treats having
`__attribute__((cleanup))` as a use.

This obsoletes https://github.com/ostreedev/ostree/pull/411

Closes: #548
Approved by: jlebon
2016-10-27 17:02:01 +00:00
Colin Walters 82a4f56593 tests: Skip libarchive/selinux tests if in container without SELinux
I'm doing builds and `make check` inside a Docker container, with
selinux on as a build-time option, but no policy in the container.
This currently aborts.  Let's not do that.

(This type of thing is why installed tests are a better model)

Closes: #546
Approved by: jlebon
2016-10-27 16:48:34 +00:00
Colin Walters 27f37b55bc docs: Link to releng-scripts
Now that the repo starts to implement some of this stuff.

Closes: #544
Approved by: jlebon
2016-10-27 16:28:55 +00:00
Simon McVittie b9dd03b680 2016.12-1 2016-10-26 19:11:27 +01:00
Simon McVittie 17e240ebb8 Build-depend on ca-certificates. glib-networking now generates warnings if those are missing, causing the build-time tests to fail. 2016-10-26 00:31:10 +01:00
Simon McVittie 52186325bc New upstream release 2016-10-26 00:07:14 +01:00
Simon McVittie bc870baa58 Merge tag 'upstream/2016.12' into debian/master
Upstream version 2016.12
2016-10-25 22:29:03 +01:00
Simon McVittie e011f1a1a1 New upstream version 2016.12 2016-10-25 22:28:55 +01:00
Alexander Larsson d0e74cf3af Fix pruning of partial commits
If we have a partial commit it is not an error for a dirmeta to be
missing (in fact, that is likely), so instead of returning a not-found
error from ostree_repo_traverse_commit() we ignore the error and
continue.

In particular, this means we don't stop early at the first
missing dirmeta, which previously caused ostree_repo_prune() to
thing the dirmetas after that to be unreached and thus purged.

Also, we remove the special casing in ostree_repo_prune() to
not report errors for commitpartial, because these should not
be reported anymore.

This fixes https://github.com/ostreedev/ostree/issues/541

Closes: #542
Approved by: cgwalters
2016-10-24 17:48:19 +00:00
Colin Walters d3f14f02e3 Release 2016.12
Closes: #540
Approved by: cgwalters
2016-10-21 19:24:31 +00:00
Alexander Larsson 67bddf76f7 detached metadata: Put these in transaction
If there is a transaction active, then we put writes to detached
metadata into the staging dir, and when reading it we look there
first. This allows transactions to be aborted half-way without
writing the detached metadata into the repository (possibly
overwriting any old metadata from there).

This fixes https://github.com/ostreedev/ostree/issues/526

Closes: #539
Approved by: giuseppe
2016-10-21 10:50:41 +00:00
Alexander Larsson d43c121675 ostree_repo_read_commit_detached_metadata: Handle parent repo
If the detached metadata is not in the repo, try in the parent
repo if that is set.

Without this a commit will not gpg validate in the child repo

Closes: #539
Approved by: giuseppe
2016-10-21 10:50:41 +00:00
Alexander Larsson cf6ec1bbbc Fix regression for symlinks in bare-user repos
Commit 1d4f1b8878 started using hardlinks
checkouts of symlinks. However, symlinks are not stored as symlink in the
repo for bare-user repos, so this breaks user-mode checkouts of such repos.

We fix this by checking for !is_symlink in the bare-user case.

This fixes:
     https://github.com/ostreedev/ostree/issues/537

Closes: #538
Approved by: giuseppe
2016-10-21 09:24:27 +00:00
Jonathan Lebon 64568bc706 .redhat-ci.yml: use projectatomic/ostree-tester
Same Dockerfile, but automated to rebuild on pushes.

Closes: #536
Approved by: giuseppe
2016-10-20 08:35:13 +00:00
Jonathan Lebon e62defa1a4 add .redhat-ci.yml and .redhat-ci.Dockerfile
Add a YAML file for the new Red Hat CI framework.

Rather than re-installing all the build deps everytime, which takes
time, I added a Dockerfile that we can wire up to the Docker Hub. For
now it lives at `jlebon/ostree-tester:rhci`, but we can move it under
the `projectatomic` org (or a new `ostree` org).

Closes: #535
Approved by: cgwalters
2016-10-19 20:35:23 +00:00
Colin Walters 1d4f1b8878 core: Do create hardlinks to symlinks for checkouts
I was noticing a recent performance issue with checkouts
which seemed to be mostly us going back to doing a `fsync()` on
directories.

Regardless, while looking at that, I saw we were spending time
creating new symlinks. Even though symlinks are small, it's still
better to hardlink them.

Going way back in time, the reason we weren't doing this is
because we were hitting `EMFILE` on ext4, but that was for
gnome-continuous which creates *many* build roots.  Even
there though, they're just a cache, and we handle `EMFILE`.

For ostree-for-host-system, we don't expect to have many roots (just 3
at most transiently), so hardlinking symlinks does make sense.

Closes: #521
Approved by: jlebon
2016-10-17 20:40:15 +00:00
Jonathan Lebon a660e5650d OstreeFetcher: provide proxy credentials if needed
There seems to be an issue in libsoup which causes basic auth
credentials to not be passed to the proxy during requests. We thus have
to handle PROXY_UNAUTHORIZED responses and provide the auth ourselves.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1370558
Related: https://bugzilla.gnome.org/show_bug.cgi?id=772932

Closes: #529
Approved by: cgwalters
2016-10-14 16:06:08 +00:00
Jonathan Lebon a0598cb494 ostree-sysroot-deploy.c: delete redundant check
Just noticed this while inspecting the code. The deployments retrieved
by `_ostree_sysroot_list_deployment_dirs_for_os` will forcibly already
have a matching osname since it indirectly uses that same variable to
construct them. Having a check there makes it look like there may be
subtle corner cases, when there aren't.

Closes: #529
Approved by: cgwalters
2016-10-14 16:06:08 +00:00
Jonathan Lebon 3943284dad docs: amend vmlinuz & initramfs naming convention
I was confused while reading the docs how this could work, since in at
least the Fedora/CentOS/RHEL distros, they're named e.g.
initramfs-`uname -r`-$checksum.

Closes: #529
Approved by: cgwalters
2016-10-14 16:06:08 +00:00
Alexander Larsson ee484697cd pull: Support multiple specifications of --subpath
I need this in flatpak to avoid doing multiple pulls when doing
locale subsetting.

Closes: #523
Approved by: cgwalters
2016-10-11 16:41:03 +00:00
Simon McVittie 15be1f569a Force LC_ALL=C.UTF-8 during build
So that builds in non-English locales can pass their build-time tests.
2016-10-08 15:38:11 +01:00
Simon McVittie 3a097b18fc 2016.11-1 2016-10-07 23:39:12 +01:00
Simon McVittie e80d02f1f5 Fetch missing test files from upstream git
- debian/rules: make the missing scripts executable
2016-10-07 23:39:03 +01:00
Simon McVittie c8048cce30 Move to debhelper compat level 10
- stop using dh --parallel, it's the default now
  - don't use autoreconf and systemd addons explicitly, they are
    the default now
2016-10-07 22:16:17 +01:00
Simon McVittie e2cd2759a0 New upstream release 2016-10-07 22:12:18 +01:00
Simon McVittie a72b28bd32 Merge tag 'upstream/2016.11' into debian/master
Upstream version 2016.11
2016-10-07 21:52:26 +01:00
Simon McVittie f04805f646 New upstream version 2016.11 2016-10-07 21:52:21 +01:00
Alexander Larsson 0446cdb0d3 pull: Support inherit-transaction
If this is true, don't initiate, abort of commit a transaction, instead
it is assumed that the caller initiated the transaction, and that it
will eventually be commited.

This allows you to do multiple pulls or a combination of pulls and
commits in a single transaction.

Closes: #525
Approved by: cgwalters
2016-10-07 19:34:47 +00:00
Colin Walters a0e1344cf8 Release 2016.11
Closes: #524
Approved by: cgwalters
2016-10-07 19:21:41 +00:00
Colin Walters 54621d9e53 libglnx: Update to latest
This pulls in a new compilation flag for wrpseudo compatibility.  Also
note we need to add some includes since glnx-libcontainer went away,
and with it some includes for `sys/mount.h` etc.

Closes: #522
Approved by: cgwalters
2016-10-06 11:54:39 +00:00
Colin Walters 524d2d5cb2 trivial-httpd: Port mostly to fd-relative
We were seeing some weird potential memory corruption in this code
when using it for `rpm-ostree-toolbox installer`, which is almost
certainly not its fault, but let's use it as an excuse to port
(mostly) to fd-relative and away from GFile.

Dropping the last GFile use here is a bit tricky as it does have a
nice high level wrapper around inotify.

Closes: #512
Approved by: jlebon
2016-10-05 21:48:41 +00:00
Colin Walters a981e5fd76 checkout: Fix fsync defaults for new API to be off for real
My previous change in https://github.com/ostreedev/ostree/pull/425
actually broke things so we basically used the repository defaults =(

This is a subtle mess since we're only trying to flip things off
for the *new* API.

Clean this up so that the "default repo inheritance" lives only in one
place - in the compat layer for the old checkout API.  The new
checkout API defaults to off period, so the repository state is
irrelevant.

Closes: #520
Approved by: jlebon
2016-10-05 21:34:57 +00:00
Simon McVittie 2eae12220e Fix spelling of "repository"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #519
Approved by: cgwalters
2016-10-01 18:50:41 +00:00
Simon McVittie b4aa279db3 debian/copyright: remove now-unused GPL-2+ license 2016-10-01 16:06:18 +01:00
Simon McVittie c800f12250 libostree-dev: stop depending on ostree
It isn't necessary to use the library, and would break multiarch
installability.
2016-09-30 22:42:02 +01:00
Simon McVittie a413cd0c28 Install GObject-Introspection typelibs to multiarch path, and mark gir1.2-ostree-1.0 as Multi-Arch: same 2016-09-30 22:38:41 +01:00
Dan Nicholson 6c84fa4366 admin: Allow running status unlocked
It's useful to let non-root see the current system status.

Closes: #515

Closes: #516
Approved by: jlebon
2016-09-30 18:29:26 +00:00
Simon McVittie 0229850943 Relicense debian/ from GPL-2+ to LGPL-2+, with permission from David King 2016-09-21 21:58:57 +01:00
Jonathan Lebon 056ca71a3b docs: add mention of rpm-ostree package layering
Closes: #514
Approved by: cgwalters
2016-09-20 18:45:44 +00:00
Jonathan Lebon 318430dc70 ostree_sysroot_init_osname: also create /var/log
/var/log is another one of those core directories that should be made
available and properly labeled during early boot before tmpfiles.d
starts up.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1265295

Closes: #513
Approved by: cgwalters
2016-09-20 18:03:57 +00:00
Colin Walters 450361d89b boot: Ensure we remount /var writable before systemd does journal flush
Otherwise, we may not get a persistent journal for the first boot.
https://bugzilla.redhat.com/show_bug.cgi?id=1265295

Closes: #511
Approved by: jlebon
2016-09-15 19:41:44 +00:00
Simon McVittie d7132eda03 2016.10-1 2016-09-15 08:27:07 +01:00
Simon McVittie 9b8038c28c Make libostree-doc Multi-Arch: foreign 2016-09-14 23:32:59 +01:00
Simon McVittie 3cbb901ce4 Make libostree-dev Multi-Arch: same 2016-09-14 23:32:27 +01:00
Colin Walters f2b6afd2df sysroot: Drop an unnecessary fsync
While looking at a slow update issue (which I'm guessing is
unpredictable I/O latency in an OpenStack instance), I noticed
in one of the traces we were inside a fsync here.

Dropping the fsync here is just another of a long series of unwinding
them - we `syncfs()` the sysroot fd and `/boot` and we have a big
`sync()` anyways.

Closes: #508
Approved by: jlebon
2016-09-14 19:14:46 +00:00