Skip to content

Commit

Permalink
Copy lib in several other places, so it gets into the LD PATH (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Feb 17, 2024
1 parent fadc193 commit fb5a7f0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions packages/system/systemd/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ image: {{ .Values.image }}
package_dir: /package

prelude:
- dnf update -y && dnf install -y gcc meson git ninja-build gperf libpcap libcap libcap-devel cmake libmount-devel python3-jinja2 rsync diffutils python3-pyelftools openssl-devel tpm2-*
- dnf update -y && dnf install -y gcc meson git ninja-build gperf libpcap libcap libcap-devel cmake libmount-devel python3-jinja2 rsync diffutils python3-pyelftools openssl-devel tpm2-* python3-pip python3-cryptography python3-pefile
- mkdir -p src/
- PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && cd src/ && git clone --branch v${PACKAGE_VERSION} https://github.com/systemd/systemd.git

Expand All @@ -30,12 +30,24 @@ steps:
{{end}}
{{else if eq .Values.name "systemd-ukify"}}
- mkdir -p /package/usr/lib/systemd/
- mkdir -p /package/usr/lib64/systemd/
- mkdir -p /package/lib64
- mkdir -p /package/lib
- mkdir -p /package/usr/bin/
# ukify calls systemd-measure to measure and sign
- cp src/systemd/build/systemd-measure /package/usr/lib/systemd/
- cp src/systemd/build/systemd-measure /package/usr/lib64/systemd/
- cp src/systemd/build/systemd-measure /package/lib/
- cp src/systemd/build/systemd-measure /package/lib64/
- PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && cp src/systemd/build/src/shared/libsystemd-shared-${PACKAGE_VERSION}-kairos.so /package/usr/lib/systemd/
# ukify is copied in two places according to upstream, I guess to maintain backwards compatibility
- cp src/systemd/build/ukify /package/usr/bin/
- cp src/systemd/build/ukify /package/usr/lib/systemd/
# use of pyinstaller to create a single binary with all deps bundled
- src/systemd/build/ukify --version
- pip install pyinstaller
- pyinstaller src/systemd/build/ukify -F
- chmod +x dist/ukify
- dist/ukify --version
- cp dist/ukify /package/usr/bin/
- cp dist/ukify /package/usr/lib/systemd/
{{end}}
- ls -ltra /package
2 changes: 1 addition & 1 deletion packages/system/systemd/collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ packages:
github.owner: "systemd"
- name: "systemd-ukify"
category: "system"
version: "255+1"
version: "255+2"
image: "fedora:39"
labels:
github.repo: "systemd"
Expand Down

0 comments on commit fb5a7f0

Please sign in to comment.