Skip to content

Commit

Permalink
packages: use force_disable_rpath macro instead of open coding it
Browse files Browse the repository at this point in the history
The `force_disable_rpath` macro was released with the Bottlerocket SDK
v0.34.0 and expands to the rpath hack. Switch over all packages open
coding it to actually make use of the macro.

Note that the util-linux and libacl packages use both the rpath hack and
`--disable-rpath` in the invocation of the `configure` script. For those
`--disable-rpath` does not actually prevent inclusion of an rpath into
the actual executables. This commit only mechanically changes over to
the use of the macro, and leaves fixing the incomplete handling of the
option in those packages to another day.

Signed-off-by: Markus Boehme <markubo@amazon.com>
  • Loading branch information
markusboehme committed Sep 15, 2023
1 parent c4d2da8 commit b224eea
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 31 deletions.
3 changes: 1 addition & 2 deletions packages/iptables/iptables.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Requires: %{name}
--disable-nfsynproxy \
--disable-static \

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
3 changes: 1 addition & 2 deletions packages/libacl/libacl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ Requires: %{name}
--disable-nls \
--disable-rpath \

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
3 changes: 1 addition & 2 deletions packages/libattr/libattr.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Requires: %{name}

%build
%cross_configure
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
4 changes: 1 addition & 3 deletions packages/libaudit/libaudit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ autoreconf -fi
--without-python \
--without-python3 \

# "fix" rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
3 changes: 1 addition & 2 deletions packages/libdbus/libdbus.spec
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ Requires: %{name}
--disable-systemd \
--with-xml=expat \

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
3 changes: 1 addition & 2 deletions packages/libnl/libnl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ autoreconf -fi
--enable-static \
--disable-cli \

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
3 changes: 1 addition & 2 deletions packages/libpcre/libpcre.spec
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ Requires: %{name}
--disable-pcre2test-libedit \
--disable-pcre2test-libreadline \

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
4 changes: 1 addition & 3 deletions packages/libseccomp/libseccomp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ Requires: %{name}
%build
%cross_configure

# "fix" rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
4 changes: 1 addition & 3 deletions packages/liburcu/liburcu.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Requires: %{name}
%build
%cross_configure --disable-static

# "fix" rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
4 changes: 1 addition & 3 deletions packages/open-vm-tools/open-vm-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ autoreconf -fi
--without-xmlsec1 \
--without-xmlsecurity \

# "fix" rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
3 changes: 1 addition & 2 deletions packages/procps/procps.spec
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Requires: %{name}
--without-ncurses \
--without-systemd \

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
3 changes: 1 addition & 2 deletions packages/util-linux/util-linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ cp Documentation/licenses/COPYING.* .
--without-udev \
--without-utempter \

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down
4 changes: 1 addition & 3 deletions packages/wicked/wicked.spec
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ autoreconf -fi
--with-dbus-configdir=%{_cross_datadir}/dbus-1/system.d \
--without-dbus-servicedir \

# "fix" rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%force_disable_rpath

%make_build

Expand Down

0 comments on commit b224eea

Please sign in to comment.