summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-misc/pwsafe/files
downloadgentoo-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 'app-misc/pwsafe/files')
-rw-r--r--app-misc/pwsafe/files/pwsafe-0.2.0-XChangeProperty.patch22
-rw-r--r--app-misc/pwsafe/files/pwsafe-0.2.0-cvs-1.57.patch48
-rw-r--r--app-misc/pwsafe/files/pwsafe-0.2.0-fake-readline.patch107
-rw-r--r--app-misc/pwsafe/files/pwsafe-0.2.0-man-page-option-syntax.patch30
-rw-r--r--app-misc/pwsafe/files/pwsafe-0.2.0-printf.patch43
5 files changed, 250 insertions, 0 deletions
diff --git a/app-misc/pwsafe/files/pwsafe-0.2.0-XChangeProperty.patch b/app-misc/pwsafe/files/pwsafe-0.2.0-XChangeProperty.patch
new file mode 100644
index 000000000000..3fadfc2765fb
--- /dev/null
+++ b/app-misc/pwsafe/files/pwsafe-0.2.0-XChangeProperty.patch
@@ -0,0 +1,22 @@
+This patch came from <https://bugzilla.redhat.com/show_bug.cgi?id=667541>.
+
+Index: pwsafe.cpp
+===================================================================
+RCS file: /cvsroot/pwsafe/pwsafe/pwsafe.cpp,v
+retrieving revision 1.57
+diff -u -r1.57 pwsafe.cpp
+--- pwsafe.cpp 12 Aug 2007 12:33:06 -0000 1.57
++++ pwsafe.cpp 5 Jan 2011 22:16:43 -0000
+@@ -1820,10 +1820,10 @@
+ if (xev.xselectionrequest.target == XA_TARGETS(xdisplay)) {
+ // tell them what we can supply
+ const Atom targets[] = { XA_TARGETS(xdisplay), XA_TIMESTAMP(xdisplay), XA_TEXT(xdisplay), XA_STRING };
+- XChangeProperty(xdisplay, xev.xselectionrequest.requestor, prop, XA_TARGETS(xdisplay), 32, PropModeReplace, reinterpret_cast<const unsigned char*>(&targets), sizeof(targets)/sizeof(targets[0]));
++ XChangeProperty(xdisplay, xev.xselectionrequest.requestor, prop, XA_ATOM, 32, PropModeReplace, reinterpret_cast<const unsigned char*>(&targets), sizeof(targets)/sizeof(targets[0]));
+ }
+ else if (xev.xselectionrequest.target == XA_TIMESTAMP(xdisplay)) {
+- XChangeProperty(xdisplay, xev.xselectionrequest.requestor, prop, XA_TIMESTAMP(xdisplay), 32, PropModeReplace, reinterpret_cast<const unsigned char*>(&timestamp), 1);
++ XChangeProperty(xdisplay, xev.xselectionrequest.requestor, prop, XA_INTEGER, 32, PropModeReplace, reinterpret_cast<const unsigned char*>(&timestamp), 1);
+ }
+ else if (xev.xselectionrequest.target == XA_TEXT(xdisplay) ||
+ xev.xselectionrequest.target == XA_STRING) {
diff --git a/app-misc/pwsafe/files/pwsafe-0.2.0-cvs-1.57.patch b/app-misc/pwsafe/files/pwsafe-0.2.0-cvs-1.57.patch
new file mode 100644
index 000000000000..7f62eb59d429
--- /dev/null
+++ b/app-misc/pwsafe/files/pwsafe-0.2.0-cvs-1.57.patch
@@ -0,0 +1,48 @@
+Index: pwsafe.cpp
+===================================================================
+RCS file: /cvsroot/pwsafe/pwsafe/pwsafe.cpp,v
+retrieving revision 1.56
+retrieving revision 1.57
+diff -u -r1.56 -r1.57
+--- pwsafe.cpp 30 Sep 2005 10:30:56 -0000 1.56
++++ pwsafe.cpp 12 Aug 2007 12:33:06 -0000 1.57
+@@ -3346,6 +3346,12 @@
+ }
+
+ bufpos += rc;
++ buf[bufpos] = '\0';
++
++ if (rc == 0) {
++ // EOF (ctrl-D)
++ break;
++ }
+
+ if (bufpos == buflen && !strchr(buf,'\n')) {
+ // we needed a bigger buffer
+@@ -3354,6 +3360,7 @@
+ fprintf(stderr, "Error: %s out of memory\n", program_name);
+ memset(buf,0,buflen);
+ free(buf);
++ throw FailEx();
+ }
+
+ memcpy(new_buf, buf, bufpos);
+@@ -3364,9 +3371,15 @@
+ }
+ }
+
+- int len = strchr(buf,'\n') - buf;
+- saved.assign(buf+len+1, bufpos-(len+1));
+- buf[len] = '\0';
++ char* lf = strchr(buf,'\n');
++ if (lf) {
++ // save the rest of the input for later
++ saved.assign(lf+1);
++ *lf = '\0';
++ } else {
++ saved.assign("",0);
++ }
++
+ return buf;
+ }
+ #endif // WITH_READLINE
diff --git a/app-misc/pwsafe/files/pwsafe-0.2.0-fake-readline.patch b/app-misc/pwsafe/files/pwsafe-0.2.0-fake-readline.patch
new file mode 100644
index 000000000000..4e0f4ad4dfd6
--- /dev/null
+++ b/app-misc/pwsafe/files/pwsafe-0.2.0-fake-readline.patch
@@ -0,0 +1,107 @@
+Index: pwsafe.cpp
+===================================================================
+RCS file: /cvsroot/pwsafe/pwsafe/pwsafe.cpp,v
+retrieving revision 1.57
+diff -u -r1.57 pwsafe.cpp
+--- pwsafe.cpp 12 Aug 2007 12:33:06 -0000 1.57
++++ pwsafe.cpp 30 Mar 2011 07:22:11 -0000
+@@ -3325,61 +3325,48 @@
+ static char* readline(const char* prompt) {
+ printf("%s", prompt);
+ fflush(stdout);
+-
+- static secstring saved;
+- int buflen = saved.length() + 100;
+- int bufpos = saved.length();
+- char* buf = reinterpret_cast<char*>(malloc(buflen+1));
+- if (!buf)
+- throw FailEx();
+- memcpy(buf, saved.data(), saved.length());
+- buf[saved.length()] = '\0';
+-
+- while (!strchr(buf,'\n')) {
+- const int rc = ::read(STDIN_FILENO, buf+bufpos, buflen);
+-
+- if (rc == -1) {
+- fprintf(stderr, "Error: %s read(STDIN) failed: %s\n", program_name, strerror(errno));
+- memset(buf,0,buflen);
+- free(buf);
+- throw FailEx();
+- }
+-
+- bufpos += rc;
+- buf[bufpos] = '\0';
+-
+- if (rc == 0) {
+- // EOF (ctrl-D)
+- break;
+- }
+-
+- if (bufpos == buflen && !strchr(buf,'\n')) {
+- // we needed a bigger buffer
+- char* new_buf = reinterpret_cast<char*>(malloc(2*buflen+1));
+- if (!new_buf) {
+- fprintf(stderr, "Error: %s out of memory\n", program_name);
+- memset(buf,0,buflen);
+- free(buf);
+- throw FailEx();
+- }
+
+- memcpy(new_buf, buf, bufpos);
+- memset(buf, 0, buflen);
+- free(buf);
+- buf = new_buf;
+- buflen *= 2;
+- }
+- }
++ size_t buflen = 100;
++ size_t bufpos = 0;
++ char* buf = static_cast<char*>(malloc(buflen+1));
++ if (!buf)
++ throw FailEx();
+
+- char* lf = strchr(buf,'\n');
+- if (lf) {
+- // save the rest of the input for later
+- saved.assign(lf+1);
+- *lf = '\0';
+- } else {
+- saved.assign("",0);
++ for (;;) {
++ const ssize_t rc = ::read(STDIN_FILENO, buf+bufpos, 1);
++ if (rc == -1) {
++ fprintf(stderr, "Error: %s read(STDIN) failed: %s\n", program_name, strerror(errno));
++ memset(buf,0,bufpos);
++ free(buf);
++ throw FailEx();
++ } else if (rc == 0) {
++ // EOF (ctrl-D)
++ break;
++ } else if (buf[bufpos] == '\n') {
++ // end of line
++ break;
++ }
++
++ ++bufpos;
++
++ if (bufpos == buflen) {
++ // we need a bigger buffer
++ char* new_buf = static_cast<char*>(malloc(2*buflen+1));
++ if (!new_buf) {
++ fprintf(stderr, "Error: %s out of memory\n", program_name);
++ memset(buf,0,bufpos);
++ free(buf);
++ throw FailEx();
++ }
++ memcpy(new_buf, buf, bufpos);
++ memset(buf, 0, bufpos);
++ free(buf);
++ buf = new_buf;
++ buflen *= 2;
++ }
+ }
+
++ buf[bufpos] = '\0';
+ return buf;
+ }
+ #endif // WITH_READLINE
diff --git a/app-misc/pwsafe/files/pwsafe-0.2.0-man-page-option-syntax.patch b/app-misc/pwsafe/files/pwsafe-0.2.0-man-page-option-syntax.patch
new file mode 100644
index 000000000000..a83d3a83d8eb
--- /dev/null
+++ b/app-misc/pwsafe/files/pwsafe-0.2.0-man-page-option-syntax.patch
@@ -0,0 +1,30 @@
+Index: pwsafe.1.in
+===================================================================
+RCS file: /cvsroot/pwsafe/pwsafe/pwsafe.1.in,v
+retrieving revision 1.8
+diff -u -r1.8 pwsafe.1.in
+--- pwsafe.1.in 18 Mar 2006 14:17:41 -0000 1.8
++++ pwsafe.1.in 30 Mar 2011 07:42:23 -0000
+@@ -52,18 +52,18 @@
+ .B \-\-passwd
+ Change the database's passphrase.
+ .TP
+-.B \-\-list[=REGEX]
++.B \-\-list [REGEX]
+ List all [matching] entries in database.
+ .BR
+ If \-u or \-p is given then REGEX must match only one entry, and only the requested field(s) are emitted.
+ .TP
+-.B \-a, \-\-add[=NAME]
++.B \-a, \-\-add [NAME]
+ Add an entry to database.
+ .TP
+-.B \-e, \-\-edit=REGEX
++.B \-e, \-\-edit REGEX
+ Edit an entry.
+ .TP
+-.B \-\-delete=NAME
++.B \-\-delete NAME
+ Delete an entry from database.
+ .TP
+ If no command is given, an interactive mode is entered.
diff --git a/app-misc/pwsafe/files/pwsafe-0.2.0-printf.patch b/app-misc/pwsafe/files/pwsafe-0.2.0-printf.patch
new file mode 100644
index 000000000000..409f3a7220ed
--- /dev/null
+++ b/app-misc/pwsafe/files/pwsafe-0.2.0-printf.patch
@@ -0,0 +1,43 @@
+Index: pwsafe.cpp
+===================================================================
+RCS file: /cvsroot/pwsafe/pwsafe/pwsafe.cpp,v
+retrieving revision 1.57
+diff -u -r1.57 pwsafe.cpp
+--- pwsafe.cpp 12 Aug 2007 12:33:06 -0000 1.57
++++ pwsafe.cpp 30 Mar 2011 05:44:07 -0000
+@@ -1619,7 +1619,7 @@
+ snprintf(ent_buf, sizeof(ent_buf), "%d", entropy_needed);
+ ent_buf[sizeof(ent_buf)-1] = '\0';
+ char len_buf[24];
+- snprintf(len_buf, sizeof(len_buf), "%d", pw.length());
++ snprintf(len_buf, sizeof(len_buf), "%lu", static_cast<unsigned long>(pw.length()));
+ len_buf[sizeof(len_buf)-1] = '\0';
+ switch (tolower(get1char("Use "+pw+"\ntype "+type_name+", length "+len_buf+", "+ent_buf+" bits of entropy [y/N/ /+/-/q/?] ? ", 'n'))) {
+ case 'y':
+@@ -2380,7 +2380,7 @@
+ version = VERSION_1_7;
+ }
+
+- if (arg_verbose > 1) printf("read in %u entries\n", entries.size());
++ if (arg_verbose > 1) printf("read in %lu entries\n", static_cast<unsigned long>(entries.size()));
+
+ opened = true;
+ return true;
+@@ -2601,7 +2601,7 @@
+ for (matches_t::const_iterator i=matches.begin(); i!=matches.end() && count < 3; ++i, ++count)
+ printf("%s%s", (count?", ":""), (*i)->groupname().c_str());
+ if (count != matches.size())
+- printf(", ... (%u more) ", matches.size()-3);
++ printf(", ... (%lu more) ", static_cast<unsigned long>(matches.size()-3));
+ printf(".\n");
+ throw FailEx();
+ }
+@@ -2637,7 +2637,7 @@
+ // print out the UUID too
+ fprintf(outfile, "%s\n", formatuuid(e.uuid).c_str());
+ if (!e.extras.empty())
+- fprintf(outfile, "and %u unknown extra fields\n", e.extras.size());
++ fprintf(outfile, "and %lu unknown extra fields\n", static_cast<unsigned long>(e.extras.size()));
+ }
+ } else
+ // just print out the name