From 01a2978d1de0c5dfba47cb53248e6ed849b97271 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Oct 2024 11:01:51 +0200 Subject: [PATCH] Added Vagrantfiles for centos_9 and rocky_9 --- os/centos/stream9/Vagrantfile | 17 +++++----- os/rocky_linux/Vagrantfile | 59 +++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 os/rocky_linux/Vagrantfile diff --git a/os/centos/stream9/Vagrantfile b/os/centos/stream9/Vagrantfile index 5c5f5ae..b798a60 100755 --- a/os/centos/stream9/Vagrantfile +++ b/os/centos/stream9/Vagrantfile @@ -24,7 +24,8 @@ Vagrant.configure("2") do |config| config.vm.provider "virtualbox" do |vb| # Display the VirtualBox GUI when booting the machine - vb.gui = true + vb.gui = false + vb.memory=8024 # Fix for 'SSH auth method: Private key' stuck vb.customize ["modifyvm", :id, "--cableconnected1", "on"] @@ -38,23 +39,23 @@ Vagrant.configure("2") do |config| export DISTRO=centos09 export BUILDDIR=${BASE}/${DISTRO} yum update - yum install -y gcc openssl-devel libcurl-devel pam-devel git rapidjson-devel cmake policycoreutils-devel checkpolicy rpm-build lsb-release + yum install -y gcc openssl-devel libcurl-devel pam-devel git rapidjson-devel cmake policycoreutils-devel checkpolicy rpm-build openssh # get dependencies - mkdir ${BUILDDIR} -p; cd ${BUILDDIR} + mkdir ${BUILDDIR} -p; cd ${BUILDDIR} git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git mkdir socket.io-client-cpp/build; cd socket.io-client-cpp/build cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release .. cmake --build . --target install # Build project - # Build project - cd ${BUILDDIR} - cmake -B rublon_ssh-build .. - cmake --build rublon_ssh-build -- -j - cmake --build rublon_ssh-build --target package -- -j + cd ${BUILDDIR} + cmake -B rublon_ssh-build .. + cmake --build rublon_ssh-build -- -j + cmake --build rublon_ssh-build --target package -- -j useradd -s /bin/bash -m bwi echo "bwi:bwi"|chpasswd + sudo yum install -y ./rublon_ssh-build/rublon*.rpm SHELL end diff --git a/os/rocky_linux/Vagrantfile b/os/rocky_linux/Vagrantfile new file mode 100644 index 0000000..3a400bc --- /dev/null +++ b/os/rocky_linux/Vagrantfile @@ -0,0 +1,59 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Default user +# ---------------------- +# login: vagrant +# pass: vagrant +Vagrant.configure("2") do |config| + # Basic configuration + config.vm.box = "generic/rocky9" + config.ssh.forward_agent = true + config.vm.provider "virtualbox" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + config.vm.network "public_network" + config.vm.synced_folder "../../", "/home/vagrant/Rublon-Linux" + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + + config.vm.provider "virtualbox" do |vb| + vb.memory = 8024 + # Display the VirtualBox GUI when booting the machine + vb.gui = false + # Fix for 'SSH auth method: Private key' stuck + vb.customize ["modifyvm", :id, "--cableconnected1", "on"] + end + + # Enable provisioning with a shell script. Additional provisioners such as + # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the + # documentation for more information about their specific syntax and use. + config.vm.provision "shell", inline: <<-SHELL + export BASE=/home/vagrant/Rublon-Linux + export DISTRO=rocky9 + export BUILDDIR=${BASE}/${DISTRO} + yum install -y epel-release + yum install -y gcc openssl-devel systemd-pam git cmake gcc-c++ rapidjson-devel wget pam-devel rpm-build libcurl-devel policycoreutils-python-utils + # get dependencies + mkdir ${BUILDDIR} -p; cd ${BUILDDIR} + git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git + cmake -B socket.io-build -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release socket.io-client-cpp + cmake --build socket.io-build --target install -- -j + + # Build project + cd ${BUILDDIR} + cmake -B rublon_ssh-build .. + cmake --build rublon_ssh-build -- -j + cmake --build rublon_ssh-build --target package -- -j + useradd -s /bin/bash -m bwi + echo "bwi:bwi"|chpasswd + sudo yum install -y ./rublon_ssh-build/rublon*.rpm + SHELL + +end +