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; \
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Latest posts

Top