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

Centos 8 'policycoreutils-python' dependency #54

Open
MedRayenn opened this issue Feb 4, 2022 · 3 comments
Open

Centos 8 'policycoreutils-python' dependency #54

MedRayenn opened this issue Feb 4, 2022 · 3 comments
Labels
3.8.0 Will get included in 3.8 bug Something isn't working

Comments

@MedRayenn
Copy link

After running

root# tar xzf taranis-$version.tar.gz taranis-$version/taranis-bootstrap
root# mv taranis-$version/taranis-bootstrap .
root# ./taranis-bootstrap taranis-$version.tar.gz

you need to change line 33 from 'policycoreutils-python' to 'python3-policycoreutils'
in :
/home/taranis/sources/taranis-$version/install/012.distribution-centos

and run again this command
root# ./taranis-bootstrap taranis-$version.tar.gz

@markov2
Copy link
Contributor

markov2 commented Feb 4, 2022

Thanks for your report. The installation scripts do need to support multiple versions of CentOS at the same time, and sometimes package names change. Therefore, I need to know how to discover the major version number of the OS.

I am not running CentOS myself. Can you please help me with a piece of logic? https://linuxconfig.org/how-to-check-centos-version shows different ways to find-out the major number of the release, but it is probably only output which contains the version number. Can you produce a short BASH script which says '8' on CentOS8 and '7' on CentOS7?

@MedRayenn
Copy link
Author

Hello, I may suggest this command :

  . /etc/os-release
echo $VERSION_ID

@markov2
Copy link
Contributor

markov2 commented Feb 5, 2022

I hope this works for next release

commit 4b4732fc671c6003e1b43dbb320a4d6b98bc33ab
Author: Mark Overmeer <mark@overmeer.net>
Date:   Sat Feb 5 22:22:54 2022 +0100

    issue #54 CentOS python3-policycoreutils

diff --git a/install/012.distribution-centos b/install/012.distribution-centos
index ff3aae88..367d09c8 100755
--- a/install/012.distribution-centos
+++ b/install/012.distribution-centos
@@ -4,7 +4,7 @@
 use warnings;
 use strict;
 
-use Taranis::Install::Bare   qw(is_centos);
+use Taranis::Install::Bare   qw(is_centos get_os_info);
 use Taranis::Install::CentOS qw(centos_packages);
 
 unless(is_centos) {
@@ -30,7 +30,18 @@ centos_packages
        'perl-CPAN',
        'perl-Data-Dumper',  # to be able to create the CPAN Config
        'perl-File-Remove',  # needed by "taranis install"
-       'policycoreutils-python',
        ;
 
+my $version = get_os_info->{VERSION_ID};
+if($version gt '8') {    # maybe not numeric
+       centos_packages
+               'python3-policycoreutils',
+       ;
+}
+else {
+       centos_packages
+               'policycoreutils-python',
+       ;
+}
+
 exit 0;

@markov2 markov2 added bug Something isn't working 3.8.0 Will get included in 3.8 labels Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8.0 Will get included in 3.8 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants