Skip to content

Commit c6b26f8

Browse files
committed
Remove GPG verification for simplicity
1 parent 2a97966 commit c6b26f8

File tree

1 file changed

+1
-104
lines changed

1 file changed

+1
-104
lines changed

scripts/install.sh

Lines changed: 1 addition & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,8 @@ MACOS_APP_DIR="/Applications"
1818
LINUX_INSTALL_DIR="$HOME/.local/bin"
1919
DOWNLOAD_DIR="$HOME/.${BINARY_NAME}/downloads"
2020

21-
# GPG Configuration
22-
GPG_KEY_ID="50DC7A8DC24C5667"
23-
GPG_PUBLIC_KEY="-----BEGIN PGP PUBLIC KEY BLOCK-----
24-
25-
mDMEZig60RYJKwYBBAHaRw8BAQdAy/+G05U5/EOA72WlcD4WkYn5SInri8pc4Z6D
26-
BKNNGOm0JEFtYXpvbiBRIENMSSBUZWFtIDxxLWNsaUBhbWF6b24uY29tPoiZBBMW
27-
CgBBFiEEmvYEF+gnQskUPgPsUNx6jcJMVmcFAmYoOtECGwMFCQPCZwAFCwkIBwIC
28-
IgIGFQoJCAsCBBYCAwECHgcCF4AACgkQUNx6jcJMVmef5QD/QWWEGG/cOnbDnp68
29-
SJXuFkwiNwlH2rPw9ZRIQMnfAS0A/0V6ZsGB4kOylBfc7CNfzRFGtovdBBgHqA6P
30-
zQ/PNscGuDgEZig60RIKKwYBBAGXVQEFAQEHQC4qleONMBCq3+wJwbZSr0vbuRba
31-
D1xr4wUPn4Avn4AnAwEIB4h+BBgWCgAmFiEEmvYEF+gnQskUPgPsUNx6jcJMVmcF
32-
AmYoOtECGwwFCQPCZwAACgkQUNx6jcJMVmchMgEA6l3RveCM0YHAGQaSFMkguoAo
33-
vK6FgOkDawgP0NPIP2oA/jIAO4gsAntuQgMOsPunEdDeji2t+AhV02+DQIsXZpoB
34-
=f8yY
35-
-----END PGP PUBLIC KEY BLOCK-----"
36-
3721
# Global variables
3822
use_musl=false
39-
skip_gpg=false
4023
downloaded_files=()
4124
temp_dirs=()
4225

@@ -65,10 +48,6 @@ warning() {
6548
parse_args() {
6649
while [[ $# -gt 0 ]]; do
6750
case $1 in
68-
--skip-gpg)
69-
skip_gpg=true
70-
shift
71-
;;
7251
--help|-h)
7352
show_help
7453
exit 0
@@ -87,15 +66,13 @@ $CLI_NAME Installation Script
8766
Usage: $0 [OPTIONS]
8867
8968
Options:
90-
--skip-gpg Skip GPG signature verification (not recommended)
9169
--help, -h Show this help message
9270
9371
This script will:
9472
1. Detect your platform and architecture
9573
2. Download the appropriate $CLI_NAME package
96-
3. Verify checksums and GPG signatures (if available)
74+
3. Verify checksums
9775
4. Install $CLI_NAME on your system
98-
5. Set up shell integrations
9976
10077
For more information, visit: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html
10178
EOF
@@ -122,13 +99,6 @@ check_dependencies() {
12299
missing_deps+=("sha256sum")
123100
fi
124101

125-
# Check for GPG (optional)
126-
if [[ "$skip_gpg" == "false" ]] && ! command -v gpg >/dev/null 2>&1; then
127-
warning "GPG not found. Signature verification will be skipped."
128-
warning "Install gpg for enhanced security verification."
129-
skip_gpg=true
130-
fi
131-
132102
if [[ ${#missing_deps[@]} -gt 0 ]]; then
133103
error "Missing required dependencies: ${missing_deps[*]}"
134104
fi
@@ -178,61 +148,6 @@ get_checksum() {
178148
fi
179149
}
180150

181-
# =============================================================================
182-
# GPG Functions
183-
# =============================================================================
184-
185-
setup_gpg() {
186-
if [[ "$skip_gpg" == "true" ]]; then
187-
return 0
188-
fi
189-
190-
log "Setting up GPG verification..."
191-
192-
# Create download directory if it doesn't exist
193-
mkdir -p "$DOWNLOAD_DIR"
194-
195-
# Create temporary key file
196-
local key_file="$DOWNLOAD_DIR/amazon-q-public.key"
197-
echo "$GPG_PUBLIC_KEY" > "$key_file"
198-
downloaded_files+=("$key_file")
199-
200-
# Import the key
201-
if gpg --import "$key_file" >/dev/null 2>&1; then
202-
success "Amazon Q public key imported"
203-
else
204-
warning "Failed to import GPG key. Skipping signature verification."
205-
skip_gpg=true
206-
fi
207-
}
208-
209-
verify_gpg_signature() {
210-
if [[ "$skip_gpg" == "true" ]]; then
211-
return 0
212-
fi
213-
214-
local file_path="$1"
215-
local sig_url="$2"
216-
local sig_path="${file_path}.sig"
217-
218-
log "Downloading GPG signature..."
219-
if ! download_file "$sig_url" "$sig_path"; then
220-
warning "Failed to download signature file. Skipping GPG verification."
221-
return 0
222-
fi
223-
224-
downloaded_files+=("$sig_path")
225-
226-
log "Verifying GPG signature..."
227-
if gpg --verify "$sig_path" "$file_path" >/dev/null 2>&1; then
228-
success "GPG signature verified successfully"
229-
return 0
230-
else
231-
warning "GPG signature verification failed"
232-
return 1
233-
fi
234-
}
235-
236151
# =============================================================================
237152
# Platform Detection
238153
# =============================================================================
@@ -292,7 +207,6 @@ get_download_info() {
292207
if [[ "$os" == "darwin" ]]; then
293208
filename="Amazon Q.dmg"
294209
download_url="${BASE_URL}/latest/Amazon%20Q.dmg"
295-
sig_url="" # No GPG signature for DMG files
296210
else
297211
# Linux
298212
if [[ "$use_musl" == "true" ]]; then
@@ -301,7 +215,6 @@ get_download_info() {
301215
filename="q-${arch}-linux.zip"
302216
fi
303217
download_url="${BASE_URL}/latest/$filename"
304-
sig_url="${download_url}.sig"
305218
fi
306219

307220
log "Download URL: $download_url"
@@ -344,11 +257,6 @@ download_and_verify() {
344257

345258
success "Checksum verified successfully"
346259

347-
# Verify GPG signature for Linux packages
348-
if [[ "$os" == "linux" ]] && [[ -n "$sig_url" ]]; then
349-
verify_gpg_signature "$file_path" "$sig_url"
350-
fi
351-
352260
echo "$file_path"
353261
}
354262

@@ -482,11 +390,6 @@ main() {
482390
check_dependencies
483391
check_glibc
484392

485-
# Set up GPG if available
486-
if [[ "$os" == "linux" ]]; then
487-
setup_gpg
488-
fi
489-
490393
# Get download information
491394
get_download_info
492395

@@ -510,12 +413,6 @@ main() {
510413
echo "2. Run: $COMMAND_NAME chat to start an interactive session"
511414
echo "3. Run: $COMMAND_NAME integrations install --help to install terminal integrations"
512415
echo
513-
514-
if [[ "$skip_gpg" == "true" ]]; then
515-
warning "GPG signature verification was skipped."
516-
echo " For enhanced security, install gpg and run this script again."
517-
echo
518-
fi
519416
}
520417

521418
# Run main function

0 commit comments

Comments
 (0)