From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-misc/pwsafe/Manifest | 8 ++ .../files/pwsafe-0.2.0-XChangeProperty.patch | 22 +++++ app-misc/pwsafe/files/pwsafe-0.2.0-cvs-1.57.patch | 48 +++++++++ .../pwsafe/files/pwsafe-0.2.0-fake-readline.patch | 107 +++++++++++++++++++++ .../pwsafe-0.2.0-man-page-option-syntax.patch | 30 ++++++ app-misc/pwsafe/files/pwsafe-0.2.0-printf.patch | 43 +++++++++ app-misc/pwsafe/metadata.xml | 26 +++++ app-misc/pwsafe/pwsafe-0.2.0-r4.ebuild | 43 +++++++++ 8 files changed, 327 insertions(+) create mode 100644 app-misc/pwsafe/Manifest create mode 100644 app-misc/pwsafe/files/pwsafe-0.2.0-XChangeProperty.patch create mode 100644 app-misc/pwsafe/files/pwsafe-0.2.0-cvs-1.57.patch create mode 100644 app-misc/pwsafe/files/pwsafe-0.2.0-fake-readline.patch create mode 100644 app-misc/pwsafe/files/pwsafe-0.2.0-man-page-option-syntax.patch create mode 100644 app-misc/pwsafe/files/pwsafe-0.2.0-printf.patch create mode 100644 app-misc/pwsafe/metadata.xml create mode 100644 app-misc/pwsafe/pwsafe-0.2.0-r4.ebuild (limited to 'app-misc/pwsafe') diff --git a/app-misc/pwsafe/Manifest b/app-misc/pwsafe/Manifest new file mode 100644 index 000000000000..a397e25836a8 --- /dev/null +++ b/app-misc/pwsafe/Manifest @@ -0,0 +1,8 @@ +AUX pwsafe-0.2.0-XChangeProperty.patch 1613 BLAKE2B 1a9ed912fe1581f7ed2006595801a881a5f9553319e73723d24203cecacab47ce76f5f661f03e73bd5066bd14ce78b38ea32a9dfdc080f75e506b32cf6558c70 SHA512 90329b172f6f1f9909c95c0cb648bb845c35e40ea78acf3d34c6ddfc1fae427694a5e0c2fa58de6a6614f432a81cdffe5b29e3a6211cae36924310ffc8b19680 +AUX pwsafe-0.2.0-cvs-1.57.patch 1100 BLAKE2B 66038b0d11f061509a3a6300837f72bec77de84d014e1b15b5b0cd6ea9d7dde0fe446276f5fad876ee53dcf48421f43cb7717f4a5179d171273f36cbecf03426 SHA512 3772c833b16b29c5119f11a7c106e4a7b2d4d3f8cf17d42c78f5403cd5ae92136dadc16c5cfcf961822db4c76f04946412637547173a26227761f74d83765330 +AUX pwsafe-0.2.0-fake-readline.patch 2667 BLAKE2B 297032d651ae485796fd4a213182416de6a6503816d9631b2d372efb2e0e81fe4c1e9371746a8e9cb050834884513a2892dafa730bd1ac599fcce1712358ad58 SHA512 466686d56662728c7c4d208ff69212daa84a86b746a9b4e52d48b2c7789d83fc1ad98673a8979a6f750c8215a0199e5580b5eb152b29e13761b1254eab30778e +AUX pwsafe-0.2.0-man-page-option-syntax.patch 848 BLAKE2B d05bca68e0d8d224c059b4b949bf5fd590eede9840dafb03e6df37cd961d867db9bd5cb3be15fb804961fd51d2ba6196d035ab18622a4d19e0f6882b9d980856 SHA512 17697927e64e5bcdbc68343775732e1559dd7fe5c000b15fda9af7229f3c2c36bbd4ee3af3c652da9e8d0550acd1b5bb39a75891f5f40c37640ea089a5b6306e +AUX pwsafe-0.2.0-printf.patch 1868 BLAKE2B 85ca5b70068dc50f6f650d766cf381dd2013640b45db0628df7137c5694a18783932e0effcb86f60b27a84aaedb77c25c86c281f4d05b357cea72961340a64be SHA512 7567e666f7dfb9c798aa2e6368ea1abf72f749c953da42bff7ef1b61aea6bf2faca96ef702ef9f7a9ceeece90999c066763006e549c5f2ec365cbf9358547449 +DIST pwsafe-0.2.0.tar.gz 127433 BLAKE2B abfcf36e3fc685100302b4dc7862cc8d8335e5dade40943cb0b7ef17b83dd2b75c36e3069d6bf759ba907e46adf20f3712af5223a8d8a586ae57e98ff6c0a3db SHA512 e8d3684f523f83def6317ef5561a02d1493685cfbda18707644bf335b7f45b1a548aae17a735838d9f6df345ddb17934607162a6e99348df625b34a9ad5f4cf3 +EBUILD pwsafe-0.2.0-r4.ebuild 1017 BLAKE2B 8ab2711772f5f83105c7456a19f829a2cec02d077a9fe890df142d580ebc9ad9dfc914b9fc0cd40c4e1803fa8ae55aa1d9899d2d163f68c28dc5be60b37bc840 SHA512 3a58950a8f72c0696cdee221c63b75536bde0f5095b609dd260442ef204675ee7f673ce4d7e2d94a40c1094ef34039d141126f402c952274a36672e28acd657f +MISC metadata.xml 868 BLAKE2B 4d255755c7ef0e69a916ec6bcac744805885da500e04cbc25822967abe5737379d5c4d46877fbdbfd4c0c166618a2c9a0237c3d7e8e595d1fc9b86e6a3a91bba SHA512 65c7ff9d5db3d2b16f5430344f944e042b27401be87183d7c6b761d95adefc5dee11dbf2d734675686cba48172276c3c70c7fd1f2c7d7d54303bc838a0817577 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 . + +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(&targets), sizeof(targets)/sizeof(targets[0])); ++ XChangeProperty(xdisplay, xev.xselectionrequest.requestor, prop, XA_ATOM, 32, PropModeReplace, reinterpret_cast(&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(×tamp), 1); ++ XChangeProperty(xdisplay, xev.xselectionrequest.requestor, prop, XA_INTEGER, 32, PropModeReplace, reinterpret_cast(×tamp), 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(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(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(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(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(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(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(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(e.extras.size())); + } + } else + // just print out the name diff --git a/app-misc/pwsafe/metadata.xml b/app-misc/pwsafe/metadata.xml new file mode 100644 index 000000000000..7eaa453dfe23 --- /dev/null +++ b/app-misc/pwsafe/metadata.xml @@ -0,0 +1,26 @@ + + + + + chead@chead.ca + Christopher Head + + + proxy-maint@gentoo.org + Proxy Maintainers + + + pwsafe is a commandline password database utility compatible with + Counterpane's Password Safe. It is compatible with Counterpane Password + Safe 1.9.x and 2.0 databases. It can interact with X11 selection and + clipboard. + + + + ndade@nsd.dyndns.org + Nicolas Dade + + pwsafe + nsd20463/pwsafe + + diff --git a/app-misc/pwsafe/pwsafe-0.2.0-r4.ebuild b/app-misc/pwsafe/pwsafe-0.2.0-r4.ebuild new file mode 100644 index 000000000000..cd66440a6669 --- /dev/null +++ b/app-misc/pwsafe/pwsafe-0.2.0-r4.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A Password Safe compatible command-line password manager" +HOMEPAGE="http://nsd.dyndns.org/pwsafe/" +SRC_URI="http://nsd.dyndns.org/pwsafe/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="X libressl readline" + +DEPEND="sys-libs/ncurses:0= + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + readline? ( sys-libs/readline:0= ) + X? ( x11-libs/libSM + x11-libs/libICE + x11-libs/libXmu + x11-libs/libX11 )" +RDEPEND="${DEPEND}" + +src_prepare() { + eapply -p0 "${FILESDIR}/${P}-cvs-1.57.patch" + eapply -p0 "${FILESDIR}/${P}-printf.patch" + eapply -p0 "${FILESDIR}/${P}-fake-readline.patch" + eapply -p0 "${FILESDIR}/${P}-man-page-option-syntax.patch" + eapply -p0 "${FILESDIR}/${P}-XChangeProperty.patch" + eapply_user +} + +src_configure() { + econf $(use_with X x) $(use_with readline) +} + +src_install() { + doman pwsafe.1 + dobin pwsafe + dodoc README NEWS +} -- cgit v1.2.3