![]() |
[GUIDE for noobs] RPM packaging directly on your Jolla phone.
As far as you know I'm not programmer and don't know use SDK and all programmer stuff etc... By googling I found this way very useful and easy for myself for creating RPM packages directly on my Jolla phone.
Suggestions for improvement are welcome! The PDF instruction you can download here. Create RPM package directly on your Jolla phone. 1. Connect to your phone via WinSCP, open PuTTy as ROOT. 2. Write this command: Code:
mkdir -p /root/rpmbuild/{BUILD,BUILDROOT,RPMS/armv7hl,SPECS} 3. If rpm-build package not installed, run this command as ROOT: Code:
pkcon install -y rpm-build 4. Download this example package of custom ambience to your PC. Extract folder myfirstpackage-0.1-1.arm and transfer to your phone: Code:
/root/rpmbuild/BUILD Code:
/root/rpmbuild/SPECS 5. Look in to structure of files and folders to understand how to create your own packages. https://www.dropbox.com/s/bpd4dqu9uixgjag/winscp.pnghttps://dl.dropboxusercontent.com/s/...jag/winscp.png 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: Code:
su -l nemo -c "command" Code:
Name: myfirstpackage · 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: Code:
%files Code:
%defattr(4755,root,root) · %pre– preinstall script, example: Code:
%pre Code:
%post Code:
%preun Code:
%postun Code:
/bin/cp -rf /root/rpmbuild/BUILD/myfirstpackage-0.1-1.arm /root/rpmbuild/BUILDROOT Code:
/bin/cp -f /root/rpmbuild/RPMS/armv7hl/myfirstpackage-0.1-1.armv7hl.rpm /home/nemo/Downloads Code:
pkcon install-local -y /home/nemo/Downloads/myfirstpackage-0.1-1.armv7hl.rpm Code:
pkcon remove myfirstpackage 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/ |
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
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. |
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
Quote:
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 :o |
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
Thanks man. Added to my bookmarks
|
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
PDF instruction updated with screenshot from WinSCP and link to this thread :D
|
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
Quote:
with /home/nemo/rpmbuild/.... (SPECS/SOURCES/RPMS/SRPMS) :) |
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
Thanks
I will add your points to the first post... |
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
%defattr could work also to execute a postint script as root?
like: Quote:
|
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
after:
rpmbuild -bb SPECS/myfirstpackage.spec i get: bash: rpmbuild: command not found |
Re: [GUIDE for noobs] RPM packaging directly on your Jolla phone.
Quote:
Code:
pkcon install -y rpm-build |
All times are GMT. The time now is 01:54. |
vBulletin® Version 3.8.8