From 16b99f71a78c4ead192e293e9b5f44947f96cb8a Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 8 Mar 2018 22:19:20 +0100 Subject: [PATCH] Make /home/pmos/build world-readable When calculating checksums, we copy an aport folder to `/home/pmos/build`, `chown` it to the `pmos` user, let `abuild` calculate the checksums, and copy the `APKINDEX` back. So far this only worked as long as the `aports/main/hello-world` folder in this example is already world-readable. If it is not (e.g. because the system had a different default umask), then the copying back step will fail. This commit makes the copied folder world readable to fix this. --- pmb/build/other.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pmb/build/other.py b/pmb/build/other.py index 49a47bdf..39fe9b33 100644 --- a/pmb/build/other.py +++ b/pmb/build/other.py @@ -82,13 +82,13 @@ def copy_to_buildpath(args, package, suffix="native"): # Clean up folder build = args.work + "/chroot_" + suffix + "/home/pmos/build" if os.path.exists(build): - pmb.chroot.root(args, ["rm", "-rf", "/home/pmos/build"], - suffix=suffix) + pmb.chroot.root(args, ["rm", "-rf", "/home/pmos/build"], suffix) - # Copy aport contents + # Copy aport and set permissions (#1298) pmb.helpers.run.root(args, ["cp", "-r", aport + "/", build]) - pmb.chroot.root(args, ["chown", "-R", "pmos:pmos", - "/home/pmos/build"], suffix=suffix) + pmb.chroot.root(args, ["chown", "-R", "pmos:pmos", "/home/pmos/build"], + suffix) + pmb.chroot.user(args, ["chmod", "-R", "a+rX", "/home/pmos/build"], suffix) def is_necessary(args, arch, apkbuild, indexes=None):