-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore(release): add Linux packaging and stable install path #1827
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
Open
InSelfControll
wants to merge
2
commits into
pingdotgg:main
Choose a base branch
from
InSelfControll:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Package: t3code | ||
| Version: 0.0.15 | ||
| License: unknown | ||
| Vendor: T3 Tools <opensource@t3.tools> | ||
| Architecture: amd64 | ||
| Maintainer: T3 Tools <opensource@t3.tools> | ||
| Installed-Size: 492821 | ||
| Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0 | ||
| Recommends: libappindicator3-1 | ||
| Section: default | ||
| Priority: optional | ||
| Homepage: https://github.com/pingdotgg/t3code | ||
| Description: T3 Code | ||
| T3 Code |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #!/bin/bash | ||
|
|
||
| if type update-alternatives >/dev/null 2>&1; then | ||
| # Remove previous link if it doesn't use update-alternatives | ||
| if [ -L '/usr/bin/t3code' -a -e '/usr/bin/t3code' -a "`readlink '/usr/bin/t3code'`" != '/etc/alternatives/t3code' ]; then | ||
| rm -f '/usr/bin/t3code' | ||
| fi | ||
| update-alternatives --install '/usr/bin/t3code' 't3code' '/opt/t3code/t3code' 100 || ln -sf '/opt/t3code/t3code' '/usr/bin/t3code' | ||
| else | ||
| ln -sf '/opt/t3code/t3code' '/usr/bin/t3code' | ||
| fi | ||
|
|
||
| # Check if user namespaces are supported by the kernel and working with a quick test: | ||
| if ! { [[ -L /proc/self/ns/user ]] && unshare --user true; }; then | ||
| # Use SUID chrome-sandbox only on systems without user namespaces: | ||
| chmod 4755 '/opt/t3code/chrome-sandbox' || true | ||
| else | ||
| chmod 0755 '/opt/t3code/chrome-sandbox' || true | ||
| fi | ||
|
|
||
| if hash update-mime-database 2>/dev/null; then | ||
| update-mime-database /usr/share/mime || true | ||
| fi | ||
|
|
||
| if hash update-desktop-database 2>/dev/null; then | ||
| update-desktop-database /usr/share/applications || true | ||
| fi | ||
|
|
||
| # Install apparmor profile. (Ubuntu 24+) | ||
| # First check if the version of AppArmor running on the device supports our profile. | ||
| # This is in order to keep backwards compatibility with Ubuntu 22.04 which does not support abi/4.0. | ||
| # In that case, we just skip installing the profile since the app runs fine without it on 22.04. | ||
| # | ||
| # Those apparmor_parser flags are akin to performing a dry run of loading a profile. | ||
| # https://wiki.debian.org/AppArmor/HowToUse#Dumping_profiles | ||
| # | ||
| # Unfortunately, at the moment AppArmor doesn't have a good story for backwards compatibility. | ||
| # https://askubuntu.com/questions/1517272/writing-a-backwards-compatible-apparmor-profile | ||
| if apparmor_status --enabled > /dev/null 2>&1; then | ||
| APPARMOR_PROFILE_SOURCE='/opt/t3code/resources/apparmor-profile' | ||
| APPARMOR_PROFILE_TARGET='/etc/apparmor.d/t3code' | ||
| if apparmor_parser --skip-kernel-load --debug "$APPARMOR_PROFILE_SOURCE" > /dev/null 2>&1; then | ||
| cp -f "$APPARMOR_PROFILE_SOURCE" "$APPARMOR_PROFILE_TARGET" | ||
|
|
||
| # Updating the current AppArmor profile is not possible and probably not meaningful in a chroot'ed environment. | ||
| # Use cases are for example environments where images for clients are maintained. | ||
| # There, AppArmor might correctly be installed, but live updating makes no sense. | ||
| if ! { [ -x '/usr/bin/ischroot' ] && /usr/bin/ischroot; } && hash apparmor_parser 2>/dev/null; then | ||
| # Extra flags taken from dh_apparmor: | ||
| # > By using '-W -T' we ensure that any abstraction updates are also pulled in. | ||
| # https://wiki.debian.org/AppArmor/Contribute/FirstTimeProfileImport | ||
| apparmor_parser --replace --write-cache --skip-read-cache "$APPARMOR_PROFILE_TARGET" | ||
| fi | ||
| else | ||
| echo "Skipping the installation of the AppArmor profile as this version of AppArmor does not seem to support the bundled profile" | ||
| fi | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Delete the link to the binary | ||
| if type update-alternatives >/dev/null 2>&1; then | ||
| update-alternatives --remove 't3code' '/opt/t3code/t3code' | ||
| else | ||
| rm -f '/usr/bin/t3code' | ||
| fi | ||
|
|
||
| APPARMOR_PROFILE_DEST='/etc/apparmor.d/t3code' | ||
|
|
||
| # Remove apparmor profile. | ||
| if [ -f "$APPARMOR_PROFILE_DEST" ]; then | ||
| rm -f "$APPARMOR_PROFILE_DEST" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.