This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Reduce image size and complexity (#40)
- Reduce number of copies - Remove redundant container commit - Make scripts executable
- Loading branch information
Showing
9 changed files
with
144 additions
and
151 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
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 @@ | ||
system_files/tmp/build.sh |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
system_files/tmp/packages.json |
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,35 @@ | ||
#!/bin/sh | ||
|
||
set -ouex pipefail | ||
|
||
RELEASE="$(rpm -E %fedora)" | ||
|
||
INCLUDED_PACKAGES=($(jq -r "[(.all.include | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[]), \ | ||
(select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".include | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[])] \ | ||
| sort | unique[]" /tmp/packages.json)) | ||
EXCLUDED_PACKAGES=($(jq -r "[(.all.exclude | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[]), \ | ||
(select(.\"$FEDORA_MAJOR_VERSION\" != null).\"$FEDORA_MAJOR_VERSION\".exclude | (.all, select(.\"$IMAGE_NAME\" != null).\"$IMAGE_NAME\")[])] \ | ||
| sort | unique[]" /tmp/packages.json)) | ||
|
||
|
||
if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then | ||
EXCLUDED_PACKAGES=($(rpm -qa --queryformat='%{NAME} ' ${EXCLUDED_PACKAGES[@]})) | ||
fi | ||
|
||
if [[ "${#INCLUDED_PACKAGES[@]}" -gt 0 && "${#EXCLUDED_PACKAGES[@]}" -eq 0 ]]; then | ||
rpm-ostree install \ | ||
${INCLUDED_PACKAGES[@]} | ||
|
||
elif [[ "${#INCLUDED_PACKAGES[@]}" -eq 0 && "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then | ||
rpm-ostree override remove \ | ||
${EXCLUDED_PACKAGES[@]} | ||
|
||
elif [[ "${#INCLUDED_PACKAGES[@]}" -gt 0 && "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then | ||
rpm-ostree override remove \ | ||
${EXCLUDED_PACKAGES[@]} \ | ||
$(printf -- "--install=%s " ${INCLUDED_PACKAGES[@]}) | ||
|
||
else | ||
echo "No packages to install." | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"all": { | ||
"include": { | ||
"all": [ | ||
"gnome-boxes", | ||
"gnome-software", | ||
"python3-pip", | ||
"timeshift", | ||
"touchegg", | ||
"NetworkManager-adsl", | ||
"NetworkManager-bluetooth", | ||
"NetworkManager-iodine-gnome", | ||
"NetworkManager-l2tp-gnome", | ||
"NetworkManager-libreswan-gnome", | ||
"NetworkManager-openconnect-gnome", | ||
"NetworkManager-openvpn-gnome", | ||
"NetworkManager-ppp", | ||
"NetworkManager-pptp-gnome", | ||
"NetworkManager-vpnc-gnome", | ||
"NetworkManager-wifi", | ||
"NetworkManager-wwan", | ||
"abrt-desktop", | ||
"abrt-java-connector", | ||
"blueman", | ||
"cinnamon", | ||
"cinnamon-control-center", | ||
"cinnamon-screensaver", | ||
"eom", | ||
"ffmpegthumbnailer", | ||
"firewall-config", | ||
"gnome-disk-utility", | ||
"gnome-screenshot", | ||
"gnome-system-monitor", | ||
"gnome-terminal", | ||
"gstreamer1-plugins-ugly-free", | ||
"gvfs-archive", | ||
"gvfs-gphoto2", | ||
"gvfs-mtp", | ||
"gvfs-smb", | ||
"imsettings-gsettings", | ||
"initial-setup-gui", | ||
"metacity", | ||
"nemo-fileroller", | ||
"nemo-image-converter", | ||
"nemo-preview", | ||
"nemo-python", | ||
"nm-connection-editor", | ||
"paper-icon-theme", | ||
"pipewire-alsa", | ||
"pipewire-pulseaudio", | ||
"powerline", | ||
"qgnomeplatform-qt5", | ||
"redshift-gtk", | ||
"sane-backends-drivers-scanners", | ||
"setroubleshoot", | ||
"simple-scan", | ||
"slick-greeter", | ||
"slick-greeter-cinnamon", | ||
"system-config-printer", | ||
"tmux", | ||
"tmux-powerline", | ||
"vim-powerline", | ||
"xawtv", | ||
"xdg-user-dirs-gtk", | ||
"xed", | ||
"xfburn", | ||
"xreader" | ||
] | ||
}, | ||
"exclude": { | ||
"all": [ | ||
"firefox", | ||
"firefox-langpacks" | ||
] | ||
} | ||
}, | ||
"37": { | ||
"include": { | ||
"all": [ | ||
"raw-thumbnailer" | ||
] | ||
}, | ||
"exclude": { | ||
"all": [] | ||
} | ||
}, | ||
"38": { | ||
"include": { | ||
"all": [ | ||
"raw-thumbnailer" | ||
] | ||
}, | ||
"exclude": { | ||
"all": [ | ||
] | ||
} | ||
}, | ||
"39": { | ||
"include": { | ||
"all": [] | ||
}, | ||
"exclude": { | ||
"all": [] | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.