Merge pull request #507 from Nuand/rtucker-debian-fiximgperms

Fix permissions on downloaded FPGA/firmware images in debian package
This commit is contained in:
Rey Tucker 2017-08-02 17:52:18 -04:00 • committed by GitHub
commit 786c3cc001
5 changed files with 9 additions and 0 deletions

View file

@ -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}

View file

@ -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}

View file

@ -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}

4
debian/changelog vendored
View file

@ -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 <robert.ghilduta@nuand.com> Sun, 02 Jul 2017 21:14:15 -0400
bladerf (2016.06) unstable; urgency=low

View file

@ -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;