Skip to content

Commit 704e822

Browse files
shanemcdclaude
andcommitted
Remove Cursor from Containerfile, use sysext instead
- Remove Cursor IDE installation from container image - Delete install-cursor.sh script - Add install-sysext.sh helper script for local sysext installation Cursor can now be installed via sysext from the community repo (PR: fedora-sysexts/community#25) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6c54db9 commit 704e822

File tree

3 files changed

+59
-52
lines changed

3 files changed

+59
-52
lines changed

install-sysext.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
# Install a local sysext .raw file
3+
set -euo pipefail
4+
5+
if [[ $# -ne 1 ]]; then
6+
echo "Usage: $0 <path-to-sysext.raw>"
7+
exit 1
8+
fi
9+
10+
RAW_FILE="$1"
11+
12+
if [[ ! -f "$RAW_FILE" ]]; then
13+
echo "Error: File not found: $RAW_FILE"
14+
exit 1
15+
fi
16+
17+
if [[ ! "$RAW_FILE" == *.raw ]]; then
18+
echo "Error: File must have .raw extension"
19+
exit 1
20+
fi
21+
22+
# Extract sysext name from filename (e.g., cursor-1.2.3-43-x86-64.raw -> cursor)
23+
BASENAME=$(basename "$RAW_FILE")
24+
SYSEXT_NAME="${BASENAME%%-[0-9]*}"
25+
26+
# Fallback if pattern doesn't match
27+
if [[ -z "$SYSEXT_NAME" || "$SYSEXT_NAME" == "$BASENAME" ]]; then
28+
SYSEXT_NAME="${BASENAME%.raw}"
29+
fi
30+
31+
echo "Installing sysext: $SYSEXT_NAME"
32+
33+
# First-time setup
34+
if [[ ! -d /var/lib/extensions ]]; then
35+
echo "Creating /var/lib/extensions..."
36+
sudo install -d -m 0755 -o 0 -g 0 /var/lib/extensions
37+
sudo restorecon -RFv /var/lib/extensions
38+
fi
39+
40+
# Enable service if not already
41+
if ! systemctl is-enabled systemd-sysext.service &>/dev/null; then
42+
echo "Enabling systemd-sysext.service..."
43+
sudo systemctl enable systemd-sysext.service
44+
fi
45+
46+
# Copy the sysext
47+
echo "Copying $RAW_FILE to /var/lib/extensions/${SYSEXT_NAME}.raw..."
48+
sudo cp "$RAW_FILE" "/var/lib/extensions/${SYSEXT_NAME}.raw"
49+
sudo restorecon "/var/lib/extensions/${SYSEXT_NAME}.raw"
50+
51+
# Merge
52+
echo "Merging sysexts..."
53+
sudo systemctl restart systemd-sysext.service
54+
55+
echo ""
56+
echo "Done! Status:"
57+
systemd-sysext status

mybox/Containerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ RUN <<EORUN
129129
EORUN
130130

131131
# =============================================================================
132-
# Layer 3: Custom Installations (1Password GUI + Cursor)
132+
# Layer 3: Custom Installations (1Password GUI)
133133
# =============================================================================
134-
COPY install-cursor.sh /tmp/
134+
# Note: Cursor is installed via sysext, see SYSEXTS.md
135135

136136
RUN <<EORUN
137137
set -euxo pipefail
@@ -156,9 +156,6 @@ RUN <<EORUN
156156
rm -rf /opt
157157
mv /opt{.bak,}
158158

159-
# Cursor IDE
160-
bash /tmp/install-cursor.sh
161-
162159
# Cleanup
163160
rm -rf /var/cache/* /tmp/*
164161
EORUN

mybox/install-cursor.sh

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)