Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
proot: fix checkout_ports from non-root
To:
OpenBSD ports <ports@openbsd.org>
Date:
Wed, 27 Aug 2025 20:57:01 +0200

Download raw body.

Thread
ports@,

I had discovered that proot can't checkout ports from cvs when its PORT_USER
not root. It fauls as:

cvs: cannot open /root/.cvsrc: Permission denied
system(/usr/bin/cvs, -z3, -d, /home/cvs, co, -P, -A, ports) failed: exit(1)

the used config:

PORT_USER=catap
chroot=/build/current
snapshot=http://openbsd.as250.net/pub/OpenBSD/snapshots/amd64
portscvs=/home/cvs
chown_all=1
actions=snapshot unpopulate checkout_ports chown_all ports_subdirs check_symlinks devs

here the diff which helps me.

Ok?

Index: infrastructure/bin/proot
===================================================================
RCS file: /home/cvs/ports/infrastructure/bin/proot,v
diff -u -p -r1.75 proot
--- infrastructure/bin/proot	3 Aug 2024 15:24:34 -0000	1.75
+++ infrastructure/bin/proot	27 Aug 2025 18:51:36 -0000
@@ -915,7 +915,7 @@ sub checkout_ports($state)
 {
 	$state->banner("Checking out ports tree",
 	    sub {
-	    	my @cvs = ("/usr/bin/cvs", "-z3", "-d", $state->{portscvs});
+	    	my @cvs = ("/usr/bin/cvs", "-f", "-z3", "-d", $state->{portscvs});
 		my $dir = $state->chroot($state->{PORTSDIR});
 		if (-d "$dir/CVS") {
 			$state->{portuser}->run_as(sub {