Ask / Submit
1

Harbour file validation permission issue [answered]

asked 2015-09-03 19:44:59 +0200

Mariusmssj gravatar image

Hi guys,

just tested my application with harbour tool and it gave me a load of warnings regarding the file permissions:

WARNING [/usr/share/harbour-vlc_remote/qml/cover/CoverPage.qml] File must not be executable (current permissions: 755)
WARNING [/usr/share/harbour-vlc_remote/qml/cover/Thumbs.db] File must not be executable (current permissions: 755)
WARNING [/usr/share/harbour-vlc_remote/qml/cover/VLC-remote150px.png] File must not be executable (current permissions: 755)
WARNING [/usr/share/harbour-vlc_remote/qml/cover/play-pause.png] File must not be executable (current permissions: 755)
WARNING [/usr/share/harbour-vlc_remote/qml/cover/vlc_cover.png] File must not be executable (current permissions: 755)
WARNING [/usr/share/harbour-vlc_remote/qml/harbour-vlc_remote.qml] File must not be executable (current permissions: 755)
WARNING [/usr/share/harbour-vlc_remote/qml/pages/AboutPage.qml] File must not be executable (current permissions: 755)
WARNING [/usr/share/harbour-vlc_remote/qml/pages/AddControls.qml] File must not be executable (current permissions: 755)

I am using a windows 8 machine and have no idea how to make these files non executable. Does anyone have any ideas of what I need to do?

Thanks

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by Mariusmssj
close date 2015-09-04 09:16:10.224988

1 Answer

Sort by » oldest newest most voted
2

answered 2015-09-03 20:42:54 +0200

nightmare gravatar image

updated 2015-09-03 20:43:19 +0200

edit your yaml to set new default permissions:

  • %defattr(644,-,-,-) set alle files without executable

  • %attr(655,-,-) set only main program as executable:

you'll find those lines at the end of the .yaml-file

...     
# All installed files
    Files:
      - '%defattr(644,root,root,-)'
      - '%attr(655,-,-) %{_bindir}'
      - '%{_datadir}/%{name}'
      - '%{_datadir}/applications/%{name}.desktop'
      - '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
edit flag offensive delete publish link more

Comments

So currently it looks like this:

Files:
- /usr/share/icons/hicolor/86x86/apps
- /usr/share/applications
- /usr/share/harbour-vlc_remote
- /usr/bin
- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/%{name}/qml'
- '%{_bindir}'
PkgBR: []

So I would need to replace it with this ? :

Files:
- '%defattr(644,root,root,-)'
- '%attr(655,-,-) %{_bindir}'
- '%{_datadir}/%{name}'
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
Mariusmssj ( 2015-09-03 22:39:47 +0200 )edit
1

or just put %defattr(...) after "Files" and %attr(....) right in front of %{_bindir}'

(inside the ' ' )

nightmare ( 2015-09-04 00:44:20 +0200 )edit

Thank you, that worked like a charm :)

Mariusmssj ( 2015-09-04 09:15:58 +0200 )edit

no problem, had the same issue on win10 :)

they should update the template in sdk

nightmare ( 2015-09-04 18:20:28 +0200 )edit

I tried to do the same thing but failed... :(

BTW. why are there two defattr lines in generated .spec file?

.yaml:

# All installed files
Files:
  - '%defattr(644,-,-,-)'
  - '%attr(655,-,-) %{_bindir}'
  - '%{_datadir}/%{name}'
  - '%{_datadir}/applications/%{name}.desktop'
  - '%{_datadir}/icons/hicolor/*/apps/%{name}.png'

.spec:

%files
%defattr(-,root,root,-)
%defattr(644,-,-,-)
%attr(655,-,-) %{_bindir}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
# >> files
# << files

error message:

Processing files: harbour-goobleinvasion-1.0-1.armv7hl
Exit reason and status: signal 11
19:36:49: The process "F:\SDK\SailfishOS\settings\SailfishOS-SDK\mer-sdk-tools\Sailfish OS Build Engine\SailfishOS-2.1.3.7-armv7hl\rpm.cmd" exited with code 1.
Error while building/deploying project harbour-goobleinvasion (kit: SailfishOS-2.1.3.7-armv7hl (in Sailfish OS Build Engine))
The kit SailfishOS-2.1.3.7-armv7hl (in Sailfish OS Build Engine) has configuration issues which might be the root cause for this problem.
When executing step "RPM"
zlutor ( 2017-12-10 20:41:18 +0200 )edit

Question tools

Follow
1 follower

Stats

Asked: 2015-09-03 19:44:59 +0200

Seen: 215 times

Last updated: Sep 03 '15