diff --git a/generateDummyFiles.sh b/generateDummyFiles.sh deleted file mode 100755 index 5931277e..00000000 --- a/generateDummyFiles.sh +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/sh - -rm -rf chroot -mkdir -p chroot/etc -mkdir -p chroot/etc/NetworkManager/conf.d -mkdir -p chroot/etc/security -mkdir -p chroot/etc/sysconfig -mkdir -p chroot/install/custom/netboot - -touch chroot/etc/exports - -cat > chroot/etc/hosts << EOF -127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 -::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 -EOF - -cat > chroot/etc/os-release << EOF -NAME="Oracle Linux Server" -VERSION="8.5" -ID="ol" -ID_LIKE="fedora" -VARIANT="Server" -VARIANT_ID="server" -VERSION_ID="8.5" -PLATFORM_ID="platform:el8" -PRETTY_NAME="Oracle Linux Server 8.5" -ANSI_COLOR="0;31" -CPE_NAME="cpe:/o:oracle:linux:8:5:server" -HOME_URL="https://linux.oracle.com/" -BUG_REPORT_URL="https://bugzilla.oracle.com/" - -ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8" -ORACLE_BUGZILLA_PRODUCT_VERSION=8.5 -ORACLE_SUPPORT_PRODUCT="Oracle Linux" -ORACLE_SUPPORT_PRODUCT_VERSION=8.5 -EOF - -cat > chroot/etc/chrony.conf << EOF -# Use public servers from the pool.ntp.org project. -# Please consider joining the pool (http://www.pool.ntp.org/join.html). -pool 2.pool.ntp.org iburst - -# Record the rate at which the system clock gains/losses time. -driftfile /var/lib/chrony/drift - -# Allow the system clock to be stepped in the first three updates -# if its offset is larger than 1 second. -makestep 1.0 3 - -# Enable kernel synchronization of the real-time clock (RTC). -rtcsync - -# Enable hardware timestamping on all interfaces that support it. -#hwtimestamp * - -# Increase the minimum number of selectable sources required to adjust -# the system clock. -#minsources 2 - -# Allow NTP client access from local network. -#allow 192.168.0.0/16 - -# Serve time even if not synchronized to a time source. -#local stratum 10 - -# Specify file containing keys for NTP authentication. -keyfile /etc/chrony.keys - -# Get TAI-UTC offset and leap seconds from the system tz database. -leapsectz right/UTC - -# Specify directory for log files. -logdir /var/log/chrony - -# Select which information is logged. -#log measurements statistics tracking -EOF - -cat > chroot/etc/security/limits.conf << EOF -# /etc/security/limits.conf -# -#This file sets the resource limits for the users logged in via PAM. -#It does not affect resource limits of the system services. -# -#Also note that configuration files in /etc/security/limits.d directory, -#which are read in alphabetical order, override the settings in this -#file in case the domain is the same or more specific. -#That means for example that setting a limit for wildcard domain here -#can be overriden with a wildcard setting in a config file in the -#subdirectory, but a user specific setting here can be overriden only -#with a user specific setting in the subdirectory. -# -#Each line describes a limit for a user in the form: -# -# -# -#Where: -# can be: -# - a user name -# - a group name, with @group syntax -# - the wildcard *, for default entry -# - the wildcard %, can be also used with %group syntax, -# for maxlogin limit -# -# can have the two values: -# - "soft" for enforcing the soft limits -# - "hard" for enforcing hard limits -# -# can be one of the following: -# - core - limits the core file size (KB) -# - data - max data size (KB) -# - fsize - maximum filesize (KB) -# - memlock - max locked-in-memory address space (KB) -# - nofile - max number of open file descriptors -# - rss - max resident set size (KB) -# - stack - max stack size (KB) -# - cpu - max CPU time (MIN) -# - nproc - max number of processes -# - as - address space limit (KB) -# - maxlogins - max number of logins for this user -# - maxsyslogins - max number of logins on the system -# - priority - the priority to run user process with -# - locks - max number of file locks the user can hold -# - sigpending - max number of pending signals -# - msgqueue - max memory used by POSIX message queues (bytes) -# - nice - max nice priority allowed to raise to values: [-20, 19] -# - rtprio - max realtime priority -# -# -# - -#* soft core 0 -#* hard rss 10000 -#@student hard nproc 20 -#@faculty soft nproc 20 -#@faculty hard nproc 50 -#ftp hard nproc 0 -#@student - maxlogins 4 - -# End of file -EOF - -cat > chroot/etc/sysconfig/selinux << EOF - -# This file controls the state of SELinux on the system. -# SELINUX= can take one of these three values: -# enforcing - SELinux security policy is enforced. -# permissive - SELinux prints warnings instead of enforcing. -# disabled - No SELinux policy is loaded. -SELINUX=enforcing -# SELINUXTYPE= can take one of these three values: -# targeted - Targeted processes are protected, -# minimum - Modification of targeted policy. Only selected processes are protected. -# mls - Multi Level Security protection. -SELINUXTYPE=targeted - - -EOF - diff --git a/setupDevEnvironment.sh b/setupDevEnvironment.sh index 70ce8102..d5e6fda8 100755 --- a/setupDevEnvironment.sh +++ b/setupDevEnvironment.sh @@ -10,6 +10,7 @@ # Stop execution in case of any error (add x for debugging) set -e +os_version=$(rpm -E %{rhel}) # OS relevant settings redhat() { @@ -19,12 +20,24 @@ redhat() { } rocky() { - dnf config-manager --set-enabled powertools + if [ "$os_version" == "8" ]; then + repo_name="powertools" + elif [ "$os_version" == "9" ]; then + repo_name="crb" + fi + + dnf config-manager --set-enabled "$repo_name" dnf -y install epel-release } almalinux() { - dnf config-manager --set-enabled powertools + if [ "$os_version" == "8" ]; then + repo_name="powertools" + elif [ "$os_version" == "9" ]; then + repo_name="crb" + fi + + dnf config-manager --set-enabled "$repo_name" dnf -y install epel-release } @@ -59,11 +72,12 @@ case $(cut -f 3 -d : /etc/system-release-cpe) in esac # Build toolset and packages -dnf -y install git cmake ccache llvm-toolset compiler-rt gcc-toolset-12\* +dnf -y install git cmake ccache llvm-toolset compiler-rt gcc-toolset-12 python3-pip\* pip3 install --user conan +pip3 install numpy # Required libraries -dnf -y install newt-devel +dnf -y install newt-devel cppcheck echo echo Development tools, packages and libraries were installed on your system.