mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 07:52:06 -08:00
Fix rustup not found in Docker
This commit is contained in:
parent
5b6de88f97
commit
a48c4140f9
2 changed files with 6 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.11-slim-bullseye
|
||||
FROM ubuntu:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -9,6 +9,8 @@ COPY . /app
|
|||
RUN apt-get update && apt-get install -y \
|
||||
# Makefile utils
|
||||
build-essential make git msitools wget unzip \
|
||||
# Python
|
||||
python3 python3-dev python3-pip \
|
||||
# Camoufox build system utils
|
||||
p7zip-full golang-go
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ def list_files(root_dir, suffix='*.patch'):
|
|||
|
||||
def add_rustup(*targets):
|
||||
for rust_target in targets:
|
||||
os.system(f'rustup target add "{rust_target}"')
|
||||
os.system(f'~/.cargo/bin/rustup target add "{rust_target}"')
|
||||
|
||||
|
||||
"""
|
||||
|
|
@ -117,7 +117,6 @@ def camoufox_patches():
|
|||
# Set cross building
|
||||
print(f'Using target: {moz_target}')
|
||||
_update_mozconfig()
|
||||
_update_rustup()
|
||||
|
||||
# Copy the search-config.json file
|
||||
run('cp -v ../assets/search-config.json services/settings/dumps/main/search-config.json')
|
||||
|
|
@ -176,7 +175,7 @@ def _get_moz_target():
|
|||
raise ValueError(f"Unsupported target: {target}")
|
||||
|
||||
|
||||
def _update_rustup():
|
||||
def _update_rustup(target):
|
||||
if target == "linux":
|
||||
add_rustup("aarch64-unknown-linux-gnu", "i686-unknown-linux-gnu")
|
||||
elif target == "windows":
|
||||
|
|
@ -257,6 +256,7 @@ if __name__ == "__main__":
|
|||
else:
|
||||
target, arch = "linux", "x86_64"
|
||||
moz_target = _get_moz_target()
|
||||
_update_rustup(target=target)
|
||||
|
||||
# Check if the folder exists
|
||||
if not os.path.exists(f'camoufox-{version}-{release}/configure.py'):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue