Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snap support #225

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: xsos
version: "0.7.28"
summary: Summarize system info from sosreports
description:
The goal of xsos is to make it easy to instantaneously gather information
about a system together in an easy-to-read-summary, whether that system is the
localhost on which xsos is being run or a system for which you have an unpacked
sosreport.
.
There is tons of useful amazing instructive data available to normal users (not
to mention root) on a Linux system, but by design, this information is spread
out across myriad files. Some of it even requires commands to parse through.
.
xsos will attempt to make it easy, parsing and calculating and formatting data
from dozens of files (and commands) to give you a detailed overview about a
system, or -- if requested -- xsos will only parse one file (e.g. with --mem or
--cpu) or output from one command (e.g. with --ip or --ps).
.
New features are being added all the time -- see the tracker to have a look at
some of the things that are already in line to be worked on.
confinement: strict
grade: stable
base: core20
environment:
LC_ALL: C.UTF-8
LANG: C.UTF-8
LOCPATH: $SNAP_USER_DATA

apps:
xsos:
command: xsos
plugs: [home, removable-media]
parts:
xsos:
source: .
plugin: dump
stage-packages: [bsdmainutils, coreutils, locales-all, gawk]

5 changes: 4 additions & 1 deletion xsos
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#-------------------------------------------------------------------------------

# See https://github.com/ryran/xsos/issues/208
export LC_ALL=en_US.UTF-8
export LC_ALL=${LC_ALL:-en_US.UTF-8}

# Get version from line #2
version=$(sed '2q;d' $0)
Expand Down Expand Up @@ -3932,8 +3932,11 @@ COND_RUN() {


# Create sub tempdir in /dev/shm (tons of bash constructs use TMPDIR)
export TMPDIR=${TMPDIR:-""}
if [ -z '$TMPDIR' ]; then
[[ -d /dev/shm && -w /dev/shm ]] && parent=/dev/shm || parent=/tmp
export TMPDIR=$(mktemp -d -p $parent)
fi
# Create tmp file for capturing stderr
stderr_file=$TMPDIR/stderr
# Remove temp dir when we're done
Expand Down