Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit c9b13af
Merge: 34c12c7 9d32433
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Mar 26 10:05:09 2023 +0200

    Merge pull request stanislav-tkach#345 from Killavus/add_architecture_to_windows_info

    feat: Add architecture information for Windows targets

commit 9d32433
Author: Killavus <killavus@gmail.com>
Date:   Wed Mar 22 03:12:35 2023 +0100

    add architecture information for windows platforms

commit 34c12c7
Merge: 755ae48 4e92fef
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Mar 20 18:57:59 2023 +0100

    Merge pull request stanislav-tkach#341 from poliorcetics/winapi-to-windows-sys

    deps: Move from winapi to windows-sys

commit 755ae48
Merge: 5fbb59c 4601e95
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Mar 20 16:25:37 2023 +0100

    Merge pull request stanislav-tkach#344 from stanislav-tkach/release-3-7-0

    Release the 3.7.0 version

commit 4e92fef
Author: Alexis (Poliorcetics) Bourget <alexis.bourget@gmail.com>
Date:   Mon Mar 6 18:23:53 2023 +0100

    deps: Move from winapi to windows-sys

    `winapi` is in maintenance mode and the new blessed way to access Windows APIs are the `windows`
    and `windows-sys` crates. I don't think any types of `winapi` were exposed in the public API so
    I used `windows-sys` since it has much faster compile times.

commit 4601e95
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Mar 19 20:15:29 2023 +0100

    Update the changelog

commit 2b925cf
Merge: 9bf66a4 5fbb59c
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Mar 19 18:05:14 2023 +0100

    Merge branch 'master' into release-3-7-0

commit 5fbb59c
Merge: 4114330 24fcc88
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Mar 19 18:04:25 2023 +0100

    Merge pull request stanislav-tkach#340 from kholmanskikh/add-alpaquita-linux

    Add Alpaquita Linux

commit 9bf66a4
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Mar 19 17:09:16 2023 +0100

    Release the 3.7.0 version

commit 4114330
Merge: 9ccebce 4fa38e4
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Wed Mar 15 19:58:36 2023 +0100

    Merge pull request stanislav-tkach#343 from stanislav-tkach/dependabot/cargo/predicates-3

    Update predicates requirement from 2 to 3

commit 4fa38e4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Mar 15 14:59:15 2023 +0000

    Update predicates requirement from 2 to 3

    Updates the requirements on [predicates](https://github.com/assert-rs/predicates-rs) to permit the latest version.
    - [Release notes](https://github.com/assert-rs/predicates-rs/releases)
    - [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md)
    - [Commits](assert-rs/predicates-rs@v2.0.0...v3.0.0)

    ---
    updated-dependencies:
    - dependency-name: predicates
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit 9ccebce
Merge: 39c38f3 f156026
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Mar 13 11:42:02 2023 +0100

    Merge pull request stanislav-tkach#342 from codybloemhard/master

    Add support for Artix Linux

commit f156026
Author: Cody Bloemhard <codybloemhard@gmail.com>
Date:   Fri Mar 10 15:26:59 2023 +0100

    Add support for Artix Linux

commit 24fcc88
Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@bell-sw.com>
Date:   Wed Mar 1 17:00:43 2023 +0300

    Add Alpaquita Linux

    The distro does not ship LSB utils, so the LSB code path
    was tested with a manually built version of lsb-release-minimal
    from https://salsa.debian.org/gioele/lsb-release-minimal

commit 39c38f3
Merge: b9eef20 b0ec30a
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Feb 27 23:33:07 2023 +0100

    Merge pull request stanislav-tkach#338 from Arto-O/master

    Add support for Mabox, resolves stanislav-tkach#337

commit b9eef20
Merge: 7011ce4 3f303c8
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Feb 20 01:07:20 2023 +0100

    Merge pull request stanislav-tkach#336 from rbas/335-issue-add-processor-architecture-informations

    335 issue add processor architecture informations

commit b0ec30a
Author: Arto-O <arto.olli@live.com>
Date:   Sat Feb 18 15:09:25 2023 -0800

    Add support for Mabox

commit 3f303c8
Author: Martin Voldřich <rbas.cz@gmail.com>
Date:   Mon Feb 13 17:55:20 2023 +0100

    Fixing doc string

commit 1d4b260
Author: Martin Voldřich <rbas.cz@gmail.com>
Date:   Mon Feb 13 17:54:49 2023 +0100

    Adding information about architecture

commit 7011ce4
Merge: b12491e 5377003
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Jan 30 19:12:46 2023 +0100

    Merge pull request stanislav-tkach#332 from stanislav-tkach/release-3-6-0

    Release the 3.6.0 version

commit 5377003
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Jan 29 23:31:53 2023 +0100

    More fixes

commit 7fc22cb
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Jan 29 23:13:32 2023 +0100

    Fix clippy warnings

commit b377859
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Jan 29 23:04:53 2023 +0100

    Release the 3.6.0 version

commit b12491e
Merge: 4e1cf37 3416fb4
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Jan 23 13:45:21 2023 +0100

    Merge pull request stanislav-tkach#331 from meop/master

    add os-release match for Arch and Debian ARM

commit 3416fb4
Author: Marshall Porter <meoporter@gmail.com>
Date:   Fri Jan 20 09:10:43 2023 -0800

    add os-release match for Arch and Debian ARM

commit 4e1cf37
Merge: 5e42e34 c8f05e2
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sat Jan 7 00:14:29 2023 +0100

    Merge pull request stanislav-tkach#330 from stanislav-tkach/fix-fmt-and-spellcheck

    Fix formattin and add new words to the spellchecker dictionary

commit c8f05e2
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Fri Jan 6 22:30:06 2023 +0100

    Fix formattin and add new words to the spellchecker dictionary

commit 5e42e34
Merge: 75ef20a eb9977d
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Jan 1 22:20:08 2023 +0100

    Merge pull request stanislav-tkach#328 from leavelet/master

    Add openEuler and OpenCloudOS support

commit eb9977d
Author: leavelet <leavelet0@gmail.com>
Date:   Sat Dec 31 16:49:10 2022 +0800

    Add openEuler and OpenCloudOS tests

commit faad546
Author: leavelet <leavelet0@gmail.com>
Date:   Sat Dec 31 14:25:52 2022 +0800

    Add openEuler and OpenCloudOS support

commit 75ef20a
Merge: 3c2f3a3 e36d819
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Dec 25 01:14:54 2022 +0200

    Merge pull request stanislav-tkach#327 from stanislav-tkach/min-rust-version-in-toml

    Set minimal supported Rust version in the Cargo.toml file

commit e36d819
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Fri Dec 23 00:43:26 2022 +0100

    fix

commit 7e7619b
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Thu Dec 22 15:04:55 2022 +0100

    Min version 1.60

commit d337860
Merge: bbcd770 3c2f3a3
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Tue Dec 20 20:21:40 2022 +0200

    Merge branch 'master' into min-rust-version-in-toml

commit bbcd770
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Tue Dec 20 14:08:21 2022 +0100

    Update clap version

commit bfecffa
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Dec 18 09:23:16 2022 +0100

    Set minimal supported Rust version in the Cargo.toml file

commit 3c2f3a3
Merge: 4ee6bad 2ed9746
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sat Dec 17 21:44:50 2022 +0200

    Merge pull request stanislav-tkach#324 from stanislav-tkach/dependabot/cargo/clap-4

    Update clap requirement from 3 to 4

commit 2ed9746
Merge: 2263494 4ee6bad
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sat Dec 17 21:32:35 2022 +0200

    Merge branch 'master' into dependabot/cargo/clap-4

commit 4ee6bad
Merge: 7856ea2 5274e8c
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Nov 27 00:27:50 2022 +0100

    Merge pull request stanislav-tkach#326 from stanislav-tkach/dependabot/cargo/env_logger-0.10

    Update env_logger requirement from 0.9 to 0.10

commit 5274e8c
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Nov 25 14:02:26 2022 +0000

    Update env_logger requirement from 0.9 to 0.10

    Updates the requirements on [env_logger](https://github.com/rust-cli/env_logger) to permit the latest version.
    - [Release notes](https://github.com/rust-cli/env_logger/releases)
    - [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
    - [Commits](rust-cli/env_logger@v0.9.0...v0.10.0)

    ---
    updated-dependencies:
    - dependency-name: env_logger
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit 7856ea2
Merge: c79cd09 b566d38
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Nov 14 14:19:38 2022 +0100

    Merge pull request stanislav-tkach#325 from kianmeng/fix-typo

    Fix typo, explictly -> explicitly

commit b566d38
Author: Kian-Meng Ang <kianmeng@cpan.org>
Date:   Mon Nov 14 10:05:05 2022 +0800

    Fix typo, explictly -> explicitly

    Found via `typos --format brief`

commit 2263494
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Sep 29 14:10:58 2022 +0000

    Update clap requirement from 3 to 4

    Updates the requirements on [clap](https://github.com/clap-rs/clap) to permit the latest version.
    - [Release notes](https://github.com/clap-rs/clap/releases)
    - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
    - [Commits](clap-rs/clap@clap_complete-v3.0.0...v4.0.2)

    ---
    updated-dependencies:
    - dependency-name: clap
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit c79cd09
Merge: 268bb1c 4a13fa0
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Sep 19 19:05:07 2022 +0200

    Merge pull request stanislav-tkach#323 from stanislav-tkach/releas-3-5-1

    Release the 3.5.1 version

commit 4a13fa0
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Sep 19 18:54:55 2022 +0200

    1.45

commit 8e014d4
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Sep 19 14:51:44 2022 +0200

    Update minimal rust version

commit 10fc83b
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Sep 18 20:32:16 2022 +0200

    Release the 3.5.1 version

commit 268bb1c
Merge: 3dcf623 01713bf
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Aug 28 23:01:30 2022 +0200

    Merge pull request stanislav-tkach#322 from Guyutongxue/win-11

    Add Windows 11 support

commit 01713bf
Author: Guyutongxue <guyutongxue@163.com>
Date:   Sun Aug 21 14:20:00 2022 +0800

    Add Windows 11 support

commit 3dcf623
Merge: e3320f5 156063b
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Aug 1 16:48:06 2022 +0200

    Merge pull request stanislav-tkach#321 from stanislav-tkach/releas-3-5-0

    Releas the 3.5.0 version

commit 156063b
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Aug 1 14:17:43 2022 +0200

    Allow the unicode license

commit f915220
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Aug 1 14:16:23 2022 +0200

    Remove the doc test

commit b73bb8f
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Jul 31 11:36:29 2022 +0200

    Remove ignored doc-tests

commit ef3ee1b
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Jul 31 11:28:05 2022 +0200

    Release the 3.5.0 version

commit e3320f5
Merge: 01ed4ee e98db60
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Jul 24 01:03:46 2022 +0200

    Merge pull request stanislav-tkach#317 from exincore/improve-os-release-detection

    Fix linux file_release detection

commit e98db60
Author: exin <me@exin.xyz>
Date:   Mon Jul 18 15:01:49 2022 -0600

    Fix file_release inadequate testing

    * Refactor tests to have more operating system context

    * Add tests for more edge cases

    * Order tests alphabetically

commit 517e13e
Author: exin <me@exin.xyz>
Date:   Sat Jul 16 22:26:09 2022 -0600

    Refactor DISTRIBUTIONS order

commit b780ea4
Author: exin <me@exin.xyz>
Date:   Sat Jul 16 21:55:21 2022 -0600

    Fix cspell-dictionary

commit b9cf38d
Author: exin <me@exin.xyz>
Date:   Sat Jul 16 21:37:08 2022 -0600

    Fix file_release clippy warnings

commit 7d86cae
Author: exin <me@exin.xyz>
Date:   Wed Jul 13 20:31:52 2022 -0600

    Add ReleaseInfo documentation

commit 18e4e69
Author: exin <me@exin.xyz>
Date:   Sun Jul 10 15:34:05 2022 -0600

    Fix linux file_release detection

    * Fix retrieve function fails to fail

    * Fix Oracle Linux false positive condition

    * Refactor ReleaseInfo Matcher to function pointers

    * Refactor DISTRIBUTIONS to static

    * Add os-release match closure

    * Add ReleaseInfo fmt::Debug implementation and tests

    * Remove get_type function

    Closes stanislav-tkach#315

commit b59b672
Author: exin <me@exin.xyz>
Date:   Sat Jul 9 19:49:09 2022 -0500

    Remove Matcher::KeyValue match laziness

    Closes stanislav-tkach#316

commit 01ed4ee
Merge: 8ecb4df ab3a75c
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Mon Jun 20 13:36:09 2022 +0200

    Merge pull request stanislav-tkach#314 from tukanoidd/master

    Added Garuda Linux support

commit ab3a75c
Author: tukanoidd <tukanoid@outlook.com>
Date:   Fri Jun 17 22:59:46 2022 +0200

    Added Garuda Linux support

commit 8ecb4df
Merge: f255a61 fe86641
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Wed May 25 20:59:53 2022 +0200

    Merge pull request stanislav-tkach#311 from cuviper/os-release-rhel

    Improve RHEL detection in /etc/os-release

commit fe86641
Author: Josh Stone <cuviper@gmail.com>
Date:   Tue May 24 11:53:38 2022 -0700

    Improve RHEL detection in /etc/os-release

commit f255a61
Merge: c1385ff e65af14
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun May 22 19:28:30 2022 +0200

    Merge pull request stanislav-tkach#310 from stanislav-tkach/release-3-4-0

    Release the 3.4.0 version

commit e65af14
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sat May 21 23:25:22 2022 +0200

    Release the 3.4.0 version

commit c1385ff
Merge: 6d7a3e0 c0f9604
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Fri May 20 10:23:22 2022 +0200

    Merge pull request stanislav-tkach#309 from martintc/master

    Fix stanislav-tkach#308: Behavior break on FreeBSD to return Type::Unknown

commit c0f9604
Author: Todd Martin <toddmartin@Todds-MacBook-Air.local>
Date:   Wed May 18 18:52:23 2022 -0700

    Change generic OK to return Type::FreeBSD

commit 6d7a3e0
Merge: a80877c 5f19116
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Tue May 17 19:22:38 2022 +0200

    Merge pull request stanislav-tkach#307 from mt-inside/gentoo-linux

    Add detection of Gentoo Linux

commit 5f19116
Author: Matt Turner <user.personal@users.noreply.github.com>
Date:   Tue May 17 09:09:22 2022 +0000

    Add detection of Gentoo Linux

commit a80877c
Merge: 0a812b4 3b44fa6
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun May 1 22:19:30 2022 +0200

    Merge pull request stanislav-tkach#306 from stanislav-tkach/release-3-3-0

    Release the 3.3.0 version

commit 3b44fa6
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sat Apr 30 21:52:09 2022 +0200

    Release the 3.3.0 version

commit 0a812b4
Merge: 36c19ad 63f4239
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Wed Apr 27 18:11:13 2022 +0200

    Merge pull request stanislav-tkach#305 from martintc/Illumos

    Initial implementation of Illumos support

commit 63f4239
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 08:57:09 2022 -0700

    Correction, return Bitness::X32 when it see "32\n"

commit b317711
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 08:53:59 2022 -0700

    Add isainfo

commit ebc3b0e
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 08:50:01 2022 -0700

    Make use of isainfo for bitness

    uname and getconf do not report properly, but isainfo does

commit 18fb051
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 08:45:26 2022 -0700

    Make 'I' lowercase since this is illumos convention

commit 725203a
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:49:15 2022 -0700

    Add illumos

commit 45492bc
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:47:46 2022 -0700

    Format fixes

commit d109053
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:47:33 2022 -0700

    Add illumos to the readme

commit 9dfb195
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:44:09 2022 -0700

    Implement private function to get version on illumos

commit d4b3fae
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:44:00 2022 -0700

    Remove function uname for illumos

commit 6aed94e
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:41:44 2022 -0700

    Add a uname function specifically for illumos

commit 70c37c3
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:38:02 2022 -0700

    Add illumos targets

commit 1c71226
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:35:11 2022 -0700

    Try removing new line character

commit a219ea8
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:33:46 2022 -0700

    Add illumos to target list where deps are declared

commit 215ad21
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:12:18 2022 -0700

    Add a function for bitness detection on illumos

commit c38baef
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 01:12:07 2022 -0700

    Create file for illumos

commit 4a779ca
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 00:57:43 2022 -0700

    Create a display for illumos

commit a9260f8
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 25 00:56:24 2022 -0700

    Add Illumos to os types list

commit 36c19ad
Merge: e4b685e 30874b6
Author: Stanislav Tkach <stanislav.tkach@gmail.com>
Date:   Sun Apr 24 10:10:06 2022 +0200

    Merge pull request stanislav-tkach#303 from martintc/fix-issue-300

    Fix issue 300

commit 30874b6
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 11 03:15:58 2022 -0700

    format fixing

commit b684911
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 11 03:09:28 2022 -0700

    Removed a trim and created default cases

commit 3f4605f
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 11 03:05:35 2022 -0700

    Add back in newline escape characters

commit d867959
Author: Todd Martin <kj4ntv@gmail.com>
Date:   Mon Apr 11 02:59:41 2022 -0700

    Use result type instead of unwrapping value
  • Loading branch information
JasonHonor committed Apr 21, 2023
1 parent f280d2b commit 314b535
Show file tree
Hide file tree
Showing 57 changed files with 944 additions and 269 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
# Feel free to bump this version if you need features of newer Rust.
# Sync with badge in README.md
toolchain: 1.41.0
toolchain: 1.60.0
profile: minimal
override: true

Expand Down
54 changes: 53 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,6 +4,52 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [3.7.0] (2023-03-20)

- Information about a processor's architecture has been added. (#336)

- Mabox Linux support has been added. (#338)

- Alpaquita Linux support has been added. (#340)

- Artix Linux support has been added. (#342)

## [3.6.0] (2023-01-30)

- OpenCloudOS support has been added. (#328)

- openEuler support has been added. (#328)

- Arch Linux ARM and Debian ARM detection has been improved. (#331)

## [3.5.1] (2022-09-19)

- Windows 11 detection has been fixed. (#322)

## [3.5.0] (2022-08-01)

- Red Hat Enterprise Linux detection has been improved. (#311)

- Garuda Linux support has been added. (#314)

- The operating system detection from the release files has been improved. (#317)

## [3.4.0] (2022-05-22)

- Gentoo Linux support has been added. (#307)

- FreeSBD detection has been fixed. (#309)

## [3.3.0] (2022-05-01)

- Fedora 35 (without `lsb_release`) detection has been fixed. (#293)

- HardenedBSD support has been added. (#295)

- Mariner support has been added. (#299)

- Illumos support has been added. (#305)

## [3.2.0] (2022-02-04)

- MidnightBSD support has been added. (#290)
Expand Down Expand Up @@ -245,7 +291,13 @@ All notable changes to this project will be documented in this file.

The first release containing only minor infrastructural changes and based on [os_type](https://github.com/schultyy/os_type).

[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.2.0...HEAD
[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.7.0...HEAD
[3.7.0]: https://github.com/stanislav-tkach/os_info/compare/v3.6.0...v3.7.0
[3.6.0]: https://github.com/stanislav-tkach/os_info/compare/v3.5.1...v3.6.0
[3.5.1]: https://github.com/stanislav-tkach/os_info/compare/v3.5.0...v3.5.1
[3.5.0]: https://github.com/stanislav-tkach/os_info/compare/v3.4.0...v3.5.0
[3.4.0]: https://github.com/stanislav-tkach/os_info/compare/v3.3.0...v3.4.0
[3.3.0]: https://github.com/stanislav-tkach/os_info/compare/v3.2.0...v3.3.0
[3.2.0]: https://github.com/stanislav-tkach/os_info/compare/v3.1.0...v3.2.0
[3.1.0]: https://github.com/stanislav-tkach/os_info/compare/v3.0.9...v3.1.0
[3.0.9]: https://github.com/stanislav-tkach/os_info/compare/v3.0.8...v3.0.9
Expand Down
15 changes: 11 additions & 4 deletions README.md
Expand Up @@ -12,7 +12,7 @@

**Project details:**
[![LoC](https://tokei.rs/b1/github/stanislav-tkach/os_info)](https://github.com/stanislav-tkach/os_info)
![Rust 1.41+ required](https://img.shields.io/badge/rust-1.41+-blue.svg?label=Required%20Rust)
![Rust 1.60+ required](https://img.shields.io/badge/rust-1.41+-blue.svg?label=Required%20Rust)

## Overview

Expand Down Expand Up @@ -45,12 +45,13 @@ os_info = { version = "3", default-features = false }
let info = os_info::get();

// Print full information:
println!("OS information: {}", info);
println!("OS information: {info}");

// Print information separately:
println!("Type: {}", info.os_type());
println!("Version: {}", info.version());
println!("Bitness: {}", info.bitness());
println!("Architecture: {}", info.architecture());
```

### Command line tool (`os_info_cli`)
Expand Down Expand Up @@ -78,30 +79,36 @@ os_info --help

Right now, the following operating system types can be returned:

- Alpaquita Linux
- Alpine Linux
- Amazon Linux AMI
- Android
- Arch Linux
- Artix Linux
- CentOS
- Debian
- DragonFly BSD
- Emscripten
- EndeavourOS
- Fedora
- FreeBSD
- Garuda Linux
- Gentoo Linux
- HardenedBSD
- Illumos
- Linux
- Linux Mint
- macOS (Mac OS X or OS X)
- Manjaro
- Mariner
- MidnightBSD
- Mint
- NetBSD
- NixOS
- OpenBSD
- openSUSE
- Oracle Linux
- Pop!_OS
- Raspberry OS
- Raspberry Pi OS
- Red Hat Linux
- Red Hat Enterprise Linux
- Redox
Expand Down
9 changes: 5 additions & 4 deletions cli/Cargo.toml
Expand Up @@ -11,17 +11,18 @@ keywords = ["cli", "os", "os_type", "os_version", "os_info"]
categories = ["command-line-interface", "os"]
license = "MIT"
edition = "2018"
rust-version = "1.60"

[[bin]]
name = "os_info"
path = "src/main.rs"

[dependencies]
os_info = { version = "3.2.0", default-features = false, path = "../os_info" }
os_info = { version = "3.7.0", default-features = false, path = "../os_info" }
log = "0.4.5"
env_logger = "0.9"
clap = { version = "3", features = ["derive"] }
env_logger = "0.10"
clap = { version = "4", features = ["derive"] }

[dev-dependencies]
assert_cmd = "2"
predicates = "2"
predicates = "3"
22 changes: 22 additions & 0 deletions cspell-dictionary.txt
@@ -1,23 +1,41 @@
aarch64
almalinux
alpaquita
antergos
aosc
archarm
artix
bitness
centos
clippy
clearos
concat
coreos
devuan
earmv
emscripten
endeavouros
freebsd
garuda
hardenedbsd
hbsd
illumos
isainfo
libntdll
linuxmint
mabox
macos
mageia
manjaro
midnightbsd
msvc
musl
netbsd
nixos
openbsd
opencloudos
openeuler
opensuse
println
raspberry
raspbian
Expand All @@ -28,5 +46,9 @@ serde
structopt
toml
ulyana
virtuozzo
winapi
xbian
xenenterprise
xenial
xenserver
5 changes: 3 additions & 2 deletions deny.toml
Expand Up @@ -66,14 +66,15 @@ ignore = [
[licenses]
# The lint level for crates which do not have a detectable license
unlicensed = "deny"
# List of explictly allowed licenses
# List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
allow = [
"MIT",
"Apache-2.0",
"Unicode-DFS-2016",
]
# List of explictly disallowed licenses
# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
deny = [
Expand Down
13 changes: 11 additions & 2 deletions os_info/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "os_info"
version = "3.2.0"
version = "3.7.0"
authors = ["Jan Schulte <hello@unexpected-co.de>", "Stanislav Tkach <stanislav.tkach@gmail.com>"]
description = "Detect the operating system type and version."
documentation = "https://docs.rs/os_info"
Expand All @@ -11,6 +11,7 @@ keywords = ["os", "os_type", "os_version", "os_info"]
categories = ["os"]
license = "MIT"
edition = "2018"
rust-version = "1.60"

[features]
default = ["serde"]
Expand All @@ -20,7 +21,15 @@ log = "0.4.5"
serde = { version = "1", features = ["derive"], optional = true }

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.8", features = ["minwindef", "ntdef", "ntstatus", "sysinfoapi", "winnt", "winuser", "libloaderapi", "processthreadsapi", "winerror", "winreg"] }
windows-sys = { version = "0.45", features = [
"Win32_Foundation",
"Win32_System_Diagnostics_Debug",
"Win32_System_LibraryLoader",
"Win32_System_SystemInformation",
"Win32_UI_WindowsAndMessaging",
"Win32_System_Registry",
"Win32_System_SystemServices",
]}

[dev-dependencies]
pretty_assertions = "1"
Expand Down
3 changes: 2 additions & 1 deletion os_info/examples/print_version.rs
Expand Up @@ -2,12 +2,13 @@ fn main() {
let info = os_info::get();

// Print full information:
println!("OS information: {}", info);
println!("OS information: {info}");

// Print information separately:
println!("Type: {}", info.os_type());
println!("Version: {}", info.version());
println!("Edition: {:?}", info.edition());
println!("Codename: {:?}", info.codename());
println!("Bitness: {}", info.bitness());
println!("Architecture: {:?}", info.architecture());
}
32 changes: 32 additions & 0 deletions os_info/src/architecture.rs
@@ -0,0 +1,32 @@
use std::process::Command;

use log::error;

pub fn get() -> Option<String> {
Command::new("uname")
.arg("-m")
.output()
.map_err(|e| {
error!("Cannot invoke 'uname` to get architecture type: {:?}", e);
})
.ok()
.and_then(|out| {
if out.status.success() {
Some(String::from_utf8_lossy(&out.stdout).trim_end().to_owned())
} else {
log::error!("'uname' invocation error: {:?}", out);
None
}
})
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn uname_nonempty() {
let val = get().expect("uname failed");
assert!(!val.is_empty());
}
}
10 changes: 10 additions & 0 deletions os_info/src/bitness.rs
Expand Up @@ -4,6 +4,7 @@ use std::fmt::{self, Display, Formatter};
#[cfg(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "illumos",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
Expand Down Expand Up @@ -78,6 +79,15 @@ pub fn get() -> Bitness {
}
}

#[cfg(target_os = "illumos")]
pub fn get() -> Bitness {
match &Command::new("isainfo").arg("-b").output() {
Ok(Output { stdout, .. }) if stdout == b"64\n" => Bitness::X64,
Ok(Output { stdout, .. }) if stdout == b"32\n" => Bitness::X32,
_ => Bitness::Unknown,
}
}

#[cfg(all(
test,
any(
Expand Down
16 changes: 9 additions & 7 deletions os_info/src/freebsd/mod.rs
Expand Up @@ -29,19 +29,21 @@ fn get_os() -> Type {
.output()
.expect("Failed to get OS");

match str::from_utf8(&os.stdout).unwrap() {
"FreeBSD\n" => {
match str::from_utf8(&os.stdout) {
Ok("FreeBSD\n") => {
let check_hardening = Command::new("sysctl")
.arg("hardening.version")
.output()
.expect("Failed to check if is hardened");
match str::from_utf8(&check_hardening.stderr).unwrap() {
"" => return Type::HardenedBSD,
_ => return Type::FreeBSD,
match str::from_utf8(&check_hardening.stderr) {
Ok("0\n") => Type::HardenedBSD,
Ok(_) => Type::FreeBSD,
Err(_) => Type::FreeBSD,
}
}
"MidnightBSD\n" => Type::MidnightBSD,
_ => Type::Unknown,
Ok("MidnightBSD\n") => Type::MidnightBSD,
Ok(_) => Type::Unknown,
Err(_) => Type::Unknown,
}
}

Expand Down

0 comments on commit 314b535

Please sign in to comment.