samba4: ensure that copied cache.txt is writable
authorDanomi Manchego <danomimanchego123@gmail.com>
Wed, 29 Nov 2017 02:55:24 +0000 (21:55 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 29 Nov 2017 20:22:21 +0000 (21:22 +0100)
If the Buildroot tree is read-only, then cache.txt is copied read-only into
the build directory, and the configuration step fails.  Fix this in the
same way we do in other places, by opening permissions as we copy the file
using $(INSTALL).

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/samba4/samba4.mk

index 7836df5beba7a4f47f69be150a221bcab8b2fcc5..ade9add347a0e7b6d04d7b977e37b430cc880f0d 100644 (file)
@@ -86,7 +86,7 @@ endef
 SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_REMOVE_CTDB_TESTS
 
 define SAMBA4_CONFIGURE_CMDS
-       cp package/samba4/samba4-cache.txt $(@D)/cache.txt;
+       $(INSTALL) -m 0644 package/samba4/samba4-cache.txt $(@D)/cache.txt;
        echo 'Checking uname machine type: $(BR2_ARCH)' >>$(@D)/cache.txt;
        (cd $(@D); \
                PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python-config" \