Giuseppe Scrivano
7224450591
ostree-repo: replace more gs_unref_(variant|bytes) with g_autoptr
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-14 10:04:16 +02:00
Colin Walters
2c526046d8
test-basic: Always chown back before doing assertion
...
Sometimes I rerun the tests for debugging in the same directory, and
having it be not writable breaks `rm * -rf`.
2015-05-13 22:18:36 -04:00
Colin Walters
3f9fa58213
tests: Fix writable repo test
...
When I removed the `transaction` symlink, that made this test start
failing. Fix it by doing `chmod` on `repo/objects`, which is what the
core `ostree_repo_is_writable()` looks at.
2015-05-13 22:11:39 -04:00
Colin Walters
c10bc00249
admin: Use locking for most sysroot commands
...
The previous commit introduced locking for `ostree admin deploy`, but
we do expect people to possibly accidentally do e.g.
`ostree admin upgrade` concurrently.
Using consistent locking in the admin commands will help rpm-ostree.
Closes: https://github.com/GNOME/ostree/pull/110
2015-05-13 17:23:07 -04:00
Matthew Barnes
06818ceddc
tests: Add test-remote-gpg-import.sh
2015-05-13 13:08:49 -04:00
Matthew Barnes
64252a4a39
ostree: Add --gpg-import to the "remote add" command
...
Convenience option imports GPG keys for a newly-created remote.
2015-05-13 13:08:49 -04:00
Matthew Barnes
c287a7419c
ostree: Add a "remote gpg-import" command
...
Imports GPG keys into a remote-specific keyring.
2015-05-13 13:08:49 -04:00
Matthew Barnes
a9b87ebc18
repo: Add remote's keyring during GPG verification
...
This is pretty fugly but it at least avoids new public API.
2015-05-13 13:08:49 -04:00
Matthew Barnes
4d7e73ede1
repo: Add ostree_repo_remote_gpg_import()
...
Imports one or more GPG keys from a source stream or from the user's
personal keyring into a remote-specific keyring. The keys to import
can optionally be restricted by a list of key IDs.
The imported keys are used to conduct GPG verification when pulling
from the given remote.
2015-05-13 13:08:49 -04:00
Matthew Barnes
0c92d7a8d0
repo: Delete a remote's keyring when deleting a remote
2015-05-13 13:08:48 -04:00
Matthew Barnes
56d684173d
repo: Stash keyring name in OstreeRemote
2015-05-13 12:25:58 -04:00
Giuseppe Scrivano
59937d101c
maint.mk: Remove GNU releases specific bits
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-13 10:02:47 +02:00
Giuseppe Scrivano
e3a3e2b618
syntax-check: add syntactic rule to prohibit gs_strfreev
...
and fix an instance.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-13 10:02:47 +02:00
Giuseppe Scrivano
f38ec6dfdf
syntax-check: add syntactic rule to prohibit gs_unref_*
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-13 10:02:47 +02:00
Giuseppe Scrivano
4282ef65bf
tests: add new test for pull --disable-static-deltas
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-13 09:38:04 +02:00
Giuseppe Scrivano
12f911826a
doc: add missing options block for pull
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-13 09:38:04 +02:00
Giuseppe Scrivano
45cb5b5f42
pull: add new switch option --disable-static-deltas
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-13 09:38:04 +02:00
Giuseppe Scrivano
f6d16a6d95
ostree-repo-pull: add option to disable static-deltas
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-12 10:06:56 +02:00
Colin Walters
2dfe24632a
sysroot: Add a try_lock() API
...
The blocking locking API wasn't sufficient for use in the rpm-ostree
daemon; it really wants to know if the lock is held, then continue to
do other things (like service DBus requests), and get notification
when the lock is available.
We also add an async variant that can be called if the lock is not
available.
Implement a higher level "loop until lock is available" method in the
`ostree admin` commandline.
2015-05-10 16:20:53 -04:00
Matthew Barnes
d0edf63346
repo: Simplify sign_data() a little
...
Use ot_gpgme_data_output() to wrapper a GOutputStream.
2015-05-07 17:50:22 -04:00
Matthew Barnes
239f05ecdd
gpg: Add custom data buffers to wrapper GIO streams
...
ot_gpgme_data_input() and ot_gpgme_data_output(), shamelessly ripped
off from seahorse_gpgme_data_input() and seahorse_gpgme_data_output().
2015-05-07 17:07:36 -04:00
Matthew Barnes
cd1551b1ee
gpg: Fix ot_gpgme_error_to_gio_error()
...
Need to extract the error code from a gpgme_error_t, can't just compare
it directly.
2015-05-07 16:02:39 -04:00
Giuseppe Scrivano
223a9eaaa5
ot-fs-utils: remove empty line at EOF
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:59:30 +02:00
Giuseppe Scrivano
70d9599246
summary: delete summary.sig on an update
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
6aeeba4280
tests: add a test for signed summary file
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
ef7a4dee10
pull: verify signature for the summary file
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
5f33133054
summary: add new command line arguments to sign the summary file
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
fee785a72e
ostree-repo: add new API to sign the summary file
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
94360d3d1c
pull: get rid of detached metadata for deltas
...
Once the summary file will be signed, we can validate the superblock
from there.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
8c3d4eb7b2
pull: check that the superblock checksum is the same as in the summary
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
222696996f
core: store information about delta files checksums
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
ae672c3c9f
core: new function _ostree_parse_delta_name
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
e0da4db77c
summary: list the available static deltas
...
Write the information in the additional_metadata element for backward
compatibility.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 21:58:04 +02:00
Giuseppe Scrivano
0f8f668cd3
trivial-httpd: add option to specify the port
...
I use the trivial httpd server locally. Each time I restart the
server, I end up modifying manually the config file for other repos so
to point to the correct port. In this way I can just re-use the same
port.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 16:16:27 +02:00
Giuseppe Scrivano
26bb93ac24
trivial-httpd: fix indentation
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-07 16:16:23 +02:00
Matthew Barnes
4ef0280941
Remove unnecessary #include "libgsystem.h"
2015-05-06 22:07:11 -04:00
Matthew Barnes
302ac4dd89
Use g_auto(GStrv) instead of gs_strfreev
2015-05-06 22:07:11 -04:00
Matthew Barnes
cca69b3f55
Use g_autoptr(GVariantBuilder) instead of gs_unref_variant_builder
2015-05-06 22:07:11 -04:00
Matthew Barnes
c69347b622
Use g_autoptr(GKeyFile) instead of gs_unref_keyfile
2015-05-06 22:07:10 -04:00
Matthew Barnes
c2c322efa9
Use g_autoptr(GVariant) instead of gs_unref_variant
2015-05-06 22:07:10 -04:00
Matthew Barnes
bb231fdf74
Use g_autoptr(GPtrArray) instead of gs_unref_ptrarray
2015-05-06 22:07:10 -04:00
Matthew Barnes
196d983af9
Use g_autoptr(GHashTable) instead of gs_unref_hashtable
2015-05-06 22:07:10 -04:00
Matthew Barnes
e6556dd223
Use g_autoptr(GBytes) instead of gs_unref_bytes
2015-05-06 22:07:10 -04:00
Matthew Barnes
3f044267b5
Use g_autoptr(GChecksum) instead of gs_free_checksum
2015-05-06 22:07:10 -04:00
Matthew Barnes
6a5f7b1288
Use glnx_unref_object instead of gs_unref_object
...
For non-GIO object types, at least until autocleanup support for GObject
based types becomes more widespread.
2015-05-06 22:07:04 -04:00
Matthew Barnes
4ee1acd981
Use g_autoptr() for GIO object types
...
GLib 2.44 supplies all the necessary autocleanup macros for GIO types,
and libglnx backports the relevant macros for ostree.
2015-05-06 21:51:19 -04:00
Matthew Barnes
7a62d64968
Use g_autofree instead of gs_free
2015-05-06 21:50:17 -04:00
Matthew Barnes
4f33515316
Juggling libglnx.h includes
2015-05-06 21:50:06 -04:00
Matthew Barnes
83aac088d1
gpg: Add ostree_gpg_verify_result_describe_variant()
...
Needed for printing signature details in places where
OstreeGpgVerifyResult cannot go.
2015-05-06 21:04:40 -04:00
Colin Walters
4a3c2a25b7
repo: Stop creating "transaction" symlink
...
This originally was a way that we detected the case where a pull was
interrupted. Later, we added `.commitpartial` files which also cover
this case.
See also https://github.com/GNOME/ostree/pull/85
We still want to honor their existence (and unlink them) in case an
old version of ostree was in use, but I believe it's safe to stop
creating them now.
The only case where this would break is if you have a version of
ostree that predates commitpartial in your rollback history, but such
old versions are no longer in use by operating systems I support at
least.
Closes: https://github.com/GNOME/ostree/pull/100
2015-05-06 13:26:47 -04:00