Skip to content

Conversation

@haslinghuis
Copy link
Member

Fixes file permissions for debian package. See also #3009

@haslinghuis haslinghuis added this to the 3.7.0 milestone Sep 30, 2022
@haslinghuis haslinghuis self-assigned this Sep 30, 2022
@github-actions

This comment has been minimized.

@haslinghuis haslinghuis force-pushed the fix-debian-permissions branch from 8eca3d5 to 8511be2 Compare October 1, 2022 00:09
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

Do you want to test this code? Here you have an automated build:
Betaflight-Blackbox-Explorer-Linux
Betaflight-Blackbox-Explorer-macOS
Betaflight-Blackbox-Explorer-Windows
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@blckmn
Copy link
Member

blckmn commented Oct 1, 2022

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> FAIL
  • Tested label found -> PASS
  • assigned to an approver -> PASS
  • approver count at least three -> FAIL

@nerdCopter
Copy link
Member

Do you want to test this code? Here you have an automated build: Betaflight-Blackbox-Explorer-Linux

8511be2:

  • Ubuntu 20.04.5: .deb installation works 100%.
  • Debain 11: .deb has .zst issue; However, building locally, the resultant .deb installation works.

@howels
Copy link

howels commented Oct 4, 2022

Confirmed working on Ubuntu 22.04 - more details below.

Interestingly the blackbox explorer has a similar bug but not quite as severe as configurator did. For configurator the main binary was non-executable for non-root users but blackbox explorer is executable. The only thing broken is the lib directory files are not readable for non-root (except ffmpeg for some reason??) which blocks loading of libraries on launch:

$ ll /opt/betaflight/betaflight-blackbox-explorer
total 106464
drwxr-xr-x 7 root root     4096 Oct  4 14:39 ./
drwxr-xr-x 4 root root     4096 Oct  4 14:39 ../
-rwxr-xr-x 1 root root  3885495 Sep 28 00:37 betaflight-blackbox-explorer*
-rw-r--r-- 1 root root      350 Sep 28 00:37 betaflight-blackbox-explorer.desktop
-rwx------ 1 root root 26918912 Sep 28 00:37 chrome_crashpad_handler*
-rwx------ 1 root root 12617640 Sep 28 00:37 chromedriver*
-rw-r--r-- 1 root root      268 Sep 28 00:37 copyright
-rw------- 1 root root  6615054 Sep 28 00:37 credits.html
drwxr-xr-x 2 root root     4096 Oct  4 14:39 icon/
-rw------- 1 root root 10451040 Sep 28 00:37 icudtl.dat
drwxr-xr-x 2 root root     4096 Oct  4 14:39 lib/
drwxr-xr-x 2 root root     4096 Oct  4 14:39 locales/
drwxr-xr-x 2 root root     4096 Oct  4 14:39 mime/
-rwx------ 1 root root  3249192 Sep 28 00:37 minidump_stackwalk*
-rwx------ 1 root root  2784160 Sep 28 00:37 nacl_helper*
-rwx------ 1 root root    15544 Sep 28 00:37 nacl_helper_bootstrap*
-rwx------ 1 root root  3933576 Sep 28 00:37 nacl_irt_x86_64.nexe*
-rw------- 1 root root   610516 Sep 28 00:37 nw_100_percent.pak
-rw------- 1 root root   913944 Sep 28 00:37 nw_200_percent.pak
-rwx------ 1 root root 27922640 Sep 28 00:37 nwjc*
drwxr-xr-x 2 root root     4096 Oct  4 14:39 pnacl/
-rw------- 1 root root  8310058 Sep 28 00:37 resources.pak
-rw------- 1 root root   722904 Sep 28 00:37 v8_context_snapshot.bin

$ ll /opt/betaflight/betaflight-blackbox-explorer/lib
total 303468
drwxr-xr-x 2 root root      4096 Oct  4 14:39 ./
drwxr-xr-x 7 root root      4096 Oct  4 14:39 ../
-rwx------ 1 root root   3302472 Sep 28 00:37 libEGL.so*
-rwxr-xr-x 1 root root  18211112 Sep 28 00:37 libffmpeg.so*
-rwx------ 1 root root  30663240 Sep 28 00:37 libGLESv2.so*
-rwx------ 1 root root  31632536 Sep 28 00:37 libnode.so*
-rwx------ 1 root root 195146440 Sep 28 00:37 libnw.so*
-rwx------ 1 root root  29121904 Sep 28 00:37 libvk_swiftshader.so*
-rwx------ 1 root root   2643648 Sep 28 00:37 libvulkan.so.1*
-rw------- 1 root root       107 Sep 28 00:37 vk_swiftshader_icd.json

The fix works however - forcing correct permissions everywhere we need them. I reckon something changed in that gulp deployer in the past few months as the 3.6.0 release works ok but 3.7 nightlies are bust.

Copy link

@howels howels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working correctly on Ubuntu 22.04.

@nerdCopter
Copy link
Member

@howels , i saw this this output earlier, maybe a source of the issue you mentioned. However nvm use 16.17.0 fixed it for me.

[08:17:25] Starting 'release_linux64_rpm'...
[08:17:38] dpkg-deb: error: maintainer script 'preinst' has bad permissions 644 (must be >=0555 and <=0775)
[08:17:38] 'release_linux64_deb' errored after 13 s
[08:17:38] Error: Command failed: dpkg-deb --build ./release//betaflight-blackbox-explorer_3.7.0_amd64
dpkg-deb: error: maintainer script 'preinst' has bad permissions 644 (must be >=0555 and <=0775)

    at ChildProcess.exithandler (node:child_process:398:12)

alluding that 0664 may be needed over 664.

@SupaflyFPV
Copy link

Mac Builds works as expected

@haslinghuis haslinghuis merged commit f143674 into betaflight:master Oct 12, 2022
@haslinghuis haslinghuis deleted the fix-debian-permissions branch October 12, 2022 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants