[projects/pld-builder.new] Try fully preventing network access for rpmbuild.

arekm arekm at pld-linux.org
Wed Jan 18 13:02:26 CET 2023


commit 70958097c411a9435ba9ea01b1624a2fa2a86121
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Jan 18 13:02:15 2023 +0100

    Try fully preventing network access for rpmbuild.

 PLD_Builder/rpm_builder.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/PLD_Builder/rpm_builder.py b/PLD_Builder/rpm_builder.py
index 4b1eccf..7565c69 100644
--- a/PLD_Builder/rpm_builder.py
+++ b/PLD_Builder/rpm_builder.py
@@ -239,7 +239,7 @@ def build_rpm(r, b):
                 if r.max_jobs > 0:
                     max_jobs = max(min(config.max_jobs, r.max_jobs), 1)
                 cmd = "set -ex; : build-id: %(r_id)s; TMPDIR=%(tmpdir)s exec nice -n %(nice)s " \
-                    "rpmbuild -bb --define '__jobs %(max_jobs)d' --define '_smp_mflags -j%(max_jobs)d' --define '_make_opts -Otarget' --define '_pld_builder 1' %(rpmdefs)s %(topdir)s/%(spec)s" % {
+                    "unshare -n -c rpmbuild -bb --define '__jobs %(max_jobs)d' --define '_smp_mflags -j%(max_jobs)d' --define '_make_opts -Otarget' --define '_pld_builder 1' %(rpmdefs)s %(topdir)s/%(spec)s" % {
                     'r_id' : r.id,
                     'tmpdir': tmpdir,
                     'nice' : config.nice,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/70958097c411a9435ba9ea01b1624a2fa2a86121



More information about the pld-cvs-commit mailing list