.deb to .rpm conversion with Alien not working

I’m using Termius as an SSH client and I wanted to use its SFTP feature but, since I installed it via snap, I can’t.
The problem is that Termius is distributed only as snap or .deb file, and there is (apparently) no option to build it from source so my only option seems to be converting the .deb package to an .rpm one using alien

I tried running sudo alien -r ./Termius.deb in the folder where I downloaded the package but I get this error:

Warning: Skipping conversion of scripts in package termius-app: postinst postrm
Warning: Use the --scripts parameter to include the scripts.
Package build failed. Here's the log of the command (cd termius-app-7.49.0; rpmbuild --buildroot='/home/lez/Downloads/Termiusus/termius-app-7.49.0' -bb --target x86_64 'termius-app-7.49.0-2.spec'):
error: line 5: Empty tag: Summary:
Building target platforms: x86_64
Building for target x86_64

What am I doing wrong? How can I fix this?

Hi,

It may be better seeking support from Termius, as to why sftp doesn’t work with snap.

Anyway alien is producing a spec file from the deb, which is missing line 5. This can be resolved, but i suspect the install will still fail due to missing dependencies. These are the steps:

sudo alien -r -g -v ./Termius.deb
cd termius-app-7.49.0/
sudo sed -i 's/Summary:/Summary: termius-app/' termius-app-7.49.0-2.spec
sudo rpmbuild --target=x86_64 --buildroot $PWD  -bb termius-app-7.49.0-2.spec

The sed line fixes this error error: line 5: Empty tag: Summary:
If you do not already have rpmbuild installed, you do so with: sudo dnf install rpm-build
The build directory is removed as part of the rpmbuld process and you find the rpm in the same directory as the deb file.

Regards Tom.

1 Like

Unfortunately, I’ve written an email to Termius customer support to ask why, and they answered me it was because the snap version is sandboxed.
So, I asked them if it was possible for them to provide an .rpm package as well or a flatpak version (to which should be possible to grant access to local storage using flatseal if I’m not wrong) but of course I was ignored.

Thanks to your answer, I was able to build the .rpm file successfully, and it seems to be working properly now that I have installed it!
If it was something I was able to do with just the .deb file I really don’t understand why the Termius team (which has access to the source code as well) doesn’t provide an .rpm to be downloaded from their website…

PS: Since the problem appeared to be an empty line in that .spec file, would it have been ok to manually fill it using something like sudo nano termius-app-7.49.0-2.spec? Or should I prefer the sed -i way for some reason?

Hi,

Shame, sounds like lazy developers to me, i’d have thought if not all features work in snap; they would at least look at flatpak.

Glad to hear its working.

Yes its fine to edit the file, I just provided the sed command for convenience.

Regards Tom.

1 Like