Add stx-postrun class

This commit is contained in:
babak sarashki 2019-10-17 12:44:45 -07:00
parent e87fb1cef7
commit 71392afcdc
2 changed files with 39 additions and 5 deletions

View File

@ -0,0 +1,26 @@
ROOTFS_POSTPROCESS_COMMAND += " stx_postprocess_rootfs"
stx_postprocess_rootfs() {
chmod -R go+r usr/lib/python2.7/site-packages/httpretty-0.9.5-py2.7.egg-info
sed -i -e 's/^\(ExecStartPre.*gencert.sh\)/#\1/g' lib/systemd/system/haproxy.service
rm etc/systemd/system/haproxy.service
sed -i -e 's/^physical_.*:eth0/physical_interface_mappings = provider:eno1/g' \
etc/neutron/plugins/ml2/linuxbridge_agent.ini
sed -i -e '/^l .*resolv.conf$/d' etc/default/volatiles/00_core
sed -i -e '/^f .*resolv.conf none$/d' etc/default/volatiles/00_core
cd etc
rm resolv.conf
ln -s resolv-conf.systemd resolv.conf
cd ..
systemctl --root=${D} disable apache2.service
systemctl --root=${D} disable cinder-volume.service
systemctl --root=${D} disable cinder-api.service
systemctl --root=${D} disable cinder-scheduler.service
systemctl --root=${D} disable cinder-backup.service
systemctl --root=${D} enable systemd-resolved.service
chown etcd:etcd var/lib/etcd
}

View File

@ -22,6 +22,19 @@ MACHINE_FEATURES_append += "efi"
#PACKAGE_CLASSES = "package_rpm"
#INHERIT += "sign_rpm_ext"
INHERIT += " stx-postrun"
INHERIT += " extrausers"
EXTRA_USERS_PARAMS = "\
useradd -p '' sysadmin; \
groupadd sysadmin; \
usermod -a -G sysadmin sysadmin; \
"
EXTRA_IMAGE_FEATURES += " empty-root-password"
EXTRA_IMAGE_FEATURES += " allow-empty-password"
EXTRA_IMAGE_FEATURES += " allow-root-login"
#SECURE_CORE_IMAGE_EXTRA_INSTALL ?= "\
# packagegroup-efi-secure-boot \
# packagegroup-tpm \
@ -63,11 +76,6 @@ LAYERDEPENDS_stx-layer = "\
secure-core \
selinux \
"
# tpm-layer
# openstack-compute-test-config-layer
## openstack-controller-test-config-layer
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_stx-version = "1"