Displaying 20 results from an estimated 55 matches for "no_key".
2014 Oct 31
4
[PATCH] builder: move the gpgkey_type type from Sigchecker to Utils
...builder/builder.ml
index d7d8fb2..9a77a23 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -154,13 +154,13 @@ let main () =
fun { Sources.uri = uri; Sources.gpgkey = gpgkey; Sources.proxy = proxy } ->
let gpgkey =
match gpgkey with
- | None -> Sigchecker.No_Key
- | Some key -> Sigchecker.KeyFile key in
+ | None -> Utils.No_Key
+ | Some key -> Utils.KeyFile key in
uri, gpgkey, proxy
) repos in
let sources = List.map (
fun (source, fingerprint) ->
- source, Sigchecker.Fingerprint fingerprint, Downloade...
2014 Feb 25
12
[PATCH 0/8] virt-builder: use .conf files for configuration
Hi,
attached there is a serie of patches that completes the work on making
virt-builder use .conf files, shipped in XDG directories, to configure
all the available sources of indexes used.
This also removes the hardcoded default location, replaced now with a
configuration file (which may be not used at all).
Thanks,
Pino Toscano (8):
builder: allow "no key" as key in Sigchecker
2015 Jul 28
0
[PATCH 05/10] builder: allow signatures from subkeys
...)
+ | _ -> ()
+ ) lines;
+ !subkeys in
+ !fingerprint, subkeys
let rec create ~gpg ~gpgkey ~check_signature =
(* Create a temporary directory for gnupg. *)
@@ -74,7 +102,7 @@ let rec create ~gpg ~gpgkey ~check_signature =
match check_signature, gpgkey with
| true, No_Key -> false, No_Key
| x, y -> x, y in
- let fingerprint =
+ let fingerprint, subkeys =
if check_signature then (
(* Run gpg so it can setup its own home directory, failing if it
* cannot.
@@ -100,13 +128,13 @@ let rec create ~gpg ~gpgkey ~check_signature =
let...
2014 Oct 31
0
[PATCH] builder: pass Sources.source objects directly
...et langs = Languages.languages () in
List.iter (
- fun (source, key, proxy) ->
- printf (f_"Source URI: %s\n") source;
- (match key with
+ fun { Sources.uri; gpgkey } ->
+ printf (f_"Source URI: %s\n") uri;
+ (match gpgkey with
| Utils.No_Key -> ()
| Utils.Fingerprint fp ->
printf (f_"Fingerprint: %s\n") fp;
@@ -99,10 +99,10 @@ and list_entries_long ~sources index =
and list_entries_json ~sources index =
let json_sources =
List.map (
- fun (source, key, proxy) ->
- let item = [ &qu...
2014 Oct 10
0
[PATCH 3/3] builder: use the JSON module
...- printf " },\n" in
-
- printf "{\n";
- printf " \"version\": %d,\n" 1;
- printf " \"sources\": [\n";
- iteri (
- fun i (source, key, proxy) ->
- printf " {\n";
- (match key with
- | Sigchecker.No_Key -> ()
- | Sigchecker.Fingerprint fp ->
- printf " \"fingerprint\": \"%s\",\n" fp;
- | Sigchecker.KeyFile kf ->
- printf " \"key\": \"%s\",\n" kf;
- );
- printf " \"uri\": \...
2017 Sep 18
0
[PATCH v9 4/7] builder: add Index.write_entry function
...pen Common_utils
+
+let tmpdir = Mkdtemp.temp_dir "guestfs-tests." "";;
+rmdir_on_exit tmpdir
+
+let dummy_sigchecker = Sigchecker.create ~gpg:"gpg"
+ ~check_signature:false
+ ~gpgkey:Utils.No_Key
+ ~tmpdir
+
+let dummy_downloader = Downloader.create ~curl:"do-not-use-curl"
+ ~cache:None ~tmpdir
+
+(* Utils. *)
+let write_entries file entries =
+ let chan = open_out (tmpdir // file) in
+ List.iter (
+...
2017 Oct 27
0
[PATCH v11 6/8] builder: add Index.write_entry function
...+let tmpdir =
+ let tmpdir = Mkdtemp.temp_dir "guestfs-tests." in
+ rmdir_on_exit tmpdir;
+ tmpdir
+
+let dummy_sigchecker = Sigchecker.create ~gpg:"gpg"
+ ~check_signature:false
+ ~gpgkey:Utils.No_Key
+ ~tmpdir
+
+let dummy_downloader = Downloader.create ~curl:"do-not-use-curl"
+ ~cache:None ~tmpdir
+
+(* Utils. *)
+let write_entries file entries =
+ let chan = open_out (tmpdir // file) in
+ List.iter (In...
2017 Oct 05
0
[PATCH v11 4/6] builder: add Index.write_entry function
...pen Common_utils
+
+let tmpdir = Mkdtemp.temp_dir "guestfs-tests." "";;
+rmdir_on_exit tmpdir
+
+let dummy_sigchecker = Sigchecker.create ~gpg:"gpg"
+ ~check_signature:false
+ ~gpgkey:Utils.No_Key
+ ~tmpdir
+
+let dummy_downloader = Downloader.create ~curl:"do-not-use-curl"
+ ~cache:None ~tmpdir
+
+(* Utils. *)
+let write_entries file entries =
+ let chan = open_out (tmpdir // file) in
+ List.iter (
+...
2015 Aug 12
0
[PATCH 1/2] builder: add non-int revisions
...eprintf (f_"%s: cannot parse 'revision' field for '%s'\n") prog n;
corrupt_file () in
diff --git a/builder/utils.ml b/builder/utils.ml
index a6628eb..986bf68 100644
--- a/builder/utils.ml
+++ b/builder/utils.ml
@@ -26,5 +26,12 @@ type gpgkey_type =
| No_Key
| Fingerprint of string
| KeyFile of string
+and revision =
+ | Rev_int of int
+ | Rev_string of string
let quote = Filename.quote
+
+let string_of_revision = function
+ | Rev_int n -> string_of_int n
+ | Rev_string s -> s
--
2.1.0
2015 May 11
3
[PATCH 1/3] builder: move gpg status parsing within import_keyfile
...ot;IMPORT_OK" :: _ :: fp :: _ -> fingerprint := fp
+ | _ -> ()
+ ) status;
+ !fingerprint
let rec create ~verbose ~gpg ~gpgkey ~check_signature =
(* Create a temporary directory for gnupg. *)
@@ -69,18 +79,7 @@ let rec create ~verbose ~gpg ~gpgkey ~check_signature =
| No_Key ->
assert false
| KeyFile kf ->
- let status_file = import_keyfile gpg tmpdir verbose kf in
- let status = read_whole_file status_file in
- let status = string_nsplit "\n" status in
- let fingerprint = ref "" in
- List.ite...
2017 Mar 07
0
[PATCH v4 5/9] builder: add Index_parser.write_entry function
...pen Common_utils
+
+let tmpdir = Mkdtemp.temp_dir "guestfs-tests." "";;
+rmdir_on_exit tmpdir
+
+let dummy_sigchecker = Sigchecker.create ~gpg:"gpg"
+ ~check_signature:false
+ ~gpgkey:Utils.No_Key
+ ~tmpdir
+
+(* Utils. *)
+let assert_equal_string = assert_equal ~printer:(fun x -> sprintf "\"%s\"" x)
+
+let test_open_out () =
+ open_out (tmpdir // "out")
+
+let test_read_out chan =
+ close_out chan;
+ read_whole_file...
2017 Jan 03
0
[PATCH 5/5] Add a virt-builder-repository tool
...epository." "" in
+ rmdir_on_exit tmpdir;
+
+ let tmprepo = tmpdir // "repo" in
+ Unix.mkdir tmprepo 0o700;
+
+ let sigchecker = Sigchecker.create ~gpg:cmdline.gpg
+ ~check_signature:false
+ ~gpgkey:No_Key
+ ~tmpdir:tmpdir in
+
+ let index =
+ try
+ let index_filename =
+ List.find (
+ fun filename -> Sys.file_exists (cmdline.repo // filename)
+ ) [ "index.asc"; "index" ] in
+
+ let downloader = Downloader...
2014 Oct 10
4
[PATCH 1/3] Move JSON to mllib
Move the simple OCaml JSON writer to mllib, so that can be enhanced and
used also outside v2v.
---
mllib/JSON.ml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
mllib/JSON.mli | 26 ++++++++++++++++++++++++++
mllib/Makefile.am | 5 ++++-
po/POTFILES-ml | 2 +-
v2v/JSON.ml | 53 -----------------------------------------------------
v2v/JSON.mli | 26
2017 Sep 20
6
[PATCH v10 0/6] virt-builder-repository
Hi all,
Diff to v9 includes the changes requested by Pino.
Cédric Bosdonnat (5):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
mllib: add XPath helper xpath_get_nodes()
New tool: virt-builder-repository
Pino Toscano (1):
builder: add simple OCaml osinfo-db reader
.gitignore
2017 Mar 07
0
[PATCH v4 9/9] Add a virt-builder-repository tool
...r-repository." "" in
+ rmdir_on_exit tmpdir;
+
+ let tmprepo = tmpdir // "repo" in
+ mkdir_p tmprepo 0o700;
+
+ let sigchecker = Sigchecker.create ~gpg:cmdline.gpg
+ ~check_signature:false
+ ~gpgkey:No_Key
+ ~tmpdir in
+
+ let index =
+ try
+ let index_filename =
+ List.find (
+ fun filename -> Sys.file_exists (cmdline.repo // filename)
+ ) [ "index.asc"; "index" ] in
+
+ let downloader = Downloader.create...
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...() then (
- printf (f_"%s: '%s' has invalid gpgkey URI\n") prog n;
- );
- raise ex in
+ debug "'%s' has invalid gpgkey URI" n;
+ raise ex in
match k with
| None -> Utils.No_Key
| Some uri ->
(match uri.URI.protocol with
| "file" -> Utils.KeyFile uri.URI.path
| _ ->
- if verbose () then (
- printf (f_"%s: '%s' has non-local gpgkey URI\n") prog n;
-...
2017 Sep 18
11
[PATCH v9 0/7] virt-builder-repository
Hi there,
Diffs to v8:
* Remove the regex to increment the revision: Index_parser.get_entry()
only handles integers
* Fix Pino's comments
Cédric Bosdonnat (6):
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
mllib: add XPath helper xpath_get_nodes()
builder: remove useless fish dependency
New tool:
2017 Mar 23
0
[PATCH v5 10/10] Add a virt-builder-repository tool
...r-repository." "" in
+ rmdir_on_exit tmpdir;
+
+ let tmprepo = tmpdir // "repo" in
+ mkdir_p tmprepo 0o700;
+
+ let sigchecker = Sigchecker.create ~gpg:cmdline.gpg
+ ~check_signature:false
+ ~gpgkey:No_Key
+ ~tmpdir in
+
+ let index =
+ try
+ let index_filename =
+ List.find (
+ fun filename -> Sys.file_exists (cmdline.repo // filename)
+ ) [ "index.asc"; "index" ] in
+
+ let downloader = Downloader.create...
2017 Feb 10
0
[PATCH v3 10/10] Add a virt-builder-repository tool
...epository." "" in
+ rmdir_on_exit tmpdir;
+
+ let tmprepo = tmpdir // "repo" in
+ Unix.mkdir tmprepo 0o700;
+
+ let sigchecker = Sigchecker.create ~gpg:cmdline.gpg
+ ~check_signature:false
+ ~gpgkey:No_Key
+ ~tmpdir in
+
+ let index =
+ try
+ let index_filename =
+ List.find (
+ fun filename -> Sys.file_exists (cmdline.repo // filename)
+ ) [ "index.asc"; "index" ] in
+
+ let downloader = Downloader.create...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages
only when in verbose mode.
Rich.