Skip to content

Commit

Permalink
chore: Upgrade to apkeep 0.16.0, python 3.11 & Debian bookworm (#612)
Browse files Browse the repository at this point in the history
* Add support to apkeep v16

* chore: Upgrade to debian bookworm

* chore: Upgrade to python 3.11

---------

Co-authored-by: pnu <[email protected]>
  • Loading branch information
Jean-BaptisteC and pnu-s authored May 24, 2024
1 parent eab611c commit 19bcff9
Show file tree
Hide file tree
Showing 9 changed files with 366 additions and 290 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
image: postgres:15
env:
POSTGRES_USER: exodus
POSTGRES_PASSWORD: exodus
Expand All @@ -34,8 +34,8 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exodus-core = "==1.3.12"
google-play-scraper = "~=1.2.2"
gunicorn = "~=22.0"
mistune = "~=0.8"
psycopg2 = "~=2.8.6"
psycopg2 = "~=2.9.9"
requests = "~=2.27"
protobuf = "~=3.20.1"
whitenoise = "~=6.2.0"
Expand Down
602 changes: 338 additions & 264 deletions Pipfile.lock

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions doc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ You have different ways of setting up your development environment:

You can tweak your instance by changing [some settings](#configuring-your-local-instance).

Follow instructions to get AAS token [here](https://github.com/EFForg/apkeep/blob/master/USAGE-google-play.md).

Create the file `exodus/exodus/settings/custom_docker.py` with the following content:

```bash
from .docker import *

GOOGLE_ACCOUNT_USERNAME = "<a valid google account>"
GOOGLE_ACCOUNT_PASSWORD = "<a valid google password>"
GOOGLE_ACCOUNT_EMAIL = "<a valid google account>"
GOOGLE_ACCOUNT_AAS_TOKEN = "<a valid aas token>"

# Overwrite any other settings you wish to
```
Expand Down Expand Up @@ -121,13 +123,15 @@ pipenv install --dev

You can tweak your instance by changing [some settings](#configuring-your-local-instance).

Follow instructions to get AAS token [here](https://github.com/EFForg/apkeep/blob/master/USAGE-google-play.md).

Create the file `exodus/exodus/settings/custom_dev.py` with the following content:

```bash
from .dev import *

GOOGLE_ACCOUNT_USERNAME = "<a valid google account>"
GOOGLE_ACCOUNT_PASSWORD = "<a valid google password>"
GOOGLE_ACCOUNT_EMAIL = "<a valid google account>"
GOOGLE_ACCOUNT_AAS_TOKEN = "<a valid google aas token>"

# Overwrite any other settings you wish to
```
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"
services:

amqp:
image: rabbitmq:3.8.9-alpine
image: rabbitmq:3.10.8-alpine
networks:
backend:
aliases:
Expand All @@ -16,7 +16,7 @@ services:
POSTGRES_PASSWORD: exodus
POSTGRES_DB: exodus
PGDATA: /var/lib/postgresql/data/pgdata
image: postgres:11
image: postgres:15
restart: always
networks:
backend:
Expand Down Expand Up @@ -70,7 +70,7 @@ services:
environment:
MINIO_ROOT_USER: exodusexodus
MINIO_ROOT_PASSWORD: exodusexodus
image: minio/minio:RELEASE.2022-03-14T18-25-24Z
image: minio/minio:RELEASE.2024-01-05T22-17-24Z
networks:
backend:
aliases:
Expand Down
14 changes: 7 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
FROM alpine:3.18 AS apkeep-download

ENV APKEEP_VERSION=0.15.0
ENV APKEEP_VERSION=0.16.0

RUN wget https://github.com/EFForg/apkeep/releases/download/${APKEEP_VERSION}/apkeep-x86_64-unknown-linux-gnu -q -O /tmp/apkeep \
&& chmod +x /tmp/apkeep

FROM python:3.9-slim-bullseye
FROM python:3.11-slim-bookworm
LABEL maintainer="Codimp"

RUN apt-get update && apt-get install --no-install-recommends -y \
dexdump=10.0.0* \
postgresql-client-13=13* \
libpq-dev=13.* \
gcc=4:10.2.* \
dexdump=11.0.0* \
postgresql-client-15=15* \
libpq-dev=15.* \
gcc=4:12.2.* \
musl-dev=1.2.* \
libc6-dev=2.* \
gettext=0.* \
pipenv=11.* \
pipenv=2022.12.* \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
10 changes: 4 additions & 6 deletions exodus/exodus/core/static_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,10 @@ def download_google_apk(storage, handle, tmp_dir, apk_name, apk_tmp):
"google-play",
"-a",
handle,
"-u",
settings.GOOGLE_ACCOUNT_USERNAME,
"-p",
settings.GOOGLE_ACCOUNT_PASSWORD,
"-o",
"device=walleye",
"-e",
settings.GOOGLE_ACCOUNT_EMAIL,
"-t",
settings.GOOGLE_ACCOUNT_AAS_TOKEN,
tmp_dir
], env=os.environ.copy())

Expand Down
4 changes: 2 additions & 2 deletions exodus/exodus/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@
ALLOW_APK_UPLOAD = False
DISABLE_SUBMISSIONS = False

GOOGLE_ACCOUNT_USERNAME = env('EXODUS_GOOGLE_USERNAME', default='')
GOOGLE_ACCOUNT_PASSWORD = env('EXODUS_GOOGLE_PASSWORD', default='')
GOOGLE_ACCOUNT_EMAIL = env('EXODUS_GOOGLE_EMAIL', default='')
GOOGLE_ACCOUNT_AAS_TOKEN = env('EXODUS_GOOGLE_AAS_TOKEN', default='')
2 changes: 1 addition & 1 deletion exodus/restful_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def search_strict_handle_details(request, handle):
'creator': app.creator,
'downloads': app.downloads,
'trackers': [t.id for t in report.found_trackers.all()],
'permissions': [p.name for p in app.permission_set.all()]
'permissions': sorted([p.name for p in app.permission_set.all()])
})
except Report.DoesNotExist:
return JsonResponse({}, safe=True)
Expand Down

0 comments on commit 19bcff9

Please sign in to comment.