The Following 29 Users Say Thank You to Schturman For This Useful Post: | ||
|
2014-03-31
, 17:48
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#2
|
The Following 3 Users Say Thank You to For This Useful Post: | ||
|
2014-03-31
, 18:02
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#3
|
good post, only one thing.
You dont need (read: should not) run as root.
There really are no necessary reason for running rpmbuild as root,
the %defatr section defines the default permissions (in your example user:root and group:root) you can, and should also set permission in the %files section as needed per folder/file, and in some cases the default %defattr root:root will result in eg configuration files not being readable by normal user (nemo)
As rpmbuild builds in ~/rpmbuild directory tree it is able to create the rpm as user nemo etc.
The Following User Says Thank You to Schturman For This Useful Post: | ||
|
2014-03-31
, 18:02
|
|
Posts: 418 |
Thanked: 506 times |
Joined on Jan 2012
@ Argentina
|
#4
|
|
2014-03-31
, 19:16
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#5
|
The Following User Says Thank You to Schturman For This Useful Post: | ||
|
2014-03-31
, 19:27
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#6
|
Thanks
I just never tried do this as USER, I use WinSCP and Putty and it easily to do as ROOT or as USER and transfer files where you want.
If you start as USER you can't create folders from the first commands and if you already did it as ROOT you can just continue to other commands as root too
The Following 2 Users Say Thank You to For This Useful Post: | ||
|
2014-03-31
, 19:44
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#7
|
The Following 2 Users Say Thank You to Schturman For This Useful Post: | ||
|
2014-03-31
, 20:49
|
|
Posts: 418 |
Thanked: 506 times |
Joined on Jan 2012
@ Argentina
|
#8
|
%defattr
ln -s /usr/share/harbour-mytheme /usr/share/themes
The Following User Says Thank You to flotron For This Useful Post: | ||
|
2014-03-31
, 21:28
|
|
Posts: 418 |
Thanked: 506 times |
Joined on Jan 2012
@ Argentina
|
#9
|
The Following User Says Thank You to flotron For This Useful Post: | ||
|
2014-03-31
, 21:38
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#10
|
after:
rpmbuild -bb SPECS/myfirstpackage.spec
i get: bash: rpmbuild: command not found
pkcon install -y rpm-build
Tags |
jolla phone, on device |
|
Suggestions for improvement are welcome!
The PDF instruction you can download here.
1. Connect to your phone via WinSCP, open PuTTy as ROOT.
2. Write this command:
3. If rpm-build package not installed, run this command as ROOT:
4. Download this example package of custom ambience to your PC. Extract folder myfirstpackage-0.1-1.arm and transfer to your phone:
5. Look in to structure of files and folders to understand how to create your own packages.
6. Some explanation about SPEC file. When you use this method of creating RPM files it have a little problem when you go to uninstall your package. It will delete all your files like it should be, but it will leave your folders. Why, I don’t know… This is a reason that I suggest you to always use the postuninstall script in spec file to remove your folder (see example in my spec).
Also remember that SPEC file run your commands as ROOT, if you should run your commands as USER from SPEC file, use this template:
· Obsoletes: - if you want to uninstall other versions
· Conflicts: - if you want to keep 1st installed rpm package and stop 2 other packages from installing
· Requires: - add name of dependency packages
8. Other parameters
· %files - under this put the path to your files that NOT need special permissions. For example:
· %pre– preinstall script, example:
Schturman
29.03.2014
Some users poins:
* From what nieldk explained (here and here) you can do all this stuff as USER, just replace the path /root/rpmbuild/....with /home/nemo/rpmbuild/
Lausanne & Lyon de descente...
----------------
Schturman's home page
Schturman's repo on openrepos
RPM packaging directly on your Jolla phone.
Root & User SSH access to Jolla via WinSCP.
Root and User SSH access to Jolla via Nautilus on Linux PC.
Last edited by Schturman; 2017-06-07 at 06:30.