Author: emaste
Date: Thu Sep 17 18:47:23 2020
New Revision: 365846
URL: https://svnweb.freebsd.org/changeset/base/365846

Log:
  Cirrus-CI: build as an unprivileged user
  
  The Cirrus-CI-provided working tree is owned by root.  Leave that as is
  for simplicity but build as an unprivileged user; this tests building
  with an unmodifiable source tree as a side effect.
  
  Continue running the smoke test as root for now, as it failed when run
  as an unprivileged user - pkg reported "Fail to chmod
  /usr/bin/.pkgtemp.lpq.dUHpEqPGJ9pq:Operation not permitted"
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/.cirrus.yml

Modified: head/.cirrus.yml
==============================================================================
--- head/.cirrus.yml    Thu Sep 17 18:24:51 2020        (r365845)
+++ head/.cirrus.yml    Thu Sep 17 18:47:23 2020        (r365846)
@@ -12,9 +12,13 @@ task:
   timeout_in: 120m
   install_script:
   - pkg install -y qemu-devel uefi-edk2-qemu-x86_64
+  setup_user_script:
+  - pw useradd user
+  - mkdir -p /usr/obj/$(pwd -P)
+  - chown user:user /usr/obj/$(pwd -P)
   script:
-  - make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel
+  - su user -c "make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld 
buildkernel"
   package_script:
-  - make WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages
+  - su user -c "make WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages"
   test_script:
   - sh tools/boot/ci-qemu-test.sh
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to