mirror of
https://github.com/upx/upx.git
synced 2025-08-07 22:46:51 +08:00
all: upgrade to upx-stubtools v20221212
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
# "Gofmt's style is nobody's favourite, but gofmt is everybody's favourite." --Rob Pike
|
||||
#
|
||||
# for clang-format-10.0.1 from https://github.com/upx/upx-stubtools/releases
|
||||
# for clang-format-15.0.6 from https://github.com/upx/upx-stubtools/releases
|
||||
---
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
#AlignConsecutiveAssignments: true
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
ColumnLimit: 100
|
||||
IndentWidth: 4
|
||||
|
2
.github/travis_build.sh
vendored
2
.github/travis_build.sh
vendored
@ -45,7 +45,7 @@ if [[ $BM_X =~ (^|\+)rebuild-stubs($|\+) ]]; then
|
||||
elif [[ -f "$HOME/.local/bin/bin-upx/upx-stubtools-check-version" ]]; then
|
||||
bin_upx=$(readlink -en -- "$HOME/.local/bin/bin-upx")
|
||||
else
|
||||
bin_upx=$(readlink -en -- "$upx_SRCDIR/../deps/bin-upx-20210104")
|
||||
bin_upx=$(readlink -en -- "$upx_SRCDIR/../deps/bin-upx-20221212")
|
||||
fi
|
||||
cd / && cd "$upx_SRCDIR" || exit 1
|
||||
extra_subdirs=()
|
||||
|
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -32,12 +32,11 @@ jobs:
|
||||
##export DEBIAN_FRONTEND=noninteractive
|
||||
##sudo apt-get install -y --no-install-recommends python2-minimal
|
||||
# manually install compat libs from Ubuntu 16.04
|
||||
wget -q 'http://mirror.enzu.com/ubuntu/pool/main/g/gmp/libgmp10_6.1.0+dfsg-2_amd64.deb'
|
||||
wget -q 'http://mirror.enzu.com/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb'
|
||||
for f in *.deb; do dpkg -x $f ./packages; done
|
||||
wget -q 'http://archive.kernel.org/ubuntu-archive/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.6-1_amd64.deb'
|
||||
for f in ./*.deb; do dpkg -x $f ./packages; done
|
||||
sudo mv -v -n ./packages/usr/lib/x86_64-linux-gnu/lib* /usr/lib/x86_64-linux-gnu/
|
||||
sudo ldconfig
|
||||
wget -q -O - https://github.com/upx/upx-stubtools/releases/download/v20210104/bin-upx-20210104.tar.xz | tar -xJ
|
||||
wget -q -O - https://github.com/upx/upx-stubtools/releases/download/v20221212/bin-upx-20221212.tar.xz | tar -xJ
|
||||
- name: 'Check out code'
|
||||
uses: actions/checkout@v3
|
||||
with: { submodules: true }
|
||||
@ -47,7 +46,7 @@ jobs:
|
||||
- name: 'Check source code formatting'
|
||||
run: |
|
||||
bash ./misc/scripts/check_whitespace_git.sh
|
||||
env UPX_CLANG_FORMAT="$PWD/../deps/bin-upx-20210104/clang-format-10.0.1" make -C src clang-format
|
||||
env UPX_CLANG_FORMAT="$PWD/../deps/bin-upx-20221212/clang-format-15.0.6" make -C src clang-format
|
||||
if ! git diff --quiet; then git diff; exit 1; fi
|
||||
|
||||
job-linux-cmake:
|
||||
|
@ -6,10 +6,10 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
|
||||
# create the image from Dockerfile
|
||||
# using a rootless Podman container
|
||||
|
||||
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-v10,
|
||||
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20221212-v1,
|
||||
# so you have to create that image first
|
||||
# WARNING: we install many packages, so the resulting image needs A LOT of disk space!
|
||||
image=upx-cross-compile-20221108-v10
|
||||
image=upx-cross-compile-20221212-v1
|
||||
|
||||
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"
|
||||
|
||||
|
@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
|
||||
# run an interactive shell in the image
|
||||
# using a rootless Podman container
|
||||
|
||||
image=upx-cross-compile-20221108-v10
|
||||
image=upx-cross-compile-20221212-v1
|
||||
|
||||
flags=( -ti --read-only --rm )
|
||||
flags+=( --cap-drop=all ) # drop all capabilities
|
||||
|
@ -1,8 +1,8 @@
|
||||
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-v10,
|
||||
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20221212-v1,
|
||||
# so you have to create that image first
|
||||
# WARNING: we install many packages, so the resulting image needs A LOT of disk space!
|
||||
FROM localhost/upx-stubtools-20210104-v10
|
||||
ENV UPX_CONTAINER_IMAGE_NAME=upx-cross-compile-20221108-v10
|
||||
FROM localhost/upx-stubtools-20221212-v1
|
||||
ENV UPX_CONTAINER_IMAGE_NAME=upx-cross-compile-20221212-v1
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
USER root
|
||||
|
@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
|
||||
# create the image from Dockerfile
|
||||
# using a rootless Podman container
|
||||
|
||||
image=upx-stubtools-20210104-v10
|
||||
image=upx-stubtools-20221212-v1
|
||||
|
||||
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"
|
||||
|
||||
|
@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
|
||||
# run an interactive shell in the image
|
||||
# using a rootless Podman container
|
||||
|
||||
image=upx-stubtools-20210104-v10
|
||||
image=upx-stubtools-20221212-v1
|
||||
|
||||
flags=( -ti --read-only --rm )
|
||||
flags+=( --cap-drop=all ) # drop all capabilities
|
||||
@ -37,10 +37,10 @@ podman run "${flags[@]}" "$image" bash -l
|
||||
# # make sure that git is clean:
|
||||
# git status .
|
||||
# # remove stub files and make sure that they got deleted:
|
||||
# make maintainer-clean
|
||||
# make maintainer-clean extra-clean
|
||||
# git status .
|
||||
# # rebuild
|
||||
# make all
|
||||
# make extra-all all
|
||||
# # make sure that the stub files did rebuild correctly:
|
||||
# git status .
|
||||
# git diff .
|
||||
|
@ -1,5 +1,5 @@
|
||||
FROM docker.io/library/ubuntu:22.04
|
||||
ENV UPX_CONTAINER_IMAGE_NAME=upx-stubtools-20210104-v10
|
||||
ENV UPX_CONTAINER_IMAGE_NAME=upx-stubtools-20221212-v1
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
@ -19,10 +19,8 @@ RUN dpkg --add-architecture i386 \
|
||||
|
||||
# manually install compat libs from Ubuntu 16.04; REQUIRED
|
||||
RUN cd /root \
|
||||
&& aria2c --checksum=sha-256=2605f43f8047fc972855bb909f1dd7af761bbfd35ae559ad689b0d55a4236d69 \
|
||||
'http://mirror.enzu.com/ubuntu/pool/main/g/gmp/libgmp10_6.1.0+dfsg-2_amd64.deb' \
|
||||
&& aria2c --checksum=sha-256=3973a97387bbe0e8a775995c22861d8478edee2a594e8117970f635de25b2c8a \
|
||||
'http://mirror.enzu.com/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb' \
|
||||
&& aria2c --checksum=sha-256=de22baf3dd851a10e16fbf66a243e70149ca46e06b2939fdc79429196cefc090 \
|
||||
'http://archive.kernel.org/ubuntu-archive/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.6-1_amd64.deb' \
|
||||
&& mkdir packages \
|
||||
&& for f in ./*.deb; do dpkg -x $f ./packages; done \
|
||||
&& mv -v -n ./packages/usr/lib/x86_64-linux-gnu/lib* /usr/lib/x86_64-linux-gnu/ \
|
||||
@ -30,13 +28,13 @@ RUN cd /root \
|
||||
&& ldconfig \
|
||||
&& true
|
||||
|
||||
# install upx-stubtools into /usr/local/bin/bin-upx-20210104; REQUIRED
|
||||
# install upx-stubtools into /usr/local/bin/bin-upx-20221212; REQUIRED
|
||||
RUN cd /root \
|
||||
&& aria2c --checksum=sha-256=abcd8337cc656fe68d7bbb2ffe0f1e5ddce618688aa0e18c1ebcc40072843884 \
|
||||
'https://github.com/upx/upx-stubtools/releases/download/v20210104/bin-upx-20210104.tar.xz' \
|
||||
&& aria2c --checksum=sha-256=509e06639118a79d8e79489a400e134c6d3ca36bad2c6ec29648d7c1e5b81afa \
|
||||
'https://github.com/upx/upx-stubtools/releases/download/v20221212/bin-upx-20221212.tar.xz' \
|
||||
&& cd /usr/local/bin \
|
||||
&& tar -xoaf /root/bin-upx-20210104.tar.xz \
|
||||
&& rm /root/bin-upx-20210104.tar.xz \
|
||||
&& tar -xoaf /root/bin-upx-20221212.tar.xz \
|
||||
&& rm /root/bin-upx-20221212.tar.xz \
|
||||
&& true
|
||||
|
||||
# install pre-built binary UPX versions into /usr/local/bin; not required but convenient for testing
|
||||
@ -51,7 +49,7 @@ RUN cd /root \
|
||||
# create default user upx 2000:2000
|
||||
RUN useradd upx -U --uid 2000 --shell /bin/bash -m \
|
||||
&& mkdir -p /home/upx/.local/bin /home/upx/src/upx \
|
||||
&& ln -s /usr/local/bin/bin-upx-20210104 /home/upx/.local/bin/bin-upx \
|
||||
&& ln -s /usr/local/bin/bin-upx-20221212 /home/upx/.local/bin/bin-upx \
|
||||
&& chown -R upx:upx /home/upx \
|
||||
&& true
|
||||
USER upx
|
||||
|
@ -4,22 +4,22 @@ set -e; set -o pipefail
|
||||
|
||||
# "Gofmt's style is nobody's favourite, but gofmt is everybody's favourite." --Rob Pike
|
||||
|
||||
# NOTE: we are using clang-format-10.0.1 from upx-stubtools
|
||||
# NOTE: we are using clang-format-15.0.6 from upx-stubtools
|
||||
# see https://github.com/upx/upx-stubtools/releases
|
||||
|
||||
# NOTE: we use .clang-format config from upx.git/.clang-format
|
||||
|
||||
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
|
||||
UPX_CLANG_FORMAT="$HOME/local/bin/bin-upx/clang-format-10.0.1"
|
||||
UPX_CLANG_FORMAT="$HOME/local/bin/bin-upx/clang-format-15.0.6"
|
||||
fi
|
||||
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
|
||||
UPX_CLANG_FORMAT="$HOME/.local/bin/bin-upx/clang-format-10.0.1"
|
||||
UPX_CLANG_FORMAT="$HOME/.local/bin/bin-upx/clang-format-15.0.6"
|
||||
fi
|
||||
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
|
||||
UPX_CLANG_FORMAT="$HOME/bin/bin-upx/clang-format-10.0.1"
|
||||
UPX_CLANG_FORMAT="$HOME/bin/bin-upx/clang-format-15.0.6"
|
||||
fi
|
||||
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
|
||||
echo "ERROR: $0: cannot find clang-format-10.0.1"
|
||||
echo "ERROR: $0: cannot find clang-format-15.0.6"
|
||||
echo "ERROR: $0: please visit https://github.com/upx/upx-stubtools"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -160,7 +160,7 @@ endif
|
||||
all.targets ?= .upx-stubtools-stamp tmp/.tmp-stamp .all-stamp
|
||||
all: $$(all.targets)
|
||||
.upx-stubtools-stamp: $(MAKEFILE_LIST)
|
||||
upx-stubtools-check-version 20210104
|
||||
upx-stubtools-check-version 20221212
|
||||
@echo "timestamp" > $@
|
||||
.DELETE_ON_ERROR: .upx-stubtools-stamp
|
||||
%/.tmp-stamp:
|
||||
|
@ -1,23 +1,6 @@
|
||||
# Makefile for armpe_tester
|
||||
|
||||
MAKEFLAGS += -rR
|
||||
.SUFFIXES:
|
||||
.SECONDEXPANSION:
|
||||
.NOTPARALLEL:
|
||||
export LC_ALL = C
|
||||
export SHELL = /bin/sh
|
||||
|
||||
# update $PATH for our special stub build tools
|
||||
ifneq ($(wildcard $(HOME)/local/bin/bin-upx/upx-stubtools-check-version),)
|
||||
export PATH := $(HOME)/local/bin/bin-upx:$(PATH)
|
||||
else ifneq ($(wildcard $(HOME)/.local/bin/bin-upx/upx-stubtools-check-version),)
|
||||
export PATH := $(HOME)/.local/bin/bin-upx:$(PATH)
|
||||
else ifneq ($(wildcard $(HOME)/bin/bin-upx/upx-stubtools-check-version),)
|
||||
export PATH := $(HOME)/bin/bin-upx:$(PATH)
|
||||
endif
|
||||
|
||||
CFLAGS_W = -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings
|
||||
|
||||
CFLAGS_W = -Wall -Wextra -Wcast-align -Wcast-qual -Wwrite-strings
|
||||
|
||||
all: armpe_tester.out
|
||||
#all: armpe_tester.exe
|
||||
@ -33,4 +16,3 @@ mostlyclean clean distclean maintainer-clean:
|
||||
rm -f armpe_tester.exe armpe_tester.out
|
||||
|
||||
.PHONY: all mostlyclean clean distclean maintainer-clean
|
||||
|
||||
|
Reference in New Issue
Block a user