Skip to content

Commit

Permalink
Use gzip (.gz) instead of bzip2 (.bz2) to compress logs (gh##1378)
Browse files Browse the repository at this point in the history
so that they can be atteched to GitHub issues
  • Loading branch information
mvidner committed Jun 28, 2024
1 parent e8ea0ef commit 2e9447d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust/agama-cli/src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const DEFAULT_PATHS: [&str; 14] = [
const DEFAULT_RESULT: &str = "/tmp/agama-logs";
// what compression is used by default:
// (<compression as distinguished by tar>, <an extension for resulting archive>)
const DEFAULT_COMPRESSION: (&str, &str) = ("bzip2", "tar.bz2");
const DEFAULT_COMPRESSION: (&str, &str) = ("gzip", "tar.gz");
const TMP_DIR_PREFIX: &str = "agama-logs.";

/// A wrapper around println which shows (or not) the text depending on the boolean variable
Expand Down
2 changes: 1 addition & 1 deletion rust/agama-server/src/manager/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,6 @@ async fn generate_logs() -> Result<String, Error> {
.status()
.map_err(|e| ServiceError::CannotGenerateLogs(e.to_string()))?;

let full_path = format!("{path}.tar.bz2");
let full_path = format!("{path}.tar.gz");
Ok(full_path)
}
2 changes: 1 addition & 1 deletion rust/package/agama.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ BuildRequires: pkgconfig(pam)
Requires: jsonnet
Requires: lshw
# required by "agama logs store"
Requires: bzip2
Requires: gzip
Requires: tar
# required for translating the keyboards descriptions
BuildRequires: xkeyboard-config-lang
Expand Down
2 changes: 1 addition & 1 deletion setup-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ which cargo || $SUDO zypper --non-interactive install cargo

# Packages required by Rust code (see ./rust/package/agama.spec)
$SUDO zypper --non-interactive install \
bzip2 \
clang-devel \
gzip \
jsonnet \
lshw \
pam-devel \
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/core/LogsButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Alert, Button } from "@patternfly/react-core";
import { Popup } from "~/components/core";
import { _ } from "~/i18n";

const FILENAME = "agama-installation-logs.tar.bzip2";
const FILENAME = "agama-installation-logs.tar.gz";

/**
* Button for collecting and downloading YaST logs
Expand Down

0 comments on commit 2e9447d

Please sign in to comment.