From 2113a96c2e6c2076d520a17f0a09a8c3d726c119 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 2 Mar 2024 13:36:35 -0300 Subject: [PATCH 01/18] upgrade dockerfile --- Dockerfile | 69 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f9fe04..166f6e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,58 @@ -FROM debian:12-slim -MAINTAINER Naomi Peori +FROM ubuntu:24.04 -ENV PS3DEV /usr/local/ps3dev -ENV PSL1GHT ${PS3DEV} -ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin +ENV TOOLCHAIN_VERSION 0359891a9e65785a12fab0b0f9479d81f0d146b0 -RUN \ - apt-get -y update && \ - apt-get -y install autoconf bison build-essential flex git libelf-dev libgmp3-dev libncurses5-dev libssl-dev libtool-bin pkg-config python-dev-is-python3 texinfo wget zlib1g-dev && \ - apt-get -y clean autoclean autoremove && \ - rm -rf /var/lib/{apt,dpkg,cache,log}/ +ENV PS3DEV /usr/local/ps3dev +ENV PSL1GHT $PS3DEV +ENV PATH $PATH:$PS3DEV/bin:$PS3DEV/ppu/bin:$PS3DEV/spu/bin:$PS3DEV/portlibs/ppu/bin -RUN \ - git clone https://github.com/ps3dev/ps3toolchain.git && \ - cd ps3toolchain && \ - ./toolchain.sh && \ - cd .. && \ - rm -Rf ps3toolchain +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update \ + && apt upgrade -y \ + && apt install -y \ + autoconf \ + automake \ + bison \ + bzip2 \ + ca-certificates \ + cmake \ + flex \ + g++ \ + gcc \ + git \ + libelf-dev \ + libgmp3-dev \ + libncurses5-dev \ + libssl-dev \ + libtool \ + libtool-bin \ + make \ + meson \ + patch \ + pkg-config \ + python-dev-is-python3 \ + texinfo \ + vim \ + wget \ + xz-utils \ + zlib1g-dev \ + # Fixes certificate errors with letsencrypt in ARMv7 + && echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" >> /etc/wgetrc \ + && echo "check_certificate = off" >> ~/.wgetrc \ + # pass toolchain's check for gmp + && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ + && git clone https://github.com/ps3dev/ps3toolchain.git /toolchain \ + && cd /toolchain \ + && git checkout -qf $TOOLCHAIN_VERSION \ + && /toolchain/toolchain.sh \ + && rm -rf /toolchain + +RUN cd ${PS3DEV} \ + && git clone https://github.com/ps3dev/ps3libraries /ps3libraries \ + && cd /ps3libraries \ + && ./libraries.sh \ + && rm -rf /ps3libraries WORKDIR /build +CMD ["/bin/bash"] \ No newline at end of file From 9c92b2a89e8241bb381e7cf2f9b560ad53ab0e1f Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 2 Mar 2024 13:36:47 -0300 Subject: [PATCH 02/18] add github action for deploy --- .github/workflows/deploy.yml | 67 ++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..364e29c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,67 @@ +name: ci-docker +on: + pull_request: + branches: + - main + + # Runs on pushes targeting the default branch + push: + branches: ['main'] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + dockerhub-push: + runs-on: ubuntu-latest + environment: DockerHub + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 +# - linux/arm/v7 +# - linux/arm64/v8 +# - linux/ppc64le +# - linux/s390x + + env: + DOCKERHUB_REPONAME: ps3dev + DOCKERHUB_REPOTAG: latest + + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: README to Dockerhub + uses: christian-korneck/update-container-description-action@v1 + env: + DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }} + with: + destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }} + provider: dockerhub + short_description: 'A Docker Image for PS3 Development' + readme_file: 'README.md' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: . + platforms: ${{ matrix.platform }} + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DOCKERHUB_REPONAME }}:${{ env.DOCKERHUB_REPOTAG }} From 40cc533ba8fcbdaa0c99d329ff0d87ba5f46db9a Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 2 Mar 2024 13:39:31 -0300 Subject: [PATCH 03/18] master branch name --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 364e29c..bfad5f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,11 +2,11 @@ name: ci-docker on: pull_request: branches: - - main + - master # Runs on pushes targeting the default branch push: - branches: ['main'] + branches: ['master'] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 560ebf55c6bdb4f1e05f7a1708942e18dfe078e6 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 2 Mar 2024 15:58:41 -0300 Subject: [PATCH 04/18] remove ps3libraries --- Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 166f6e1..ca63bbf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,11 +48,5 @@ RUN apt update \ && /toolchain/toolchain.sh \ && rm -rf /toolchain -RUN cd ${PS3DEV} \ - && git clone https://github.com/ps3dev/ps3libraries /ps3libraries \ - && cd /ps3libraries \ - && ./libraries.sh \ - && rm -rf /ps3libraries - WORKDIR /build CMD ["/bin/bash"] \ No newline at end of file From cecbf2baeef560423b622482308bbf9080af9ee5 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 2 Mar 2024 15:59:02 -0300 Subject: [PATCH 05/18] no install recommends --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ca63bbf..4131cbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update \ && apt upgrade -y \ - && apt install -y \ + && apt --no-install-recommends install -y \ autoconf \ automake \ bison \ From 82b2e0210f90d0fa267724ae12200c8ff31bd033 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 2 Mar 2024 16:11:10 -0300 Subject: [PATCH 06/18] README.md --- readme.txt => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename readme.txt => README.md (100%) diff --git a/readme.txt b/README.md similarity index 100% rename from readme.txt rename to README.md From da434b9a29575757e233705fc40753ed9d743695 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 2 Mar 2024 16:19:24 -0300 Subject: [PATCH 07/18] Update README.md --- README.md | 58 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index e7e8069..cd748eb 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,44 @@ - ==================== - What does this do? - ==================== +[![ci-docker](https://github.com/humbertodias/ps3dev-docker/actions/workflows/deploy.yml/badge.svg)](https://github.com/humbertodias/ps3dev-docker/actions/workflows/deploy.yml) - This program will automatically build a docker image with the ps3dev - toolchain ready to be used for homebrew development. +## What does this do? - ==================== - How do I build it? - ==================== +This program will automatically build a docker image with the ps3dev +toolchain ready to be used for homebrew development. - Build the image: +## How do I build it? - docker build -t ps3dev-docker . +Build the image: - Copy the helper script: +```sh +docker build -t ps3dev-docker . +``` +Copy the helper script: - cp ps3dev-docker.sh /usr/local/bin - - ================== - How do I use it? - ================== +``` +cp ps3dev-docker.sh /usr/local/bin +``` +## How do I use it? Use the helper script to run 'make' on the current directory: - ps3dev-docker.sh make - - Or, manually run 'make' on the current directory: - - docker run -v `pwd`:/build ps3dev-docker make +``` +ps3dev-docker.sh make +``` +Or, manually run 'make' on the current directory: - ============================ - How do I save and load it? - ============================ +``` +docker run -v `pwd`:/build ps3dev-docker make +``` - Save the image: +## How do I save and load it? - docker save ps3dev-docker | bzip2 > ps3dev-docker.tar.bz2 +Save the image: - Load the image: +``` +docker save ps3dev-docker | bzip2 > ps3dev-docker.tar.bz2 +``` +Load the image: - docker load < bzip2 -dc ps3dev-docker.tar.bz2 +``` +docker load < bzip2 -dc ps3dev-docker.tar.bz2 +``` From 8afb00503febd32b751cf322fde5b06ba8432cc7 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 01:58:09 -0300 Subject: [PATCH 08/18] PKG_CONFIG_PATH --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4131cbb..7becbf6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ ENV TOOLCHAIN_VERSION 0359891a9e65785a12fab0b0f9479d81f0d146b0 ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT $PS3DEV ENV PATH $PATH:$PS3DEV/bin:$PS3DEV/ppu/bin:$PS3DEV/spu/bin:$PS3DEV/portlibs/ppu/bin +ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:$PS3DEV/portlibs/ppu/lib/package ENV DEBIAN_FRONTEND noninteractive @@ -49,4 +50,4 @@ RUN apt update \ && rm -rf /toolchain WORKDIR /build -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"] From 47df8c567fa90ab6ba3af510c124f69fc536f714 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 4 Mar 2024 02:04:22 -0300 Subject: [PATCH 09/18] envsubst --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7becbf6..52c8d31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ RUN apt update \ ca-certificates \ cmake \ flex \ + gettext-base \ g++ \ gcc \ git \ From 98c84fe5ad3c05569b92336c61f797a9ea765497 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 01:07:01 -0300 Subject: [PATCH 10/18] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52c8d31..a3ddc9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN apt update \ && echo "check_certificate = off" >> ~/.wgetrc \ # pass toolchain's check for gmp && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ - && git clone https://github.com/ps3dev/ps3toolchain.git /toolchain \ + && git clone https://github.com/humbertodias/ps3toolchain.git /toolchain \ && cd /toolchain \ && git checkout -qf $TOOLCHAIN_VERSION \ && /toolchain/toolchain.sh \ From 844436ddd69b43320cbc080d73a89239b076c6ff Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 02:24:06 -0300 Subject: [PATCH 11/18] Update Dockerfile --- Dockerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a3ddc9b..c529382 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM ubuntu:24.04 -ENV TOOLCHAIN_VERSION 0359891a9e65785a12fab0b0f9479d81f0d146b0 - ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT $PS3DEV ENV PATH $PATH:$PS3DEV/bin:$PS3DEV/ppu/bin:$PS3DEV/spu/bin:$PS3DEV/portlibs/ppu/bin @@ -45,8 +43,6 @@ RUN apt update \ # pass toolchain's check for gmp && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ && git clone https://github.com/humbertodias/ps3toolchain.git /toolchain \ - && cd /toolchain \ - && git checkout -qf $TOOLCHAIN_VERSION \ && /toolchain/toolchain.sh \ && rm -rf /toolchain From d6910f8ecc4ca19db79d01758e4ca96441b31f3a Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 6 Mar 2024 03:13:46 -0300 Subject: [PATCH 12/18] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index cd748eb..27ddc89 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ [![ci-docker](https://github.com/humbertodias/ps3dev-docker/actions/workflows/deploy.yml/badge.svg)](https://github.com/humbertodias/ps3dev-docker/actions/workflows/deploy.yml) +[![](https://images.microbadger.com/badges/image/hldtux/ps3dev.svg)](https://microbadger.com/images/hldtux/ps3dev) +[![](https://img.shields.io/docker/pulls/hldtux/ps3dev.svg?maxAge=604800)](https://hub.docker.com/r/hldtux/ps3dev/) + ## What does this do? From c6c3b0b96f5fb72b31e4566eeeb99f76e8cefaa3 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 7 Mar 2024 01:53:32 -0300 Subject: [PATCH 13/18] no-pthread branch --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c529382..06c9d4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN apt update \ && echo "check_certificate = off" >> ~/.wgetrc \ # pass toolchain's check for gmp && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ - && git clone https://github.com/humbertodias/ps3toolchain.git /toolchain \ + && git clone https://github.com/humbertodias/ps3toolchain.git -b no-pthread /toolchain \ && /toolchain/toolchain.sh \ && rm -rf /toolchain From 1850e24de668e0b768777949da3b77325be14694 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 8 Mar 2024 22:48:47 -0300 Subject: [PATCH 14/18] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 06c9d4e..c529382 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN apt update \ && echo "check_certificate = off" >> ~/.wgetrc \ # pass toolchain's check for gmp && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ - && git clone https://github.com/humbertodias/ps3toolchain.git -b no-pthread /toolchain \ + && git clone https://github.com/humbertodias/ps3toolchain.git /toolchain \ && /toolchain/toolchain.sh \ && rm -rf /toolchain From 3b9fb0dea01adf446b62025dbd10952f756ddd2f Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Fri, 8 Mar 2024 22:53:20 -0300 Subject: [PATCH 15/18] linux/arm64 --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bfad5f1..a4425f0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,6 +20,7 @@ jobs: matrix: platform: - linux/amd64 + - linux/arm64 # - linux/arm/v7 # - linux/arm64/v8 # - linux/ppc64le From e5d1404523332bb43aa03cd68c8de8343d9cb45c Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sat, 9 Mar 2024 00:08:29 -0300 Subject: [PATCH 16/18] Update deploy.yml --- .github/workflows/deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a4425f0..f8aec0a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,9 +20,8 @@ jobs: matrix: platform: - linux/amd64 - - linux/arm64 # - linux/arm/v7 -# - linux/arm64/v8 + - linux/arm64/v8 # - linux/ppc64le # - linux/s390x From d6b3fd7ab68aff8b9c5b6c77e14cbc2fc96c2889 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 11 Mar 2024 02:17:15 -0300 Subject: [PATCH 17/18] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8aec0a..bfad5f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: platform: - linux/amd64 # - linux/arm/v7 - - linux/arm64/v8 +# - linux/arm64/v8 # - linux/ppc64le # - linux/s390x From c47722c3541609d2233876ac65935430f1327a14 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Mon, 11 Mar 2024 12:19:21 -0300 Subject: [PATCH 18/18] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c529382..510e483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:24.04 ENV PS3DEV /usr/local/ps3dev ENV PSL1GHT $PS3DEV ENV PATH $PATH:$PS3DEV/bin:$PS3DEV/ppu/bin:$PS3DEV/spu/bin:$PS3DEV/portlibs/ppu/bin -ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:$PS3DEV/portlibs/ppu/lib/package +ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:$PS3DEV/portlibs/ppu/lib/pkgconfig ENV DEBIAN_FRONTEND noninteractive