Skip to content

Commit 6e05c48

Browse files
committed
Merge branch '0.17-maintenance' into HEAD
2 parents 99c2423 + 3449f5f commit 6e05c48

27 files changed

+875
-143
lines changed

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# EditorConfig configuration for PatchELF
2+
# http://EditorConfig.org
3+
4+
# Top-most EditorConfig file
5+
root = true
6+
7+
# Unix-style newlines with a newline ending every file, UTF-8 charset
8+
[*]
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
charset = utf-8
13+
14+
# Match Nix files, set indent to spaces with width of two
15+
[*.nix]
16+
indent_style = space
17+
indent_size = 2
18+
19+
# Match C++/C/shell, set indent to spaces with width of four
20+
[*.{hpp,cc,hh,c,h,sh}]
21+
indent_style = space
22+
indent_size = 4
23+
24+
# Match diffs, avoid to trim trailing whitespace
25+
[*.{diff,patch}]
26+
trim_trailing_whitespace = false

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Manual nixfmt run
2+
706478750fc8574ed816ef746d3ad3790b2ea66a

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
name: "CI"
22
on:
33
pull_request:
4+
merge_group:
45
push:
56
jobs:
67
shellcheck:
78
runs-on: ubuntu-latest
89
steps:
9-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1011
- run: shellcheck tests/*.sh
1112
nix:
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses: actions/checkout@v3
15-
- uses: cachix/install-nix-action@v20
15+
- uses: actions/checkout@v4
16+
- uses: cachix/install-nix-action@v31
1617
- run: nix-build -A hydraJobs.release
1718
ubuntu:
1819
runs-on: ubuntu-latest
1920
steps:
20-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2122
- name: get toolchain version
2223
run: |
2324
c++ --version

.github/workflows/publish.yml

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Publish
22
on:
33
pull_request:
4+
merge_group:
45
push:
56
branches:
67
- '*'
@@ -13,44 +14,44 @@ jobs:
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout
16-
uses: actions/checkout@v3
17-
- uses: cachix/install-nix-action@v20
17+
uses: actions/checkout@v4
18+
- uses: cachix/install-nix-action@v31
1819
- name: Build tarballs
1920
run: |
2021
nix build -L .#hydraJobs.tarball
2122
install -D ./result/tarballs/*.tar.bz2 ./dist/patchelf-$(cat version).tar.bz2
2223
install -D ./result/tarballs/*.tar.gz ./dist/patchelf-$(cat version).tar.gz
23-
- uses: actions/upload-artifact@v3
24+
- uses: actions/upload-artifact@v4
2425
with:
25-
name: patchelf
26+
name: patchelf-tarball
2627
path: dist/*
2728

2829
build_windows:
2930
name: Build windows executable
3031
runs-on: ubuntu-latest
3132
steps:
3233
- name: Checkout
33-
uses: actions/checkout@v3
34-
- uses: cachix/install-nix-action@v20
34+
uses: actions/checkout@v4
35+
- uses: cachix/install-nix-action@v31
3536
- name: Build windows executable
3637
run: |
3738
nix build -L .#patchelf-win32 .#patchelf-win64
3839
install -D ./result/bin/patchelf.exe ./dist/patchelf-win32-$(cat version).exe
3940
install -D ./result-1/bin/patchelf.exe ./dist/patchelf-win64-$(cat version).exe
40-
- uses: actions/upload-artifact@v3
41+
- uses: actions/upload-artifact@v4
4142
with:
42-
name: patchelf
43+
name: patchelf-windows
4344
path: dist/*
4445

4546
test_windows:
4647
name: Test windows binaries
4748
needs: [build_windows]
4849
runs-on: windows-latest
4950
steps:
50-
- uses: actions/checkout@v3
51-
- uses: actions/download-artifact@v3
51+
- uses: actions/checkout@v4
52+
- uses: actions/download-artifact@v5
5253
with:
53-
name: patchelf
54+
name: patchelf-windows
5455
path: dist
5556
- name: Show binaries
5657
run: dir .\\dist
@@ -71,11 +72,21 @@ jobs:
7172
steps:
7273
- name: Set up QEMU
7374
if: matrix.platform != 'amd64'
74-
uses: docker/setup-qemu-action@v2
75+
uses: docker/setup-qemu-action@v3
7576

76-
- uses: actions/download-artifact@v3
77+
- name: Set docker arch
78+
run: |
79+
platform=${{ matrix.platform }}
80+
if [[ $platform == arm64v8 ]]; then
81+
platform=arm64
82+
elif [[ $platform == arm32v7 ]]; then
83+
platform=arm
84+
fi
85+
echo "DOCKER_PLATFORM=$platform" >> $GITHUB_ENV
86+
87+
- uses: actions/download-artifact@v5
7788
with:
78-
name: patchelf
89+
name: patchelf-tarball
7990
path: dist
8091
- name: Build binaries
8192
env:
@@ -100,7 +111,7 @@ jobs:
100111
else
101112
ENTRYPOINT=
102113
fi
103-
docker run -e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:edge ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
114+
docker run --platform "$DOCKER_PLATFORM" -e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:edge ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
104115
- name: Check binaries
105116
run: |
106117
cat <<EOF > check.sh
@@ -109,10 +120,10 @@ jobs:
109120
tar -xf ./dist/patchelf-*-*.tar.gz
110121
./bin/patchelf --version
111122
EOF
112-
docker run -v $(pwd):/gha ${{ matrix.platform }}/debian:unstable-slim sh -ec "cd /gha && sh ./check.sh"
113-
- uses: actions/upload-artifact@v3
123+
docker run --platform "$DOCKER_PLATFORM" -v $(pwd):/gha ${{ matrix.platform }}/debian:unstable-slim sh -ec "cd /gha && sh ./check.sh"
124+
- uses: actions/upload-artifact@v4
114125
with:
115-
name: patchelf
126+
name: patchelf-${{ matrix.platform }}
116127
path: dist/*
117128

118129
publish:
@@ -121,9 +132,10 @@ jobs:
121132
if: github.event_name == 'push' && github.repository == 'NixOS/patchelf' && startsWith(github.ref, 'refs/tags/')
122133
runs-on: ubuntu-latest
123134
steps:
124-
- uses: actions/download-artifact@v3
135+
- uses: actions/download-artifact@v5
125136
with:
126-
name: patchelf
137+
pattern: patchelf-*
138+
merge-multiple: true
127139
path: dist
128140
- name: Upload binaries to release
129141
uses: svenstaro/upload-release-action@v2

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Makefile
1818
.deps
1919
*.o
2020

21+
CMakeLists.txt.user
22+
2123
/tests/*.log
2224
/tests/*.trs
2325
/tests/no-rpath

.mergify.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
queue_rules:
2+
- name: default
3+
merge_conditions:
4+
- check-success=Build static musl binaries (amd64)
5+
- check-success=Build static musl binaries (arm32v7)
6+
- check-success=Build static musl binaries (arm64v8)
7+
- check-success=Build static musl binaries (i386)
8+
- check-success=Build static musl binaries (ppc64le)
9+
- check-success=Build static musl binaries (riscv64)
10+
- check-success=Build static musl binaries (s390x)
11+
- check-success=Build tarballs
12+
- check-success=Build windows executable
13+
- check-success=Publish tarballs & binaries
14+
- check-success=Test windows binaries
15+
- check-success=nix
16+
- check-success=shellcheck
17+
- check-success=ubuntu
18+
merge_method: rebase
19+
batch_size: 5
20+
pull_request_rules:
21+
- name: merge using the merge queue
22+
conditions:
23+
- base=master
24+
- label~=merge-queue|dependencies
25+
actions:
26+
queue: {}

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
3+
project(patchelf)
4+
5+
file(READ version VERSION)
6+
7+
include(GNUInstallDirs)
8+
9+
add_subdirectory(src)
10+
# add_subdirectory(tests) # TODO
11+
12+
install(FILES patchelf.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
13+
14+
install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
15+
16+
install(FILES completions/zsh/_patchelf
17+
DESTINATION ${CMAKE_INSTALL_DATADIR}/zsh/site-functions)

COPYING

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU GENERAL PUBLIC LICENSE
22
Version 3, 29 June 2007
33

4-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
55
Everyone is permitted to copy and distribute verbatim copies
66
of this license document, but changing it is not allowed.
77

@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
645645
GNU General Public License for more details.
646646

647647
You should have received a copy of the GNU General Public License
648-
along with this program. If not, see <http://www.gnu.org/licenses/>.
648+
along with this program. If not, see <https://www.gnu.org/licenses/>.
649649

650650
Also add information on how to contact you by electronic and paper mail.
651651

@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
664664
You should also get your employer (if you work as a programmer) or school,
665665
if any, to sign a "copyright disclaimer" for the program, if necessary.
666666
For more information on this, and how to apply and follow the GNU GPL, see
667-
<http://www.gnu.org/licenses/>.
667+
<https://www.gnu.org/licenses/>.
668668

669669
The GNU General Public License does not permit incorporating your program
670670
into proprietary programs. If your program is a subroutine library, you
671671
may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
674+
<https://www.gnu.org/philosophy/why-not-lgpl.html>.

0 commit comments

Comments
 (0)