diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-auth/otpcalc | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-auth/otpcalc')
-rw-r--r-- | sys-auth/otpcalc/Manifest | 1 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc-0.97-badindex.diff | 13 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc-0.97-gtk-deprecated.patch | 261 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc-0.97-gtk2-gentoo.patch | 72 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch | 53 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc-0.97-skey-md5.patch | 24 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc-crypto-proto.diff | 13 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc-man-table-format.diff | 35 | ||||
-rw-r--r-- | sys-auth/otpcalc/files/otpcalc.desktop | 8 | ||||
-rw-r--r-- | sys-auth/otpcalc/metadata.xml | 11 | ||||
-rw-r--r-- | sys-auth/otpcalc/otpcalc-0.97-r6.ebuild | 54 |
11 files changed, 545 insertions, 0 deletions
diff --git a/sys-auth/otpcalc/Manifest b/sys-auth/otpcalc/Manifest new file mode 100644 index 000000000000..36425b6a8fc6 --- /dev/null +++ b/sys-auth/otpcalc/Manifest @@ -0,0 +1 @@ +DIST otpCalc-0.97.tar.gz 123704 SHA256 e2c19fa6178ed42f0576650db6f94942cac366feadf82c2a679b35197c65f745 SHA512 5d22bd01fe90b32801d6f1c5ac3105036c14ac8197dda3c8454974ec72830a5f8cd693bd0520a51defdb0a7c7703483770410ba560436168826f8b6133a2524f WHIRLPOOL f73c745e336e9196003869c76cbf30a69dd94fde2549a2cd3391de531b36e36504e4d5c779159f254c425f69381be3bae05f0cdd13a1a920d593f82db0052459 diff --git a/sys-auth/otpcalc/files/otpcalc-0.97-badindex.diff b/sys-auth/otpcalc/files/otpcalc-0.97-badindex.diff new file mode 100644 index 000000000000..53a32c4e1cc8 --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc-0.97-badindex.diff @@ -0,0 +1,13 @@ +Allocate enough elements for array of func ptrs, bug 123976. + +--- otpCalc-0.97.orig/callbacks.c ++++ otpCalc-0.97/callbacks.c +@@ -81,7 +81,7 @@ + void calculate(void) + { + +- void (*hashes[4])(); ++ void (*hashes[5])(); + + gchar *challenge, *passwd, *message, *response; + struct tokens *set; diff --git a/sys-auth/otpcalc/files/otpcalc-0.97-gtk-deprecated.patch b/sys-auth/otpcalc/files/otpcalc-0.97-gtk-deprecated.patch new file mode 100644 index 000000000000..83661773193b --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc-0.97-gtk-deprecated.patch @@ -0,0 +1,261 @@ +Do not use deprecated GTK symbols. +Use accessor functions for GTK struct members. + +--- otpCalc-0.97-orig/callbacks.c ++++ otpCalc-0.97/callbacks.c +@@ -65,14 +65,16 @@ + + bu_about_close = gtk_button_new_with_label("Close"); + +- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(di_about)->vbox), ++ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area( ++ GTK_DIALOG(di_about))), + la_about); +- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(di_about)->action_area), ++ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_action_area( ++ GTK_DIALOG(di_about))), + bu_about_close); + +- gtk_signal_connect_object(GTK_OBJECT(bu_about_close), "clicked", +- GTK_SIGNAL_FUNC(gtk_widget_destroy), +- (gpointer)di_about); ++ g_signal_connect_swapped(G_OBJECT(bu_about_close), "clicked", ++ G_CALLBACK(gtk_widget_destroy), ++ (gpointer)di_about); + + gtk_widget_show_all(di_about); + +@@ -176,10 +178,11 @@ + ); + gtk_misc_set_padding(GTK_MISC(la_netwarn), 10, 10); + gtk_label_set_line_wrap(GTK_LABEL(la_netwarn), TRUE); +- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(di_netwarn)->vbox), ++ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area( ++ GTK_DIALOG(di_netwarn))), + la_netwarn); + +- aa_netwarn = GTK_DIALOG(di_netwarn)->action_area; ++ aa_netwarn = gtk_dialog_get_action_area(GTK_DIALOG(di_netwarn)); + + bu_netwarn_ok = gtk_button_new_with_label("Yes"); + gtk_container_add(GTK_CONTAINER(aa_netwarn), bu_netwarn_ok); +@@ -187,12 +190,12 @@ + bu_netwarn_canc = gtk_button_new_with_label("No"); + gtk_container_add(GTK_CONTAINER(aa_netwarn), bu_netwarn_canc); + +- gtk_signal_connect_object(GTK_OBJECT(bu_netwarn_ok), "clicked", +- GTK_SIGNAL_FUNC(gtk_widget_destroy), +- (gpointer)di_netwarn); ++ g_signal_connect_swapped(G_OBJECT(bu_netwarn_ok), "clicked", ++ G_CALLBACK(gtk_widget_destroy), ++ (gpointer)di_netwarn); + +- gtk_signal_connect_object(GTK_OBJECT(bu_netwarn_canc), "clicked", +- GTK_SIGNAL_FUNC(gtk_main_quit), NULL); ++ g_signal_connect_swapped(G_OBJECT(bu_netwarn_canc), "clicked", ++ G_CALLBACK(gtk_main_quit), NULL); + + gtk_widget_show_all(di_netwarn); + +@@ -207,13 +210,13 @@ + unsigned short parsed; + + +- if (selection->length < 1) ++ if (gtk_selection_data_get_length(selection) < 1) + return; + + set = g_malloc(sizeof(struct tokens)); +- set->seed = g_malloc(selection->length); ++ set->seed = g_malloc(gtk_selection_data_get_length(selection)); + +- parsed = parse(selection->data, set); ++ parsed = parse(gtk_selection_data_get_data(selection), set); + + g_free(set->seed); + g_free(set); +@@ -221,7 +224,8 @@ + if (!parsed) + return; + +- gtk_entry_set_text(GTK_ENTRY(te_challenge), selection->data); ++ gtk_entry_set_text(GTK_ENTRY(te_challenge), ++ gtk_selection_data_get_data(selection)); + + } + +--- otpCalc-0.97-orig/gui.c ++++ otpCalc-0.97/gui.c +@@ -51,17 +51,17 @@ + /* Setup the main window... */ + wi_top = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_title(GTK_WINDOW(wi_top), "otpCalc"); +- gtk_window_set_policy(GTK_WINDOW(wi_top), FALSE, FALSE, TRUE); ++ gtk_window_set_resizable(GTK_WINDOW(wi_top), FALSE); + gtk_window_set_wmclass(GTK_WINDOW(wi_top), "otpCalc", "Calc"); + +- gtk_signal_connect(GTK_OBJECT(wi_top), "delete_event", +- GTK_SIGNAL_FUNC(gtk_main_quit), NULL); ++ g_signal_connect(G_OBJECT(wi_top), "delete_event", ++ G_CALLBACK(gtk_main_quit), NULL); + +- gtk_signal_connect(GTK_OBJECT(wi_top), "focus_in_event", +- GTK_SIGNAL_FUNC(focus), NULL); ++ g_signal_connect(G_OBJECT(wi_top), "focus_in_event", ++ G_CALLBACK(focus), NULL); + +- gtk_signal_connect(GTK_OBJECT(wi_top), "selection_received", +- GTK_SIGNAL_FUNC(selector), NULL); ++ g_signal_connect(G_OBJECT(wi_top), "selection_received", ++ G_CALLBACK(selector), NULL); + /* Done. */ + + +@@ -82,9 +82,9 @@ + /* Setup the file menu... */ + me_file = gtk_menu_new(); + mi_file_quit = gtk_menu_item_new_with_label("Quit"); +- gtk_menu_append(GTK_MENU(me_file), mi_file_quit); +- gtk_signal_connect_object(GTK_OBJECT(mi_file_quit), "activate", +- GTK_SIGNAL_FUNC(gtk_main_quit), NULL); ++ gtk_menu_shell_append(GTK_MENU_SHELL(me_file), mi_file_quit); ++ g_signal_connect_swapped(G_OBJECT(mi_file_quit), "activate", ++ G_CALLBACK(gtk_main_quit), NULL); + + gtk_widget_add_accelerator(mi_file_quit, "activate", accel_group, 0x071, + GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); +@@ -97,40 +97,45 @@ + me_sett = gtk_menu_new(); + + mi_sett_sha1 = gtk_radio_menu_item_new_with_label(hashes, "sha1"); +- gtk_menu_append(GTK_MENU(me_sett), mi_sett_sha1); +- gtk_signal_connect_object(GTK_OBJECT(mi_sett_sha1), "activate", +- GTK_SIGNAL_FUNC(sethash), (void *)SHA1); +- hashes = gtk_radio_menu_item_group(GTK_RADIO_MENU_ITEM(mi_sett_sha1)); ++ gtk_menu_shell_append(GTK_MENU_SHELL(me_sett), mi_sett_sha1); ++ g_signal_connect_swapped(G_OBJECT(mi_sett_sha1), "activate", ++ G_CALLBACK(sethash), (void *)SHA1); ++ hashes = gtk_radio_menu_item_get_group( ++ GTK_RADIO_MENU_ITEM(mi_sett_sha1)); + gtk_widget_show(mi_sett_sha1); + + mi_sett_rmd160 = gtk_radio_menu_item_new_with_label(hashes, "rmd160"); +- gtk_menu_append(GTK_MENU(me_sett), mi_sett_rmd160); +- gtk_signal_connect_object(GTK_OBJECT(mi_sett_rmd160), "activate", +- GTK_SIGNAL_FUNC(sethash), (void *)RMD160); +- hashes = gtk_radio_menu_item_group(GTK_RADIO_MENU_ITEM(mi_sett_rmd160)); ++ gtk_menu_shell_append(GTK_MENU_SHELL(me_sett), mi_sett_rmd160); ++ g_signal_connect_swapped(G_OBJECT(mi_sett_rmd160), "activate", ++ G_CALLBACK(sethash), (void *)RMD160); ++ hashes = gtk_radio_menu_item_get_group( ++ GTK_RADIO_MENU_ITEM(mi_sett_rmd160)); + gtk_widget_show(mi_sett_rmd160); + + mi_sett_md5 = gtk_radio_menu_item_new_with_label(hashes, "md5"); +- gtk_menu_append(GTK_MENU(me_sett), mi_sett_md5); +- gtk_signal_connect_object(GTK_OBJECT(mi_sett_md5), "activate", +- GTK_SIGNAL_FUNC(sethash), (void *)MD5); +- hashes = gtk_radio_menu_item_group(GTK_RADIO_MENU_ITEM(mi_sett_md5)); ++ gtk_menu_shell_append(GTK_MENU_SHELL(me_sett), mi_sett_md5); ++ g_signal_connect_swapped(G_OBJECT(mi_sett_md5), "activate", ++ G_CALLBACK(sethash), (void *)MD5); ++ hashes = gtk_radio_menu_item_get_group( ++ GTK_RADIO_MENU_ITEM(mi_sett_md5)); + gtk_widget_show(mi_sett_md5); + + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mi_sett_md5), TRUE); + + mi_sett_md4 = gtk_radio_menu_item_new_with_label(hashes, "md4"); +- gtk_menu_append(GTK_MENU(me_sett), mi_sett_md4); +- gtk_signal_connect_object(GTK_OBJECT(mi_sett_md4), "activate", +- GTK_SIGNAL_FUNC(sethash), (void *)MD4); +- hashes = gtk_radio_menu_item_group(GTK_RADIO_MENU_ITEM(mi_sett_md4)); ++ gtk_menu_shell_append(GTK_MENU_SHELL(me_sett), mi_sett_md4); ++ g_signal_connect_swapped(G_OBJECT(mi_sett_md4), "activate", ++ G_CALLBACK(sethash), (void *)MD4); ++ hashes = gtk_radio_menu_item_get_group( ++ GTK_RADIO_MENU_ITEM(mi_sett_md4)); + gtk_widget_show(mi_sett_md4); + + mi_sett_skey = gtk_radio_menu_item_new_with_label(hashes, "s/key"); +- gtk_menu_append(GTK_MENU(me_sett), mi_sett_skey); +- gtk_signal_connect_object(GTK_OBJECT(mi_sett_skey), "activate", +- GTK_SIGNAL_FUNC(sethash), (void *)SKEY); +- hashes = gtk_radio_menu_item_group(GTK_RADIO_MENU_ITEM(mi_sett_skey)); ++ gtk_menu_shell_append(GTK_MENU_SHELL(me_sett), mi_sett_skey); ++ g_signal_connect_swapped(G_OBJECT(mi_sett_skey), "activate", ++ G_CALLBACK(sethash), (void *)SKEY); ++ hashes = gtk_radio_menu_item_get_group( ++ GTK_RADIO_MENU_ITEM(mi_sett_skey)); + gtk_widget_show(mi_sett_skey); + /* Done. */ + +@@ -138,9 +143,9 @@ + /* Setup the help menu... */ + me_help = gtk_menu_new(); + mi_help_about = gtk_menu_item_new_with_label("About..."); +- gtk_menu_append(GTK_MENU(me_help), mi_help_about); +- gtk_signal_connect_object(GTK_OBJECT(mi_help_about), "activate", +- GTK_SIGNAL_FUNC(about), NULL); ++ gtk_menu_shell_append(GTK_MENU_SHELL(me_help), mi_help_about); ++ g_signal_connect_swapped(G_OBJECT(mi_help_about), "activate", ++ G_CALLBACK(about), NULL); + gtk_widget_show(mi_help_about); + /* Done. */ + +@@ -156,18 +161,18 @@ + mi_file = gtk_menu_item_new_with_label("File"); + gtk_widget_show(mi_file); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(mi_file), me_file); +- gtk_menu_bar_append(GTK_MENU_BAR(mb_top), mi_file); ++ gtk_menu_shell_append(GTK_MENU_SHELL(mb_top), mi_file); + + mi_sett = gtk_menu_item_new_with_label("Settings"); + gtk_widget_show(mi_sett); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(mi_sett), me_sett); +- gtk_menu_bar_append(GTK_MENU_BAR(mb_top), mi_sett); ++ gtk_menu_shell_append(GTK_MENU_SHELL(mb_top), mi_sett); + + mi_help = gtk_menu_item_new_with_label("Help"); + gtk_widget_show(mi_help); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(mi_help), me_help); +- gtk_menu_bar_append(GTK_MENU_BAR(mb_top), mi_help); +- gtk_menu_item_right_justify(GTK_MENU_ITEM(mi_help)); ++ gtk_menu_shell_append(GTK_MENU_SHELL(mb_top), mi_help); ++ gtk_menu_item_set_right_justified(GTK_MENU_ITEM(mi_help), TRUE); + /* Done. */ + + +@@ -208,8 +213,8 @@ + (GtkAttachOptions)(0), 5, 0); + gtk_widget_show(bu_calc); + +- gtk_signal_connect_object(GTK_OBJECT(bu_calc), "clicked", +- GTK_SIGNAL_FUNC(calculate), NULL); ++ g_signal_connect_swapped(G_OBJECT(bu_calc), "clicked", ++ G_CALLBACK(calculate), NULL); + /* Done. */ + + +@@ -221,8 +226,8 @@ + gtk_entry_set_visibility(GTK_ENTRY(te_passwd), FALSE); + gtk_widget_show(te_passwd); + +- gtk_signal_connect(GTK_OBJECT(te_passwd), "activate", +- GTK_SIGNAL_FUNC(click), bu_calc); ++ g_signal_connect(G_OBJECT(te_passwd), "activate", ++ G_CALLBACK(click), bu_calc); + /* Done. */ + + +@@ -234,8 +239,8 @@ + (GtkAttachOptions)(0), 5, 0); + gtk_widget_show(bu_clear); + +- gtk_signal_connect(GTK_OBJECT(bu_clear), "clicked", +- GTK_SIGNAL_FUNC(clear), NULL); ++ g_signal_connect(G_OBJECT(bu_clear), "clicked", ++ G_CALLBACK(clear), NULL); + /* Done. */ + + diff --git a/sys-auth/otpcalc/files/otpcalc-0.97-gtk2-gentoo.patch b/sys-auth/otpcalc/files/otpcalc-0.97-gtk2-gentoo.patch new file mode 100644 index 000000000000..f781b7372c43 --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc-0.97-gtk2-gentoo.patch @@ -0,0 +1,72 @@ +Make it work with GTK+ 2. + +--- otpCalc-0.97-orig/Makefile.in ++++ otpCalc-0.97/Makefile.in +@@ -3,8 +3,8 @@ + + CC = @CC@ + DEFS = -DVERSION=\"$(VER)\" @DEFS@ +-CFLAGS = -s -O3 -Wall -pipe `gtk-config --cflags` +-LIBS = `gtk-config --libs` @LIBS@ ++CFLAGS = -s -O3 -Wall -pipe `pkg-config --cflags gtk+-2.0` ++LIBS = `pkg-config --libs gtk+-2.0` @LIBS@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +--- otpCalc-0.97-orig/callbacks.c ++++ otpCalc-0.97/callbacks.c +@@ -236,7 +236,7 @@ + } + + +-void focus(GtkWidget *widget, gpointer data) ++gboolean focus(GtkWidget *widget, GdkEvent *event, gpointer data) + { + + static GdkAtom targets; +@@ -244,12 +244,12 @@ + + + if (!autopaste) +- return; ++ return FALSE; + + targets = gdk_atom_intern("STRING", FALSE); + + gtk_selection_convert(widget, GDK_SELECTION_PRIMARY, targets, + GDK_CURRENT_TIME); + +- ++ return FALSE; + } +--- otpCalc-0.97-orig/gui.c ++++ otpCalc-0.97/gui.c +@@ -29,7 +29,7 @@ + GtkWidget *te_response; + + unsigned short hash; +-unsigned short newline = 1; ++unsigned short newline = 0; + unsigned short autopaste = 1; + + int main(int argc, char *argv[]) +@@ -147,7 +147,7 @@ + + /* Setup the menu bar... */ + mb_top = gtk_menu_bar_new(); +- gtk_menu_bar_set_shadow_type(GTK_MENU_BAR(mb_top), GTK_SHADOW_NONE); ++ /*gtk_menu_bar_set_shadow_type(GTK_MENU_BAR(mb_top), GTK_SHADOW_NONE);*/ + gtk_table_attach(GTK_TABLE(ta_top), mb_top, 0, 3, 0, 1, + (GtkAttachOptions)(GTK_FILL), + (GtkAttachOptions)(0), 0, 0); +--- otpCalc-0.97-orig/utility.c ++++ otpCalc-0.97/utility.c +@@ -422,7 +422,7 @@ + words[extract(message, 33, 11)], + words[extract(message, 44, 11)], + words[extract(message, 55, 11)], +- (newline == 1) ? "\n" : NULL); ++ (newline == 1) ? "\n" : ""); + + return response; + diff --git a/sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch b/sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch new file mode 100644 index 000000000000..79f869ad1f7e --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch @@ -0,0 +1,53 @@ +Fix SHA1 byte-order issue for conformance with RFC 2289. + +--- otpCalc-0.97-orig/crypto.c ++++ otpCalc-0.97/crypto.c +@@ -199,6 +199,8 @@ + for (i = 0; i < 4; i++) + digest[i] ^= digest[i+16]; + +- memcpy(message, digest, 8); ++ /* Fix byte order, as required by RFC 2289 Appendix A */ ++ for (i = 0; i < 8; i++) ++ message[i] = digest[i^3]; + + } +--- otpCalc-0.97-orig/sha1.h ++++ otpCalc-0.97/sha1.h +@@ -1,3 +1,5 @@ ++#include "config.h" ++ + #ifndef i386 + typedef long int int64; + typedef unsigned long int uint64; +@@ -28,7 +30,7 @@ + + #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +-#ifdef WORDS_BIGENDIAN ++#ifndef WORDS_BIGENDIAN + #define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ + |(rol(block->l[i],8)&0x00FF00FF)) + #else +--- otpCalc-0.97-orig/otpCalc.man ++++ otpCalc-0.97/otpCalc.man +@@ -47,9 +47,6 @@ + RFC 2289, RFC 1740 + .SH "AUTHOR" + Anthony D. Urso <anthonyu@killa.net>. +-.SH "BUGS" +-SHA1 output differs from RFC2289; however, the output is consistant with +-other implementations. + .SH "COPYRIGHT" + Copyright \(co 2001 Anthony D. Urso. + .br +--- otpCalc-0.97-orig/BUGS ++++ otpCalc-0.97/BUGS +@@ -16,3 +16,7 @@ + + Thanks, + Anthony ++ ++Note: Above-mentioned SHA1 issue is fixed in the Gentoo version. ++The output now agrees with RFC 2289 and with S/Key. ++ - Ulrich Mueller <ulm@gentoo.org> diff --git a/sys-auth/otpcalc/files/otpcalc-0.97-skey-md5.patch b/sys-auth/otpcalc/files/otpcalc-0.97-skey-md5.patch new file mode 100644 index 000000000000..39ab2675b210 --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc-0.97-skey-md5.patch @@ -0,0 +1,24 @@ +Change default s/key hash to MD5 (same as sys-auth/skey). + +--- otpCalc-0.97-orig/callbacks.c ++++ otpCalc-0.97/callbacks.c +@@ -90,7 +90,7 @@ + unsigned char results[9]; + + +- hashes[SKEY] = md4lite; ++ hashes[SKEY] = md5lite; + hashes[MD4] = md4lite; + hashes[MD5] = md5lite; + hashes[RMD160] = rmd160lite; +--- otpCalc-0.97-orig/otpCalc.man ++++ otpCalc-0.97/otpCalc.man +@@ -30,7 +30,7 @@ + cb l + cb l + cb l. +-s/key#MD4 ++s/key#MD5 + otp-md4#MD4 + otp-md5#MD5 + otp-rmd160#RIPEMD-160 diff --git a/sys-auth/otpcalc/files/otpcalc-crypto-proto.diff b/sys-auth/otpcalc/files/otpcalc-crypto-proto.diff new file mode 100644 index 000000000000..05ba89fc1fe4 --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc-crypto-proto.diff @@ -0,0 +1,13 @@ +Correct crypto prototypes, bug 123993. + +--- otpCalc-0.97.orig/crypto.h ++++ otpCalc-0.97/crypto.h +@@ -1,4 +1,4 @@ +-void md4lite(char *, size_t); +-void md5lite(char *, size_t); +-void rmd160lite(char *, size_t); +-void sha1lite(char *, size_t); ++void md4lite(char *message, unsigned int len); ++void md5lite(char *message, unsigned int len); ++void rmd160lite(char *message, unsigned int len); ++void sha1lite(char *message, unsigned int len); diff --git a/sys-auth/otpcalc/files/otpcalc-man-table-format.diff b/sys-auth/otpcalc/files/otpcalc-man-table-format.diff new file mode 100644 index 000000000000..bbd767ef215a --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc-man-table-format.diff @@ -0,0 +1,35 @@ +Make missing list appear in man page, bug 90900. + +--- otpCalc.man.orig ++++ otpCalc.man +@@ -24,18 +24,20 @@ + the Challenge input: + .IP + .TS +-s/key MD4 +-.br +-otp-md4 MD4 +-.br +-otp-md5 MD5 +-.br +-otp-rmd160 RIPEMD-160 +-.br +-otp-sha1 SHA1 +-.br ++allbox tab(#); ++cb l ++cb l ++cb l ++cb l ++cb l. ++s/key#MD4 ++otp-md4#MD4 ++otp-md5#MD5 ++otp-rmd160#RIPEMD-160 ++otp-sha1#SHA1 + .TE + .LP ++.LP + In the absence of a prefix, the default hash, specified in the Settings menu, + is used. + .SH "SEE ALSO" diff --git a/sys-auth/otpcalc/files/otpcalc.desktop b/sys-auth/otpcalc/files/otpcalc.desktop new file mode 100644 index 000000000000..25c84065238f --- /dev/null +++ b/sys-auth/otpcalc/files/otpcalc.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=otpCalc +Comment=One Time Password and S/Key calculator +Icon=dialog-password +Exec=otpCalc +Categories=Utility;GTK;System;Security; diff --git a/sys-auth/otpcalc/metadata.xml b/sys-auth/otpcalc/metadata.xml new file mode 100644 index 000000000000..16b496842e5c --- /dev/null +++ b/sys-auth/otpcalc/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>ulm@gentoo.org</email> +</maintainer> +<longdescription lang="en"> + otpCalc is an RFC2289 and RFC1760 compliant one time password calculator, + written to use the GTK+ library for screen I/O. +</longdescription> +</pkgmetadata> diff --git a/sys-auth/otpcalc/otpcalc-0.97-r6.ebuild b/sys-auth/otpcalc/otpcalc-0.97-r6.ebuild new file mode 100644 index 000000000000..7820ae85e2f3 --- /dev/null +++ b/sys-auth/otpcalc/otpcalc-0.97-r6.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="A One Time Password and S/Key calculator for X" +HOMEPAGE="http://killa.net/infosec/otpCalc/" +SRC_URI="http://killa.net/infosec/otpCalc/otpCalc-${PV}.tar.gz" + +LICENSE="GPL-2+" # bundled crypto functions are not used +SLOT="0" +KEYWORDS="alpha amd64 ppc sparc x86" +IUSE="" + +RDEPEND="x11-libs/gtk+:2 + dev-libs/openssl" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/otpCalc-${PV}" + +src_prepare() { + epatch \ + "${FILESDIR}/${PN}-man-table-format.diff" \ + "${FILESDIR}/${P}-badindex.diff" \ + "${FILESDIR}/${PN}-crypto-proto.diff" \ + "${FILESDIR}/${P}-gtk2-gentoo.patch" \ + "${FILESDIR}/${P}-skey-md5.patch" \ + "${FILESDIR}/${P}-sha1-byteorder.patch" \ + "${FILESDIR}/${P}-gtk-deprecated.patch" + + # print correct version in manpage + sed -i -e "s/VERSION/${PV}/g" otpCalc.man || die + + # override hardcoded FLAGS + sed -i \ + -e 's:$(CC) $(CFLAGS) $^:$(CC) $(LDFLAGS) $(CFLAGS) $^:' \ + -e "s#-s -O3#${CFLAGS}#g" \ + Makefile.in || die + + tc-export CC +} + +src_install() { + dobin otpCalc + dosym otpCalc /usr/bin/otpcalc + newman otpCalc.man otpCalc.1 + newman - otpcalc.1 <<<".so man1/otpCalc.1" + domenu "${FILESDIR}/${PN}.desktop" + dodoc BUGS ChangeLog TODO +} |