Commit Graph

17 Commits

Author SHA1 Message Date
Colin Walters
5d68a99a2f tests: Silence a gcc warning
We can't mix `goto` and `__attribute__((cleanup))`.
2021-04-08 14:45:28 +00:00
William Manley
a88d2f5f7b ostree commit --tree=tar: Import xattrs from tarballs
If you specify an `xattr_callback` the xattrs will still be taken from
there for now.
2020-11-17 16:54:32 +00:00
Colin Walters
6d104f6257 ci: Replace PAPR with CoreOS CI
Move the alternative builds into the Jenkinsfile.

Update it to do a FCOS build + kola run.

We drop the flatpak/rpm-ostree runs for now; the former
will needs some work to do the automatic virt bits.  The
latter I think we can circle back to when we e.g. figure
out how to include rpm-ostree's tests in kola runs.
2020-02-06 23:14:42 +00:00
Marcus Folkesson
6bf4b3e1d8 Add SPDX-License-Identifier to source files
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
2018-01-30 20:03:42 +00:00
Colin Walters
6e4146a354 tree-wide: Remove Emacs modelines
We added a `.dir-locals.el` in commit: 9a77017d87
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
2017-09-21 21:38:34 +00:00
Colin Walters
1c2d344074 tests: Port some bits of C to new style
Where we can; perhaps after updating libglnx we should use the
new test error macro?

Closes: #1169
Approved by: jlebon
2017-09-13 19:32:36 +00:00
Simon McVittie
760ff2f66e test-libarchive-import: Skip if extended attributes are unsupported
This is the case at build-time on some (all?) Debian autobuilders.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1120
Approved by: cgwalters
2017-08-29 19:08:59 +00:00
Colin Walters
40b41d2cc9 tree-wide: Use GLib autocleanups for libarchive
Define typedefs for read/write archives, and use the GLib
autocleanups for them.   Prep for updating libglnx to drop its
custom autocleanup macros.

Closes: #1042
Approved by: jlebon
2017-08-02 16:55:38 +00:00
Colin Walters
7bb0ff46a4 Define and use cleanup helpers for libarchive
This should fix some of the ASAN leaks around libarchive usage,
and is generally better.

Closes: #609
Approved by: jlebon
2016-12-05 15:20:56 +00:00
Colin Walters
62b94635bc [ASAN] tests: Fix leaks
Just for cleaner sanitizer output.

Closes: #598
Approved by: jlebon
2016-11-30 18:51:26 +00:00
Colin Walters
eb7ba645af [ASAN] tests: Fix some memleaks in libarchive importer
Caught by `-fsanitize=address`.

Closes: #587
Approved by: jlebon
2016-11-21 16:34:06 +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
Simon McVittie
f38c33fec8 entry_pathname_test_helper: these tests need extended attributes
Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #366
Approved by: cgwalters
2016-06-26 21:15:36 +00:00
Jonathan Lebon
dfbb61270a tests/test-libarchive-import.c: add tests
- Do a bit of refactoring
- Add test for use_ostree_convention
- Add test for xattr_callback
- Add test for SELinux labeling

Closes: #275
Approved by: cgwalters
2016-05-06 14:44:55 +00:00
Simon McVittie
0a7e128782 Skip test_libarchive_ignore_device_file if we cannot write xattrs
The test tries to get a filesystem that supports xattrs by writing
to /var/tmp, but in some automated build environments the entire
build chroot is on a tmpfs.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-21 13:02:49 -04:00
Colin Walters
30c5fb1a51 libarchive: Make autocreate_parents imply autocreating root dir
Some Docker layers are just metadata in the `layer.json`.  If one is
mapping Docker layers to OSTree commits, one needs to create a dummy
root directory, because OSTree doesn't support metadata-only commits.

Let's just push that logic down here because it's easier than special
casing it in higher levels.
2016-02-22 17:02:31 -05:00
Colin Walters
3a555114bc repo: Add ostree_repo_import_archive_to_mtree
This is a more flexible version of the previous
ostree_repo_write_archive_to_mtree() which took a file reference.
This has an extensible options structure, and in particular
now supports `ignore_unsupported_content`.

I plan to use this for importing Docker images which contain device
nodes.  (There's no reason for container images to have those, so
we'll just ignore them).

Also here, just like the export variant, the caller is responsible for
setting up libarchive.
2016-02-19 08:54:04 -05:00