How to install Ghost Desktop on Fedora

Or any other RPM-based distro.

First of all, we need to download .deb file. After that we need to get rpm from deb file. Alien will be used for package transformation.

$ wget http://desktop-updates.ghost.org/download/linux -O ghost.deb
$ sudo dnf install alien
...
$ sudo alien -r ./ghost.deb
Ghost-1.1.2-2.x86_64.rpm generated

Trying to install generated rpm file:

$ sudo dnf install Ghost-1.1.2-2.x86_64.rpm
...
Error: Transaction check error:
  file / from install of Ghost-1.1.2-2.x86_64 conflicts with file from package filesystem-3.2-37.fc24.x86_64
  file /usr from install of Ghost-1.1.2-2.x86_64 conflicts with file from package filesystem-3.2-37.fc24.x86_64
  file /usr/bin from install of Ghost-1.1.2-2.x86_64 conflicts with file from package filesystem-3.2-37.fc24.x86_64
  file /usr/share from install of Ghost-1.1.2-2.x86_64 conflicts with file from package filesystem-3.2-37.fc24.x86_64
  file /usr/share/doc from install of Ghost-1.1.2-2.x86_64 conflicts with file from package filesystem-3.2-37.fc24.x86_64
  file /usr/share/applications from install of Ghost-1.1.2-2.x86_64 conflicts with file from package filesystem-3.2-37.fc24.x86_64
  file /usr/share/pixmaps from install of Ghost-1.1.2-2.x86_64 conflicts with file from package filesystem-3.2-37.fc24.x86_64

So we need to edit the rpm file:

$ rpmrebuild -pe Ghost-1.1.2-2.x86_64.rpm
Do you want to continue ? (y/N) y
result: /home/user/rpmbuild/RPMS/x86_64/Ghost-1.1.2-2.x86_64.rpm

rpmrebuild will call an editor on rpm spec file. Remove the following lines from the file:

--- ./rpm1	2016-12-05 19:14:44.462875437 +0300
+++ ./rpm2	2016-12-05 19:16:17.000000000 +0300
@@ -158,11 +158,7 @@
 
 (Converted from a deb package by alien version 8.95.)
 %files
-%dir %attr(0775, root, root) "/"
-%dir %attr(0775, root, root) "/usr"
-%dir %attr(0775, root, root) "/usr/bin"
 %attr(0777, root, root) "/usr/bin/Ghost"
-%dir %attr(0775, root, root) "/usr/share"
 %dir %attr(0775, root, root) "/usr/share/Ghost"
 %attr(0755, root, root) "/usr/share/Ghost/Ghost"
 %attr(0644, root, root) "/usr/share/Ghost/LICENSE"
@@ -591,14 +587,11 @@
 %attr(0644, root, root) "/usr/share/Ghost/ui_resources_200_percent.pak"
 %attr(0644, root, root) "/usr/share/Ghost/version"
 %attr(0644, root, root) "/usr/share/Ghost/views_resources_200_percent.pak"
-%dir %attr(0775, root, root) "/usr/share/applications"
 %attr(0664, root, root) "/usr/share/applications/Ghost.desktop"
-%dir %attr(0775, root, root) "/usr/share/doc"
 %dir %attr(0775, root, root) "/usr/share/doc/Ghost"
 %doc %attr(0664, root, root) "/usr/share/doc/Ghost/copyright"
 %dir %attr(0775, root, root) "/usr/share/lintian"
 %dir %attr(0775, root, root) "/usr/share/lintian/overrides"
 %attr(0664, root, root) "/usr/share/lintian/overrides/Ghost"
-%dir %attr(0775, root, root) "/usr/share/pixmaps"
 %attr(0664, root, root) "/usr/share/pixmaps/Ghost.png"
 %changelog

Trying to install again:

$ sudo dnf install /home/user/rpmbuild/RPMS/x86_64/Ghost-1.1.2-2.x86_64.rpm
...

Success!

Well this scheme isn't limited to Ghost Desktop installation and also applicable for other deb packages.

Comments

comments powered by Disqus