1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

Revert "Merge branch 'random-fixes' into 'master'"

This reverts merge request !605
This commit is contained in:
Marcus 2019-01-10 13:46:49 +00:00
parent 357dea762d
commit f6f2fb0b89
6 changed files with 8 additions and 51 deletions

View File

@ -43,12 +43,8 @@ Vagrant.configure("2") do |config|
libvirt.nic_model_type = configfile["libvirt_nic_model_type"]
end
end
if configfile.has_key? "synced_folder_type"
synced_folder_type = configfile["synced_folder_type"]
else
synced_folder_type = '9p'
end
config.vm.synced_folder './', '/vagrant', type: synced_folder_type
config.vm.synced_folder './', '/vagrant', type: '9p'
synced_folder_type = '9p'
else
abort("No supported VM Provider found, set vm_provider in Vagrantfile.yaml!")
end

View File

@ -85,10 +85,3 @@
#
# libvirt_disk_bus = 'sata'
# libvirt_nic_model_type = 'rtl8139'
# Sometimes, it is not possible to use the 9p synced folder type with
# libvirt, like if running a KVM buildserver instance inside of a
# VMware ESXi guest. In that case, using NFS or another method is
# required.
#
# synced_folder_type = 'nfs'

View File

@ -686,7 +686,7 @@ def get_mirror_service_urls(url):
return urls
def download_repo_index(url_str, etag=None, verify_fingerprint=True, timeout=600):
def download_repo_index(url_str, etag=None, verify_fingerprint=True):
"""Downloads and verifies index file, then returns its data.
Downloads the repository index from the given :param url_str and
@ -710,7 +710,7 @@ def download_repo_index(url_str, etag=None, verify_fingerprint=True, timeout=600
fingerprint = query['fingerprint'][0]
url = urllib.parse.SplitResult(url.scheme, url.netloc, url.path + '/index-v1.jar', '', '')
download, new_etag = net.http_get(url.geturl(), etag, timeout)
download, new_etag = net.http_get(url.geturl(), etag)
if download is None:
return None, new_etag

View File

@ -165,8 +165,6 @@ regex_checks = {
'Description': https_enforcings + http_url_shorteners + [
(re.compile(r'\s*[*#][^ .]'),
_("Invalid bulleted list")),
(re.compile(r'https://f-droid.org/[a-z][a-z](_[A-Za-z]{2,4})?/'),
_("Locale included in f-droid.org URL")),
(re.compile(r'^\s'),
_("Unnecessary leading space")),
(re.compile(r'.*\s$'),
@ -527,35 +525,6 @@ def check_for_unsupported_metadata_files(basedir=""):
return return_value
def check_current_version_code(app):
"""Check that the CurrentVersionCode is currently available"""
archive_policy = app.get('ArchivePolicy')
if archive_policy and archive_policy.split()[0] == "0":
return
cv = app.get('CurrentVersionCode')
if cv is not None and int(cv) == 0:
return
builds = app.get('builds')
active_builds = 0
min_versionCode = None
if builds:
for build in builds:
vc = int(build['versionCode'])
if min_versionCode is None or min_versionCode > vc:
min_versionCode = vc
if not build.get('disable'):
active_builds += 1
if cv == build['versionCode']:
break
if active_builds == 0:
return # all builds are disabled
if cv is not None and int(cv) < min_versionCode:
yield(_('CurrentVersionCode {cv} is less than oldest build entry {versionCode}')
.format(cv=cv, versionCode=min_versionCode))
def main():
global config, options
@ -610,7 +579,6 @@ def main():
check_files_dir,
check_format,
check_license_tag,
check_current_version_code,
]
for check_func in app_check_funcs:

View File

@ -36,7 +36,7 @@ def download_file(url, local_filename=None, dldir='tmp'):
return local_filename
def http_get(url, etag=None, timeout=600):
def http_get(url, etag=None):
"""
Downloads the content from the given URL by making a GET request.
@ -52,12 +52,12 @@ def http_get(url, etag=None, timeout=600):
# TODO disable TLS Session IDs and TLS Session Tickets
# (plain text cookie visible to anyone who can see the network traffic)
if etag:
r = requests.head(url, headers=headers, timeout=timeout)
r = requests.head(url, headers=headers)
r.raise_for_status()
if 'ETag' in r.headers and etag == r.headers['ETag']:
return None, etag
r = requests.get(url, headers=headers, timeout=timeout)
r = requests.get(url, headers=headers)
r.raise_for_status()
new_etag = None

View File

@ -67,7 +67,7 @@ setup(name='fdroidserver',
'babel',
],
install_requires=[
'androguard >= 3.1.0rc2, < 3.3.0',
'androguard >= 3.1.0rc2',
'clint',
'defusedxml',
'GitPython',