From 17645a40bd087b7b0d8887bb3277bbcf48722cb5 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 28 Jul 2024 13:27:48 +0000 Subject: [PATCH 01/13] docker-image: Update to debian 12 and migrate pip to deb packages --- Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index db92d7f9a91..522a2e731e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ automake \ autopoint \ bash \ + bash-completion \ bc \ bison \ build-essential \ @@ -32,8 +33,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ g++-multilib \ gawk \ gettext \ + gh \ git \ gperf \ + httpie \ imagemagick \ intltool \ jq \ @@ -51,7 +54,11 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ libtool \ libunistring-dev \ lzip \ + man-db \ + manpages-dev \ mercurial \ + meson \ + mlocate \ moreutils \ ninja-build \ patchelf \ @@ -60,7 +67,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ python2 \ python3 \ python3-distutils \ + python3-pip \ + python3-virtualenv \ rename \ + ripgrep \ rsync \ ruby-mustache \ scons \ @@ -68,6 +78,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ sudo \ swig \ texinfo \ + time \ + tree \ unzip \ xmlto \ zip \ @@ -78,18 +90,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ adduser user sudo && \ echo "%user ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/users -# Install setuptools, wheel and pip for Python2 -RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O - | python2 -# Install virtualenv and httpie for Python2 -# Use pip2 as default pip -> python3 -RUN pip2 install virtualenv httpie - -# Install setuptools, wheel and pip for Python3 -# Default pip -> python3 aware for native python wheels builds -RUN wget https://bootstrap.pypa.io/get-pip.py -O - | python3 -# Install meson cross-platform build system -RUN pip3 install meson==1.0.0 - # Volume pointing to spksrc sources VOLUME /spksrc WORKDIR /spksrc From fdcf090bc9f2dc370a69f2990becd01225e6d75c Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 28 Jul 2024 13:34:25 +0000 Subject: [PATCH 02/13] spksrc: Update master readme file --- README.md | 70 ++++++++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index d184f005a22..8475f5bdeba 100644 --- a/README.md +++ b/README.md @@ -47,23 +47,21 @@ docker run -it --platform=linux/amd64 -v $(pwd):/spksrc -w /spksrc -e TAR_CMD="f ### Virtual machine -A virtual machine based on an 64-bit version of Debian 11 stable OS is recommended. Non-x86 architectures are not supported. +A virtual machine based on an 64-bit version of Debian 12 stable OS is recommended. Non-x86 architectures are not supported. Install the requirements (in sync with `Dockerfile`): ```bash sudo dpkg --add-architecture i386 && sudo apt-get update sudo apt update -sudo apt install autoconf-archive autogen automake autopoint bash bc bison \ +sudo apt install autoconf-archive autogen automake autopoint bash bash-completion bc bison \ build-essential check cmake curl cython3 debootstrap ed expect fakeroot flex \ - g++-multilib gawk gettext git gperf imagemagick intltool jq libbz2-dev libc6-i386 \ - libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \ - libpcre3-dev libssl-dev libtool libunistring-dev lzip mercurial moreutils ninja-build \ - patchelf php pkg-config python2 python3 python3-distutils rename ruby-mustache rsync scons subversion \ - swig texinfo unzip xmlto zip zlib1g-dev -wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O - | sudo python2 -sudo pip2 install wheel httpie -wget https://bootstrap.pypa.io/get-pip.py -O - | sudo python3 -sudo pip3 install meson==1.0.0 + g++-multilib gawk gettext git gperf httpie imagemagick intltool jq libbz2-dev \ + libc6-i386 libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev \ + libmount-dev libncurses-dev libpcre3-dev libssl-dev libtool libunistring-dev \ + lzip man-db manpages-dev mercurial meson mlocate moreutils ninja-build \ + patchelf php pkg-config python3 python3-distutils python3-pip python3-virtualenv \ + rename ripgrep ruby-mustache rsync scons subversion \ + swig texinfo time tree unzip xmlto zip zlib1g-dev ``` From there, follow the instructions in the [Developers HOW TO]. @@ -73,35 +71,23 @@ From there, follow the instructions in the [Developers HOW TO]. ### LXC -A container based on 64-bit version of Debian 11 stable OS is recommended. Non-x86 architectures are not supported. The following assumes your LXD/LXC environment is already initiated (e.g. `lxc init`) and you have minimal LXD/LXC basic knowledge : -1. Create a new container (will use x86_64/amd64 arch by default): `lxc launch images:debian/11 spksrc` +A container based on 64-bit version of Debian 12 stable OS is recommended. Non-x86 architectures are not supported. The following assumes your LXD/LXC environment is already initiated (e.g. `lxc init`) and you have minimal LXD/LXC basic knowledge : +1. Create a new container (will use x86_64/amd64 arch by default): `lxc launch images:debian/12 spksrc` 2. Enable i386 arch: `lxc exec spksrc -- /usr/bin/dpkg --add-architecture i386` 3. Update apt channels: `lxc exec spksrc -- /usr/bin/apt update` 4. Install all required packages: ```bash -lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopoint bash bc bison \ - build-essential check cmake curl cython3 debootstrap ed expect fakeroot flex \ - g++-multilib gawk gettext git gperf imagemagick intltool jq libbz2-dev libc6-i386 \ - libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \ - libpcre3-dev libssl-dev libtool libunistring-dev lzip mercurial moreutils ninja-build \ - patchelf php pkg-config python2 python3 python3-distutils rename rsync ruby-mustache scons subversion \ - swig texinfo unzip xmlto zip zlib1g-dev -``` -5. Install `python2` wheels: -```bash -lxc exec spksrc -- /bin/bash -c "wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O - | python2" -lxc exec spksrc -- /bin/bash -c "pip2 install virtualenv httpie" -``` -6. Install `python3` `pip`: -```bash -lxc exec spksrc -- /bin/bash -c "wget https://bootstrap.pypa.io/get-pip.py -O - | python3" -``` -7. Install `meson`: -```bash -lxc exec spksrc -- /bin/bash -c "pip3 install meson==1.0.0" +lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopoint bash bash-completion bc bison \ + build-essential check cmake curl cython3 debootstrap ed expect fakeroot flex \ + g++-multilib gawk gettext git gperf httpie imagemagick intltool jq libbz2-dev \ + libc6-i386 libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev \ + libmount-dev libncurses-dev libpcre3-dev libssl-dev libtool libunistring-dev \ + lzip man-db manpages-dev mercurial meson mlocate moreutils ninja-build \ + patchelf php pkg-config python3 python3-distutils python3-pip python3-virtualenv \ + rename ripgrep ruby-mustache rsync scons subversion \ + swig texinfo time tree unzip xmlto zip zlib1g-dev ``` - #### LXC: `spksrc` user 8. By default it is assumed that you will be running as `spksrc` user into the LXC container. Such user needs to be created into the default container image: ```bash @@ -118,22 +104,6 @@ lxc exec spksrc -- su --login spksrc spksrc@spksrc:~$ ``` -#### (OPTIONAL) Install misc base tools: -```bash -lxc exec spksrc -- /usr/bin/apt install bash-completion man-db manpages-dev \ - mlocate ripgrep rsync tree time -lxc exec spksrc -- /usr/bin/updatedb -``` -Install github client: -``` -$ lxc exec spksrc -- su --login root -# curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg -# echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null -# sudo apt update -# sudo apt install gh -# exit -``` - #### (OPTIONAL) LXC: Shared `spksrc` user You can create a shared user between your Debian/Ubuntu host and the LXC Debian container which simplifies greatly file management between the two. The following assumes you already created a user `spksrc` with uid 1001 in your Debian/Ubuntu host environment and that you which to share its `/home` userspace. 1. Create a mapping rule between the hosts and the LXC image: From c3bcd2a6b48fa2bdb0ef5110052ee0d0f05a2da0 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 28 Jul 2024 17:34:29 +0000 Subject: [PATCH 03/13] docker-image: Add python3-mako, nasm and yasm to default image --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 522a2e731e9..253a44d46c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,6 +60,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ meson \ mlocate \ moreutils \ + nasm \ ninja-build \ patchelf \ php \ @@ -67,6 +68,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ python2 \ python3 \ python3-distutils \ + python3-mako \ python3-pip \ python3-virtualenv \ rename \ @@ -82,6 +84,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ tree \ unzip \ xmlto \ + yasm \ zip \ zlib1g-dev && \ apt-get clean && \ From 54fd64221cb1779d6a9bf4bb1adc90e725ce4607 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 28 Jul 2024 17:38:41 +0000 Subject: [PATCH 04/13] spksrc: Update master readme file (mako, nasm, yasm) --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8475f5bdeba..381902660b5 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,10 @@ sudo apt install autoconf-archive autogen automake autopoint bash bash-completio g++-multilib gawk gettext git gperf httpie imagemagick intltool jq libbz2-dev \ libc6-i386 libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev \ libmount-dev libncurses-dev libpcre3-dev libssl-dev libtool libunistring-dev \ - lzip man-db manpages-dev mercurial meson mlocate moreutils ninja-build \ - patchelf php pkg-config python3 python3-distutils python3-pip python3-virtualenv \ + lzip man-db manpages-dev mercurial meson mlocate moreutils nasm ninja-build \ + patchelf php pkg-config python3 python3-distutils python3-mako python3-pip python3-virtualenv \ rename ripgrep ruby-mustache rsync scons subversion \ - swig texinfo time tree unzip xmlto zip zlib1g-dev + swig texinfo time tree unzip xmlto yasm zip zlib1g-dev ``` From there, follow the instructions in the [Developers HOW TO]. @@ -82,10 +82,10 @@ lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopo g++-multilib gawk gettext git gperf httpie imagemagick intltool jq libbz2-dev \ libc6-i386 libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev \ libmount-dev libncurses-dev libpcre3-dev libssl-dev libtool libunistring-dev \ - lzip man-db manpages-dev mercurial meson mlocate moreutils ninja-build \ - patchelf php pkg-config python3 python3-distutils python3-pip python3-virtualenv \ + lzip man-db manpages-dev mercurial meson mlocate moreutils nasm ninja-build \ + patchelf php pkg-config python3 python3-distutils python3-mako python3-pip python3-virtualenv \ rename ripgrep ruby-mustache rsync scons subversion \ - swig texinfo time tree unzip xmlto zip zlib1g-dev + swig texinfo time tree unzip xmlto yasm zip zlib1g-dev ``` #### LXC: `spksrc` user From 3c038b84e1e49140113cfda0b09400f75607bb65 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 28 Jul 2024 20:51:01 +0000 Subject: [PATCH 05/13] docker-image: Re-organise RUN to limit max characters --- Dockerfile | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 253a44d46c7..71468006f2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ gh \ git \ gperf \ - httpie \ imagemagick \ intltool \ jq \ @@ -56,21 +55,12 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ lzip \ man-db \ manpages-dev \ - mercurial \ - meson \ mlocate \ moreutils \ nasm \ - ninja-build \ patchelf \ php \ pkg-config \ - python2 \ - python3 \ - python3-distutils \ - python3-mako \ - python3-pip \ - python3-virtualenv \ rename \ ripgrep \ rsync \ @@ -86,10 +76,26 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ xmlto \ yasm \ zip \ - zlib1g-dev && \ - apt-get clean && \ + zlib1g-dev + +# Python based apps +RUN apt-get update && apt-get install --no-install-recommends -y \ + httpie \ + mercurial \ + meson \ + ninja-build \ + python3 \ + python3-distutils \ + python3-mako \ + python3-pip \ + python3-virtualenv + +# Clean-up apt db +RUN apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ - adduser --disabled-password --gecos '' user && \ + +# Add user +RUN adduser --disabled-password --gecos '' user && \ adduser user sudo && \ echo "%user ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/users From 05e2dccda551cb8724fc314bc0991346490da76c Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 28 Jul 2024 20:52:51 +0000 Subject: [PATCH 06/13] ffmpeg456: Add -latomic only for qoriq (@hgy59) Ref: https://github.com/SynoCommunity/spksrc/pull/6183#issuecomment-2254633684 --- cross/ffmpeg4/Makefile | 2 +- cross/ffmpeg5/Makefile | 2 +- cross/ffmpeg6/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cross/ffmpeg4/Makefile b/cross/ffmpeg4/Makefile index 4fb82d83e5f..2715995c68f 100644 --- a/cross/ffmpeg4/Makefile +++ b/cross/ffmpeg4/Makefile @@ -225,10 +225,10 @@ CONFIGURE_ARGS += --arch=arm64 --enable-neon --enable-thumb endif ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) -CONFIGURE_ARGS += --extra-libs=-latomic CONFIGURE_ARGS += --arch=ppc ifeq ($(findstring $(ARCH),qoriq),$(ARCH)) CONFIGURE_ARGS += --cpu=e500v2 +CONFIGURE_ARGS += --extra-libs=-latomic else CONFIGURE_ARGS += --cpu=e500 --disable-altivec endif diff --git a/cross/ffmpeg5/Makefile b/cross/ffmpeg5/Makefile index f4046041b6e..f05b5a48ead 100644 --- a/cross/ffmpeg5/Makefile +++ b/cross/ffmpeg5/Makefile @@ -224,10 +224,10 @@ CONFIGURE_ARGS += --arch=arm64 --enable-neon --enable-thumb endif ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) -CONFIGURE_ARGS += --extra-libs=-latomic CONFIGURE_ARGS += --arch=ppc ifeq ($(findstring $(ARCH),qoriq),$(ARCH)) CONFIGURE_ARGS += --cpu=e500v2 +CONFIGURE_ARGS += --extra-libs=-latomic else CONFIGURE_ARGS += --cpu=e500 --disable-altivec endif diff --git a/cross/ffmpeg6/Makefile b/cross/ffmpeg6/Makefile index e052e395672..99818edf098 100644 --- a/cross/ffmpeg6/Makefile +++ b/cross/ffmpeg6/Makefile @@ -224,10 +224,10 @@ CONFIGURE_ARGS += --arch=arm64 --enable-neon --enable-thumb endif ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) -CONFIGURE_ARGS += --extra-libs=-latomic CONFIGURE_ARGS += --arch=ppc ifeq ($(findstring $(ARCH),qoriq),$(ARCH)) CONFIGURE_ARGS += --cpu=e500v2 +CONFIGURE_ARGS += --extra-libs=-latomic else CONFIGURE_ARGS += --cpu=e500 --disable-altivec endif From e5c7243db2891a460eff989bdfcff29dcd86b618 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 30 Jul 2024 01:35:29 +0000 Subject: [PATCH 07/13] docker-image: Add python3-yaml as mandatory for IGC build --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 71468006f2d..b5ac228f5a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -88,7 +88,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ python3-distutils \ python3-mako \ python3-pip \ - python3-virtualenv + python3-virtualenv \ + python3-yaml # Clean-up apt db RUN apt-get clean && \ From 5f9500f33d01a20f1c223029340e920e53260070 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 30 Jul 2024 11:20:52 +0000 Subject: [PATCH 08/13] docker-image: Fixed debian12, hg install and updatedb --- Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5ac228f5a9..4862b25006a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye +FROM debian:bookworm LABEL description="Framework for maintaining and compiling native community packages for Synology devices" LABEL maintainer="SynoCommunity " LABEL url="https://synocommunity.com" @@ -33,7 +33,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ g++-multilib \ gawk \ gettext \ - gh \ git \ gperf \ imagemagick \ @@ -91,9 +90,18 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ python3-virtualenv \ python3-yaml +# Install hg github tool +RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ + apt update && \ + apt install gh + # Clean-up apt db RUN apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# Update locate db +RUN updatedb # Add user RUN adduser --disabled-password --gecos '' user && \ From 9229483e67790cfe2342f4c76d05149c518600fa Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 30 Jul 2024 20:15:52 -0400 Subject: [PATCH 09/13] Update Dockerfile - remove duplicate apt update Co-authored-by: hgy59 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4862b25006a..2b18d14643b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -78,7 +78,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ zlib1g-dev # Python based apps -RUN apt-get update && apt-get install --no-install-recommends -y \ +RUN apt-get install --no-install-recommends -y \ httpie \ mercurial \ meson \ From b7fd770ca39c77f3b0ad6e2294da0adb67b62bc6 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 31 Jul 2024 00:24:17 +0000 Subject: [PATCH 10/13] docker-image: apt-get is so Y2K, use apt instead --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2b18d14643b..a75d45167b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN dpkg --add-architecture i386 # Install required packages (in sync with README.rst instructions) # ATTENTION: the total length of the following RUN command must not exceed 1024 characters -RUN apt-get update && apt-get install --no-install-recommends -y \ +RUN apt update && apt install --no-install-recommends -y \ autoconf-archive \ autogen \ automake \ @@ -78,7 +78,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ zlib1g-dev # Python based apps -RUN apt-get install --no-install-recommends -y \ +RUN apt install --no-install-recommends -y \ httpie \ mercurial \ meson \ @@ -97,7 +97,7 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | d apt install gh # Clean-up apt db -RUN apt-get clean && \ +RUN apt clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Update locate db From 12a0251dc57d94a55acd666dfb32b089e964b4a1 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 31 Jul 2024 00:25:36 +0000 Subject: [PATCH 11/13] readme: Add missing python3-yaml --- README.md | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 381902660b5..c143a775adc 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,16 @@ Install the requirements (in sync with `Dockerfile`): ```bash sudo dpkg --add-architecture i386 && sudo apt-get update sudo apt update -sudo apt install autoconf-archive autogen automake autopoint bash bash-completion bc bison \ - build-essential check cmake curl cython3 debootstrap ed expect fakeroot flex \ - g++-multilib gawk gettext git gperf httpie imagemagick intltool jq libbz2-dev \ - libc6-i386 libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev \ - libmount-dev libncurses-dev libpcre3-dev libssl-dev libtool libunistring-dev \ - lzip man-db manpages-dev mercurial meson mlocate moreutils nasm ninja-build \ - patchelf php pkg-config python3 python3-distutils python3-mako python3-pip python3-virtualenv \ +sudo apt install autoconf-archive autogen automake autopoint bash \ + bash-completion bc bison build-essential check cmake \ + curl cython3 debootstrap ed expect fakeroot flex \ + g++-multilib gawk gettext git gperf httpie imagemagick \ + intltool jq libbz2-dev libc6-i386 libcppunit-dev libffi-dev \ + libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \ + libpcre3-dev libssl-dev libtool libunistring-dev lzip \ + man-db manpages-dev mercurial meson mlocate moreutils nasm \ + ninja-build patchelf php pkg-config python3 python3-distutils \ + python3-mako python3-pip python3-virtualenv python3-yaml \ rename ripgrep ruby-mustache rsync scons subversion \ swig texinfo time tree unzip xmlto yasm zip zlib1g-dev ``` @@ -77,13 +80,16 @@ A container based on 64-bit version of Debian 12 stable OS is recommended. Non-x 3. Update apt channels: `lxc exec spksrc -- /usr/bin/apt update` 4. Install all required packages: ```bash -lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopoint bash bash-completion bc bison \ - build-essential check cmake curl cython3 debootstrap ed expect fakeroot flex \ - g++-multilib gawk gettext git gperf httpie imagemagick intltool jq libbz2-dev \ - libc6-i386 libcppunit-dev libffi-dev libgc-dev libgmp3-dev libltdl-dev \ - libmount-dev libncurses-dev libpcre3-dev libssl-dev libtool libunistring-dev \ - lzip man-db manpages-dev mercurial meson mlocate moreutils nasm ninja-build \ - patchelf php pkg-config python3 python3-distutils python3-mako python3-pip python3-virtualenv \ +lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopoint bash \ + bash-completion bc bison build-essential check cmake \ + curl cython3 debootstrap ed expect fakeroot flex \ + g++-multilib gawk gettext git gperf httpie imagemagick \ + intltool jq libbz2-dev libc6-i386 libcppunit-dev libffi-dev \ + libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \ + libpcre3-dev libssl-dev libtool libunistring-dev lzip \ + man-db manpages-dev mercurial meson mlocate moreutils nasm \ + ninja-build patchelf php pkg-config python3 python3-distutils \ + python3-mako python3-pip python3-virtualenv python3-yaml \ rename ripgrep ruby-mustache rsync scons subversion \ swig texinfo time tree unzip xmlto yasm zip zlib1g-dev ``` From 2d7d9d0ba25cc10ef0973dd575898f81623075fd Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 31 Jul 2024 00:31:14 +0000 Subject: [PATCH 12/13] docker-image: Install gf from default debian repository --- Dockerfile | 7 +------ README.md | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index a75d45167b8..27c0b498c37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ RUN apt update && apt install --no-install-recommends -y \ expect \ fakeroot \ flex \ + gh \ g++-multilib \ gawk \ gettext \ @@ -90,12 +91,6 @@ RUN apt install --no-install-recommends -y \ python3-virtualenv \ python3-yaml -# Install hg github tool -RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ - apt update && \ - apt install gh - # Clean-up apt db RUN apt clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/README.md b/README.md index c143a775adc..8d8fe213dd1 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ sudo apt update sudo apt install autoconf-archive autogen automake autopoint bash \ bash-completion bc bison build-essential check cmake \ curl cython3 debootstrap ed expect fakeroot flex \ - g++-multilib gawk gettext git gperf httpie imagemagick \ + g++-multilib gawk gettext gh git gperf httpie imagemagick \ intltool jq libbz2-dev libc6-i386 libcppunit-dev libffi-dev \ libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \ libpcre3-dev libssl-dev libtool libunistring-dev lzip \ @@ -83,7 +83,7 @@ A container based on 64-bit version of Debian 12 stable OS is recommended. Non-x lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopoint bash \ bash-completion bc bison build-essential check cmake \ curl cython3 debootstrap ed expect fakeroot flex \ - g++-multilib gawk gettext git gperf httpie imagemagick \ + g++-multilib gawk gettext gh git gperf httpie imagemagick \ intltool jq libbz2-dev libc6-i386 libcppunit-dev libffi-dev \ libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \ libpcre3-dev libssl-dev libtool libunistring-dev lzip \ From 44a76106785516a957b7da03875078062884ca15 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 31 Jul 2024 01:05:38 +0000 Subject: [PATCH 13/13] cross-cmake.mk: Use host nasm if available --- mk/spksrc.cross-cmake-env.mk | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mk/spksrc.cross-cmake-env.mk b/mk/spksrc.cross-cmake-env.mk index b0000ada2cb..5c53a57c059 100644 --- a/mk/spksrc.cross-cmake-env.mk +++ b/mk/spksrc.cross-cmake-env.mk @@ -102,12 +102,18 @@ endif ifeq ($(strip $(CMAKE_USE_NASM)),1) # Define x86asm ifeq ($(findstring $(ARCH),$(i686_ARCHS) $(x64_ARCHS)),$(ARCH)) - DEPENDS += native/nasm - NASM_PATH = $(abspath $(CURDIR)/../../native/nasm/work-native/install/usr/local/bin) - ENV += PATH=$(NASM_PATH):$$PATH - ENV += AS=$(NASM_PATH)/nasm - ENABLE_ASSEMBLY = ON - CMAKE_ASM_COMPILER = $(NASM_PATH)/nasm + HOST_NASM = $(shell command -v nasm 2>/dev/null) + ENABLE_ASSEMBLY = ON + ifneq ($(HOST_NASM),) + ENV += AS=$(HOST_NASM) + CMAKE_ASM_COMPILER = $(HOST_NASM) + else + DEPENDS += native/nasm + NASM_PATH = $(abspath $(CURDIR)/../../native/nasm/work-native/install/usr/local/bin) + ENV += PATH=$(NASM_PATH):$$PATH + ENV += AS=$(NASM_PATH)/nasm + CMAKE_ASM_COMPILER = $(NASM_PATH)/nasm + endif endif else CMAKE_USE_NASM = 0