bdbcat / oesenc_pi

GNU General Public License v2.0
10 stars 17 forks source link

unable to build a rpm of oesenc_pi #119

Open filochard opened 3 years ago

filochard commented 3 years ago

We are trying to build rpms of this plugin for Mageia (linux distribution rpm based like RedHat) here is our spec file opencpn-oesenc-plugin.spec.txt

and here the verbatim when trying to rpmbuild with a git clone from your repo verbatim.txt

NB we could build a rpm with 4.2.15 version with a git-cloned code from rgleason https://github.com/rgleason/oesenc_pi

bdbcat commented 3 years ago

oesenc_pi, as well as most modern, managed OpenCPN plugins, does NOT support Fedora or RPM installers directly. If you absolutely require an rpm package, you may be able to build a .deb package (on a debian host), and then use "alien" to generate an rpm for installation. As far as I know, this has not been tried publicly. If you do take this route, please let us know the results. Thanks Dave

filochard commented 3 years ago

Hi It's a little bad that rpm can't anymore be built for osenc_pi like it was in a recent past (I could build a rpm with a git clone from Rick Gleason version 4.2.15.... and he told me to contact you for the problem )

Since the Flatpak version is not totally useable (still no radar plugin and obsolete freedesktop 18.08) I prefer using our rpm installed version of opencpn on a Mageia8 OS You fortunately updated the Readme allowing to distribute the closed source binaries and libraries for oesenc oernc and s63 plugins and we may now provide them as built rpms (before that each of us had to build these rpms for himself)

Unfortunately we can't use the Plugin Manager inside Mageia (no tar.gz built for this distribution, and it would certainly be a huge work to add these buildings for each plugin and for the 4 architectures in the cloud) and by consequence we still must use a classical installation with rpms .

We can't provide a rpm without its source and spec file : so we can't use alien to provide rpms generated from debian packages

But above all, if the plugins are gonna be updated only for the plugin manager, we will be stuck on obsolete versions unless we find a way to build tar.gz for the plugin manager or to have access to Fedora's ones if they are the same as ours

rgleason commented 3 years ago

filochard
Thanks for reporting. As the plugins I try to maintain are updated, there will be 3 flatpak versions for 18.08 & 20.04. JG now has these in the parent testplugin_pi (with thanks to bdbcat for his help on pypilot_pi)

bdbcat commented 3 years ago

OK, let us take this one issue at a time.

  1. Flatpak 20.08: Available now, will soon be promoted to stable branch. No reason not to use 20.08 build now.
  2. Plugins for Flatpak 20.08: I see that radar_pi is important to you. Obviously, also oesenc_pi. What other "missing" plugins preclude the use of Flatpak today?
filochard commented 3 years ago

OK, let us take this one issue at a time.

1. Flatpak 20.08:  Available now, will soon be promoted to stable branch.  No reason not to use 20.08 build now.

2. Plugins for Flatpak 20.08:  I see that radar_pi is important to you.  Obviously, also oesenc_pi.  What other "missing" plugins preclude the use of Flatpak today?

Sorry about not being very clear in my explanations and creating confusions (I'm French, and so my English is far from being good) : 1) I'm talking about one issue : not being able to create a rpm for Mageia (or Fedora or OpenSuse) with a git clone from your last versions (4.2.19.x)

2) And was explaining why I still need to build rpms for Mageia besides trying and testing the flatpak version of opencpn : I already opened issues for some plugins that didn't work inside flatpak (but are OK in a classical install of rpms on my distribution) some plugins got recently a solution (watchdog, SAR, AISRadar) Some of these plugin are still not working inside flatpak (such as Radar) https://github.com/opencpn-radar-pi/radar_pi/issues/169

besides this Flatpak 20.08 built is not yet in the stable branch

That's the reason why I think that nowadays the distribution rpms we maintain for Mageia are more useable and safe than flatpak version until it will be updated and installable from the stable branch...

The only plugin whose the last code doesn't allow anymore to build a rpm is oesenc that is not caused by its nonfree binary and library (they are the same as for oernc...) But some changes in cmake files prevent a classical build for rpm (but always for deb...)

bdbcat commented 3 years ago

OK, understanding that Flatpak 20.08 is not quite "official" in the Flatpak repo system. Although you can certainly install and run it TODAY without risk. $ flatpak run org.opencpn.OpenCPN//beta Let me be clear: The "beta" notation in the runtime command refers only to an artifact of the Flatpak repo system. The OpenCPN served by Flathub is still the Production version of OpenCPN(5.2.4). So there is little risk in using this NOW. We welcome your comments on this.

However, if you insist on trying to build and RPM package for oeSENC_PI: I am not an "RPM Expert", don't know the details of RPMBuild. But a simple scan of the build log shows that the RPMBuild process tries to ran a "make" command on the source tree. A simple "make" command with no arguments is no longer supported. The available make targets are as listed in the error log:

ERROR: plain make is not supported. Supported targets:
cmake -E echo \ \ \ -\ tarball:\ Plugin\ installer\ tarball\ for\ regular\ builds.
   - tarball: Plugin installer tarball for regular builds.
cmake -E echo \ \ \ -\ flatpak:\ Plugin\ installer\ tarball\ for\ flatpak\ builds.
   - flatpak: Plugin installer tarball for flatpak builds.
cmake -E echo \ \ \ -\ pkg:\ Legacy\ installer\ package\ on\ Windows,\ Mac\ and\ Debian.
   - pkg: Legacy installer package on Windows, Mac and Debian.
cmake -E echo 

That is, you must do something like: "make tarball". I am sure that this can be done by RPMBuild, but I do not know how. Perhaps someone on your team can help? As we have said, we cannot provide detailed support for RPM builds of the plugins. And that includes debugging broken builds, learning new tools, etc. We simply do not have the resources. I hope you understand.

filochard commented 3 years ago

I see But apparently cmake - pkg won't build anymore rpm for fedora or opensuse (only .exe for windows, or .dmg for MacOS, or .deb for debian or ubuntu) in the past we could ...

bdbcat commented 3 years ago

"oesenc_pi, ... does NOT support Fedora or RPM installers directly." Sorry.

filochard commented 3 years ago

I saw this...but in the past it did

2 years ago we did build a Mageia rpm for oesenc_pi but had to remove it because of a missing allowance to distribute the closed source binary and library in the README ... (Mageia dev are very strict : opensource in "core repository", closed source in a "nonfree repository" only if the distribution of the closed source is explicitely allowed)

bdbcat commented 3 years ago

Of course, you could use an older version of oeSENC. The recent changes relate to the Plugin Manager, and some other small improvements to various platforms. I'm sure an older version will still work. You just need to checkout the correct source version from github.

filochard commented 3 years ago

Ok thanks for your answer we will keep the more recent source which we can build an rpm on That may allow us to wait the updates of the flatpak version