22ARG  FROM
33FROM  $FROM
44
5- #  Build libcap 2.32 targeting armhf
5+ COPY  patch/* /
6+ 
7+ #  Build libcap 2.66 targeting armhf
68RUN  export DEBIAN_FRONTEND=noninteractive \
79    #  Install build dependencies
810    && apt-get update -y \
911    && apt-get install -y --no-install-recommends \
1012        git \
1113    #  Build libcap
1214    && cd /root \
13-     && git clone git://git.kernel.org/pub/scm/libs/libcap/libcap.git \
15+     && git clone --depth 1 --branch libcap-2.66  git://git.kernel.org/pub/scm/libs/libcap/libcap.git \
1416    && cd libcap \
15-     && git checkout 13227f9b2f2b2f222e8022e19bd46db6f6f898c6 \
16-     && sed -i "s/^BUILD_GPERF/#\0 /"  Make.Rules \
1717    #  Compile binaries that run on the build machine using normal GCC
18-     && sed -i "s/^\( BUILD_CC\)  : = \$ (CC)/\1  := gcc/"  Make.Rules \
18+     && sed -i "s/^\( BUILD_CC\)  ? = \$ (CC)/\1  := gcc/"  Make.Rules \
1919    && make \
2020        AR="${CROSS_COMPILE}ar"  \
2121        CC="${CROSS_COMPILE}gcc"  \
@@ -33,7 +33,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
3333    && apt-get clean \
3434    && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt
3535
36- #  Build util-linux 2.36.1  targeting armhf
36+ #  Build util-linux 2.37.4  targeting armhf
3737RUN  export DEBIAN_FRONTEND=noninteractive \
3838    #  Install build dependencies
3939    && apt-get update -y \
@@ -46,17 +46,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \
4646        libtool \
4747    #  Build util-linux
4848    && cd /root \
49-     && git clone https://github.com/karelzak/util-linux.git \
49+     && git clone --depth 1 --branch v2.37.4  https://github.com/karelzak/util-linux.git \
5050    && cd util-linux \
51-     && git checkout 35c07c82be1ddc3b1c40f061b59008cac6405499 \
5251    && ./autogen.sh \
5352    && ./configure --host="$CHOST"  \
5453    && make LDFLAGS="-Wl,-rpath-link,.libs"  \
5554    && make install DESTDIR="$SYSROOT"  \
5655    && cd .. \
5756    #  Clean up
5857    && rm -rf util-linux \
59-     && find "$SYSROOT"  -type l,f -name "*.la"  | xargs --no-run-if-empty rm  \
58+     && find "$SYSROOT"  -type l,f -name "*.la"  -delete  \
6059    && apt-get autoremove -y \
6160        automake \
6261        autopoint \
@@ -67,8 +66,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
6766    && apt-get clean \
6867    && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt
6968
70- #  Build systemd 244 targeting armhf
71- COPY  patch/*.patch /
69+ #  Build systemd 250 targeting armhf
7270RUN  export DEBIAN_FRONTEND=noninteractive \
7371    #  Install build dependencies
7472    && apt-get update -y \
@@ -78,18 +76,12 @@ RUN export DEBIAN_FRONTEND=noninteractive \
7876        gperf \
7977        m4 \
8078        rsync \
79+         python3-pip \
80+     && pip3 install --no-cache-dir --break-system-packages jinja2 \
8181    #  Build systemd
8282    && cd /root \
83-     && git clone https://github.com/systemd/systemd.git \
83+     && git clone --depth 1 --branch v250.5  https://github.com/systemd/systemd.git \
8484    && cd systemd \
85-     && git checkout db9c5ae73e23d816e2df2a3e10a9a2a60b5b3ed7 \
86-     #  Fix build errors with GCC 10 and -O3
87-     #  (see <https://github.com/systemd/systemd/pull/15762>)
88-     && git apply /systemd-244-15762.patch \
89-     #  Fix Meson syntax and semantic changes in recent versions
90-     #  (see <https://github.com/systemd/systemd/pull/20633>)
91-     && git apply /systemd-244-20633.patch \
92-     && rm /systemd-244-*.patch \
9385    && ./configure \
9486        --buildtype=release \
9587        --cross-file="$CHOST"  \
@@ -103,16 +95,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \
10395    && cd .. \
10496    #  Clean up
10597    && rm -rf systemd \
98+     #  TODO: remove pip packages as well
10699    && apt-get autoremove -y \
107100        gettext \
108101        git \
109102        gperf \
110103        m4 \
111104        rsync \
105+         python3-pip \
112106    && apt-get clean \
113107    && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt
114108
115- #  Build zlib 1.2.11 and libpng 1.6.37  targeting armhf
109+ #  Build zlib 1.2.11 and libpng 1.6.39  targeting armhf
116110RUN  export DEBIAN_FRONTEND=noninteractive \
117111    #  Install build dependencies
118112    && apt-get update -y \
@@ -122,90 +116,85 @@ RUN export DEBIAN_FRONTEND=noninteractive \
122116        libtool \
123117    #  Build static zlib
124118    && cd /root \
125-     && git clone https://github.com/madler/zlib \
119+     && git clone --depth 1 --branch v1.2.11  https://github.com/madler/zlib \
126120    && cd zlib \
127-     && git checkout cacf7f1d4e3d44d871b605da3b647f07d718623f \
128121    && CC="${CROSS_COMPILE}gcc"  CFLAGS=-fPIC ./configure \
129122        --static \
130123        --prefix=/usr \
131124    && make \
132125    && DESTDIR="$SYSROOT"  make install \
133126    && cd .. \
134127    #  Build dynamic libpng
135-     && git clone git://git.code.sf.net/p/libpng/code libpng \
128+     && git clone --depth 1 --branch v1.6.39  git://git.code.sf.net/p/libpng/code libpng \
136129    && cd libpng \
137-     && git checkout a40189cf881e9f0db80511c382292a5604c3c3d1 \
138130    && ./configure --prefix=/usr --host="$CHOST"  \
139131    && make \
140132    && DESTDIR="$SYSROOT"  make install \
141133    && cd .. \
142134    #  Clean up
143135    && rm -rf zlib libpng \
144-     && find "$SYSROOT"  -type l,f -name "*.la"  | xargs --no-run-if-empty rm  \
136+     && find "$SYSROOT"  -type l,f -name "*.la"  -delete  \
145137    && apt-get autoremove -y \
146138        automake \
147139        git \
148140        libtool \
149141    && apt-get clean \
150142    && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt
151143
152- #  Build libevdev 1.9 .1 targeting armhf
144+ #  Build libevdev 1.12 .1 targeting armhf
153145RUN  export DEBIAN_FRONTEND=noninteractive \
154146    #  Build libevdev
155147    && cd /root \
156148    && mkdir libevdev \
157149    && cd libevdev \
158-     && curl https://www.freedesktop.org/software/libevdev/libevdev-1.9.1.tar.xz -o libevdev.tar.xz \
159-     && echo "f5603c48c5afd76b14df7a5124e0a94a102f8da0d45826192325069d1bbc7acb  libevdev.tar.xz"  > sha256sums \
160-     && sha256sum -c sha256sums \
150+     && curl https://www.freedesktop.org/software/libevdev/libevdev-1.12.1.tar.xz -o libevdev.tar.xz \
151+     && echo "1dbba41bc516d3ca7abc0da5b862efe3ea8a7018fa6e9b97ce9d39401b22426c  libevdev.tar.xz"  | sha256sum -c \
161152    && tar --strip-components=1 -xf libevdev.tar.xz \
162-     && rm libevdev.tar.xz sha256sums  \
153+     && rm libevdev.tar.xz \
163154    && ./configure --prefix=/usr --host="$CHOST"  \
164155    && make \
165156    && DESTDIR="$SYSROOT"  make install \
166157    && cd .. \
167158    #  Clean up
168159    && rm -rf libevdev \
169-     && find "$SYSROOT"  -type l,f -name "*.la"  | xargs --no-run-if-empty rm 
160+     && find "$SYSROOT"  -type l,f -name "*.la"  -delete 
170161
171- #  Build OpenSSL 1.1.1g  targeting armhf
162+ #  Build OpenSSL 3.0.7  targeting armhf
172163RUN  export DEBIAN_FRONTEND=noninteractive \
173164    #  Build OpenSSL
174165    && cd /root \
175166    && mkdir openssl \
176167    && cd openssl \
177-     && curl https://www.openssl.org/source/openssl-1.1.1g.tar.gz -o openssl.tar.gz \
178-     && echo "ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46  openssl.tar.gz"  > sha256sums \
179-     && sha256sum -c sha256sums \
168+     && curl https://www.openssl.org/source/openssl-3.0.7.tar.gz -o openssl.tar.gz \
169+     && echo "83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e  openssl.tar.gz"  | sha256sum -c \
180170    && tar --strip-components=1 -xf openssl.tar.gz \
181-     && rm openssl.tar.gz sha256sums  \
171+     && rm openssl.tar.gz \
182172    && ./Configure --prefix=/usr --cross-compile-prefix="$CROSS_COMPILE"  linux-armv4 \
183173    && make \
184174    && make DESTDIR="$SYSROOT"  install_sw \
185175    && cd .. \
186176    #  Clean up
187177    && rm -rf openssl
188178
189- #  Build libcurl 7.69.1  targeting armhf
179+ #  Build libcurl 7.82.0  targeting armhf
190180RUN  export DEBIAN_FRONTEND=noninteractive \
191181    #  Build libcurl
192182    && cd /root \
193183    && mkdir libcurl \
194184    && cd libcurl \
195-     && curl https://curl.se/download/curl-7.69.1.tar.xz -o curl.tar.xz \
196-     && echo "03c7d5e6697f7b7e40ada1b2256e565a555657398e6c1fcfa4cb251ccd819d4f  curl.tar.xz"  > sha256sums \
197-     && sha256sum -c sha256sums \
185+     && curl https://curl.se/download/curl-7.82.0.tar.xz -o curl.tar.xz \
186+     && echo "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c  curl.tar.xz"  | sha256sum -c \
198187    && tar --strip-components=1 -xf curl.tar.xz \
199-     && rm curl.tar.xz sha256sums  \
188+     && rm curl.tar.xz \
200189    && ./configure --prefix=/usr --host="$CHOST"  --with-openssl \
201190    && make \
202191    && DESTDIR="$SYSROOT"  make install \
203192    && cd .. \
204193    #  Clean up
205194    && rm -rf libcurl \
206-     && find "$SYSROOT"  -type l,f -name "*.la"  | xargs --no-run-if-empty rm 
195+     && find "$SYSROOT"  -type l,f -name "*.la"  -delete 
207196
208- #  Build breakpad 0.1 (db1cda2653 ) targeting armhf
197+ #  Build breakpad 0.1 (216cea7bca ) targeting armhf
209198RUN  export DEBIAN_FRONTEND=noninteractive \
210199    #  Install build dependencies
211200    && apt-get update -y \
@@ -214,23 +203,25 @@ RUN export DEBIAN_FRONTEND=noninteractive \
214203        zlib1g-dev \
215204        libssl-dev \
216205    #  breakpad's build tools require python2 to be available as python on the path
217-     && git clone https://github.com/pyenv/pyenv.git .pyenv \
206+     && cd /root \
207+     && git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
218208    && export PYENV_ROOT="$(pwd)/.pyenv"  \
219209    && export PATH="$PYENV_ROOT/bin:$PATH"  \
220210    && eval "$(pyenv init --path)"  \
221211    && pyenv install 2.7 \
222212    && pyenv global 2.7 \
223213    #  Fetch and activate depot_tools
224-     && cd /root \
225214    && git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git \
226215    && export PATH=$PATH:/root/depot_tools \
227216    #  Build static breakpad
228-     && cd /root \
229217    && mkdir breakpad \
230218    && cd breakpad \
231219    && fetch breakpad \
232220    && cd src \
233-     && git checkout db1cda26539c711c3da7ed4d410dfe8190e89b8f \
221+     #  fetch updates default.xml with seemingly useless diffs that break checkout later
222+     && git checkout HEAD -- default.xml \
223+     && git checkout 216cea7bca53fa441a3ee0d0f5fd339a3a894224 \
224+     && git apply < /breakpad-216cea7bca-fix-int-type.patch \
234225    && ./configure --prefix=/usr --host="$CHOST"  \
235226    && make \
236227    && DESTDIR="$SYSROOT"  make install \
@@ -249,3 +240,5 @@ RUN export DEBIAN_FRONTEND=noninteractive \
249240        libssl-dev \
250241    && apt-get clean \
251242    && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt
243+ 
244+ RUN  rm /*.patch
0 commit comments