From 532c8e233ebaed8b4e362e4b9a21f8def4e47cd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 19 Jan 2023 08:47:30 +0100 Subject: [PATCH] Revert "Try fully preventing network access for rpmbuild." This reverts commit 70958097c411a9435ba9ea01b1624a2fa2a86121. From pld-devel-en: "Unfortunately it appears it's not possible to create user namespaces in a chroot: EPERM (since Linux 3.9) CLONE_NEWUSER was specified in flags and the caller is in a chroot environment (i.e., the caller's root directory does not match the root directory of the mount namespace in which it resides). " --- 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 7565c69..4b1eccf 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 " \ - "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" % { + "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, -- 2.44.0