Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak package #396

Closed
scx opened this issue Jan 13, 2019 · 12 comments
Closed

Flatpak package #396

scx opened this issue Jan 13, 2019 · 12 comments

Comments

@scx
Copy link
Contributor

scx commented Jan 13, 2019

I created the flatpak package for gImageReader.
https://github.com/scx/gimagereader-flatpak (Gtk+3/Qt5)
https://github.com/scx/gimagereader-flatpak/tree/qt5 (Qt5)
https://github.com/scx/gimagereader-flatpak/tree/gtk3 (Gtk+3)

I am in the process of submitting it to the Flathub repo.
flathub/flathub#810
https://github.com/scx/flathub/tree/com.github.manisandro.gImageReader-qt5

It would be nice if the author decided to participate in the further development of this flatpak package.

@manisandro
Copy link
Owner

Thank you for working on this! I haven't yet looked in depth at flatpack, so currently I'm not really able to partecipate, but if there are specific issues, I'm happy to help as time allows.

@scx
Copy link
Contributor Author

scx commented Feb 5, 2019

@proletarius101
Copy link
Contributor

Another try: flathub/flathub#3883

@proletarius101
Copy link
Contributor

@manisandro Since it's merged, it would be nice if you add a download badge (https://flathub.org/badges) or so to this repo

@salim-b
Copy link

salim-b commented Mar 22, 2023

@proletarius101: The FlatHub page displays old version info (see flathub/io.github.manisandro.gImageReader#7)... why is that?

@proletarius101
Copy link
Contributor

The version in that page is extracted from the AppStream Metadata file produced in the build process, instead of the actual git tag name. Do you know if the produced .metainfo.xml contains the correct version information?

@salim-b
Copy link

salim-b commented Mar 25, 2023

Do you know if the produced .metainfo.xml contains the correct version information?

I'm really not familiar with Flatpak internals. I tried to locate the appstream metadata of the installed gImageReader Flatpak and, if I'm not mistaken, it's found under /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml, right?

That file contains the same outdated info as is found on FlatHub:

cat /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml
Output
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
 <id>io.github.manisandro.gImageReader</id>
 <metadata_license>CC0-1.0</metadata_license>
 <project_license>GPL-3.0+</project_license>
 <name>gImageReader</name>
 <name xml:lang="cs_CZ">gImageReader</name>
 <summary>A graphical (gtk) frontend to tesseract-ocr</summary>
 <summary xml:lang="cs_CZ">Grafická (gtk) nadstavba pro engine tesseract-ocr</summary>
 <keywords>
 <keyword>ocr</keyword>
 <keyword>optical</keyword>
 <keyword>recognition</keyword>
 <keyword>tesseract</keyword>
 <keyword>pdf</keyword>
 <keyword>gtk</keyword>
 </keywords>
 <keywords xml:lang="cs_CZ">
 <keyword xml:lang="cs_CZ">ocr</keyword>
 <keyword xml:lang="cs_CZ">optické</keyword>
 <keyword xml:lang="cs_CZ">rozpoznávání</keyword>
 <keyword xml:lang="cs_CZ">tesseract</keyword>
 <keyword xml:lang="cs_CZ">pdf</keyword>
 </keywords>
 <description>
 <p>gImageReader is a simple optical character recognition (OCR) application which acts as a frontend to the tesseract OCR engine. Features include:</p>
 <p xml:lang="cs_CZ">gImageReader je jednoduše použitelná aplikace pro rozpoznávání textu z obrázků, využívající OCR engine tesseract. Mezi funkce patří:</p>
 <ul>
  <li>Import PDF documents and images from disk, scanning devices, clipboard and screenshots</li>
  <li xml:lang="cs_CZ">Import PDF dokumentů a obrázků z počítače, skenovacích zařízení, schránky a snímků obrazovky</li>
  <li>Process multiple images and documents in one go</li>
  <li xml:lang="cs_CZ">Zpracování vícero obrázků a dokumentů naráz</li>
  <li>Manual or automatic recognition area definition</li>
  <li xml:lang="cs_CZ">Ruční nebo automatická definice oblasti k rozpoznávání</li>
  <li>Recognize to plain text or to hOCR documents</li>
  <li xml:lang="cs_CZ">Rozpoznání do holého textu nebo hOCR dokumentů</li>
  <li>Recognized text displayed directly next to the image</li>
  <li xml:lang="cs_CZ">Rozpoznaný text je zobrazen hned vedle zdrojového obrázku</li>
  <li>Post-process the recognized text, including spellchecking</li>
  <li xml:lang="cs_CZ">Následné zpracování rozpoznaného textu včetně kontroly překlepů</li>
  <li>Generate PDF/ODT documents from hOCR documents</li>
  <li xml:lang="cs_CZ">Vytváření PDF/ODT dokumentů z hOCR dokumentů</li>
 </ul>
 </description>
 <screenshots>
 <screenshot type="default">
  <image>https://raw.githubusercontent.com/manisandro/gImageReader/gh-pages/gimagereader-gtk.jpg</image>
  <caption>gImageReader-gtk</caption>
 </screenshot>
 </screenshots>
 <url type="bugtracker">https://github.com/manisandro/gImageReader/issues</url>
 <url type="faq">https://github.com/manisandro/gImageReader/wiki/FAQ</url>
 <url type="homepage">https://github.com/manisandro/gImageReader</url>
 <url type="translate">https://github.com/manisandro/gImageReader/blob/master/README.md</url>
 <update_contact>manisandro@gmail.com</update_contact>
 <translation type="gettext">gimagereader</translation>
 <provides>
 <binary>gimagereader-gtk</binary>
 </provides>
 <launchable type="desktop-id">io.github.manisandro.gImageReader.desktop</launchable>
 <content_rating type="oars-1.0">
 <content_attribute id="social-info">mild</content_attribute>
 </content_rating>
 <releases>
 <release version="3.3.0" date="2018-09-26"/>
 </releases>
</component>

The gImageReader metadata found in /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml (this is locally cached FlatHub metadata I suppose?) also contains the outdated info.

The metadata seems to be generated from

<release version="@PACKAGE_VERSION@" date="@PACKAGE_ISO_DATE@"/>

so @PACKAGE_VERSION@ and @PACKAGE_ISO_DATE@ somehow get resolved to the outdated info during the Flatpak build process, I suppose...

@proletarius101
Copy link
Contributor

Do you know if the produced .metainfo.xml contains the correct version information?

I'm really not familiar with Flatpak internals. I tried to locate the appstream metadata of the installed gImageReader Flatpak and, if I'm not mistaken, it's found under /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml, right?

That file contains the same outdated info as is found on FlatHub:

cat /var/lib/flatpak/app/io.github.manisandro.gImageReader/current/active/export/share/metainfo/io.github.manisandro.gImageReader.appdata.xml

Output

<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
 <id>io.github.manisandro.gImageReader</id>
 <metadata_license>CC0-1.0</metadata_license>
 <project_license>GPL-3.0+</project_license>
 <name>gImageReader</name>
 <name xml:lang="cs_CZ">gImageReader</name>
 <summary>A graphical (gtk) frontend to tesseract-ocr</summary>
 <summary xml:lang="cs_CZ">Grafická (gtk) nadstavba pro engine tesseract-ocr</summary>
 <keywords>
 <keyword>ocr</keyword>
 <keyword>optical</keyword>
 <keyword>recognition</keyword>
 <keyword>tesseract</keyword>
 <keyword>pdf</keyword>
 <keyword>gtk</keyword>
 </keywords>
 <keywords xml:lang="cs_CZ">
 <keyword xml:lang="cs_CZ">ocr</keyword>
 <keyword xml:lang="cs_CZ">optické</keyword>
 <keyword xml:lang="cs_CZ">rozpoznávání</keyword>
 <keyword xml:lang="cs_CZ">tesseract</keyword>
 <keyword xml:lang="cs_CZ">pdf</keyword>
 </keywords>
 <description>
 <p>gImageReader is a simple optical character recognition (OCR) application which acts as a frontend to the tesseract OCR engine. Features include:</p>
 <p xml:lang="cs_CZ">gImageReader je jednoduše použitelná aplikace pro rozpoznávání textu z obrázků, využívající OCR engine tesseract. Mezi funkce patří:</p>
 <ul>
  <li>Import PDF documents and images from disk, scanning devices, clipboard and screenshots</li>
  <li xml:lang="cs_CZ">Import PDF dokumentů a obrázků z počítače, skenovacích zařízení, schránky a snímků obrazovky</li>
  <li>Process multiple images and documents in one go</li>
  <li xml:lang="cs_CZ">Zpracování vícero obrázků a dokumentů naráz</li>
  <li>Manual or automatic recognition area definition</li>
  <li xml:lang="cs_CZ">Ruční nebo automatická definice oblasti k rozpoznávání</li>
  <li>Recognize to plain text or to hOCR documents</li>
  <li xml:lang="cs_CZ">Rozpoznání do holého textu nebo hOCR dokumentů</li>
  <li>Recognized text displayed directly next to the image</li>
  <li xml:lang="cs_CZ">Rozpoznaný text je zobrazen hned vedle zdrojového obrázku</li>
  <li>Post-process the recognized text, including spellchecking</li>
  <li xml:lang="cs_CZ">Následné zpracování rozpoznaného textu včetně kontroly překlepů</li>
  <li>Generate PDF/ODT documents from hOCR documents</li>
  <li xml:lang="cs_CZ">Vytváření PDF/ODT dokumentů z hOCR dokumentů</li>
 </ul>
 </description>
 <screenshots>
 <screenshot type="default">
  <image>https://raw.githubusercontent.com/manisandro/gImageReader/gh-pages/gimagereader-gtk.jpg</image>
  <caption>gImageReader-gtk</caption>
 </screenshot>
 </screenshots>
 <url type="bugtracker">https://github.com/manisandro/gImageReader/issues</url>
 <url type="faq">https://github.com/manisandro/gImageReader/wiki/FAQ</url>
 <url type="homepage">https://github.com/manisandro/gImageReader</url>
 <url type="translate">https://github.com/manisandro/gImageReader/blob/master/README.md</url>
 <update_contact>manisandro@gmail.com</update_contact>
 <translation type="gettext">gimagereader</translation>
 <provides>
 <binary>gimagereader-gtk</binary>
 </provides>
 <launchable type="desktop-id">io.github.manisandro.gImageReader.desktop</launchable>
 <content_rating type="oars-1.0">
 <content_attribute id="social-info">mild</content_attribute>
 </content_rating>
 <releases>
 <release version="3.3.0" date="2018-09-26"/>
 </releases>
</component>

The gImageReader metadata found in /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml (this is locally cached FlatHub metadata I suppose?) also contains the outdated info.

The metadata seems to be generated from

<release version="@PACKAGE_VERSION@" date="@PACKAGE_ISO_DATE@"/>

so @PACKAGE_VERSION@ and @PACKAGE_ISO_DATE@ somehow get resolved to the outdated info during the Flatpak build process, I suppose...

Yes. But the in flatpak it's generated exactly the same way. Can you confirm whether in traditional packages the metainfo file contains the latest tag? Maybe the version generation script has some bugs.

@salim-b
Copy link

salim-b commented Mar 25, 2023

Yes. But the in flatpak it's generated exactly the same way. Can you confirm whether in traditional packages the metainfo file contains the latest tag? Maybe the version generation script has some bugs.

Your suspicion seems correct. The latest DEB package for Ubuntu 22.04 (jammy) from the ppa:sandromani/gimagereader repo ships the same outdated metadata (found in /usr/share/metainfo/gimagereader-gtk.appdata.xml after installation).

@proletarius101
Copy link
Contributor

@manisandro It would be nice if you can release a new version, as in the latest tagged version, the metainfo file has not been updated to satisfy the requirements of Flathub.

@manisandro
Copy link
Owner

I've tagged v3.4.2. Closing this ticket as I believe there is nothing more to be done? Many thanks @proletarius101 for your work on the flatpack build!

@proletarius101
Copy link
Contributor

I've tagged v3.4.2. Closing this ticket as I believe there is nothing more to be done? Many thanks @proletarius101 for your work on the flatpack build!

Yes it works. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants