mika / jenkins-debian-glue

Scripts for Debian package/repository handling inside Jenkins
MIT License
131 stars 91 forks source link

generate-reprepro-codename seems to use SUDO_CMD superfluously #220

Closed kienanstewart closed 5 years ago

kienanstewart commented 5 years ago

Hi,

in generate-reprepro-codename there are two calls which use SUDO_CMD if it is set to become the reprepro user; however, in all cases of calls to this function (from build-and-generate-package), the entire script is already called as the reprepro user.

It seems like usage of SUDO_CMD inside generate-reprepro-codename is now superfluous, and can lead to sudo error spam, eg:

+ sudo -u reprepro mkdir -p /srv/reprepro/conf
reprepro is not in the sudoers file. This event will be reported.
mika commented 5 years ago

Thanks for providing this bugreport and a PR adressing it, I just need some time to ensure we aren't breaking any stuff out there™, since generate-reprepro-codename might also be invoked outside of build-and-generate-package).

kienanstewart commented 5 years ago

For sure! Thanks for taking the time to look at it