Add packages to rootfs and script to parse for missing packages.

Add needed packages to conf/layer.conf.
inspect.sh script:
(1) parse list of installed packages into pkg name and pkg version.
(2) update Packages_List_efforts.csv
This commit is contained in:
babak sarashki 2019-07-25 10:18:45 -07:00 committed by Saul Wold
parent b45d62f6bd
commit f60638b5cb
5 changed files with 1305 additions and 9 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
docs/reports
*.swp

View File

@ -9,6 +9,35 @@ BBFILE_COLLECTIONS += "starlingX-layer"
BBFILE_PATTERN_starlingX-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_starlingX-layer = "5"
DISTRO_FEATURES_append = " x11 opengl"
EXTRA_IMAGE_FEATURES_append = " x11-base"
VIRTUAL-RUNTIME_graphical_init_manager = "lxdm"
# INITRAMFS_IMAGE = "secure-core-image-initramfs"
DISTRO_FEATURES_NATIVE_append += "systemd ima tpm tpm2 efi-secure-boot luks"
DISTRO_FEATURES_append += "systemd ima tpm tpm2 efi-secure-boot luks"
#DISTRO_FEATURES_append += "systemd ima tpm tpm2 efi-secure-boot luks modsign"
MACHINE_FEATURES_NATIVE_append += "efi"
MACHINE_FEATURES_append += "efi"
#PACKAGE_CLASSES = "package_rpm"
#INHERIT += "sign_rpm_ext"
#SECURE_CORE_IMAGE_EXTRA_INSTALL ?= "\
# packagegroup-efi-secure-boot \
# packagegroup-tpm \
# packagegroup-tpm2 \
# packagegroup-ima \
# packagegroup-luks \
# "
# For iso image
#KERNEL_FEATURES += "features/overlayfs/overlayfs.scc"
#INITRAMFS_SCRIPTS = "initramfs-live-boot \
# initramfs-live-install \
# initramfs-live-install-efi \
# "
LAYERDEPENDS_starlingX-layer = "\
core \
networking-layer \
@ -68,7 +97,7 @@ IMAGE_INSTALL_append += " \
starlingx-dashboard \
packagegroup-stx-update \
packagegroup-stx-upstream \
packagegroup-stx-integ-base \
packagegroup-stx-integ \
lighttpd \
"
# playbookconfig
@ -78,3 +107,181 @@ IMAGE_INSTALL_append += " \
python-horizon \
python-keyring \
"
IMAGE_INSTALL_append = " \
tcpdump \
tzdata \
numactl \
samba \
mariadb \
traceroute \
wget \
expect \
boost \
alsa-lib \
collectd \
conntrack-tools \
dosfstools \
dracut \
drbd-utils \
efibootmgr \
efivar \
expat \
facter \
hwdata \
iscsi-initiator-utils \
isomd5sum \
jansson \
json-c \
kexec-tools \
keyutils \
libcgroup \
libdrm \
libedit \
libestr \
libev \
libgudev \
libibverbs \
libjpeg-turbo \
libndp \
oath \
libogg \
libpcap \
libpciaccess \
libpipeline \
libpng \
libproxy \
libpwquality \
libseccomp \
libsm \
libssh2 \
sysfsutils \
libteam \
libuser \
libutempter \
libvorbis \
cyrus-sasl \
ipmitool \
iperf3 \
iotop \
lsof \
lsscsi \
lz4 \
lzop \
mailcap \
mailx \
mdadm \
mod-wsgi \
mokutil \
mozjs \
mtools \
libnewt-python \
nss-pam-ldapd \
ntfs-3g-ntfsprogs \
openipmi \
openldap \
libopus \
ovmf-shell-efi \
p11-kit \
perf \
polkit \
popt \
pulseaudio \
python-pygpgme \
python-pyparted \
python-coverage \
python-docker-registry-core \
python-flask-restful \
python-mox3 \
python-pexpect \
python-ptyprocess \
python-traceback2 \
python-typing \
python-ujson \
python-yappi \
python-hp3parclient \
python-click \
python-daemon \
python-ipy \
python-ldap \
python-linecache2 \
python-pep8 \
python-pyudev \
python-simplegeneric \
python-slip-dbus \
python-pytz \
ruby-shadow \
screen \
seabios \
smartmontools \
snappy \
socat \
spawn-fcgi \
spice \
swig \
sysstat \
tcp-wrappers \
trousers \
xfsprogs \
yajl \
zip \
c-ares \
cifs-utils \
createrepo-c \
gdbm \
gmp \
groff \
libnl \
mcstrans \
linuxptp \
lua \
lldpd \
multipath-tools \
flac \
freetype \
geoip \
glusterfs \
gobject-introspection \
gperftools \
gpm \
hiera \
leveldb \
libutempter \
lksctp-tools \
quota \
radvd \
usbredir \
texinfo \
freetype \
celt051 \
cryptsetup \
lmsensors-libsensors \
lmsensors-fancontrol \
lmsensors-isatools \
lmsensors-pwmconfig \
lmsensors-sensord \
lmsensors-sensors \
lmsensors-sensorsconfconvert \
lmsensors-sensorsdetect \
"
# tpm2-abrmd
# tpm2-tss
# tboot
# syslinux
# docker-ce
# docker-distribution
# syslog-ng
# drbd
# etcd
# nss-myhostname
# rdma-core
# librdmacm
# libgdbm6
## libgdbm-bin
# libgmp10
# libgmpxx4
# lmsensors
# lmsensors-config
# unbound

File diff suppressed because it is too large Load Diff

70
docs/inspect.sh Executable file
View File

@ -0,0 +1,70 @@
#!/bin/bash
# To use this script:
usage () {
cat << EOF
# This script needs the installed package list.
# 1 - build the project with
bitbake openstack-image-aio
# 2 - From bitbake build environment:
bitbake openstack-image-aio -c devshell
cd ../rootfs
alias prpm='rpm --root=\$PWD --dbpath=/var/lib/rpm '
prpm -qa | sed -e 's/^kernel.*$//g;s/.*-d[be][gv].*//g' | grep -v ^$ > /<PATH>/<TO>/meta-starlingX/docs/openstack-image-aio.pkgs
exit
cd /<PATH>/<TO>/meta-starlingX/docs/
./inspect.sh
##################################################################
# Import Pack Packages_List_efforts.csv with ":" field delimeter.#
##################################################################
EOF
exit 0
}
INCLUDED_PKGS="python-ryu-common|python-libs|vim|audit|avahi|bzip2|dbus|e2fsprogs|file|fuse|gettext|kmod|libvirt|lvm2|ncurses|net|net|openssl|pciutils|perl|postgresql|rpm|rpm|systemd|xz|zlib|sqlite|openssl|openssh|wget|grub|elfutils|apr|btrfs-progs|httpd|iproute|libacl|libaio|libassuan|libattr|libcap-ng|libcurl|libdaemon|libffi|libgcc|libgomp|libICE|libidn|libmnl|libselinux|libselinux|libsepol|libsmartcols|libstdc++|libtirpc|libtool-ltdl|libunistring|libuuid|libwbclient|libwbclient|alsa-lib|cups-lib|gnupg2|gnutls|jansson|json-c|libedit|liblkid|libestr|libev|libgudev1|libibverbs|libjpeg-turbo|liboath|libogg|libpciaccess|libpipeline|libpcap|libpng|librdmacm|libsemanage|libsysfs|libteam|libtempter|lm_sensors-libs|lzo|mariadb-common|mtce-guestAgent|mtce-guestServer|newt|newt-python|numactl-libs|openstack-barbican|openstack-dashboard|openstack-keystone|passwd|pcre|pixman|pulseaudio-libs|pygpgme|pyparsing|python2-crypto|python2-docker|python-flask-restful|python2-pika_pool|python2-pyOpenSSL|python-3parclient|PyYAML|readline|samba-client-libs|seabios-bin|shadow-utils|spice-server|tcp_wrappers|yajl|cyrus-sasl|efivar-libs|expat|gdbm|glib2|gmp|groff-base|libnl3|mozjs17|openldap|opus|createrepo|c-ares|libXext|libXau|libXi|libXtst|mod_wsgi|popt|device-mapper-multipath|flac-libs|GeoIP|gpm-libs|librdmacm|ntfs|ntfs-progs|OpenIPMI-modalias|pytz|snappy|info|freetype|libutempter|lksctp-tools|lmsensors|erlang-os_mon|erlang-otp_mibs|erlang-public_key|erlang-runtime_tools|erlang-syntax_tools|libblkid|libmount|celt051|leveldb"
[ ! -f openstack-image-aio.pkgs ] && usage;
rm -f reports/*
# Parse the installed RPM packages into package name and package version
# Package:Version
sed -e 's/\(^.*\)-\([0-9a-zA-Z].*-r[0-9]\)\(.*\)/\1:\2/g' openstack-image-aio.pkgs | sort > reports/ypkgs.lst
sed -e '1 s/^total .*$//g;s/^.*[0-9][0-9]:[0-9][0-9] //g;
s/\(^.*[a-zA-Z]\)-\([0-9].*.[el7\|tis]\)\(.*\)/\1:\2/g;
s/python2/python/g' packages.txt | grep -v "^$" | sort > reports/stxpkgs.lst
awk 'BEGIN { FS = ":" }; {if($2!=$4) print $2":"$4}' Packages_List_efforts.csv > reports/renamed-pkgs.txt
awk 'BEGIN { FS = ":" }; {if ($4 == $2) print $2":"$4}' Packages_List_efforts.csv > reports/yocto-pkgs.txt
# Missing yocto-pkgs.txt
echo Missing Yocto pkgs > reports/missing_pkgs.txt
for f in $(cut -d':' -f1 reports/yocto-pkgs.txt | egrep -v $INCLUDED_PKGS); do
grep -q -i -w $f reports/ypkgs.lst || echo $f | tee -a reports/missing_pkgs.txt
done
echo -e "\nMissing renamed Yocto pkgs" >> reports/missing_pkgs.txt
for f in $(cut -d':' -f2 reports/renamed-pkgs.txt | egrep -v $INCLUDED_PKGS); do
echo $f | grep -q -w none && continue
grep -q -i $f reports/ypkgs.lst || echo $f | tee -a reports/missing_pkgs.txt
done
echo -e "\nMissing Yocto recipes" >> reports/missing_pkgs.txt
for f in $(grep -w none reports/renamed-pkgs.txt | cut -d':' -f1 | egrep -v $INCLUDED_PKGS); do
grep -q -i $f -w reports/ypkgs.lst && \
echo $f >> reports/recipes_added.txt || echo $f | tee -a reports/missing_pkgs.txt
done
x=$(cat reports/ypkgs.lst)
for t in ${x[@]}; do
p=$(echo $t | cut -d":" -f1)
sed -i -e "1,$ s/\(^[0-9].*:$p:.*:.*:.*:\)\(stx-none:stx-none:\)\(.*:.*\)/\1$t:\3/g" Packages_List_efforts.csv
done

View File

@ -44,18 +44,19 @@ RDEPENDS_packagegroup-stx-integ-cff = " \
iptables-config \
memcached-custom \
ntp-config \
pam-config \
rsync-config \
shadow-utils-config \
sudo-config \
syslog-ng-config \
util-linux-config \
"
# sudo-config \
# shadow-utils-config
# pam-config
RDEPENDS_packagegroup-stx-integ-puppet-modules = " \
puppet \
puppet-boolean \
puppet-create-resources \
puppet-dnsmasq \
puppet-drbd \
"
# puppet-boolean \
# puppet-create-resources \
# puppet-dnsmasq \
# puppet-drbd \
# "
# puppet