Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
abuild
abuild
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • alpine
  • abuildabuild
  • Issues
  • #10028

Closed
Open
Opened Apr 02, 2021 by Newbyte@NewbyteContributor

abuild-keygen fails without aborting if run as a non-root user and sudo isn't installed

Currently, abuild-keygen fails to install the pubkey to /etc/apk/keys if it's run as a non-root user and sudo is not installed (and $SUDO isn't set). This makes sense, however the problem is that the script goes on anyway and - to my knowledge - does not provide a trivial way to redo this process short of doing it manually yourself. While this definitely works, I think it would be preferable if the script aborted early if it is in a situation where it won't be able to execute itself in its entirety. I imagine this would be implemented by checking whether $SUDO is an executable, and if not it checks if it can write to /etc/apk/keys, but suggestions for better solutions are welcome.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: alpine/abuild#10028