Hi again! As [I've begun](https://almalinux.org/blog/building-pantheon-for-almalinux-9/) to gain some experience in building rpm packages, I've decided to continue and try to build this useful app for AlmaLinux OS 8 and AlmaLinux OS 9.
[Warpinator](https://github.com/linuxmint/warpinator), a file-sharing tool by Linux Mint, exemplifies their commitment to a seamless user experience. We owe its success to the dedicated [contributors](https://github.com/linuxmint/warpinator/graphs/contributors) - thank you!
Originally designed for Debian-based Linux, Warpinator has grown to serve Windows, Android, iOS, and now RPM-based Linux distros, expanding its capabilities to an increasingly diverse user base.
## Building process
### Requirements
* AlmaLinux machine - bare AlmaLinux OS 8 and AlmaLinux OS 9 machines are enough to build packages locally.
* Installed `git` - using the dnf install git-all.
*`mock` tool - I followed the AlmaLinux Building Packages Guide to install mock and use it.
* Enabling additional repositories. The enabling commands were taken from the [AlmaLinux Wiki Repositories](https://wiki.almalinux.org/repos/) page unless otherwise noted:
* EPEL
* PowerTools (CRB)
* Devel - you can check my previous blog post to see how to enable this repo not server-wide but by changing the mock configuration.
### Finding the sources
I used the [Building Packages Guide](https://wiki.almalinux.org/documentation/building-packages-guide.html) from AlmaLinux Wiki to build packages.
As there isn't any source rpm to unpack and create directory structure using `rpm -i` command, had to create rpmbuild directory to build rpm packages:
Now, to rebuild a package, a source file (an archive like `.tar.gz`) and `spec` file are required to be present in the rpmbuild directory.
Where did I get them?
Linux Mint has an official [Warpinator repository](https://github.com/linuxmint/warpinator) which contains archive `.tar.gz` files for different versions. So I downloaded the suitable version and put it into `rpmbuild/SOURCES` folder.
This repository also luckily has a `spec` file which I also downloaded and put into `rpmbuild/SPECS` folder.
### Building Warpinator locally
I used the `mock` tool to build packages locally, you can find the guide on how to use it in the wiki - [AlmaLinux Building Packages Guide](https://wiki.almalinux.org/documentation/building-packages-guide.html).
I also needed to use my local repository again, I've described using the `createrepo_c` commands before.
The first attempt to build **Warpinator** for AlmaLinux OS 9 failed and I had to research and fix the spec file (this wasn't totally unexpected but I had my hopes). To do so, I looked through the original warpinator repository and debian files to adjust my *.spec* files.
Mostly all needed packages are already present in AlmaLinux OS repositories. So it left me just a few additional missing packages to build and make some corrections in warpinator's *.spec* file.
| Package | AlmaLinux OS version 8 | AlmaLinux OS version 9 | Comment |
| --- | --- | --- | --- |
| `python-ifaddr` | ✅ | ✅ | |
| `python-zeroconf` | ✅| ✅ | | |
| `xapps` | ✅ | | |
| `grpc` | ✅ | | **spec changes**<br>- Replaced fedora with almalinux in `%prep` section to build for AlmaLinux OS 8 |
| `warpinator` | ✅ |✅ |**AlmaLinux OS 8 spec changes**: <br> - Removed `python3-google-api-core` from Requires <br> - Added `python3-protobuf`, `python3-netaddr`, `python3-ifaddr` to Requires <br> - Added `-Dbundle-zeroconf=false` option to `%meson`<br> - Fixed `org.x.Warpinator.desktop`, `org.x.Warpinator.appdata.xml` dirs <br>**AlmaLinux OS 9 spec changes**<br> - Removed `python3-google-api-core`, `python3-xapps-overrides` from Requires <br> - Added `python3-protobuf`, `python3-netaddr`, `python3-ifaddr` to Requires <br> - Added `-Dbundle-zeroconf=false` option to `%meson`<br>- Fixed `org.x.Warpinator.desktop`, `org.x.Warpinator.appdata.xml` dirs|
It took several more attempts to succeed. And now, with these packages and changes, I finally built warpinator.
I checked the versions to be workable, uploaded all the sources to [git.almalinux.org](https://git.almalinux.org) and built them all again but using [AlmaLinux Build System](https://build.almalinux.org/) this time.
I had this experience with [git.almalinux.org](https://git.almalinux.org), [AlmaLinux Build System](https://build.almalinux.org/) and commuity repositories described in my previous blog post either, so you are welcome to check it [there](https://almalinux.org/blog/building-pantheon-for-almalinux-9/).
## Installing Warpinator
Warpinator packages are available in AlmaLinux's community repository for both AlmaLinux OS 8 and AlmaLinux OS 9 - [warpinator](https://build.almalinux.org/product/32).
To install it on Almalinux you need to:
* Enable EPEL and PowerTools repositories.
* Install core dnf plugins that contain COPR plugin:
2. If the ports in Warpinator settings differ from those mentioned above, try adding the needed ports manually using CLI instead of configuring firewalld Configuring firewalld with warpinator.xml:
3. For more troubleshooting tricks you might find useful, please, check the original Linux Mint's [Warpinator Repository](https://github.com/linuxmint/warpinator).
To use Warpinator to send and receive files, the devices should be in the same network. They'll automatically appear whether they're located in the app's main screen.
For users' safety, it's highly recommended to set a ++Group Code++.
> The group code is a shared key that allows trusted devices on the local network to see one another in Warpinator. Any devices you wish to connect with must be using the same group code. This code is set to 'Warpinator' by default.
To set the code got the side menu on the left side and choose *Preferences*.