Skip to content

Commit

Permalink
Put in earplugs
Browse files Browse the repository at this point in the history
  • Loading branch information
zzkt committed Apr 14, 2024
1 parent ff9e92d commit f703baa
Showing 1 changed file with 184 additions and 0 deletions.
184 changes: 184 additions & 0 deletions channel/zzkt/packages/lynis.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
;;; GNU Guix --- Functional package management for G->NU
;;; Copyright © 2012-2024 Ludovic Courtès <[email protected]>
;;; Copyright © 2013 Cyril Roelandt <[email protected]>
;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <[email protected]>
;;; Copyright © 2014, 2015-2018, 2020-2023 Eric Bavier <[email protected]>
;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <[email protected]>
;;; Copyright © 2015 Alex Sassmannshausen <[email protected]>
;;; Copyright © 2015 Eric Dvorsak <[email protected]>
;;; Copyright © 2016, 2017, 2020 Leo Famulari <[email protected]>
;;; Copyright © 2016 Pjotr Prins <[email protected]>
;;; Copyright © 2016, 2017, 2023 Ricardo Wurmus <[email protected]>
;;; Copyright © 2016-2023 Efraim Flashner <[email protected]>
;;; Copyright © 2016 Peter Feigl <[email protected]>
;;; Copyright © 2016 John J. Foerch <[email protected]>
;;; Copyright © 2016, 2017 Nikita <[email protected]>
;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <[email protected]>
;;; Copyright © 2016 John Darrington <[email protected]>
;;; Copyright © 2017 Ben Sturmfels <[email protected]>
;;; Copyright © 2017 Ethan R. Jones <[email protected]>
;;; Copyright © 2017 Christine Lemmer-Webber <[email protected]>
;;; Copyright © 2017, 2018, 2020 Marius Bakke <[email protected]>
;;; Copyright © 2018, 2019 Arun Isaac <[email protected]>
;;; Copyright © 2018 Pierre-Antoine Rouby <[email protected]>
;;; Copyright © 2018 Rutger Helling <[email protected]>
;;; Copyright © 2018 Pierre Neidhardt <[email protected]>
;;; Copyright © 2019 Brett Gilio <[email protected]>
;;; Copyright © 2019,2020 Björn Höfling <[email protected]>
;;; Copyright © 2019 Jakob L. Kreuze <[email protected]>
;;; Copyright © 2019 Hartmut Goebel <[email protected]>
;;; Copyright © 2019 Alex Griffin <[email protected]>
;;; Copyright © 2019, 2021, 2022 Guillaume Le Vaillant <[email protected]>
;;; Copyright © 2019, 2020, 2021 Mathieu Othacehe <[email protected]>
;;; Copyright © 2020 Oleg Pykhalov <[email protected]>
;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <[email protected]>
;;; Copyright © 2020, 2021, 2022 Michael Rohleder <[email protected]>
;;; Copyright © 2020 Vincent Legoll <[email protected]>
;;; Copyright © 2020 Morgan Smith <[email protected]>
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
;;; Copyright © 2021, 2023 Zheng Junjie <[email protected]>
;;; Copyright © 2021 Stefan Reichör <[email protected]>
;;; Copyright © 2021 qblade <[email protected]>
;;; Copyright © 2021 Hyunseok Kim <[email protected]>
;;; Copyright © 2021 David Larsson <[email protected]>
;;; Copyright © 2021 WinterHound <[email protected]>
;;; Copyright © 2021 Brice Waegeneire <[email protected]>
;;; Copyright © 2021 Maxime Devos <[email protected]>
;;; Copyright © 2021 muradm <[email protected]>
;;; Copyright © 2021 pineapples <[email protected]>
;;; Copyright © 2021 Petr Hodina <[email protected]>
;;; Copyright © 2021 Artyom V. Poptsov <[email protected]>
;;; Copyright © 2022 Wamm K. D. <[email protected]>
;;; Copyright © 2022 Roman Riabenko <[email protected]>
;;; Copyright © 2022 Petr Hodina <[email protected]>
;;; Copyright © 2022 Andreas Rammhold <[email protected]>
;;; Copyright © 2022 ( <[email protected]>
;;; Copyright © 2022, 2023 Matthew James Kraai <[email protected]>
;;; Copyright © 2022 jgart <[email protected]>
;;; Copyright © 2023 Juliana Sims <[email protected]>
;;; Copyright © 2023 Lu Hui <[email protected]>
;;; Copyright © 2023 Yovan Naumovski <[email protected]>
;;; Copyright © 2023 Alexey Abramov <[email protected]>
;;; Copyright © 2023 Bruno Victal <[email protected]>
;;; Copyright © 2023 Tobias Kortkamp <[email protected]>
;;; Copyright © 2023 Jaeme Sifat <[email protected]>
;;; Copyright © 2023 Nicolas Graves <[email protected]>
;;; Copyright © 2023 Tomás Ortín Fernández <[email protected]>
;;; Copyright © 2024 dan <[email protected]>
;;;
;;; This file is not (yet) part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.

;; as seen near
;; https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/admin.scm#n4740


;; lynis 3.1.1
;; https://github.com/CISOfy/lynis/commit/60afce6d8110ee9e88ac9e9d0e0346b1cf222b5e

;; lynis-sdk 3.1.1
;; https://github.com/CISOfy/lynis-sdk/commit/f4f885f1f049f59940487a6ffc2d53806c729d12

(define-module (zzkt packages lynis)
#:use-module (guix)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu))

(define-public lynis
(package
(name "lynis")
;; Also update the ‘lynis-sdk’ input to the commit matching this release.
(version "3.1.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/CISOfy/lynis")
(commit "60afce6d8110ee9e88ac9e9d0e0346b1cf222b5e")))
(file-name (git-file-name name version))
(sha256
(base32 "05bh16i916xz9w8p8fz8flzj9ayyzg7wpbi7q61ylrlahhc03nqd"))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove proprietary plugins. As of now, all plugins supplied with
;; lynis are proprietary. In the future, if free plugins are
;; provided, whitelist them from deletion.
(for-each delete-file (find-files "plugins"))))))
(build-system gnu-build-system)
(native-inputs
`(;; For tests
("lynis-sdk"
,(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/CISOfy/lynis-sdk")
(commit "f4f885f1f049f59940487a6ffc2d53806c729d12")))
(file-name (git-file-name "lynis-sdk" version))
(sha256
(base32 "09d98wmvan7nlchm056kls5xm939d1231pwsvlp4q2aznz8cmg42"))))))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(replace 'unpack
;; XXX Remove after fixing <https://issues.guix.gnu.org/55287>.
(lambda* (#:key source #:allow-other-keys)
(mkdir "source")
(chdir "source")
(copy-recursively source "."
#:keep-mtime? #t)))
(replace 'configure
(lambda _
(substitute* "lynis"
(("/usr/share/lynis")
(string-append #$output "/share/lynis")))
(substitute* "include/functions"
(("/usr/local/etc/lynis")
(string-append #$output "/etc/lynis")))))
(delete 'build)
(replace 'install
(lambda _
(install-file "lynis" (string-append #$output "/bin/"))
(install-file "default.prf" (string-append #$output "/etc/lynis"))
(for-each
(lambda (dir)
(copy-recursively
dir (string-append #$output "/share/lynis/" dir)))
(list "db" "include" "plugins"))
(install-file "lynis.8"
(string-append #$output "/share/man/man8"))))
(replace 'check
(lambda _
(copy-recursively #$(this-package-native-input "lynis-sdk")
"../lynis-sdk")
(setenv "LANG" "en_US.UTF-8")
(let ((lynis-dir (getcwd)))
(with-directory-excursion "../lynis-sdk"
(substitute* "config"
(("\\.\\./lynis") lynis-dir))
(substitute* "unit-tests/tests-language-translations.sh"
(("\\.\\./lynis") lynis-dir))
(invoke "sh" "lynis-devkit" "run" "unit-tests"))))))))
(home-page "https://cisofy.com/lynis/")
(synopsis "Security auditing tool")
(description "Lynis is a security auditing tool. It performs an in-depth
security scan and runs on the system itself. The primary goal is to test
security defenses and provide tips for further system hardening. It will also
scan for general system information, vulnerable software packages, and
possible configuration issues.")
(license license:gpl3+)))

0 comments on commit f703baa

Please sign in to comment.