Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade to apkeep 0.16.0, python 3.11 & Debian bookworm #612

Merged
merged 6 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading