[Pkg-sks-commit] r146 - sks/trunk/sks/debian/patches
chrism at alioth.debian.org
chrism at alioth.debian.org
Thu Jun 19 15:09:18 UTC 2008
Author: chrism
Date: 2008-06-19 15:09:17 +0000 (Thu, 19 Jun 2008)
New Revision: 146
Added:
sks/trunk/sks/debian/patches/208_show_revoked_in_ms
sks/trunk/sks/debian/patches/209_handle_attribute_uids_in_mr
sks/trunk/sks/debian/patches/210_only_latest_changetime_in_mr
Log:
[project @ 148]
Do some work for machine readable output
Original author: weasel
Date: 2004-08-02 09:13:36.449768+00:00
Added: sks/trunk/sks/debian/patches/208_show_revoked_in_ms
===================================================================
--- sks/trunk/sks/debian/patches/208_show_revoked_in_ms (rev 0)
+++ sks/trunk/sks/debian/patches/208_show_revoked_in_ms 2008-06-19 15:09:17 UTC (rev 146)
@@ -0,0 +1,18 @@
+diff -ruN sks-1.0.7-old/mRindex.ml sks-1.0.7/mRindex.ml
+--- sks-1.0.7-old/mRindex.ml Sun Oct 12 22:20:18 2003
++++ sks-1.0.7/mRindex.ml Mon Aug 2 10:36:39 2004
+@@ -107,12 +107,13 @@
+ | Some days -> sprintf "%Ld"
+ (Int64.add pki.pk_ctime (Int64.mul daysecs (Int64.of_int days)))
+ in
+- let key_line = sprintf "pub:%s:%d:%d:%Ld:%s:"
++ let key_line = sprintf "pub:%s:%d:%d:%Ld:%s:%s"
+ keyid
+ pki.pk_alg
+ pki.pk_keylen
+ pki.pk_ctime
+ exp_string
++ (if (Index.is_revoked key) then "r" else "")
+ in
+ let uid_lines =
+ List.map ~f:(fun (uid,sigs) -> uid_to_line full_keyid uid sigs) uids
Added: sks/trunk/sks/debian/patches/209_handle_attribute_uids_in_mr
===================================================================
--- sks/trunk/sks/debian/patches/209_handle_attribute_uids_in_mr (rev 0)
+++ sks/trunk/sks/debian/patches/209_handle_attribute_uids_in_mr 2008-06-19 15:09:17 UTC (rev 146)
@@ -0,0 +1,17 @@
+diff -ruN sks-1.0.7-old/mRindex.ml sks-1.0.7/mRindex.ml
+--- sks-1.0.7-old/mRindex.ml Mon Aug 2 10:45:27 2004
++++ sks-1.0.7/mRindex.ml Mon Aug 2 10:49:51 2004
+@@ -116,7 +116,12 @@
+ (if (Index.is_revoked key) then "r" else "")
+ in
+ let uid_lines =
+- List.map ~f:(fun (uid,sigs) -> uid_to_line full_keyid uid sigs) uids
++ List.map ~f:(fun (uid,sigs) ->
++ match uid.packet_type with
++ User_ID_Packet -> uid_to_line full_keyid uid sigs
++ | User_Attribute_Packet -> "uat::::"
++ | _ -> "???::::"
++ ) uids
+ in
+ key_line::uid_lines
+
Added: sks/trunk/sks/debian/patches/210_only_latest_changetime_in_mr
===================================================================
--- sks/trunk/sks/debian/patches/210_only_latest_changetime_in_mr (rev 0)
+++ sks/trunk/sks/debian/patches/210_only_latest_changetime_in_mr 2008-06-19 15:09:17 UTC (rev 146)
@@ -0,0 +1,29 @@
+diff -ruN sks-1.0.7-old/mRindex.ml sks-1.0.7/mRindex.ml
+--- sks-1.0.7-old/mRindex.ml Mon Aug 2 10:54:48 2004
++++ sks-1.0.7/mRindex.ml Mon Aug 2 11:09:16 2004
+@@ -78,18 +78,20 @@
+ sigs
+
+ let time_to_string time = match time with
+- | None -> "-"
++ | None -> ""
+ | Some x -> sprintf "%Ld" x
+
+ let uid_to_line keyid uid_packet sigs =
+ let uid_string = escape_uid_string uid_packet.packet_body in
+ let sigs = get_self_sigs keyid sigs in
+ let times = List.map ~f:ParsePGP.get_times sigs in
+- let (ctimes,exptimes) = List.split times in
++ let times = List.sort (fun (create1,exp1) (create2,exp2) -> compare create2 create1) times in
++ let firsttime = List.hd times in
++ let (ctime,exptime) = firsttime in
+ sprintf "uid:%s:%s:%s:"
+- uid_string
+- (String.concat ~sep:" " (List.map ~f:time_to_string ctimes))
+- (String.concat ~sep:" " (List.map ~f:time_to_string exptimes))
++ uid_string
++ (time_to_string ctime)
++ (time_to_string exptime)
+
+ (** number of seconds in a day *)
+ let daysecs = Int64.of_int (60 * 60 * 24)
More information about the Pkg-sks-commit
mailing list