Skip to content

Commit 31dee3a

Browse files
.pc file modification before moving and bumped epoch.
1 parent 5208b46 commit 31dee3a

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

checkov.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package:
22
name: checkov
33
version: 3.0.34
4-
epoch: 1
4+
epoch: 2
55
description: "static code and composition analysis tool for IaC"
66
copyright:
77
- license: MIT
@@ -42,13 +42,18 @@ pipeline:
4242
rm -rf tests *_tests setup.py
4343
ln -s /usr/share/app/checkov/checkov/main.py "${{targets.destdir}}"/usr/bin/checkov
4444
45-
# Relocate .pc files to /usr/lib/pkgconfig and create symlinks
45+
# Relocate .pc files to /usr/lib/pkgconfig
4646
mkdir -p "${{targets.destdir}}"/usr/lib/pkgconfig/
47-
find "${{targets.destdir}}"/usr/share/app/checkov -name "*.pc" | while read pc_file; do
48-
if [ ! -L "$pc_file" ]; then
49-
mv "$pc_file" "${{targets.destdir}}"/usr/lib/pkgconfig/$(basename "$pc_file")
50-
ln -s "${{targets.destdir}}"/usr/lib/pkgconfig/$(basename "$pc_file") "$pc_file"
47+
48+
find "${{targets.destdir}}"/usr/share/app/checkov -type f -name "*.pc" | while read -r pc_file; do
49+
dname=$(printf "${pc_file}" | sed -e "s,${{targets.destdir}},,")
50+
dname=$(dirname "${dname}")
51+
# Adjust "pcfiledir" so that it reflects the right location of each .pc file.
52+
if grep -q "pcfiledir" "${pc_file}"; then
53+
sed -i -e "s,\${pcfiledir},${dname}," "${pc_file}"
5154
fi
55+
# Move the .pc file to /usr/lib/pkgconfig/
56+
mv "${pc_file}" "${{targets.destdir}}"/usr/lib/pkgconfig/
5257
done
5358
5459
- uses: strip

0 commit comments

Comments
 (0)