Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,27 +182,27 @@ write_archive_info() {
}

patch_osbuild() {
#return # No patches at this time
# Add a few patches that either haven't made it into a release or
# that will be obsoleted with other work that will be done soon.
#
# To make it easier to apply patches we'll move around the osbuild
# code on the system first:
rmdir /usr/lib/osbuild/osbuild
python_lib_dir=$(ls -d /usr/lib/python*)
mv "${python_lib_dir}/site-packages/osbuild" /usr/lib/osbuild/
mkdir -p /usr/lib/osbuild/tools
mv /usr/bin/osbuild-mpp /usr/lib/osbuild/tools/
# Now all the software is under the /usr/lib/osbuild dir and we can patch
# shellcheck disable=SC2002
cat \
/usr/lib/coreos-assembler/0003-buildroot-bind-mount-run-udev-for-partition-discovery.patch \
| patch -d /usr/lib/osbuild -p1
# And then move the files back; supermin appliance creation will need it back
# in the places delivered by the RPM.
mv /usr/lib/osbuild/tools/osbuild-mpp /usr/bin/osbuild-mpp
mv /usr/lib/osbuild/osbuild "${python_lib_dir}/site-packages/osbuild"
mkdir -p /usr/lib/osbuild/osbuild
return # No patches at this time
# # Add a few patches that either haven't made it into a release or
# # that will be obsoleted with other work that will be done soon.
# #
# # To make it easier to apply patches we'll move around the osbuild
# # code on the system first:
# rmdir /usr/lib/osbuild/osbuild
# python_lib_dir=$(ls -d /usr/lib/python*)
# mv "${python_lib_dir}/site-packages/osbuild" /usr/lib/osbuild/
# mkdir -p /usr/lib/osbuild/tools
# mv /usr/bin/osbuild-mpp /usr/lib/osbuild/tools/
# # Now all the software is under the /usr/lib/osbuild dir and we can patch
# # shellcheck disable=SC2002
# cat \
# /usr/lib/coreos-assembler/0003-buildroot-bind-mount-run-udev-for-partition-discovery.patch \
# | patch -d /usr/lib/osbuild -p1
# # And then move the files back; supermin appliance creation will need it back
# # in the places delivered by the RPM.
# mv /usr/lib/osbuild/tools/osbuild-mpp /usr/bin/osbuild-mpp
# mv /usr/lib/osbuild/osbuild "${python_lib_dir}/site-packages/osbuild"
# mkdir -p /usr/lib/osbuild/osbuild
Comment on lines +185 to +205

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Instead of leaving a large block of commented-out code, it is better to completely remove it to keep the script clean and maintainable.

Suggested change
return # No patches at this time
# # Add a few patches that either haven't made it into a release or
# # that will be obsoleted with other work that will be done soon.
# #
# # To make it easier to apply patches we'll move around the osbuild
# # code on the system first:
# rmdir /usr/lib/osbuild/osbuild
# python_lib_dir=$(ls -d /usr/lib/python*)
# mv "${python_lib_dir}/site-packages/osbuild" /usr/lib/osbuild/
# mkdir -p /usr/lib/osbuild/tools
# mv /usr/bin/osbuild-mpp /usr/lib/osbuild/tools/
# # Now all the software is under the /usr/lib/osbuild dir and we can patch
# # shellcheck disable=SC2002
# cat \
# /usr/lib/coreos-assembler/0003-buildroot-bind-mount-run-udev-for-partition-discovery.patch \
# | patch -d /usr/lib/osbuild -p1
# # And then move the files back; supermin appliance creation will need it back
# # in the places delivered by the RPM.
# mv /usr/lib/osbuild/tools/osbuild-mpp /usr/bin/osbuild-mpp
# mv /usr/lib/osbuild/osbuild "${python_lib_dir}/site-packages/osbuild"
# mkdir -p /usr/lib/osbuild/osbuild
# No patches at this time
return 0

}

fixup_file_permissions() {
Expand Down

This file was deleted.