We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

Harbour file validation permission issue - developing on Windows [again?]

asked 2017-12-10 21:26:18 +0300

zlutor gravatar image

updated 2017-12-10 21:26:58 +0300

I've tried to submit my app to harbour but had to face the famous "RPM-validation fails on permissions" issue:

Thanks for sending your application to the Jolla Store. Unfortunately your application did not pass the StoreQA tests because of the following reason.

1. RPM-validation fails on permissions:

Permissions
===========
ERROR [/usr/share/harbour-goobleinvasion/qml/cover/CoverPage.qml] File must not be executable (current permissions: 755)
ERROR [/usr/share/harbour-goobleinvasion/qml/harbour-goobleinvasion.qml] File must not be executable (current permissions: 755)
ERROR [/usr/share/harbour-goobleinvasion/qml/pages/AboutPage.qml] File must not be executable (current permissions: 755)
ERROR [/usr/share/harbour-goobleinvasion/qml/pages/Armageddon.qml] File must not be executable (current permissions: 755)

Problem seems to be replication of old issue but accepted answer there did not do the trick for me...

What worked, after many try-and-fail attempts is this one in .yaml:

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

Special attention to be given to '%attr(755,-,-) %{_bindir}' Is it OK?

Is it bug that there are two 'defattr' lines in generated .spec file?

%files
%defattr(-,root,root,-)
%defattr(644,root,root,-)
%attr(755,-,-) %{_bindir}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
# >> files
# << files
edit retag flag offensive close delete

Comments

@zlutor - I also use SDK on Windows (7 64 bit) without any such problem.

My spec file for my harbour-nationalrail app looks like this;

%files
%defattr(-,root,root,-)
%{_bindir}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/86x86/apps/%{name}.png
# >> files
# << files
Spam Hunter ( 2017-12-10 21:57:54 +0300 )edit

@Edz: I think it is the default .spec file generated from the default .yaml file - I've used the same until my app was not accepted tor Harbour (and failed locally on RPM validation, too in Permissions segment...

Unfortunately if your files has 'execution' permission on Windows - and it is kind of default, it seems, because I did not set anything nad they are there - then they will have 'x' flag in RPM and that is not acceptable for Harbour. Not that surprising, though...

So, better tho set explicitely '644' for everything not meant to be executable in RPM... The question is 'how'? :D

zlutor ( 2017-12-10 22:04:08 +0300 )edit

zlutor - edit the spec file in the SDK, save it, compile again.

Spam Hunter ( 2017-12-10 22:36:03 +0300 )edit

@Edz: I'm total newbie with this, could you share some details?

zlutor ( 2017-12-10 22:38:02 +0300 )edit

I'm fairly new to it all myself, most of my app/patch making was done on the device, as I struggled to get SDK to run on my PC. Anyway, what I meant by my last comment, was to edit your spec file to look like mine, save the change to the spec file and build the app again. You can always 'ctrl z' in the spec file to revert back to how it was originally.

Spam Hunter ( 2017-12-10 23:02:11 +0300 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-12-11 01:28:01 +0300

DarkTuring gravatar image

Guess it meams you should not set permissions on given files to specific user.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2017-12-10 21:26:18 +0300

Seen: 271 times

Last updated: Dec 11 '17