Workaround to enable os facter
Treat yocto(Poky) as centos in facter and puppet modules. Fake the OS release to CentOS 7. Obviously this must be removed prior to release. TODO: enable facter and puppet OS required support on poky
This commit is contained in:
@@ -45,6 +45,11 @@ stx_postprocess_rootfs() {
|
||||
done
|
||||
cd $CPWD
|
||||
|
||||
# Fake being redhat for dev purpose only. This must be removed
|
||||
cat > ${IMAGE_ROOTFS}/etc/redhat-release << \EOF
|
||||
CentOS Linux release 7.3.1611 (Core)
|
||||
EOF
|
||||
|
||||
cat > ${IMAGE_ROOTFS}/etc/build.info << \EOF
|
||||
OS="poky"
|
||||
SW_VERSION="19.01"
|
||||
|
||||
3
recipes-support/facter/facter_2.5.0.bbappend
Normal file
3
recipes-support/facter/facter_2.5.0.bbappend
Normal file
@@ -0,0 +1,3 @@
|
||||
FILESEXTRAPATHS_append := ":${THISDIR}/files:"
|
||||
|
||||
SRC_URI += " file://add_poky_lsbdistid.diff"
|
||||
12
recipes-support/facter/files/add_poky_lsbdistid.diff
Normal file
12
recipes-support/facter/files/add_poky_lsbdistid.diff
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -Nrupd a/lib/facter/operatingsystem/linux.rb b/lib/facter/operatingsystem/linux.rb
|
||||
--- a/lib/facter/operatingsystem/linux.rb 2019-11-03 14:24:10.987872906 -0800
|
||||
+++ b/lib/facter/operatingsystem/linux.rb 2019-11-03 14:25:31.222743152 -0800
|
||||
@@ -13,6 +13,8 @@ module Facter
|
||||
@operatingsystem ||= "Ubuntu"
|
||||
elsif lsbdistid == "LinuxMint"
|
||||
@operatingsystem ||= "LinuxMint"
|
||||
+ elsif lsbdistid == "poky"
|
||||
+ @operatingsystem ||= "CentOS"
|
||||
else
|
||||
@operatingsystem ||= get_operatingsystem_with_release_files
|
||||
end
|
||||
Reference in New Issue
Block a user