├── engine-appliance ├── .gitignore ├── kiwi │ ├── root │ │ ├── etc │ │ │ ├── cloud │ │ │ │ └── cloud.cfg.d │ │ │ │ │ └── 42_ovirt_appliance.cfg │ │ │ └── fstab.script │ │ └── root │ │ │ └── ovirt-engine-answers │ ├── config.sh │ ├── almalinux9.xml │ ├── almalinux10.xml │ ├── centos9.xml │ ├── centos10.xml │ ├── packages.xml │ └── default.xml ├── docs │ ├── ks-examples │ │ └── interactive-installation.ks.in │ └── introduction.md ├── README.md ├── data │ └── ovirt-engine-appliance.spec.in ├── Makefile └── tests │ └── testImage.py ├── CODEOWNERS ├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .github ├── pull_request_template.md ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── bug_report.md │ └── request-for-enhancement.md └── workflows │ └── build.yml ├── .gitignore ├── README.md └── LICENSE /engine-appliance/.gitignore: -------------------------------------------------------------------------------- 1 | *.ova 2 | *.qcow2 3 | *.spec 4 | *.ks 5 | tmp.repos 6 | ovirt-engine-appliance-*-manifest-rpm 7 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Add your team name or single maintainers with push access to your repository here 2 | * @dupondje @sandrobonazzola 3 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/ovirt/buildcontainer:almalinux10 2 | 3 | # Enable EPEL 4 | RUN dnf install -y epel-release 5 | 6 | # Install KIWI and other dependencies 7 | RUN dnf install -y kiwi-cli -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "dockerfile": "Dockerfile" 4 | }, 5 | "privileged": true, 6 | "mounts": [ 7 | "source=/dev/,target=/dev/,type=bind,consistency=cached" 8 | ] 9 | } -------------------------------------------------------------------------------- /engine-appliance/kiwi/root/etc/cloud/cloud.cfg.d/42_ovirt_appliance.cfg: -------------------------------------------------------------------------------- 1 | # Enable ssh pwauth by default. This ensures that ssh_pwauth is 2 | # even enabled when cloud-init does not find a seed. 3 | ssh_pwauth: True 4 | network: 5 | config: disabled -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Fixes issue # (delete if not relevant) 2 | 3 | ## Changes introduced with this PR 4 | 5 | * 6 | 7 | * 8 | 9 | * 10 | 11 | ## Are you the owner of the code you are sending in, or do you have permission of the owner? 12 | 13 | [y/n] -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iso 2 | *.img 3 | *.qcow2 4 | *.tmp 5 | Makefile 6 | .gitignore 7 | *.log 8 | *~ 9 | # IDE files 10 | ########################### 11 | .settings 12 | .project 13 | .classpath 14 | .factorypath 15 | .externalToolBuilders 16 | maven-eclipse.xml 17 | *.ipr 18 | *.iml 19 | .idea 20 | .pydevproject 21 | *.pyc 22 | *.pyo 23 | *manifest* 24 | *..swp 25 | .index 26 | .treeinfo 27 | vmlinuz 28 | -------------------------------------------------------------------------------- /engine-appliance/kiwi/root/etc/fstab.script: -------------------------------------------------------------------------------- 1 | sed -i '/\/dev\/ovirt\/home /s/defaults/nodev/g' /etc/fstab 2 | sed -i '/\/dev\/ovirt\/tmp /s/defaults/nodev,noexec,nosuid/g' /etc/fstab 3 | sed -i '/\/dev\/ovirt\/var /s/defaults/nodev/g' /etc/fstab 4 | sed -i '/\/dev\/ovirt\/vartmp /s/defaults/nodev,noexec,nosuid/g' /etc/fstab 5 | sed -i '/\/dev\/ovirt\/log /s/defaults/nodev/g' /etc/fstab 6 | sed -i '/\/dev\/ovirt\/audit /s/defaults/nodev/g' /etc/fstab -------------------------------------------------------------------------------- /engine-appliance/docs/ks-examples/interactive-installation.ks.in: -------------------------------------------------------------------------------- 1 | selinux --permissive 2 | network --bootproto=dhcp --hostname=engine 3 | 4 | firstboot --disable 5 | services --disable=cloud-init 6 | 7 | liveimg --url=@SQUASHFS_URL@ 8 | 9 | %post 10 | # services (above) does not seem to work correctly 11 | # We assume that cloud-init is not needed when we do 12 | # an interactive installation. 13 | systemctl stop cloud-init 14 | systemctl disable cloud-init 15 | %end 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: oVirt Mailing Lists 4 | url: https://lists.ovirt.org/archives/ 5 | about: Join us on the mailing list for more conversations and community support 6 | - name: oVirt User Documentation 7 | url: https://ovirt.org/documentation/ 8 | about: Documentation for oVirt users 9 | - name: oVirt Developer Documentation 10 | url: https://ovirt.org/develop/devdocs.html 11 | about: Documentation for oVirt developers -------------------------------------------------------------------------------- /engine-appliance/kiwi/config.sh: -------------------------------------------------------------------------------- 1 | authselect select minimal 2 | firewall --enabled --service=cockpit 3 | systemctl enable sshd 4 | systemctl enable fstrim.timer 5 | systemctl enable cockpit.socket 6 | systemctl enable qemu-guest-agent 7 | 8 | # Install oVirt Packages 9 | dnf -y install ovirt-engine \ 10 | ovirt-engine-dwh \ 11 | ovirt-provider-ovn \ 12 | ovirt-engine-extension-aaa-ldap \ 13 | ovirt-engine-extension-aaa-ldap-setup \ 14 | ovirt-engine-extension-aaa-misc -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is 12 | 13 | **To reproduce** 14 | Steps to reproduce the behavior 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem 21 | 22 | **Additional context** 23 | Add any other context about the problem here 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/request-for-enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request for enhancement 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # oVirt Engine Appliance 2 | 3 | Welcome to the oVirt Engine Appliance source repository. 4 | This repository is hosted on [GitHub:ovirt-appliance](https://github.com/oVirt/ovirt-appliance). 5 | The build artifacts (rpm), unlike most of the other oVirt projects, are in https://resources.ovirt.org/repos/ovirt/github-ci/ovirt-appliance/ 6 | 7 | ## How to contribute 8 | 9 | All contributions are welcome - patches, bug reports, and documentation issues. 10 | 11 | ### Submitting patches 12 | 13 | Please submit patches to [GitHub:ovirt-appliance](https://github.com/oVirt/ovirt-appliance). 14 | If you are not familiar with the process, you can read about [collaborating with pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests) on the GitHub website. 15 | 16 | ### Found a bug or documentation issue? 17 | 18 | To submit a bug or suggest an enhancement for oVirt Engine Appliance please use GitHub 19 | [issues](https://github.com/oVirt/ovirt-appliance/issues). If you find a documentation issue on the oVirt website, please navigate to the page footer and click "Report an issue on GitHub". 20 | 21 | ## Still need help? 22 | 23 | If you have any other questions or suggestions, you can join and contact us on the [oVirt Users forum / mailing list](https://lists.ovirt.org/admin/lists/users.ovirt.org/). 24 | -------------------------------------------------------------------------------- /engine-appliance/kiwi/root/root/ovirt-engine-answers: -------------------------------------------------------------------------------- 1 | # Answers 2 | [environment:default] 3 | OVESETUP_CORE/engineStop=none:None 4 | OVESETUP_DIALOG/confirmSettings=bool:True 5 | OVESETUP_DB/database=str:engine 6 | OVESETUP_DB/fixDbViolations=none:None 7 | OVESETUP_DB/secured=bool:False 8 | OVESETUP_DB/securedHostValidation=bool:False 9 | OVESETUP_DB/host=str:localhost 10 | OVESETUP_DB/user=str:engine 11 | OVESETUP_DB/port=int:5432 12 | OVESETUP_DWH_CORE/enable=bool:True 13 | OVESETUP_DWH_CONFIG/dwhDbBackupDir=str:/var/lib/ovirt-engine-dwh/backups 14 | OVESETUP_DWH_PROVISIONING/postgresProvisioningEnabled=bool:True 15 | OVESETUP_DWH_DB/secured=bool:False 16 | OVESETUP_DWH_DB/host=str:localhost 17 | OVESETUP_ENGINE_CORE/enable=bool:True 18 | OVESETUP_SYSTEM/nfsConfigEnabled=bool:False 19 | OVESETUP_SYSTEM/memCheckEnabled=bool:False 20 | OVESETUP_CONFIG/applicationMode=str:both 21 | OVESETUP_CONFIG/firewallManager=str:firewalld 22 | OVESETUP_CONFIG/storageType=str:nfs 23 | OVESETUP_CONFIG/sanWipeAfterDelete=bool:False 24 | OVESETUP_CONFIG/updateFirewall=bool:True 25 | OVESETUP_CONFIG/websocketProxyConfig=bool:True 26 | OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:True 27 | OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:True 28 | OVESETUP_APACHE/configureRootRedirection=bool:True 29 | OVESETUP_APACHE/configureSsl=bool:True 30 | OSETUP_RPMDISTRO/requireRollback=none:None 31 | OSETUP_RPMDISTRO/enableUpgrade=none:None 32 | QUESTION/1/OVESETUP_IGNORE_SNAPSHOTS_WITH_OLD_COMPAT_LEVEL=str:yes 33 | -------------------------------------------------------------------------------- /engine-appliance/README.md: -------------------------------------------------------------------------------- 1 | 2 | oVirt Virtual Appliance 3 | ======================= 4 | 5 | KIWI files to build the oVirt Engine Virtual Appliance. 6 | 7 | 8 | Cloud init support 9 | ------------------ 10 | 11 | Cloud init is a service that allows to pre configure the image on first run using external file 12 | 13 | The big all reference for the advanced staff and what cloud init is : 14 | 15 | 16 | 17 | Setting hostname and root password in a nutshell 18 | ------------------------------------------------ 19 | 20 | 21 | The following is only a simple example , please make your own and use your own password 22 | 23 | Create the user-data and meta-data files 24 | ``` 25 | cat < user-data 26 | #cloud-config 27 | chpasswd: 28 | list: | 29 | root: yourpassword 30 | expire: False 31 | EOF 32 | cat < meta-data 33 | instance-id: ovirt-engine 34 | local-hostname: ovirt-engine 35 | EOF 36 | ``` 37 | 38 | 39 | You should change the root password in the user-data file (clear text) 40 | 41 | Create an iso from those two files: 42 | 43 | $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data 44 | 45 | Attach the iso to the ovirt-appliance VM on first boot. 46 | 47 | Boot 48 | 49 | Your root password is now "yourpassword" 50 | 51 | Build 52 | ----- 53 | You will need 54 | 55 | * an internet connection 56 | * at least CentOS 9+ 57 | * 5 GB of ram 58 | * 100 GB of disk 59 | 60 | Then: 61 | ``` 62 | cd engine-appliance; kiwi-ng --debug --profile=qcow2 --kiwi-file=centos9.xml system build --description=kiwi/ --target-dir=build 63 | ``` 64 | 65 | Where you can replace centos9.xml with centos10.xml if you want to build a CentOS 10 qcow2. 66 | Or almalinux9.xml/almalinux10.xml for AlmaLinux 9 / AlmaLinux 10 qcow2 image. -------------------------------------------------------------------------------- /engine-appliance/kiwi/almalinux9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | oVirt Developers 6 | devel@ovirt.org 7 | oVirt Appliance - AlmaLinux 9 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /engine-appliance/kiwi/almalinux10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | oVirt Developers 6 | devel@ovirt.org 7 | oVirt Appliance - AlmaLinux 10 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /engine-appliance/data/ovirt-engine-appliance.spec.in: -------------------------------------------------------------------------------- 1 | Name: ovirt-engine-appliance-@DISTRO@ 2 | Version: @VERSION@ 3 | Release: @RELEASE@%{?dist}%{?extra_release} 4 | License: GPLv2 5 | Summary: The oVirt Engine Appliance image (qcow2) 6 | Group: Applications/System 7 | URL: https://www.ovirt.org/ 8 | Source0: @QCOW2FILENAME@ 9 | Source1: ovirt-engine-appliance-@DISTRO@-manifest-rpm 10 | BuildArch: x86_64 11 | 12 | BuildRequires: grep 13 | 14 | Provides: ovirt-engine-appliance = @VERSION@ 15 | 16 | %global _he_discovery_dir /etc/ovirt-hosted-engine/ 17 | %global _he_discovery_file %{_he_discovery_dir}/10-appliance-@DISTRO@.conf 18 | 19 | %global _appliance_dir /usr/share/ovirt-engine-appliance 20 | %global _appliance_file %{_appliance_dir}/%{name}-%{version}-%{release}.qcow2 21 | 22 | %description 23 | This package contains the prebuild oVirt Engine appliance image. It is intended to 24 | be used with hosted-engine setup. 25 | 26 | %prep 27 | cp %{SOURCE1} . 28 | 29 | %build 30 | 31 | %install 32 | rm -rf %{buildroot} 33 | # Install the appliance image 34 | /usr/bin/install -d %{buildroot}/%{_appliance_dir} 35 | /usr/bin/install -m 644 %{SOURCE0} %{buildroot}/%{_appliance_file} 36 | 37 | # Install the snippet for the discovery by hosted-engine-setup 38 | /usr/bin/install -d %{buildroot}/%{_he_discovery_dir} 39 | cat > %{buildroot}/%{_he_discovery_file} < - 4.5.1 56 | - Update package names to include distro. 57 | This way we can easily distribute different OS versions. 58 | For now this is AlmaLinux 9/10 and CentOS Stream 9/10 59 | 60 | * Tue Sep 07 2021 Sandro Bonazzola - 4.5 61 | - oVirt Engine Appliance 4.5 62 | -------------------------------------------------------------------------------- /engine-appliance/kiwi/centos9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | oVirt Developers 6 | devel@ovirt.org 7 | oVirt Appliance - CentOS Stream 9 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /engine-appliance/kiwi/centos10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | oVirt Developers 6 | devel@ovirt.org 7 | oVirt Appliance - CentOS Stream 10 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /engine-appliance/kiwi/packages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /engine-appliance/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ARCH=x86_64 3 | VERSION=4.5.1 4 | DISTRO ?= centos 5 | DISTRO_VERSION ?= 9 6 | DISTRO_FULLNAME := $(DISTRO)$(DISTRO_VERSION) 7 | PROFILE ?= copr 8 | 9 | # 10 | # oVirt specific vars 11 | # 12 | ovirt-engine-appliance-${DISTRO_FULLNAME}.spec: VERSION_EXTRA= 13 | ovirt-engine-appliance-${DISTRO_FULLNAME}.spec: RELEASE=$(shell date +%Y%m%d%H%M%S).1 14 | ovirt-engine-appliance-${DISTRO_FULLNAME}.spec: QCOW2FILENAME=ovirt-engine-appliance-${DISTRO_FULLNAME}.qcow2 15 | 16 | PYTHON ?= python3 17 | 18 | export LIBGUESTFS_BACKEND=direct 19 | export TMPDIR=/var/tmp/ 20 | 21 | .SECONDARY: 22 | .PHONY: ovirt-engine-appliance.spec 23 | 24 | all: ovirt-engine-appliance-${DISTRO_FULLNAME}.qcow2 25 | echo "$@" appliance done 26 | 27 | %.qcow2: 28 | $(SUDO) kiwi-ng --profile=${DISTRO}-${PROFILE} --kiwi-file=${DISTRO_FULLNAME}.xml system build --description=kiwi/ --target-dir=${TMPDIR}/${DISTRO_FULLNAME} 29 | mv ${TMPDIR}/${DISTRO_FULLNAME}/ovirt-engine-appliance.${ARCH}-$(VERSION).qcow2 $@ 30 | ls -shal $@ 31 | 32 | ovirt-engine-appliance-${DISTRO_FULLNAME}.spec: data/ovirt-engine-appliance.spec.in 33 | sed \ 34 | -e "s/@DISTRO@/$(DISTRO_FULLNAME)/" \ 35 | -e "s/@VERSION@/$(VERSION)$(VERSION_EXTRA)/" \ 36 | -e "s/@RELEASE@/$(RELEASE)/" \ 37 | -e "s/@QCOW2FILENAME@/$(QCOW2FILENAME)/" \ 38 | $< > $@ 39 | 40 | %.rpm: %.spec 41 | rpmbuild --define "_sourcedir `pwd`" -ba $< 42 | 43 | RPMBUILD = rpmbuild 44 | TMPREPOS = tmp.repos 45 | rpm srpm: ovirt-engine-appliance-${DISTRO_FULLNAME}.spec ovirt-engine-appliance-${DISTRO_FULLNAME}.qcow2 ovirt-engine-appliance-${DISTRO_FULLNAME}-manifest-rpm 46 | rm -fr "$(TMPREPOS)" 47 | mkdir -p $(TMPREPOS)/{SPECS,RPMS,SRPMS,SOURCES} 48 | $(RPMBUILD) --define="_topdir `pwd`/$(TMPREPOS)" --define "_sourcedir `pwd`" -ba $< 49 | @echo 50 | @echo "srpm and rpm(s) available at '$(TMPREPOS)'" 51 | @echo 52 | 53 | %-manifest-rpm: %.qcow2 54 | mv ${TMPDIR}/${DISTRO_FULLNAME}/ovirt-engine-appliance.${ARCH}-$(VERSION).packages $@ 55 | 56 | clean: 57 | rm -vf ovirt-engine-appliance-${DISTRO_FULLNAME}.qcow2 ovirt-engine-appliance-${DISTRO_FULLNAME}.spec ovirt-engine-appliance-${DISTRO_FULLNAME}-manifest-rpm 58 | rm -rvf ${TMPDIR}/${DISTRO_FULLNAME} 59 | rm -rvf tmp.repos 60 | -------------------------------------------------------------------------------- /engine-appliance/tests/testImage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright 2025 oVirt Developers 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # 20 | # Refer to the README and COPYING files for full details of the license 21 | # 22 | 23 | from logging import error 24 | import unittest 25 | import sh 26 | from sh import guestfish 27 | import os 28 | 29 | 30 | # Increase the capture length of python-sh to show complete errors 31 | sh.ErrorReturnCode.truncate_cap = 999999 32 | 33 | 34 | qcowimg = os.environ.get("TEST_ENGINE_ROOTFS_IMG", 35 | "ovirt-engine-appliance.qcow2") 36 | 37 | 38 | @unittest.skipUnless(os.path.exists(qcowimg), "qcow2 is missing") 39 | class TestRootfsQcow2Image(unittest.TestCase): 40 | _fish = guestfish.bake("-ia", qcowimg, _ok_code=[0, 1]) 41 | sh = _fish.bake("sh") 42 | 43 | def test_package(self): 44 | """Ensure the main packages are installed 45 | """ 46 | req_pkgs = ["ovirt-engine", "qemu-guest-agent"] 47 | 48 | def has_pkg(pkg): 49 | try: 50 | self.sh("rpm -q " + pkg) 51 | except Exception as e: 52 | error("Package is missing: %s (%s)" % (pkg, e)) 53 | return False 54 | return True 55 | 56 | for rpkg in req_pkgs: 57 | self.assertTrue(has_pkg(rpkg)) 58 | 59 | def test_selinux_denials(self): 60 | """Ensure that there are no denials righ after appliance creation 61 | """ 62 | denials = self.sh("grep denied /var/log/audit/audit.log").splitlines() 63 | assert len(denials) == 0, \ 64 | "To many denials: %s\n%s" % (len(denials), denials) 65 | 66 | # vim: et ts=4 sw=4 sts=4 67 | -------------------------------------------------------------------------------- /engine-appliance/kiwi/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 4.5.1 27 | dnf4 28 | charge 29 | en_US 30 | us 31 | UTC 32 | true 33 | true 34 | 35 | 36 | 46 | 47 | 48 | 49 | false 50 | true 51 | swap 52 | 8192 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build 3 | permissions: 4 | issues: write 5 | pull-requests: read 6 | contents: read 7 | 8 | on: 9 | workflow_dispatch: 10 | inputs: 11 | keep_workdir: 12 | description: keeps the working dir on the runner after the job is finished 13 | required: false 14 | distro-variant: 15 | description: Build with CBS or COPR packages. Use "cbs" or "copr". 16 | required: true 17 | default: "copr" 18 | push: 19 | branches: [master] 20 | schedule: 21 | # Running every morning in EMEA timezone 22 | - cron: '0 6 * * *' 23 | 24 | jobs: 25 | build-matrix: 26 | timeout-minutes: 80 27 | strategy: 28 | fail-fast: false 29 | matrix: 30 | build-os: ['el9', 'el10'] 31 | target-os: ['el9stream', 'el10stream', 'almalinux9', 'almalinux10'] 32 | include: 33 | - build-os: el9 34 | container: el9stream 35 | - build-os: el10 36 | container: el10stream 37 | - target-os: el9stream 38 | os: centos 39 | num: 9 40 | - target-os: el10stream 41 | os: centos 42 | num: 10 43 | - target-os: almalinux9 44 | os: almalinux 45 | num: 9 46 | - target-os: almalinux10 47 | os: almalinux 48 | num: 10 49 | name: build ${{ matrix.target-os }} on ${{ matrix.build-os }} - ${{ github.event.inputs.distro-variant == '' && 'copr' || github.event.inputs.distro-variant }} 50 | runs-on: [image-builders] 51 | container: 52 | image: quay.io/ovirt/buildcontainer:${{ matrix.container }} 53 | options: --privileged 54 | volumes: 55 | - /dev:/dev 56 | 57 | steps: 58 | - name: Install Kiwi 59 | run: | 60 | dnf install -y epel-release 61 | dnf install -y kiwi-cli 62 | 63 | - uses: ovirt/checkout-action@main 64 | with: 65 | fetch-depth: 0 66 | 67 | - name: Build the qcow2 image 68 | run: | 69 | cd engine-appliance 70 | make DISTRO=${{ matrix.os }} DISTRO_VERSION=${{ matrix.num }} PROFILE=${{ github.event.inputs.distro-variant == '' && 'copr' || github.event.inputs.distro-variant }} 71 | 72 | - name: Build RPM 73 | run: | 74 | cd engine-appliance 75 | make DISTRO=${{ matrix.os }} DISTRO_VERSION=${{ matrix.num }} PROFILE=${{ github.event.inputs.distro-variant == '' && 'copr' || github.event.inputs.distro-variant }} rpm 76 | 77 | - name: Upload rpm to resources.ovirt.org 78 | uses: ovirt/ovirt-resources-upload-action@main 79 | with: 80 | username: ${{ secrets.SSH_USERNAME_FOR_RESOURCES_OVIRT_ORG }} 81 | key: ${{ secrets.SSH_KEY_FOR_RESOURCES_OVIRT_ORG }} 82 | known_hosts: ${{ secrets.KNOWN_HOSTS_FOR_RESOURCES_OVIRT_ORG }} 83 | source: engine-appliance/tmp.repos/RPMS/x86_64/*.rpm 84 | target: github-ci/ovirt-appliance-${{ github.event.inputs.distro-variant == '' && 'copr' || github.event.inputs.distro-variant }}/${{ matrix.build-os }} 85 | cleanup: yes 86 | # keep 4 last builds + repodata 87 | keep_files_count: 17 88 | 89 | - name: Upload manifest to github 90 | uses: actions/upload-artifact@v4 91 | with: 92 | name: "manifest-${{ matrix.build-os }}-${{ matrix.target-os }}" 93 | path: engine-appliance/ovirt-engine-appliance-${{ matrix.os }}${{ matrix.num}}-manifest-rpm 94 | 95 | - name: Clean up entire workdir 96 | if: always() 97 | run: | 98 | [[ -z "${{ github.event.inputs.keep_workdir }}" ]] && rm -rf $PWD/* 99 | 100 | createrepo-matrix: 101 | strategy: 102 | fail-fast: false 103 | matrix: 104 | build-os: ['el9', 'el10'] 105 | runs-on: ubuntu-latest 106 | needs: 107 | - build-matrix 108 | steps: 109 | - name: Create or update repository metadata 110 | uses: ovirt/ovirt-resources-upload-action@main 111 | with: 112 | username: ${{ secrets.SSH_USERNAME_FOR_RESOURCES_OVIRT_ORG }} 113 | key: ${{ secrets.SSH_KEY_FOR_RESOURCES_OVIRT_ORG }} 114 | known_hosts: ${{ secrets.KNOWN_HOSTS_FOR_RESOURCES_OVIRT_ORG }} 115 | target: github-ci/ovirt-appliance-${{ github.event.inputs.distro-variant == '' && 'copr' || github.event.inputs.distro-variant }}/${{ matrix.build-os }} 116 | createrepo: yes 117 | 118 | close-build-issue-on-success: 119 | name: Report workflow success 120 | runs-on: ubuntu-latest 121 | needs: 122 | - build-matrix 123 | - createrepo-matrix 124 | steps: 125 | - name: Checkout 126 | uses: ovirt/checkout-action@main 127 | - name: Add a comment about successful job and close issue 128 | run: | 129 | set -e 130 | LABEL="build-failed" 131 | ISSUENO=$(gh issue list -l $LABEL | awk ' { print $1 } ' | head -n 1) 132 | if [ -n "$ISSUENO" ]; then 133 | MESSAGE="✅ The oVirt Appliance build CI job is now [successful](https://github.com/oVirt/ovirt-appliance/actions/runs/${{ github.run_id }}), closing issue." 134 | gh issue comment "${ISSUENO}" --body "${MESSAGE}" 135 | gh issue close "${ISSUENO}" 136 | fi 137 | env: 138 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 139 | 140 | open-build-issue-on-failure: 141 | name: Report workflow failure 142 | runs-on: ubuntu-latest 143 | if: ${{ always() && ((needs.build-matrix.result=='failure') || (needs.createrepo-matrix.result=='failure')) }} 144 | needs: 145 | - build-matrix 146 | - createrepo-matrix 147 | 148 | steps: 149 | - name: Checkout 150 | uses: ovirt/checkout-action@main 151 | - name: Add a comment about failed job 152 | run: | 153 | set -e 154 | TITLE="Failed oVirt Appliance build job" 155 | LABEL="build-failed" 156 | ISSUENO=$(gh issue list -l $LABEL | awk ' { print $1 } ' | head -n 1) 157 | if [ -z "$ISSUENO" ]; then 158 | MESSAGE="❌ The oVirt Appliance build CI job failed. [Please investigate.](https://github.com/oVirt/ovirt-appliance/actions/runs/${{ github.run_id }})" 159 | gh issue create --title "${TITLE}" --body "${MESSAGE}" --label "${LABEL}" 160 | else 161 | MESSAGE="❌ oVirt Appliance build CI job is still failing. [Please investigate.](https://github.com/oVirt/ovirt-appliance/actions/runs/${{ github.run_id }})" 162 | gh issue comment "${ISSUENO}" --body "${MESSAGE}" 163 | fi 164 | env: 165 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 166 | -------------------------------------------------------------------------------- /engine-appliance/docs/introduction.md: -------------------------------------------------------------------------------- 1 | Say Hello to the oVirt Virtual Appliance 2 | ======================================== 3 | 4 | One of the things on the list for oVirt 3.5 was the 5 | [oVirt Virtual Appliance][virtual-appliance]. 6 | _Huh, what's that?_ You might ask. Well, imagine a cloud image with oVirt 7 | Engine 3.5 and it's dependencies pre-installed, and a sane default answer file 8 | for `ovirt-engine-setup`. All of this delivered in an OVA file. 9 | The intention is to get you a running oVirt Engine without much hassle. 10 | 11 | Furthermore this appliance can be used in conjunction with 12 | the [Self Hosted Engine][hosted-engine] feature, 13 | and the upcoming [oVirt Node Hosted Engine plugin][he-plugin] 14 | (note the _Node_ within). 15 | 16 | Just as a reminder to myself: Hosted Engine is a feature 17 | where a VM containing the oVirt Engine instance is managed by itself. 18 | 19 | As you can find more informations about the oVirt Hosted Engine and 20 | oVirt Node Hosted Engine elsewhere, let me just drop a couple of words on the 21 | appliance. 22 | 23 | The appliance is based on the Fedora 19 cloud images, with some modifications 24 | and oVirt Engine packages pre-installed. An answer file can be used as a 25 | starting point for `engine-setup`. 26 | 27 | 28 | Quick Guide 29 | ----------- 30 | 31 | Build Download the appliance yourself 32 | 33 | # Get the sources 34 | $ git clone git://gerrit.ovirt.org/ovirt-appliance 35 | $ cd ovirt-appliance 36 | $ git submodule update --init 37 | $ cd engine-appliance 38 | 39 | $ setenforce 0 40 | 41 | # To only build the `.raw` image use: 42 | $ make ovirt-appliance-fedora.raw 43 | 44 | # And run the image: 45 | $ qemu-kvm -snapshot -m 4096 -smp 4 -hda ovirt-appliance-fedora.raw 46 | 47 | Inside the VM: 48 | 49 | * Wait a bit 50 | * Finish the `initial-setup` (set a root password and optionally add a user) 51 | 52 | and run: 53 | 54 | $ engine-setup --config-append=ovirt-engine-answers 55 | 56 | 57 | Building the virtual appliance 58 | ------------------------------ 59 | 60 | To build the appliance you need three ingredients: 61 | 62 | * The appliance kickstarts (kept in the ovirt-appliance repo) 63 | * A Fedora 19 boot.iso (or the netinstall iso) 64 | * `lorax` and `pykickstart` installed 65 | 66 | The build process can then be initiated by running: 67 | 68 | $ yum install lorax pykickstart virt-install oz 69 | $ git clone git://gerrit.ovirt.org/ovirt-appliance 70 | $ cd ovirt-appliance 71 | $ git submodule update --init 72 | $ cd engine-appliance 73 | 74 | $ setenforce 0 75 | 76 | # Build the .ova 77 | $ make 78 | 79 | # Or: To only build the `.raw` image (without sparsification/sysprep) use: 80 | $ make ovirt-appliance-fedora.raw 81 | 82 | The `.ova` build will actually go through the following steps: 83 | 84 | * Create a kickstart from the provided template 85 | * Pass the boot iso and kickstart to `livemedia-creator` (part of `lorax`) 86 | * sysprep, resize, sparsify and convert the intermediate image to OVA 87 | 88 | The `.ova` file now contains some metadata and the qcow2 image, to extarct the 89 | image run: 90 | 91 | $ mkdir out ; cd out 92 | $ tar xf ../ovirt-appliance-fedora.ova 93 | 94 | # Run the image: 95 | $ qemu-kvm -snapshot -m 4096 -smp 4 -hda images/*/!(*.meta) 96 | 97 | 98 | Running the virtual appliance 99 | ----------------------------- 100 | 101 | Once the image is build - an image called `ovirt-appliance-fedora.ova` should 102 | be in your working directory - you can point `hosted-engine-setup` to it, which 103 | will use it for the initial VM. 104 | If you want to try the imagine with qemu (or libvirt), just use the `.raw` 105 | image (also available in the current workingdir) and something like: 106 | 107 | $ qemu-kvm -snapshot -m 4096 -smp 4 -hda ovirt-appliance-fedora.raw 108 | 109 | Once you boot into the image, the `initial-setup` dialog will pop-up to guide 110 | you through some initial steps. 111 | 112 | 113 | Finishing the `ovirt-engine-setup` 114 | ---------------------------------- 115 | 116 | Once you finished the `initial-setup` (which should be self describing), 117 | login as root and run: 118 | 119 | $ engine-setup --config-append=ovirt-engine-answers 120 | 121 | 122 | Comments on some design decisions 123 | --------------------------------- 124 | 125 | **Why Fedora and why 19?** Because oVirt Engine runs fine on Fedora 19. 126 | Also Fedora provides a nice set of cloud images (kickstarts) from which the 127 | oVirt Engine appliance inherits, this eases the maintenance. 128 | Fedora 20 is not used because Engine did not support it when the development of 129 | the appliance started. 130 | 131 | **Why not CentOS?** We started with Fedora 19, because the cloud images where 132 | available, the plan is to either adapt them to CentOS, or look if they've 133 | also got cloud image kickstarts from which we could inherit. 134 | 135 | **Why initial-setup?** Another reason for using Fedora 19 was, that `anaconda` could be leveraged to 136 | run the `inital-setup`. The initial-setup is responsible to ask the user some 137 | questions (what root password, what timezone, and if an additional user should 138 | be created). 139 | `cloud-init` could not be used, because `cloud-init` requires some kind of 140 | management instance at boot time (like oVirt or OpenStack) to get configured. 141 | But this isn't the case with the virtual appliance, because the appliance will 142 | only become the Engine. 143 | 144 | A _FutureFeature_ could be to add another _spoke_ to the 145 | `initial-setup` where the remaining questions for the `engine-setup` are asked, 146 | that way a user is actually guided through the setup, and does not need to 147 | manually trigger the `engine-setup` after login. 148 | 149 | **Less maintenance!?** In general the `ovirt-appliance-fedora.ks` inherits from the 150 | `fedora-spin-kickstarts/fedora-cloud-base.ks` file. 151 | We also try hard to not diverge to much from the upstream configuration. 152 | But some modifications are applied to the final (post-ksflatten) kickstart, 153 | to change some defaults which are currently set in the `fedora-cloud-base.ks`. 154 | 155 | In detail we do the following: 156 | * Don't blacklist any package - To prevent missing dependencies 157 | * Disable text installation - This does not work with `livemedia-creator` 158 | * Change the partition (rootfs) size to 4GB 159 | * Generalize network activation - To be independent of nick names 160 | * Ignore missing packages - Because the cloud ks uses Fedora 20 package names 161 | * Do not explicitly set the default target 162 | * Remove disablement of `initial-setup` - Because we use it 163 | * Remove dummy user game - Not needed because initial-setup is used 164 | 165 | Take a look at the `Makefile` for the exact informations. 166 | 167 | 168 | **Where is the UI?** The appliance comes without a desktop environment. 169 | There is no hard need for it (some other host with an OS can be used to access 170 | Engine's web-ui) and it keeps the image small. 171 | 172 | If you want to add a desktop environment, you are free to do so, by using `yum`. 173 | 174 | 175 | Next steps 176 | -------------- 177 | 178 | This is the first shot of this appliance. Let's see how it turns out. 179 | Some integration tests with the [oVirt Node Hosted Engine plugin][he-plugin] 180 | are pending. I expect some more cleanup and fixes, before it's ready for 181 | the [oVirt 3.5 TestDays][test-days]. 182 | 183 | Open items include: 184 | 185 | * Heavy testing 186 | * … 187 | 188 | So feel enlighted to try out the ready to use image or 189 | [build the appliance yourself][git-readme]. 190 | Please provide feedback and questions to the `users@ovirt.org` mailinglist. 191 | 192 | [src]: http://gerrit.ovirt.org/p/ovirt-appliance.git 193 | [virtual-appliance]: http://www.ovirt.org/Feature/oVirtAppliance 194 | [hosted-engine]: http://www.ovirt.org/Features/Self_Hosted_Engine 195 | [he-plugin]: http://www.ovirt.org/Node_Hosted_Engine 196 | [test-days]: http://www.ovirt.org/OVirt_3.5_TestDay 197 | [git-readme]: http://gerrit.ovirt.org/gitweb?p=ovirt-appliance.git;a=blob;f=README.md;hb=HEAD 198 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------