# disable debuginfo %define debug_package %{nil} %define pkgconfdir %{_sysconfdir}/%{name}.d %if 0%{?rhel} == 7 || 0%{?epel} == 7 %bcond_without python2 %else %bcond_with python2 %endif Name: miniascape Version: 0.3.12.20221117 Release: 1%{?dist} Summary: Personal cloud building tool License: GPLv3+ URL: https://github.com/ssato/miniascape Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if %{with python2} BuildRequires: python2 BuildRequires: python2-devel BuildRequires: python2-setuptools # for pygettext.py: BuildRequires: python2-tools %else BuildRequires: python3 BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-tools %endif %if %{with python2} Requires: python2-anyconfig >= 0.0.7 Requires: python2-anytemplate >= 0.0.5 %else Requires: python3-anyconfig >= 0.0.7 Requires: python3-anytemplate >= 0.0.5 %endif Obsoletes: miniascape-data-default <= 0.3.7 Obsoletes: miniascape-data-default-devel <= 0.3.7 %description Personal cloud building tool for libvirt/KVM. %prep %autosetup %build %if %{with python2} %py2_build %else %py3_build %endif %install %if %{with python2} %py2_install test -d %{buildroot}/%{_bindir} || { install -d %{buildroot}/%{_bindir} cat << EOF > %{buildroot}/%{_bindir}/miniascape #! /usr/bin/python import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('miniascape', 'console_scripts', 'miniascape_cli')() ) EOF } chmod +x %{buildroot}/%{_bindir}/miniascape %else %py3_install %endif # Hack to setup symlinks: #for d in %{buildroot}%{_sysconfdir}/miniascape.d/{hacluster,openshift,openstack,rhui}; do # for f in 00_base.yml 10_networks.yml; do # (cd $d && test -f $f && ln -sf ../default/$f ./ || :) # done # for f in 00_includes; do (cd $d && test -d $f && rm -rf $f && ln -sf ../default/$f ./ || :); done #done # Generate some file lists: find %{buildroot}/%{_datadir}/%{name}/templates -type f | \ sed "s,%{buildroot},,g" > templates.list sites="default openshift openstack rhui" for site in $sites; do \ find %{buildroot}/%{pkgconfdir}/${site} -type f | \ sed "s,%{buildroot},,g" > ${site}.conf.list; done rm -f default.list && \ cat templates.list *.conf.list >> files.list # Remove tests; it's useless maybe. %if %{with python2} rm -rf %{buildroot}%{_datadir}/%{name}/tests %{buildroot}%{python2_sitelib}/%{name}/tests %else rm -rf %{buildroot}%{_datadir}/%{name}/tests %{buildroot}%{python3_sitelib}/%{name}/tests %endif %files -f files.list %defattr(-,root,root,-) %doc README.rst %{_bindir}/* %config %{pkgconfdir}/*/*.j2 %config %{pkgconfdir}/*/*.yml %config %{pkgconfdir}/*/*/*.j2 %config %{pkgconfdir}/*/*/*.yml %dir %{pkgconfdir}/*/00_includes %if %{with python2} %{python2_sitelib}/* %else %{python3_sitelib}/* %endif %changelog * Sun Jun 1 2019 Satoru SATOH - 0.3.12-1 - New upstream - Clean up packaging stufff * Mon Jun 15 2015 Satoru SATOH - 0.3.11-1 - Split some default config files and make them merged on build time with using template config support in anyconfig - Added a runtime dependency to python-anytemplate - Added RHEL 7 cluster nodes, normal guests, JBoss EAP 6.x nodes, Satellite 6 nodes and so on - Fine tunes in VM build scripts - Change the default installation data source from http to iso (local) - Fix flake8 and pylint errors and warnings - Add some more template tests - A lot of minor fixes and enhancements in templates * Wed Jul 23 2014 Satoru SATOH - 0.3.10-1 - Add basic application tests runner script - Add application test cases of the site, default, openstack and rhui - Fix a syntax error in a template, templates/autoinstall.d/rhel-min-ks.cfg * Wed Jul 23 2014 Satoru SATOH - 0.3.9-1 - Make some packages removed (-data-default-*) marked as obsoleted - Do not add --activate option for the anaconda option 'network' if number of nics are one - Basically, it's just a maintainance release * Mon Jul 14 2014 Satoru SATOH - 0.3.8-1 - Make storage volumes created on ahead of virt-install run - Fix packaging bug in the RPM spec generated for KVM host - Switch from gevent to multiprocessing to accomplish async template rendering and remove runtime dependency to gevent - Fix miniascape.host.gen_vnet_files and corresponding template to list hosts having unique IPs in generated network xml files - Remove dependency to python-jinja2-cli by copying necessary files from it - Add RHUI related templates again - Add data-openstack sub package - Refactor and re-organize sub commands; now there is only two sub commands (bootstrap and configure == build) - Removed intermediate config files after 'configure' (w/o build) run as these are no more necessary - Removed sub packages contain intermediate config files, etc. - [templates] Apply enhancements and fixes for RHUI - [templates] Add templates for 'bootstrap' sub command - [templates] Add some more module options of kvm for nested kvm support - Enhanced the test driver script to run flake8 and pylint tests - Some more fixes and enhancements * Wed Dec 11 2013 Satoru SATOH - 0.3.7-1 - Added --dryrun option - Add -f (force) option to generate config files always - Added some more templates to make RPMs of generated configuration for hosts and VMs, and build scripts for VMs - Fixed a couple of bugs in templates/host/guest_network_register.sh that is a template to register guest IP and FQDN entries - Merge virtio-scsi support code in templates/host/vmbuild.sh; now virtio-scsi is used for RHEL 6 guests by default - Add runtime dependency to gevent to accomplish async calls - Add openstack and satellite 6 related guests and network templates and configuration files - Enabled sshd and nfs service by default for RHEV manager guests - Make dhcp configuration parameters optional and allow configuration entirely missing dhcp related parameters for fix-IPs only networks - Some more fix for PEP8 errors and warnings * Thu Mar 14 2013 Satoru SATOH - 0.3.6-1 - Change default location of installation tree - Utilize anyconfig.{load,dump} instead of yaml.{load,dump} which brings another runtime dependency to python-anyconfig - Fix --confdir behavior and find conf from dir correctly - Some refactorings and code cleanups * Wed Feb 13 2013 Satoru SATOH - 0.3.5-1 - Added a set of JBoss AS 7 guests' config and template files - Added RHEV Manager and Hypervisor guests' config and template files - Added 'ssh.pubkey' to install it as guest:/root/.ssh/authorized_keys - Fixed some bugs in Red Hat Cluster and GFS guests' data - Fixed a bug that files for host not generated except for network files - Some RPM SPEC cleanups; removed some dupliated files in %files, etc. - Removed RHUI related guests data; now these are kept maintained at https://github.com/ssato/miniascape-data-default-rhui - Switched template rendering module from python-jinja2-cui to python-jinja2-cli * Wed Dec 12 2012 Satoru SATOH - 0.3.4-1 - Splitted into some RPMs and separated miniascape and its data files - Fixed bugs in RHUI guests' data - Fixed and enhanced GFS guests' data to make it works w/ just few config steps - Fixed a bug that files for host not generated except for network files * Thu Nov 29 2012 Satoru SATOH - 0.3.3-1 - Added some more VM configs and templates such like RHEL 6 LVS and Real servers - Replaced simple and hardcoded conf search paths w/ config-based (metaconfig) - Re-organized modules relations and do some refacotrings - A lot of cleanup and bug fixes in templates and configs * Fri Sep 21 2012 Satoru SATOH - 0.3.2-1 - Fixed a bug in miniascape.guest lacks of the module import line - Added some more VM configs and templates such like RHEL 6 cluster, RHUI clients - Implemented duplicate entries check for IP and MAC address in guest configs - A lot of cleanup and bug fixes in templates and configs - And misc bug fixed and enhancements * Fri Sep 7 2012 Satoru SATOH - 0.3.1-1 - Allow multiple configurations per guest and splitted some guests config - Fixed whitespaces problme in some templates such as vmbuild.sh - Added some hacks to create multi disk images, avoiding issue of rhbz#857424 - Made it depends on the latest python-jinja2-cui >= 0.0.3.12 - Fixed files list in rpm spec * Thu Aug 30 2012 Satoru SATOH - 0.3.0-1 - Initial packaging