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

Hooks: Add hook to expose Endless Key launchers in app grid #168

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

cassidyjames
Copy link
Member

@cassidyjames cassidyjames commented Nov 19, 2024

Is this the right idea? It sort of feels dirty to include a whole shell script here. And do I need to make it executable?

https://phabricator.endlessm.com/T35614

@cassidyjames cassidyjames requested a review from wjt November 19, 2024 18:09
hooks/image/54-ek-launchers Outdated Show resolved Hide resolved
hooks/image/54-ek-launchers Outdated Show resolved Hide resolved
hooks/image/54-ek-launchers Outdated Show resolved Hide resolved
@wjt
Copy link
Member

wjt commented Nov 19, 2024

It doesn't need to be executable. If you look at the other files in this directory, only the ones ending in .chroot are executable. That's because they are run in a different environment, by chrooting into the target image, and then invoking them as a program. The non-chroot ones are sourced with the . operator.

@wjt
Copy link
Member

wjt commented Nov 19, 2024

I agree that it's a little ugly to write a shell script to write an embedded shell script to a place, but for better or for worse that's how it's done for now.

You could imagine instead putting the file in the OS, and then just making a symlink here. But I think this is OK.

@cassidyjames cassidyjames marked this pull request as ready for review November 19, 2024 18:19
@cassidyjames cassidyjames requested a review from wjt November 19, 2024 18:19
Copy link
Member

@dbnicholson dbnicholson left a comment

Choose a reason for hiding this comment

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

This feels like the kind of thing that should be in the OS. In fact, we already have this exact thing for regular Kolibri.

hooks/image/54-ek-launchers Show resolved Hide resolved
@cassidyjames
Copy link
Member Author

cassidyjames commented Nov 19, 2024

I threw a test build at Jenkins, and it errored out with:

++ 21:07:53 54-ek-launchers: cat
/tmp/image-build-PJzO8VoBgE/eos-image-builder/hooks/image/54-ek-launchers: line 3: /var/cache/eos-image-builder/tmp/ostree-co/ostree/deploy/eos/deploy/18fedf9dcbf070e57e12ff5a93621573349ee8276dbc9717629fbb52f295df56.0/etc/systemd/user-environment-generators/62-endless-key.sh: No such file or directory

@dylanmccall
Copy link
Contributor

dylanmccall commented Nov 19, 2024

This feels like the kind of thing that should be in the OS. In fact, we already have this exact thing for regular Kolibri.

Indeed, another approach here is we change eos-kolibri to also build its own 61-eos-endless-key.sh environment generator right there, but in that one we add a test at the beginning, maybe for an environment variable or for a file like /var/lib/endless-key/data/content/xdg/show-launchers. The image builder hook would just need to add that one thing to satisfy the test. Less code that we can't update :)

I'm not too bothered by this implementation, but I'm curious if this is going to be needed for a lot of images, or if it's just a one-off?

hooks/image/54-ek-launchers Show resolved Hide resolved
@wjt wjt force-pushed the T35614-ek-launchers branch from 9d43966 to fc341b7 Compare November 29, 2024 11:33
@wjt wjt merged commit 0f344fc into master Nov 29, 2024
2 checks passed
@wjt wjt deleted the T35614-ek-launchers branch November 29, 2024 11:50
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.

4 participants