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

Help needed: How to create a rpm?

asked 2015-06-21 16:33:02 +0300

V10lator gravatar image

To make it short, this is my directory structure (on my linux desktop) :

$ find .
.
./usr
./usr/share
./usr/share/icons
./usr/share/icons/hicolor
./usr/share/icons/hicolor/86x86
./usr/share/icons/hicolor/86x86/apps
./usr/share/icons/hicolor/86x86/apps/V10wlan.png
./usr/share/icons/hicolor/86x86/apps/V103g.png
./usr/share/applications
./usr/share/applications/V10wlan-switch.desktop
./usr/share/applications/V103g-switch.desktop
./usr/bin
./usr/bin/V10networkswitch.sh

Now to my questions:

  1. Do the directories need the correct rights (right now my desktop user is the owner, have to change to root? )
  2. How would I go about creating a rpm? I know there are tutorials for fedora ( https://fedoraproject.org/wiki/How_to_create_an_RPM_package ) but they seem overcomplicated for my needs.
edit retag flag offensive close delete

Comments

Sadly the only way you can create an rpm is following that guide, and how a package can be built from its spec file. It takes a bit, but not too much.

magullo ( 2015-06-21 16:38:43 +0300 )edit
3

@magullo - sadly, you're not quite correct, it's not the only way. An RPM can be built on the Jolla, I know, as I followed a guide by Schturman found on TMO; @V10lator - http://talk.maemo.org/showthread.php?t=92963 - this guide is for building an Ambience.rpm for SailfishOS, but the principles remain pretty much the same and shows how to get started by creating a .spec file to work with, I'm not saying it is easy, but it's not particularly hard either and don't be afraid to ask questions within TMO (become a member, it's worth it!)

I actually enjoyed learning and building the RPM on the device, as I couldn't (but still struggling) to wrap my head around using the Sailfish SDK for building RPM's.

Spam Hunter ( 2015-06-21 16:59:22 +0300 )edit
1

If you have alien installed (https://en.wikipedia.org/wiki/Alien_%28software%29) you can run

$ tar cvf ../pkg.tar .

$ cd ..

$ alien --to-rpm pkg.tar

That will generate a noarch rpm containing the files.

Eierkopp ( 2015-06-21 20:20:14 +0300 )edit

@Markkyboy thanks for pointing out.

magullo ( 2015-06-23 14:11:44 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-06-21 23:28:20 +0300

backpackjoe gravatar image

If you dont care about harbour acception and need a simple quick way to build a rpm from a rootfs tree, look at fpm

fpm --help

once you have it installed shoud give you any info you need. I suggest adding shellscripts via --after-install --after-upgrade --after-remove to make sure unused files get removed properly on respective actions.

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

Question tools

Follow
5 followers

Stats

Asked: 2015-06-21 16:33:02 +0300

Seen: 443 times

Last updated: Jun 21 '15