mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1740] Document our CircleCI setup, and give access to other folks #1151
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1151
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kholia on GitHub (Sep 9, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1740
Originally assigned to: @kholia on GitHub.
Our CircleCI setup is a bit tricky to get working. I would like to ensure that the CircleCI build system is documented, and you all have access to the following parts,
@jfoug commented on GitHub (Sep 9, 2015):
I see the changes, and see that it works.
Do you know just 'what' step was causing the error failure? If we were to make a specific version that was build in a manner which a test was SUPPOSED to fail (say ONLY on a 32 bit non-SIMD build make valid always return false), would that version run and cause CircleCI to have a 'green light'. If not, then the testing is pretty much worthless.
Also, is there any way we can externally send files to this 'small website' ? I have a CI-like system running on a home server right now. I am simply uploading builds to a sftp server. I have not 'published' the location of it yet, since it's not really 'super' useful. But if I could provide the upload data to that site, then I could have 'near realtime' and WORKING win64/win32 which we could then use as out bleeding pre-built windows binary files.
I will look your documentation over, once it is done.
@kholia commented on GitHub (Sep 9, 2015):
There were multiple problems.
...
I have only disabled testing of the Wine (Win64) builds. Rest of the builds (32-bit SSE2, 32-bit NON-SIMD, and NON-SIMD) still have the
if [ "x$?" != "x0" ] ; then exit 1 ; fiintact. So, the CircleCI build will fail (it will not have a 'green light') if any of the remaining 3 builds fail testing. Hence, I am not very worried :-)The 'small website' is running https://github.com/kholia/daily-builds/blob/master/main.py code. I don't think that we could realistically upload builds to this website. This website is running in "Google App Engine", and using more resources will cost money (I don't actually know if all this is true).
The whole point of this website is to expose the URL of the builds, which themselves reside on the CircleCI servers. The CircleCI doesn't have a way to determine / expose this URL at the moment (I have already requested them for such a feature). The code of the 'small website' is pretty simple (and will do a better job of explaining it's own purpose) :)
@jfoug commented on GitHub (Sep 9, 2015):
This would be just fine. I could host the files, and if we can modify this python script (which simply sounds like a DNS server to me), to the proper url on my box, then all is done.
What I do is have a script that monitors github. When it sees no change, it just sleeps. When there is some change, it simply scripts out a git pull, then make distclean, ./configure and make. Then it zips things up and uploads. It then does a 2nd build that is only SSE2 (first one I did was XOP). I may also make a 3rd build that is AVX2, but that one will be done on a different box.
This is all just running in a cygwin window. I really should 'hide' it with the always-up service building program, but it would cause heartburn whenever I need to update cygwin (i.e. a hidden shell that I forget about).
But the files I am building are 100% working, built with cygwin. I have a 'static' zip file (larger), that is all of the stuff that does not change (like the cygwin DLL's needed).
But if we can 'fix'. this py code to serve back a different URL, we may be golden.
The server is simply a linode VM I got for this (and other) purposes recently.
@jfoug commented on GitHub (Sep 9, 2015):
This conversation may be better under the 'Windows pre-build' issue thread or at least have them link to each other
#1378
@kholia commented on GitHub (Sep 9, 2015):
We could 'fix' the Python code right now ;)
Here are some questions,
5cbed9d), it goes to work, and produces some builds. How do I map the revision number (5cbed9d) to the actual URL on your box?5cbed9dff4did something weird (changed the 'small website' URL to point to a sftp URL, weird) but this will get resolved soon I guess.@jfoug commented on GitHub (Sep 9, 2015):
I think I did that change. That was my original start. At this time, I have a 'universal' server, that could dish out the same files using sftp, https, or whatever we wanted.
I use somewhat the same name convention, BUT unfortunately since my built tool snapshots (only checks every 15 minutes (or once an hour, I cant remember), AND it take a while to upload, that it may not be the current version, but might be a couple behind. But you could probably figure that out with the python script, but getting an https head on the url, working backwards on git revisions, until one worked.
I will be leaving work in an hour or so. Let me update you with the actual URL naming. There is more than 1 URL however.
@kholia commented on GitHub (Sep 9, 2015):
Cool 👍
The Python code already has tricks to handle slow uploads (and to go back to previous builds).
@jfoug commented on GitHub (Sep 10, 2015):
Ok, here is the specifics.
right now there are 3 files.
https://45.33.2.252:2443/JtR-sse2-gitid.zip
https://45.33.2.252:2443/JtR-xop-gitid.zip
https://45.33.2.252:2443/JtR-win64-base.zip
The 3rd file is a 'common' file. The user only should download it one time (there may be updates rarely). The other 2 get built, tested, and if all goes well, zipped and uploaded. Again, I do this on a timed basis, so I certainly may miss updates. The granularity of the sleep is only 120s however. BUT the longest gap is during the build. This is single threaded, does 2 configures and builds, and on cygwin, so it is NOT fast. It's about 15 minutes for the 2nd build to get uploaded.
The script had not been running since when I installed Win10 on this box (a couple days back). I just started it up, and this first run shows the timings:
$ ./win-pkg-make.pl
From git://github.com/magnumripper/JohnTheRipper
7c2d0b4..a6449c5 bleeding-jumbo -> origin/bleeding-jumbo
Starting run on version
a6449c5at: Wed, Sep 9, 2015 6:44:38 PMfile JtR-sse2-a6449c5.zip has been created
file JtR-xop-a6449c5.zip has been created
Completed run on version
a6449c5at: Wed, Sep 9, 2015 7:03:18 PMThe IP should be static. If we want other 'types' of builds, I can do them. However, I have not been able to get cygwin to do good cross compiles. I would think an acceptable set would be SSE2, XOP and AVX2 I really think there is little reason for AVX, it does not really provide a 'huge' gain over SSE2 unfortunately. But XOP provides a heck of a good gain (at least I have seen that). Wider SIMD of course, kicks but :)
@jfoug commented on GitHub (Sep 10, 2015):
I do not have a cleanup cron script running on the server at this time, and have been doing it by hand every once in a while. The downloads are only a little over 2mb, so it really has not been a big deal (yet). The 'common' file is bigger > 30mb But again, it only needs to be pulled 1 time.
@jfoug commented on GitHub (Sep 10, 2015):
I can easily alter packaging if people think I should. However, it will make downloads larger. I do have only 3000GB of monthly xfer before I get charged for more, so I have to be very careful 😝
@magnumripper commented on GitHub (Sep 10, 2015):
If I click the download button, I get a page with... the download button as a pic. It this just me?
@jfoug commented on GitHub (Sep 10, 2015):
We will need to reset README.md I was toying around with it a while back. I could not get it working with my server under sftp, and never got back to it. Sounds like @kholia has a python script that acts as the DNS to find the right file(s) to download and forwards the browser to that link, so I think we can get it setup shortly.
@kholia commented on GitHub (Sep 10, 2015):
@jfoug http://daily-builds.appspot.com/latest now results in downloading a 7-byte file from your box.
E.g. http://45.33.2.252:2443/JtR-sse2-39aad6f.zip
Can you please check if the builds are being properly generated on your box?
@jfoug commented on GitHub (Sep 10, 2015):
I will validate the problem when I get home.
You might start out with the 'fixed' named file (the common file). Once we get that working, then we can work on the 'current' build version.
@kholia commented on GitHub (Sep 10, 2015):
Have a separate "base" file might be problematic for the end-users. How is it even going to work? From which page are we going to link to the 3 files (per build) which your box has?
It is possible to generate a single unified zip (containing "john-sse2.exe" and "john-xop.exe")?
@jfoug commented on GitHub (Sep 10, 2015):
That is actually my 'plan'. Note, my AVX2 box has become stable, so I
may switch over to turn it into the build machine. On that box, I think
I could make 3 exe files, (avx2, xop and sse2), then package everything
up and transmit it in a single package.
Then we could have a simple name, such as john-bleeding-win64-gitid.zip
It would likely be faster built also, since that machine runs cygwin
(the shell commands, etc) about 4x faster than this laptop.
Let me spend a bit of time seeing about setting it up to work that way,
and get you the naming convension.
But as a start, are you able to download the 'fixed' file properly?
@kholia commented on GitHub (Sep 10, 2015):
Click on http://daily-builds.appspot.com/latest URL. I can download the files, but they are 7 bytes in length!
Even http://45.33.2.252:2443/JtR-win64-base.zip is 7 bytes! WTF? :)
@kholia commented on GitHub (Sep 10, 2015):
Your 'plan' sounds great 👍
@jfoug commented on GitHub (Sep 11, 2015):
https dude. BIG difference
@jfoug commented on GitHub (Sep 11, 2015):
I wonder if we should also make some non-OMP build ?
I plan on using 'extra' exe files from the sse2 build. Also, the john.exe WILL be sse2. the others will be CPU named, OR is that the wrong way (i.e. making AVX2 into john.exe, and then falling back to lower CPU types) ? I have never used fallback before.
@jfoug commented on GitHub (Sep 11, 2015):
I am having problems getting an XOP build done on my AVX2 system. I try this, and it appears to make XOP, but the exe does not work:
CPPFLAGS="-mno-AVX2 -mxop" ./configure ......
@magnumripper commented on GitHub (Sep 11, 2015):
Of course, that is a cross compile. XOP is AMD-specific and not included in AVX2. Or did you mean it doesn't work on an XOP machine?
@jfoug commented on GitHub (Sep 11, 2015):
But I have copied to my xop, and same problem laptop and same problem Crashes on first format DES.
@jfoug commented on GitHub (Sep 11, 2015):
I did not expect it to run on my intel box. I am just trying to make several builds to package.
If I build on the laptop, I can get SSE2 and XOP. If I build on the desktop, I can get SSE2 and AVX2 (or AVX), but I can not get AVX2 to work building on the xop box, or XOP working building on the AVX2. I am pretty sure there must be something still wrong. Could it be some '-native' stuff causing trouble?
@jfoug commented on GitHub (Sep 11, 2015):
Got it (I think), running tests now.
CPPFLAGS="-mno-avx2 -mxop" ./configure --disable-opencl --disable-native-march --disable-native-tests
That one works. When I try to run it on my intel, I get proper 'Sorry, XOP required for this build' Also, the tests output 'yes' where they should, and XOP is the build type. the configure does not 'list' yes for cross-compile, but I think things are working.
Magnum, how do the CPU fall back executable naming convention work? I would like to setup this binary 'pack' in that manner.
@magnumripper commented on GitHub (Sep 11, 2015):
@kholia commented on GitHub (Sep 11, 2015):
@jfoug https://45.33.2.252:2443/JtR-win64-base.zip uses an improper SSL certificate.
Additionally, I see "Your IP is banned, no further requests will be processed from this IP (XYZ)" when accessing that URL (after accepting the SSL warnings shown by the browser).
@kholia commented on GitHub (Sep 11, 2015):
Also, our MinGW builds crash due to bugs in john itself! Specifically, they crash on format's "done" function, when the "done" function calls the "free" function.
@jfoug commented on GitHub (Sep 11, 2015):
I wonder if mingw is having problems with our aligned allocation
@vapor99 commented on GitHub (Sep 30, 2015):
Compiled Windows builds would be very nice because I find it impossible to compile an OPEN CL enabled build myself and cannot find a binary anywhere with OpenCL enabled. I have tried everything and just cannot do it, and I really dont want to use oclHashcat
@jfoug commented on GitHub (Sep 30, 2015):
I would think it will be very unlikely if an pre-built openCL will be made available. @kholia what do you think?
First off, I am NOT about to provide support for pre-built exe files. It seems to me, that OpenCL is great for better speed, BUT (HUGE BUT HERE), they are a support nightmare.
@magnumripper commented on GitHub (Sep 30, 2015):
Why? As long as you have built a binary with OpenCL support, I see no reason it shouldn't be just fine. It will require something like OpenCL.dll, right? Not much difference than a binary that requires some winpcap.dll or whatever.
@magnumripper commented on GitHub (Sep 30, 2015):
OTOH binaries in general (OpenCL or not) are a support nightmare, maybe that's what you meant? I agree!
@jfoug commented on GitHub (Sep 30, 2015):
That was more what I meant. If 'ALL' that is required would be a DLL, then I agree. BUT for openCL, there IS more. The card has to be supported, and the just being there is that enough for things to 'run' properly? Would that depend upon the version of catalyst, or GPU architecture they have? If all those have really simple answers then we probably 'could' do a 64 bit GPU build, and include that also. I am just not going to waste my time getting it running on every users box, and if it ends up simply being a support sink hole, it would get dropped so fast ppl will wonder if it was ever there ;)
@magnumripper commented on GitHub (Sep 30, 2015):
FWIW we don't support any particular cards (oclHashcat does, and I hate that fact). We basically support any OpenCL device. On Linux and Mac, you can upgrade or downgrade your driver and/or replace your card to some totally different one, and still use the same JtR binary. On Windows, it should be like that too, but who knows - they are notorious for doing the Wrong Thing[tm] most of the times.
But regardless of OpenCL, I personally don't want to get involved in any kind of binary distribution.
@jfoug commented on GitHub (Sep 30, 2015):
I would not mind having a robot build of 'some' cygwin binaries, under the absolute rule of
Hey, if they work for you, great, if not then figure the shit out yourself(hmm, I should copyleft that for a license agreement, lol). I can live with a distro plan like that, lol.
@vapor99 commented on GitHub (Oct 1, 2015):
@jfoug I like that moniker. I used the same compiled OpenCL linux binary on two different boxes with different video cards and it pleasantly worked well. I'm guessing Windows should be the same but who knows with MS? Still I'm stuck at just compiling the OpenCL windows binary to begin with.
@magnumripper commented on GitHub (Oct 2, 2015):
I'd rather have someone put together a how-to for building Windows OpenCL. But I certainly can't do it myself, I do not touch Windows - ever. Life is FAR to short to bother with that fecking bastard of a general miserable utter failure of an excuse of an operating system. Ouch, sorry 'bout that, I suffer from PTSD out of that piece of s*** from working professionally with it for tens of years.
@vapor99 commented on GitHub (Oct 2, 2015):
I hear you there, trust me. I was forced to use Windows for about 20 years myself, lost hair over it and was nearly institutionalized over it. Unfortunately I'm limited to using some clustered Windoze machines as much as I dont want to, and am writing a RESTapi (Python celery) to split up jobs between them. The beauty part is that they all contain very nice video cards that I feel bad for because they having nothing to do. lol. A how-to would be great if anyone has done a Win OpenCL build. I would be willing to share my async code with everyone once its done.
@magnumripper commented on GitHub (Oct 2, 2015):
LOL, you are a good guy @vapor99 I can tell that. Now if we could just get @jfoug over to the bright side, we're set.
@jfoug commented on GitHub (Oct 2, 2015):
Never!
@vapor99 commented on GitHub (Oct 2, 2015):
Thanks @magnumripper I try. After years of work with my psychiatrist trying to communicate and sessions of screaming "Its blue! Its blue! The goddamn thing is blue! (MS screen of death)" like the movie Liar Liar, I snapped out of it; got released out of my padded room and was advised to avoid that environment all together. My mantra to go forward was to tell myself it is out of my control. Nice and calmly I avoided it for years, until recently the shaking started to return. lol. My goal is to take as least time as possible to get a OpenCL build to run on the Church Of Micro-ology so I dont fall back into the deep abyss of ignorant blue monsters hiding in the back of my mind and get re-admitted to the psyc ward at MS hospital. You wouldn't want that guys would you?
@kholia commented on GitHub (Jan 23, 2017):
Giving access to folks doesn't seem to be simple. If I am gone for a while, the following steps can be used to update / replace the Docker image which we use in CircleCI.
Put this file inside a directory, and from within the directory run,
Get an account on https://hub.docker.com/ site.
Push this newly built image to Docker Hub.
Change
circle.ymlto point tousername/fedora:25instead ofdhiru/fedora:25. Changeusernameand25suitably.Now that this is documented, I am going to close the issue.