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

pkg: remove use of sudo from the signing script #4206

Merged
merged 1 commit into from
Jun 5, 2024
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
2 changes: 1 addition & 1 deletion packaging/darwin/macos-pkg-build-and-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ sign "${crcBinDir}/crc"
sign "${crcBinDir}/crc-admin-helper-darwin"
sign "${crcBinDir}/vfkit"

sudo chmod +sx "${crcBinDir}/crc-admin-helper-darwin"
chmod +sx "${crcBinDir}/crc-admin-helper-darwin"
Copy link
Contributor

Choose a reason for hiding this comment

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

If "${crcBinDir}/crc-admin-helper-darwin" is owned by the user running the script, both versions should be equivalent.
After installation though, crc-admin-helper-darwin must be owned by root and have the +s permission set, otherwise the binary won't be able to make changes to /etc/hosts Have you checked it's still fine?

Copy link
Contributor

Choose a reason for hiding this comment

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

After create installer from this PR and run it I have this

podmanqe@dev-platform-mac4 ~ % ls -al /usr/local/crc     
total 389096
drwxr-xr-x  5 root  wheel        160 Jun  5 13:11 .
drwxr-xr-x  5 root  wheel        160 Jun  5 13:12 ..
-rwxr-xr-x  1 root  wheel  159483008 Jun  5 13:11 crc
-rwsr-sr-x  1 root  wheel    5238656 Jun  5 13:11 crc-admin-helper-darwin
-rwxr-xr-x  1 root  wheel   34489808 Jun  5 13:11 vfkit

Copy link
Member Author

Choose a reason for hiding this comment

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

the installation needs to be run as root, since it installs in the / dir, and the files it creates are also owned by root


pkgbuild --identifier com.redhat.crc --version ${version} \
--scripts "${BASEDIR}/scripts" \
Expand Down
Loading