-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: pull all build scripts under build_files directory (#177)
Co-authored-by: Kyle Gospodnetich <[email protected]> Co-authored-by: Jorge O. Castro <[email protected]> Co-authored-by: Benjamin Sherman <[email protected]>
- Loading branch information
1 parent
adc4bb6
commit 568e01d
Showing
46 changed files
with
63 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
set -oeux pipefail | ||
|
||
# Ensure packages get copied to /var/cache/rpms | ||
if [ -d /var/cache/akmods ]; then | ||
for RPM in $(find /var/cache/akmods/ -type f -name \*.rpm); do | ||
cp "${RPM}" /var/cache/rpms/kmods/ | ||
done | ||
fi | ||
|
||
if [ -d /root/rpmbuild/RPMS/"$(uname -m)" ]; then | ||
for RPM in $(find /root/rpmbuild/RPMS/"$(uname -m)"/ -type f -name \*.rpm); do | ||
cp "${RPM}" /var/cache/rpms/kmods/ | ||
done | ||
fi | ||
|
||
# Remove kernel version from kmod package names | ||
# FIXME: The sed is a gross hack, maybe PR upstream? | ||
sed -i -e 's/args = \["rpmbuild", "-bb"\]/args = \["rpmbuild", "-bb", "--buildroot", "#{build_path}\/BUILD"\]/g' /usr/local/share/gems/gems/fpm-*/lib/fpm/package/rpm.rb | ||
kernel_version=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" "${KERNEL_NAME}" | head -n 1) | ||
for rpm in $(find /var/cache/rpms/kmods -type f -name \*.rpm); do | ||
basename=$(basename ${rpm}) | ||
name=${basename%%-${kernel_version}*} | ||
if [[ "$basename" == *"$kernel_version"* ]]; then | ||
fpm --verbose -s rpm -t rpm -p ${rpm} -f --name ${name} ${rpm} | ||
else | ||
echo "Skipping $basename rebuild as its name does not contain $kernel_version" | ||
fi | ||
done | ||
|
||
find /var/cache/rpms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters