|
9 | 9 |
|
10 | 10 | concurrency:
|
11 | 11 | group: build-kobo-ssh
|
12 |
| - cancel-in-progress: true |
| 12 | + cancel-in-progress: false |
13 | 13 |
|
14 | 14 | jobs:
|
15 | 15 | filter-changes:
|
|
42 | 42 | if: ${{ needs.filter-changes.outputs.toolchain_changed == 'true' }}
|
43 | 43 | name: Build toolchain image
|
44 | 44 | runs-on: ubuntu-latest
|
| 45 | + needs: |
| 46 | + - filter-changes |
45 | 47 | permissions:
|
46 | 48 | contents: read
|
47 | 49 | packages: write
|
@@ -83,38 +85,83 @@ jobs:
|
83 | 85 | cache-to: type=gha,mode=max
|
84 | 86 |
|
85 | 87 | build-koboroot:
|
86 |
| - if: ${{ needs.filter-changes.outputs.build_changed == 'true' }} |
| 88 | + if: ${{ !cancelled() && !failure() && needs.filter-changes.outputs.build_changed == 'true' }} |
87 | 89 | name: Build KoboRoot
|
88 | 90 | runs-on: ubuntu-latest
|
89 | 91 | needs:
|
90 | 92 | - filter-changes
|
91 | 93 | - build-toolchain-image
|
92 | 94 | permissions:
|
93 |
| - contents: read |
| 95 | + contents: write |
94 | 96 | packages: read
|
95 | 97 | env:
|
96 | 98 | TOOLCHAIN_IMAGE: ghcr.io/${{ github.repository_owner }}/kobo-ssh-toolchain:latest
|
97 |
| - DROPBEAR_TAG: DROPBEAR_2025.87 |
| 99 | + DROPBEAR_VERSION: "2025.87" |
98 | 100 | OPENSSH_TAG: V_9_9_P2
|
99 | 101 | steps:
|
100 | 102 | - name: Checkout
|
101 | 103 | uses: actions/checkout@v4
|
102 | 104 |
|
| 105 | + - name: Grab toolchain image |
| 106 | + run: | |
| 107 | + docker pull "${{ env.TOOLCHAIN_IMAGE }}" |
| 108 | +
|
103 | 109 | - name: Clone dropbear sources
|
104 | 110 | run: |
|
105 |
| - git clone --depth 1 --branch "${{ env.DROPBEAR_TAG }}" https://github.com/mkj/dropbear.git external/dropbear |
| 111 | + git clone --depth 1 --branch "DROPBEAR_${{ env.DROPBEAR_VERSION }}" https://github.com/mkj/dropbear.git external/dropbear |
| 112 | +
|
| 113 | + - name: Clone openssh-portable sources |
| 114 | + run: | |
| 115 | + git clone --depth 1 --branch "${{ env.OPENSSH_TAG }}" https://github.com/openssh/openssh-portable.git external/openssh-portable |
| 116 | +
|
| 117 | + - name: Set dropbear compilation options |
| 118 | + run: | |
| 119 | + cp build/dropbear/localoptions.h external/dropbear/localoptions.h |
106 | 120 |
|
107 | 121 | - name: Build dropbear
|
108 |
| - uses: kohlerdominik/docker-run-action@v2 |
| 122 | + uses: kohlerdominik/docker-run-action@v2.0.0 |
109 | 123 | with:
|
110 | 124 | image: ${{ env.TOOLCHAIN_IMAGE }}
|
111 | 125 | volumes: |
|
112 |
| - ${{ github.workspace }}:/workspace |
| 126 | + ${{ github.workspace }}/external/dropbear:/workspace |
113 | 127 | workdir: /workspace
|
114 | 128 | run: |
|
115 | 129 | export PATH="/root/x-tools/arm-kobo-linux-gnueabihf/bin:$PATH"
|
116 | 130 | autoconf
|
117 | 131 | autoheader
|
118 | 132 | ./configure --host=arm-kobo-linux-gnueabihf --disable-zlib --disable-zlib CC="arm-kobo-linux-gnueabihf"-gcc LD="arm-kobo-linux-gnueabihf"-ld --disable-wtmp --disable-lastlog --disable-syslog --disable-utmpx --disable-utmp --disable-wtmpx --disable-loginfunc --disable-pututxline --disable-pututline --enable-bundled-libtom --disable-pam
|
119 | 133 | make clean
|
120 |
| - make PROGRAMS="dropbear dropbearkey" MULTI=1 |
| 134 | + make PROGRAMS="dropbear dropbearkey" |
| 135 | +
|
| 136 | + - name: Build sftp-server |
| 137 | + uses: kohlerdominik/[email protected] |
| 138 | + with: |
| 139 | + image: ${{ env.TOOLCHAIN_IMAGE }} |
| 140 | + volumes: | |
| 141 | + ${{ github.workspace }}/external/openssh-portable:/workspace |
| 142 | + workdir: /workspace |
| 143 | + run: | |
| 144 | + export PATH="/root/x-tools/arm-kobo-linux-gnueabihf/bin:$PATH" |
| 145 | + autoconf |
| 146 | + autoheader |
| 147 | + ./configure --host=arm-kobo-linux-gnueabihf --without-openssl --without-zlib --without-pam --without-xauth CC="arm-kobo-linux-gnueabihf"-gcc LD="arm-kobo-linux-gnueabihf"-ld |
| 148 | + make clean |
| 149 | + make sftp-server |
| 150 | +
|
| 151 | + - name: Build KoboRoot.tgz artifact |
| 152 | + run: | |
| 153 | + mkdir -p KoboRoot/usr/bin |
| 154 | + mv external/dropbear/dropbear KoboRoot/usr/bin/ |
| 155 | + mv external/dropbear/dropbearkey KoboRoot/usr/bin/ |
| 156 | + mv external/openssh-portable/sftp-server KoboRoot/usr/bin/ |
| 157 | +
|
| 158 | + mkdir -p dist |
| 159 | + tar -cvzf dist/KoboRoot.tgz -C KoboRoot . |
| 160 | +
|
| 161 | + - name: Release artifact |
| 162 | + uses: softprops/action-gh-release@v2 |
| 163 | + with: |
| 164 | + tag_name: ${{ env.DROPBEAR_VERSION }} |
| 165 | + body: | |
| 166 | + Dropbear ${{ env.DROPBEAR_VERSION }} for Kobo eReaders |
| 167 | + files: dist/KoboRoot.tgz |
0 commit comments