Skip to content

Commit

Permalink
osbuild.spec: don't mangle shebangs
Browse files Browse the repository at this point in the history
Stop the rpm post install script from mangling shebangs for runners,
stages, and assemblers on RHEL. This breaks running them in osbuild
build roots, which might contain a different operating system than the
host, and thus not have platform-python.

This was always the intended behavior, and cb265e8 was a step in that
direction.

In effect, this changes a requirement on build roots, because when
building RHEL on RHEL, all current stages and assemblers now have a
python3 shebang. Thus, this means all build roots must have python3
explicitly installed.

Fixes osbuild#354
  • Loading branch information
larskarlitski committed Oct 19, 2020
1 parent 88aed72 commit bb13783
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions osbuild.spec
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
# by rhel runner.
%global __requires_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$

# Turn off shebang mangling on RHEL. brp-mangle-shebangs (from package
# redhat-rpm-config) is run on all executables in a package after the `install`
# section runs. The below macro turns this behavior off for:
# - runners, because they already have the correct shebang for the platform
# they're meant for, and
# - stages and assemblers, because they are run within osbuild build roots,
# which are not required to contain the same OS as the host and might thus
# have a different notion of "platform-python".
%global __brp_mangle_shebangs_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$

%{?python_enable_dependency_generator}

%description
Expand Down

0 comments on commit bb13783

Please sign in to comment.