Skip to content

Commit

Permalink
Remove exec bit from gems
Browse files Browse the repository at this point in the history
There are still some gem binaries hardcoded to use /usr/bin/ruby. To
stop rpm to detect legacy ruby dependencies we remove the executable
bit from those binaries.

Co-authored-by: Henne Vogelsang <hvogel@opensuse.org>
  • Loading branch information
danidoni and hennevogel committed Mar 14, 2022
1 parent c36cdd0 commit 5bc3710
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/obs-bundled-gems.spec
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ find %{buildroot} -type f -print0 | xargs -0 grep -l /usr/bin/env | while read f
chmod a-x $file
done

# remove exec bit from all other files still containing /usr/bin/ruby
find %{buildroot} -type f -print0 | xargs -0 grep -l /usr/bin/ruby | while read file; do
chmod a-x $file
done

# remove the rpath entry from the shared lib in the mysql2 rubygem
chrpath -d %{buildroot}%_libdir/obs-api/ruby/*/extensions/*/*/mysql2-*/mysql2/mysql2.so || true
chrpath -d %{buildroot}%_libdir/obs-api/ruby/*/gems/mysql2-*/lib/mysql2/mysql2.so || true
Expand Down

0 comments on commit 5bc3710

Please sign in to comment.