• We did not send an email asking for donations - please read this post.

Makefile sudo issue

ankur1216

New Member
Joined
Aug 2, 2022
Messages
1
Reaction score
0
Credits
13
I'm seeing build issues cause by "sudo" when packaging Debian and RPM files on our Ubuntu 20.04 Docker Container.
Is there any way to eliminate "sudo" in the Makefile for Debian and RPM packaging?

Here are the 2 snippets of using sudo in our Makefile. It is causing many issues on our Docker build on the build server.
If anyone knows an alternative or how to eliminate these it would be helpful.

Debian
Code:
sudo chown -R root:root debian; \
dpkg-deb --build debian; \
sudo chown -R ${USER}:${USER} debian; \

RPM
Code:
sudo chown -R root:root rpmbuild; \
sudo rpmbuild -bb --target=$(RPM_TARGET) --define "_topdir $(BASE_PATH)/apps/build/rpmbuild" --define "RPM_PACKAGE_VERSION $(RPM_VERSION)" --define "RPM_RELEASE $(BUILD_NUM)" rpmbuild/SPECS/$(BUILD_SPEC) --define "_build_id_links none"; \
sudo chown -R ${USER}:${USER} rpmbuild; \
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top