[Buildd-tools-devel] Bug#354462: schroot: run.d/50sbuild does not create /var/lib/sbuild/srcdep-lock

Adeodato Simó dato at net.com.org.es
Sun Feb 26 15:05:23 UTC 2006


Package: schroot
Version: 0.2.4-1
Severity: normal
Tags: patch

Hi,

  sbuild-setup(7) hints in step "7. sbuild setup" that schroot is
  capable of creating the mentioned directories at the start of each
  build. However, /etc/schroot/run.d/50sbuild only creates
  /build/sbuild, and not /var/lib/sbuild/srcdep-lock with the proper
  permissions, causing sbuild to fail.

  As it seems, the attached patch fixes the issue.

  Thanks,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
We learned that the Linux load average rolls over at 1024. And we
actually found this out empirically.
                -- H. Peter Anvin from kernel.org
-------------- next part --------------
--- /etc/schroot/run.d/50sbuild
+++ /etc/schroot/run.d/50sbuild
@@ -27,6 +27,24 @@
 	fi
 	chmod 770 "${CHROOT_PATH}/build/${AUTH_USER}"
 
+
+	if [ ! -d "${CHROOT_PATH}/var/lib/sbuild/srcdep-lock" ]; then
+	    if [ "$AUTH_VERBOSITY" = "verbose" ]; then
+		echo "Creating srcdep-lock directory: ${CHROOT_PATH}/var/lib/sbuild/srcdep-lock"
+	    fi
+	    mkdir -p "${CHROOT_PATH}/var/lib/sbuild/srcdep-lock"
+	fi
+
+	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
+	    echo "Setting ownership of ${CHROOT_PATH}/var/lib/sbuild to root:sbuild"
+	fi
+	chown -R root:sbuild "${CHROOT_PATH}/var/lib/sbuild"
+
+	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
+	    echo "Setting permissions of ${CHROOT_PATH}/var/lib/sbuild to 02775"
+	fi
+	chmod -R 02775 "${CHROOT_PATH}/var/lib/sbuild"
+
     else
 
 	if [ "$AUTH_VERBOSITY" = "verbose" ]; then


More information about the Buildd-tools-devel mailing list