* Updated all perl module modes to remove the executable bit.

* Updated anvil.sql to add the new tables needed for alert mail delivery.
* Update anvil.sql and Database->initialize to now default the user to 'admin' and swap that out if needed, instead of using the #!variable!user!#' replacement variable.
* Started updating anvil.spec for EL8.
* Added support for 'striker::repo::extra-packages' which users can use to add additional packages to the Striker repositories.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 6 years ago
parent 53295a0d7f
commit 02c4fe1fa1
  1. 0
      Anvil/Tools.pm
  2. 3
      Anvil/Tools/Account.pm
  3. 6
      Anvil/Tools/Alert.pm
  4. 0
      Anvil/Tools/Convert.pm
  5. 24
      Anvil/Tools/Database.pm
  6. 0
      Anvil/Tools/Get.pm
  7. 0
      Anvil/Tools/Job.pm
  8. 0
      Anvil/Tools/Log.pm
  9. 0
      Anvil/Tools/Remote.pm
  10. 0
      Anvil/Tools/Storage.pm
  11. 0
      Anvil/Tools/System.pm
  12. 0
      Anvil/Tools/Template.pm
  13. 0
      Anvil/Tools/Validate.pm
  14. 0
      Anvil/Tools/Words.pm
  15. 5
      anvil.conf
  16. 17
      notes
  17. 787
      rpm/SPECS/anvil.spec
  18. 260
      share/anvil.sql
  19. 1
      share/words.xml
  20. 17
      tools/striker-manage-install-target

@ -606,9 +606,6 @@ AND
}
else
{
### TODO: left off here. First check fails and the user is logged out.
#die;
# The user's cookie is invalid, log the user out.
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0215"});
$anvil->Account->logout();

@ -347,6 +347,8 @@ In brief; alert messages are sorted in this order;
2. c<< alert_level >>
3. C<< timestamp >>
NOTE: All C<< sort_position >> values are automatically zero-padded (ie: C<< 12 >> -> C<< 0012 >>) to ensure accurate sorting. If you plan to use values greater than C<< 9999 >>, be sure to manually zero-pad your numbers. (Or, better, find a way to make shorter alerts... ).
NOTE: The timestamp is generally set for a given program or agent run (set when connecting to the database), NOT by the real time of the database insert. For this reason, relying on the timestamp alone will not generally give the desired results, and why C<< sort_position >> exists.
=head3 title (optional)
@ -412,7 +414,9 @@ sub register
$sort_position = sprintf("%04d", $sort_position);
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { sort_position => $sort_position }});
# Before we actually record the alert, see if there are any recipients listening. For example, very
# rarely is anyone listening to alert level 4 (info), so skipping recording it saves unnecessary
# growth of the history.alerts table.

@ -1094,7 +1094,7 @@ sub connect
}});
# These are warning level alerts.
$anvil->Alert->register_alert({
$anvil->Alert->register({
debug => $debug,
alert_level => "warning",
alert_set_by => $THIS_FILE,
@ -1141,7 +1141,7 @@ sub connect
});
if ($cleared)
{
$anvil->Alert->register_alert({
$anvil->Alert->register({
debug => $debug,
level => "warning",
agent_name => "Anvil!",
@ -1577,10 +1577,26 @@ sub initialize
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { user => $user }});
my $sql = $anvil->Storage->read_file({file => $sql_file});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { ">> sql" => $sql }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { sql => $sql }});
$sql =~ s/#!variable!user!#/$user/sg;
# In the off chance that the database user isn't 'admin', update the SQL file.
if ($user ne "admin")
{
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0253", variables => { database_user => $user }});
my $new_file = "";
foreach my $line (split/\n/, $sql)
{
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { line => $line }});
if ($line =~ /OWNER TO admin;/)
{
$line =~ s/ admin;/ $user;/;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { "<< line" => $line }});
}
$new_file .= $line."\n";
}
$sql = $new_file;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { "<< sql" => $sql }});
}
# Now that I am ready, disable autocommit, write and commit.
$anvil->Database->write({

@ -165,6 +165,11 @@ install-manifest::refresh-packages = 1
install-manifest::refresh-period = 86400
### This controls Striker-specific features
# This can be set a a comma-separated list of packages to be added to Striker's RPM repos. Note that this is
# only useful is you want to store EL8-specific packages needed outside the Anvil!.
striker::repo::extra-packages =
### System functions
# The machines used in the Anvil! are treated as appliances, and thus fully under our control. As such, much
# of the system is monitored, managed and auto-repaired. This can frustrate sysadmins. As such, an admin may

17
notes

@ -204,6 +204,23 @@ virt-manager stores information in dconf-editor -> /org/virt-manager/virt-manage
### Setup - Striker
# el8 build dependencies
dnf install ...
# Build for el8
drbd*
fence-agents-all
htop
perl-HTML-FromText
perl-HTML-Strip
perl-Log-Journald
perl-Net-Netmask
perl-Net-SSH2
perl-Proc-Simple
perl-UUID-Tiny
screen
# Packages
depends on: perl-XML-Simple postgresql-server postgresql-plperl postgresql-contrib perl-CGI perl-NetAddr-IP perl-DBD-Pg rsync perl-Log-Journald perl-Net-SSH2

@ -56,7 +56,7 @@ Requires: postfix
Requires: postgresql-contrib
Requires: postgresql-plperl
Requires: rsync
Requires: screen
#Requires: screen
Requires: vim
# iptables-services conflicts with firewalld
Conflicts: iptables-services
@ -72,7 +72,7 @@ Summary: Alteeve's Anvil! Striker dashboard package
Requires: anvil-core
Requires: anvil-striker-extra
Requires: createrepo
Requires: dhcp
Requires: dhcp-server
Requires: firefox
Requires: httpd
Requires: kernel-core
@ -84,131 +84,675 @@ Requires: syslinux-nonlinux
Requires: tftp-server
Requires: virt-manager
### Desktop stuff
Requires: aajohan-comfortaa-fonts
Requires: GConf2
Requires: ModemManager-glib
Requires: NetworkManager-libnm
Requires: NetworkManager-team
Requires: NetworkManager-tui
Requires: NetworkManager-wifi
Requires: NetworkManager
Requires: abattis-cantarell-fonts
Requires: adobe-source-han-sans-cn-fonts
Requires: adobe-source-han-sans-tw-fonts
Requires: adobe-source-han-serif-cn-fonts
Requires: adobe-source-han-serif-tw-fonts
Requires: accountsservice-libs
Requires: accountsservice
Requires: acl
Requires: adwaita-cursor-theme
Requires: adwaita-gtk2-theme
Requires: adwaita-icon-theme
Requires: alsa-plugins-pulseaudio
Requires: alsa-ucm
Requires: alsa-utils
Requires: awesome
Requires: alsa-lib
Requires: annobin
Requires: at-spi2-atk
Requires: at-spi2-core
Requires: atk
Requires: audit-libs
Requires: audit
Requires: authselect-libs
Requires: authselect
Requires: avahi-glib
Requires: avahi-libs
Requires: basesystem
Requires: bash-completion
Requires: bash
Requires: bind-export-libs
Requires: binutils
Requires: biosdevname
Requires: bluez-libs
Requires: bluez-obexd
Requires: bluez
Requires: bolt
Requires: brotli
Requires: bubblewrap
Requires: bzip2-libs
Requires: bzip2
Requires: c-ares
Requires: ca-certificates
Requires: cairo-gobject
Requires: cairo
Requires: cheese-libs
Requires: chkconfig
Requires: clutter-gst3
Requires: clutter-gtk
Requires: clutter
Requires: cogl
Requires: color-filesystem
Requires: colord-gtk
Requires: colord-libs
Requires: colord
Requires: coreutils-common
Requires: coreutils
Requires: cpio
Requires: cpp
Requires: cracklib-dicts
Requires: cracklib
Requires: createrepo_c-libs
Requires: createrepo_c
Requires: cronie-anacron
Requires: cronie
Requires: crontabs
Requires: crypto-policies
Requires: cryptsetup-libs
Requires: cups-libs
Requires: cups-pk-helper
Requires: curl
Requires: cyrus-sasl-lib
Requires: dbus-common
Requires: dbus-daemon
Requires: dbus-glib
Requires: dbus-libs
Requires: dbus-tools
Requires: dbus-x11
Requires: dbus
Requires: dconf
Requires: dconf-editor
Requires: dejavu-sans-fonts
Requires: dejavu-sans-mono-fonts
Requires: dejavu-serif-fonts
Requires: dwm
Requires: fedora-icon-theme
Requires: desktop-file-utils
Requires: device-mapper-event-libs
Requires: device-mapper-event
Requires: device-mapper-libs
Requires: device-mapper-persistent-data
Requires: device-mapper
Requires: dhcp-client
Requires: dhcp-common
Requires: dhcp-libs
Requires: diffutils
Requires: dmidecode
Requires: dnf-data
Requires: dnf-plugin-subscription-manager
Requires: dnf-plugins-core
Requires: dnf
Requires: dracut-config-rescue
Requires: dracut-network
Requires: dracut-squash
Requires: dracut
Requires: drpm
Requires: dwz
Requires: e2fsprogs-libs
Requires: e2fsprogs
Requires: efi-srpm-macros
Requires: elfutils-default-yama-scope
Requires: elfutils-libelf
Requires: elfutils-libs
Requires: elfutils
Requires: emacs-filesystem
Requires: enchant
Requires: ethtool
Requires: evolution-data-server-langpacks
Requires: evolution-data-server
Requires: expat
Requires: file-libs
Requires: file
Requires: filesystem
Requires: findutils
Requires: fipscheck-lib
Requires: fipscheck
Requires: firewalld-filesystem
Requires: firewalld
Requires: flac-libs
Requires: fontconfig
Requires: fontpackages-filesystem
Requires: freetype
Requires: fribidi
Requires: fuse-libs
Requires: gawk
Requires: gc
Requires: gcc
Requires: gcr
Requires: gdb-headless
Requires: gdbm-libs
Requires: gdbm
Requires: gdk-pixbuf2-modules
Requires: gdk-pixbuf2
Requires: gdm
Requires: geoclue2-libs
Requires: geoclue2
Requires: geocode-glib
Requires: geolite2-city
Requires: geolite2-country
Requires: gettext-libs
Requires: gettext
Requires: ghc-srpm-macros
Requires: gjs
Requires: glib-networking
Requires: glib2
Requires: glibc-common
Requires: glibc-devel
Requires: glibc-headers
Requires: glibc-langpack-en
Requires: glibc
Requires: glx-utils
Requires: gnu-free-mono-fonts
Requires: gnu-free-sans-fonts
Requires: gnu-free-serif-fonts
Requires: google-noto-emoji-color-fonts
Requires: google-noto-emoji-fonts
Requires: google-noto-sans-lisu-fonts
Requires: google-noto-sans-mandaic-fonts
Requires: google-noto-sans-meetei-mayek-fonts
Requires: google-noto-sans-sinhala-fonts
Requires: google-noto-sans-tagalog-fonts
Requires: google-noto-sans-tai-tham-fonts
Requires: google-noto-sans-tai-viet-fonts
Requires: gnome-screenshot
Requires: gmp
Requires: gnome-bluetooth-libs
Requires: gnome-bluetooth
Requires: gnome-control-center-filesystem
Requires: gnome-control-center
Requires: gnome-desktop3
Requires: gnome-keyring-pam
Requires: gnome-keyring
Requires: gnome-online-accounts
Requires: gnome-session-wayland-session
Requires: gnome-session-xsession
Requires: gnome-session
Requires: gnome-settings-daemon
Requires: gnome-shell
Requires: gnome-terminal
Requires: gnome-autoar
Requires: gnome-backgrounds
Requires: gnome-calculator
Requires: gnome-characters
Requires: gnome-classic-session
Requires: gnome-clocks
Requires: gnome-color-manager
Requires: gnome-disk-utility
Requires: gnome-documents
Requires: gnome-documents-libs
Requires: gnome-font-viewer
Requires: gnome-logs
Requires: gnome-menus
Requires: gnome-shell-extension-alternate-tab
Requires: gnome-shell-extension-apps-menu
Requires: gnome-shell-extension-common
Requires: gnome-shell-extension-launch-new-instance
Requires: gnome-shell-extension-places-menu
Requires: gnome-shell-extension-window-list
Requires: gnome-software
Requires: gnome-system-monitor
Requires: gnome-user-docs
Requires: gnome-user-share
Requires: hyperv-daemons
Requires: i3
Requires: isdn4k-utils
Requires: jomolhari-fonts
Requires: julietaula-montserrat-fonts
Requires: khmeros-base-fonts
Requires: liberation-mono-fonts
Requires: liberation-sans-fonts
Requires: liberation-serif-fonts
Requires: lightdm-gtk
Requires: linux-atm
Requires: lohit-assamese-fonts
Requires: lohit-bengali-fonts
Requires: lohit-devanagari-fonts
Requires: lohit-gujarati-fonts
Requires: lohit-gurmukhi-fonts
Requires: lohit-kannada-fonts
Requires: lohit-odia-fonts
Requires: lohit-tamil-fonts
Requires: lohit-telugu-fonts
Requires: lrzsz
Requires: gnome-themes-standard
Requires: gnupg2-smime
Requires: gnupg2
Requires: gnutls
Requires: go-srpm-macros
Requires: gobject-introspection
Requires: gpgme
Requires: gpm-libs
Requires: graphite2
Requires: grep
Requires: grilo
Requires: groff-base
Requires: grub2-common
Requires: grub2-pc-modules
Requires: grub2-pc
Requires: grub2-tools-extra
Requires: grub2-tools-minimal
Requires: grub2-tools
Requires: grubby
Requires: gsettings-desktop-schemas
Requires: gsm
Requires: gstreamer1-plugins-base
Requires: gstreamer1
Requires: gtk-update-icon-cache
Requires: gtk2
Requires: gtk3
Requires: guile
Requires: gzip
Requires: hardlink
Requires: harfbuzz-icu
Requires: harfbuzz
Requires: hdparm
Requires: hicolor-icon-theme
Requires: hostname
Requires: hunspell-en-GB
Requires: hunspell-en-US
Requires: hunspell-en
Requires: hunspell
Requires: hwdata
Requires: hyphen
Requires: ibus-gtk2
Requires: ibus-gtk3
Requires: ibus-libs
Requires: ibus-setup
Requires: ibus
Requires: iio-sensor-proxy
Requires: ima-evm-utils
Requires: info
Requires: initscripts
Requires: ipcalc
Requires: iproute
Requires: iprutils
Requires: ipset-libs
Requires: ipset
Requires: iptables-ebtables
Requires: iptables-libs
Requires: iptables
Requires: iputils
Requires: irqbalance
Requires: isl
Requires: iso-codes
Requires: iwl100-firmware
Requires: iwl1000-firmware
Requires: iwl105-firmware
Requires: iwl135-firmware
Requires: iwl2000-firmware
Requires: iwl2030-firmware
Requires: iwl3160-firmware
Requires: iwl3945-firmware
Requires: iwl4965-firmware
Requires: iwl5000-firmware
Requires: iwl5150-firmware
Requires: iwl6000-firmware
Requires: iwl6000g2a-firmware
Requires: iwl6050-firmware
Requires: iwl7260-firmware
Requires: jansson
Requires: jasper-libs
Requires: jbigkit-libs
Requires: json-c
Requires: json-glib
Requires: kbd-legacy
Requires: kbd-misc
Requires: kbd
Requires: kernel-headers
Requires: kernel-modules
Requires: kernel-tools-libs
Requires: kernel-tools
Requires: kernel
Requires: kexec-tools
Requires: keyutils-libs
Requires: kmod-libs
Requires: kmod
Requires: kpartx
Requires: krb5-libs
Requires: langpacks-en
Requires: lcms2
Requires: less
Requires: libICE
Requires: libSM
Requires: libX11-common
Requires: libX11-xcb
Requires: libX11
Requires: libXau
Requires: libXcomposite
Requires: libXcursor
Requires: libXdamage
Requires: libXdmcp
Requires: libXext
Requires: libXfixes
Requires: libXfont2
Requires: libXft
Requires: libXi
Requires: libXinerama
Requires: libXmu
Requires: libXrandr
Requires: libXrender
Requires: libXt
Requires: libXtst
Requires: libXv
Requires: libXxf86misc
Requires: libXxf86vm
Requires: libacl
Requires: libaio
Requires: libarchive
Requires: libassuan
Requires: libasyncns
Requires: libatomic_ops
Requires: libattr
Requires: libbabeltrace
Requires: libbasicobjects
Requires: libblkid
Requires: libcanberra-gtk3
Requires: libcanberra
Requires: libcap-ng
Requires: libcap
Requires: libcollection
Requires: libcom_err
Requires: libcomps
Requires: libcroco
Requires: libcurl
Requires: libdaemon
Requires: libdatrie
Requires: libdb-utils
Requires: libdb
Requires: libdhash
Requires: libdnf
Requires: libdrm
Requires: libedit
Requires: libepoxy
Requires: libestr
Requires: libevdev
Requires: libevent
Requires: libfastjson
Requires: libfdisk
Requires: libffi
Requires: libfontenc
Requires: libgcc
Requires: libgcrypt
Requires: libgdata
Requires: libglvnd-egl
Requires: libglvnd-gles
Requires: libglvnd-glx
Requires: libglvnd
Requires: libgnomekbd
Requires: libgomp
Requires: libgpg-error
Requires: libgtop2
Requires: libgudev
Requires: libgusb
Requires: libgweather
Requires: libical
Requires: libicu
Requires: libidn2
Requires: libimobiledevice
Requires: libini_config
Requires: libinput
Requires: libipt
Requires: libjpeg-turbo
Requires: libkcapi-hmaccalc
Requires: libkcapi
Requires: libksba
Requires: libldb
Requires: libmaxminddb
Requires: libmcpp
Requires: libmetalink
Requires: libmnl
Requires: libmodman
Requires: libmodulemd
Requires: libmount
Requires: libmpc
Requires: libndp
Requires: libnetfilter_conntrack
Requires: libnfnetlink
Requires: libnfsidmap
Requires: libnftnl
Requires: libnghttp2
Requires: libnl3-cli
Requires: libnl3
Requires: libnma
Requires: libnotify
Requires: libnsl2
Requires: liboauth
Requires: libogg
Requires: libpath_utils
Requires: libpcap
Requires: libpciaccess
Requires: libpipeline
Requires: libpkgconf
Requires: libplist
Requires: libpng
Requires: libproxy
Requires: libpsl
Requires: libpwquality
Requires: libquvi-scripts
Requires: libquvi
Requires: libref_array
Requires: librepo
Requires: libreport-filesystem
Requires: librhsm
Requires: librsvg2
Requires: libseccomp
Requires: libsecret
Requires: libselinux-utils
Requires: libselinux
Requires: libsemanage
Requires: libsepol
Requires: libsigsegv
Requires: libsmartcols
Requires: libsmbclient
Requires: libsndfile
Requires: libsolv
Requires: libsoup
Requires: libss
Requires: libssh
Requires: libsss_autofs
Requires: libsss_certmap
Requires: libsss_idmap
Requires: libsss_nss_idmap
Requires: libsss_sudo
Requires: libstdc++
Requires: libsysfs
Requires: libtalloc
Requires: libtasn1
Requires: libtdb
Requires: libteam
Requires: libtevent
Requires: libthai
Requires: libtheora
Requires: libtiff
Requires: libtirpc
Requires: libtool-ltdl
Requires: libunistring
Requires: libusbmuxd
Requires: libusbx
Requires: libuser
Requires: libutempter
Requires: libuuid
Requires: libverto
Requires: libvisual
Requires: libvorbis
Requires: libwacom-data
Requires: libwacom
Requires: libwayland-client
Requires: libwayland-cursor
Requires: libwayland-egl
Requires: libwayland-server
Requires: libwbclient
Requires: libwebp
Requires: libxcb
Requires: libxcrypt-devel
Requires: libxcrypt
Requires: libxkbcommon-x11
Requires: libxkbcommon
Requires: libxkbfile
Requires: libxklavier
Requires: libxml2
Requires: libxshmfence
Requires: libxslt
Requires: libyaml
Requires: linux-firmware
Requires: llvm-libs
Requires: logrotate
Requires: lshw
Requires: lsscsi
Requires: lua-expat
Requires: lua-json
Requires: lua-libs
Requires: lua-lpeg
Requires: lua-socket
Requires: lua
Requires: lvm2-libs
Requires: lvm2
Requires: lz4-libs
Requires: lzo
Requires: man-db
Requires: mcpp
Requires: mesa-dri-drivers
Requires: metacity
Requires: minicom
Requires: naver-nanum-gothic-fonts
Requires: NetworkManager-adsl
Requires: NetworkManager-ppp
Requires: open-vm-tools-desktop
Requires: openbox
Requires: PackageKit-gstreamer-plugin
Requires: paktype-naskh-basic-fonts
Requires: paratype-pt-sans-fonts
Requires: plymouth-system-theme
Requires: ppp
Requires: qtile
Requires: ratpoison
Requires: rp-pppoe
Requires: setroubleshoot
Requires: sil-abyssinica-fonts
Requires: sil-mingzat-fonts
Requires: sil-nuosu-fonts
Requires: sil-padauk-fonts
Requires: smc-meera-fonts
Requires: spice-vdagent
Requires: stix-fonts
Requires: tabish-eeyek-fonts
Requires: thai-scalable-waree-fonts
Requires: tigervnc-server
Requires: vlgothic-fonts
Requires: wvdial
Requires: xmonad-basic
Requires: xorg-x11-drv-ati
Requires: xorg-x11-drv-evdev
Requires: xorg-x11-drv-fbdev
Requires: xorg-x11-drv-intel
Requires: xorg-x11-drv-libinput
Requires: xorg-x11-drv-nouveau
Requires: xorg-x11-drv-openchrome
Requires: xorg-x11-drv-qxl
Requires: xorg-x11-drv-vesa
Requires: xorg-x11-drv-vmware
Requires: xorg-x11-drv-wacom
Requires: xorg-x11-server-Xorg
Requires: xorg-x11-utils
Requires: mesa-filesystem
Requires: mesa-libEGL
Requires: mesa-libGL
Requires: mesa-libgbm
Requires: mesa-libglapi
Requires: microcode_ctl
Requires: mobile-broadband-provider-info
Requires: mozilla-filesystem
Requires: mozjs52
Requires: mpfr
Requires: mtdev
Requires: mutter
Requires: ncurses-base
Requires: ncurses-libs
Requires: ncurses
Requires: nettle
Requires: newt
Requires: nftables
Requires: nm-connection-editor
Requires: npth
Requires: nspr
Requires: nss-softokn-freebl
Requires: nss-softokn
Requires: nss-sysinit
Requires: nss-util
Requires: nss
Requires: numactl-libs
Requires: ocaml-srpm-macros
Requires: openblas-srpm-macros
Requires: openldap
Requires: openssh-clients
Requires: openssh-server
Requires: openssh
Requires: openssl-libs
Requires: openssl-pkcs11
Requires: openssl
Requires: opus
Requires: orc
Requires: os-prober
Requires: p11-kit-trust
Requires: p11-kit
Requires: pam
Requires: pango
Requires: parted
Requires: passwd
Requires: patch
Requires: pciutils-libs
Requires: pcre
Requires: pcre2
Requires: perl-srpm-macros
Requires: pigz
Requires: pinentry-gtk
Requires: pinentry
Requires: pipewire-libs
Requires: pipewire
Requires: pixman
Requires: pkgconf-m4
Requires: pkgconf-pkg-config
Requires: pkgconf
Requires: platform-python
Requires: plymouth-core-libs
Requires: plymouth-scripts
Requires: plymouth
Requires: policycoreutils
Requires: polkit-libs
Requires: polkit-pkla-compat
Requires: polkit
Requires: popt
Requires: prefixdevname
Requires: procps-ng
Requires: psmisc
Requires: publicsuffix-list-dafsa
Requires: pulseaudio-libs-glib2
Requires: pulseaudio-libs
Requires: pulseaudio-module-bluetooth
Requires: pulseaudio
Requires: python-srpm-macros
Requires: python3-cairo
Requires: python3-configobj
Requires: python3-dateutil
Requires: python3-dbus
Requires: python3-decorator
Requires: python3-dmidecode
Requires: python3-dnf-plugins-core
Requires: python3-dnf
Requires: python3-ethtool
Requires: python3-firewall
Requires: python3-gobject-base
Requires: python3-gobject
Requires: python3-gpg
Requires: python3-hawkey
Requires: python3-iniparse
Requires: python3-inotify
Requires: python3-libcomps
Requires: python3-libdnf
Requires: python3-librepo
Requires: python3-libs
Requires: python3-libselinux
Requires: python3-libxml2
Requires: python3-linux-procfs
Requires: python3-perf
Requires: python3-pip
Requires: python3-pyudev
Requires: python3-rpm-macros
Requires: python3-rpm
Requires: python3-schedutils
Requires: python3-setuptools
Requires: python3-six
Requires: python3-slip-dbus
Requires: python3-slip
Requires: python3-subscription-manager-rhsm
Requires: python3-syspurpose
Requires: python3-unbound
Requires: qemu-guest-agent
Requires: qt5-srpm-macros
Requires: readline
Requires: redhat-backgrounds
Requires: redhat-logos
Requires: redhat-release
Requires: redhat-rpm-config
Requires: rest
Requires: rootfiles
Requires: rpm-build-libs
Requires: rpm-build
Requires: rpm-libs
Requires: rpm-plugin-selinux
Requires: rpm-plugin-systemd-inhibit
Requires: rpm
Requires: rsync
Requires: rsyslog
Requires: rtkit
Requires: rust-srpm-macros
Requires: samba-client-libs
Requires: samba-common-libs
Requires: samba-common
Requires: sbc
Requires: sed
Requires: selinux-policy-targeted
Requires: selinux-policy
Requires: setup
Requires: sg3_utils-libs
Requires: sg3_utils
Requires: shadow-utils
Requires: shared-mime-info
Requires: slang
Requires: snappy
Requires: sound-theme-freedesktop
Requires: speexdsp
Requires: sqlite-libs
Requires: squashfs-tools
Requires: sssd-client
Requires: sssd-common
Requires: sssd-kcm
Requires: sssd-nfs-idmap
Requires: startup-notification
Requires: subscription-manager-rhsm-certificates
Requires: subscription-manager
Requires: sudo
Requires: switcheroo-control
Requires: systemd-libs
Requires: systemd-pam
Requires: systemd-udev
Requires: systemd
Requires: tar
Requires: teamd
Requires: totem-pl-parser
Requires: trousers-lib
Requires: trousers
Requires: tuned
Requires: tzdata
Requires: unbound-libs
Requires: unzip
Requires: upower
Requires: usermode
Requires: util-linux
Requires: vim-common
Requires: vim-enhanced
Requires: vim-filesystem
Requires: vim-minimal
Requires: vino
Requires: virt-what
Requires: webkit2gtk3-jsc
Requires: webkit2gtk3-plugin-process-gtk2
Requires: webkit2gtk3
Requires: webrtc-audio-processing
Requires: which
Requires: woff2
Requires: wpa_supplicant
Requires: xcb-util
Requires: xfsprogs
Requires: xkeyboard-config
Requires: xml-common
Requires: xorg-x11-server-Xwayland
Requires: xorg-x11-server-common
Requires: xorg-x11-server-utils
Requires: xorg-x11-xauth
Requires: xorg-x11-xinit
Requires: xorg-x11-xkb-utils
Requires: xz-libs
Requires: xz
Requires: yum
Requires: zenity
Requires: zip
Requires: zlib
# A Striker dashboard is not allowed to host servers or be a migration target.
@ -290,7 +834,7 @@ Provides support for asynchronous disaster recovery hosts in an Anvil! cluster.
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p %{buildroot}/%{_sbindir}/ScanCore/agents/
mkdir -p %{buildroot}/%{_sbindir}/scancore-agents/
mkdir -p %{buildroot}/%{_sysconfdir}/anvil/
mkdir -p %{buildroot}/%{_localstatedir}/www/
mkdir -p %{buildroot}/%{_usr}/share/anvil/
@ -304,7 +848,7 @@ cp -R -p html %{buildroot}/%{_localstatedir}/www/
cp -R -p cgi-bin %{buildroot}/%{_localstatedir}/www/
cp -R -p units/* %{buildroot}/%{_usr}/lib/systemd/system/
cp -R -p tools/* %{buildroot}/%{_sbindir}/
cp -R -p ScanCore/agents/* %{buildroot}/%{_sbindir}/ScanCore/agents/
cp -R -p scancore-agents %{buildroot}/%{_sbindir}/
cp -R -p anvil.conf %{buildroot}/%{_sysconfdir}/anvil/
cp -R -p anvil.version %{buildroot}/%{_sysconfdir}/anvil/
cp -R -p share/* %{buildroot}/%{_usr}/share/anvil/
@ -392,7 +936,7 @@ firewall-cmd --add-service=postgresql --permanent
%{_usr}/lib/*
%{_usr}/share/anvil/*
%{_sbindir}/*
%{_sbindir}/ScanCore/agents/*
%{_sbindir}/scancore-agents/*
%{_sysconfdir}/anvil/anvil.version
%{_datadir}/perl5/*
@ -408,9 +952,10 @@ firewall-cmd --add-service=postgresql --permanent
%changelog
* Madison Kelly <mkelly@alteeve.ca> 3.0-21
* Sat Jan 05 2019 Madison Kelly <mkelly@alteeve.ca> 3.0-21
- Started adding support for ScanCore
- Updated source.
- Updated for EL8.
* Wed Dec 12 2018 Madison Kelly <mkelly@alteeve.ca> 3.0-20
- Updated source.

@ -47,7 +47,7 @@ CREATE TABLE hosts (
host_type text not null, -- Either 'node' or 'dashboard'.
modified_date timestamp with time zone not null
);
ALTER TABLE hosts OWNER TO #!variable!user!#;
ALTER TABLE hosts OWNER TO admin;
CREATE TABLE history.hosts (
history_id bigserial,
@ -56,7 +56,7 @@ CREATE TABLE history.hosts (
host_type text not null,
modified_date timestamp with time zone not null
);
ALTER TABLE history.hosts OWNER TO #!variable!user!#;
ALTER TABLE history.hosts OWNER TO admin;
CREATE FUNCTION history_hosts() RETURNS trigger
AS $$
@ -78,7 +78,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_hosts() OWNER TO #!variable!user!#;
ALTER FUNCTION history_hosts() OWNER TO admin;
CREATE TRIGGER trigger_hosts
AFTER INSERT OR UPDATE ON hosts
@ -100,7 +100,7 @@ CREATE TABLE users (
user_is_trusted integer not null default 0, -- If 1, user is allowed to do things that would cause interruptions, like force-reset and gracefully stop servers, withdraw nodes, and stop the Anvil! entirely.
modified_date timestamp with time zone not null
);
ALTER TABLE users OWNER TO #!variable!user!#;
ALTER TABLE users OWNER TO admin;
CREATE TABLE history.users (
history_id bigserial,
@ -116,7 +116,7 @@ CREATE TABLE history.users (
user_is_trusted integer,
modified_date timestamp with time zone not null
);
ALTER TABLE history.users OWNER TO #!variable!user!#;
ALTER TABLE history.users OWNER TO admin;
CREATE FUNCTION history_users() RETURNS trigger
AS $$
@ -152,7 +152,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_users() OWNER TO #!variable!user!#;
ALTER FUNCTION history_users() OWNER TO admin;
CREATE TRIGGER trigger_users
AFTER INSERT OR UPDATE ON users
@ -167,7 +167,7 @@ CREATE TABLE host_variable (
host_variable_value text not null,
modified_date timestamp with time zone not null
);
ALTER TABLE host_variable OWNER TO #!variable!user!#;
ALTER TABLE host_variable OWNER TO admin;
CREATE TABLE history.host_variable (
history_id bigserial,
@ -177,7 +177,7 @@ CREATE TABLE history.host_variable (
host_variable_value text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.host_variable OWNER TO #!variable!user!#;
ALTER TABLE history.host_variable OWNER TO admin;
CREATE FUNCTION history_host_variable() RETURNS trigger
AS $$
@ -201,7 +201,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_host_variable() OWNER TO #!variable!user!#;
ALTER FUNCTION history_host_variable() OWNER TO admin;
CREATE TRIGGER trigger_host_variable
AFTER INSERT OR UPDATE ON host_variable
@ -220,7 +220,7 @@ CREATE TABLE sessions (
FOREIGN KEY(session_host_uuid) REFERENCES hosts(host_uuid),
FOREIGN KEY(session_user_uuid) REFERENCES users(user_uuid)
);
ALTER TABLE sessions OWNER TO #!variable!user!#;
ALTER TABLE sessions OWNER TO admin;
CREATE TABLE history.sessions (
history_id bigserial,
@ -231,7 +231,7 @@ CREATE TABLE history.sessions (
session_user_agent text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.sessions OWNER TO #!variable!user!#;
ALTER TABLE history.sessions OWNER TO admin;
CREATE FUNCTION history_sessions() RETURNS trigger
AS $$
@ -257,13 +257,12 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_sessions() OWNER TO #!variable!user!#;
ALTER FUNCTION history_sessions() OWNER TO admin;
CREATE TRIGGER trigger_sessions
AFTER INSERT OR UPDATE ON sessions
FOR EACH ROW EXECUTE PROCEDURE history_sessions();
-- This stores alerts coming in from various sources
CREATE TABLE alerts (
alert_uuid uuid not null primary key,
@ -278,7 +277,7 @@ CREATE TABLE alerts (
FOREIGN KEY(alert_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE alerts OWNER TO #!variable!user!#;
ALTER TABLE alerts OWNER TO admin;
CREATE TABLE history.alerts (
history_id bigserial,
@ -292,7 +291,7 @@ CREATE TABLE history.alerts (
alert_show_header integer,
modified_date timestamp with time zone not null
);
ALTER TABLE history.alerts OWNER TO #!variable!user!#;
ALTER TABLE history.alerts OWNER TO admin;
CREATE FUNCTION history_alerts() RETURNS trigger
AS $$
@ -306,9 +305,7 @@ BEGIN
alert_set_by,
alert_level,
alert_title,
alert_title_variables,
alert_message,
alert_message_variables,
alert_sort_position,
alert_show_header,
modified_date)
@ -326,13 +323,14 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_alerts() OWNER TO #!variable!user!#;
ALTER FUNCTION history_alerts() OWNER TO admin;
CREATE TRIGGER trigger_alerts
AFTER INSERT OR UPDATE ON alerts
FOR EACH ROW EXECUTE PROCEDURE history_alerts();
-- NOTE: This doesn't store the user's level, as it might be unique per Anvil!.
-- This is the list of alert recipients.
CREATE TABLE recipients (
recipient_uuid uuid not null primary key,
@ -344,14 +342,18 @@ CREATE TABLE recipients (
FOREIGN KEY(recipient_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE recipients OWNER TO #!variable!user!#;
ALTER TABLE recipients OWNER TO admin;
CREATE TABLE history.recipients (
history_id bigserial,
recipient_uuid uuid,
recipient_name text,
recipient_email text,
recipient_language text,
recipient_new_level integer,
modified_date timestamp with time zone not null
);
ALTER TABLE history.recipients OWNER TO #!variable!user!#;
ALTER TABLE history.recipients OWNER TO admin;
CREATE FUNCTION history_recipients() RETURNS trigger
AS $$
@ -361,30 +363,192 @@ BEGIN
SELECT INTO history_recipients * FROM recipients WHERE recipient_uuid = new.recipient_uuid;
INSERT INTO history.recipients
(recipient_uuid,
recipient_name,
recipient_email,
recipient_language,
recipient_new_level,
modified_date)
VALUES
(history_recipients.recipient_uuid,
history_recipients.recipient_name,
history_recipients.recipient_email,
history_recipients.recipient_language,
history_recipients.recipient_new_level,
history_recipients.modified_date);
RETURN NULL;
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_recipients() OWNER TO #!variable!user!#;
ALTER FUNCTION history_recipients() OWNER TO admin;
CREATE TRIGGER trigger_recipients
AFTER INSERT OR UPDATE ON recipients
FOR EACH ROW EXECUTE PROCEDURE history_recipients();
-- This creates links between recipients and Anvil! systems, with a request alert level, so that we can
-- decide who gets what alerts for a given Anvil! system
CREATE TABLE notifications (
notification_uuid uuid not null primary key,
notification_recipient_uuid uuid not null, -- The recipient we're linking.
notification_anvil_uuid uuid not null, -- The Anvil! system we're linking.
notification_alert_level integer not null, -- This is the alert level (at or above) that this user wants alerts from.
modified_date timestamp with time zone not null,
FOREIGN KEY(notification_anvil_uuid) REFERENCES anvils(anvil_uuid),
FOREIGN KEY(notification_recipient_uuid) REFERENCES recipients(recipient_uuid)
);
ALTER TABLE notifications OWNER TO admin;
CREATE TABLE history.notifications (
history_id bigserial,
notification_uuid uuid,
notification_recipient_uuid uuid,
notification_anvil_uuid uuid,
notification_alert_level integer,
modified_date timestamp with time zone not null
);
ALTER TABLE history.notifications OWNER TO admin;
CREATE FUNCTION history_notifications() RETURNS trigger
AS $$
DECLARE
history_notifications RECORD;
BEGIN
SELECT INTO history_notifications * FROM notifications WHERE notification_uuid = new.notification_uuid;
INSERT INTO history.notifications
(notification_uuid,
notification_recipient_uuid,
notification_anvil_uuid,
notification_alert_level,
modified_date)
VALUES
(history_notifications.notification_uuid,
history_notifications.notification_recipient_uuid,
history_notifications.notification_anvil_uuid,
history_notifications.notification_alert_level,
history_notifications.modified_date);
RETURN NULL;
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_notifications() OWNER TO admin;
CREATE TRIGGER trigger_notifications
AFTER INSERT OR UPDATE ON notifications
FOR EACH ROW EXECUTE PROCEDURE history_notifications();
-- This creates a list of mail servers that are available for use by hosts. This information is used to
-- configure postfix on the host.
CREATE TABLE mail_servers (
mail_server_uuid uuid not null primary key,
mail_server_address text not null, -- example; mail.example.com
mail_server_port integer not null, -- The TCP port used to connect to the server.
mail_server_username text not null, -- This is the user name (usually email address) used when authenticating against the mail server.
mail_server_password text, -- This is the password used when authenticating against the mail server
mail_server_security text not null, -- This is the security type used when authenticating against the mail server (STARTTLS, TLS/SSL or NONE)
mail_server_authentication text not null, -- 'None', 'Plain Text', 'Encrypted'.
mail_server_helo_domain text not null, -- The domain we identify to the mail server as being from. The default is to use the domain name of the host.
modified_date timestamp with time zone not null,
);
ALTER TABLE mail_servers OWNER TO admin;
CREATE TABLE history.mail_servers (
history_id bigserial,
mail_server_uuid uuid,
mail_server_address text,
mail_server_port integer,
mail_server_username text,
mail_server_password text,
mail_server_security text,
mail_server_authentication text,
mail_server_helo_domain text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.mail_servers OWNER TO admin;
CREATE FUNCTION history_mail_servers() RETURNS trigger
AS $$
DECLARE
history_mail_servers RECORD;
BEGIN
SELECT INTO history_mail_servers * FROM mail_servers WHERE mail_server_uuid = new.mail_server_uuid;
INSERT INTO history.mail_servers
(mail_server_uuid,
mail_server_recipient_uuid,
mail_server_anvil_uuid,
mail_server_alert_level,
modified_date)
VALUES
(history_mail_servers.mail_server_uuid,
history_mail_servers.mail_server_recipient_uuid,
history_mail_servers.mail_server_anvil_uuid,
history_mail_servers.mail_server_alert_level,
history_mail_servers.modified_date);
RETURN NULL;
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_mail_servers() OWNER TO admin;
CREATE TRIGGER trigger_mail_servers
AFTER INSERT OR UPDATE ON mail_servers
FOR EACH ROW EXECUTE PROCEDURE history_mail_servers();
-- NOTE: If multiple entries for the same host have the same order, the host name will be used to sort for
-- priority purposes.
-- This creates links between hosts and mail servers to use for alerts.
CREATE TABLE host_mail_servers (
host_mail_server_uuid uuid not null primary key,
host_mail_server_host_uuid uuid not null, -- The host we're configuring
host_mail_server_mail_server_uuid uuid not null, -- The mail server to use
host_mail_server_order integer not null, -- The priority of this mail server.
modified_date timestamp with time zone not null,
FOREIGN KEY(host_mail_server_host_uuid) REFERENCES hosts(host_uuid),
FOREIGN KEY(host_mail_server_mail_server_uuid) REFERENCES mail_server(mail_server_uuid)
);
ALTER TABLE host_mail_servers OWNER TO admin;
-- TODO: We need to create;
-- Recipients (email, we're not supporting files anymore); Name, Address, Units, Language, default watch level
-- - Display as a list; Strikers, then Anvil!s; each anvil being node 1, node 2 and DR if available)
-- Watching (recipient, host, level) -> Link Recipient to hosts
-- Mail Server (server details)
-- Host Mail (Host uses which mail server, in what order)
CREATE TABLE history.host_mail_servers (
history_id bigserial,
host_mail_server_uuid uuid,
host_mail_server_host_uuid uuid,
host_mail_server_mail_server_uuid uuid,
host_mail_server_order integer,
modified_date timestamp with time zone not null
);
ALTER TABLE history.host_mail_servers OWNER TO admin;
CREATE FUNCTION history_host_mail_servers() RETURNS trigger
AS $$
DECLARE
history_host_mail_servers RECORD;
BEGIN
SELECT INTO history_host_mail_servers * FROM host_mail_servers WHERE host_mail_server_uuid = new.host_mail_server_uuid;
INSERT INTO history.host_mail_servers
(host_mail_server_uuid,
host_mail_server_host_uuid,
host_mail_server_mail_server_uuid,
host_mail_server_order,
modified_date)
VALUES
(history_host_mail_servers.host_mail_server_uuid,
history_host_mail_servers.host_mail_server_host_uuid,
history_host_mail_servers.host_mail_server_mail_server_uuid,
history_host_mail_servers.host_mail_server_order,
history_host_mail_servers.modified_date);
RETURN NULL;
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_host_mail_servers() OWNER TO admin;
CREATE TRIGGER trigger_host_mail_servers
AFTER INSERT OR UPDATE ON host_mail_servers
FOR EACH ROW EXECUTE PROCEDURE history_host_mail_servers();
-- This holds user-configurable variable. These values override defaults but NOT configuration files.
@ -399,7 +563,7 @@ CREATE TABLE variables (
variable_source_table text not null, -- Optional; Marks the database table corresponding to the 'variable_source_uuid' value.
modified_date timestamp with time zone not null
);
ALTER TABLE variables OWNER TO #!variable!user!#;
ALTER TABLE variables OWNER TO admin;
CREATE TABLE history.variables (
history_id bigserial,
@ -413,7 +577,7 @@ CREATE TABLE history.variables (
variable_source_table text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.variables OWNER TO #!variable!user!#;
ALTER TABLE history.variables OWNER TO admin;
CREATE FUNCTION history_variables() RETURNS trigger
AS $$
@ -445,7 +609,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_variables() OWNER TO #!variable!user!#;
ALTER FUNCTION history_variables() OWNER TO admin;
CREATE TRIGGER trigger_variables
AFTER INSERT OR UPDATE ON variables
@ -470,7 +634,7 @@ CREATE TABLE jobs (
FOREIGN KEY(job_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE jobs OWNER TO #!variable!user!#;
ALTER TABLE jobs OWNER TO admin;
CREATE TABLE history.jobs (
history_id bigserial,
@ -488,7 +652,7 @@ CREATE TABLE history.jobs (
job_status text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.jobs OWNER TO #!variable!user!#;
ALTER TABLE history.jobs OWNER TO admin;
CREATE FUNCTION history_jobs() RETURNS trigger
AS $$
@ -528,7 +692,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_jobs() OWNER TO #!variable!user!#;
ALTER FUNCTION history_jobs() OWNER TO admin;
CREATE TRIGGER trigger_jobs
AFTER INSERT OR UPDATE ON jobs
@ -554,7 +718,7 @@ CREATE TABLE network_interfaces (
network_interface_bridge_uuid uuid, -- If this iface is attached to a bridge, this will contain the 'bridgess -> bridge_uuid' that it is connected to.
modified_date timestamp with time zone not null
);
ALTER TABLE network_interfaces OWNER TO #!variable!user!#;
ALTER TABLE network_interfaces OWNER TO admin;
CREATE TABLE history.network_interfaces (
history_id bigserial,
@ -572,7 +736,7 @@ CREATE TABLE history.network_interfaces (
network_interface_bridge_uuid uuid,
modified_date timestamp with time zone not null
);
ALTER TABLE history.network_interfaces OWNER TO #!variable!user!#;
ALTER TABLE history.network_interfaces OWNER TO admin;
CREATE FUNCTION history_network_interfaces() RETURNS trigger
AS $$
@ -612,7 +776,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_network_interfaces() OWNER TO #!variable!user!#;
ALTER FUNCTION history_network_interfaces() OWNER TO admin;
CREATE TRIGGER trigger_network_interfaces
AFTER INSERT OR UPDATE ON network_interfaces
@ -638,7 +802,7 @@ CREATE TABLE bonds (
FOREIGN KEY(bond_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE bonds OWNER TO #!variable!user!#;
ALTER TABLE bonds OWNER TO admin;
CREATE TABLE history.bonds (
history_id bigserial,
@ -657,7 +821,7 @@ CREATE TABLE history.bonds (
bond_operational text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.bonds OWNER TO #!variable!user!#;
ALTER TABLE history.bonds OWNER TO admin;
CREATE FUNCTION history_bonds() RETURNS trigger
AS $$
@ -699,7 +863,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_bonds() OWNER TO #!variable!user!#;
ALTER FUNCTION history_bonds() OWNER TO admin;
CREATE TRIGGER trigger_bonds
AFTER INSERT OR UPDATE ON bonds
@ -717,7 +881,7 @@ CREATE TABLE bridges (
FOREIGN KEY(bridge_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE bridges OWNER TO #!variable!user!#;
ALTER TABLE bridges OWNER TO admin;
CREATE TABLE history.bridges (
history_id bigserial,
@ -728,7 +892,7 @@ CREATE TABLE history.bridges (
bridge_stp_enabled text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.bridges OWNER TO #!variable!user!#;
ALTER TABLE history.bridges OWNER TO admin;
CREATE FUNCTION history_bridges() RETURNS trigger
AS $$
@ -756,7 +920,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_bridges() OWNER TO #!variable!user!#;
ALTER FUNCTION history_bridges() OWNER TO admin;
CREATE TRIGGER trigger_bridges
AFTER INSERT OR UPDATE ON bridges
@ -778,7 +942,7 @@ CREATE TABLE ip_addresses (
FOREIGN KEY(ip_address_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE ip_addresses OWNER TO #!variable!user!#;
ALTER TABLE ip_addresses OWNER TO admin;
CREATE TABLE history.ip_addresses (
history_id bigserial,
@ -793,7 +957,7 @@ CREATE TABLE history.ip_addresses (
ip_address_dns text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.ip_addresses OWNER TO #!variable!user!#;
ALTER TABLE history.ip_addresses OWNER TO admin;
CREATE FUNCTION history_ip_addresses() RETURNS trigger
AS $$
@ -827,7 +991,7 @@ BEGIN
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_ip_addresses() OWNER TO #!variable!user!#;
ALTER FUNCTION history_ip_addresses() OWNER TO admin;
CREATE TRIGGER trigger_ip_addresses
AFTER INSERT OR UPDATE ON ip_addresses
@ -848,7 +1012,7 @@ CREATE TABLE updated (
FOREIGN KEY(updated_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE updated OWNER TO #!variable!user!#;
ALTER TABLE updated OWNER TO admin;
-- To avoid "waffling" when a sensor is close to an alert (or cleared) threshold, a gap between the alarm
@ -865,7 +1029,7 @@ CREATE TABLE alert_sent (
FOREIGN KEY(alert_sent_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE updated OWNER TO #!variable!user!#;
ALTER TABLE updated OWNER TO admin;
-- This stores state information, like the whether migrations are happening and so on.
@ -878,4 +1042,4 @@ CREATE TABLE states (
FOREIGN KEY(state_host_uuid) REFERENCES hosts(host_uuid)
);
ALTER TABLE states OWNER TO #!variable!user!#;
ALTER TABLE states OWNER TO admin;

@ -541,6 +541,7 @@ The md5sum of: [#!variable!file!#] has changed since the daemon started.
</key>
<key name="log_0251">Reading the scan agent: [#!variable!agent_name!#]'s words file: [#!variable!file!#].</key>
<key name="log_0252">Running the scan agent: [#!variable!agent_name!#] with a timeout of: [#!variable!timeout!#] seconds now...</key>
<key name="log_0253">The database user is not 'admin'. Changing table and function ownerships to: [#!variable!database_user!#].</key>
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->
<key name="t_0000">Test</key>

@ -965,6 +965,8 @@ sub update_install_source
$last_stdout_line = $this_stdout_line;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { last_stdout_line => $last_stdout_line }});
### TODO: This isn't good enough. If a package is missing, for
### example, the group will be skipped silently.
if ($line =~ /^Error: /)
{
$error_out .= $line."\n";
@ -1050,10 +1052,21 @@ sub load_packages
{
my ($anvil) = @_;
### NOTE:
### python3-rpm, rpm, rpm-build-libs, rpm-libs, rpm-plugin-selinux, rpm-sign-libs
# Read in any packages the user wants us to add.
$anvil->data->{packages}{users} = [];
if ((exists $anvil->data->{striker}{repo}{'extra-packages'}) && ($anvil->data->{striker}{repo}{'extra-packages'}))
{
foreach my $package (split/,/, $anvil->data->{striker}{repo}{'extra-packages'})
{
$package =~ s/^\s+//;
$package =~ s/\s+$//;
next if $package eq "";
push @{$anvil->data->{packages}{users}}, $package
}
}
### TODO: These need to be sorted into groups by their first letter, and those groups need to go under Packages
### TODO: Update this for EL8
# This is the list of packages we need to download.
$anvil->data->{packages} = {
a => [

Loading…
Cancel
Save