Simon McVittie [Sun, 10 Dec 2017 19:39:38 +0000 (19:39 +0000)]
tests: Don't assume uid == primary gid
Nothing guarantees that each user has a group containing only
themselves. Even if they do, nothing guarantees that its group ID
equals the user ID, particularly if another user earlier in the same
range was created without a corresponding group or vice versa.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Gbp-Pq: Name tests-Don-t-assume-uid-primary-gid.patch
Simon McVittie [Sat, 4 Nov 2017 14:05:06 +0000 (14:05 +0000)]
ostree (2017.13-1) unstable; urgency=medium
* New upstream release
- d/patches: Drop all patches
- d/copyright: Update
- Update symbols file
* d/control: Require dh-exec 0.23~, for build-profile support.
Strictly speaking we might only need 0.15, but I'm not going to
test versions older than the jessie backport.
* Set Rules-Requires-Root to no
* Standards-Version: 4.1.1 (no changes required)
Colin Walters [Wed, 25 Oct 2017 17:13:17 +0000 (13:13 -0400)]
lib/repo: Fix loading commitstate with parent repos
This makes the code nicer too. Properly unit testing this though really wants
like a whole set of stuff around parent repos...but we do have coverage of the
non-parent path in the current pull tests.
Jonathan Lebon [Fri, 6 Oct 2017 21:26:41 +0000 (21:26 +0000)]
fdio: allow NULL for fstatat_allow_noent stbuf
Often, the caller doesn't actually care about the details of the stat
struct itself, but just whether the entry exists or not. It does work
to just pass `NULL` directly to glibc in a quick test, but given that
the argument is tagged as `__nonnull` and that the documentation does
not explicitly specify this is supported, let's do this safely.
Colin Walters [Fri, 13 Oct 2017 22:14:17 +0000 (18:14 -0400)]
tests: Add test-pull-bareuseronly
I was going to fix a bug in the static deltas code and I noticed
we were missing `pull-test.sh` coverage for bareuseronly.
Obviously fixing this requires duplicating some of the bits we have in
`basic-test.sh`; need to hoist that into `libtest.sh`. For now though let's get
the coverage.
Colin Walters [Mon, 16 Oct 2017 19:29:38 +0000 (15:29 -0400)]
lib/sysroot: Fix error handling when mounting overlayfs fails
This isn't perfect, but at least we fix an error-overwrite error, and in
practice `ostree admin unlock` isn't wrapped by `rpm-ostree` yet, so spew to
stderr is OK.
Simon McVittie [Thu, 26 Oct 2017 11:08:15 +0000 (12:08 +0100)]
lib/utils: Check for invalid UTF-8 in filenames
In case a filename contains invalid UTF-8 characters, libostree will
pass it to g_variant_builder_add() in create_tree_variant_from_hashes()
anyway, which leads to a critical warning from glib and an invalid
commit. This commit makes ostree print a useful error and exit instead.
Colin Walters [Wed, 11 Oct 2017 21:02:02 +0000 (17:02 -0400)]
lib/deploy: Use _exit() for FIFREEZE watchdog
This works around an (IMO) SpiderMonkey bug - it tries to
clean up in a shared library destructor, but doesn't install a
`pthread_atfork()` handler to unset its state.
Dan Nicholson [Wed, 11 Oct 2017 14:03:10 +0000 (14:03 +0000)]
lib/deploy: Ignore FIFREEZE/FITHAW errors when already in state
If the filesystem is already frozen, FIFREEZE returns EBUSY, and if the
filesystem is already thawed, FITHAW returns EINVAL. It's very unlikely
these issues would arise on a real ostree system since the sysroot would
be locked during the freeze/thaw cycle.
However, when multiple fake sysroots are used during the test suite (run
as root), the tests could race to run the freeze/thaw cycle without
locking. Furthermore, there's no reason why an independent process might
be trying to freeze the filesystem while ostree was deploying. Ignore
but warn for these errors since there's not much ostree can do about it,
anyways.
Philip Withnall [Tue, 3 Oct 2017 14:45:34 +0000 (15:45 +0100)]
lib/repo-commit: Import detached metadata even if hardlink exists
Spotted while reading through the code, it looks like the
copy_detached_metadata() call is accidentally omitted if a hardlink
already exists for the .commit object.
Colin Walters [Mon, 2 Oct 2017 15:24:05 +0000 (11:24 -0400)]
lib/pull: Fix regression with pull-local for nonexistent refs
I was reading the pull code for the last release, and spotted
a bug in commit f923c2e1eaebe0c781f07d34ae1a03f94357bccd - in
the case where the ref doesn't exist, we don't set an error,
tripping an assertion in the main code.
The previous code wanted the ref to always exist, so just flip back the boolean
for "ignore noent". I moved the `g_strchomp()` just into the HTTP path - if a
local repo is corrupted in this way it's something to fix in that repo.
Simon McVittie [Tue, 3 Oct 2017 20:30:36 +0000 (21:30 +0100)]
Add missing test-libglnx-shutil
Because we re-run autogen.sh, we'll regenerate Makefile-libglnx.am.inc
(which results in the version after this patch, including
test-libglnx-shutil, being present) and then try to build
test-libglnx-shutil; but its source code wasn't included in the upstream
tarball, because Makefile-libglnx.am.inc wasn't up to date at
"make dist" time.
Signed-off-by: Simon McVittie <smcv@debian.org>
Gbp-Pq: Topic dist
Gbp-Pq: Name Add-missing-test-libglnx-shutil.patch
Simon McVittie [Thu, 26 Oct 2017 23:19:45 +0000 (00:19 +0100)]
ostree (2017.12-2) unstable; urgency=medium
* Disable gtk-doc if we are not going to build libostree-doc,
in particular for architecture-specific builds. Note that it remains
in Build-Depends (not Build-Depends-Indep) because it is also needed
for gtkdocize during dh_autoreconf.
- In particular this might fix FTBFS on sparc64, where highlight(1)
fails.
* d/p/2017.13/lib-core-Init-struct-stat-buffer.patch,
d/p/2017.13/lib-sysroot-Fix-pointer-going-out-of-scope-in-unlock-code.patch,
d/p/2017.13/lib-deploy-Ignore-FIFREEZE-FITHAW-errors-when-already-in-.patch,
d/p/2017.13/lib-deploy-Use-_exit-for-FIFREEZE-watchdog.patch,
d/p/2017.13/lib-deltas-Check-cancellable-during-processing.patch,
d/p/2017.13/lib-utils-Check-for-invalid-UTF-8-in-filenames.patch,
d/p/2017.13/Cope-with-xattr-syscalls-raising-EOPNOTSUPP.patch,
d/p/2017.13/lib-sysroot-Fix-error-handling-when-mounting-overlayfs-fa.patch,
d/p/2017.13/lib-repo-Properly-handle-NULL-homedir-when-signing-commit.patch,
d/p/2017.13/fdio-allow-NULL-for-fstatat_allow_noent-stbuf.patch,
d/p/2017.13/lib-repo-Fix-loading-commitstate-with-parent-repos.patch:
Add various bugfix patches from upstream
- In particular, dealing with the possibility that EOPNOTSUPP != ENOTSUP
should fix test failures on hppa.
* d/p/2017.13/tests-Add-test-pull-bareuseronly.patch:
Add more test coverage from upstream
- d/rules: Make the new test executable
* d/test.sh: Clean up ostree-trivial-httpd processes
* d/test.sh: Don't repeat build-time tests if they fail once. They seem
to be somewhat reliable now.
Simon McVittie [Tue, 3 Oct 2017 20:30:36 +0000 (21:30 +0100)]
Add missing test-libglnx-shutil
Because we re-run autogen.sh, we'll regenerate Makefile-libglnx.am.inc
(which results in the version after this patch, including
test-libglnx-shutil, being present) and then try to build
test-libglnx-shutil; but its source code wasn't included in the upstream
tarball, because Makefile-libglnx.am.inc wasn't up to date at
"make dist" time.
Signed-off-by: Simon McVittie <smcv@debian.org>
Gbp-Pq: Topic dist
Gbp-Pq: Name Add-missing-test-libglnx-shutil.patch
Philip Withnall [Tue, 3 Oct 2017 14:45:34 +0000 (15:45 +0100)]
lib/repo-commit: Import detached metadata even if hardlink exists
Spotted while reading through the code, it looks like the
copy_detached_metadata() call is accidentally omitted if a hardlink
already exists for the .commit object.
Colin Walters [Mon, 2 Oct 2017 15:24:05 +0000 (11:24 -0400)]
lib/pull: Fix regression with pull-local for nonexistent refs
I was reading the pull code for the last release, and spotted
a bug in commit f923c2e1eaebe0c781f07d34ae1a03f94357bccd - in
the case where the ref doesn't exist, we don't set an error,
tripping an assertion in the main code.
The previous code wanted the ref to always exist, so just flip back the boolean
for "ignore noent". I moved the `g_strchomp()` just into the HTTP path - if a
local repo is corrupted in this way it's something to fix in that repo.
Simon McVittie [Tue, 3 Oct 2017 21:47:48 +0000 (22:47 +0100)]
ostree (2017.12-1) unstable; urgency=medium
* New upstream release
- Drop all current patches, applied upstream
- Update symbols file
* Add some post-release bug fix patches
* Simplify autopkgtest now that test-local-pull seems to be stable
* Unexport HTTP proxy variables in autopkgtest to work around lack of
support for no_proxy, which breaks the tests on Ubuntu autopkgtest.
We don't actually need Internet access, so this is OK.
* debian/test.sh: Unexport HTTP proxy variables for build-time tests
too
* Make build-time test failures fatal if they fail at least twice
out of 5 tries (previously they had to fail at least 3 times)
* Add patch to reinstate test-libglnx-shutil.c, which was missed out
of the upstream tarball
Jonathan Lebon [Wed, 20 Sep 2017 18:38:16 +0000 (18:38 +0000)]
rofiles-fuse: also pass mode for O_RDONLY
In the `O_RDONLY` case, we were calling `openat` without a mode
argument. However, it's perfectly legal (albeit unusual) to do
`open(O_RDONLY|O_CREAT)`. One such application that makes use of this is
`flock(1)`.
This was actually caught by `_FORTIFY_SOURCE=2`, and once we run
`rofiles-fuse` with `-f`, the message is clear:
Simon McVittie [Tue, 19 Sep 2017 17:37:58 +0000 (18:37 +0100)]
tests: Reset umask to 022 while creating test repository
In test-basic-root.sh we make assertions about the permissions
of files like baz/cow, which were created without an explicit chmod.
We can't do that unless we control the permissions.
For some reason the "debomatic" autobuilder used to do some Debian
archive rebuilds does the entire build including build-time tests
as uid 0 with umask 002, which broke those assertions. This seems
a weird thing to do, and I've opened a bug, but it also seems
reasonable to fix this test.
This also lets us remove a couple of existing workarounds for the
same issue.
Simon McVittie [Tue, 19 Sep 2017 13:41:18 +0000 (14:41 +0100)]
tests: Explicitly unset LANGUAGE after setting LC_ALL
As a GNU extension, LANGUAGE takes precedence over LC_ALL for
gettext(3) whenever the locale is not C, causing tests that grep for
specific English strings to fail when run in non-English locales.
The upstream glibc proposal for C.UTF-8 would give C.UTF-8 the same
special case as C here, but the implementation in Debian does not
currently have this, so we have to unset LANGUAGE too.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Forwarded: https://github.com/ostreedev/ostree/pull/1188
Applied-upstream: 2017.12, commit:223c940b46a4bb335665df7436566b73cdf0effd
Gbp-Pq: Topic 2017.12
Gbp-Pq: Name tests-Explicitly-unset-LANGUAGE-after-setting-LC_ALL.patch
Simon McVittie [Fri, 22 Sep 2017 14:48:24 +0000 (15:48 +0100)]
ostree (2017.11-2) unstable; urgency=medium
* Replace patch with the version applied upstream in 2017.12
* Standards-Version: 4.1.0 (no changes)
* Add a patch to fix FTBFS in non-English locales
* Add a patch to fix FTBFS if building as root with umask != 022,
which for some reason debomatic does (Closes: #876138)
* Add a patch from upstream to fix undefined behaviour with
O_RDONLY|O_CREAT in rofiles-fuse
Simon McVittie [Fri, 15 Sep 2017 15:58:15 +0000 (16:58 +0100)]
ostree (2017.11-1) unstable; urgency=medium
* New upstream release
- Drop all current patches, applied upstream
- Update symbols file
* Adjust Description and Upstream-Name to emphasize libostree
* Classify new ostree-tmpfiles.conf as part of ostree-boot, and so
don't install it yet
* Stop copying an old ostree-trivial-httpd.xml from debian/dist/
into source tree. Upstream distributes it again, and has since
2017.8.
* Add a patch to fix JavaScript tests with gjs 1.50.0, which is
more strict about 'let'
* Stop providing "ostree trivial-httpd" CLI, following upstream
default behaviour. flatpak used to use it in its tests, but
the version in stable no longer does.
Simon McVittie [Tue, 29 Aug 2017 16:03:37 +0000 (17:03 +0100)]
test-basic-user-only: Skip final step if no user xattrs
We don't want to skip the entire test, because the whole point of
bare-user-only is that it works in the absence of xattrs; but we do
need to skip this last stage, which explicitly uses a bare-user
repository.
Signed-off-by: Simon McVittie <smcv@debian.org>
Gbp-Pq: Name test-basic-user-only-Skip-final-step-if-no-user-xattrs.patch
Simon McVittie [Tue, 29 Aug 2017 17:18:49 +0000 (18:18 +0100)]
ostree (2017.10-1) unstable; urgency=medium
* New upstream release
- Update symbols file
- Install new bash completions
* Use dh_missing --fail-missing instead of dh_install --fail-missing
* Only run tests when building architecture-dependent packages.
The tests aren't so interesting that we want to run them again
when splitting -arch/-indep builds.
* Add patches to make the tests pass again when /var/tmp is on tmpfs,
which does not support user xattrs
* Add patch to remove useless #! from bash completions
* Make build-time test failures fatal again, but only if they are
reproducible (at least 3 times out of 5) for now
Simon McVittie [Fri, 28 Jul 2017 13:43:30 +0000 (14:43 +0100)]
ostree (2017.9-1) unstable; urgency=medium
* New upstream release
- Drop backported patch
- Update symbols file
* debian/rules: Adjust a comment to avoid Lintian thinking this is a
dh_make template
Colin Walters [Wed, 19 Jul 2017 13:19:16 +0000 (09:19 -0400)]
lib/commit: Fix EBADF with GENERATE_SIZES option for commit
Regression from previous tmpfile refactoring; unfortunately
the `OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES` option
only has coverage via gjs currently.
Might expose it via the cmdline in a later option, but in the big picture the
idea was that this data is better kept in static deltas.
Simon McVittie [Wed, 19 Jul 2017 21:18:20 +0000 (22:18 +0100)]
ostree (2017.8-1) unstable; urgency=medium
* New upstream release
- Update symbols file
- Remove patches that are no longer needed
- Add patch from upstream PR #1016 to fix a regression
* Add a Breaks on flatpak (<< 0.8.7-2~), which rely on libostree to
download the summary and its signature when mirroring.
libostree >= 2017.7 no longer does this. On affected flatpak versions,
this breaks installation of new apps and runtimes system-wide.
* Add Build-Depends-Indep: libglib2.0-doc so gtk-doc can set up
cross-references
Simon McVittie [Wed, 21 Jun 2017 12:06:54 +0000 (13:06 +0100)]
ostree (2017.7-1) unstable; urgency=medium
* New upstream release
- Update symbols file
- Add post-release patches so test-symbols.sh passes again
- debian/dist/: Add ostree-trivial-httpd.xml, which was incorrectly
excluded from the upstream release
* Standards-Version: 4.0.0
- Use https URL for copyright-format
* Implement <nodoc> build profile
* Upload to unstable
Simon McVittie [Thu, 19 Jan 2017 11:34:57 +0000 (11:34 +0000)]
Make corrupt-repo-ref.js executable
Debian's Lintian packaging consistency check complains that it isn't
executable but has a #! line. In fact it's reasonable to run this
script directly, so make it executable, and put it in a _scripts
variable so it will be installed executable.
Simon McVittie [Thu, 19 Jan 2017 11:23:30 +0000 (11:23 +0000)]
Sourced test snippets: remove shebang and make non-executable
They are installed non-executable, which makes Debian's Lintian
packaging consistency check complain that #! is only useful
in executable scripts. But in fact they are not useful to execute
directly (they rely on setup being done in the script that sources
them), so just chmod them -x.
Simon McVittie [Thu, 19 Jan 2017 13:23:32 +0000 (13:23 +0000)]
ostree (2016.15-3) unstable; urgency=medium
* debian/control: Don't run gjs tests on sparc64. gjs doesn't seem
to work there at all (#827815)
- d/ostree-tests.lintian-overrides: silence
missing-dep-for-interpreter error on sparc64, where we install
the script but do not attempt to run it
* debian/tests/gnome-desktop-testing: Skip test-local-pull.sh.test
which suffers from a known bug (#842606)
* debian/tests/gnome-desktop-testing: Fail if no tests were found
- debian/tests/test-local-pull: Run the unreliable test separately,
repeated 3 times to assess how often it fails
* d/p/Sourced-test-snippets-remove-shebang-and-make-non-executa.patch,
d/p/Make-corrupt-repo-ref.js-executable.patch:
Fix permissions and #! lines for some tests in the upstream build
system
* d/rules: remove workarounds for script permissions.
The upstream build system now uses the intended permissions throughout.
- Retain explicit chmod for *.js, which dh_fixperms assumes should
not be executable.
* d/p/Fix-TAP-syntax-in-test-basic-user.sh-and-run-it.patch:
Run an additional test, which was previously installed but not run
Simon McVittie [Tue, 20 Dec 2016 11:28:41 +0000 (11:28 +0000)]
ostree (2016.15-2) unstable; urgency=medium
* Make all test failures non-fatal at build time, so that intermittent
test failures do not interfere with possible security updates during
Debian stretch-as-stable.
Simon McVittie [Thu, 1 Dec 2016 11:25:33 +0000 (11:25 +0000)]
Terminate individual tests after 10 minutes
While using the Automake parallel test harness, if a test hangs for
long enough for an external watchdog to kill the entire build process
(as happens in Debian sbuild after 150 minutes with no activity on
stdout/stderr), the logs will not be shown. If we make an individual
test time out sooner, logs are more likely to be shown.
We use SIGABRT so that the process(es) under test will dump core,
allowing the point at which ostree is blocking to be analyzed.
After 1 minute, if any have not died, we kill them again with SIGKILL.
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://github.com/ostreedev/ostree/pull/607
Gbp-Pq: Name Terminate-individual-tests-after-10-minutes.patch