Comments (1)
Given that we were trying to build DSC on a newer platform (rocky8), we decided to try to build DSC from source.
We followed the following guide,
https://github.com/microsoft/PowerShell-DSC-for-Linux
and performed the following steps:
-
Install the RPM repos that are used for the installation
a. We Install the dnf-plugins support and enable the EPEL repo.
(Which is the fedora build of Extra Packages for Enterprise Linux)
NOTE: wget and tar are included to support Visual Studio code
/usr/bin/dnf -y install dnf-plugins-core epel-release wget tar -
Enable the Powertools and Development Tools and install the pre-requisite rpms.
/usr/bin/dnf config-manager --set-enabled powertools
/usr/bin/dnf -y groupinstall 'Development Tools'
/usr/bin/dnf -y install pam-devel openssl-devel python39 python39-devel libicu gssntlmssp unzip mlocate gcc-c++ make redhat-lsb-core
ln -s /usr/bin/python3 /usr/bin/python
- Disable selinux
sed -i s/SELINUX=enforcing/SELINUX=permissive/ /etc/sysconfig/selinux
setenforce permissive
- Install the powershell.
wget https://github.com/PowerShell/PowerShell/releases/download/v7.1.4/powershell-7.1.4-1.centos.8.x86_64.rpm
rpm -Uvh *.rpm && rm *.rpm
We then performed the following steps from the following online build steps:
(https://github.com/microsoft/PowerShell-DSC-for-Linux#building-and-using-dsc-and-omi-from-source)
Starting at building and using dsc and omi from source (see link above), we ran the following steps
- git clone the DSC source
git clone https://github.com/Microsoft/PowerShell-DSC-for-Linux.git
cd PowerShell-DSC-for-Linux
-
Place the OMI source where DSC expects it alternatively clone from Git and symlink to omi/Unix
wget https://github.com/microsoft/omi/archive/refs/tags/v1.6.8-1.tar.gz
tar xzf v1.6.8-1.tar.gz -
Build OMI in developer mode
cd omi-1.6.8-1/Unix/
./configure --dev
make -j
After running the make, we get the following errors in our build:
injector.cpp: In function ‘long unsigned int InjectorSetup()’:
injector.cpp:468:70: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class TestSystem::Globals’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
memcpy(g_globals, &g_tempGlobals, sizeof(TestSystem::Globals));
^
In file included from injector.cpp:10:
../../nits/base/Globals.h:230:7: note: ‘class TestSystem::Globals’ declared here
class Globals
^~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [../../mak/rules.mak:486: /root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/output/obj/nits/injector/injector.o] Error 1
make[3]: Leaving directory '/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/nits/injector'
make[2]: *** [../mak/rules.mak:421: all] Error 2
make[2]: Leaving directory '/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/nits'
make[1]: *** [/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/mak/rules.mak:421: all] Error 2
make[1]: Leaving directory '/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix'
make: *** [GNUmakefile:38: all] Error 2
from powershell-dsc-for-linux.
Related Issues (20)
- No Restriction to Root Group
- Module signature validation is enabled by default
- Clarify core C library version requirements.
- selinux prevents logroate on omsconfig logs
- prefer python3 over python2 HOT 4
- Question -OMS and DSC installation for Rhel8.2 HOT 1
- DSC Engine Error for RHEL8.2
- Question : Using nxService resource we can reload systemd services ?
- DSC Extension for linux. Error in the dsc.py
- nxFile doesn't create file if it's deleted HOT 1
- Getting error Could not find the type of DSC resource class MSFT_nxPackageResource. HOT 1
- DSC limited to 23KB even w/ partial conf
- dsc v1.2.4 does not run to completion when a SetScript (from nxScript) returns non-zero exit code
- Received "Two successive configuration applications from OMS Settings failed" error on linux server with OMS agent
- periodic dsc_host segfault HOT 1
- Support for Oracle Linux 8
- Kali command lines
- Git-DsCResource not working after updating pwsh to 7.4 HOT 1
- Linux NX module DSC issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powershell-dsc-for-linux.