-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from Ultramarine-Linux/polycrystal
add polycrystal post script
- Loading branch information
Showing
14 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,11 @@ | ||
scripts: | ||
post: | ||
- id: polycrystal | ||
name: Install Flatpaks via Polycrystal | ||
file: polycrystal.sh | ||
|
||
dnf: | ||
releasever: 41 | ||
exec: dnf4 | ||
packages: | ||
- "@default-flatpak-support" |
This file contains 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,31 @@ | ||
#!/bin/bash -x | ||
set -euo pipefail | ||
|
||
# Hack from https://gist.github.com/jlebon/fb6e7c6dcc3ce17d3e2a86f5938ec033 | ||
|
||
cleanup() { | ||
chmod u-s /mnt/mock-mount/usr/bin/bwrap | ||
for mnt in sys proc dev/pts dev; do | ||
umount /mnt/mock-mount/$mnt | ||
done | ||
umount /mnt/mock-mount | ||
umount /mnt/mock-mount | ||
} | ||
|
||
if [ -x "$(command -v polycrystal)" ]; then | ||
trap cleanup EXIT | ||
mkdir -p /mnt/mock-mount | ||
mount --bind / /mnt/mock-mount | ||
mount --make-private /mnt/mock-mount | ||
mount --bind /mnt/mock-mount /mnt/mock-mount | ||
for mnt in proc sys dev dev/pts; do | ||
mount --bind /$mnt /mnt/mock-mount/$mnt | ||
done | ||
|
||
# For some reason, our hack to get bwrap to work in a chroot also breaks user namespaces | ||
# I can't figure out why, so we'll just setuid bwrap for now | ||
# YOU MUST REMOVE THE SETUID BIT AFTER RUNNING THIS SCRIPT WHICH WE DO IN THE CLEANUP FUNCTION AND HERE | ||
chmod u+s /mnt/mock-mount/usr/bin/bwrap | ||
chroot /mnt/mock-mount bash -c 'polycrystal' | ||
chmod u-s /mnt/mock-mount/usr/bin/bwrap | ||
fi |
This file contains 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 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 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 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 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 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 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 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 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 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 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 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