Bug 2042749
| Summary: | gpsbabel-1.8.0 is available | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Upstream Release Monitoring <upstream-release-monitoring> | ||||
| Component: | gpsbabel | Assignee: | Ralf Corsepius <rc040203> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | rc040203, rhbugs, tsteven4 | ||||
| Target Milestone: | --- | Keywords: | FutureFeature, Triaged | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2022-08-20 15:43:39 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Upstream Release Monitoring
2022-01-20 04:56:26 UTC
Scratch build failed. Details bellow:
BuilderException: Build started, but failure happened during post build operations:
Command '['rpmbuild', '-D', '_sourcedir .', '-D', '_topdir .', '-bs', '/var/tmp/thn-a9n8ha0n/gpsbabel.spec']' returned non-zero exit status 1.
StdOut:
error: Bad source: ./GPSBabel-1.8.0.tar.gz: No such file or directory
Traceback:
File "/usr/local/lib/python3.9/site-packages/hotness/use_cases/package_scratch_build_use_case.py", line 56, in build
result = self.builder.build(request.package, request.opts)
File "/usr/local/lib/python3.9/site-packages/hotness/builders/koji.py", line 188, in build
raise BuilderException(
If you think this issue is caused by some bug in the-new-hotness, please report it on the-new-hotness issue tracker: https://github.com/fedora-infra/the-new-hotness/issues
Created attachment 1852758 [details]
changes to use 1.8.0
I am an upstream maintainer. I don't really understsand fedora's build system, but I took a shot at some changes to use 1.8.0. Please consider any changes I made to the spec file carefully. 1. configure is no longer supported. please use qmake. 2. qtwebkit is no longer supported. if qtwebengine isn't available please use config+=disable-mappreview when running qmake for the gui. 3. by default, gmapbase.html is embedded in the executable. If you really want to patch and locate them elsewhere you can 'qmake EMBED_MAP=OFF' for the gui. 4. by default, the gpsbabel translations are embedded. If you really want to patch and locate them elsewhere you can 'qmake EMBED_TRANSLATIONS=OFF' for the gui. 5. I tried to suggest that the qt5_qttranslations package could be helpful at runtime. It contains additional translations we will use. 6. You can use libraries found by pkg-config, when building the cli 'qmake WITH_LIBUSB=pkgconfig WITH_SHAPELIB=pkgconfig WITH_ZLIB=pkgconfig' 7. were considering your "warning: type 'struct read_state' violates the C++ One Definition Rule [-Wodr]" upstream. I haven't observed a problem. 8. were considerying your "warning: File listed twice: /usr/share/doc/gpsbabel/AUTHORS, warning: File listed twice: /usr/share/doc/gpsbabel/README.contrib" upstream. the latest versions are the ones at the top of the repo (not in gui). 9. see INSTALL for hints, but I've outlined most of what I think you need to know above. 10. we work with Qt5 >= 5.12, or Qt6 >= 6.2. I will be happy to answer any questions on the build system. an alternative to fetching the tarball at gpsbabel.org is to fetch it from the tag on github: wget "https://github.com/GPSBabel/gpsbabel/archive/gpsbabel_1_8_0.tar.gz" I just committed and built the update, I have been working on the whole day ;) (In reply to tsteven4 from comment #3) > I am an upstream maintainer. I don't really understsand fedora's build > system, but I took a shot at some changes to use 1.8.0. Please consider any > changes I made to the spec file carefully. Some comments interspersed. > 1. configure is no longer supported. please use qmake. I am confused - I guess. you mean cmake? > 2. qtwebkit is no longer supported. if qtwebengine isn't available please > use config+=disable-mappreview when running qmake for the gui. > 3. by default, gmapbase.html is embedded in the executable. If you really > want to patch and locate them elsewhere you can 'qmake EMBED_MAP=OFF' for > the gui. I noticed this. > 4. by default, the gpsbabel translations are embedded. If you really want to > patch and locate them elsewhere you can 'qmake EMBED_TRANSLATIONS=OFF' for > the gui. OK, that's news to me. I need to think about it. > 5. I tried to suggest that the qt5_qttranslations package could be helpful > at runtime. It contains additional translations we will use. > 6. You can use libraries found by pkg-config, when building the cli 'qmake > WITH_LIBUSB=pkgconfig WITH_SHAPELIB=pkgconfig WITH_ZLIB=pkgconfig' I noticed and did so ;) > 7. were considering your "warning: type 'struct read_state' violates the C++ > One Definition Rule [-Wodr]" upstream. I haven't observed a problem. > 8. were considerying your "warning: File listed twice: > /usr/share/doc/gpsbabel/AUTHORS, warning: File listed twice: > /usr/share/doc/gpsbabel/README.contrib" upstream. the latest versions are > the ones at the top of the repo (not in gui). > 9. see INSTALL for hints, but I've outlined most of what I think you need to > know above. > 10. we work with Qt5 >= 5.12, or Qt6 >= 6.2. I have not been able to build gpsbabel with Qt6. Seemingly, because fedora lacks a qt6-qtwebengine. > I will be happy to answer any questions on the build system. Proposals from my part: - Please add a release tag corresponding to your tarball to https://github.com/gpsbabel/gpsbabel - Please consider to add some "install" magic to your CMake*-stuff. My knowledge on cmake only is rudimentary, because I am in favor of the autotools and consider cmake to be unusable. Please use qmake, not cmake. While we have some cmake support we consider our cmake support experimental and lightly tested. Note that the existing spec file uses qmake to build the gui already. The spec file I attached "changes to use 1.8.0" uses qmake for both. The tag is there; https://github.com/GPSBabel/gpsbabel/releases/tag/gpsbabel_1_8_0, the name is consistent with our previous releases. Thanks for your efforts. Well, it looks like you got cmake running. That is very likely the long term solution, it just hasn't got much usage/testing yet. I enhanced it considerably in the last few weeks before the release. good luck! This looks like a bug in your spec file two attempts to use shapelib, none for libusb (-DGPS_BABEL_WITH_SHAPE_LIB=pkgconfig should be -DGPSBABEL_WITH_LIBUSB=pkgconfig).
%cmake \
-DGPSBABEL_WITH_ZLIB=pkgconfig \
-DGPS_BABEL_WITH_SHAPE_LIB=pkgconfig \
-DGPSBABEL_WITH_SHAPELIB=pkgconfig \
%{?!build_gui:-DGPSBABEL_MAPPREVIEW=OFF} \
Also, we need libusb-1.0, not libusb-0.1. For Fedora 35, 36 the package we use is libusb1-devel, for Fedora 32-34 we use libusbx-devel. I am not sure about earlier versions. BuildRequires: libusb-devel I've tested rpms from https://koji.fedoraproject.org/koji/buildinfo?buildID=1902930 despite my concerns above things look very good! 1. gmapbase.html is found and the mappreiew is working. 2. the gpsbabel supplied translations are found 3. system libz, libshp and libusb-1.0 are all used. 4. I ran the upstream testsuite with no errors. The only thing I haven't been able to test is the qt supplied translations. When "dnf install qt5-qttranslations" I only get the english translations in /usr/share/qt/translations. I don't know how to get the translations installed for any other language. From the build log https://kojipkgs.fedoraproject.org/work/tasks/8384/81678384/build.log I can see that gmapbase.html and the gpsbabel supplied translations are being embedded, and installed on the system. This seems redundant. Like the qt supplied translations the non english ones don't seem to make it to /usr/share/qt/translations. It looks like my test above worked because gpsbabelfe found the embedded versions. translations.qrc embeds the gpsbabel supplied translations, map.qrc embeds gmapbase.html: -- Sources are: "aboutdlg.cc;advdlg.cc;donate.cc;dpencode.cc;filterdata.cc;filterdlg.cc;filterwidgets.cc;format.cc;formatload.cc;gmapdlg.cc;gpx.cc;help.cc;latlng.cc;main.cc;mainwindow.cc;map.cc;optionsdlg.cc;preferences.cc;processwait.cc;runmachine.cc;upgrade.cc;version_mismatch.cc;serial_unix.cc;aboutdlg.h;advdlg.h;appname.h;babeldata.h;donate.h;filterdata.h;filterdlg.h;filterwidgets.h;format.h;formatload.h;gmapdlg.h;gpx.h;help.h;mainwindow.h;map.h;optionsdlg.h;preferences.h;processwait.h;runmachine.h;setting.h;upgrade.h;version_mismatch.h;app.qrc;translations.qrc;map.qrc There may be a problem with the rpm translations installation. The application works because it finds the gpsbabel translations that are embedded. However, I don't see the ones from the rpm ever getting installed. You can see the qt supplied French translations being installed here, but the gpsbabel supplied French translations don't get installed. They are present in gpsbabel-gui-1.8.0-1.fc36.x86_64. [root@focal gpsbabel]# cat /etc/rpm/macros.image-language-conf %_install_langs fr_FR [root@focal gpsbabel]# ls /usr/share/qt5/translations/ qtwebengine_locales [root@focal gpsbabel]# dnf install qt5-qttranslations ... Installed: qt5-qttranslations-5.15.2-4.fc35.noarch Complete! [root@focal gpsbabel]# ls /usr/share/qt5/translations/ assistant_fr.qm linguist_fr.qm qtdeclarative_fr.qm qt_help_fr.qm qtmultimedia_fr.qm qtscript_fr.qm qtwebsockets_fr.qm designer_fr.qm qtbase_fr.qm qt_fr.qm qtlocation_fr.qm qtquickcontrols_fr.qm qtwebengine_locales qtxmlpatterns_fr.qm [root@focal ~]# dnf install ./gpsbabel-gui-1.8.0-1.fc36.x86_64.rpm ./gpsbabel-1.8.0-1.fc36.x86_64.rpm ... Installed: gpsbabel-1.8.0-1.fc36.x86_64 gpsbabel-gui-1.8.0-1.fc36.x86_64 Complete! [root@focal ~]# ls /usr/share/qt5/translations/ assistant_fr.qm linguist_fr.qm qtdeclarative_fr.qm qt_help_fr.qm qtmultimedia_fr.qm qtscript_fr.qm qtwebsockets_fr.qm designer_fr.qm qtbase_fr.qm qt_fr.qm qtlocation_fr.qm qtquickcontrols_fr.qm qtwebengine_locales qtxmlpatterns_fr.qm A fix for the language problem is given in the diff below. Without this change the generated gpsbabel.lang file has entries like: %lang(gpsbabel_fr) /usr/share/qt5/translations/gpsbabel_fr.qm %lang(gpsbabelfe_fr) /usr/share/qt5/translations/gpsbabelfe_fr.qm instead of %lang(fr) /usr/share/qt5/translations/gpsbabel_fr.qm %lang(fr) /usr/share/qt5/translations/gpsbabelfe_fr.qm evidently because of this rpm doesn't recognize the language as matching /etc/rpm/macros.image-language-conf and doesn't install the appropriate translations. This was suggested in https://fedoraproject.org/wiki/PackagingDrafts/find_lang which says: "Names different from %{name} (e.g. multiple manpages) must be handled via separate calls to %find_lang." If you want to exclude the translations from the executable and install them in /usr/share/qt5/translations yourself you need to add this option to cmake: -DGPSBABEL_EMBED_TRANSLATIONS:BOOL=OFF The reason GPSBABEL_EMBED_TRANSLATIONS and GPSBABEL_EMBED_MAP default to ON is because of a history of packages not installing the translations, or not installing all the translations, or installing the translations in a place the gui doesn't find them. The same goes for gmapbase.html. But, and advantage of the fedora method of only installing appropriate translations is that you could save ~330,000 bytes, the size of our translation files. Thanks again for all your work. [tsteven4@focal gpsbabel]$ git diff diff --git a/gpsbabel.spec b/gpsbabel.spec index dd3c358..39ffd03 100644 --- a/gpsbabel.spec +++ b/gpsbabel.spec @@ -83,7 +83,8 @@ desktop-file-install \ install -m 0755 -d %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/ install -m 0644 -p %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/ -%find_lang %{name} --with-qt --all-name +%find_lang %{name} --with-qt +%find_lang gpsbabelfe --with-qt %endif %files @@ -93,6 +94,7 @@ install -m 0644 -p %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/256x256/apps %if 0%{?build_gui} %files gui -f %{name}.lang +%files gui -f gpsbabelfe.lang %doc gui/{AUTHORS,README*,TODO} %license gui/COPYING* %{_bindir}/gpsbabelfe FYI the one definition rule warnings may lead to segmentation faults. I haven't been able to generate any with the released code, but that may be luck or test coverage. I have been able to generate segmentation faults with very similar code when link time optimization (-flto) is used. We have a PR in process, https://github.com/GPSBabel/gpsbabel/pull/824 |