diff --git a/debian/bladerf-firmware-fx3.postinst b/debian/bladerf-firmware-fx3.postinst index 475c77c2..cc392373 100644 --- a/debian/bladerf-firmware-fx3.postinst +++ b/debian/bladerf-firmware-fx3.postinst @@ -26,6 +26,7 @@ if [ ! -s ${DATAFILE} ] || ! checkfile ${DATAFILE}; then # We're good! Copy it to its new home. echo "Download successful, copying to ${DATAFILE}" mv ${NEWFILE} ${DATAFILE} + chmod 0444 ${DATAFILE} else # It failed! Print an error and nuke the temporary file. rm -f ${NEWFILE} diff --git a/debian/bladerf-fpga-hostedx115.postinst b/debian/bladerf-fpga-hostedx115.postinst index b2e9ccec..636b3380 100644 --- a/debian/bladerf-fpga-hostedx115.postinst +++ b/debian/bladerf-fpga-hostedx115.postinst @@ -26,6 +26,7 @@ if [ ! -s ${DATAFILE} ] || ! checkfile ${DATAFILE}; then # We're good! Copy it to its new home. echo "Download successful, copying to ${DATAFILE}" mv ${NEWFILE} ${DATAFILE} + chmod 0444 ${DATAFILE} else # It failed! Print an error and nuke the temporary file. rm -f ${NEWFILE} diff --git a/debian/bladerf-fpga-hostedx40.postinst b/debian/bladerf-fpga-hostedx40.postinst index 5c4ed567..3791a0b3 100644 --- a/debian/bladerf-fpga-hostedx40.postinst +++ b/debian/bladerf-fpga-hostedx40.postinst @@ -26,6 +26,7 @@ if [ ! -s ${DATAFILE} ] || ! checkfile ${DATAFILE}; then # We're good! Copy it to its new home. echo "Download successful, copying to ${DATAFILE}" mv ${NEWFILE} ${DATAFILE} + chmod 0444 ${DATAFILE} else # It failed! Print an error and nuke the temporary file. rm -f ${NEWFILE} diff --git a/debian/changelog b/debian/changelog index 6962ebba..0bff7b57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,11 @@ bladerf (2017.07) unstable; urgency=low + [ Robert Ghilduta ] * Add Automatic Gain Control + [ Rey Tucker ] + * debian: fix permissions on FPGA and firmware binaries after downloading + -- Robert Ghilduta Sun, 02 Jul 2017 21:14:15 -0400 bladerf (2016.06) unstable; urgency=low diff --git a/host/libraries/libbladeRF/src/file_ops.c b/host/libraries/libbladeRF/src/file_ops.c index 3530eca8..70698312 100644 --- a/host/libraries/libbladeRF/src/file_ops.c +++ b/host/libraries/libbladeRF/src/file_ops.c @@ -115,6 +115,8 @@ int file_read_buffer(const char *filename, uint8_t **buf_ret, size_t *size_ret) f = fopen(filename, "rb"); if (!f) { + log_error("%s: could not open %s: %s\n", __FUNCTION__, filename, + strerror(errno)); switch (errno) { case ENOENT: return BLADERF_ERR_NO_FILE;