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

Distribution as flatpak #808

Closed
Lunarequest opened this issue Sep 24, 2021 · 36 comments
Closed

Distribution as flatpak #808

Lunarequest opened this issue Sep 24, 2021 · 36 comments

Comments

@Lunarequest
Copy link

I've made a quick flatpak manifest for edb-debugger. However I've run into the issue edb only ships with pixmaps when flatpaks require icons. Could pngs be provided for this?

the manifest is complete with support for fedc so dependencies and edb-debugger can be updated automatically

app-id: io.github.eteran.edb-debugger
runtime: org.kde.Platform
runtime-version: '5.15'
sdk: org.kde.Sdk
command: edb
rename-desktop-file: edb.desktop
rename-appdata-file: edb.appdata.xml
finish-args:
  - --share=ipc
  - --socket=wayland
  - --socket=fallback-x11
  - --filesystem=host
  - --device=dri
modules:
  - name: boost
    buildsystem: simple
    build-commands:
      - ./bootstrap.sh PREFIX=/app
      - ./b2 headers
      - ./b2 install --prefix=/app
    sources:
      - type: archive
        url: https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz
        sha256: 5347464af5b14ac54bb945dc68f1dd7c56f0dad7262816b956138fc53bcc0131
        x-checker-data:
            type: anitya
            project-id: 6845
            stable-only: true
            url-template: https://boostorg.jfrog.io/artifactory/main/release/$version/source/boost_${version0}_${version1}_${version2}.tar.gz
    cleanup:
      - /include
      - /lib/cmake
  - name: capstone
    buildsystem: simple
    build-commands:
        - make V=1 PREFIX=/app
        - make DESTDIR=/app install
        - mv /app/usr/lib/* /app/lib/
        - mv /app/usr/include/* /app/include/
        - mv /app/usr/bin /app/
    sources:
      - type: git
        url: https://github.com/aquynh/capstone.git
        tag: "4.0.2"
        commit: 1d230532840a37ac032c6ab80128238fc930c6c1
        x-checker-data:
          type: git
          tag-pattern: (\d+\.\d+\.\d+)
    cleanup:
      - /usr/include
      - /usr/lib
  - name: edb
    buildsystem: cmake
    config-opts:
      - -DCMAKE_BUILD_TYPE=RelWithDebInfo
      - -DCMAKE_INSTALL_PREFIX=/app
    sources:
      - type: archive
        url: https://github.com/eteran/edb-debugger/releases/download/1.3.0/edb-debugger-1.3.0.tgz
        sha256: 86df4a0940a39c1480a6fc789f167f94e87a7a330f2d8163fe871f42c754afe8
        x-checker-data:
            type: json
            url: https://api.github.com/repos/eteran/edb-debugger/releases/latest
            version-query: .tag_name
            url-query: ".assets[] | .browser_download_url"
    post-install:
      - install -D edb.appdata.xml -t /app/share/metainfo/
    cleanup:
      - /share/man
@Lunarequest
Copy link
Author

I've got it on a git repo here: https://github.com/Lunarequest/edb-debugger-flatpak

@eteran
Copy link
Owner

eteran commented Sep 27, 2021

Very cool! We can definitely give you some PNGs. Let me look into how this all works and we'll figure it out :-)

@Lunarequest
Copy link
Author

according to the flathub requirements edb-debugger needs to provide 64×64px and 128×128px sized icons. They can also be svgs

@eteran
Copy link
Owner

eteran commented Oct 26, 2021

Sorry for the delay, been very busy lately. But... we do have some things which are "close" in the source tree already:

https://github.com/eteran/edb-debugger/tree/master/src/res/images

Maybe we can just take the edb100-logo.png image and resize it as needed? Not ideal, but it will get the ball rolling?

@10110111
Copy link
Contributor

Note that resizing 100px → 128px will blur the icon. This may be not too bad if we use a suitable upsampling algorithm (e.g. GIMP's NoHalo), but it will still be suboptimal.

@Lunarequest
Copy link
Author

Maybe we can just take the edb100-logo.png image and resize it as needed? Not ideal, but it will get the ball rolling?

To get started with it would work.

@eteran
Copy link
Owner

eteran commented Oct 26, 2021

Yea definitely expecting some minor bluring, but it's just to get this unblocked until we sort out a better solution.

@bztd
Copy link
Contributor

bztd commented Mar 2, 2024

@Lunarequest Hello, why was the application not made to Flatpak?

@eteran
Copy link
Owner

eteran commented Mar 5, 2024

Sorry, yeah this kinda got lost in the mix. I agree that it's a good idea to do though. If you guys follow up with me every now and then to make sure I don't forget I'll try to get it in there 😁

@bztd bztd mentioned this issue Mar 7, 2024
@bztd
Copy link
Contributor

bztd commented Mar 13, 2024

This would be a more updated version of the manifesto:

app-id: io.github.eteran.edb-debugger
runtime: org.kde.Platform
runtime-version: '5.15-23.08'
sdk: org.kde.Sdk
command: edb
rename-desktop-file: edb.desktop
rename-appdata-file: edb.appdata.xml
finish-args:
  - --share=ipc
  - --socket=wayland
  - --socket=fallback-x11
  - --filesystem=home
  - --device=dri
modules:
  - name: boost
    buildsystem: simple
    build-commands:
      - ./bootstrap.sh PREFIX=/app
      - ./b2 headers
      - ./b2 install --prefix=/app
    sources:
      - type: archive
        url: https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz
        sha256: 5347464af5b14ac54bb945dc68f1dd7c56f0dad7262816b956138fc53bcc0131
        x-checker-data:
            type: anitya
            project-id: 6845
            stable-only: true
            url-template: https://boostorg.jfrog.io/artifactory/main/release/$version/source/boost_${version0}_${version1}_${version2}.tar.gz
    cleanup:
      - /include
      - /lib/cmake
  - name: capstone
    buildsystem: simple
    build-commands:
        - make V=1 PREFIX=/app
        - make DESTDIR=/app install
        - mv /app/usr/lib/* /app/lib/
        - mv /app/usr/include/* /app/include/
        - mv /app/usr/bin /app/
    sources:
      - type: git
        url: https://github.com/aquynh/capstone.git
        tag: "5.0.1"
        commit: 097c04d9413c59a58b00d4d1c8d5dc0ac158ffaa
        x-checker-data:
          type: git
          tag-pattern: (\d+\.\d+\.\d+)
    cleanup:
      - /usr/include
      - /usr/lib
  - name: edb
    buildsystem: cmake
    config-opts:
      - -DCMAKE_BUILD_TYPE=RelWithDebInfo
      - -DCMAKE_INSTALL_PREFIX=/app
    sources:
      - type: archive
        url: https://github.com/eteran/edb-debugger/releases/download/1.4.0/edb-debugger-1.4.0.tgz
        sha256: 0eb2c5d17493ab0e7e0a0748eefa5733ec90329631cc8db87f2943e90f91b726
        x-checker-data:
            type: json
            url: https://api.github.com/repos/eteran/edb-debugger/releases/latest
            version-query: .tag_name
            url-query: ".assets[] | .browser_download_url"
    post-install:
      - install -D edb.appdata.xml -t /app/share/metainfo/
    cleanup:
      - /share/man

@bztd
Copy link
Contributor

bztd commented Mar 13, 2024

@bztd
Copy link
Contributor

bztd commented Mar 13, 2024

You also have to update the appdata to something like:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2024 Evan Teran <evan.teran@gmail.com> -->
<component type="desktop">
    <id>io.github.eteran.edb-debugger</id>
    <metadata_license>CC0-1.0</metadata_license>
    <project_license>GPL-2.0</project_license>
    <name>edb</name>
    <summary>Reverse engineer's debugger</summary>
    <description>
		<p>edb is a cross platform x86/x86-64 debugger. It was inspired by OllyDbg, but aims to function on x86 and x86-64 as well as multiple OS's.</p>
		<p>Linux is the only officially supported platform at the moment, but FreeBSD, OpenBSD, OSX and Windows ports are underway with varying degrees of functionality.</p>
    </description>
    <screenshots>
        <screenshot type="default" width="1121" height="839">http://codef00.com/img/debugger.png</screenshot>
    </screenshots>
    <updatecontact>evan.teran_at_gmail.com</updatecontact>
    <url type="homepage">https://github.com/eteran/edb-debugger</url>
    <developer_name>edb-debugger</developer_name>
    <launchable type="desktop-id">edb.desktop</launchable>
    <provides>
        <binary>edb</binary>
    </provides>
    <content_rating type="oars-1.1">
        <content_attribute id="social-info">mild</content_attribute>
    </content_rating>
    <releases>
        <release version="1.4.0" date="2023-06-30"></release>
    </releases>
</component>

@eteran
Copy link
Owner

eteran commented Mar 14, 2024

@bztd it's worth noting that more recent versions of edb actually don't require boost anymore (I believe) as the only features we needed it for are ones that are now just part of c++17.

@bztd
Copy link
Contributor

bztd commented Mar 15, 2024

@eteran I have made other modifications to the manifesto.
The compilation has finished successfully.
The program opens but I'm not sure how it behaves in the sandbox.

I think xterm should be added.It would be best if there is compatibility with Wayland.

Should I attach the manifest directly here or is it more convenient if I fork the flathub repository?

@bztd
Copy link
Contributor

bztd commented Mar 15, 2024

manifest:

app-id: io.github.eteran.edb-debugger
runtime: org.kde.Platform
runtime-version: '5.15-23.08'
sdk: org.kde.Sdk
command: edb
rename-icon: edb
rename-desktop-file: edb.desktop
rename-appdata-file: edb.appdata.xml
finish-args:
  - --allow=devel
  - --share=ipc
  - --socket=x11
  - --filesystem=xdg-documents
  - --device=dri

modules:
  - name: capstone
    buildsystem: simple
    build-commands:
      - make V=1 PREFIX=/app/
      - make DESTDIR=/app install
      - mkdir /app/lib /app/include /app/bin
      - mv /app/usr/lib/* /app/lib/
      - mv /app/usr/include/* /app/include/
      - mv /app/usr/bin/* /app/bin/
    post-install:
      - rm -r /app/usr
    sources:
      - type: git
        url: https://github.com/aquynh/capstone.git
        tag: "5.0.1"
        commit: 097c04d9413c59a58b00d4d1c8d5dc0ac158ffaa

  - name: libXmu-xterm
    buildsystem: autotools
    sources:
      - type: archive
        url: https://xorg.freedesktop.org/releases/individual/lib/libXmu-1.1.4.tar.gz
        sha256: 3091d711cdc1d8ea0f545a13b90d1464c3c3ab64778fd121f0d789b277a80289

  - name: libXaw-xterm
    buildsystem: autotools
    sources:
      - type: archive
        url: https://xorg.freedesktop.org/releases/individual/lib/libXaw-1.0.16.tar.gz
        sha256: 012f90adf8739f2f023d63a5fee1528949cf2aba92ef7ac1abcfc2ae9cf28798

  - name: xterm
    buildsystem: autotools
    config-opts:
      - --disable-full-tgetent
    sources:
      - type: archive
        url: https://invisible-island.net/datafiles/release/xterm.tar.gz
        sha256: 75117c3cc5174a09c425ef106e69404d72f5ef05e03a5da00aaf15792d6f9c0f

  - name: edb
    buildsystem: cmake-ninja
    post-install:
      - install -Dm644 edb.appdata.xml /app/share/appdata/edb.appdata.xml
      - install -Dm644 edb.svg /app/share/icons/hicolor/scalable/apps/edb.svg
    sources:
      - type: archive
        url: https://github.com/eteran/edb-debugger/releases/download/1.4.0/edb-debugger-1.4.0.tgz
        sha256: 0eb2c5d17493ab0e7e0a0748eefa5733ec90329631cc8db87f2943e90f91b726
      - type: file
        path: edb.svg
      - type: file
        path: edb.appdata.xml

@eteran
Copy link
Owner

eteran commented Mar 15, 2024

looks great, but keep in mind that all the changes we've made don't apply to version 1.4.0. We'll need to cut a new release for it to automatically included.

@bztd
Copy link
Contributor

bztd commented Mar 15, 2024

Yes, that's why I included the necessary files separately in the manifest. It can be left like this temporarily if you prefer.

I have tried edb and it seems to work.

@bztd
Copy link
Contributor

bztd commented Mar 17, 2024

@eteran If you agree, I can make the request to flathub for you.

@eteran
Copy link
Owner

eteran commented Mar 17, 2024

I'm away until Tuesday, but I say lemme do a 1.4.1 release when I get back and we can have the flatpak target that since it'll have the new icon built-in.

@eteran
Copy link
Owner

eteran commented Mar 22, 2024

@bztd OK, I've bumped the version to 1.5.0, please feel free to updte the manifest to match and make a request to flathub!

@bztd
Copy link
Contributor

bztd commented Mar 22, 2024

I'll do the local tests and I will proceed

@bztd
Copy link
Contributor

bztd commented Mar 22, 2024

@eteran edb has been compiled in arm?

the build threw an error: https://buildbot.flathub.org/#/builders/30/builds/10009

@bztd
Copy link
Contributor

bztd commented Mar 22, 2024

sorry, I see that arm64 is not supported

@eteran
Copy link
Owner

eteran commented Mar 23, 2024

That and the arm32 branch is likely in need of some love.

Really x86/x86-64 on Linux is really the only WELL supported platform

@bztd
Copy link
Contributor

bztd commented Mar 23, 2024

I think this is an almost definitive version of the package: flatpak install --user https://dl.flathub.org/build-repo/92200/io.github.eteran.edb-debugger.flatpakref

edb only has permission for the documents folder. The user can change it with commands or with flatseal.

@eteran
Copy link
Owner

eteran commented Mar 23, 2024

Ok, does that mean it's done? Awesome, thanks for your efforts.

Is this process something we can automate in the future?

@bztd
Copy link
Contributor

bztd commented Mar 23, 2024

They still need to accept the request and add it to edb on flathub, which could take some time, but I think that what could be corrected has already been corrected.

As for automation, I have seen that a bot is usually used to update the sources, that is also configured in the manifest.
On the other hand, I do not know if any automation process can be configured from the edb-debugger repository.

@eteran
Copy link
Owner

eteran commented Mar 23, 2024

Great, I'll close any related issues, but please do update when it gets approved!

@bztd
Copy link
Contributor

bztd commented Mar 24, 2024

@eteran Reviewers ask if it is possible to run edb on arm64 by removing the restrictions?

flathub/flathub#5078

@hfiguiere
Copy link

according to the flathub requirements edb-debugger needs to provide 64×64px and 128×128px sized icons. They can also be svgs

128x128 is the minimum size.

@eteran
Copy link
Owner

eteran commented Mar 24, 2024

@eteran Reviewers ask if it is possible to run edb on arm64 by removing the restrictions?

flathub/flathub#5078

Not possible, the code is not yet implemented.

@eteran
Copy link
Owner

eteran commented Mar 24, 2024

However, it is worth noting that 32 but x86 IS supported, not just x86-64 (was reading the backlog of comments)

@hfiguiere
Copy link

For flathub it doesn't matter i386 has been unsupported for longer than arm which has been unsupported since 2020.

We have all moved to 64-bits architectures.

@eteran
Copy link
Owner

eteran commented Mar 24, 2024

BTW, I saw a lot of little things in the comments. If there are changes you think we should make on our end going forward, please do let us know!

Thanks for getting this done!

@bztd
Copy link
Contributor

bztd commented Mar 28, 2024

voila, edb was included to flathub.

@eteran
Copy link
Owner

eteran commented Mar 28, 2024

Hell yeah, thanks for your help!

@eteran eteran closed this as completed Mar 28, 2024
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

5 participants