mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 06:22:27 +03:00
Sort import
ruff check --fix --select I
This commit is contained in:
parent
b19b8050db
commit
7a98650ed3
68 changed files with 342 additions and 291 deletions
|
@ -12,6 +12,7 @@
|
||||||
#
|
#
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('../../fdroidserver'))
|
sys.path.insert(0, os.path.abspath('../../fdroidserver'))
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
|
@ -6,7 +6,6 @@ import argparse
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from fdroidserver import _, common, metadata
|
from fdroidserver import _, common, metadata
|
||||||
|
|
||||||
from fdroidserver.exception import VCSException
|
from fdroidserver.exception import VCSException
|
||||||
|
|
||||||
fdroid_summary = 'reset app VCSs to the latest version'
|
fdroid_summary = 'reset app VCSs to the latest version'
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
from fdroidserver import common
|
from fdroidserver import common
|
||||||
from fdroidserver.common import FDroidPopen
|
from fdroidserver.common import FDroidPopen
|
||||||
from fdroidserver.exception import BuildException
|
from fdroidserver.exception import BuildException
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
from fdroidserver import common
|
from fdroidserver import common
|
||||||
from fdroidserver.common import FDroidPopen
|
from fdroidserver.common import FDroidPopen
|
||||||
from fdroidserver.exception import BuildException
|
from fdroidserver.exception import BuildException
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
from fdroidserver import common, index
|
from fdroidserver import common, index
|
||||||
|
|
||||||
fdroid_summary = 'export the keystore in standard PEM format'
|
fdroid_summary = 'export the keystore in standard PEM format'
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
from fdroidserver import _, common, metadata
|
from fdroidserver import _, common, metadata
|
||||||
|
|
||||||
fdroid_summary = 'prepare the srclibs for `fdroid build --on-server`'
|
fdroid_summary = 'prepare the srclibs for `fdroid build --on-server`'
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
from fdroidserver import common
|
from fdroidserver import common
|
||||||
from fdroidserver.common import FDroidPopen
|
from fdroidserver.common import FDroidPopen
|
||||||
from fdroidserver.exception import BuildException
|
from fdroidserver.exception import BuildException
|
||||||
|
|
|
@ -3,7 +3,6 @@ import glob
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
# support running straight from git and standard installs
|
# support running straight from git and standard installs
|
||||||
rootpaths = [
|
rootpaths = [
|
||||||
os.path.realpath(os.path.join(os.path.dirname(__file__), '..')),
|
os.path.realpath(os.path.join(os.path.dirname(__file__), '..')),
|
||||||
|
@ -24,39 +23,52 @@ gettext.textdomain('fdroidserver')
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
from fdroidserver.exception import (FDroidException,
|
from fdroidserver.exception import (
|
||||||
MetaDataException,
|
FDroidException,
|
||||||
VerificationException) # NOQA: E402
|
MetaDataException,
|
||||||
|
VerificationException, # NOQA: E402
|
||||||
|
)
|
||||||
|
|
||||||
FDroidException # NOQA: B101
|
FDroidException # NOQA: B101
|
||||||
MetaDataException # NOQA: B101
|
MetaDataException # NOQA: B101
|
||||||
VerificationException # NOQA: B101
|
VerificationException # NOQA: B101
|
||||||
|
|
||||||
from fdroidserver.common import (verify_apk_signature,
|
from fdroidserver.common import genkeystore as generate_keystore # NOQA: E402
|
||||||
genkeystore as generate_keystore) # NOQA: E402
|
from fdroidserver.common import verify_apk_signature
|
||||||
|
|
||||||
verify_apk_signature # NOQA: B101
|
verify_apk_signature # NOQA: B101
|
||||||
generate_keystore # NOQA: B101
|
generate_keystore # NOQA: B101
|
||||||
from fdroidserver.index import (download_repo_index,
|
from fdroidserver.index import (
|
||||||
download_repo_index_v1,
|
download_repo_index,
|
||||||
download_repo_index_v2,
|
download_repo_index_v1,
|
||||||
get_mirror_service_urls,
|
download_repo_index_v2,
|
||||||
make as make_index) # NOQA: E402
|
get_mirror_service_urls,
|
||||||
|
)
|
||||||
|
from fdroidserver.index import make as make_index # NOQA: E402
|
||||||
|
|
||||||
download_repo_index # NOQA: B101
|
download_repo_index # NOQA: B101
|
||||||
download_repo_index_v1 # NOQA: B101
|
download_repo_index_v1 # NOQA: B101
|
||||||
download_repo_index_v2 # NOQA: B101
|
download_repo_index_v2 # NOQA: B101
|
||||||
get_mirror_service_urls # NOQA: B101
|
get_mirror_service_urls # NOQA: B101
|
||||||
make_index # NOQA: B101
|
make_index # NOQA: B101
|
||||||
from fdroidserver.update import (process_apk,
|
from fdroidserver.update import (
|
||||||
process_apks,
|
process_apk,
|
||||||
scan_apk,
|
process_apks,
|
||||||
scan_repo_files) # NOQA: E402
|
scan_apk,
|
||||||
|
scan_repo_files, # NOQA: E402
|
||||||
|
)
|
||||||
|
|
||||||
process_apk # NOQA: B101
|
process_apk # NOQA: B101
|
||||||
process_apks # NOQA: B101
|
process_apks # NOQA: B101
|
||||||
scan_apk # NOQA: B101
|
scan_apk # NOQA: B101
|
||||||
scan_repo_files # NOQA: B101
|
scan_repo_files # NOQA: B101
|
||||||
from fdroidserver.deploy import (update_awsbucket,
|
from fdroidserver.deploy import (
|
||||||
update_servergitmirrors,
|
update_awsbucket,
|
||||||
update_serverwebroots,
|
update_servergitmirrors,
|
||||||
update_serverwebroot) # NOQA: E402
|
update_serverwebroot, # NOQA: E402
|
||||||
|
update_serverwebroots,
|
||||||
|
)
|
||||||
|
|
||||||
update_awsbucket # NOQA: B101
|
update_awsbucket # NOQA: B101
|
||||||
update_servergitmirrors # NOQA: B101
|
update_servergitmirrors # NOQA: B101
|
||||||
update_serverwebroots # NOQA: B101
|
update_serverwebroots # NOQA: B101
|
||||||
|
|
|
@ -18,20 +18,20 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import re
|
import importlib.metadata
|
||||||
import sys
|
import logging
|
||||||
import os
|
import os
|
||||||
import pkgutil
|
import pkgutil
|
||||||
import logging
|
import re
|
||||||
import importlib.metadata
|
import sys
|
||||||
|
|
||||||
import git
|
|
||||||
import fdroidserver.common
|
|
||||||
import fdroidserver.metadata
|
|
||||||
from fdroidserver import _
|
|
||||||
from argparse import ArgumentError
|
from argparse import ArgumentError
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
import git
|
||||||
|
|
||||||
|
import fdroidserver.common
|
||||||
|
import fdroidserver.metadata
|
||||||
|
from fdroidserver import _
|
||||||
|
|
||||||
COMMANDS = OrderedDict([
|
COMMANDS = OrderedDict([
|
||||||
("build", _("Build a package from source")),
|
("build", _("Build a package from source")),
|
||||||
|
|
|
@ -68,9 +68,18 @@ import struct
|
||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
import zlib
|
import zlib
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from typing import Any, BinaryIO, Callable, Dict, Iterable, Iterator, Optional, Tuple, Union
|
from typing import (
|
||||||
|
Any,
|
||||||
|
BinaryIO,
|
||||||
|
Callable,
|
||||||
|
Dict,
|
||||||
|
Iterable,
|
||||||
|
Iterator,
|
||||||
|
Optional,
|
||||||
|
Tuple,
|
||||||
|
Union,
|
||||||
|
)
|
||||||
|
|
||||||
__version__ = "1.1.1"
|
__version__ = "1.1.1"
|
||||||
NAME = "apksigcopier"
|
NAME = "apksigcopier"
|
||||||
|
|
|
@ -28,22 +28,21 @@
|
||||||
# the F-Droid client.
|
# the F-Droid client.
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import defusedxml.minidom
|
|
||||||
import git
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import requests
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import zipfile
|
import zipfile
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from . import _
|
import defusedxml.minidom
|
||||||
from . import common
|
import git
|
||||||
from . import deploy
|
import requests
|
||||||
|
|
||||||
|
from . import _, common, deploy
|
||||||
from .exception import FDroidException
|
from .exception import FDroidException
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,31 +18,27 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
import argparse
|
||||||
import shutil
|
|
||||||
import glob
|
import glob
|
||||||
import subprocess
|
import logging
|
||||||
|
import os
|
||||||
import posixpath
|
import posixpath
|
||||||
import re
|
import re
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
import tarfile
|
import tarfile
|
||||||
import threading
|
|
||||||
import traceback
|
|
||||||
import time
|
|
||||||
import requests
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import argparse
|
import threading
|
||||||
import logging
|
import time
|
||||||
|
import traceback
|
||||||
from gettext import ngettext
|
from gettext import ngettext
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from . import _
|
import requests
|
||||||
from . import common
|
|
||||||
from . import net
|
from . import _, common, metadata, net, scanner, vmtools
|
||||||
from . import metadata
|
|
||||||
from . import scanner
|
|
||||||
from . import vmtools
|
|
||||||
from .common import FDroidPopen
|
from .common import FDroidPopen
|
||||||
from .exception import FDroidException, BuildException, VCSException
|
from .exception import BuildException, FDroidException, VCSException
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import paramiko
|
import paramiko
|
||||||
|
|
|
@ -19,28 +19,30 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
import git
|
import copy
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import urllib.request
|
|
||||||
import urllib.error
|
|
||||||
import time
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from argparse import ArgumentParser
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
import logging
|
import urllib.error
|
||||||
import copy
|
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
import urllib.request
|
||||||
|
from argparse import ArgumentParser
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from . import _
|
import git
|
||||||
from . import common
|
|
||||||
from . import metadata
|
|
||||||
from . import net
|
|
||||||
from .exception import VCSException, NoSubmodulesException, FDroidException, MetaDataException
|
|
||||||
|
|
||||||
|
from . import _, common, metadata, net
|
||||||
|
from .exception import (
|
||||||
|
FDroidException,
|
||||||
|
MetaDataException,
|
||||||
|
NoSubmodulesException,
|
||||||
|
VCSException,
|
||||||
|
)
|
||||||
|
|
||||||
# https://gitlab.com/fdroid/checkupdates-runner/-/blob/1861899262a62a4ed08fa24e5449c0368dfb7617/.gitlab-ci.yml#L36
|
# https://gitlab.com/fdroid/checkupdates-runner/-/blob/1861899262a62a4ed08fa24e5449c0368dfb7617/.gitlab-ci.yml#L36
|
||||||
BOT_EMAIL = 'fdroidci@bubu1.eu'
|
BOT_EMAIL = 'fdroidci@bubu1.eu'
|
||||||
|
|
|
@ -52,54 +52,58 @@ environment variable to include.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import ast
|
||||||
|
import base64
|
||||||
import copy
|
import copy
|
||||||
import difflib
|
import difflib
|
||||||
from typing import List
|
|
||||||
import filecmp
|
import filecmp
|
||||||
import git
|
|
||||||
import glob
|
import glob
|
||||||
|
import gzip
|
||||||
|
import hashlib
|
||||||
import io
|
import io
|
||||||
import itertools
|
import itertools
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
|
import operator
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import re
|
import re
|
||||||
import ast
|
|
||||||
import gzip
|
|
||||||
import shutil
|
import shutil
|
||||||
|
import socket
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import sys
|
||||||
import operator
|
|
||||||
import logging
|
|
||||||
import hashlib
|
|
||||||
import socket
|
|
||||||
import base64
|
|
||||||
import zipfile
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import json
|
import time
|
||||||
from pathlib import Path
|
import zipfile
|
||||||
|
|
||||||
import defusedxml.ElementTree as XMLElementTree
|
|
||||||
|
|
||||||
from argparse import BooleanOptionalAction
|
from argparse import BooleanOptionalAction
|
||||||
from asn1crypto import cms
|
|
||||||
from base64 import urlsafe_b64encode
|
from base64 import urlsafe_b64encode
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
|
from pathlib import Path
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
|
from typing import List
|
||||||
from urllib.parse import urlparse, urlsplit, urlunparse
|
from urllib.parse import urlparse, urlsplit, urlunparse
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
|
import defusedxml.ElementTree as XMLElementTree
|
||||||
|
import git
|
||||||
|
from asn1crypto import cms
|
||||||
|
|
||||||
import fdroidserver.metadata
|
import fdroidserver.metadata
|
||||||
from fdroidserver import _
|
from fdroidserver import _
|
||||||
from fdroidserver._yaml import yaml, config_dump
|
from fdroidserver._yaml import config_dump, yaml
|
||||||
from fdroidserver.exception import FDroidException, VCSException, NoSubmodulesException, \
|
from fdroidserver.exception import (
|
||||||
BuildException, VerificationException, MetaDataException
|
BuildException,
|
||||||
from .asynchronousfilereader import AsynchronousFileReader
|
FDroidException,
|
||||||
from .looseversion import LooseVersion
|
MetaDataException,
|
||||||
|
NoSubmodulesException,
|
||||||
|
VCSException,
|
||||||
|
VerificationException,
|
||||||
|
)
|
||||||
|
|
||||||
from . import apksigcopier, common
|
from . import apksigcopier, common
|
||||||
|
from .asynchronousfilereader import AsynchronousFileReader
|
||||||
|
from .looseversion import LooseVersion
|
||||||
|
|
||||||
# The path to this fdroidserver distribution
|
# The path to this fdroidserver distribution
|
||||||
FDROID_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
|
FDROID_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
@ -2904,9 +2908,9 @@ def is_debuggable_or_testOnly(apkfile):
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
# these were moved in androguard 4.0
|
# these were moved in androguard 4.0
|
||||||
from androguard.core.axml import AXMLParser, format_value, START_TAG
|
from androguard.core.axml import START_TAG, AXMLParser, format_value
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from androguard.core.bytecodes.axml import AXMLParser, format_value, START_TAG
|
from androguard.core.bytecodes.axml import START_TAG, AXMLParser, format_value
|
||||||
_androguard_logging_level()
|
_androguard_logging_level()
|
||||||
|
|
||||||
with ZipFile(apkfile) as apk:
|
with ZipFile(apkfile) as apk:
|
||||||
|
@ -2978,9 +2982,23 @@ def get_apk_id_androguard(apkfile):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# these were moved in androguard 4.0
|
# these were moved in androguard 4.0
|
||||||
from androguard.core.axml import AXMLParser, format_value, START_TAG, END_TAG, TEXT, END_DOCUMENT
|
from androguard.core.axml import (
|
||||||
|
END_DOCUMENT,
|
||||||
|
END_TAG,
|
||||||
|
START_TAG,
|
||||||
|
TEXT,
|
||||||
|
AXMLParser,
|
||||||
|
format_value,
|
||||||
|
)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from androguard.core.bytecodes.axml import AXMLParser, format_value, START_TAG, END_TAG, TEXT, END_DOCUMENT
|
from androguard.core.bytecodes.axml import (
|
||||||
|
END_DOCUMENT,
|
||||||
|
END_TAG,
|
||||||
|
START_TAG,
|
||||||
|
TEXT,
|
||||||
|
AXMLParser,
|
||||||
|
format_value,
|
||||||
|
)
|
||||||
_androguard_logging_level()
|
_androguard_logging_level()
|
||||||
|
|
||||||
appid = None
|
appid = None
|
||||||
|
|
|
@ -16,28 +16,28 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import sys
|
|
||||||
import glob
|
import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import pathlib
|
||||||
import re
|
import re
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
import urllib
|
import urllib
|
||||||
from typing import Dict, List
|
|
||||||
from git import Repo
|
|
||||||
import yaml
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
import logging
|
from typing import Dict, List
|
||||||
import pathlib
|
|
||||||
import shutil
|
|
||||||
import git
|
import git
|
||||||
|
import yaml
|
||||||
|
from git import Repo
|
||||||
|
|
||||||
import fdroidserver.github
|
import fdroidserver.github
|
||||||
|
|
||||||
from . import _
|
from . import _, common, index
|
||||||
from . import common
|
|
||||||
from . import index
|
|
||||||
from .exception import FDroidException
|
from .exception import FDroidException
|
||||||
|
|
||||||
config = None
|
config = None
|
||||||
|
@ -349,8 +349,8 @@ def update_awsbucket_libcloud(repo_section, is_index_only=False):
|
||||||
import libcloud.security
|
import libcloud.security
|
||||||
|
|
||||||
libcloud.security.VERIFY_SSL_CERT = True
|
libcloud.security.VERIFY_SSL_CERT = True
|
||||||
from libcloud.storage.types import Provider, ContainerDoesNotExistError
|
|
||||||
from libcloud.storage.providers import get_driver
|
from libcloud.storage.providers import get_driver
|
||||||
|
from libcloud.storage.types import ContainerDoesNotExistError, Provider
|
||||||
|
|
||||||
if not config.get('awsaccesskeyid') or not config.get('awssecretkey'):
|
if not config.get('awsaccesskeyid') or not config.get('awssecretkey'):
|
||||||
raise FDroidException(
|
raise FDroidException(
|
||||||
|
@ -854,9 +854,10 @@ def upload_to_android_observatory(repo_section):
|
||||||
def upload_apk_to_android_observatory(path):
|
def upload_apk_to_android_observatory(path):
|
||||||
# depend on requests and lxml only if users enable AO
|
# depend on requests and lxml only if users enable AO
|
||||||
import requests
|
import requests
|
||||||
from . import net
|
|
||||||
from lxml.html import fromstring
|
from lxml.html import fromstring
|
||||||
|
|
||||||
|
from . import net
|
||||||
|
|
||||||
apkfilename = os.path.basename(path)
|
apkfilename = os.path.basename(path)
|
||||||
r = requests.post(
|
r = requests.post(
|
||||||
'https://androidobservatory.org/',
|
'https://androidobservatory.org/',
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import pathlib
|
import pathlib
|
||||||
import urllib.request
|
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
|
||||||
class GithubApi:
|
class GithubApi:
|
||||||
|
|
|
@ -16,14 +16,13 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
|
||||||
import glob
|
import glob
|
||||||
from argparse import ArgumentParser
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
from . import _
|
from . import _, common
|
||||||
from . import common
|
|
||||||
from .common import FDroidPopen
|
from .common import FDroidPopen
|
||||||
from .exception import FDroidException
|
from .exception import FDroidException
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ these installed on the signing server.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import calendar
|
||||||
import collections
|
import collections
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
|
@ -41,20 +42,27 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import zipfile
|
import zipfile
|
||||||
import calendar
|
|
||||||
from binascii import hexlify, unhexlify
|
from binascii import hexlify, unhexlify
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from xml.dom.minidom import Document
|
from xml.dom.minidom import Document
|
||||||
|
|
||||||
from . import _
|
|
||||||
from . import common
|
|
||||||
from . import metadata
|
|
||||||
from . import signindex
|
|
||||||
from fdroidserver.common import ANTIFEATURES_CONFIG_NAME, CATEGORIES_CONFIG_NAME, CONFIG_CONFIG_NAME, MIRRORS_CONFIG_NAME, RELEASECHANNELS_CONFIG_NAME, DEFAULT_LOCALE, FDroidPopen, FDroidPopenBytes, load_publish_signer_fingerprints
|
|
||||||
from fdroidserver._yaml import yaml
|
from fdroidserver._yaml import yaml
|
||||||
|
from fdroidserver.common import (
|
||||||
|
ANTIFEATURES_CONFIG_NAME,
|
||||||
|
CATEGORIES_CONFIG_NAME,
|
||||||
|
CONFIG_CONFIG_NAME,
|
||||||
|
DEFAULT_LOCALE,
|
||||||
|
MIRRORS_CONFIG_NAME,
|
||||||
|
RELEASECHANNELS_CONFIG_NAME,
|
||||||
|
FDroidPopen,
|
||||||
|
FDroidPopenBytes,
|
||||||
|
load_publish_signer_fingerprints,
|
||||||
|
)
|
||||||
from fdroidserver.exception import FDroidException, VerificationException
|
from fdroidserver.exception import FDroidException, VerificationException
|
||||||
|
|
||||||
|
from . import _, common, metadata, signindex
|
||||||
|
|
||||||
|
|
||||||
def make(apps, apks, repodir, archive):
|
def make(apps, apks, repodir, archive):
|
||||||
"""Generate the repo index files.
|
"""Generate the repo index files.
|
||||||
|
|
|
@ -19,16 +19,15 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
import logging
|
|
||||||
|
|
||||||
from . import _
|
from . import _, common
|
||||||
from . import common
|
|
||||||
from .exception import FDroidException
|
from .exception import FDroidException
|
||||||
|
|
||||||
config = {}
|
config = {}
|
||||||
|
|
|
@ -17,24 +17,21 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import glob
|
import glob
|
||||||
import locale
|
import locale
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
import termios
|
import termios
|
||||||
import tty
|
import tty
|
||||||
|
|
||||||
import defusedxml.ElementTree as XMLElementTree
|
|
||||||
|
|
||||||
from argparse import ArgumentParser, BooleanOptionalAction
|
from argparse import ArgumentParser, BooleanOptionalAction
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from urllib.parse import urlencode, urlparse, urlunparse
|
from urllib.parse import urlencode, urlparse, urlunparse
|
||||||
|
|
||||||
from . import _
|
import defusedxml.ElementTree as XMLElementTree
|
||||||
from . import common, github, index, net
|
|
||||||
from .exception import FDroidException
|
|
||||||
|
|
||||||
|
from . import _, common, github, index, net
|
||||||
|
from .exception import FDroidException
|
||||||
|
|
||||||
DEFAULT_IPFS_GATEWAYS = ("https://gateway.ipfs.io/ipfs/",)
|
DEFAULT_IPFS_GATEWAYS = ("https://gateway.ipfs.io/ipfs/",)
|
||||||
MAVEN_CENTRAL_MIRRORS = [
|
MAVEN_CENTRAL_MIRRORS = [
|
||||||
|
|
|
@ -24,9 +24,10 @@ import urllib.parse
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from . import _, common, metadata, rewritemeta
|
|
||||||
from fdroidserver._yaml import yaml
|
from fdroidserver._yaml import yaml
|
||||||
|
|
||||||
|
from . import _, common, metadata, rewritemeta
|
||||||
|
|
||||||
config = None
|
config = None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,19 +18,19 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
import math
|
|
||||||
import platform
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import logging
|
import logging
|
||||||
import ruamel.yaml
|
import math
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from . import common
|
import ruamel.yaml
|
||||||
from . import _
|
|
||||||
from .exception import MetaDataException
|
from . import _, common
|
||||||
from ._yaml import yaml
|
from ._yaml import yaml
|
||||||
|
from .exception import MetaDataException
|
||||||
|
|
||||||
srclibs = None
|
srclibs = None
|
||||||
warnings_action = None
|
warnings_action = None
|
||||||
|
|
|
@ -7,13 +7,10 @@ import posixpath
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from argparse import ArgumentParser
|
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
from . import _
|
from . import _, common, index, update
|
||||||
from . import common
|
|
||||||
from . import index
|
|
||||||
from . import update
|
|
||||||
|
|
||||||
|
|
||||||
def _run_wget(path, urls, verbose=False):
|
def _run_wget(path, urls, verbose=False):
|
||||||
|
@ -133,6 +130,7 @@ def main():
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
from . import net
|
from . import net
|
||||||
|
|
||||||
url = _append_to_url_path(section, 'index-v1.jar')
|
url = _append_to_url_path(section, 'index-v1.jar')
|
||||||
|
|
|
@ -21,10 +21,11 @@ import copy
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import requests
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
|
import requests
|
||||||
import urllib3
|
import urllib3
|
||||||
from requests.adapters import HTTPAdapter, Retry
|
from requests.adapters import HTTPAdapter, Retry
|
||||||
|
|
||||||
|
|
|
@ -19,25 +19,25 @@
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import datetime
|
import datetime
|
||||||
import git
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import paramiko
|
|
||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
import ssl
|
import ssl
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import yaml
|
|
||||||
from urllib.parse import urlparse
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from . import _
|
import git
|
||||||
from . import common
|
import paramiko
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
from . import _, common
|
||||||
from .exception import VCSException
|
from .exception import VCSException
|
||||||
|
|
||||||
# hard coded defaults for Android ~/.android/debug.keystore files
|
# hard coded defaults for Android ~/.android/debug.keystore files
|
||||||
|
|
|
@ -28,23 +28,21 @@ mostly reports success by moving an APK from unsigned/ to repo/
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import glob
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import glob
|
import sys
|
||||||
import hashlib
|
|
||||||
from argparse import ArgumentParser
|
|
||||||
from collections import OrderedDict
|
|
||||||
import logging
|
|
||||||
from gettext import ngettext
|
|
||||||
import json
|
|
||||||
import time
|
import time
|
||||||
import zipfile
|
import zipfile
|
||||||
|
from argparse import ArgumentParser
|
||||||
|
from collections import OrderedDict
|
||||||
|
from gettext import ngettext
|
||||||
|
|
||||||
from . import _
|
from . import _, common, metadata
|
||||||
from . import common
|
|
||||||
from . import metadata
|
|
||||||
from .common import FDroidPopen
|
from .common import FDroidPopen
|
||||||
from .exception import BuildException, FDroidException
|
from .exception import BuildException, FDroidException
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from . import common
|
|
||||||
from . import metadata
|
from . import common, metadata
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
@ -17,16 +17,14 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
|
||||||
import logging
|
|
||||||
import io
|
import io
|
||||||
import tempfile
|
import logging
|
||||||
import shutil
|
import shutil
|
||||||
|
import tempfile
|
||||||
|
from argparse import ArgumentParser
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from . import _
|
from . import _, common, metadata
|
||||||
from . import common
|
|
||||||
from . import metadata
|
|
||||||
|
|
||||||
config = None
|
config = None
|
||||||
|
|
||||||
|
|
|
@ -15,15 +15,13 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
import re
|
from . import _, common
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import logging
|
|
||||||
|
|
||||||
from . import _
|
|
||||||
from . import common
|
|
||||||
from .exception import FDroidException
|
from .exception import FDroidException
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,15 +17,13 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import zipfile
|
import zipfile
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
import logging
|
|
||||||
|
|
||||||
from . import _
|
from . import _, common, metadata
|
||||||
from . import common
|
|
||||||
from . import metadata
|
|
||||||
from .exception import FDroidException
|
from .exception import FDroidException
|
||||||
|
|
||||||
config = None
|
config = None
|
||||||
|
|
|
@ -28,8 +28,8 @@ Example
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
|
||||||
import threading
|
import threading
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
class Tail(object):
|
class Tail(object):
|
||||||
|
|
|
@ -20,26 +20,27 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import copy
|
||||||
import filecmp
|
import filecmp
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import glob
|
import glob
|
||||||
import logging
|
|
||||||
import re
|
|
||||||
import socket
|
|
||||||
import warnings
|
|
||||||
import zipfile
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import shutil
|
||||||
|
import socket
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
import yaml
|
import warnings
|
||||||
import copy
|
import zipfile
|
||||||
|
from argparse import ArgumentParser
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import asn1crypto.cms
|
import asn1crypto.cms
|
||||||
import defusedxml.ElementTree as ElementTree
|
import defusedxml.ElementTree as ElementTree
|
||||||
from datetime import datetime, timezone
|
import yaml
|
||||||
from argparse import ArgumentParser
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from yaml import CSafeLoader as SafeLoader
|
from yaml import CSafeLoader as SafeLoader
|
||||||
|
@ -49,14 +50,13 @@ except ImportError:
|
||||||
import collections
|
import collections
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
|
|
||||||
from . import _
|
from PIL import Image, PngImagePlugin
|
||||||
from . import common
|
|
||||||
from . import metadata
|
|
||||||
from .common import DEFAULT_LOCALE
|
|
||||||
from .exception import BuildException, FDroidException, VerificationException
|
|
||||||
import fdroidserver.index
|
import fdroidserver.index
|
||||||
|
|
||||||
from PIL import Image, PngImagePlugin
|
from . import _, common, metadata
|
||||||
|
from .common import DEFAULT_LOCALE
|
||||||
|
from .exception import BuildException, FDroidException, VerificationException
|
||||||
|
|
||||||
if hasattr(Image, 'DecompressionBombWarning'):
|
if hasattr(Image, 'DecompressionBombWarning'):
|
||||||
warnings.simplefilter('error', Image.DecompressionBombWarning)
|
warnings.simplefilter('error', Image.DecompressionBombWarning)
|
||||||
|
|
|
@ -16,18 +16,17 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import glob
|
import glob
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import requests
|
import os
|
||||||
|
import sys
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from . import _
|
import requests
|
||||||
from . import common
|
|
||||||
from . import net
|
from . import _, common, net
|
||||||
from .exception import FDroidException
|
from .exception import FDroidException
|
||||||
|
|
||||||
config = None
|
config = None
|
||||||
|
@ -58,8 +57,8 @@ def _add_diffoscope_info(d):
|
||||||
]
|
]
|
||||||
d['diffoscope']['External-Tools-Required'] = external_tools
|
d['diffoscope']['External-Tools-Required'] = external_tools
|
||||||
|
|
||||||
from diffoscope.tools import OS_NAMES, get_current_os
|
|
||||||
from diffoscope.external_tools import EXTERNAL_TOOLS
|
from diffoscope.external_tools import EXTERNAL_TOOLS
|
||||||
|
from diffoscope.tools import OS_NAMES, get_current_os
|
||||||
|
|
||||||
current_os = get_current_os()
|
current_os = get_current_os()
|
||||||
os_list = [current_os] if (current_os in OS_NAMES) else iter(OS_NAMES)
|
os_list = [current_os] if (current_os in OS_NAMES) else iter(OS_NAMES)
|
||||||
|
|
|
@ -16,16 +16,16 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from os.path import isdir, isfile, basename, abspath, expanduser
|
|
||||||
import os
|
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import textwrap
|
import textwrap
|
||||||
import logging
|
|
||||||
from .common import FDroidException
|
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
from os.path import abspath, basename, expanduser, isdir, isfile
|
||||||
|
|
||||||
|
from .common import FDroidException
|
||||||
|
|
||||||
lock = threading.Lock()
|
lock = threading.Lock()
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
#
|
#
|
||||||
# add completed translations from weblate to MANIFEST.in
|
# add completed translations from weblate to MANIFEST.in
|
||||||
|
|
||||||
import git
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import requests
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
import git
|
||||||
|
import requests
|
||||||
|
|
||||||
projectbasedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
projectbasedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
localedir = os.path.join(projectbasedir, 'locale')
|
localedir = os.path.join(projectbasedir, 'locale')
|
||||||
|
|
|
@ -25,7 +25,6 @@ import sys
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
import git
|
import git
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
localmodule = os.path.realpath(
|
localmodule = os.path.realpath(
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
# that run in the buildserver setup. It is not really maintained, but
|
# that run in the buildserver setup. It is not really maintained, but
|
||||||
# is still here as a kind of reference.
|
# is still here as a kind of reference.
|
||||||
|
|
||||||
|
import inspect
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import logging
|
|
||||||
import textwrap
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import inspect
|
import textwrap
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
localmodule = os.path.realpath(
|
localmodule = os.path.realpath(
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
import collections
|
import collections
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import requests
|
|
||||||
import requests_cache
|
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
import requests
|
||||||
|
import requests_cache
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# we want all the data
|
# we want all the data
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import requests
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import requests
|
||||||
from colorama import Fore, Style
|
from colorama import Fore, Style
|
||||||
from packaging.version import Version
|
from packaging.version import Version
|
||||||
|
|
||||||
|
|
||||||
checksums = None
|
checksums = None
|
||||||
versions = dict()
|
versions = dict()
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import fdroidserver
|
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import fdroidserver
|
||||||
from fdroidserver import common, nightly
|
from fdroidserver import common, nightly
|
||||||
|
|
||||||
if os.getenv('CI') is None:
|
if os.getenv('CI') is None:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# This is used in update.has_known_vulnerability()
|
# This is used in update.has_known_vulnerability()
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
# this list was generated using:
|
# this list was generated using:
|
||||||
|
|
|
@ -20,10 +20,8 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
import unittest.mock
|
import unittest.mock
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
GP_FINGERPRINT = 'B7C2EEFD8DAC7806AF67DFCD92EB18126BC08312A7F2D6F3862E46013C7A6135'
|
GP_FINGERPRINT = 'B7C2EEFD8DAC7806AF67DFCD92EB18126BC08312A7F2D6F3862E46013C7A6135'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ from unittest import mock
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
from fdroidserver import common, signindex
|
from fdroidserver import common, signindex
|
||||||
from .shared_test_code import GP_FINGERPRINT, mkdtemp
|
|
||||||
|
|
||||||
|
from .shared_test_code import GP_FINGERPRINT, mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,16 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
import unittest
|
import unittest
|
||||||
import yaml
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from .shared_test_code import TmpCwd, mkdtemp
|
import yaml
|
||||||
|
|
||||||
import fdroidserver.build
|
import fdroidserver.build
|
||||||
import fdroidserver.common
|
import fdroidserver.common
|
||||||
|
|
||||||
|
from .shared_test_code import TmpCwd, mkdtemp
|
||||||
|
|
||||||
|
|
||||||
class FakeProcess:
|
class FakeProcess:
|
||||||
output = 'fake output'
|
output = 'fake output'
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import git
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
from unittest import mock
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
import git
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
import fdroidserver.checkupdates
|
import fdroidserver.checkupdates
|
||||||
|
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,40 +1,44 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import difflib
|
import difflib
|
||||||
import git
|
|
||||||
import glob
|
import glob
|
||||||
|
import gzip
|
||||||
import importlib
|
import importlib
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import ruamel.yaml
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import textwrap
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
import textwrap
|
|
||||||
import gzip
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from zipfile import BadZipFile, ZipFile
|
|
||||||
from unittest import mock
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from unittest import mock
|
||||||
|
from zipfile import BadZipFile, ZipFile
|
||||||
|
|
||||||
|
import git
|
||||||
|
import ruamel.yaml
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
import fdroidserver.signindex
|
|
||||||
import fdroidserver.common
|
import fdroidserver.common
|
||||||
import fdroidserver.metadata
|
import fdroidserver.metadata
|
||||||
from .shared_test_code import TmpCwd, mkdtemp, mkdir_testfiles
|
import fdroidserver.signindex
|
||||||
|
from fdroidserver._yaml import config_dump, yaml, yaml_dumper
|
||||||
from fdroidserver.common import ANTIFEATURES_CONFIG_NAME, CATEGORIES_CONFIG_NAME
|
from fdroidserver.common import ANTIFEATURES_CONFIG_NAME, CATEGORIES_CONFIG_NAME
|
||||||
from fdroidserver._yaml import yaml, yaml_dumper, config_dump
|
from fdroidserver.exception import (
|
||||||
from fdroidserver.exception import FDroidException, VCSException,\
|
FDroidException,
|
||||||
MetaDataException, VerificationException
|
MetaDataException,
|
||||||
|
VCSException,
|
||||||
|
VerificationException,
|
||||||
|
)
|
||||||
from fdroidserver.looseversion import LooseVersion
|
from fdroidserver.looseversion import LooseVersion
|
||||||
|
|
||||||
|
from .shared_test_code import TmpCwd, mkdir_testfiles, mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
@ -2415,9 +2419,10 @@ class CommonTest(SetUpTearDownMixin, unittest.TestCase):
|
||||||
@mock.patch('sdkmanager._generate_package_xml', lambda a, b, c: None)
|
@mock.patch('sdkmanager._generate_package_xml', lambda a, b, c: None)
|
||||||
def test_auto_install_ndk_mock_dl(self):
|
def test_auto_install_ndk_mock_dl(self):
|
||||||
"""Test NDK installs by actually calling sdkmanager"""
|
"""Test NDK installs by actually calling sdkmanager"""
|
||||||
import sdkmanager
|
|
||||||
import importlib.metadata
|
import importlib.metadata
|
||||||
|
|
||||||
|
import sdkmanager
|
||||||
|
|
||||||
sdkmanager_version = LooseVersion(importlib.metadata.version('sdkmanager'))
|
sdkmanager_version = LooseVersion(importlib.metadata.version('sdkmanager'))
|
||||||
if sdkmanager_version < LooseVersion('0.6.4'):
|
if sdkmanager_version < LooseVersion('0.6.4'):
|
||||||
raise unittest.SkipTest('needs fdroid sdkmanager >= 0.6.4')
|
raise unittest.SkipTest('needs fdroid sdkmanager >= 0.6.4')
|
||||||
|
|
|
@ -11,7 +11,8 @@ from unittest import mock
|
||||||
import git
|
import git
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
from .shared_test_code import TmpCwd, mkdtemp, VerboseFalseOptions
|
|
||||||
|
from .shared_test_code import TmpCwd, VerboseFalseOptions, mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
import unittest
|
import unittest
|
||||||
import unittest.mock
|
import unittest.mock
|
||||||
|
|
||||||
from .shared_test_code import mock_urlopen
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
|
|
||||||
|
from .shared_test_code import mock_urlopen
|
||||||
|
|
||||||
|
|
||||||
class GithubApiTest(unittest.TestCase):
|
class GithubApiTest(unittest.TestCase):
|
||||||
def test__init(self):
|
def test__init(self):
|
||||||
|
|
|
@ -5,11 +5,11 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from fdroidserver import common, gpgsign
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
|
from fdroidserver import common, gpgsign
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@ import git
|
||||||
import requests
|
import requests
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from .shared_test_code import TmpCwd, mkdtemp, VerboseFalseOptions
|
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
import fdroidserver.import_subcommand
|
import fdroidserver.import_subcommand
|
||||||
|
|
||||||
|
from .shared_test_code import TmpCwd, VerboseFalseOptions, mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
|
|
|
@ -3,21 +3,22 @@
|
||||||
import copy
|
import copy
|
||||||
import datetime
|
import datetime
|
||||||
import glob
|
import glob
|
||||||
import os
|
|
||||||
import unittest
|
|
||||||
from pathlib import Path
|
|
||||||
import yaml
|
|
||||||
import zipfile
|
|
||||||
from unittest.mock import patch
|
|
||||||
import requests
|
|
||||||
import tempfile
|
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import tempfile
|
||||||
|
import unittest
|
||||||
|
import zipfile
|
||||||
|
from pathlib import Path
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
import requests
|
||||||
|
import yaml
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
from fdroidserver import common, index, publish, signindex, update
|
from fdroidserver import common, index, publish, signindex, update
|
||||||
from .shared_test_code import GP_FINGERPRINT, TmpCwd, mkdtemp
|
|
||||||
|
|
||||||
|
from .shared_test_code import GP_FINGERPRINT, TmpCwd, mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import unittest
|
||||||
|
|
||||||
import fdroidserver.common
|
import fdroidserver.common
|
||||||
import fdroidserver.init
|
import fdroidserver.init
|
||||||
|
|
||||||
from .shared_test_code import mkdtemp
|
from .shared_test_code import mkdtemp
|
||||||
|
|
||||||
basedir = pathlib.Path(__file__).parent
|
basedir = pathlib.Path(__file__).parent
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import os
|
import os
|
||||||
import textwrap
|
import textwrap
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ except ModuleNotFoundError:
|
||||||
from androguard.core.apk import get_apkid
|
from androguard.core.apk import get_apkid
|
||||||
|
|
||||||
from fdroidserver._yaml import yaml, yaml_dumper
|
from fdroidserver._yaml import yaml, yaml_dumper
|
||||||
|
|
||||||
from .shared_test_code import mkdir_testfiles
|
from .shared_test_code import mkdir_testfiles
|
||||||
|
|
||||||
# TODO: port generic tests that use index.xml to index-v2 (test that
|
# TODO: port generic tests that use index.xml to index-v2 (test that
|
||||||
|
|
|
@ -9,13 +9,13 @@ import unittest
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from .shared_test_code import mkdtemp
|
|
||||||
|
|
||||||
import fdroidserver.common
|
import fdroidserver.common
|
||||||
import fdroidserver.lint
|
import fdroidserver.lint
|
||||||
import fdroidserver.metadata
|
import fdroidserver.metadata
|
||||||
from fdroidserver._yaml import config_dump
|
from fdroidserver._yaml import config_dump
|
||||||
|
|
||||||
|
from .shared_test_code import mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pkgutil
|
import pkgutil
|
||||||
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
import unittest
|
import unittest
|
||||||
import tempfile
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
import fdroidserver.__main__
|
import fdroidserver.__main__
|
||||||
|
|
||||||
from .shared_test_code import TmpCwd, TmpPyPath
|
from .shared_test_code import TmpCwd, TmpPyPath
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,22 +4,23 @@ import copy
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import ruamel.yaml
|
|
||||||
import shutil
|
import shutil
|
||||||
import unittest
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
|
import unittest
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
import ruamel.yaml
|
||||||
|
|
||||||
import fdroidserver
|
import fdroidserver
|
||||||
from fdroidserver import metadata
|
from fdroidserver import metadata
|
||||||
from fdroidserver.exception import MetaDataException
|
|
||||||
from fdroidserver.common import DEFAULT_LOCALE
|
|
||||||
from fdroidserver._yaml import yaml
|
from fdroidserver._yaml import yaml
|
||||||
from .shared_test_code import TmpCwd, mkdtemp
|
from fdroidserver.common import DEFAULT_LOCALE
|
||||||
|
from fdroidserver.exception import MetaDataException
|
||||||
|
|
||||||
|
from .shared_test_code import TmpCwd, mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,17 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import requests
|
|
||||||
import socket
|
import socket
|
||||||
import tempfile
|
import tempfile
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
from pathlib import Path
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
from fdroidserver import net
|
from fdroidserver import net
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
|
|
||||||
class RetryServer:
|
class RetryServer:
|
||||||
|
|
|
@ -2,19 +2,18 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import requests
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
import yaml
|
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from fdroidserver import common, exception, index, nightly
|
import requests
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
from fdroidserver import common, exception, index, nightly
|
||||||
|
|
||||||
DEBUG_KEYSTORE = '/u3+7QAAAAIAAAABAAAAAQAPYW5kcm9pZGRlYnVna2V5AAABNYhAuskAAAK8MIICuDAOBgorBgEEASoCEQEBBQAEggKkqRnFlhidQmVff83bsAeewXPIsF0jiymzJnvrnUAQtCK0MV9uZonu37Mrj/qKLn56mf6QcvEoKvpCstZxzftgYYpAHWMVLM+hy2Z707QZEHlY7Ukppt8DItj+dXkeqGt7f8KzOb2AQwDbt9lm1fJb+MefLowTaubtvrLMcKIne43CbCu2D8HyN7RPWpEkVetA2Qgr5W4sa3tIUT80afqo9jzwJjKCspuxY9A1M8EIM3/kvyLo2B9r0cuWwRjYZXJ6gmTYI2ARNz0KQnCZUok14NDg+mZTb1B7AzRfb0lfjbA6grbzuAL+WaEpO8/LgGfuOh7QBZBT498TElOaFfQ9toQWA79wAmrQCm4OoFukpPIy2m/l6VjJSmlK5Q+CMOl/Au7OG1sUUCTvPaIr0XKnsiwDJ7a71n9garnPWHkvuWapSRCzCNgaUoGQjB+fTMJFFrwT8P1aLfM6onc3KNrDStoQZuYe5ngCLlNS56bENkVGvJBfdkboxtHZjqDXXON9jWGSOI527J3o2D5sjSVyx3T9XPrsL4TA/nBtdU+c/+M6aoASZR2VymzAKdMrGfj9kE5GXp8vv2vkJj9+OJ4Jm5yeczocc/Idtojjb1yg+sq1yY8kAQxgezpY1rpgi2jF3tSN01c23DNvAaSJLJX2ZuH8sD40ACc80Y1Qp1nUTdpwBZUeaeNruBwx4PHU8GnC71FwtiUpwNs0OoSl0pgDUJ3ODC5bs8B5QmW1wu1eg7I4mMSmCsNGW6VN3sFcu+WEqnmTxPoZombdFZKxsr2oq359Nn4bJ6Uc9PBz/sXsns7Zx1vND/oK/Jv5Y269UVAMeKX/eGpfnxzagW3tqGbOu12C2p9Azo5VxiU2fG/tmk2PjaG5hV/ywReco7I6C1p8OWM2fwAAAAEABVguNTA5AAAB6TCCAeUwggFOoAMCAQICBE89gTUwDQYJKoZIhvcNAQEFBQAwNzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0FuZHJvaWQxFjAUBgNVBAMTDUFuZHJvaWQgRGVidWcwHhcNMTIwMjE2MjIyMDM3WhcNNDIwMjA4MjIyMDM3WjA3MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHQW5kcm9pZDEWMBQGA1UEAxMNQW5kcm9pZCBEZWJ1ZzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA3AKU7S7JXhUjEwxWP1/LPHXieh61SaA/+xbpqsPA+yjGz1sAcGAyuG6bjNAVm56pq7nkjJzicX7Wi83nUBo58DEC/quxOLdy0C4PEOSAeTnTT1RJIwMDvOgiL1GFCErvQ7gCH6zuAID/JRFbN6nIkhDjs2DYnSBl7aJJf8wCLc0CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAoq/TJffA0l+ZGf89xndmHdxrO6qi+TzSlByvLZ4eFfCovTh1iO+Edrd5V1yXGLxyyvdsadMAFZT8SaxMrP5xxhJ0nra0APWYLpA96M//auMhQBWPgqPntwgvEZuEH7f0kdItjBJ39yijbG8xfgwid6XqNUo0TDDkp/wNWKpJ9tJe+2PrGw1NAvrgSydoH2j8DI1Eq'
|
DEBUG_KEYSTORE = '/u3+7QAAAAIAAAABAAAAAQAPYW5kcm9pZGRlYnVna2V5AAABNYhAuskAAAK8MIICuDAOBgorBgEEASoCEQEBBQAEggKkqRnFlhidQmVff83bsAeewXPIsF0jiymzJnvrnUAQtCK0MV9uZonu37Mrj/qKLn56mf6QcvEoKvpCstZxzftgYYpAHWMVLM+hy2Z707QZEHlY7Ukppt8DItj+dXkeqGt7f8KzOb2AQwDbt9lm1fJb+MefLowTaubtvrLMcKIne43CbCu2D8HyN7RPWpEkVetA2Qgr5W4sa3tIUT80afqo9jzwJjKCspuxY9A1M8EIM3/kvyLo2B9r0cuWwRjYZXJ6gmTYI2ARNz0KQnCZUok14NDg+mZTb1B7AzRfb0lfjbA6grbzuAL+WaEpO8/LgGfuOh7QBZBT498TElOaFfQ9toQWA79wAmrQCm4OoFukpPIy2m/l6VjJSmlK5Q+CMOl/Au7OG1sUUCTvPaIr0XKnsiwDJ7a71n9garnPWHkvuWapSRCzCNgaUoGQjB+fTMJFFrwT8P1aLfM6onc3KNrDStoQZuYe5ngCLlNS56bENkVGvJBfdkboxtHZjqDXXON9jWGSOI527J3o2D5sjSVyx3T9XPrsL4TA/nBtdU+c/+M6aoASZR2VymzAKdMrGfj9kE5GXp8vv2vkJj9+OJ4Jm5yeczocc/Idtojjb1yg+sq1yY8kAQxgezpY1rpgi2jF3tSN01c23DNvAaSJLJX2ZuH8sD40ACc80Y1Qp1nUTdpwBZUeaeNruBwx4PHU8GnC71FwtiUpwNs0OoSl0pgDUJ3ODC5bs8B5QmW1wu1eg7I4mMSmCsNGW6VN3sFcu+WEqnmTxPoZombdFZKxsr2oq359Nn4bJ6Uc9PBz/sXsns7Zx1vND/oK/Jv5Y269UVAMeKX/eGpfnxzagW3tqGbOu12C2p9Azo5VxiU2fG/tmk2PjaG5hV/ywReco7I6C1p8OWM2fwAAAAEABVguNTA5AAAB6TCCAeUwggFOoAMCAQICBE89gTUwDQYJKoZIhvcNAQEFBQAwNzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0FuZHJvaWQxFjAUBgNVBAMTDUFuZHJvaWQgRGVidWcwHhcNMTIwMjE2MjIyMDM3WhcNNDIwMjA4MjIyMDM3WjA3MQswCQYDVQQGEwJVUzEQMA4GA1UEChMHQW5kcm9pZDEWMBQGA1UEAxMNQW5kcm9pZCBEZWJ1ZzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA3AKU7S7JXhUjEwxWP1/LPHXieh61SaA/+xbpqsPA+yjGz1sAcGAyuG6bjNAVm56pq7nkjJzicX7Wi83nUBo58DEC/quxOLdy0C4PEOSAeTnTT1RJIwMDvOgiL1GFCErvQ7gCH6zuAID/JRFbN6nIkhDjs2DYnSBl7aJJf8wCLc0CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAoq/TJffA0l+ZGf89xndmHdxrO6qi+TzSlByvLZ4eFfCovTh1iO+Edrd5V1yXGLxyyvdsadMAFZT8SaxMrP5xxhJ0nra0APWYLpA96M//auMhQBWPgqPntwgvEZuEH7f0kdItjBJ39yijbG8xfgwid6XqNUo0TDDkp/wNWKpJ9tJe+2PrGw1NAvrgSydoH2j8DI1Eq'
|
||||||
DEBUG_KEYSTORE_KEY_FILE_NAME = (
|
DEBUG_KEYSTORE_KEY_FILE_NAME = (
|
||||||
|
|
|
@ -15,17 +15,15 @@ import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import unittest
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from fdroidserver import publish
|
from fdroidserver import common, metadata, publish, signatures
|
||||||
from fdroidserver import common
|
|
||||||
from fdroidserver import metadata
|
|
||||||
from fdroidserver import signatures
|
|
||||||
from fdroidserver._yaml import yaml
|
from fdroidserver._yaml import yaml
|
||||||
from fdroidserver.exception import FDroidException
|
from fdroidserver.exception import FDroidException
|
||||||
from .shared_test_code import mkdtemp, VerboseFalseOptions
|
|
||||||
|
from .shared_test_code import VerboseFalseOptions, mkdtemp
|
||||||
|
|
||||||
basedir = pathlib.Path(__file__).parent
|
basedir = pathlib.Path(__file__).parent
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
|
import unittest
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from fdroidserver import metadata, rewritemeta
|
from fdroidserver import metadata, rewritemeta
|
||||||
|
|
||||||
from .shared_test_code import TmpCwd, mkdtemp
|
from .shared_test_code import TmpCwd, mkdtemp
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
|
@ -26,6 +26,7 @@ import fdroidserver.common
|
||||||
import fdroidserver.exception
|
import fdroidserver.exception
|
||||||
import fdroidserver.metadata
|
import fdroidserver.metadata
|
||||||
import fdroidserver.scanner
|
import fdroidserver.scanner
|
||||||
|
|
||||||
from .shared_test_code import TmpCwd, mkdtemp, mock_open_to_str
|
from .shared_test_code import TmpCwd, mkdtemp, mock_open_to_str
|
||||||
|
|
||||||
basedir = pathlib.Path(__file__).parent
|
basedir = pathlib.Path(__file__).parent
|
||||||
|
|
|
@ -6,9 +6,10 @@ import sys
|
||||||
import unittest
|
import unittest
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
from .shared_test_code import TmpCwd
|
|
||||||
from fdroidserver import common, signatures
|
from fdroidserver import common, signatures
|
||||||
|
|
||||||
|
from .shared_test_code import TmpCwd
|
||||||
|
|
||||||
basedir = os.path.dirname(__file__)
|
basedir = os.path.dirname(__file__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,11 @@ import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from fdroidserver import apksigcopier, common, exception, signindex, update
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
from fdroidserver import apksigcopier, common, exception, signindex, update
|
||||||
|
|
||||||
|
|
||||||
class Options:
|
class Options:
|
||||||
allow_disabled_algorithms = False
|
allow_disabled_algorithms = False
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import git
|
|
||||||
import glob
|
import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
|
@ -12,16 +11,18 @@ import shutil
|
||||||
import string
|
import string
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import textwrap
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
import yaml
|
|
||||||
import zipfile
|
import zipfile
|
||||||
import textwrap
|
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
import git
|
||||||
|
import yaml
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# these were moved in androguard 4.0
|
# these were moved in androguard 4.0
|
||||||
from androguard.core.apk import APK
|
from androguard.core.apk import APK
|
||||||
|
@ -44,15 +45,16 @@ except ImportError:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from yaml import Loader as FullLoader
|
from yaml import Loader as FullLoader
|
||||||
|
|
||||||
|
from PIL import PngImagePlugin
|
||||||
|
|
||||||
import fdroidserver.common
|
import fdroidserver.common
|
||||||
import fdroidserver.exception
|
import fdroidserver.exception
|
||||||
import fdroidserver.metadata
|
import fdroidserver.metadata
|
||||||
import fdroidserver.update
|
import fdroidserver.update
|
||||||
from fdroidserver.common import CATEGORIES_CONFIG_NAME
|
from fdroidserver.common import CATEGORIES_CONFIG_NAME
|
||||||
from fdroidserver.looseversion import LooseVersion
|
from fdroidserver.looseversion import LooseVersion
|
||||||
from .shared_test_code import TmpCwd, mkdtemp
|
|
||||||
from PIL import PngImagePlugin
|
|
||||||
|
|
||||||
|
from .shared_test_code import TmpCwd, mkdtemp
|
||||||
|
|
||||||
DONATION_FIELDS = ('Donate', 'Liberapay', 'OpenCollective')
|
DONATION_FIELDS = ('Donate', 'Liberapay', 'OpenCollective')
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@ from git import Repo
|
||||||
|
|
||||||
import fdroidserver.common
|
import fdroidserver.common
|
||||||
import fdroidserver.metadata
|
import fdroidserver.metadata
|
||||||
from .shared_test_code import mkdtemp, VerboseFalseOptions
|
|
||||||
|
from .shared_test_code import VerboseFalseOptions, mkdtemp
|
||||||
|
|
||||||
|
|
||||||
class VCSTest(unittest.TestCase):
|
class VCSTest(unittest.TestCase):
|
||||||
|
|
|
@ -6,13 +6,11 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from fdroidserver import verify
|
from fdroidserver import verify
|
||||||
|
|
||||||
|
|
||||||
TEST_APP_ENTRY = {
|
TEST_APP_ENTRY = {
|
||||||
"1539780240.3885746": {
|
"1539780240.3885746": {
|
||||||
"local": {
|
"local": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue