2011-01-18 09:24:57 +00:00
|
|
|
# Makefile.am for anaconda
|
|
|
|
#
|
|
|
|
# Copyright (C) 2009 Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License as published
|
|
|
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
2014-04-07 12:38:09 +00:00
|
|
|
SUBDIRS = data docs dracut po pyanaconda scripts tests widgets utils
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2017-01-09 02:09:07 +00:00
|
|
|
EXTRA_DIST = COPYING .coveragerc
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2017-01-09 02:09:07 +00:00
|
|
|
# Include the xgettext wrapper so pot-update can be run from the source distribution
|
|
|
|
# This is needed for make distcheck.
|
|
|
|
EXTRA_DIST += $(srcdir)/translation-canary/xgettext_werror.sh
|
2015-03-23 11:36:12 +00:00
|
|
|
|
2011-01-18 09:24:57 +00:00
|
|
|
MAINTAINERCLEANFILES = Makefile.in config.guess config.h.in config.sub \
|
|
|
|
depcomp install-sh ltmain.sh missing ABOUT-NLS \
|
2014-04-07 12:38:09 +00:00
|
|
|
INSTALL aclocal.m4 configure *.pyc py-compile \
|
2017-01-09 02:09:07 +00:00
|
|
|
m4/* po/Makefile.in.in po/Rules-quot \
|
2014-04-07 12:38:09 +00:00
|
|
|
test-driver
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2013-03-26 07:37:43 +00:00
|
|
|
CLEANFILES = *~
|
2011-01-18 09:24:57 +00:00
|
|
|
|
|
|
|
dist_noinst_DATA = $(PACKAGE_NAME).spec
|
|
|
|
|
2017-01-09 02:09:07 +00:00
|
|
|
dist_sbin_SCRIPTS = anaconda.py
|
|
|
|
|
|
|
|
install-exec-hook:
|
|
|
|
cd $(DESTDIR)$(sbindir) && mv anaconda.py anaconda
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
-cd $(DESTDIR)$(sbindir) && rm -f anaconda
|
2011-01-18 09:24:57 +00:00
|
|
|
|
|
|
|
ARCHIVE_TAG = $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)
|
|
|
|
|
2015-05-30 11:20:59 +00:00
|
|
|
ZANATA_PULL_ARGS = --transdir $(srcdir)/po/
|
2017-01-09 02:09:07 +00:00
|
|
|
ZANATA_PUSH_ARGS = --srcfile $(srcdir)/po/anaconda.pot --push-type source --force
|
2015-03-23 11:36:12 +00:00
|
|
|
|
2016-04-10 04:00:00 +00:00
|
|
|
RC_RELEASE ?= $(shell date -u +0.1.%Y%m%d%H%M%S)
|
2017-01-09 02:09:07 +00:00
|
|
|
MOCKCHROOT ?= fedora-25-$(shell uname -m)
|
|
|
|
|
|
|
|
COVERAGE ?= coverage3
|
|
|
|
USER_SITE_BASE ?= $(abs_top_builddir)/python-site
|
|
|
|
USER_SITE_PACKAGES ?= $(shell PYTHONUSERBASE=$(USER_SITE_BASE) $(PYTHON) -m site --user-site)
|
|
|
|
|
|
|
|
# If translations are present, run tests on the .po files before tarring them
|
|
|
|
# up. Use a weird looking loop because shell doesn't have a good way to test
|
|
|
|
# for a wildcard
|
|
|
|
dist-hook:
|
|
|
|
for p in $(distdir)/po/*.po ; do \
|
|
|
|
if [ -e "$$p" ]; then \
|
|
|
|
PYTHONPATH=$(srcdir)/translation-canary python3 -m translation_canary.translated \
|
|
|
|
--release $(distdir)/po ; \
|
|
|
|
fi ; \
|
|
|
|
break ; \
|
|
|
|
done
|
2016-04-10 04:00:00 +00:00
|
|
|
|
2011-01-18 09:24:57 +00:00
|
|
|
tag:
|
|
|
|
@git tag -s -a -m "Tag as $(ARCHIVE_TAG)" $(ARCHIVE_TAG)
|
|
|
|
@echo "Tagged as $(ARCHIVE_TAG)"
|
|
|
|
|
2013-01-23 17:28:19 +00:00
|
|
|
po-pull:
|
2016-04-10 04:00:00 +00:00
|
|
|
rpm -q zanata-python-client &>/dev/null || ( echo "need to run: dnf install zanata-python-client"; exit 1 )
|
2017-01-09 02:09:07 +00:00
|
|
|
( cd $(srcdir) && zanata pull $(ZANATA_PULL_ARGS) )
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2017-01-09 02:09:07 +00:00
|
|
|
# Try to fetch translations, but if that fails just keep going
|
|
|
|
po-fallback:
|
|
|
|
-$(MAKE) po-pull
|
2015-03-23 11:36:12 +00:00
|
|
|
|
2017-01-09 02:09:07 +00:00
|
|
|
scratch:
|
2013-01-23 17:28:19 +00:00
|
|
|
$(MAKE) ARCHIVE_TAG=HEAD dist
|
2014-04-07 12:38:09 +00:00
|
|
|
|
2017-01-09 02:09:07 +00:00
|
|
|
scratch-bumpver:
|
2016-04-10 04:00:00 +00:00
|
|
|
@opts="-S -n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT) --newrelease $(RC_RELEASE)" ; \
|
2014-04-07 12:38:09 +00:00
|
|
|
if [ ! -z "$(IGNORE)" ]; then \
|
|
|
|
opts="$${opts} -i $(IGNORE)" ; \
|
|
|
|
fi ; \
|
|
|
|
if [ ! -z "$(MAP)" ]; then \
|
|
|
|
opts="$${opts} -m $(MAP)" ; \
|
|
|
|
fi ; \
|
|
|
|
if [ ! -z "$(BZDEBUG)" ]; then \
|
|
|
|
opts="$${opts} -d" ; \
|
|
|
|
fi ; \
|
2015-05-30 11:20:59 +00:00
|
|
|
( cd $(srcdir) && scripts/makebumpver --skip-zanata $${opts} ) || exit 1 ; \
|
2016-04-10 04:00:00 +00:00
|
|
|
$(MAKE) -C po $(PACKAGE_NAME).pot-update
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2015-05-30 11:20:59 +00:00
|
|
|
release:
|
2017-01-09 02:09:07 +00:00
|
|
|
$(MAKE) dist && $(MAKE) tag
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2016-04-10 04:00:00 +00:00
|
|
|
rc-release: scratch-bumpver scratch
|
|
|
|
mock -r $(MOCKCHROOT) --scrub all || exit 1
|
|
|
|
mock -r $(MOCKCHROOT) --buildsrpm --spec ./$(PACKAGE_NAME).spec --sources . --resultdir $(PWD) || exit 1
|
|
|
|
mock -r $(MOCKCHROOT) --rebuild *src.rpm --resultdir $(PWD) || exit 1
|
|
|
|
|
2013-01-23 17:28:19 +00:00
|
|
|
bumpver: po-pull
|
|
|
|
@opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
|
|
|
|
if [ ! -z "$(IGNORE)" ]; then \
|
|
|
|
opts="$${opts} -i $(IGNORE)" ; \
|
|
|
|
fi ; \
|
|
|
|
if [ ! -z "$(MAP)" ]; then \
|
|
|
|
opts="$${opts} -m $(MAP)" ; \
|
|
|
|
fi ; \
|
|
|
|
if [ ! -z "$(BZDEBUG)" ]; then \
|
|
|
|
opts="$${opts} -d" ; \
|
|
|
|
fi ; \
|
2015-03-23 11:36:12 +00:00
|
|
|
if [ ! -z "$(SKIP_ACKS)" ]; then \
|
|
|
|
opts="$${opts} -s" ; \
|
|
|
|
fi ; \
|
2014-04-07 12:38:09 +00:00
|
|
|
( cd $(srcdir) && scripts/makebumpver $${opts} ) || exit 1 ; \
|
|
|
|
$(MAKE) -C po $(PACKAGE_NAME).pot-update && \
|
2017-01-09 02:09:07 +00:00
|
|
|
rm $(srcdir)/po/{main,extra}.pot
|
2015-05-30 11:20:59 +00:00
|
|
|
zanata push $(ZANATA_PUSH_ARGS)
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2014-04-07 12:38:09 +00:00
|
|
|
# Install all packages specified as BuildRequires in the Anaconda specfile
|
|
|
|
# -> installs packages needed to build Anaconda
|
2016-04-10 04:00:00 +00:00
|
|
|
# don't try to install s390utils-devel on non-s390 arches
|
2011-01-18 09:24:57 +00:00
|
|
|
install-buildrequires:
|
2014-04-07 12:38:09 +00:00
|
|
|
srcdir="$(srcdir)" && \
|
|
|
|
: $${srcdir:=.} && \
|
2016-04-10 04:00:00 +00:00
|
|
|
pkglist="$$(grep ^BuildRequires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2)" && \
|
|
|
|
if ! [[ $$(uname -m) =~ s390x? ]]; then \
|
|
|
|
pkglist=$$(echo "$$pkglist" | grep -v s390utils) ; \
|
|
|
|
fi ; \
|
2017-01-09 02:09:07 +00:00
|
|
|
extra_pkgs="gettext-devel libtool glibc-langpack-en python3-pocketlint" ; \
|
|
|
|
dnf install $$pkglist $$extra_pkgs
|
2014-04-07 12:38:09 +00:00
|
|
|
|
|
|
|
# Install all packages specified as Requires in the Anaconda specfile
|
|
|
|
# -> installs packages needed to run Anaconda and the Anaconda unit tests
|
2016-04-10 04:00:00 +00:00
|
|
|
# Filter out the %{name} entries required by -devel
|
2014-04-07 12:38:09 +00:00
|
|
|
install-requires:
|
|
|
|
srcdir="$(srcdir)" && \
|
|
|
|
: $${srcdir:=.} && \
|
2016-04-10 04:00:00 +00:00
|
|
|
dnf install $$(grep ^Requires: $${srcdir}/anaconda.spec.in | grep -v %{name} | cut -d ' ' -f 2 | grep -v ^anaconda)
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2017-01-09 02:09:07 +00:00
|
|
|
# Install all packages required for running the tests
|
|
|
|
install-test-requires: install-buildrequires install-requires
|
|
|
|
dnf install bzip2 cppcheck \
|
|
|
|
lorax mock parallel rpm-ostree virt-install pykickstart spin-kickstarts \
|
|
|
|
python3-rpmfluff python3-mock python3-pocketlint python3-nose-testconfig \
|
|
|
|
python3-sphinx_rtd_theme libvirt-python3 python3-lxml python3-dogtail \
|
|
|
|
qemu-img
|
|
|
|
|
2011-01-18 09:24:57 +00:00
|
|
|
# Generate an updates.img based on the changed files since the release
|
|
|
|
# was tagged. Updates are copied to ./updates-img and then the image is
|
|
|
|
# created. By default, the updates subdirectory is removed after the
|
|
|
|
# image is made, but if you want to keep it around, run:
|
|
|
|
# make updates.img KEEP=y
|
|
|
|
updates:
|
|
|
|
@opts="-c" ; \
|
|
|
|
keep="$$(echo $(KEEP) | cut -c1 | tr [a-z] [A-Z])" ; \
|
|
|
|
if [ "$${keep}" = "Y" ]; then \
|
|
|
|
opts="$${opts} -k" ; \
|
|
|
|
fi ; \
|
2014-04-07 12:38:09 +00:00
|
|
|
( cd $(srcdir) && scripts/makeupdates $${opts} -b '$(abs_builddir)' )
|
2011-01-18 09:24:57 +00:00
|
|
|
|
2013-01-23 17:28:19 +00:00
|
|
|
# GUI TESTING
|
|
|
|
runglade:
|
2014-04-07 12:38:09 +00:00
|
|
|
ANACONDA_DATA=$(srcdir)/data \
|
|
|
|
ANACONDA_WIDGETS_OVERRIDES=$(srcdir)/widgets/python \
|
|
|
|
ANACONDA_INSTALL_CLASSES=$(srcdir)/pyanaconda/installclasses \
|
|
|
|
PYTHONPATH=$(srcdir):$(builddir)/pyanaconda/isys/.libs:$(srcdir)/widgets/python/:$(builddir)/widgets/src/.libs/ \
|
|
|
|
LD_LIBRARY_PATH=$(builddir)/widgets/src/.libs \
|
|
|
|
UIPATH=$(srcdir)/pyanaconda/ui/gui/ \
|
|
|
|
GI_TYPELIB_PATH=$(builddir)/widgets/src/ \
|
|
|
|
GLADE_CATALOG_SEARCH_PATH=$(srcdir)/widgets/glade \
|
|
|
|
GLADE_MODULE_SEARCH_PATH=$(builddir)/widgets/src/.libs \
|
2013-01-23 17:28:19 +00:00
|
|
|
glade ${GLADE_FILE}
|
2016-04-10 04:00:00 +00:00
|
|
|
|
|
|
|
ci: rc-release
|
2017-01-09 02:09:07 +00:00
|
|
|
@rm -f tests/test-suite.log.*
|
|
|
|
@mkdir -p $(USER_SITE_PACKAGES)
|
|
|
|
@cp $(abs_builddir)/tests/usercustomize.py $(USER_SITE_PACKAGES)
|
|
|
|
$(MAKE)
|
|
|
|
$(MAKE) TMPDIR=/var/tmp COVERAGE_PROCESS_START=$(abs_builddir)/.coveragerc \
|
|
|
|
TEST_SUITE_LOG=test-suite.log.$$$$ PYTHONUSERBASE=$(USER_SITE_BASE) check
|
|
|
|
@tail -n 1 tests/gettext_tests/*.log > tests/gettext_tests/gettext_tests.log
|
|
|
|
@sudo $(MAKE) TMPDIR=/var/tmp COVERAGE_PROCESS_START=$(abs_builddir)/.coveragerc \
|
|
|
|
TEST_SUITE_LOG=test-suite.log.$$$$ TESTS=nosetests_root.sh \
|
|
|
|
PYTHONUSERBASE=$(USER_SITE_BASE) check
|
2016-04-10 04:00:00 +00:00
|
|
|
@mkdir -p repo
|
|
|
|
@mv *rpm repo
|
2017-01-09 02:09:07 +00:00
|
|
|
@createrepo_c -p repo
|
|
|
|
@sudo $(MAKE) TMPDIR=/var/tmp COVERAGE_PROCESS_START=$(abs_builddir)/.coveragerc \
|
|
|
|
TEST_SUITE_LOG=test-suite.log.$$$$ TESTS=install/run_install_test.sh \
|
|
|
|
TEST_ANACONDA_REPO=file://$(abs_builddir)/repo/ PYTHONUSERBASE=$(USER_SITE_BASE) check
|
|
|
|
@cat tests/test-suite.log.* > tests/test-suite.log
|
|
|
|
@rm -f tests/test-suite.log.*
|
|
|
|
@rm -rf $(USER_SITE_BASE)
|
|
|
|
$(MAKE) coverage-report
|
|
|
|
|
|
|
|
test-gui:
|
|
|
|
@rm -f tests/test-suite.log
|
|
|
|
@rm -rf tests/autogui-results-*/
|
|
|
|
@mkdir -p $(USER_SITE_PACKAGES)
|
|
|
|
@cp $(abs_builddir)/tests/usercustomize.py $(USER_SITE_PACKAGES)
|
|
|
|
$(MAKE) -C pyanaconda/isys
|
|
|
|
sudo COVERAGE_PROCESS_START=$(abs_builddir)/.coveragerc \
|
|
|
|
PYTHONPATH=$(builddir)/pyanaconda/isys/.libs \
|
|
|
|
PYTHONUSERBASE=$(USER_SITE_BASE) \
|
|
|
|
$(abs_builddir)/tests/run_gui_tests.sh >tests/test-suite.log 2>&1
|
|
|
|
@rm -rf $(USER_SITE_BASE)
|
|
|
|
@cat tests/test-suite.log
|
|
|
|
@mv .coverage.* tests/
|
|
|
|
$(MAKE) coverage-report
|
|
|
|
|
|
|
|
coverage-report:
|
|
|
|
$(COVERAGE) combine tests/.coverage.*
|
|
|
|
$(COVERAGE) report --omit "tests/*" > tests/coverage-report.log
|
|
|
|
@cat tests/coverage-report.log
|