Previously, `fdroid init --keystore /tmp/foo` expected the keystore to
exist, or it quit with an error. But I've changed my mind, I think it is
useful to have it generate a new keystore at that location if it does not
exist. For example, in tests/run-tests.sh. It still will not clobber an
existing file at that location.
These options are needed to configure Java's keytool and jarsigner to use
a Hardware Security Module aka HSM aka smartcard. The defaults provided
are meant to make things work as easily as possible.
The defaults are set in config.py and are often commented out. Before, the
regex would only change the value, but leave it commented out. Now, it
will also uncomment it.
hashlib uses some magic to load whatever is built into the local openssl.
pylint gets confused by this, so we need a pylint plugin to trick pylint
into thinking everything is good.
setuptools wants to stick any relative install path in data_files into the
.egg package. Things are not setup to use the egg now. We might want to
consider using sticking files into the egg via pkg_resource in the future.
Using `python setup.py install`, things in non-standard python paths need
to be added to the MANIFEST in order for them to be included and installed.
There might be a better solution for this, but I haven't found it.
FDroidPopen() does not have a way to send to stdin, so we will use the
password file for now. In the long run, at least the keypass should always
be sent via stdin rather than via a file. Ideally, storepass would be too,
but if they are different, then storepass is less important.
This also makes the file layout in git basically the same as the installed
file layout, using an examples/ dir. I'm not sure if config.buildserver.py
is an example conf file, or a conf file that is actually in use, so I did
not move it.
Any process can read the process table, and can therefore see the entire
command line of any other process. That means its a bad idea to ever put
passwords as part of a command line. Python is executing keytool and
jarsigner command lines here, so now instead of putting the password on the
command line, a file is passed instead with suitable file permissions.
This should reduce the exposure a lot. But still, sensitive passwords
should not be written to any text file.
This change requires OpenJDK-7 since the :file option to -storepass and
-keypass was only added in Java 7's keytool and jarsigner.