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

WIP: Add PKGBUILD file #25

Merged
merged 21 commits into from
Jul 18, 2024
Merged

WIP: Add PKGBUILD file #25

merged 21 commits into from
Jul 18, 2024

Conversation

hodasemi
Copy link
Contributor

@hodasemi hodasemi commented Jun 6, 2024

Hi,

I created a PKGBUILD file (for breezy-desktop the gnome version not the vulkan version) which is a build file for pacman (archlinux and its derivatives). The extensions seems to be working but I currently have problems with the ui. I omitted the xreal-air driver for now (I have a viture one) since it is more like a quick idea, but is the xreal-air driver needed to run the application?

If I start the application it just loops forever (the window doesn't open).

The advantage of using a PKGBUILD file is that everything is tracked via pacman without the reliance on scripts to install/update/uninstall things. (and without using flatpak)
It could also be a base to create build files for other common package managers.

@hodasemi
Copy link
Contributor Author

hodasemi commented Jun 6, 2024

I added the xr driver to the build file. While testing I came across an error. I created an MR over there.

@wheaney
Copy link
Owner

wheaney commented Jun 6, 2024

Dude that's amazing! I've really wanted to research what it would take to get this into package managers but between apt, pacman, dnf, and probably a million others that probably don't actually reuse or share any configuration, the idea got a little overwhelming. Thanks for taking this first step!

PKGBUILD Outdated
Comment on lines 70 to 73
# copy xr driver
install -Dm755 ${_pkgbase}/modules/XRLinuxDriver/build/xrealAirLinuxDriver "${pkgdir}"/usr/bin/xrealAirLinuxDriver
sed -i '/ExecStart/c\ExecStart=xrealAirLinuxDriver' ${_pkgbase}/modules/XRLinuxDriver/systemd/xreal-air-driver.service
install -Dm644 ${_pkgbase}/modules/XRLinuxDriver/systemd/xreal-air-driver.service "${pkgdir}"/usr/lib/systemd/system/xreal-air-driver.service
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "right" way to do this would be to have the XR driver package be its own package in the repo. Then the Breezy GNOME would just list that package in its depends list above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I'm gonna open an MR on other repo, sounds reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the file and opened an MR in the other repo

PKGBUILD Outdated
Comment on lines 51 to 56
# copy gnome extension
install -Dm755 ${_pkgbase}/ui/data/com.xronlinux.BreezyDesktop.gschema.xml "${pkgdir}"/usr/share/glib-2.0/schemas/com.xronlinux.BreezyDesktop.gschema.xml

install -d "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/"
cp -r ${_pkgbase}/gnome/src/* "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/"
unlink "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/IMUAdjust.frag"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to use the gnome-extensions command to install the extension? I don't like the idea of manually installing it, but if we have to then I guess that's fine.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also a little skeptical that this will work with the glib compiled schema, as I think gnome-extensions might do more than just copy files. Before I got this install completely working, I was testing (and having others test) the extension via manual copies like this, and it required special setup of the compiled schema file. I wonder if this would work if you tried this install process on a fresh OS install (you may already have the compiled schemas registered if you've done it using my installer), I wouldn't be shocked if it doesn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I oriented myself on the other packages in the arch repo (e.g.).
meson install is basically just a copy command.

As you can see in the compile step I create everything there.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works for AppIndicator then it would seem like it must work for us, but when I used glib-compile-schemas and kept the schemas/ dir in the extenion dir (as you're doing here), it wouldn't properly work for me. I can't remember exactly, but it may be that my Gtk Breezy Desktop UI app complicated things because it's trying to sync settings with the extension, and it runs from a Flatpak where the syncing of dconf with the host machine was pretty complicated. So I think you may find if you install it like this, then the Breezy Desktop app settings won't sync with the extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently working on the XRLinuxDriver, that the base runs as it should and then I would take a look what it takes to get breezy desktop running via pkg file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made some research regarding the gnome-extensions tool:

The tool only support installing extensions as user extensions and not on a system level. Thus it is not of much use in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken from the man page:

install [OPTION...] PACK
           Installs an extension from the bundle PACK.

           The command unpacks the extension files and moves them to the
           expected location in the user’s $HOME, so that it will be loaded in
           the next session.

           It is mainly intended for testing, not as a replacement for the
           extension website. As extensions have privileged access to the
           user’s session, it is advised to never load extensions from
           untrusted sources without carefully reviewing their content.

           Options
               --force
                   Override an existing extension

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only installing as a user extension, so that's fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

But: gnome-extensions only mimics what https://extensions.gnome.org/ does. It install a gnome-extension on a user level. What a package does is, it installs a gnome-extension on a system level accessible for every user with 1 installation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works for AppIndicator then it would seem like it must work for us

The AppIndicator pkg file also does not use the tool: https://gitlab.archlinux.org/archlinux/packaging/packages/gnome-shell-extension-appindicator/-/blob/main/PKGBUILD?ref_type=heads

@wheaney
Copy link
Owner

wheaney commented Jun 6, 2024

How does the PKGBUILD file link up with the pacman repo to get distributed? Does it have to be in the root of this package? Since this repo hosts multiple breezy implementations (vulkan vs gnome vs future stuff e.g. kwin effects), it would be nice to have each of those distributed as separate installs.

@hodasemi
Copy link
Contributor Author

hodasemi commented Jun 6, 2024

The PKGBUILD file is completely separated from the location in the repo. I don't know about the upstreaming into the arch repo. One actually needs to be accepted as contributor and such ...
You can move the file into a separated directory and maybe add it to the releases that users can download it and execute makepkg on the file alone.

@hodasemi
Copy link
Contributor Author

hodasemi commented Jun 9, 2024

The installation process does work now. The extension is installed in the system. It shows itself in the gnome-extension ui thingy. The Breezy-Desktop program is installed and can be opened. I still need to add an icon for desktop file (minor thing actually).
Where it hangs now:

  1. It can't perform the verification step since the verification is not installed. If I skip this check entirely the ui opens.
  2. If I enable the trigger in the ui nothing happens. Maybe you have some ideas what to look for here. I'm gonna have a look on my own anyway.

@hodasemi
Copy link
Contributor Author

hodasemi commented Jun 9, 2024

I missed the environment variable BREEZY_DESKTOP in the XRLinuxDriver.

I need to add icons. Then 2 issue remain:

  1. access rights for the license directory (this is where your issue comes in)
  2. Skipping the verification or at least ignoring it in this case

Other than that: both pkg files are ready to go.

@wheaney
Copy link
Owner

wheaney commented Jun 11, 2024

Can you let me know how I can test this myself?

@hodasemi
Copy link
Contributor Author

hodasemi commented Jun 12, 2024

Hi, yesterday I made the changes to the license location and I added a command line option to skip the verification process. Breezy-Desktop does currently not work with the new license file location and the desktop file icons are still missing. Apart from that:

  1. Download the PKGBUILD file and place it somewhere (I recommend outside of the repo if you clone it)
  2. Until it is merged you need to change the url from wheaney to hodasemi, because the changes are obviously not available on your master currently
  3. execute makepkg -si (s installs dependencies, i installs the package after building it) in the directory of your PKGBUILD
  4. I think you need to reboot (or maybe just login and logout) for the gnome-extension to become available.

@hodasemi
Copy link
Contributor Author

License location and icons work now. I merged the rayneo changes into XRLinuxDriver, since then enabling doesn't do anything anymore.

@hodasemi
Copy link
Contributor Author

The same as in the other MR. Installation works as is_productivity_granted does.

@hodasemi
Copy link
Contributor Author

wheaney/XRLinuxDriver@dd449fa That fixed the issue.

Copy link
Owner

@wheaney wheaney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty straightforward. I don't mind moving away from Flatpak if that's what's needed here, I wasn't a huge fan of it for this app anyway, but I was using GNOME's Builder application and the only build export option was flatpak.

PKGBUILD Outdated Show resolved Hide resolved
PKGBUILD Show resolved Hide resolved
PKGBUILD Show resolved Hide resolved
@wheaney wheaney merged commit eb81b7a into wheaney:main Jul 18, 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

Successfully merging this pull request may close these issues.

None yet

2 participants