<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">How about just doing something like `EDITOR=magic.sh pass edit`, where<br>
magic.sh is a shell script that uses sed(1) to modify the password?<br></blockquote><div><br></div><div>Worked. Pushed.</div><div><br></div><div>Von</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 19, 2014 at 2:13 PM, Von Welch <span dir="ltr"><<a href="mailto:von@vwelch.com" target="_blank">von@vwelch.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
Hi Lukas,</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sat, Apr 19, 2014 at 1:52 PM, Lukas Fleischer <span dir="ltr"><<a href="mailto:info@cryptocrack.de" target="_blank">info@cryptocrack.de</a>></span> wrote:<div class="">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>> 2) "Building" pass. I figured out I really needed a version of the pass<br>
</div><div>> script to test with that has the platform-specific stuff replaced.<br>> Currently 'make install' is the only way to create a fully-functional pass<br>> script, but I don't want to require installation for testing. Hence in my<br>
> branch I split the 'make install' process into 'make' which creates the<br>> platform-specific script and 'make install' which installs it. This lets<br>> you run 'make && make tests' without an install (actually 'make tests' will<br>
> do a 'make' if needed, but you get the idea.) Sound reasonable?<br>><br><br></div>Sounds good to me. However, the current Makefile adds a reference to<br>"/usr/lib/<a href="http://password-store.platform.sh/" target="_blank">password-store.platform.sh</a>" (shouldn't that rather be<br>
"/usr/lib/password-store/platform.sh"?) to the shell script. So simply<br>splitting the Makefile target won't work.<br></blockquote><div><br></div></div><div>You are right. It's only working for me because I previously installed pass. (I would assume you are also right about the typo.)</div>
<div class="">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">What I suggest is:<br><br>* Rename password-store.sh to <a href="http://password-store.sh.in/" target="_blank">password-store.sh.in</a>.<br>
<br>* Use m4 (or some other tool) to inline the correct platform-specific<br> code into <a href="http://password-store.sh.in/" target="_blank">password-store.sh.in</a> and save the modified file as<br> password-store.sh when running `make`.<br>
<br>* Just install(1) the files when running `make install`.<br></blockquote><div><br></div></div><div>Sounds reasonable to me.</div><div><br></div><div>I think what I have is good enough to let me test and I'll see if someone else wants to take on rebuilding the make system.</div>
<div class="">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>> 3) 'pass insert' requires interactivity. It insists on asking for the<br>
> password twice even if stdin is not a terminal (a pipe). We'll either need<br>> to change that behavior, find some clever way of working around it for<br>> testing, or just decide it's not part of the test suite.<br>
><br><br></div>What about `echo $secret | pass insert -e $pw`? Doesn't that work?<br></blockquote><div><br></div></div><div>Ah, I missed '-e' turns off confirmation.</div><div><br></div><div>Hmm, it does work, but for some reason returns a non-zero exit status. Some minor bug I assume.</div>
<div class="">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>> 4) Going further with regards to interactivity, I have no idea how to test<br>
> 'pass edit' at this point. I guess one could create a vimscript or<br>> something similar to simulate a user typing? Or just not worry about it for<br>> the test suite.<br>><br><br></div>How about just doing something like `EDITOR=magic.sh pass edit`, where<br>
magic.sh is a shell script that uses sed(1) to modify the password?<br></blockquote><div><br></div></div><div>Good idea. I'll give it a try.</div><div><br></div><div>Thanks,</div><div><br>Von</div><div><br></div><div>
</div>
</div><div><div class="h5"><div class="gmail_quote">On Sat, Apr 19, 2014 at 1:52 PM, Lukas Fleischer <span dir="ltr"><<a href="mailto:info@cryptocrack.de" target="_blank">info@cryptocrack.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>On Sat, 19 Apr 2014 at 18:56:34, Von Welch wrote:<br>
> Jason, all,<br>
><br>
> I've added a few more tests, enough to to find a few more issues. I'm going<br>
> to pause at this point and wait for feedback to see if we agree this is the<br>
> right path before doing more. The basic approach seems solid to me with a<br>
> few small issues/questions to resolve:<br>
><br>
> 1) Unencrypted GPG key vs GPG-agent. Except for some weirdness with 'pass<br>
> init' with an unencrypted gpg key and a closed stdin, an unencrypted key<br>
> seems to work well. It seems simpler than getting a gpg-agent running.<br>
> Acceptable or do we really want to use an agent for testing?<br>
><br>
<br>
</div>I would say it is fine to use an unencrypted key -- at least for the<br>
very basic tests.<br>
<div><br>
> 2) "Building" pass. I figured out I really needed a version of the pass<br>
> script to test with that has the platform-specific stuff replaced.<br>
> Currently 'make install' is the only way to create a fully-functional pass<br>
> script, but I don't want to require installation for testing. Hence in my<br>
> branch I split the 'make install' process into 'make' which creates the<br>
> platform-specific script and 'make install' which installs it. This lets<br>
> you run 'make && make tests' without an install (actually 'make tests' will<br>
> do a 'make' if needed, but you get the idea.) Sound reasonable?<br>
><br>
<br>
</div>Sounds good to me. However, the current Makefile adds a reference to<br>
"/usr/lib/<a href="http://password-store.platform.sh" target="_blank">password-store.platform.sh</a>" (shouldn't that rather be<br>
"/usr/lib/password-store/platform.sh"?) to the shell script. So simply<br>
splitting the Makefile target won't work.<br>
<br>
What I suggest is:<br>
<br>
* Rename password-store.sh to <a href="http://password-store.sh.in" target="_blank">password-store.sh.in</a>.<br>
<br>
* Use m4 (or some other tool) to inline the correct platform-specific<br>
code into <a href="http://password-store.sh.in" target="_blank">password-store.sh.in</a> and save the modified file as<br>
password-store.sh when running `make`.<br>
<br>
* Just install(1) the files when running `make install`.<br>
<div><br>
> 3) 'pass insert' requires interactivity. It insists on asking for the<br>
> password twice even if stdin is not a terminal (a pipe). We'll either need<br>
> to change that behavior, find some clever way of working around it for<br>
> testing, or just decide it's not part of the test suite.<br>
><br>
<br>
</div>What about `echo $secret | pass insert -e $pw`? Doesn't that work?<br>
<div><br>
> 4) Going further with regards to interactivity, I have no idea how to test<br>
> 'pass edit' at this point. I guess one could create a vimscript or<br>
> something similar to simulate a user typing? Or just not worry about it for<br>
> the test suite.<br>
><br>
<br>
</div>How about just doing something like `EDITOR=magic.sh pass edit`, where<br>
magic.sh is a shell script that uses sed(1) to modify the password?<br>
<br>
> Von<br>
> [...]<br>
</blockquote></div><br></div></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>
</blockquote></div><br></div></div>