From 8e63eda867fd199e18b4976b8efbac57de5926ff Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 16 Feb 2024 17:59:25 +0000 Subject: [PATCH] Remove Autotools build system As discussed in #5695, I think we're reaching a point where removing Autotools is preferable to fixing it. 1.14.x continues to use Autotools, so platforms whose Meson version is too old can stay on that branch until it becomes unsupported. We have a very conservative Meson dependency (Ubuntu 20.04). Signed-off-by: Simon McVittie --- Makefile.am | 251 --------- acinclude.m4 | 429 ---------------- app/Makefile.am.inc | 163 ------ autogen.sh | 44 -- buildutil/glib-tap.mk | 131 ----- buildutil/tap-driver.sh | 652 ------------------------ common/Makefile.am.inc | 352 ------------- configure.ac | 674 ------------------------- data/Makefile.am.inc | 20 - doc/Makefile.am | 116 ----- doc/reference/Makefile.am | 98 ---- doc/release-checklist.md | 2 +- flatpak.pc.in | 19 - icon-validator/Makefile.am.inc | 9 - m4/attributes.m4 | 292 ----------- m4/glibtests.m4 | 28 - oci-authenticator/Makefile.am.inc | 30 -- portal/Makefile.am.inc | 66 --- revokefs/Makefile.am.inc | 34 -- selinux/Makefile.am.inc | 23 - session-helper/Makefile.am.inc | 19 - sideload-repos-systemd/Makefile.am.inc | 19 - system-helper/Makefile.am.inc | 51 -- tests/Makefile-test-matrix.am.inc | 61 --- tests/Makefile.am.inc | 354 ------------- tests/expand-test-matrix.sh | 19 +- tests/update-test-matrix | 1 - 27 files changed, 2 insertions(+), 3955 deletions(-) delete mode 100644 Makefile.am delete mode 100644 acinclude.m4 delete mode 100644 app/Makefile.am.inc delete mode 100755 autogen.sh delete mode 100644 buildutil/glib-tap.mk delete mode 100755 buildutil/tap-driver.sh delete mode 100644 common/Makefile.am.inc delete mode 100644 configure.ac delete mode 100644 data/Makefile.am.inc delete mode 100644 doc/Makefile.am delete mode 100644 doc/reference/Makefile.am delete mode 100644 flatpak.pc.in delete mode 100644 icon-validator/Makefile.am.inc delete mode 100644 m4/attributes.m4 delete mode 100644 m4/glibtests.m4 delete mode 100644 oci-authenticator/Makefile.am.inc delete mode 100644 portal/Makefile.am.inc delete mode 100644 revokefs/Makefile.am.inc delete mode 100644 selinux/Makefile.am.inc delete mode 100644 session-helper/Makefile.am.inc delete mode 100644 sideload-repos-systemd/Makefile.am.inc delete mode 100644 system-helper/Makefile.am.inc delete mode 100644 tests/Makefile-test-matrix.am.inc delete mode 100644 tests/Makefile.am.inc diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index f4e7a319a2..0000000000 --- a/Makefile.am +++ /dev/null @@ -1,251 +0,0 @@ -NULL = - -bin_PROGRAMS = $(NULL) -dist_installed_test_extra_scripts = $(NULL) -noinst_PROGRAMS = $(NULL) -noinst_LTLIBRARIES = $(NULL) -libexec_PROGRAMS = $(NULL) -CLEANFILES = $(NULL) -MAINTAINERCLEANFILES = $(NULL) -DISTCLEANFILES= $(NULL) -BUILT_SOURCES = $(NULL) -EXTRA_DIST = - -include $(top_srcdir)/buildutil/glib-tap.mk - -SUBDIRS = - - -if BUILD_DOCUMENTATION -SUBDIRS += . doc -endif - -SUBDIRS += po - -%.service: %.service.in config.log - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" \ - -e "s|\@localstatedir\@|$(localstatedir)|" \ - -e "s|\@media_dir\@|$(RUN_MEDIA_DIR)|" \ - -e "s|\@extraargs\@||" $< > $@ - -dbus_servicedir = $(DBUS_SERVICE_DIR) -service_in_files = $(NULL) -dbus_service_DATA = $(NULL) -systemdsystemunit_DATA = $(NULL) -systemduserunit_DATA = $(NULL) -dist_tmpfiles_DATA = $(NULL) -CLEANFILES += $(dbus_service_DATA) -CLEANFILES += $(systemduserunit_DATA) -EXTRA_DIST += $(service_in_files) - -FLATPAK_BINDIR=$(bindir) - -ACLOCAL_AMFLAGS = -I m4 -I subprojects/libglnx ${ACLOCAL_FLAGS} -AM_CPPFLAGS = \ - -DFLATPAK_BINDIR=\"$(FLATPAK_BINDIR)\" \ - -DFLATPAK_SYSTEMDIR=\"$(SYSTEM_INSTALL_DIR)\" \ - -DFLATPAK_CONFIGDIR=\"$(sysconfdir)/flatpak\" \ - -DFLATPAK_BASEDIR=\"$(pkgdatadir)\" \ - -DFLATPAK_TRIGGERDIR=\"$(pkgdatadir)/triggers\" \ - -DSYSTEM_FONTS_DIR=\"$(SYSTEM_FONTS_DIR)\" \ - -DSYSTEM_HELPER_USER=\"$(SYSTEM_HELPER_USER)\" \ - -DSYSTEM_FONT_CACHE_DIRS=\"$(SYSTEM_FONT_CACHE_DIRS)\" \ - -DG_LOG_DOMAIN=\"flatpak\" \ - -I$(srcdir)/subprojects/libglnx \ - -I$(srcdir)/common \ - -I$(builddir)/common \ - -include "config.h" \ - $(NULL) - -ASAN_FLAGS= -if ENABLE_ASAN -ASAN_FLAGS = -fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -endif - -AM_CFLAGS = $(WARN_CFLAGS) $(ASAN_FLAGS) -AM_LDFLAGS = $(ASAN_FLAGS) - -if WITH_SYSTEM_BWRAP -AM_CPPFLAGS += -DHELPER=\"$(BWRAP)\" -else -AM_CPPFLAGS += -DHELPER=\"$(libexecdir)/flatpak-bwrap\" -endif - -if WITH_SYSTEM_DBUS_PROXY -AM_CPPFLAGS += -DDBUSPROXY=\"$(DBUS_PROXY)\" -else -AM_CPPFLAGS += -DDBUSPROXY=\"$(libexecdir)/flatpak-dbus-proxy\" -endif - -triggersdir = $(pkgdatadir)/triggers -dist_triggers_SCRIPTS = \ - triggers/gtk-icon-cache.trigger \ - triggers/mime-database.trigger \ - triggers/desktop-database.trigger \ - $(NULL) - -# This canonicalizes the PKG_CHECK_MODULES or AM_PATH_GPGME results -INTERNAL_GPGME_CFLAGS = $(DEP_GPGME_CFLAGS) $(DEP_GPGME_PTHREAD_CFLAGS) $(GPGME_PTHREAD_CFLAGS) -INTERNAL_GPGME_LIBS = $(DEP_GPGME_LIBS) $(DEP_GPGME_PTHREAD_LIBS) $(GPGME_PTHREAD_LIBS) - -lib_LTLIBRARIES = -noinst_LTLIBRARIES += libglnx.la -libglnx_srcpath := $(srcdir)/subprojects/libglnx -# This intentionally does not include AM_CFLAGS, libglnx always uses those -libglnx_cflags := \ - $(BASE_CFLAGS) \ - "-I$(libglnx_srcpath)" \ - -std=gnu99 \ - $(HIDDEN_VISIBILITY_CFLAGS) \ - $(NULL) -libglnx_libs := $(BASE_LIBS) -include subprojects/Makefile-libglnx.am.inc - -include common/Makefile.am.inc -include data/Makefile.am.inc -include app/Makefile.am.inc -include session-helper/Makefile.am.inc -include portal/Makefile.am.inc -include system-helper/Makefile.am.inc -include oci-authenticator/Makefile.am.inc -include icon-validator/Makefile.am.inc -include revokefs/Makefile.am.inc -include selinux/Makefile.am.inc -include sideload-repos-systemd/Makefile.am.inc -include tests/Makefile.am.inc - -if !WITH_SYSTEM_DBUS_PROXY -libexec_PROGRAMS+=flatpak-dbus-proxy -flatpak_dbus_proxy_SOURCES = \ - subprojects/dbus-proxy/flatpak-proxy.c \ - subprojects/dbus-proxy/flatpak-proxy.h \ - subprojects/dbus-proxy/dbus-proxy.c \ - subprojects/dbus-proxy/backport-autoptr.h \ - $(NULL) -flatpak_dbus_proxy_LDADD = $(AM_LDADD) $(BASE_LIBS) -flatpak_dbus_proxy_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -endif - -if !WITH_SYSTEM_BWRAP - -bwrap_PROGRAMS = flatpak-bwrap -flatpak_bwrap_SOURCES = $(bwrap_SOURCES) -flatpak_bwrap_CFLAGS = $(AM_CFLAGS) $(bwrap_CFLAGS) -flatpak_bwrap_LDADD = $(AM_LDADD) $(bwrap_LDADD) $(CAP_LIB) -bwrapdir = $(libexecdir) -include subprojects/Makefile-bwrap.am.inc - -endif # !WITH_SYSTEM_BWRAP - -# NOTE: bwrap is install-bwrapPROGS which is run from install-data, not install-exec, this data-hook is used -install-data-hook: - $(MAKE) $(AM_MAKEFLAGS) install-test-data-hook -if !WITH_SYSTEM_BWRAP -if PRIV_MODE_SETUID - $(SUDO_BIN) chown root $(DESTDIR)$(libexecdir)/flatpak-bwrap - $(SUDO_BIN) chmod u+s $(DESTDIR)$(libexecdir)/flatpak-bwrap -endif # !PRIV_MODE_SETUID -endif # !WITH_SYSTEM_BWRAP - -bashcompletiondir = $(datadir)/bash-completion/completions -bashcompletion_DATA = completion/flatpak -EXTRA_DIST += $(bashcompletion_DATA) - -zshcompletiondir = $(datadir)/zsh/site-functions -zshcompletion_DATA = completion/_flatpak -EXTRA_DIST += $(zshcompletion_DATA) - -fishcompletiondir = $(datadir)/fish/vendor_completions.d -fishcompletion_DATA = completion/flatpak.fish -EXTRA_DIST += $(fishcompletion_DATA) - -profiledir = $(PROFILE_DIR) -profile_DATA = profile/flatpak.sh -EXTRA_DIST += $(profile_DATA) - -fishconfdir = $(datadir)/fish/vendor_conf.d -fishconf_DATA = profile/flatpak.fish -EXTRA_DIST += $(fishconf_DATA) - -envdir = $(datadir)/gdm/env.d -env_DATA = -if INSTALL_GDM_ENV_FILE -env_DATA += flatpak.env -endif - -EXTRA_DIST += env.d/flatpak.env.in env.d/60-flatpak env.d/60-flatpak-system-only -DISTCLEANFILES += flatpak.env - -flatpak.env: env.d/flatpak.env.in - $(AM_V_GEN) $(SED) -e "s|\@localstatedir\@|$(localstatedir)|" \ - -e "s|\@sysconfdir\@|$(sysconfdir)|" $< > $@ - -systemenvgendir = $(systemdsystemenvgendir) -systemenvgen_SCRIPTS = env.d/60-flatpak-system-only - -userenvgendir = $(systemduserenvgendir) -userenvgen_SCRIPTS = env.d/60-flatpak - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = flatpak.pc -EXTRA_DIST += flatpak.pc.in - -scriptsdir = $(bindir) -scripts_SCRIPTS = scripts/flatpak-bisect scripts/flatpak-coredumpctl -EXTRA_DIST += scripts/flatpak-bisect scripts/flatpak-coredumpctl - -EXTRA_DIST += subprojects/variant-schema-compiler/variant-schema-compiler - -EXTRA_DIST += autogen.sh - -EXTRA_DIST += README.md - -EXTRA_DIST += flatpak.png - -EXTRA_DIST += \ - completion/meson.build \ - env.d/meson.build \ - meson.build \ - meson_options.txt \ - po/meson.build \ - profile/meson.build \ - scripts/meson.build \ - subprojects/bubblewrap/meson.build \ - subprojects/bubblewrap/meson_options.txt \ - subprojects/dbus-proxy/meson.build \ - subprojects/dbus-proxy/meson_options.txt \ - subprojects/libglnx/meson.build \ - subprojects/libglnx/meson_options.txt \ - subprojects/libglnx/tests/meson.build \ - triggers/meson.build \ - $(NULL) - -AM_DISTCHECK_CONFIGURE_FLAGS = \ - --enable-documentation \ - --disable-maintainer-mode \ - --enable-introspection - -.PHONY: coverage lcov-clean genlcov - -coverage: - $(AM_V_GEN) $(MAKE) $(AM_MAKEFLAGS) lcov-clean - $(AM_V_GEN) FLATPAK_TEST_COVERAGE=1 $(MAKE) check - $(AM_V_GEN) $(MAKE) $(AM_MAKEFLAGS) genlcov - -lcov-clean: - $(AM_V_GEN) $(LCOV) --directory $(top_builddir) --zerocounters - -genlcov: - $(AM_V_GEN) $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info - $(AM_V_GEN) $(GENHTML) --prefix $(top_builddir) --output-directory coverage coverage.info - -distcheck-hook: distcheck-hook-meson -distcheck-hook-meson: - set -e; if command -v meson > /dev/null; then \ - cd $(distdir); \ - pwd; \ - meson _build/meson; \ - meson compile -C _build/meson -v; \ - meson test -C _build/meson -v; \ - rm -fr _build/meson; \ - fi diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index 5ae0ed9a51..0000000000 --- a/acinclude.m4 +++ /dev/null @@ -1,429 +0,0 @@ -#serial 12 - -# Checks the location of the XML Catalog -# Usage: -# JH_PATH_XML_CATALOG([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# Defines XMLCATALOG and XML_CATALOG_FILE substitutions -AC_DEFUN([JH_PATH_XML_CATALOG], -[ - # check for the presence of the XML catalog - AC_ARG_WITH([xml-catalog], - AC_HELP_STRING([--with-xml-catalog=CATALOG], - [path to xml catalog to use]),, - [with_xml_catalog=/etc/xml/catalog]) - jh_found_xmlcatalog=true - XML_CATALOG_FILE="$with_xml_catalog" - AC_SUBST([XML_CATALOG_FILE]) - AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)]) - if test -f "$XML_CATALOG_FILE"; then - AC_MSG_RESULT([found]) - else - jh_found_xmlcatalog=false - AC_MSG_RESULT([not found]) - fi - - # check for the xmlcatalog program - AC_PATH_PROG(XMLCATALOG, xmlcatalog, no) - if test "x$XMLCATALOG" = xno; then - jh_found_xmlcatalog=false - fi - - if $jh_found_xmlcatalog; then - ifelse([$1],,[:],[$1]) - else - ifelse([$2],,[AC_MSG_ERROR([could not find XML catalog])],[$2]) - fi -]) - -# Checks if a particular URI appears in the XML catalog -# Usage: -# JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -AC_DEFUN([JH_CHECK_XML_CATALOG], -[ - AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl - AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) - if $jh_found_xmlcatalog && \ - AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then - AC_MSG_RESULT([found]) - ifelse([$3],,,[$3 -])dnl - else - AC_MSG_RESULT([not found]) - ifelse([$4],, - [AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])], - [$4]) - fi -]) - -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_VALGRIND_CHECK() -# -# DESCRIPTION -# -# Checks whether Valgrind is present and, if so, allows running `make -# check` under a variety of Valgrind tools to check for memory and -# threading errors. -# -# Defines VALGRIND_CHECK_RULES which should be substituted in your -# Makefile; and $enable_valgrind which can be used in subsequent configure -# output. VALGRIND_ENABLED is defined and substituted, and corresponds to -# the value of the --enable-valgrind option, which defaults to being -# enabled if Valgrind is installed and disabled otherwise. -# -# If unit tests are written using a shell script and automake's -# LOG_COMPILER system, the $(VALGRIND) variable can be used within the -# shell scripts to enable Valgrind, as described here: -# -# https://www.gnu.org/software/gnulib/manual/html_node/Running-self_002dtests-under-valgrind.html -# -# Usage example: -# -# configure.ac: -# -# AX_VALGRIND_CHECK -# -# Makefile.am: -# -# @VALGRIND_CHECK_RULES@ -# VALGRIND_SUPPRESSIONS_FILES = my-project.supp -# EXTRA_DIST = my-project.supp -# -# This results in a "check-valgrind" rule being added to any Makefile.am -# which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been -# configured with --enable-valgrind). Running `make check-valgrind` in -# that directory will run the module's test suite (`make check`) once for -# each of the available Valgrind tools (out of memcheck, helgrind, drd and -# sgcheck), and will output results to test-suite-$toolname.log for each. -# The target will succeed if there are zero errors and fail otherwise. -# -# The macro supports running with and without libtool. -# -# LICENSE -# -# Copyright (c) 2014, 2015 Philip Withnall -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -AC_DEFUN([AX_VALGRIND_CHECK],[ - dnl Check for --enable-valgrind - AC_MSG_CHECKING([whether to enable Valgrind on the unit tests]) - AC_ARG_ENABLE([valgrind], - [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])], - [enable_valgrind=$enableval],[enable_valgrind=]) - - # Check for Valgrind. - AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind]) - - AS_IF([test "$enable_valgrind" = "yes" -a "$VALGRIND" = ""],[ - AC_MSG_ERROR([Could not find valgrind; either install it or reconfigure with --disable-valgrind]) - ]) - AS_IF([test "$enable_valgrind" != "no"],[enable_valgrind=yes]) - - AM_CONDITIONAL([VALGRIND_ENABLED],[test "$enable_valgrind" = "yes"]) - AC_SUBST([VALGRIND_ENABLED],[$enable_valgrind]) - AC_MSG_RESULT([$enable_valgrind]) - - # Check for Valgrind tools we care about. - #m4_define([valgrind_tool_list],[[memcheck], [helgrind], [drd], [exp-sgcheck]]) - # I trimmed this, because we fail on all the thread stuff - m4_define([valgrind_tool_list],[[memcheck]]) - - AS_IF([test "$VALGRIND" != ""],[ - m4_foreach([vgtool],[valgrind_tool_list],[ - m4_define([vgtooln],AS_TR_SH(vgtool)) - m4_define([ax_cv_var],[ax_cv_valgrind_tool_]vgtooln) - AC_CACHE_CHECK([for Valgrind tool ]vgtool,ax_cv_var,[ - ax_cv_var= - AS_IF([`$VALGRIND --tool=vgtool --help >/dev/null 2>&1`],[ - ax_cv_var="vgtool" - ]) - ]) - - AC_SUBST([VALGRIND_HAVE_TOOL_]vgtooln,[$ax_cv_var]) - ]) - ]) - -VALGRIND_CHECK_RULES=' -# Valgrind check -# -# Optional: -# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions -# files to load. (Default: empty) -# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools. -# (Default: --num-callers=30) -# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of: -# memcheck, helgrind, drd, sgcheck). (Default: various) - -# Optional variables -VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES)) -VALGRIND_FLAGS ?= --num-callers=30 -VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no -VALGRIND_helgrind_FLAGS ?= --history-level=approx -VALGRIND_drd_FLAGS ?= -VALGRIND_sgcheck_FLAGS ?= - -# Internal use -valgrind_tools = memcheck helgrind drd sgcheck -valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools))) - -valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS) -valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS) -valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS) -valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS) - -valgrind_quiet = $(valgrind_quiet_$(V)) -valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) -valgrind_quiet_0 = --quiet - -# Support running with and without libtool. -ifneq ($(LIBTOOL),) -valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute -else -valgrind_lt = -endif - -# Use recursive makes in order to ignore errors during check -check-valgrind: -ifeq ($(VALGRIND_ENABLED),yes) - -$(foreach tool,$(valgrind_tools), \ - $(if $(VALGRIND_HAVE_TOOL_$(tool))$(VALGRIND_HAVE_TOOL_exp_$(tool)), \ - $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-tool VALGRIND_TOOL=$(tool); \ - ) \ - ) -else - @echo "Need to reconfigure with --enable-valgrind" -endif - -# Valgrind running -VALGRIND_TESTS_ENVIRONMENT = \ - $(TESTS_ENVIRONMENT) \ - env VALGRIND=$(VALGRIND) \ - G_SLICE=always-malloc,debug-blocks \ - G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly - -VALGRIND_LOG_COMPILER = \ - $(valgrind_lt) \ - $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) - -check-valgrind-tool: -ifeq ($(VALGRIND_ENABLED),yes) - $(MAKE) check-TESTS \ - TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)" \ - LOG_COMPILER="$(VALGRIND_LOG_COMPILER)" \ - LOG_FLAGS="$(valgrind_$(VALGRIND_TOOL)_flags)" \ - TEST_SUITE_LOG=test-suite-$(VALGRIND_TOOL).log -else - @echo "Need to reconfigure with --enable-valgrind" -endif - -DISTCHECK_CONFIGURE_FLAGS ?= -DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind - -MOSTLYCLEANFILES ?= -MOSTLYCLEANFILES += $(valgrind_log_files) - -.PHONY: check-valgrind check-valgrind-tool -' - - AC_SUBST([VALGRIND_CHECK_RULES]) - m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])]) -]) - -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_compare_version.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# -# DESCRIPTION -# -# This macro compares two version strings. Due to the various number of -# minor-version numbers that can exist, and the fact that string -# comparisons are not compatible with numeric comparisons, this is not -# necessarily trivial to do in a autoconf script. This macro makes doing -# these comparisons easy. -# -# The six basic comparisons are available, as well as checking equality -# limited to a certain number of minor-version levels. -# -# The operator OP determines what type of comparison to do, and can be one -# of: -# -# eq - equal (test A == B) -# ne - not equal (test A != B) -# le - less than or equal (test A <= B) -# ge - greater than or equal (test A >= B) -# lt - less than (test A < B) -# gt - greater than (test A > B) -# -# Additionally, the eq and ne operator can have a number after it to limit -# the test to that number of minor versions. -# -# eq0 - equal up to the length of the shorter version -# ne0 - not equal up to the length of the shorter version -# eqN - equal up to N sub-version levels -# neN - not equal up to N sub-version levels -# -# When the condition is true, shell commands ACTION-IF-TRUE are run, -# otherwise shell commands ACTION-IF-FALSE are run. The environment -# variable 'ax_compare_version' is always set to either 'true' or 'false' -# as well. -# -# Examples: -# -# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) -# -# would both be true. -# -# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) -# AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) -# -# would both be false. -# -# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) -# -# would be true because it is only comparing two minor versions. -# -# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) -# -# would be true because it is only comparing the lesser number of minor -# versions of the two values. -# -# Note: The characters that separate the version numbers do not matter. An -# empty string is the same as version 0. OP is evaluated by autoconf, not -# configure, so must be a string, not a variable. -# -# The author would like to acknowledge Guido Draheim whose advice about -# the m4_case and m4_ifvaln functions make this macro only include the -# portions necessary to perform the specific comparison specified by the -# OP argument in the final configure script. -# -# LICENSE -# -# Copyright (c) 2008 Tim Toolan -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -dnl ######################################################################### -AC_DEFUN([AX_COMPARE_VERSION], [ - AC_REQUIRE([AC_PROG_AWK]) - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - AS_VAR_PUSHDEF([A],[ax_compare_version_A]) - A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - AS_VAR_PUSHDEF([B],[ax_compare_version_B]) - B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary - dnl # then the first line is used to determine if the condition is true. - dnl # The sed right after the echo is to remove any indented white space. - m4_case(m4_tolower($2), - [lt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [gt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [le],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ], - [ge],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ],[ - dnl Split the operator from the subversion count if present. - m4_bmatch(m4_substr($2,2), - [0],[ - # A count of zero means use the length of the shorter version. - # Determine the number of characters in A and B. - ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` - ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` - - # Set A to no more than B's length and B to no more than A's length. - A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` - B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` - ], - [[0-9]+],[ - # A count greater than zero means use only that many subversions - A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - ], - [.+],[ - AC_WARNING( - [illegal OP numeric parameter: $2]) - ],[]) - - # Pad zeros at end of numbers to make same length. - ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" - B="$B`echo $A | sed 's/./0/g'`" - A="$ax_compare_version_tmp_A" - - # Check for equality or inequality as necessary. - m4_case(m4_tolower(m4_substr($2,0,2)), - [eq],[ - test "x$A" = "x$B" && ax_compare_version=true - ], - [ne],[ - test "x$A" != "x$B" && ax_compare_version=true - ],[ - AC_WARNING([illegal OP parameter: $2]) - ]) - ]) - - AS_VAR_POPDEF([A])dnl - AS_VAR_POPDEF([B])dnl - - dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. - if test "$ax_compare_version" = "true" ; then - m4_ifvaln([$4],[$4],[:])dnl - m4_ifvaln([$5],[else $5])dnl - fi -]) dnl AX_COMPARE_VERSION - -dnl ######################################################################### - -# AC_PROG_BISON -# ------------ -AN_MAKEVAR([BISON], [AC_PROG_YACC]) -AN_PROGRAM([bison], [AC_PROG_YACC]) -AC_DEFUN([AC_PROG_BISON], -[AC_CHECK_PROGS(BISON, 'bison')dnl -AC_ARG_VAR(BISON, -[The Bison implementation to use. Defaults to `bison'.])dnl -AC_ARG_VAR(BFLAGS, -[The list of arguments that will be passed by default to $BISON. This script -will default BFLAGS to the empty string to avoid a default value of `-d' given -by some make applications.])]) diff --git a/app/Makefile.am.inc b/app/Makefile.am.inc deleted file mode 100644 index 09f9b6e276..0000000000 --- a/app/Makefile.am.inc +++ /dev/null @@ -1,163 +0,0 @@ -bin_PROGRAMS += \ - flatpak \ - $(NULL) - -EXTRA_DIST += app/meson.build -EXTRA_DIST += app/parse-datetime.y - -flatpak_dbus_built_sources = app/flatpak-permission-dbus-generated.c app/flatpak-permission-dbus-generated.h - -app/flatpak-permission-dbus-generated.c: data/org.freedesktop.impl.portal.PermissionStore.xml Makefile - mkdir -p $(builddir)/app - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.impl.portal \ - --c-namespace XdpDbus \ - --generate-c-code $(builddir)/app/flatpak-permission-dbus-generated \ - $(srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ - $(NULL) - -app/%-dbus-generated.h: app/%-dbus-generated.c - @true # Built as a side-effect of the rules for the .c - - -if BUILD_SYSTEM_HELPER -polkit_sources = \ - app/flatpak-polkit-agent-text-listener.h \ - app/flatpak-polkit-agent-text-listener.c \ - $(NULL) -endif - -noinst_LTLIBRARIES += libflatpak-app.la - -libflatpak_app_la_SOURCES = \ - app/flatpak-builtins-utils.h \ - app/flatpak-builtins-utils.c \ - app/flatpak-table-printer.c \ - app/flatpak-table-printer.h \ - app/flatpak-tty-utils.c \ - app/flatpak-tty-utils-private.h \ - app/parse-datetime.h \ - $(NULL) - -nodist_libflatpak_app_la_SOURCES = \ - app/parse-datetime.c \ - $(NULL) - -libflatpak_app_la_LIBADD = \ - $(AM_LDADD) \ - $(BASE_LIBS) \ - $(OSTREE_LIBS) \ - $(JSON_LIBS) \ - $(APPSTREAM_LIBS) \ - $(SYSTEMD_LIBS) \ - $(POLKIT_LIBS) \ - $(NULL) - -libflatpak_app_la_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(JSON_CFLAGS) \ - $(APPSTREAM_CFLAGS) \ - $(SYSTEMD_CFLAGS) \ - $(POLKIT_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -I$(srcdir)/app \ - -I$(builddir)/app \ - -DLOCALEDIR=\"$(localedir)\" \ - $(NULL) - -flatpak_SOURCES = \ - app/flatpak-main.c \ - app/flatpak-builtins.h \ - app/flatpak-builtins-remote-add.c \ - app/flatpak-builtins-remote-modify.c \ - app/flatpak-builtins-remote-delete.c \ - app/flatpak-builtins-remote-list.c \ - app/flatpak-builtins-remote-ls.c \ - app/flatpak-builtins-remote-info.c \ - app/flatpak-builtins-install.c \ - app/flatpak-builtins-override.c \ - app/flatpak-builtins-make-current.c \ - app/flatpak-builtins-update.c \ - app/flatpak-builtins-uninstall.c \ - app/flatpak-builtins-mask.c \ - app/flatpak-builtins-pin.c \ - app/flatpak-builtins-list.c \ - app/flatpak-builtins-info.c \ - app/flatpak-builtins-config.c \ - app/flatpak-builtins-run.c \ - app/flatpak-builtins-enter.c \ - app/flatpak-builtins-ps.c \ - app/flatpak-builtins-build-init.c \ - app/flatpak-builtins-build.c \ - app/flatpak-builtins-build-finish.c \ - app/flatpak-builtins-build-export.c \ - app/flatpak-builtins-build-bundle.c \ - app/flatpak-builtins-build-import-bundle.c \ - app/flatpak-builtins-build-commit-from.c \ - app/flatpak-builtins-build-sign.c \ - app/flatpak-builtins-build-update-repo.c \ - app/flatpak-builtins-repo.c \ - app/flatpak-builtins-document-export.c \ - app/flatpak-builtins-document-unexport.c \ - app/flatpak-builtins-document-info.c \ - app/flatpak-builtins-document-list.c \ - app/flatpak-builtins-permission-remove.c \ - app/flatpak-builtins-permission-set.c \ - app/flatpak-builtins-permission-list.c \ - app/flatpak-builtins-permission-show.c \ - app/flatpak-builtins-permission-reset.c \ - app/flatpak-builtins-search.c \ - app/flatpak-builtins-repair.c \ - app/flatpak-builtins-create-usb.c \ - app/flatpak-builtins-kill.c \ - app/flatpak-builtins-history.c \ - app/flatpak-complete.c \ - app/flatpak-complete.h \ - app/flatpak-cli-transaction.c \ - app/flatpak-cli-transaction.h \ - app/flatpak-quiet-transaction.c \ - app/flatpak-quiet-transaction.h \ - app/parse-datetime.h \ - $(polkit_sources) \ - $(NULL) - -nodist_flatpak_SOURCES = \ - $(flatpak_dbus_built_sources) \ - $(NULL) - -app/parse-datetime.c: app/parse-datetime.y Makefile - $(AM_V_GEN) $(BISON) $< -o $@ - -BUILT_SOURCES += $(flatpak_dbus_built_sources) -CLEANFILES += app/parse-datetime.c $(flatpak_dbus_built_sources) - -flatpak_LDADD = \ - $(AM_LDADD) \ - $(BASE_LIBS) \ - $(OSTREE_LIBS) \ - $(JSON_LIBS) \ - $(APPSTREAM_LIBS) \ - $(SYSTEMD_LIBS) \ - $(POLKIT_LIBS) \ - libflatpak-app.la \ - libflatpak-common.la \ - libflatpak-common-base.la \ - libglnx.la \ - $(NULL) - -flatpak_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(JSON_CFLAGS) \ - $(APPSTREAM_CFLAGS) \ - $(SYSTEMD_CFLAGS) \ - $(POLKIT_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -I$(srcdir)/app \ - -I$(builddir)/app \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - -DLOCALEDIR=\"$(localedir)\" \ - $(NULL) diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 25c1455e26..0000000000 --- a/autogen.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -test -n "$srcdir" || srcdir=$(dirname "$0") -test -n "$srcdir" || srcdir=. - -olddir=$(pwd) -cd "$srcdir" - -if ! command -v autoreconf >/dev/null; then - echo "*** No autoreconf found, please install it ***" - exit 1 -fi - -# INSTALL are required by automake, but may be deleted by clean -# up rules. to get automake to work, simply touch these here, they will be -# regenerated from their corresponding *.in files by ./configure anyway. -touch INSTALL - -if ! test -f subprojects/libglnx/README.md -a -f subprojects/bubblewrap/README.md -a -f subprojects/dbus-proxy/README.md; then - git submodule update --init -fi -# Workaround automake bug with subdir-objects and computed paths -sed -e 's,$(libglnx_srcpath),subprojects/libglnx,g' < subprojects/libglnx/Makefile-libglnx.am > subprojects/Makefile-libglnx.am.inc -sed -e 's,$(bwrap_srcpath),subprojects/bubblewrap,g' < subprojects/bubblewrap/Makefile-bwrap.am > subprojects/Makefile-bwrap.am.inc - -if ! command -v gtkdocize >/dev/null; then - echo "*** You don't have gtk-doc installed, and thus won't be able to generate the documentation. ***" - rm -f gtk-doc.make - cat > gtk-doc.make < $@.tmp; \ - echo 'Type=session' >> $@.tmp; \ - if [[ $(notdir $<) == *.wrap ]]; then \ - wrapper=$(installed_testdir)/test-wrapper.sh; \ - fi; \ - echo "Exec=env G_TEST_SRCDIR=$(installed_testdir) G_TEST_BUILDDIR=$(installed_testdir) $$wrapper $(installed_testdir)/$(notdir $<) --tap" >> $@.tmp; \ - echo 'Output=TAP' >> $@.tmp; \ - mv $@.tmp $@) - -CLEANFILES += $(installed_test_meta_DATA) -endif diff --git a/buildutil/tap-driver.sh b/buildutil/tap-driver.sh deleted file mode 100755 index a88411ffdd..0000000000 --- a/buildutil/tap-driver.sh +++ /dev/null @@ -1,652 +0,0 @@ -#! /bin/sh -# Copyright (C) 2011-2013 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -scriptversion=2011-12-27.17; # UTC - -# Make unconditional expansion of undefined variables an error. This -# helps a lot in preventing typo-related bugs. -set -u - -me=tap-driver.sh - -fatal () -{ - echo "$me: fatal: $*" >&2 - exit 1 -} - -usage_error () -{ - echo "$me: $*" >&2 - print_usage >&2 - exit 2 -} - -print_usage () -{ - cat < - # - trap : 1 3 2 13 15 - if test $merge -gt 0; then - exec 2>&1 - else - exec 2>&3 - fi - "$@" - echo $? - ) | LC_ALL=C ${AM_TAP_AWK-awk} \ - -v me="$me" \ - -v test_script_name="$test_name" \ - -v log_file="$log_file" \ - -v trs_file="$trs_file" \ - -v expect_failure="$expect_failure" \ - -v merge="$merge" \ - -v ignore_exit="$ignore_exit" \ - -v comments="$comments" \ - -v diag_string="$diag_string" \ -' -# FIXME: the usages of "cat >&3" below could be optimized when using -# FIXME: GNU awk, and/on on systems that supports /dev/fd/. - -# Implementation note: in what follows, `result_obj` will be an -# associative array that (partly) simulates a TAP result object -# from the `TAP::Parser` perl module. - -## ----------- ## -## FUNCTIONS ## -## ----------- ## - -function fatal(msg) -{ - print me ": " msg | "cat >&2" - exit 1 -} - -function abort(where) -{ - fatal("internal error " where) -} - -# Convert a boolean to a "yes"/"no" string. -function yn(bool) -{ - return bool ? "yes" : "no"; -} - -function add_test_result(result) -{ - if (!test_results_index) - test_results_index = 0 - test_results_list[test_results_index] = result - test_results_index += 1 - test_results_seen[result] = 1; -} - -# Whether the test script should be re-run by "make recheck". -function must_recheck() -{ - for (k in test_results_seen) - if (k != "XFAIL" && k != "PASS" && k != "SKIP") - return 1 - return 0 -} - -# Whether the content of the log file associated to this test should -# be copied into the "global" test-suite.log. -function copy_in_global_log() -{ - for (k in test_results_seen) - if (k != "PASS") - return 1 - return 0 -} - -# FIXME: this can certainly be improved ... -function get_global_test_result() -{ - if ("ERROR" in test_results_seen) - return "ERROR" - if ("FAIL" in test_results_seen || "XPASS" in test_results_seen) - return "FAIL" - all_skipped = 1 - for (k in test_results_seen) - if (k != "SKIP") - all_skipped = 0 - if (all_skipped) - return "SKIP" - return "PASS"; -} - -function stringify_result_obj(result_obj) -{ - if (result_obj["is_unplanned"] || result_obj["number"] != testno) - return "ERROR" - - if (plan_seen == LATE_PLAN) - return "ERROR" - - if (result_obj["directive"] == "TODO") - return result_obj["is_ok"] ? "XPASS" : "XFAIL" - - if (result_obj["directive"] == "SKIP") - return result_obj["is_ok"] ? "SKIP" : COOKED_FAIL; - - if (length(result_obj["directive"])) - abort("in function stringify_result_obj()") - - return result_obj["is_ok"] ? COOKED_PASS : COOKED_FAIL -} - -function decorate_result(result) -{ - color_name = color_for_result[result] - if (color_name) - return color_map[color_name] "" result "" color_map["std"] - # If we are not using colorized output, or if we do not know how - # to colorize the given result, we should return it unchanged. - return result -} - -function report(result, details) -{ - if (result ~ /^(X?(PASS|FAIL)|SKIP|ERROR)/) - { - msg = ": " test_script_name - add_test_result(result) - } - else if (result == "#") - { - msg = " " test_script_name ":" - } - else - { - abort("in function report()") - } - if (length(details)) - msg = msg " " details - # Output on console might be colorized. - print decorate_result(result) msg - # Log the result in the log file too, to help debugging (this is - # especially true when said result is a TAP error or "Bail out!"). - print result msg | "cat >&3"; -} - -function testsuite_error(error_message) -{ - report("ERROR", "- " error_message) -} - -function handle_tap_result() -{ - details = result_obj["number"]; - if (length(result_obj["description"])) - details = details " " result_obj["description"] - - if (plan_seen == LATE_PLAN) - { - details = details " # AFTER LATE PLAN"; - } - else if (result_obj["is_unplanned"]) - { - details = details " # UNPLANNED"; - } - else if (result_obj["number"] != testno) - { - details = sprintf("%s # OUT-OF-ORDER (expecting %d)", - details, testno); - } - else if (result_obj["directive"]) - { - details = details " # " result_obj["directive"]; - if (length(result_obj["explanation"])) - details = details " " result_obj["explanation"] - } - - report(stringify_result_obj(result_obj), details) -} - -# `skip_reason` should be empty whenever planned > 0. -function handle_tap_plan(planned, skip_reason) -{ - planned += 0 # Avoid getting confused if, say, `planned` is "00" - if (length(skip_reason) && planned > 0) - abort("in function handle_tap_plan()") - if (plan_seen) - { - # Error, only one plan per stream is acceptable. - testsuite_error("multiple test plans") - return; - } - planned_tests = planned - # The TAP plan can come before or after *all* the TAP results; we speak - # respectively of an "early" or a "late" plan. If we see the plan line - # after at least one TAP result has been seen, assume we have a late - # plan; in this case, any further test result seen after the plan will - # be flagged as an error. - plan_seen = (testno >= 1 ? LATE_PLAN : EARLY_PLAN) - # If testno > 0, we have an error ("too many tests run") that will be - # automatically dealt with later, so do not worry about it here. If - # $plan_seen is true, we have an error due to a repeated plan, and that - # has already been dealt with above. Otherwise, we have a valid "plan - # with SKIP" specification, and should report it as a particular kind - # of SKIP result. - if (planned == 0 && testno == 0) - { - if (length(skip_reason)) - skip_reason = "- " skip_reason; - report("SKIP", skip_reason); - } -} - -function extract_tap_comment(line) -{ - if (index(line, diag_string) == 1) - { - # Strip leading `diag_string` from `line`. - line = substr(line, length(diag_string) + 1) - # And strip any leading and trailing whitespace left. - sub("^[ \t]*", "", line) - sub("[ \t]*$", "", line) - # Return what is left (if any). - return line; - } - return ""; -} - -# When this function is called, we know that line is a TAP result line, -# so that it matches the (perl) RE "^(not )?ok\b". -function setup_result_obj(line) -{ - # Get the result, and remove it from the line. - result_obj["is_ok"] = (substr(line, 1, 2) == "ok" ? 1 : 0) - sub("^(not )?ok[ \t]*", "", line) - - # If the result has an explicit number, get it and strip it; otherwise, - # automatically assign the next progressive number to it. - if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/) - { - match(line, "^[0-9]+") - # The final `+ 0` is to normalize numbers with leading zeros. - result_obj["number"] = substr(line, 1, RLENGTH) + 0 - line = substr(line, RLENGTH + 1) - } - else - { - result_obj["number"] = testno - } - - if (plan_seen == LATE_PLAN) - # No further test results are acceptable after a "late" TAP plan - # has been seen. - result_obj["is_unplanned"] = 1 - else if (plan_seen && testno > planned_tests) - result_obj["is_unplanned"] = 1 - else - result_obj["is_unplanned"] = 0 - - # Strip trailing and leading whitespace. - sub("^[ \t]*", "", line) - sub("[ \t]*$", "", line) - - # This will have to be corrected if we have a "TODO"/"SKIP" directive. - result_obj["description"] = line - result_obj["directive"] = "" - result_obj["explanation"] = "" - - if (index(line, "#") == 0) - return # No possible directive, nothing more to do. - - # Directives are case-insensitive. - rx = "[ \t]*#[ \t]*([tT][oO][dD][oO]|[sS][kK][iI][pP])[ \t]*" - - # See whether we have the directive, and if yes, where. - pos = match(line, rx "$") - if (!pos) - pos = match(line, rx "[^a-zA-Z0-9_]") - - # If there was no TAP directive, we have nothing more to do. - if (!pos) - return - - # Let`s now see if the TAP directive has been escaped. For example: - # escaped: ok \# SKIP - # not escaped: ok \\# SKIP - # escaped: ok \\\\\# SKIP - # not escaped: ok \ # SKIP - if (substr(line, pos, 1) == "#") - { - bslash_count = 0 - for (i = pos; i > 1 && substr(line, i - 1, 1) == "\\"; i--) - bslash_count += 1 - if (bslash_count % 2) - return # Directive was escaped. - } - - # Strip the directive and its explanation (if any) from the test - # description. - result_obj["description"] = substr(line, 1, pos - 1) - # Now remove the test description from the line, that has been dealt - # with already. - line = substr(line, pos) - # Strip the directive, and save its value (normalized to upper case). - sub("^[ \t]*#[ \t]*", "", line) - result_obj["directive"] = toupper(substr(line, 1, 4)) - line = substr(line, 5) - # Now get the explanation for the directive (if any), with leading - # and trailing whitespace removed. - sub("^[ \t]*", "", line) - sub("[ \t]*$", "", line) - result_obj["explanation"] = line -} - -function get_test_exit_message(status) -{ - if (status == 0) - return "" - if (status !~ /^[1-9][0-9]*$/) - abort("getting exit status") - if (status < 127) - exit_details = "" - else if (status == 127) - exit_details = " (command not found?)" - else if (status >= 128 && status <= 255) - exit_details = sprintf(" (terminated by signal %d?)", status - 128) - else if (status > 256 && status <= 384) - # We used to report an "abnormal termination" here, but some Korn - # shells, when a child process die due to signal number n, can leave - # in $? an exit status of 256+n instead of the more standard 128+n. - # Apparently, both behaviours are allowed by POSIX (2008), so be - # prepared to handle them both. See also Austing Group report ID - # 0000051 - exit_details = sprintf(" (terminated by signal %d?)", status - 256) - else - # Never seen in practice. - exit_details = " (abnormal termination)" - return sprintf("exited with status %d%s", status, exit_details) -} - -function write_test_results() -{ - print ":global-test-result: " get_global_test_result() > trs_file - print ":recheck: " yn(must_recheck()) > trs_file - print ":copy-in-global-log: " yn(copy_in_global_log()) > trs_file - for (i = 0; i < test_results_index; i += 1) - print ":test-result: " test_results_list[i] > trs_file - close(trs_file); -} - -BEGIN { - -## ------- ## -## SETUP ## -## ------- ## - -'"$init_colors"' - -# Properly initialized once the TAP plan is seen. -planned_tests = 0 - -COOKED_PASS = expect_failure ? "XPASS": "PASS"; -COOKED_FAIL = expect_failure ? "XFAIL": "FAIL"; - -# Enumeration-like constants to remember which kind of plan (if any) -# has been seen. It is important that NO_PLAN evaluates "false" as -# a boolean. -NO_PLAN = 0 -EARLY_PLAN = 1 -LATE_PLAN = 2 - -testno = 0 # Number of test results seen so far. -bailed_out = 0 # Whether a "Bail out!" directive has been seen. - -# Whether the TAP plan has been seen or not, and if yes, which kind -# it is ("early" is seen before any test result, "late" otherwise). -plan_seen = NO_PLAN - -## --------- ## -## PARSING ## -## --------- ## - -is_first_read = 1 - -while (1) - { - # Involutions required so that we are able to read the exit status - # from the last input line. - st = getline - if (st < 0) # I/O error. - fatal("I/O error while reading from input stream") - else if (st == 0) # End-of-input - { - if (is_first_read) - abort("in input loop: only one input line") - break - } - if (is_first_read) - { - is_first_read = 0 - nextline = $0 - continue - } - else - { - curline = nextline - nextline = $0 - $0 = curline - } - # Copy any input line verbatim into the log file. - print | "cat >&3" - # Parsing of TAP input should stop after a "Bail out!" directive. - if (bailed_out) - continue - - # TAP test result. - if ($0 ~ /^(not )?ok$/ || $0 ~ /^(not )?ok[^a-zA-Z0-9_]/) - { - testno += 1 - setup_result_obj($0) - handle_tap_result() - } - # TAP plan (normal or "SKIP" without explanation). - else if ($0 ~ /^1\.\.[0-9]+[ \t]*$/) - { - # The next two lines will put the number of planned tests in $0. - sub("^1\\.\\.", "") - sub("[^0-9]*$", "") - handle_tap_plan($0, "") - continue - } - # TAP "SKIP" plan, with an explanation. - else if ($0 ~ /^1\.\.0+[ \t]*#/) - { - # The next lines will put the skip explanation in $0, stripping - # any leading and trailing whitespace. This is a little more - # tricky in truth, since we want to also strip a potential leading - # "SKIP" string from the message. - sub("^[^#]*#[ \t]*(SKIP[: \t][ \t]*)?", "") - sub("[ \t]*$", ""); - handle_tap_plan(0, $0) - } - # "Bail out!" magic. - # Older versions of prove and TAP::Harness (e.g., 3.17) did not - # recognize a "Bail out!" directive when preceded by leading - # whitespace, but more modern versions (e.g., 3.23) do. So we - # emulate the latter, "more modern" behaviour. - else if ($0 ~ /^[ \t]*Bail out!/) - { - bailed_out = 1 - # Get the bailout message (if any), with leading and trailing - # whitespace stripped. The message remains stored in `$0`. - sub("^[ \t]*Bail out![ \t]*", ""); - sub("[ \t]*$", ""); - # Format the error message for the - bailout_message = "Bail out!" - if (length($0)) - bailout_message = bailout_message " " $0 - testsuite_error(bailout_message) - } - # Maybe we have too look for diagnostic comments too. - else if (comments != 0) - { - comment = extract_tap_comment($0); - if (length(comment)) - report("#", comment); - } - } - -## -------- ## -## FINISH ## -## -------- ## - -# A "Bail out!" directive should cause us to ignore any following TAP -# error, as well as a non-zero exit status from the TAP producer. -if (!bailed_out) - { - if (!plan_seen) - { - testsuite_error("missing test plan") - } - else if (planned_tests != testno) - { - bad_amount = testno > planned_tests ? "many" : "few" - testsuite_error(sprintf("too %s tests run (expected %d, got %d)", - bad_amount, planned_tests, testno)) - } - if (!ignore_exit) - { - # Fetch exit status from the last line. - exit_message = get_test_exit_message(nextline) - if (exit_message) - testsuite_error(exit_message) - } - } - -write_test_results() - -exit 0 - -} # End of "BEGIN" block. -' - -# TODO: document that we consume the file descriptor 3 :-( -} 3>"$log_file" - -test $? -eq 0 || fatal "I/O or internal error" - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/common/Makefile.am.inc b/common/Makefile.am.inc deleted file mode 100644 index d08b8d12da..0000000000 --- a/common/Makefile.am.inc +++ /dev/null @@ -1,352 +0,0 @@ -lib_LTLIBRARIES += libflatpak.la -noinst_LTLIBRARIES += libflatpak-common-base.la libflatpak-common.la -noinst_PROGRAMS += test-libflatpak - -flatpakincludedir = $(includedir)/flatpak - -flatpakinclude_HEADERS = \ - common/flatpak.h \ - common/flatpak-ref.h \ - common/flatpak-error.h \ - common/flatpak-installed-ref.h \ - common/flatpak-remote-ref.h \ - common/flatpak-related-ref.h \ - common/flatpak-bundle-ref.h \ - common/flatpak-installation.h \ - common/flatpak-remote.h \ - common/flatpak-version-macros.h \ - common/flatpak-portal-error.h \ - common/flatpak-transaction.h \ - common/flatpak-instance.h \ - $(NULL) - -nodist_flatpakinclude_HEADERS = \ - common/flatpak-enum-types.h \ - $(NULL) - -dbus_built_sources = common/flatpak-dbus-generated.c common/flatpak-dbus-generated.h common/flatpak-document-dbus-generated.c common/flatpak-document-dbus-generated.h -systemd_dbus_built_sources = common/flatpak-systemd-dbus-generated.c common/flatpak-systemd-dbus-generated.h - -common/flatpak-enum-types.h: $(flatpakinclude_HEADERS) common/flatpak-enum-types.h.template - $(AM_V_GEN) $(GLIB_MKENUMS) --template $(filter %.template,$^) $(filter-out %.template,$^) > \ - common/flatpak-enum-types.h.tmp && mv common/flatpak-enum-types.h.tmp common/flatpak-enum-types.h - -common/flatpak-enum-types.c: $(flatpakinclude_HEADERS) common/flatpak-enum-types.c.template - $(AM_V_GEN) $(GLIB_MKENUMS) --template $(filter %.template,$^) $(filter-out %.template,$^) > \ - common/flatpak-enum-types.c.tmp && mv common/flatpak-enum-types.c.tmp common/flatpak-enum-types.c - -EXTRA_DIST += common/flatpak-enum-types.c.template common/flatpak-enum-types.h.template -EXTRA_DIST += common/meson.build - -common/flatpak-dbus-generated.c: data/org.freedesktop.Flatpak.xml data/org.freedesktop.Flatpak.Authenticator.xml Makefile - mkdir -p $(builddir)/common - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.Flatpak. \ - --c-namespace Flatpak \ - --generate-c-code $(builddir)/common/flatpak-dbus-generated \ - $(srcdir)/data/org.freedesktop.Flatpak.xml \ - $(srcdir)/data/org.freedesktop.Flatpak.Authenticator.xml \ - $(NULL) - -common/flatpak-document-dbus-generated.c: data/org.freedesktop.portal.Documents.xml Makefile - mkdir -p $(builddir)/common - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.portal. \ - --c-namespace XdpDbus \ - --generate-c-code $(builddir)/common/flatpak-document-dbus-generated \ - $(srcdir)/data/org.freedesktop.portal.Documents.xml \ - $(NULL) - -common/flatpak-systemd-dbus-generated.c: data/org.freedesktop.systemd1.xml Makefile - mkdir -p $(builddir)/common - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.systemd1. \ - --c-namespace Systemd \ - --generate-c-code $(builddir)/common/flatpak-systemd-dbus-generated \ - $(srcdir)/data/org.freedesktop.systemd1.xml \ - $(NULL) - -common/%-dbus-generated.h: common/%-dbus-generated.c - @true # Built as a side-effect of the rules for the .c - -if ENABLE_WAYLAND_SECURITY_CONTEXT -wayland_built_sources = common/security-context-v1-protocol.c common/security-context-v1-protocol.h -endif - -wl_security_context_xml = $(WAYLAND_PROTOCOLS_DATADIR)/staging/security-context/security-context-v1.xml - -common/security-context-v1-protocol.c: $(wl_security_context_xml) - $(AM_V_GEN) $(WAYLAND_SCANNER) private-code $(wl_security_context_xml) $(builddir)/common/security-context-v1-protocol.c - -common/security-context-v1-protocol.h: $(wl_security_context_xml) - $(AM_V_GEN) $(WAYLAND_SCANNER) client-header $(wl_security_context_xml) $(builddir)/common/security-context-v1-protocol.h - -nodist_libflatpak_common_base_la_SOURCES = \ - $(dbus_built_sources) \ - $(NULL) - -BUILT_SOURCES += $(nodist_libflatpak_common_base_la_SOURCES) -CLEANFILES += $(nodist_libflatpak_common_base_la_SOURCES) - -VARIANT_SCHEMA_COMPILER_FLAGS= -if ENABLE_INTERNAL_CHECKS -VARIANT_SCHEMA_COMPILER_FLAGS += --internal-validation -endif - -common/flatpak-variant-private.h: subprojects/variant-schema-compiler/variant-schema-compiler data/flatpak-variants.gv - $(AM_V_GEN) $(srcdir)/subprojects/variant-schema-compiler/variant-schema-compiler $(VARIANT_SCHEMA_COMPILER_FLAGS) --outfile-header common/flatpak-variant-private.h --outfile common/flatpak-variant-impl-private.h --prefix var $(srcdir)/data/flatpak-variants.gv - -# Generated by the same tool at the same time -common/flatpak-variant-impl-private.h: common/flatpak-variant-private.h - @: - -libflatpak_common_base_la_SOURCES = \ - common/flatpak-utils-base.c \ - common/flatpak-utils-base-private.h \ - $(NULL) - -libflatpak_common_base_la_CFLAGS = \ - -DFLATPAK_COMPILATION \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(HIDDEN_VISIBILITY_CFLAGS) \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - $(NULL) - -libflatpak_common_base_la_LIBADD = $(AM_LIBADD) $(BASE_LIBS) - -nodist_libflatpak_common_la_SOURCES = \ - $(nodist_flatpakinclude_HEADERS) \ - $(systemd_dbus_built_sources) \ - $(wayland_built_sources) \ - $(xdp_dbus_built_sources) \ - common/flatpak-enum-types.c \ - common/flatpak-variant-private.h \ - common/flatpak-variant-impl-private.h \ - $(NULL) - -BUILT_SOURCES += $(nodist_libflatpak_common_la_SOURCES) -CLEANFILES += $(nodist_libflatpak_common_la_SOURCES) - -libflatpak_common_la_SOURCES = \ - $(flatpakinclude_HEADERS) \ - common/flatpak-appdata-private.h \ - common/flatpak-appdata.c \ - common/flatpak-auth-private.h \ - common/flatpak-auth.c \ - common/flatpak-bundle-ref.c \ - common/flatpak-bwrap-private.h \ - common/flatpak-bwrap.c \ - common/flatpak-chain-input-stream-private.h \ - common/flatpak-chain-input-stream.c \ - common/flatpak-common-types-private.h \ - common/flatpak-context-private.h \ - common/flatpak-context.c \ - common/flatpak-dir-private.h \ - common/flatpak-dir.c \ - common/flatpak-error.c \ - common/flatpak-exports-private.h \ - common/flatpak-exports.c \ - common/flatpak-glib-backports-private.h \ - common/flatpak-glib-backports.c \ - common/flatpak-installation-private.h \ - common/flatpak-installation.c \ - common/flatpak-installed-ref-private.h \ - common/flatpak-installed-ref.c \ - common/flatpak-instance-private.h \ - common/flatpak-instance.c \ - common/flatpak-json-backports-private.h \ - common/flatpak-json-oci-private.h \ - common/flatpak-json-oci.c \ - common/flatpak-json-private.h \ - common/flatpak-json.c \ - common/flatpak-locale-utils-private.h \ - common/flatpak-locale-utils.c \ - common/flatpak-metadata-private.h \ - common/flatpak-oci-registry-private.h \ - common/flatpak-oci-registry.c \ - common/flatpak-portal-error.c \ - common/flatpak-portal-error.h \ - common/flatpak-progress-private.h \ - common/flatpak-progress.c \ - common/flatpak-ref.c \ - common/flatpak-ref-utils-private.h \ - common/flatpak-ref-utils.c \ - common/flatpak-related-ref-private.h \ - common/flatpak-related-ref.c \ - common/flatpak-remote-private.h \ - common/flatpak-remote-ref-private.h \ - common/flatpak-remote-ref.c \ - common/flatpak-remote.c \ - common/flatpak-run-private.h \ - common/flatpak-run.c \ - common/flatpak-run-cups-private.h \ - common/flatpak-run-cups.c \ - common/flatpak-run-dbus-private.h \ - common/flatpak-run-dbus.c \ - common/flatpak-run-pulseaudio-private.h \ - common/flatpak-run-pulseaudio.c \ - common/flatpak-run-sockets-private.h \ - common/flatpak-run-sockets.c \ - common/flatpak-run-wayland-private.h \ - common/flatpak-run-wayland.c \ - common/flatpak-run-x11-private.h \ - common/flatpak-run-x11.c \ - common/flatpak-syscalls-private.h \ - common/flatpak-transaction-private.h \ - common/flatpak-transaction.c \ - common/flatpak-transaction.h \ - common/flatpak-utils-http-private.h \ - common/flatpak-utils-http.c \ - common/flatpak-utils-private.h \ - common/flatpak-utils.c \ - common/flatpak-uri-private.h \ - common/flatpak-uri.c \ - common/flatpak-prune.c \ - common/flatpak-prune-private.h \ - common/flatpak-zstd-decompressor.c \ - common/flatpak-zstd-decompressor-private.h \ - common/valgrind-private.h \ - $(NULL) - -if HAVE_LIBMALCONTENT -libflatpak_common_la_SOURCES += \ - common/flatpak-parental-controls.c \ - common/flatpak-parental-controls-private.h \ - $(NULL) -endif - -libflatpak_common_la_CFLAGS = \ - -DFLATPAK_COMPILATION \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - $(AM_CFLAGS) \ - $(ARCHIVE_CFLAGS) \ - $(ZSTD_CFLAGS) \ - $(BASE_CFLAGS) \ - $(DCONF_CFLAGS) \ - $(HIDDEN_VISIBILITY_CFLAGS) \ - $(INTERNAL_GPGME_CFLAGS) \ - $(JSON_CFLAGS) \ - $(LIBSECCOMP_CFLAGS) \ - $(MALCONTENT_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(POLKIT_CFLAGS) \ - $(CURL_CFLAGS) \ - $(SOUP_CFLAGS) \ - $(SYSTEMD_CFLAGS) \ - $(XAUTH_CFLAGS) \ - $(WAYLAND_CLIENT_CFLAGS) \ - $(XML_CFLAGS) \ - $(NULL) -libflatpak_common_la_LIBADD = \ - $(AM_LIBADD) \ - $(ARCHIVE_LIBS) \ - $(ZSTD_LIBS) \ - $(BASE_LIBS) \ - $(DCONF_LIBS) \ - $(INTERNAL_GPGME_LIBS) \ - $(JSON_LIBS) \ - $(LIBSECCOMP_LIBS) \ - $(MALCONTENT_LIBS) \ - $(OSTREE_LIBS) \ - $(POLKIT_LIBS) \ - $(CURL_LIBS) \ - $(SOUP_LIBS) \ - $(SYSTEMD_LIBS) \ - $(XAUTH_LIBS) \ - $(WAYLAND_CLIENT_LIBS) \ - $(XML_LIBS) \ - $(NULL) - - -libflatpak_la_SOURCES = \ - common/flatpak.c \ - $(NULL) - -libflatpak_la_CFLAGS = \ - $(HIDDEN_VISIBILITY_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -I$(top_srcdir)/common \ - -I$(top_builddir)/common \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(CURL_CFLAGS) \ - $(SOUP_CFLAGS) \ - $(JSON_CFLAGS) \ - $(NULL) - -libflatpak_la_LDFLAGS = \ - $(AM_LDFLAGS) \ - -version-info $(LT_VERSION_INFO) \ - -export-dynamic \ - -rpath $(libdir) \ - $(NULL) - -libflatpak_la_LIBADD = \ - $(AM_LIBADD) \ - libflatpak-common.la \ - libflatpak-common-base.la \ - libglnx.la \ - $(BASE_LIBS) \ - $(OSTREE_LIBS) \ - $(CURL_LIBS) \ - $(SOUP_LIBS) \ - $(JSON_LIBS) \ - $(NULL) - -test_libflatpak_SOURCES = \ - common/test-lib.c \ - $(NULL) - -test_libflatpak_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - -I$(top_srcdir)/common \ - -I$(top_builddir)/common \ - $(NULL) - -test_libflatpak_LDADD = \ - $(AM_LDADD) \ - $(BASE_LIBS) \ - libflatpak.la \ - $(NULL) - -# gobject-introspection rules --include $(INTROSPECTION_MAKEFILE) - -sources = $(libflatpak_common_la_SOURCES) $(libflatpak_la_SOURCES) - -INTROSPECTION_GIRS = - -if HAVE_INTROSPECTION -Flatpak-1.0.gir: libflatpak.la Makefile - -introspected_headers = \ - $(flatpakinclude_HEADERS) \ - $(nodist_flatpakinclude_HEADERS) \ - $(NULL) -introspected_sources = $(filter-out %-private.h,$(sources)) - -Flatpak_1_0_gir_NAMESPACE = Flatpak -Flatpak_1_0_gir_VERSION = 1.0 -Flatpak_1_0_gir_LIBS = libflatpak.la -Flatpak_1_0_gir_FILES = $(introspected_headers) $(introspected_sources) -Flatpak_1_0_gir_CFLAGS = $(libflatpak_la_CFLAGS) -Flatpak_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 -Flatpak_1_0_gir_SCANNERFLAGS = \ - --warn-all \ - --c-include='flatpak.h' \ - --pkg-export=flatpak - -INTROSPECTION_GIRS += Flatpak-1.0.gir - -girdir = $(datadir)/gir-1.0 -nodist_gir_DATA = $(INTROSPECTION_GIRS) -CLEANFILES += $(nodist_gir_DATA) - -typelibdir = $(libdir)/girepository-1.0 -nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) -CLEANFILES += $(nodist_typelib_DATA) - -endif # HAVE_INTROSPECTION diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 7dfa10c64f..0000000000 --- a/configure.ac +++ /dev/null @@ -1,674 +0,0 @@ -AC_PREREQ([2.63]) - -# Making releases: -# FLATPAK_MICRO_VERSION += 1; -# FLATPAK_INTERFACE_AGE += 1; -# FLATPAK_BINARY_AGE += 1; -# if any functions have been added, set FLATPAK_INTERFACE_AGE to 0. -# if backwards compatibility has been broken, -# set FLATPAK_BINARY_AGE and FLATPAK_INTERFACE_AGE to 0. -# -# in easier to understand terms: -# -# on the stable branch, interface age == micro -# on the unstable (ie main), interface age = 0 - -m4_define([flatpak_major_version], [1]) -m4_define([flatpak_minor_version], [15]) -m4_define([flatpak_micro_version], [6]) -m4_define([flatpak_extra_version], []) -m4_define([flatpak_interface_age], [0]) -m4_define([flatpak_binary_age], - [m4_eval(10000 * flatpak_major_version + 100 * flatpak_minor_version + flatpak_micro_version)]) -m4_define([flatpak_version], - [flatpak_major_version.flatpak_minor_version.flatpak_micro_version()flatpak_extra_version]) - -AC_INIT([Flatpak], - [flatpak_version], - [https://github.com/flatpak/flatpak/issues], - [flatpak], - [http://flatpak.org/]) - -GLIB_REQS=2.46 -SYSTEM_BWRAP_REQS=0.8.0 -SYSTEM_DBUS_PROXY_REQS=0.1.0 -OSTREE_REQS=2020.8 - -AC_USE_SYSTEM_EXTENSIONS -AC_SYS_LARGEFILE - -AC_PROG_CC -AM_PROG_CC_C_O -AC_DISABLE_STATIC -AC_PROG_CC_STDC - -LT_PREREQ([2.2.6]) -LT_INIT([disable-static]) - -AC_CONFIG_SRCDIR([common/flatpak-dir.c]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([1.13.4 no-define no-dist-gzip dist-xz tar-ustar foreign subdir-objects]) -AC_PROG_SED -AC_PROG_BISON - -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.18.2]) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$PACKAGE", [gettext domain]) - -# Enable silent rules is available -AM_SILENT_RULES([yes]) -AM_MAINTAINER_MODE([enable]) - -dnl This list is shared with https://github.com/ostreedev/ostree -CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\ --pipe \ --Wall \ --Werror=shadow \ --Werror=empty-body \ --Werror=strict-prototypes \ --Werror=missing-prototypes \ --Werror=implicit-function-declaration \ -"-Werror=format=2 -Werror=format-security -Werror=format-nonliteral" \ --Werror=pointer-arith -Werror=init-self \ --Werror=missing-declarations \ --Werror=return-type \ --Werror=overflow \ --Werror=int-conversion \ --Werror=parenthesis \ --Werror=incompatible-pointer-types \ --Werror=misleading-indentation \ --Werror=missing-include-dirs \ -]) -AC_SUBST(WARN_CFLAGS) - -AX_VALGRIND_CHECK - -PKG_PROG_PKG_CONFIG([0.24]) - -AC_ARG_WITH(privileged_group, - AS_HELP_STRING([--with-privileged-group=GROUP],[Name of privileged group, [default=wheel]]), - with_privileged_group="$withval", with_privileged_group=wheel) -PRIVILEGED_GROUP=$with_privileged_group -AC_SUBST(PRIVILEGED_GROUP) - -AC_ARG_WITH(dbus_service_dir, - AS_HELP_STRING([--with-dbus-service-dir=PATH],[choose directory for dbus service files, [default=PREFIX/share/dbus-1/services]]), - with_dbus_service_dir="$withval", with_dbus_service_dir=$datadir/dbus-1/services) -DBUS_SERVICE_DIR=$with_dbus_service_dir -AC_SUBST(DBUS_SERVICE_DIR) - -AC_ARG_WITH(dbus_config_dir, - AS_HELP_STRING([--with-dbus-config-dir=PATH],[choose directory for dbus config files, [default=SYSCONFDIR/dbus-1/system.d]]), - with_dbus_config_dir="$withval", with_dbus_config_dir=${sysconfdir}/dbus-1/system.d) -DBUS_CONFIG_DIR=$with_dbus_config_dir -AC_SUBST(DBUS_CONFIG_DIR) - -AC_ARG_WITH([systemduserunitdir], - [AS_HELP_STRING([--with-systemduserunitdir=DIR], - [Directory for systemd user service files (default=PREFIX/lib/systemd/user)])], - [], - dnl This is deliberately not ${libdir}: systemd units always go in - dnl .../lib, never .../lib64 or .../lib/x86_64-linux-gnu - [with_systemduserunitdir='${prefix}/lib/systemd/user']) -AC_SUBST([systemduserunitdir], [$with_systemduserunitdir]) - -AC_ARG_WITH([systemdsystemunitdir], - [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], - [Directory for systemd system service files (default=PREFIX/lib/systemd/system)])], - [], - dnl This is deliberately not ${libdir}: systemd units always go in - dnl .../lib, never .../lib64 or .../lib/x86_64-linux-gnu - [with_systemdsystemunitdir='${prefix}/lib/systemd/system']) -AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) - -AC_ARG_WITH([systemdsystemenvgendir], - [AS_HELP_STRING([--with-systemdsystemenvgendir=DIR], - [Directory for systemd system environment generators (default=PREFIX/lib/systemd/system-environment-generators)])], - [], - dnl This is deliberately not ${libdir}: systemd units always go in - dnl .../lib, never .../lib64 or .../lib/x86_64-linux-gnu - [with_systemdsystemenvgendir='${prefix}/lib/systemd/system-environment-generators']) -AC_SUBST([systemdsystemenvgendir], [$with_systemdsystemenvgendir]) - -AC_ARG_WITH([systemduserenvgendir], - [AS_HELP_STRING([--with-systemduserenvgendir=DIR], - [Directory for systemd user environment generators (default=PREFIX/lib/systemd/user-environment-generators)])], - [], - dnl This is deliberately not ${libdir}: systemd units always go in - dnl .../lib, never .../lib64 or .../lib/x86_64-linux-gnu - [with_systemduserenvgendir='${prefix}/lib/systemd/user-environment-generators']) -AC_SUBST([systemduserenvgendir], [$with_systemduserenvgendir]) - -AC_ARG_WITH(system_fonts_dir, - AS_HELP_STRING([--with-system-fonts-dir=PATH],[Directory where system fonts are, [default=/usr/share/fonts]]), - with_system_fonts_dir="$withval", with_system_fonts_dir=/usr/share/fonts) -SYSTEM_FONTS_DIR=$with_system_fonts_dir -AC_SUBST(SYSTEM_FONTS_DIR) - -AC_ARG_WITH(system_font_cache_dirs, - AS_HELP_STRING([--with-system-font-cache-dirs=PATHS],[Directory where the system font cache is, [default=/var/cache/fontconfig:/usr/lib/fontconfig/cache]]), - with_system_font_cache_dirs="$withval", with_system_font_cache_dirs=/var/cache/fontconfig:/usr/lib/fontconfig/cache) -SYSTEM_FONT_CACHE_DIRS=$with_system_font_cache_dirs -AC_SUBST(SYSTEM_FONT_CACHE_DIRS) - -AC_ARG_WITH(profile_dir, - AS_HELP_STRING([--with-profile-dir=PATH],[choose directory for profile.d files, [default=SYSCONFDIR/profile.d]]), - with_profile_dir="$withval", with_profile_dir=${sysconfdir}/profile.d) -PROFILE_DIR=$with_profile_dir -AC_SUBST(PROFILE_DIR) - -AC_ARG_VAR([BWRAP], [Bubblewrap executable]) -AC_ARG_WITH([system-bubblewrap], - [AS_HELP_STRING([--with-system-bubblewrap], [Use system bwrap executable [default=check $BWRAP]])], - [BWRAP="$withval"], - [BWRAP="${BWRAP:-false}"]) -CAP_LIB= -AS_CASE([$BWRAP], - [yes], - [BWRAP=bwrap], - [no], - [BWRAP=false], - [auto], - [AC_CHECK_PROG([BWRAP], [bwrap], [bwrap], [false])]) -if test "x$BWRAP" != xfalse; then - BWRAP_VERSION=`$BWRAP --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'` - AX_COMPARE_VERSION([$SYSTEM_BWRAP_REQS],[gt],[$BWRAP_VERSION], - [AC_MSG_ERROR([You need at least version $SYSTEM_BWRAP_REQS of bubblewrap to use the system installed version])]) - AM_CONDITIONAL([WITH_SYSTEM_BWRAP], [true]) -else - AC_CHECK_LIB(cap, cap_from_text, CAP_LIB=-lcap) - if test "$ac_cv_lib_cap_cap_from_text" != "yes"; then - AC_MSG_ERROR([*** libcap needed by bubblewrap but not found]) - fi - - AM_CONDITIONAL([WITH_SYSTEM_BWRAP], [false]) -fi -AC_SUBST([CAP_LIB]) - -AC_ARG_VAR([DBUS_PROXY], [dbus-proxy executable]) -AC_ARG_WITH([system-dbus-proxy], - [AS_HELP_STRING([--with-system-dbus-proxy], [Use system xdg-dbus-proxy executable [default=check $DBUS_PROXY]])], - [DBUS_PROXY="$withval"], - [DBUS_PROXY="${DBUS_PROXY:-false}"]) -AS_CASE([$DBUS_PROXY], - [yes], - [DBUS_PROXY=xdg-dbus-proxy], - [no], - [DBUS_PROXY=false], - [auto], - [AC_CHECK_PROG([DBUS_PROXY], [xdg-dbus-proxy], [xdg-dbus-proxy], [false])]) -if test "x$DBUS_PROXY" != xfalse; then - DBUS_PROXY_VERSION=[$( $DBUS_PROXY --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,')] - AX_COMPARE_VERSION([$SYSTEM_DBUS_PROXY_REQS],[gt],[$DBUS_PROXY_VERSION], - [AC_MSG_ERROR([You need at least version $SYSTEM_DBUS_PROXY_REQS of xdg-dbus-proxy to use the system installed version (have $DBUS_PROXY_VERSION)])]) - AM_CONDITIONAL([WITH_SYSTEM_DBUS_PROXY], [true]) -else - AM_CONDITIONAL([WITH_SYSTEM_DBUS_PROXY], [false]) -fi - - -AC_CHECK_FUNCS(fdwalk) -LIBGLNX_CONFIGURE - -AC_CHECK_HEADER([sys/xattr.h], [], [AC_MSG_ERROR([You must have sys/xattr.h from glibc])]) -AC_CHECK_HEADER([sys/capability.h], have_caps=yes, [AC_MSG_ERROR([sys/capability.h header not found])]) - -AC_SUBST([GLIB_MKENUMS], [`$PKG_CONFIG --variable glib_mkenums glib-2.0`]) -AC_SUBST([GLIB_COMPILE_RESOURCES], [`$PKG_CONFIG --variable glib_compile_resources gio-2.0`]) -AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`]) - -POLKIT_GOBJECT_REQUIRED=0.98 - -PKG_CHECK_MODULES(ARCHIVE, [libarchive >= 2.8.0]) -PKG_CHECK_MODULES(BASE, [glib-2.0 >= $GLIB_REQS gio-2.0 gio-unix-2.0]) -PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.4]) -PKG_CHECK_MODULES(ZSTD, [libzstd >= 0.8.1], [have_zstd=yes], [have_zstd=no]) -if test $have_zstd = yes; then - AC_DEFINE(HAVE_ZSTD, 1, [Define if libzstd is available]) -fi -PKG_CHECK_MODULES(DCONF, [dconf >= 0.26], [have_dconf=yes], [have_dconf=no]) -if test $have_dconf = yes; then - AC_DEFINE(HAVE_DCONF, 1, [Define if dconf is available]) -fi -AC_ARG_WITH([systemd], AS_HELP_STRING([--with-systemd], - [Build with systemd support [default=auto]]), [], [with_systemd=auto],) -if test "x$with_systemd" != "xno"; then - PKG_CHECK_MODULES(SYSTEMD, [libsystemd], [have_libsystemd=yes], [have_libsystemd=no]) - if test $have_libsystemd = yes; then - AC_DEFINE(HAVE_LIBSYSTEMD, 1, [Define if libsystemd is available]) - elif test "x$with_systemd" == "xyes"; then - AC_MSG_ERROR([systemd was requested but it could not be found]) - fi -else - have_libsystemd=no -fi -PKG_CHECK_MODULES([MALCONTENT], [malcontent-0 >= 0.5.0], [have_libmalcontent=yes], [have_libmalcontent=no]) -AS_IF([test "$have_libmalcontent" = "yes"],[ - AC_DEFINE([HAVE_LIBMALCONTENT], [1], [Define if libmalcontent is available]) -]) -AM_CONDITIONAL([HAVE_LIBMALCONTENT],[test "$have_libmalcontent" = "yes"]) - -PKG_CHECK_MODULES(GLIB260, glib-2.0 >= 2.60, - [AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_60, [Ignore massive GTimeVal deprecation warnings in 2.62])], - [true]) - -save_LIBS=$LIBS -LIBS=$ARCHIVE_LIBS -AC_CHECK_FUNCS(archive_read_support_filter_all) -LIBS=$save_LIBS - -CURL_DEPENDENCY=7.29.0 -AC_ARG_WITH(curl, - AS_HELP_STRING([--with-curl], [Use libcurl @<:@default=yes@:>@]), - [], [with_curl=yes]) -AS_IF([test x$with_curl != xno ], [ - PKG_CHECK_MODULES(CURL, libcurl >= $CURL_DEPENDENCY) - with_curl=yes - http_backend=curl - AC_DEFINE([HAVE_CURL], 1, [Define if we have libcurl.pc]) -], [ - PKG_CHECK_MODULES(SOUP, [libsoup-2.4]) - AC_DEFINE([HAVE_SOUP], 1, [Define if we have libsoup-2.4.pc]) - http_backend=soup -]) -AM_CONDITIONAL(USE_CURL, test x$with_curl != xno) -AM_CONDITIONAL(USE_SOUP, test x$with_curl == xno) -AC_SUBST(http_backend) - -LIBGPGME_DEPENDENCY="1.1.8" -PKG_CHECK_MODULES([DEP_GPGME], [gpgme >= 1.8.0], [have_gpgme=yes], [ - PKG_CHECK_MODULES([DEP_GPGME_PTHREAD], [gpgme-pthread >= $LIBGPGME_DEPENDENCY], [ - have_gpgme=yes - ], [ - m4_ifdef([AM_PATH_GPGME_PTHREAD], [ - AM_PATH_GPGME_PTHREAD([$LIBGPGME_DEPENDENCY], [have_gpgme=yes], [have_gpgme=no]) - ], [ - have_gpgme=no - ]) - ]) -]) -AS_IF([ test x$have_gpgme = xno ], [ - AC_MSG_ERROR([Need GPGME_PTHREAD version $LIBGPGME_DEPENDENCY or later]) -]) - -AC_ARG_ENABLE(selinux-module, - [AS_HELP_STRING([--enable-selinux-module],[Enable selinux module for system-helper])], - enable_selinux_module=$enableval, enable_selinux_module=auto) -if test x$enable_selinux_module = xauto ; then - AC_CHECK_FILE([/usr/share/selinux/devel/Makefile], [enable_selinux_module=yes], [enable_selinux_module=no]) -fi -if test x$enable_selinux_module = xyes ; then - AC_CHECK_FILE([/usr/share/selinux/devel/Makefile], [], [AC_MSG_ERROR([selinux-policy-devel needed to build selinux module])]) -fi -AM_CONDITIONAL(BUILD_SELINUX_MODULE, test x$enable_selinux_module = xyes) - -AC_ARG_ENABLE([system-helper], - AC_HELP_STRING([--disable-system-helper], - [Disable system helper]), - [], - [enable_system_helper=yes]) -if test "x$enable_system_helper" = "xyes"; then - PKG_CHECK_MODULES(POLKIT, \ - polkit-agent-1 >= $POLKIT_GOBJECT_REQUIRED) - AC_DEFINE([USE_SYSTEM_HELPER], [1], [Define if using system-helper]) -fi -AM_CONDITIONAL(BUILD_SYSTEM_HELPER, test x$enable_system_helper = xyes) - -AC_ARG_ENABLE([auto-sideloading], - AC_HELP_STRING([--enable-auto-sideloading], - [Enable systemd units which make Flatpak sideload from inserted USB drives]), - [], - [enable_auto_sideloading=no]) -AM_CONDITIONAL(BUILD_AUTO_SIDELOADING, test x$enable_auto_sideloading = xyes) - -PKG_CHECK_MODULES([FUSE3], [fuse3 >= 3.1.1], - [ - FUSE_USE_VERSION=31 - FUSE_CFLAGS="$FUSE3_CFLAGS" - FUSE_LIBS="$FUSE3_LIBS" - ], - [PKG_CHECK_MODULES([FUSE], [fuse >= 2.9.2], [FUSE_USE_VERSION=26])]) -AC_DEFINE_UNQUOTED([FUSE_USE_VERSION], [$FUSE_USE_VERSION], [Define to the FUSE API version]) - -AC_ARG_ENABLE([xauth], - AC_HELP_STRING([--disable-xauth], - [Disable Xauth use]), - [], - [enable_xauth=yes]) -if test "x$enable_xauth" = "xyes"; then - PKG_CHECK_MODULES(XAUTH, [xau]) - AC_DEFINE([ENABLE_XAUTH], [1], - [Define if using xauth]) -fi - -AC_ARG_WITH([wayland-security-context], - AC_HELP_STRING([--with-wayland-security-context], - [Build with Wayland security context [default=auto]]), - [], - [with_wayland_security_context=auto]) -enable_wayland_security_context=no -if test "x$with_wayland_security_context" != "xno"; then - PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.32], - [have_wayland_protocols=yes], [have_wayland_protocols=no]) - if test $have_wayland_protocols = yes; then - PKG_CHECK_MODULES(WAYLAND_CLIENT, [wayland-client]) - PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner >= 1.15]) - wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` - AC_SUBST(WAYLAND_SCANNER, $wayland_scanner) - wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` - AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $wayland_protocols_pkgdatadir) - AC_DEFINE([ENABLE_WAYLAND_SECURITY_CONTEXT], [1], - [Define if using Wayland security context]) - enable_wayland_security_context=yes - fi -fi -AM_CONDITIONAL(ENABLE_WAYLAND_SECURITY_CONTEXT, test "x$enable_wayland_security_context" = "xyes") - -AC_ARG_ENABLE([gdm-env-file], - [AC_HELP_STRING([--enable-gdm-env-file], [Install gdm env.d file (not needed if systemd generators work)])], - install_gdm_env_file=$enableval, install_gdm_env_file=no) -AM_CONDITIONAL(INSTALL_GDM_ENV_FILE, test x$install_gdm_env_file = xyes) - -AC_ARG_ENABLE([sandboxed-triggers], - AC_HELP_STRING([--disable-sandboxed-triggers], - [Disable sandboxed triggers]), - [], - [enable_sandboxed_triggers=yes]) -if test "x$enable_sandboxed_triggers" = "xno"; then - AC_DEFINE([DISABLE_SANDBOXED_TRIGGERS], [1], - [Define if sandboxed triggers are disabled]) -fi - -PKG_CHECK_MODULES(OSTREE, [ostree-1 >= $OSTREE_REQS]) - -PKG_CHECK_MODULES(JSON, [json-glib-1.0]) - -PKG_CHECK_MODULES(APPSTREAM, [appstream >= 0.12.0]) - -PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0]) - -AC_ARG_ENABLE([seccomp], - AC_HELP_STRING([--disable-seccomp], - [Disable seccomp]), - [], - [enable_seccomp=yes]) - -if test "x$enable_seccomp" = "xyes"; then - PKG_CHECK_MODULES(LIBSECCOMP, [libseccomp]) - AC_DEFINE([ENABLE_SECCOMP], [1], - [Define if using seccomp]) -fi - -AC_ARG_WITH(priv-mode, - AS_HELP_STRING([--with-priv-mode=setuid/none], - [How to set privilege-raising during install (only needed if userns not working)]), - [], - [with_priv_mode="none"]) - -AM_CONDITIONAL(PRIV_MODE_SETUID, test "x$with_priv_mode" = "xsetuid") - -AC_ARG_ENABLE(sudo, - AS_HELP_STRING([--enable-sudo],[Use sudo to set setuid flags on binaries during install (only needed if userns disabled)]), - [SUDO_BIN="sudo"], [SUDO_BIN=""]) -AC_SUBST([SUDO_BIN]) - -AC_ARG_ENABLE(asan, - [AS_HELP_STRING([--enable-asan], - [Use build with address sanitazion])], - [], - [enable_asan=no]) -AM_CONDITIONAL([ENABLE_ASAN], [test "x$enable_asan" = xyes]) - -AC_ARG_WITH(system-install-dir, - [AS_HELP_STRING([--with-system-install-dir=DIR], - [Location of system installation [LOCALSTATEDIR/lib/flatpak]])], - [], - [with_system_install_dir='$(localstatedir)/lib/flatpak']) -SYSTEM_INSTALL_DIR=$with_system_install_dir -AC_SUBST(SYSTEM_INSTALL_DIR) - -AC_ARG_WITH(run-media-dir, - [AS_HELP_STRING([--with-run-media-dir=DIR], - [Location of auto-mounted USB drives [/run/media]])], - [], - [with_run_media_dir='/run/media']) -RUN_MEDIA_DIR=$with_run_media_dir -AC_SUBST(RUN_MEDIA_DIR) - -AC_ARG_WITH([sysusersdir], - [AS_HELP_STRING([--with-sysusersdir=DIR], - [Directory for systemd sysusers.d configuration files (default=PREFIX/lib/sysusers.d)])], - [], - dnl This is deliberately not ${libdir}: systemd units always go in - dnl .../lib, never .../lib64 or .../lib/x86_64-linux-gnu - [with_sysusersdir='${prefix}/lib/sysusers.d']) -AC_SUBST([sysusersdir], [$with_sysusersdir]) - -AC_ARG_WITH([tmpfilesdir], - [AS_HELP_STRING([--with-tmpfilesdir=DIR], - [Directory for systemd tmpfiles.d configuration files (default=PREFIX/lib/tmpfiles.d)])], - [], - [with_tmpfilesdir='${prefix}/lib/tmpfiles.d']) -AC_SUBST([tmpfilesdir], [$with_tmpfilesdir]) - -AC_ARG_WITH(system-helper-user, - [AS_HELP_STRING([--with-system-helper-user=USERNAME], - [Name of the system helper user])], - with_system_helper_user="$withval", with_system_helper_user=flatpak) -SYSTEM_HELPER_USER=$with_system_helper_user -AC_SUBST(SYSTEM_HELPER_USER) - -AC_ARG_ENABLE(documentation, - AC_HELP_STRING([--enable-documentation], [Build documentation]),, - enable_documentation=yes) -if test x$enable_documentation = xyes; then - AC_PATH_PROG([XSLTPROC], [xsltproc]) - if test x$XSLTPROC = x; then - AC_MSG_ERROR([xsltproc is required to build documentation]) - fi - - dnl check for DocBook DTD in the local catalog - JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.5//EN], - [DocBook XML DTD V4.5], [have_docbook_dtd=yes], [have_docbook_dtd=no]) - if test "$have_docbook_dtd" != yes; then - AC_MSG_ERROR([DocBook DTD is required for --enable-documentation]) - fi - - dnl check for DocBook XSL stylesheets in the local catalog - JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], - [DocBook XSL Stylesheets], [have_docbook_style=yes],[have_docbook_style=no]) - if test "$have_docbook_style" != yes; then - AC_MSG_ERROR([DocBook XSL Stylesheets are required for --enable-documentation]) - fi -fi -AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes) - -GOBJECT_INTROSPECTION_CHECK([1.40.0]) - -# gtkdocize greps for ^GTK_DOC_CHECK, so we need to put it on its own line -m4_ifdef([GTK_DOC_CHECK], [ -GTK_DOC_CHECK([1.20], [--flavour no-tmpl]) - -AC_ARG_ENABLE([gtk-doc-check], - [AS_HELP_STRING([--enable-gtk-doc-check], - [Check completeness of documentation in 'make check'])], - [], - [enable_gtk_doc_check=no]) -],[ -enable_gtk_doc="disabled (no gtk-doc)" -enable_gtk_doc_check="disabled (no gtk-doc)" -AM_CONDITIONAL([ENABLE_GTK_DOC], [false]) -]) -AM_CONDITIONAL([ENABLE_GTK_DOC_CHECK], [test "x$enable_gtk_doc_check" = xyes]) - - -AC_ARG_ENABLE(docbook-docs, - [AS_HELP_STRING([--enable-docbook-docs],[build documentation (requires xmlto)])], - enable_docbook_docs=$enableval, enable_docbook_docs=auto) -AC_PATH_PROG(XMLTO, xmlto, no) -AC_MSG_CHECKING([whether to build DocBook documentation]) -if test x$XMLTO = xno ; then - have_docbook=no -else - have_docbook=yes -fi -if test x$enable_docbook_docs = xauto ; then - if test x$have_docbook = xno ; then - enable_docbook_docs=no - else - enable_docbook_docs=yes - fi -fi -if test x$enable_docbook_docs = xyes; then - if test x$have_docbook = xno; then - AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found]) - fi - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes) -AC_ARG_VAR([XMLTO],[Define/override the 'xmlto' location.]) -AC_ARG_VAR([XMLTO_FLAGS],[Define/override 'xmlto' options, like '--skip-validation'.]) - - -################################################## -# Visibility handling -################################################## - -HIDDEN_VISIBILITY_CFLAGS="" -case "$host" in - *) - dnl on other compilers, check if we can do -fvisibility=hidden - SAVED_CFLAGS="${CFLAGS}" - CFLAGS="-fvisibility=hidden" - AC_MSG_CHECKING([for -fvisibility=hidden compiler flag]) - AC_TRY_COMPILE([], [int main (void) { return 0; }], - AC_MSG_RESULT(yes) - enable_fvisibility_hidden=yes, - AC_MSG_RESULT(no) - enable_fvisibility_hidden=no) - CFLAGS="${SAVED_CFLAGS}" - - AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [ - AC_DEFINE([FLATPAK_EXTERN], [__attribute__((visibility("default"))) extern], - [defines how to decorate public symbols while building]) - HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" - ], [ - AC_DEFINE([FLATPAK_EXTERN], [extern], - [defines how to decorate public symbols while building]) - ]) - ;; -esac -AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) - -########################################## -# Coverage testing -########################################## -AC_ARG_ENABLE(coverage, - AS_HELP_STRING([--enable-coverage], - [enable coverage testing with gcov]), - [use_lcov=$enableval], [use_lcov=no]) - -if test x$use_lcov = xyes; then - AC_PATH_PROG(LCOV, lcov) - AC_PATH_PROG(GENHTML, genhtml) - - # remove all optimization from CFLAGS - changequote({,}) - CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'` - changequote([,]) - - CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage" - LDFLAGS="$LDFLAGS -lgcov" -fi - -AC_ARG_ENABLE(internal-checks, - AS_HELP_STRING([--enable-internal-checks], - [enable internal checking]), - [use_internal_checks=$enableval], [use_internal_checks=no]) - -if test x$use_internal_checks = xyes; then - AM_CONDITIONAL([ENABLE_INTERNAL_CHECKS], [true]) -else - AM_CONDITIONAL([ENABLE_INTERNAL_CHECKS], [false]) -fi - -GLIB_TESTS - -FLATPAK_MAJOR_VERSION=flatpak_major_version -FLATPAK_MINOR_VERSION=flatpak_minor_version -FLATPAK_MICRO_VERSION=flatpak_micro_version -FLATPAK_EXTRA_VERSION=flatpak_extra_version -FLATPAK_INTERFACE_AGE=flatpak_interface_age -FLATPAK_VERSION=flatpak_version -AC_SUBST(FLATPAK_MAJOR_VERSION) -AC_SUBST(FLATPAK_MINOR_VERSION) -AC_SUBST(FLATPAK_MICRO_VERSION) -AC_SUBST(FLATPAK_INTERFACE_AGE) -AC_SUBST(FLATPAK_VERSION) -AC_DEFINE_UNQUOTED([PACKAGE_MAJOR_VERSION], $FLATPAK_MAJOR_VERSION, [Major version]) -AC_DEFINE_UNQUOTED([PACKAGE_MINOR_VERSION], $FLATPAK_MINOR_VERSION, [Minor version]) -AC_DEFINE_UNQUOTED([PACKAGE_MICRO_VERSION], $FLATPAK_MICRO_VERSION, [Micro version]) -AC_DEFINE_UNQUOTED([PACKAGE_EXTRA_VERSION], $FLATPAK_EXTRA_VERSION, [Extra version]) - -# libtool versioning -#LT_RELEASE=$FLATPAK_MAJOR_VERSION.$FLATPAK_MINOR_VERSION -#LT_CURRENT=`expr $FLATPAK_MICRO_VERSION - $FLATPAK_INTERFACE_AGE` -#LT_REVISION=$FLATPAK_INTERFACE_AGE -#LT_AGE=`expr $FLATPAK_BINARY_AGE - $FLATPAK_INTERFACE_AGE` -#LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` - -m4_define([lt_current], [m4_eval(10000 * flatpak_major_version + 100 * flatpak_minor_version + flatpak_micro_version - flatpak_interface_age)]) -m4_define([lt_revision], [flatpak_interface_age]) -m4_define([lt_age], [m4_eval(flatpak_binary_age - flatpak_interface_age)]) -LT_VERSION_INFO="lt_current:lt_revision:lt_age" -LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age) -AC_SUBST(LT_VERSION_INFO) -AC_SUBST(LT_CURRENT_MINUS_AGE) - -AC_CONFIG_FILES([ -Makefile -doc/Makefile -doc/reference/Makefile -flatpak.pc -common/flatpak-version-macros.h -doc/reference/version.xml -doc/flatpak-docs.xml -po/Makefile.in -]) -AC_OUTPUT - -if test x$BWRAP = xfalse ; then - build_bwrap="yes" -else - build_bwrap="no" -fi - -if test x$DBUS_PROXY = xfalse ; then - build_dbus_proxy="yes" -else - build_dbus_proxy="no" -fi - -echo "" -echo " Flatpak $FLATPAK_VERSION" -echo " ==============" -echo "" -echo " Build system helper: $enable_system_helper" -echo " Build selinux module: $enable_selinux_module" -echo " Build bubblewrap: $build_bwrap" -echo " Build dbus-proxy: $build_dbus_proxy" -echo " Use sandboxed triggers: $enable_sandboxed_triggers" -echo " Use seccomp: $enable_seccomp" -echo " Privileged group: $PRIVILEGED_GROUP" -echo " Privilege mode: $with_priv_mode" -echo " Use dconf: $have_dconf" -echo " Use libsystemd: $have_libsystemd" -echo " Use libmalcontent: $have_libmalcontent" -echo " Use libzstd: $have_zstd" -echo " Use auto sideloading: $enable_auto_sideloading" -echo " HTTP backend: $http_backend" -echo " Wayland security context: $enable_wayland_security_context" -echo "" diff --git a/data/Makefile.am.inc b/data/Makefile.am.inc deleted file mode 100644 index bf239ee729..0000000000 --- a/data/Makefile.am.inc +++ /dev/null @@ -1,20 +0,0 @@ -introspectiondir = $(datadir)/dbus-1/interfaces -introspection_DATA = \ - data/org.freedesktop.Flatpak.xml \ - data/org.freedesktop.Flatpak.Authenticator.xml \ - data/org.freedesktop.portal.Flatpak.xml \ - $(NULL) - -dist_tmpfiles_DATA += data/tmpfiles.d/flatpak.conf - -EXTRA_DIST += \ - data/meson.build \ - data/org.freedesktop.portal.Documents.xml \ - data/org.freedesktop.impl.portal.PermissionStore.xml \ - data/org.freedesktop.systemd1.xml \ - data/org.freedesktop.Flatpak.xml \ - data/org.freedesktop.Flatpak.Authenticator.xml \ - data/org.freedesktop.portal.Flatpak.xml \ - data/flatpak-docker-seccomp.json \ - data/flatpak-variants.gv \ - $(NULL) diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index 933501399e..0000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,116 +0,0 @@ -NULL = - -SUBDIRS = reference - -XSLTPROC_FLAGS = \ - --nonet \ - --stringparam man.output.quietly 1 \ - --stringparam funcsynopsis.style ansi \ - --stringparam man.th.extra1.suppress 1 \ - --stringparam man.authors.section.enabled 0 \ - --stringparam man.copyright.section.enabled 0 \ - $(NULL) - -.xml.1: - $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< - -.xml.5: - $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< - -man1 = \ - flatpak.1 \ - flatpak-remotes.1 \ - flatpak-remote-add.1 \ - flatpak-remote-delete.1 \ - flatpak-remote-modify.1 \ - flatpak-remote-ls.1 \ - flatpak-remote-info.1 \ - flatpak-install.1 \ - flatpak-config.1 \ - flatpak-update.1 \ - flatpak-uninstall.1 \ - flatpak-mask.1 \ - flatpak-pin.1 \ - flatpak-list.1 \ - flatpak-info.1 \ - flatpak-make-current.1 \ - flatpak-run.1 \ - flatpak-override.1 \ - flatpak-enter.1 \ - flatpak-ps.1 \ - flatpak-document-export.1 \ - flatpak-document-unexport.1 \ - flatpak-document-info.1 \ - flatpak-documents.1 \ - flatpak-permission-remove.1 \ - flatpak-permissions.1 \ - flatpak-permission-show.1 \ - flatpak-permission-reset.1 \ - flatpak-permission-set.1 \ - flatpak-build-init.1 \ - flatpak-build.1 \ - flatpak-build-bundle.1 \ - flatpak-build-import-bundle.1 \ - flatpak-build-finish.1 \ - flatpak-build-export.1 \ - flatpak-build-update-repo.1 \ - flatpak-build-sign.1 \ - flatpak-build-commit-from.1 \ - flatpak-repo.1 \ - flatpak-search.1 \ - flatpak-create-usb.1 \ - flatpak-repair.1 \ - flatpak-kill.1 \ - flatpak-history.1 \ - flatpak-spawn.1 \ - $(NULL) - -man5 = \ - flatpak-metadata.5 \ - flatpakrepo.5 \ - flatpakref.5 \ - flatpak-remote.5 \ - flatpak-installation.5 \ - $(NULL) - -man_MANS = \ - $(man1) \ - $(man5) \ - $(NULL) - -xml_files = \ - $(man1:.1=.xml) \ - $(man5:.5=.xml) \ - $(NULL) - -EXTRA_DIST = \ - $(xml_files) \ - docbook.css \ - flatpak-docs.xml.in \ - meson.build \ - xmlto-config.xsl \ - $(NULL) - -CLEANFILES = $(NULL) -DISTCLEANFILES = \ - $(man_MANS) \ - flatpak-docs.xml \ - $(NULL) - -install-data-hook: - ln -sf flatpakrepo.5 $(DESTDIR)$(mandir)/man5/flatpak-flatpakrepo.5 - ln -sf flatpakref.5 $(DESTDIR)$(mandir)/man5/flatpak-flatpakref.5 - -if DOCBOOK_DOCS_ENABLED - -doc_DATA = \ - flatpak-docs.html \ - docbook.css \ - $(NULL) - -CLEANFILES += flatpak-docs.html - -flatpak-docs.html: flatpak-docs.xml $(xml_files) xmlto-config.xsl - $(AM_V_GEN) $(XMLTO) $(XMLTO_FLAGS) --skip-validation xhtml-nochunks -m $(srcdir)/xmlto-config.xsl $< - -endif # DOCBOOK_DOCS_ENABLED diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am deleted file mode 100644 index e8f5b30f58..0000000000 --- a/doc/reference/Makefile.am +++ /dev/null @@ -1,98 +0,0 @@ -DOC_MODULE = flatpak -DOC_MAIN_SGML_FILE = libflatpak-docs.xml -DOC_SOURCE_DIR = $(top_srcdir)/common $(top_builddir)/common - -SCAN_OPTIONS = --rebuild-types \ - --ignore-decorators='FLATPAK_EXTERN' -SCANGOBJ_OPTIONS = -MKDB_OPTIONS = --output-format=xml --name-space=flatpak -FIXXREF_OPTIONS = - -HFILE_GLOB = $(top_srcdir)/common/*.h $(top_builddir)/common/*.h -CFILE_GLOB = $(top_srcdir)/common/*.c - -IGNORE_HFILES = \ - valgrind-private.h \ - flatpak-bwrap-private.h \ - flatpak-chain-input-stream-private.h \ - flatpak-common-types-private.h \ - flatpak-context-private.h \ - flatpak-dbus-generated.h \ - flatpak-dir-private.h \ - flatpak-document-dbus-generated.h \ - flatpak-enum-types.h \ - flatpak-exports-private.h \ - flatpak-installed-ref-private.h \ - flatpak-json-oci-private.h \ - flatpak-json-private.h \ - flatpak-oci-registry-private.h \ - flatpak-progress-private.h \ - flatpak-remote-private.h \ - flatpak-remote-ref-private.h \ - flatpak-run-private.h \ - flatpak-systemd-dbus-generated.h \ - flatpak-installation-private.h \ - flatpak-transaction-private.h \ - flatpak-utils-private.h \ - flatpak-utils-base-private.h \ - flatpak-utils-http-private.h \ - flatpak-instance-private.h \ - flatpak-auth-private.h \ - flatpak-parental-controls-private.h \ - flatpak-appdata-private.h \ - flatpak-zstd-decompressor-private.h \ - $(NULL) - -EXTRA_HFILES = - -HTML_IMAGES = - -dbus_stamp_files = \ - dbus-org.freedesktop.Flatpak.Authenticator.stamp \ - dbus-org.freedesktop.Flatpak.stamp \ - dbus-org.freedesktop.impl.portal.PermissionStore.stamp \ - dbus-org.freedesktop.portal.Documents.stamp \ - dbus-org.freedesktop.portal.Flatpak.stamp \ - $(NULL) - -# Generated from the above stamps -xml_files = \ - dbus-org.freedesktop.Flatpak.AuthenticatorRequest.xml \ - dbus-org.freedesktop.Flatpak.Authenticator.xml \ - dbus-org.freedesktop.Flatpak.Development.xml \ - dbus-org.freedesktop.Flatpak.SessionHelper.xml \ - dbus-org.freedesktop.Flatpak.SystemHelper.xml \ - dbus-org.freedesktop.impl.portal.PermissionStore.xml \ - dbus-org.freedesktop.portal.Documents.xml \ - dbus-org.freedesktop.portal.Flatpak.UpdateMonitor.xml \ - dbus-org.freedesktop.portal.Flatpak.xml \ - $(NULL) - -content_files = -expand_content_files = - -AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_builddir)/common $(BASE_CFLAGS) -GTKDOC_LIBS = $(top_builddir)/libflatpak.la $(BASE_LIBS) - -include $(top_srcdir)/gtk-doc.make - -CLEANFILES += $(xml_files) - -EXTRA_DIST += meson.build -EXTRA_DIST += version.xml.in - -if ENABLE_GTK_DOC_CHECK -TESTS_ENVIRONMENT = \ - DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ - SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) -TESTS = $(GTKDOC_CHECK) -endif - -sgml.stamp: $(dbus_stamp_files) -# gdbus-codegen hardcodes DocBook version - $(AM_V_GEN)$(SED) -i \ - -e 's|http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd|http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd|' \ - -e 's|-//OASIS//DTD DocBook XML V4.1.2//EN|-//OASIS//DTD DocBook XML V4.5//EN|' $(xml_files) - -dbus-%.stamp: $(top_srcdir)/data/%.xml - $(AM_V_GEN)$(GDBUS_CODEGEN) --generate-docbook=dbus $< diff --git a/doc/release-checklist.md b/doc/release-checklist.md index 1b8b419e4e..80b6977df4 100644 --- a/doc/release-checklist.md +++ b/doc/release-checklist.md @@ -2,7 +2,7 @@ Flatpak release checklist ========================= * Update NEWS -* Update version number in `configure.ac` **and** `meson.build` +* Update version number in `meson.build` * Update release date in `NEWS` * Commit the changes * `ninja -C ${builddir} flatpak-update-po` diff --git a/flatpak.pc.in b/flatpak.pc.in deleted file mode 100644 index 14cd1e0be0..0000000000 --- a/flatpak.pc.in +++ /dev/null @@ -1,19 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -datarootdir=@datarootdir@ -includedir=@includedir@ -datadir=@datadir@ - -interfaces_dir=${datadir}/dbus-1/interfaces/ - -# This will either be 'soup' for libsoup-2.x or 'curl' for libcurl. -httpbackend=@http_backend@ - -Name: flatpak -Description: Application sandboxing framework -Version: @VERSION@ -Requires: glib-2.0 gio-2.0 ostree-1 -Requires.private: gio-unix-2.0 -Libs: -L${libdir} -lflatpak -Cflags: -I${includedir}/flatpak diff --git a/icon-validator/Makefile.am.inc b/icon-validator/Makefile.am.inc deleted file mode 100644 index 8bbc799835..0000000000 --- a/icon-validator/Makefile.am.inc +++ /dev/null @@ -1,9 +0,0 @@ -EXTRA_DIST += icon-validator/meson.build - -libexec_PROGRAMS += \ - flatpak-validate-icon \ - $(NULL) - -flatpak_validate_icon_SOURCES = icon-validator/validate-icon.c -flatpak_validate_icon_LDADD = $(GDK_PIXBUF_LIBS) -flatpak_validate_icon_CFLAGS = $(AM_CFLAGS) $(GDK_PIXBUF_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" diff --git a/m4/attributes.m4 b/m4/attributes.m4 deleted file mode 100644 index 51ac88be61..0000000000 --- a/m4/attributes.m4 +++ /dev/null @@ -1,292 +0,0 @@ -dnl Macros to check the presence of generic (non-typed) symbols. -dnl Copyright (c) 2006-2008 Diego Pettenò -dnl Copyright (c) 2006-2008 xine project -dnl Copyright (c) 2012 Lucas De Marchi -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -dnl 02110-1301, USA. -dnl -dnl As a special exception, the copyright owners of the -dnl macro gives unlimited permission to copy, distribute and modify the -dnl configure scripts that are the output of Autoconf when processing the -dnl Macro. You need not follow the terms of the GNU General Public -dnl License when using or distributing such scripts, even though portions -dnl of the text of the Macro appear in them. The GNU General Public -dnl License (GPL) does govern all other use of the material that -dnl constitutes the Autoconf Macro. -dnl -dnl This special exception to the GPL applies to versions of the -dnl Autoconf Macro released by this project. When you make and -dnl distribute a modified version of the Autoconf Macro, you may extend -dnl this special exception to the GPL to apply to your modified version as -dnl well. - -dnl Check if FLAG in ENV-VAR is supported by compiler and append it -dnl to WHERE-TO-APPEND variable. Note that we invert -Wno-* checks to -dnl -W* as gcc cannot test for negated warnings. If a C snippet is passed, -dnl use it, otherwise use a simple main() definition that just returns 0. -dnl CC_CHECK_FLAG_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG], [C-SNIPPET]) - -AC_DEFUN([CC_CHECK_FLAG_APPEND], [ - AC_CACHE_CHECK([if $CC supports flag $3 in envvar $2], - AS_TR_SH([cc_cv_$2_$3]), - [eval "AS_TR_SH([cc_save_$2])='${$2}'" - eval "AS_TR_SH([$2])='${cc_save_$2} -Werror `echo "$3" | sed 's/^-Wno-/-W/'`'" - AC_LINK_IFELSE([AC_LANG_SOURCE(ifelse([$4], [], - [int main(void) { return 0; } ], - [$4]))], - [eval "AS_TR_SH([cc_cv_$2_$3])='yes'"], - [eval "AS_TR_SH([cc_cv_$2_$3])='no'"]) - eval "AS_TR_SH([$2])='$cc_save_$2'"]) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_$2_$3])[ = xyes], - [eval "$1='${$1} $3'"]) -]) - -dnl CC_CHECK_FLAGS_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG1 FLAG2], [C-SNIPPET]) -AC_DEFUN([CC_CHECK_FLAGS_APPEND], [ - for flag in [$3]; do - CC_CHECK_FLAG_APPEND([$1], [$2], $flag, [$4]) - done -]) - -dnl Check if the flag is supported by linker (cacheable) -dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) - -AC_DEFUN([CC_CHECK_LDFLAGS], [ - AC_CACHE_CHECK([if $CC supports $1 flag], - AS_TR_SH([cc_cv_ldflags_$1]), - [ac_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $1" - AC_LINK_IFELSE([int main() { return 1; }], - [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"], - [eval "AS_TR_SH([cc_cv_ldflags_$1])="]) - LDFLAGS="$ac_save_LDFLAGS" - ]) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes], - [$2], [$3]) -]) - -dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for -dnl the current linker to avoid undefined references in a shared object. -AC_DEFUN([CC_NOUNDEFINED], [ - dnl We check $host for which systems to enable this for. - AC_REQUIRE([AC_CANONICAL_HOST]) - - case $host in - dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads - dnl are requested, as different implementations are present; to avoid problems - dnl use -Wl,-z,defs only for those platform not behaving this way. - *-freebsd* | *-openbsd*) ;; - *) - dnl First of all check for the --no-undefined variant of GNU ld. This allows - dnl for a much more readable command line, so that people can understand what - dnl it does without going to look for what the heck -z defs does. - for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do - CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"]) - break - done - ;; - esac - - AC_SUBST([LDFLAGS_NOUNDEFINED]) -]) - -dnl Check for a -Werror flag or equivalent. -Werror is the GCC -dnl and ICC flag that tells the compiler to treat all the warnings -dnl as fatal. We usually need this option to make sure that some -dnl constructs (like attributes) are not simply ignored. -dnl -dnl Other compilers don't support -Werror per se, but they support -dnl an equivalent flag: -dnl - Sun Studio compiler supports -errwarn=%all -AC_DEFUN([CC_CHECK_WERROR], [ - AC_CACHE_CHECK( - [for $CC way to treat warnings as errors], - [cc_cv_werror], - [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror], - [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) - ]) -]) - -AC_DEFUN([CC_CHECK_ATTRIBUTE], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))], - AS_TR_SH([cc_cv_attribute_$1]), - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])], - [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"], - [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"]) - CFLAGS="$ac_save_CFLAGS" - ]) - - AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes], - [AC_DEFINE( - AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1, - [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))] - ) - $4], - [$5]) -]) - -AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ - CC_CHECK_ATTRIBUTE( - [constructor],, - [void __attribute__((constructor)) ctor() { int a; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_FORMAT], [ - CC_CHECK_ATTRIBUTE( - [format], [format(printf, n, n)], - [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ - CC_CHECK_ATTRIBUTE( - [format_arg], [format_arg(printf)], - [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ - CC_CHECK_ATTRIBUTE( - [visibility_$1], [visibility("$1")], - [void __attribute__((visibility("$1"))) $1_function() { }], - [$2], [$3]) -]) - -AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ - CC_CHECK_ATTRIBUTE( - [nonnull], [nonnull()], - [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ - CC_CHECK_ATTRIBUTE( - [unused], , - [void some_function(void *foo, __attribute__((unused)) void *bar);], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ - CC_CHECK_ATTRIBUTE( - [sentinel], , - [void some_function(void *foo, ...) __attribute__((sentinel));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [ - CC_CHECK_ATTRIBUTE( - [deprecated], , - [void some_function(void *foo, ...) __attribute__((deprecated));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ - CC_CHECK_ATTRIBUTE( - [alias], [weak, alias], - [void other_function(void *foo) { } - void some_function(void *foo) __attribute__((weak, alias("other_function")));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_MALLOC], [ - CC_CHECK_ATTRIBUTE( - [malloc], , - [void * __attribute__((malloc)) my_alloc(int n);], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_PACKED], [ - CC_CHECK_ATTRIBUTE( - [packed], , - [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));], - [$1], [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_CONST], [ - CC_CHECK_ATTRIBUTE( - [const], , - [int __attribute__((const)) twopow(int n) { return 1 << n; } ], - [$1], [$2]) -]) - -AC_DEFUN([CC_FLAG_VISIBILITY], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([if $CC supports -fvisibility=hidden], - [cc_cv_flag_visibility], - [cc_flag_visibility_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden], - cc_cv_flag_visibility='yes', - cc_cv_flag_visibility='no') - CFLAGS="$cc_flag_visibility_save_CFLAGS"]) - - AS_IF([test "x$cc_cv_flag_visibility" = "xyes"], - [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1, - [Define this if the compiler supports the -fvisibility flag]) - $1], - [$2]) -]) - -AC_DEFUN([CC_FUNC_EXPECT], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([if compiler has __builtin_expect function], - [cc_cv_func_expect], - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_COMPILE_IFELSE([AC_LANG_SOURCE( - [int some_function() { - int a = 3; - return (int)__builtin_expect(a, 3); - }])], - [cc_cv_func_expect=yes], - [cc_cv_func_expect=no]) - CFLAGS="$ac_save_CFLAGS" - ]) - - AS_IF([test "x$cc_cv_func_expect" = "xyes"], - [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1, - [Define this if the compiler supports __builtin_expect() function]) - $1], - [$2]) -]) - -AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [ - AC_REQUIRE([CC_CHECK_WERROR]) - AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported], - [cc_cv_attribute_aligned], - [ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - for cc_attribute_align_try in 64 32 16 8 4 2; do - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - int main() { - static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0; - return c; - }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break]) - done - CFLAGS="$ac_save_CFLAGS" - ]) - - if test "x$cc_cv_attribute_aligned" != "x"; then - AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned], - [Define the highest alignment supported]) - fi -]) diff --git a/m4/glibtests.m4 b/m4/glibtests.m4 deleted file mode 100644 index 7d5920a43c..0000000000 --- a/m4/glibtests.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl GLIB_TESTS -dnl - -AC_DEFUN([GLIB_TESTS], -[ - AC_ARG_ENABLE(installed-tests, - AS_HELP_STRING([--enable-installed-tests], - [Enable installation of some test cases]), - [case ${enableval} in - yes) ENABLE_INSTALLED_TESTS="1" ;; - no) ENABLE_INSTALLED_TESTS="" ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;; - esac]) - AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1") - AC_ARG_ENABLE(always-build-tests, - AS_HELP_STRING([--enable-always-build-tests], - [Enable always building tests during 'make all']), - [case ${enableval} in - yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;; - no) ENABLE_ALWAYS_BUILD_TESTS="" ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;; - esac]) - AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1") - if test "$ENABLE_INSTALLED_TESTS" = "1"; then - AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME) - AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME) - fi -]) diff --git a/oci-authenticator/Makefile.am.inc b/oci-authenticator/Makefile.am.inc deleted file mode 100644 index 75d60ded40..0000000000 --- a/oci-authenticator/Makefile.am.inc +++ /dev/null @@ -1,30 +0,0 @@ -EXTRA_DIST += oci-authenticator/meson.build - -libexec_PROGRAMS += \ - flatpak-oci-authenticator \ - $(NULL) - -service_in_files += oci-authenticator/flatpak-oci-authenticator.service.in -systemduserunit_DATA += oci-authenticator/flatpak-oci-authenticator.service - -service_in_files += oci-authenticator/org.flatpak.Authenticator.Oci.service.in -dbus_service_DATA += oci-authenticator/org.flatpak.Authenticator.Oci.service - -flatpak_oci_authenticator_SOURCES = \ - oci-authenticator/flatpak-oci-authenticator.c \ - $(NULL) - -BUILT_SOURCES += $(nodist_flatpak_oci_authenticator_SOURCES) -CLEANFILES += $(nodist_flatpak_oci_authenticator_SOURCES) - -flatpak_oci_authenticator_LDADD = $(AM_LDADD) $(BASE_LIBS) $(OSTREE_LIBS) libflatpak-common.la libflatpak-common-base.la libglnx.la -flatpak_oci_authenticator_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(SOUP_CFLAGS) \ - $(JSON_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DDATADIR=\"$(datadir)\" \ - $(NULL) -flatpak_oci_authenticator_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/oci-authenticator diff --git a/portal/Makefile.am.inc b/portal/Makefile.am.inc deleted file mode 100644 index 5fa0abb922..0000000000 --- a/portal/Makefile.am.inc +++ /dev/null @@ -1,66 +0,0 @@ -EXTRA_DIST += portal/meson.build - -libexec_PROGRAMS += \ - flatpak-portal \ - $(NULL) - -service_in_files += portal/flatpak-portal.service.in -systemduserunit_DATA += portal/flatpak-portal.service - -service_in_files += portal/org.freedesktop.portal.Flatpak.service.in -dbus_service_DATA += portal/org.freedesktop.portal.Flatpak.service - -nodist_flatpak_portal_SOURCES = \ - portal/flatpak-permission-dbus.c \ - portal/flatpak-permission-dbus.h \ - portal/flatpak-portal-dbus.c \ - portal/flatpak-portal-dbus.h \ - $(NULL) - -portal/flatpak-permission-dbus.c: data/org.freedesktop.impl.portal.PermissionStore.xml Makefile - mkdir -p $(builddir)/portal - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.impl.portal \ - --c-namespace XdpDbus \ - --generate-c-code $(builddir)/portal/flatpak-permission-dbus \ - $(srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ - $(NULL) - - -portal/flatpak-portal-dbus.c: data/org.freedesktop.portal.Flatpak.xml Makefile - mkdir -p $(builddir)/portal - $(AM_V_GEN) $(GDBUS_CODEGEN) \ - --interface-prefix org.freedesktop.portal \ - --c-namespace Portal \ - --generate-c-code $(builddir)/portal/flatpak-portal-dbus \ - $(srcdir)/data/org.freedesktop.portal.Flatpak.xml \ - $(NULL) - -portal/%-dbus.h: portal/%-dbus.c - @true # Built as a side-effect of the rules for the .c - -flatpak_portal_SOURCES = \ - portal/flatpak-portal.c \ - portal/flatpak-portal.h \ - portal/flatpak-portal-app-info.c \ - portal/flatpak-portal-app-info.h \ - portal/portal-impl.c \ - portal/portal-impl.h \ - common/flatpak-portal-error.c \ - common/flatpak-portal-error.h \ - $(NULL) - -BUILT_SOURCES += $(nodist_flatpak_portal_SOURCES) -CLEANFILES += $(nodist_flatpak_portal_SOURCES) - -flatpak_portal_LDADD = $(AM_LDADD) $(BASE_LIBS) $(OSTREE_LIBS) libflatpak-common.la libflatpak-common-base.la libglnx.la -flatpak_portal_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(SOUP_CFLAGS) \ - $(JSON_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DDATADIR=\"$(datadir)\" \ - $(NULL) -flatpak_portal_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/portal diff --git a/revokefs/Makefile.am.inc b/revokefs/Makefile.am.inc deleted file mode 100644 index 926f141091..0000000000 --- a/revokefs/Makefile.am.inc +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2016 Colin Walters -# Copyright (C) 2018 Alexander Larsson -# -# SPDX-License-Identifier: LGPL-2.0+ -# -# This library 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 of the License, or (at your option) any later version. -# -# This library 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 library; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -EXTRA_DIST += revokefs/meson.build - -libexec_PROGRAMS += revokefs-fuse - -noinst_PROGRAMS += revokefs-demo - -revokefs_fuse_SOURCES = revokefs/main.c revokefs/writer.c revokefs/writer.h - -revokefs_fuse_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(FUSE_CFLAGS) -revokefs_fuse_LDADD = libglnx.la $(BASE_LIBS) $(FUSE_LIBS) - -revokefs_demo_SOURCES = revokefs/demo.c -revokefs_demo_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -revokefs_demo_LDADD = $(BASE_LIBS) diff --git a/selinux/Makefile.am.inc b/selinux/Makefile.am.inc deleted file mode 100644 index c5e72425b6..0000000000 --- a/selinux/Makefile.am.inc +++ /dev/null @@ -1,23 +0,0 @@ -if BUILD_SELINUX_MODULE -selinux_moduledir = ${datadir}/selinux/packages -selinux_module_DATA = $(NULL) - -selinux_develdir = ${datadir}/selinux/devel/include/contrib -selinux_devel_DATA = $(NULL) - -flatpak.pp.bz2: selinux/flatpak.te selinux/flatpak.fc selinux/build-selinux.sh - $(srcdir)/selinux/build-selinux.sh . $^ - -selinux_module_DATA += flatpak.pp.bz2 -selinux_devel_DATA += selinux/flatpak.if -endif - -EXTRA_DIST += \ - selinux/build-selinux.sh \ - selinux/flatpak.te \ - selinux/flatpak.fc \ - selinux/flatpak.if \ - selinux/meson.build \ - $(NULL) - -DISTCLEANFILES += flatpak.pp.bz2 diff --git a/session-helper/Makefile.am.inc b/session-helper/Makefile.am.inc deleted file mode 100644 index e7bb402ce8..0000000000 --- a/session-helper/Makefile.am.inc +++ /dev/null @@ -1,19 +0,0 @@ -EXTRA_DIST += session-helper/meson.build - -libexec_PROGRAMS += \ - flatpak-session-helper \ - $(NULL) - -service_in_files += session-helper/flatpak-session-helper.service.in -systemduserunit_DATA += session-helper/flatpak-session-helper.service - -service_in_files += session-helper/org.freedesktop.Flatpak.service.in -dbus_service_DATA += session-helper/org.freedesktop.Flatpak.service - -flatpak_session_helper_SOURCES = \ - session-helper/flatpak-session-helper.c \ - session-helper/flatpak-session-helper.h \ - $(NULL) - -flatpak_session_helper_LDADD = $(AM_LDADD) $(BASE_LIBS) libflatpak-common-base.la libglnx.la -flatpak_session_helper_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -DFLATPAK_COMPILATION diff --git a/sideload-repos-systemd/Makefile.am.inc b/sideload-repos-systemd/Makefile.am.inc deleted file mode 100644 index 4e82080952..0000000000 --- a/sideload-repos-systemd/Makefile.am.inc +++ /dev/null @@ -1,19 +0,0 @@ -if BUILD_AUTO_SIDELOADING - -dist_libexec_SCRIPTS = sideload-repos-systemd/flatpak-create-sideload-symlinks.sh - -service_in_files += sideload-repos-systemd/flatpak-sideload-usb-repo.service.in -systemduserunit_DATA += sideload-repos-systemd/flatpak-sideload-usb-repo.service - -path_in_files = sideload-repos-systemd/flatpak-sideload-usb-repo.path.in -systemduserunit_DATA += sideload-repos-systemd/flatpak-sideload-usb-repo.path - -%.path: %.path.in config.log - $(AM_V_GEN) $(SED) -e "s|\@media_dir\@|$(RUN_MEDIA_DIR)|" $< > $@ - -dist_tmpfiles_DATA += sideload-repos-systemd/tmpfiles.d/flatpak-sideload-repos.conf - -endif - -EXTRA_DIST += sideload-repos-systemd/flatpak-sideload-usb-repo.path.in sideload-repos-systemd/flatpak-sideload-usb-repo.service.in -EXTRA_DIST += sideload-repos-systemd/meson.build diff --git a/system-helper/Makefile.am.inc b/system-helper/Makefile.am.inc deleted file mode 100644 index 4ae5d801d9..0000000000 --- a/system-helper/Makefile.am.inc +++ /dev/null @@ -1,51 +0,0 @@ -if BUILD_SYSTEM_HELPER - -libexec_PROGRAMS += \ - flatpak-system-helper \ - $(NULL) - -dbussystemservicedir = $(datadir)/dbus-1/system-services -service_in_files += system-helper/org.freedesktop.Flatpak.SystemHelper.service.in -dbussystemservice_DATA = system-helper/org.freedesktop.Flatpak.SystemHelper.service - -dbusconfdir = $(DBUS_CONFIG_DIR) -dist_dbusconf_DATA = system-helper/org.freedesktop.Flatpak.SystemHelper.conf - -service_in_files += system-helper/flatpak-system-helper.service.in -systemdsystemunit_DATA += system-helper/flatpak-system-helper.service - -flatpak_system_helper_SOURCES = \ - system-helper/flatpak-system-helper.c \ - system-helper/flatpak-system-helper.h \ - $(NULL) - -flatpak_system_helper_LDADD = $(BASE_LIBS) $(OSTREE_LIBS) $(JSON_LIBS) $(POLKIT_LIBS) libflatpak-common.la libflatpak-common-base.la libglnx.la -flatpak_system_helper_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(APPSTREAM_CFLAGS) $(SOUP_CFLAGS) $(JSON_CFLAGS) $(POLKIT_CFLAGS) -DFLATPAK_COMPILATION -DLIBEXECDIR=\"$(libexecdir)\" - -system-helper/org.freedesktop.Flatpak.rules: system-helper/org.freedesktop.Flatpak.rules.in - $(AM_V_GEN) $(SED) -e "s|\@privileged_group\@|$(PRIVILEGED_GROUP)|" $< > $@ - -polkit_rulesdir = $(datadir)/polkit-1/rules.d -polkit_rules_DATA = \ - system-helper/org.freedesktop.Flatpak.rules - -polkit_policydir = $(datadir)/polkit-1/actions -polkit_policy_DATA = \ - system-helper/org.freedesktop.Flatpak.policy - -%.policy: %.policy.in - $(AM_V_GEN) $(MSGFMT) --xml -d $(top_srcdir)/po --template $< -o $@ || cp $< $@ - -sysusers_DATA = system-helper/flatpak.conf - -%.conf: %.conf.in - $(AM_V_GEN) $(SED) \ - -e "s|\@SYSTEM_HELPER_USER\@|$(SYSTEM_HELPER_USER)|" \ - $< > $@ - -DISTCLEANFILES += system-helper/org.freedesktop.Flatpak.policy system-helper/org.freedesktop.Flatpak.rules system-helper/flatpak-system-helper.service system-helper/org.freedesktop.Flatpak.SystemHelper.service system-helper/flatpak.conf - -endif - -EXTRA_DIST += system-helper/org.freedesktop.Flatpak.policy.in system-helper/org.freedesktop.Flatpak.SystemHelper.conf system-helper/org.freedesktop.Flatpak.rules.in system-helper/org.freedesktop.Flatpak.SystemHelper.service.in system-helper/flatpak-system-helper.service.in system-helper/flatpak.conf.in -EXTRA_DIST += system-helper/meson.build diff --git a/tests/Makefile-test-matrix.am.inc b/tests/Makefile-test-matrix.am.inc deleted file mode 100644 index f3bcd9af20..0000000000 --- a/tests/Makefile-test-matrix.am.inc +++ /dev/null @@ -1,61 +0,0 @@ -# This file is autogenerated by ./tests/update-test-matrix, don't edit -TEST_MATRIX= \ - tests/test-run@user,nodeltas.wrap \ - tests/test-run@user,deltas.wrap \ - tests/test-run@system,nodeltas.wrap \ - tests/test-run@system,deltas.wrap \ - tests/test-run@system-norevokefs,nodeltas.wrap \ - tests/test-run@system-norevokefs,deltas.wrap \ - tests/test-info@user.wrap \ - tests/test-info@system.wrap \ - tests/test-repo@user.wrap \ - tests/test-repo@system.wrap \ - tests/test-repo@system-norevokefs.wrap \ - tests/test-repo@user,oldsummary.wrap \ - tests/test-repo@system,oldsummary.wrap \ - tests/test-sideload@user.wrap \ - tests/test-sideload@system.wrap \ - tests/test-bundle@user.wrap \ - tests/test-bundle@system.wrap \ - tests/test-bundle@system-norevokefs.wrap \ - tests/test-oci-registry@user.wrap \ - tests/test-oci-registry@system.wrap \ - tests/test-update-remote-configuration@newsummary.wrap \ - tests/test-update-remote-configuration@oldsummary.wrap \ - tests/test-update-portal@user.wrap \ - tests/test-update-portal@system.wrap \ - tests/test-summaries@user.wrap \ - tests/test-summaries@system.wrap \ - tests/test-subset@user.wrap \ - tests/test-subset@system.wrap \ - $(NULL) -TEST_MATRIX_DIST= \ - tests/test-basic.sh \ - tests/test-completion.sh \ - tests/test-config.sh \ - tests/test-build-update-repo.sh \ - tests/test-http-utils.sh \ - tests/test-history.sh \ - tests/test-default-remotes.sh \ - tests/test-metadata-validation.sh \ - tests/test-extensions.sh \ - tests/test-oci.sh \ - tests/test-override.sh \ - tests/test-auth.sh \ - tests/test-unused.sh \ - tests/test-prune.sh \ - tests/test-seccomp.sh \ - tests/test-repair.sh \ - $(NULL) -TEST_MATRIX_EXTRA_DIST= \ - tests/test-run.sh \ - tests/test-info.sh \ - tests/test-repo.sh \ - tests/test-sideload.sh \ - tests/test-bundle.sh \ - tests/test-oci-registry.sh \ - tests/test-update-remote-configuration.sh \ - tests/test-update-portal.sh \ - tests/test-summaries.sh \ - tests/test-subset.sh \ - $(NULL) diff --git a/tests/Makefile.am.inc b/tests/Makefile.am.inc deleted file mode 100644 index 88ed421fbe..0000000000 --- a/tests/Makefile.am.inc +++ /dev/null @@ -1,354 +0,0 @@ -AM_TESTS_ENVIRONMENT = FLATPAK_TESTS_DEBUG=1 \ - FLATPAK_CONFIG_DIR=/dev/null \ - FLATPAK_PORTAL=$$(cd $(top_builddir) && pwd)/flatpak-portal \ - FLATPAK_TRIGGERSDIR=$$(cd $(top_srcdir) && pwd)/triggers \ - FLATPAK_VALIDATE_ICON=$$(cd $(top_builddir) && pwd)/flatpak-validate-icon \ - FLATPAK_REVOKEFS_FUSE=$$(cd $(top_builddir) && pwd)/revokefs-fuse \ - GI_TYPELIB_PATH=$$(cd $(top_builddir) && pwd)$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH} \ - LD_LIBRARY_PATH=$$(cd $(top_builddir)/.libs && pwd)$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} \ - PATH=$$(cd $(top_builddir) && pwd):$${PATH} \ - $(NULL) - -if WITH_SYSTEM_DBUS_PROXY -AM_TESTS_ENVIRONMENT += FLATPAK_DBUSPROXY=$(DBUS_PROXY) -else -AM_TESTS_ENVIRONMENT += FLATPAK_DBUSPROXY=$$(cd $(top_builddir) && pwd)/flatpak-dbus-proxy -endif - -if WITH_SYSTEM_BWRAP -AM_TESTS_ENVIRONMENT += FLATPAK_BWRAP=$(BWRAP) -else -AM_TESTS_ENVIRONMENT += FLATPAK_BWRAP=$$(cd $(top_builddir) && pwd)/flatpak-bwrap -endif - -noinst_LTLIBRARIES += libtestlib.la -libtestlib_la_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - -DFLATPAK_COMPILATION \ - $(NULL) -libtestlib_la_SOURCES = \ - tests/testlib.c \ - tests/testlib.h \ - $(NULL) -libtestlib_la_LIBADD = \ - $(AM_LDADD) \ - $(BASE_LIBS) \ - libglnx.la \ - $(NULL) - -testlibrary_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(FUSE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - -DFLATPAK_COMPILATION \ - $(NULL) -testlibrary_LDADD = \ - $(AM_LDADD) \ - $(BASE_LIBS) \ - $(FUSE_LIBS) \ - $(OSTREE_LIBS) \ - libflatpak.la \ - libglnx.la \ - $(NULL) -testlibrary_SOURCES = \ - tests/can-use-fuse.c \ - tests/can-use-fuse.h \ - tests/testlib.c \ - tests/testlibrary.c \ - $(NULL) - -testapp_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(JSON_CFLAGS) \ - $(APPSTREAM_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - -I$(srcdir)/app \ - -I$(builddir)/app \ - $(NULL) -testapp_LDADD = \ - $(AM_LDADD) \ - $(BASE_LIBS) \ - $(OSTREE_LIBS) \ - $(JSON_LIBS) \ - $(APPSTREAM_LIBS) \ - libflatpak-app.la \ - libflatpak-common.la \ - libflatpak-common-base.la \ - libglnx.la \ - $(NULL) -testapp_SOURCES = tests/testapp.c - -testcommon_CFLAGS = \ - $(AM_CFLAGS) \ - $(BASE_CFLAGS) \ - $(OSTREE_CFLAGS) \ - $(JSON_CFLAGS) \ - $(APPSTREAM_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - $(NULL) -testcommon_LDADD = \ - $(AM_LDADD) \ - $(BASE_LIBS) \ - $(OSTREE_LIBS) \ - $(JSON_LIBS) \ - $(APPSTREAM_LIBS) \ - libflatpak-common.la \ - libflatpak-common-base.la \ - libglnx.la \ - $(NULL) -testcommon_SOURCES = tests/testcommon.c - -test_context_CFLAGS = $(testcommon_CFLAGS) -test_context_LDADD = $(testcommon_LDADD) libtestlib.la -test_context_SOURCES = tests/test-context.c - -test_exports_CFLAGS = $(testcommon_CFLAGS) -test_exports_LDADD = $(testcommon_LDADD) libtestlib.la -test_exports_SOURCES = tests/test-exports.c - -test_instance_CFLAGS = $(testcommon_CFLAGS) -test_instance_LDADD = $(testcommon_LDADD) libtestlib.la -test_instance_SOURCES = \ - subprojects/libglnx/tests/libglnx-testlib.c \ - subprojects/libglnx/tests/libglnx-testlib.h \ - tests/test-instance.c \ - $(NULL) - -test_locale_utils_CFLAGS = $(testcommon_CFLAGS) -test_locale_utils_LDADD = $(testcommon_LDADD) libtestlib.la -test_locale_utils_SOURCES = tests/test-locale-utils.c - -test_portal_CFLAGS = $(testcommon_CFLAGS) -test_portal_LDADD = $(testcommon_LDADD) libtestlib.la -test_portal_SOURCES = \ - tests/test-portal.c \ - $(NULL) -nodist_test_portal_SOURCES = \ - portal/flatpak-portal-dbus.c \ - portal/flatpak-portal-dbus.h \ - $(NULL) - -tests_hold_lock_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -tests_hold_lock_LDADD = $(AM_LDADD) $(BASE_LIBS) libglnx.la -tests_hold_lock_SOURCES = tests/hold-lock.c - -tests_httpcache_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(JSON_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DLOCALEDIR=\"$(localedir)\" -tests_httpcache_LDADD = $(AM_LDADD) $(BASE_LIBS) $(OSTREE_LIBS) $(JSON_LIBS) \ - libflatpak-common.la libflatpak-common-base.la libglnx.la - -tests_mock_flatpak_CFLAGS = $(testcommon_CFLAGS) -tests_mock_flatpak_LDADD = $(testcommon_LDADD) libtestlib.la -tests_mock_flatpak_SOURCES = tests/mock-flatpak.c - -tests_test_update_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DLOCALEDIR=\"$(localedir)\" -tests_test_update_portal_LDADD = $(AM_LDADD) $(BASE_LIBS) -tests_test_update_portal_SOURCES = tests/test-update-portal.c -nodist_tests_test_update_portal_SOURCES = portal/flatpak-portal-dbus.c - -tests_test_portal_impl_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DLOCALEDIR=\"$(localedir)\" -tests_test_portal_impl_LDADD = $(AM_LDADD) $(BASE_LIBS) -tests_test_portal_impl_SOURCES = tests/test-portal-impl.c - -tests_test_authenticator_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DLOCALEDIR=\"$(localedir)\" -tests_test_authenticator_LDADD = $(AM_LDADD) $(BASE_LIBS) libflatpak-common.la libflatpak-common-base.la libglnx.la -tests_test_authenticator_SOURCES = tests/test-authenticator.c - -tests_try_syscall_CFLAGS = $(AM_CFLAGS) -tests_try_syscall_LDADD = $(AM_LDADD) -tests_try_syscall_SOURCES = tests/try-syscall.c - -tests_list_unused_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(OSTREE_CFLAGS) \ - -DFLATPAK_COMPILATION \ - -DLOCALEDIR=\"$(localedir)\" -tests_list_unused_LDADD = $(AM_LDADD) $(BASE_LIBS) $(BASE_LIBS) $(OSTREE_LIBS) libflatpak-common.la libflatpak-common-base.la libglnx.la -tests_list_unused_SOURCES = tests/list-unused.c - -tests/services/org.freedesktop.Flatpak.service: session-helper/org.freedesktop.Flatpak.service.in - mkdir -p tests/services - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(abs_top_builddir)|" $< > $@ - -tests/services/org.freedesktop.portal.Flatpak.service: portal/org.freedesktop.portal.Flatpak.service.in - mkdir -p tests/services - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(abs_top_builddir)|" -e "s|\@extraargs\@| --poll-timeout=1|" $< > $@ - -tests/services/org.freedesktop.Flatpak.SystemHelper.service: system-helper/org.freedesktop.Flatpak.SystemHelper.service.in - mkdir -p tests/services - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(abs_top_builddir)|" -e "s|\@extraargs\@| --session --no-idle-exit|" $< > $@ - -tests/services/org.freedesktop.impl.portal.desktop.test.service: tests/org.freedesktop.impl.portal.desktop.test.service.in - mkdir -p tests/services - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(abs_top_builddir)/tests|" $< > $@ - -tests/services/org.flatpak.Authenticator.test.service: tests/org.flatpak.Authenticator.test.service.in - mkdir -p tests/services - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(abs_top_builddir)/tests|" $< > $@ - -tests/services/org.flatpak.Authenticator.Oci.service: oci-authenticator/org.flatpak.Authenticator.Oci.service.in - mkdir -p tests/services - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(abs_top_builddir)|" $< > $@ - -tests/share/xdg-desktop-portal/portals/test.portal: tests/test.portal.in - mkdir -p tests/share/xdg-desktop-portal/portals - $(AM_V_GEN) install -m644 $< $@ - -tests/libtest.sh: tests/services/org.freedesktop.Flatpak.service tests/services/org.freedesktop.Flatpak.SystemHelper.service tests/services/org.freedesktop.portal.Flatpak.service tests/share/xdg-desktop-portal/portals/test.portal tests/services/org.freedesktop.impl.portal.desktop.test.service tests/services/org.flatpak.Authenticator.test.service tests/services/org.flatpak.Authenticator.Oci.service - -install-test-data-hook: -if ENABLE_INSTALLED_TESTS - mkdir -p $(DESTDIR)$(installed_testdir)/services - ln -sf $(dbus_servicedir)/org.freedesktop.Flatpak.service $(DESTDIR)$(installed_testdir)/services/ - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@extraargs\@| --poll-timeout=1|" $(top_srcdir)/portal/org.freedesktop.portal.Flatpak.service.in > $(DESTDIR)$(installed_testdir)/services/org.freedesktop.portal.Flatpak.service - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@extraargs\@| --session --no-idle-exit|" $(top_srcdir)/system-helper/org.freedesktop.Flatpak.SystemHelper.service.in > $(DESTDIR)$(installed_testdir)/services/org.freedesktop.Flatpak.SystemHelper.service - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(installed_testdir)|" $(top_srcdir)/tests/org.freedesktop.impl.portal.desktop.test.service.in > $(DESTDIR)$(installed_testdir)/services/org.freedesktop.impl.portal.desktop.test.service - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(installed_testdir)|" $(top_srcdir)/tests/org.flatpak.Authenticator.test.service.in > $(DESTDIR)$(installed_testdir)/services/org.flatpak.Authenticator.test.service.service - $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $(top_srcdir)/oci-authenticator/org.flatpak.Authenticator.Oci.service.in > $(DESTDIR)$(installed_testdir)/services/org.flatpak.Authenticator.Oci.service - mkdir -p $(DESTDIR)$(installed_testdir)/share/xdg-desktop-portal/portals - install -m644 $(top_srcdir)/tests/test.portal.in $(DESTDIR)$(installed_testdir)/share/xdg-desktop-portal/portals/test.portal -endif - -tests/package_version.txt: Makefile - echo $(PACKAGE_VERSION) > tests/package_version.txt - -tests/test-basic.sh: tests/package_version.txt - -dist_installed_test_extra_scripts += \ - tests/http-utils-test-server.py \ - tests/oci-registry-server.py \ - tests/oci-registry-client.py \ - tests/make-multi-collection-id-repo.sh \ - tests/make-test-app.sh \ - tests/make-test-runtime.sh \ - tests/test-webserver.sh \ - tests/test-wrapper.sh \ - tests/web-server.py \ - $(NULL) - -dist_installed_test_data = \ - tests/libtest.sh \ - tests/org.test.Hello.png \ - tests/package_version.txt \ - tests/session.conf.in \ - tests/test.filter \ - tests/test.portal.in \ - tests/org.freedesktop.impl.portal.desktop.test.service.in \ - tests/org.flatpak.Authenticator.test.service.in \ - $(NULL) - -test_ltlibraries = tests/libpreload.la - -tests_libpreload_la_SOURCES = tests/libpreload.c -tests_libpreload_la_LDFLAGS = \ - -avoid-version \ - -module \ - -no-undefined \ - $(NULL) - -if ENABLE_INSTALLED_TESTS -tests_libpreload_la_LDFLAGS += -rpath $(installed_testdir) -else -tests_libpreload_la_LDFLAGS += -rpath ${abs_builddir} -endif - -installed_test_keyringdir = $(installed_testdir)/test-keyring -installed_test_keyring2dir = $(installed_testdir)/test-keyring2 - -if ENABLE_INSTALLED_TESTS -dist_installed_test_keyring_DATA = \ - tests/test-keyring/README \ - tests/test-keyring/pubring.gpg \ - tests/test-keyring/secring.gpg \ - $(NULL) -dist_installed_test_keyring2_DATA = \ - tests/test-keyring2/README \ - tests/test-keyring2/pubring.gpg \ - tests/test-keyring2/secring.gpg \ - $(NULL) -endif - -update-test-matrix: - $(srcdir)/tests/update-test-matrix - -tests/test-%.wrap: - @true - -tests/runtime-repo.stamp: tests/make-runtime-repos tests/make-test-runtime.sh flatpak - $< $(abs_top_builddir) $(top_srcdir)/tests/make-test-runtime.sh tests/runtime-repo tests/runtime-repo.stamp - -check_DATA += tests/runtime-repo.stamp - -distclean-local: - rm -rf tests/runtime-repo - rm -rf tests/runtime-repo.stamp - -include tests/Makefile-test-matrix.am.inc - -test_scripts = ${TEST_MATRIX} -dist_test_scripts = ${TEST_MATRIX_DIST} -dist_installed_test_extra_scripts += ${TEST_MATRIX_EXTRA_DIST} - -test_programs = \ - test-context \ - test-exports \ - test-instance \ - test-locale-utils \ - test-portal \ - testapp \ - testcommon \ - testlibrary \ - $(NULL) - -test_extra_programs = \ - tests/hold-lock \ - tests/httpcache \ - tests/list-unused \ - tests/mock-flatpak \ - tests/test-authenticator \ - tests/test-portal-impl \ - tests/test-update-portal \ - tests/try-syscall \ - $(NULL) - -@VALGRIND_CHECK_RULES@ -VALGRIND_SUPPRESSIONS_FILES=tests/flatpak.supp tests/glib.supp -EXTRA_DIST += \ - tests/Makefile-test-matrix.am.inc \ - tests/expand-test-matrix.sh \ - tests/flatpak.supp \ - tests/glib.supp \ - tests/installed-services/meson.build \ - tests/make-runtime-repos \ - tests/meson.build \ - tests/package_version.txt.in \ - tests/services/meson.build \ - tests/share/xdg-desktop-portal/portals/meson.build \ - tests/tap.test.in \ - tests/test-keyring/meson.build \ - tests/test-keyring2/meson.build \ - tests/test-matrix/meson.build \ - tests/test-wrapper.sh \ - tests/update-test-matrix \ - $(NULL) -DISTCLEANFILES += \ - tests/services/org.freedesktop.Flatpak.service \ - tests/services/org.freedesktop.Flatpak.SystemHelper.service \ - tests/services/org.freedesktop.portal.Flatpak.service \ - tests/services/org.freedesktop.impl.portal.desktop.test.service \ - tests/services/org.flatpak.Authenticator.test.service \ - tests/services/org.flatpak.Authenticator.Oci.service \ - tests/share/xdg-desktop-portal/portals/test.portal \ - tests/package_version.txt \ - $(NULL) diff --git a/tests/expand-test-matrix.sh b/tests/expand-test-matrix.sh index 4965fa6a02..da782fd4ab 100755 --- a/tests/expand-test-matrix.sh +++ b/tests/expand-test-matrix.sh @@ -108,24 +108,7 @@ for test in $2; do parse_test $test done -if [ "$1" = "--automake" ]; then - echo "# This file is autogenerated by ./tests/update-test-matrix, don't edit" - echo "TEST_MATRIX= \\" - for f in $tests; do - echo " ${f} \\" - done - echo " \$(NULL)" - echo "TEST_MATRIX_DIST= \\" - for f in $dist_tests; do - echo " ${f} \\" - done - echo " \$(NULL)" - echo "TEST_MATRIX_EXTRA_DIST= \\" - for f in $extra_dist_tests; do - echo " ${f} \\" - done - echo " \$(NULL)" -elif [ "$1" = "--meson" ]; then +if [ "$1" = "--meson" ]; then echo "# This file is autogenerated by ./tests/update-test-matrix, don't edit" for f in $tests $dist_tests; do f="${f#tests/}" diff --git a/tests/update-test-matrix b/tests/update-test-matrix index 4449cc50af..2aff6f0029 100755 --- a/tests/update-test-matrix +++ b/tests/update-test-matrix @@ -36,5 +36,4 @@ TEST_MATRIX_SOURCE=( 'tests/test-repair.sh' \ ) -"${tests_srcdir}/expand-test-matrix.sh" --automake "${TEST_MATRIX_SOURCE[*]}" > "${tests_srcdir}/Makefile-test-matrix.am.inc" "${tests_srcdir}/expand-test-matrix.sh" --meson "${TEST_MATRIX_SOURCE[*]}" > "${tests_srcdir}/test-matrix/meson.build"