Commit Graph
59 Commits
Author SHA1 Message Date
Hans-Christoph Steiner 53e4ec47a7 English source string corrections
From @monolifed <monolifed@gmail.com>
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner 278d67d960 implement gettext localization
This allows all the text to be localized via Weblate.  This is a quick
overview of all the strings, but there are certainly some that were left
out.

closes #342
2017-09-15 11:39:00 +02:00
Michael Pöhn 3e6dfacf6c added signatures subcommand 2017-09-07 00:03:35 +02:00
Michael Pöhn 0df95ce7e6 dont list fdroid subcommands in random order 2017-09-04 14:29:30 +02:00
Hans-Christoph Steiner c591a4cd89 fdroid btlog external binary transparency logger
This complements the binary transparency logging that happens on the
server side !226.  Anyone can set up an efficient tracker of any
F-Droid repo which stores all index files that it sees.  It uses HEAD
requests and ETag checking to be as efficient as possible, so that
this can be automatically run at a frequent pace.
2017-04-03 20:24:21 +02:00
Kevin C. Krinke df27bae6a0 dscanner - Drozer based post-build dynamic vulnerability scanner command
* New command `dscanner`, enables one to scan signed APKs with Drozer
 * Drozer is a dynamic vulnerability scanner for Android
 * Drozer runs in a emulator or on-device, this new `dscanner` command...
  * starts a docker image with Drozer and the Android Emulator pre-installed,
  * loads the signed APK into the emulator
  * activates Drozer automated tests for the APK
  * gathers the report output and places it next to the original APK
 * The Drozer docker image can be:
  * cached locally for re-use (just don't run --clean*)
  * retrieved from dockerhub.com for more efficient runtime
  * or be built from scratch (in the new "./docker" directory)
 * New "Vulnerability Scanning" documentation section (run gendocs.sh)
2016-12-06 14:00:44 +01:00
Daniel Martí 82b1d7ad14 all: make newer pycodestyle happy
Apparently the "two empty lines" rule is now stricter.
2016-11-15 20:55:06 +00:00
Hans-Christoph Steiner 7039d16046 always parse versions as strings, not bytes
Fixes a couple errors like:
  File "./makebuildserver", line 30, in vagrant
    out += line
  TypeError: Can't convert 'bytes' object to str implicitly

If universal_newlines=False, the default, then Popen will return bytes if
the newlines in the data do not match the system's newlines.  Setting it to
true enables auto-conversion, and then guarantees that the data is always
str.

"If universal_newlines is True, the file objects stdin, stdout and stderr
are opened as text streams in universal newlines mode, as described above
in Frequently Used Arguments, otherwise they are opened as binary streams."
https://docs.python.org/3/library/subprocess.html#subprocess.Popen
2016-03-14 12:49:38 +01:00
Daniel Martí 99edd64372 Switch all headers to python3 2016-03-10 16:43:36 +00:00
Daniel Martí 0be343273d Apparently Python cannot handle Unicode
I really hope I can revert this in the near future. Having to mutilate
my name just so that pip will work is a terrible workaround.

For better or worse, this only affects scripts defined in setup.py.
2016-01-14 23:15:05 +01:00
Daniel Martí 309660423c fdroid: python2 doesn't like print()
It just prints "()", which is stupid.
2016-01-09 13:24:13 +01:00
NeroBurner 5ca182a20d except named exception handling 2015-12-29 20:09:27 +01:00
NeroBurner af38f151a2 Change print-function to have brackets 2015-12-29 20:06:46 +01:00
Daniel Martí 73f9c1d1c2 Always use the same logging format
This helps differentiate errors, warnings and regular messages.
2015-10-05 21:43:08 +02:00
Daniel Martí 9c3fd97530 fdroid: don't treat MetaDataException as unknown
Up until now, if it was thrown, fdroid would crash with a full stacktrace as
if the program had stopped unexpectedly. Now it just prints the metadata
error, as intended.
2015-09-26 16:53:08 -07:00
nero-tux d23ecf1b35 replace deprecated optparse with argparse
following guidelines from:
https://docs.python.org/2/library/argparse.html#upgrading-optparse-code
except, still using option = parse.parse_args() instead of args = ...

- using the following script in folder fdroidserver:
	for i in *.py; do
		sed -i -e 's/optparse/argparse/' \
			-e 's/OptionParser/ArgumentParser/' \
			-e 's/OptionError/ArgumentError/' \
			-e 's/add_option/add_argument/' \
			-e 's/(options, args) = parser/options = parser/' \
			-e 's/options, args = parser/options = parser/' \
			-e 's/Usage: %prog/%(prog)s/' $i;
	done
- use ArgumentParser argument to replace (option, args) = parser.parse()
  call
- use parser.error(msg) instead of raise ArgumentException as suggested
  in https://docs.python.org/2/library/argparse.html#exiting-methods
- in fdroid catch ArgumentError instead of OptionError
2015-09-06 10:34:50 +02:00
Hans-Christoph Steiner 3fc2a99d71 fdroid --version for installed releases and running from git
This will report the version embedded in the module if it is installed, and
will report `git describe` if being run from git.  If someone installs from
git using pip, this will probably report the version in setup.py, which
will be wrong.  But that is not a documented install method, and I haven't
heard of anyone using it.  The recommended way is to run straight from git.
2015-09-01 19:45:00 +02:00
Ciaran Gultnieks ba177472da Add fdroid signindex to sign previously unsigned indexes 2015-01-11 08:20:14 +00:00
Daniel Martí 14f654fabc Apply some autopep8-python2 suggestions 2014-12-31 16:44:06 +01:00
Ciaran Gultnieks 102cbd20b3 Don't print tracebacks for option errors 2014-08-25 16:48:31 +01:00
Daniel Martí 4814238baf Use logging with proper format when warning about improper verbose/quiet usage 2014-07-05 14:17:02 +02:00
Daniel Martí 5bf5ba04a6 Using $(levelname) in --quiet makes no sense 2014-07-05 14:15:31 +02:00
Daniel Martí ec8291ba77 No need to print a trace when the user did a ^C 2014-07-03 18:26:49 +02:00
Daniel Martí 73142c740b Make use of FDroidException in the main fdroid script
This should improve the output shown when exceptions are found
2014-07-03 14:01:22 +02:00
Ciaran Gultnieks e29da6b023 Restore friendly error messages
Use --verbose if you really want a full traceback with your 'you made a
typo in an package ID' messages.

It would be better to do this based on exception types (i.e. our own
exceptions - MetadataException, BuildException, VCSException) would not
print a traceback, but unexpected exceptions would. But the types are
not available at the 'fdroid' level currently.
2014-05-20 22:14:19 +01:00
Ciaran Gultnieks ffdebd9516 Add 'fdroid gpgsign' command
Creates detached gpg signatures for any apks that don't have them
yet. Relevant configuration fields need to be set first.
2014-05-12 21:57:09 +01:00
Hans-Christoph Steiner 37d6d87ff7 fix PEP8 "E226 missing whitespace around arithmetic operator" 2014-05-06 14:36:33 -04:00
Hans-Christoph Steiner 0e00b36db5 fix PEP8 E124/E125/126/127/128 indentation issues
* E124 closing bracket does not match visual indentation
* E125 continuation line does not distinguish itself from next logical line
* E126 continuation line over-indented for hanging indent
* E127 continuation line over-indented for visual indent
* E128 continuation line under-indented for visual indent
2014-05-06 14:36:33 -04:00
Hans-Christoph Steiner aa5f317c26 fix PEP8 "W391 blank line at end of file" 2014-05-06 11:45:03 -04:00
Hans-Christoph Steiner 3f4f7a544b fix PEP8 "E302 expected 2 blank lines, found 1" 2014-05-06 11:45:03 -04:00
Hans-Christoph Steiner 998011d535 fix PEP8 "E231 missing whitespace after ','" 2014-05-06 11:45:02 -04:00
Ciaran Gultnieks 37dda9414c Add --quiet option, restricting output to warnings/errors 2014-02-22 09:46:24 +00:00
Daniel Martí 9d8c576cb1 Don't use logging before it's set up 2014-02-19 01:14:40 +01:00
Daniel Martí 687057a473 Implement proper fdroid --help 2014-02-19 00:38:09 +01:00
Daniel Martí d949b9ffbb Don't show INFO: when not doing verbose runs 2014-02-09 12:39:43 +01:00
Daniel Martí 9a4fe8c7cd Merge branch 'master' into logging 2014-02-02 19:45:17 +01:00
Daniel Martí 96c5afa03f New command: readmeta, like lint but without warnings 2014-02-02 15:11:26 +01:00
Daniel Martí 2f93ba9bd6 Merge branch 'master' into logging
Conflicts:
	fdroidserver/common.py
2014-01-28 14:14:59 +01:00
Daniel Martí 3687147997 Update my own copyright notices 2014-01-28 14:07:19 +01:00
Daniel Martí caa3d4eace Start doing logging properly 2014-01-27 21:48:22 +01:00
Daniel Martí a40533a521 New 'lint' subcommand in testing phase 2014-01-02 19:34:25 +01:00
Daniel Martí e7a21980f5 Add copyright notices to bash scripts 2013-12-30 17:15:27 +01:00
Daniel Martí 93d8d23cee Add 'fdroid install', more rewriting 2013-12-19 17:05:40 +01:00
Daniel Martí af0ac4a4c2 os imported but not used in fdroid 2013-11-05 19:43:17 +01:00
Daniel Martí 429221f282 Don't check for dirs and files in the main script 2013-11-04 18:41:20 +01:00
Hans-Christoph Steiner 9344bca245 implement 'fdroid init' to set up a barebones repo from scratch
This tries to auto-detect the SDK and NDK.  If it can't find the SDK, it
prompts the user to type in the path.  It also tries to find the most
recent version of the build-tools, and should also support the old
unversioned layout.
2013-11-04 12:22:58 -05:00
Daniel Martí c3be06fb1d Start rewriting options and config as common.py globals 2013-11-01 13:55:38 +01:00
Daniel Martí 2c804ef88a Switch all shebangs to 'env python2' 2013-10-31 13:27:24 +01:00
Daniel Martí 00995893f5 If config.py is not in the CWD, error before doing anything 2013-10-30 22:13:15 +01:00
Ciaran Gultnieks bd9a0716e9 Add verifier to available commands 2013-08-29 14:14:09 +01:00