Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM: Don't use %post to set SUID on chrome-sandbox #8040

Merged
merged 1 commit into from
Jan 6, 2025
Merged
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
8 changes: 3 additions & 5 deletions packaging/linux/rancher-desktop.spec
Original file line number Diff line number Diff line change
Expand Up @@ -130,29 +130,27 @@ mv resources/resources/linux/rancher-desktop.desktop share/applications/rancher-
mv resources/resources/linux/rancher-desktop.appdata.xml share/metainfo/rancher-desktop.appdata.xml

# Remove qemu binaries included in lima tarball
rm -v resources/resources/linux/lima/bin/qemu-*
rm -v resources/resources/linux/lima/bin/qemu-*
rm -rvf resources/resources/linux/lima/lib
rm -rvf resources/resources/linux/lima/share/qemu

%install
mkdir -p "%{buildroot}%{_prefix}/bin" "%{buildroot}/opt/%{name}"

cp -ra ./share "%{buildroot}%{_prefix}"
cp -ra ./share "%{buildroot}%{_prefix}"
cp -ra ./* "%{buildroot}/opt/%{name}"

# Link to the binary
ln -sf "/opt/%{name}/rancher-desktop" "%{buildroot}%{_bindir}/rancher-desktop"

%post
# SUID chrome-sandbox for Electron 5+
chmod 4755 "/opt/%{name}/chrome-sandbox"

update-desktop-database %{_prefix}/share/applications || true

%files
%defattr(-,root,root,-)
%dir /opt/%{name}
/opt/%{name}*
%attr(4755,root,root) /opt/%{name}/chrome-sandbox
%{_bindir}/rancher-desktop
%{_prefix}/share/applications/rancher-desktop.desktop
%{_prefix}/share/icons/hicolor/*
Expand Down
Loading