From 629dbf66bd96fed4a82383d2941b266a0fb7e842 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 8 Sep 2018 11:27:15 +0200 Subject: [PATCH 1/3] build: fix error message in configure script about gtk-doc (cherry picked from commit 815834aebcdf4b65311952163a8d38805e950407) --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b32ce412cc..22ace23455 100644 --- a/configure.ac +++ b/configure.ac @@ -1217,7 +1217,7 @@ else if test "$enable_gtk_doc" = "yes"; then # large parts of the documentation require introspection/pygobject to extract # the documentation out of the source files. You cannot enable gtk-doc without alone. - AC_MSG_ERROR(["--with-gtk-doc requires --enable-introspection"]) + AC_MSG_ERROR(["--enable-gtk-doc requires --enable-introspection"]) fi have_introspection=no fi From d29f6e03c841a5047d3474fcaff8e77f2e06509a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 9 Sep 2018 21:41:40 +0200 Subject: [PATCH 2/3] docs/test: add check that gtk-doc contains patch to generate proper documentation In libnm, we prefer opaque typedefs. gtk-doc needs to be patched to properly generate documentation. Add a check for that. Add a test. By default, this does not fail but just prints a warning. The test can be made failing by setting NMTST_CHECK_GTK_DOC=1. See-also: https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/2 (cherry picked from commit 02464c052e2f8a1e88b012e0a29f5f66fce310ad) --- docs/libnm/Makefile.am | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am index c5f2b836ba..7aa9810e81 100644 --- a/docs/libnm/Makefile.am +++ b/docs/libnm/Makefile.am @@ -1,6 +1,8 @@ ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = 1.6 +check_local = + # The name of the module DOC_MODULE=libnm @@ -94,3 +96,13 @@ CLEANFILES += \ tmpl/* \ xml/* +if GTK_DOC_BUILD_HTML +check-local-gtk-doc-patch: + @if grep -q -F 'nm-setting-user' "$(top_builddir)/docs/libnm/html/index.html"; then \ + echo "WARNING: The generated documentation has issues. Patch your gtk-doc (see https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/2). Let this check fail with NMTST_CHECK_GTK_DOC=1"; \ + test "$$NMTST_CHECK_GTK_DOC" != 1; \ + fi +check_local += check-local-gtk-doc-patch +endif + +check-local: $(check_local) From 5f1912f5795dc5047c73b9a424697ddd21c86e1e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 14 Sep 2018 07:49:51 +0200 Subject: [PATCH 3/3] contrib/rpm: add --release option to build_clean.sh script The correct way to create a tarball for release is ./contrib/fedora/rpm/build_clean.sh -r Just ensure to issue this from a clean shell environment. (cherry picked from commit 5894da67dc040fccd40c014ab73f31e1d9e1e661) --- contrib/fedora/rpm/build_clean.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/fedora/rpm/build_clean.sh b/contrib/fedora/rpm/build_clean.sh index 1bf932f5cb..c6d08f538c 100755 --- a/contrib/fedora/rpm/build_clean.sh +++ b/contrib/fedora/rpm/build_clean.sh @@ -24,6 +24,7 @@ usage() { echo " -w|--with \$OPTION: pass --with \$OPTION to rpmbuild. For example --with debug" echo " -W|--without \$OPTION: pass --without \$OPTION to rpmbuild. For example --without debug" echo " -s|--snapshot TEXT: use TEXT as the snapshot version for the new package (overwrites \$NM_BUILD_SNAPSHOT environment)" + echo " -r|--release: built a release tarball (this option must be alone)" } @@ -44,6 +45,8 @@ WITH_LIST=() SOURCE_FROM_GIT=0 SNAPSHOT="$NM_BUILD_SNAPSHOT" +NARGS=$# + while [[ $# -gt 0 ]]; do A="$1" shift @@ -55,6 +58,11 @@ while [[ $# -gt 0 ]]; do -f|--force) IGNORE_DIRTY=1 ;; + -r|--release) + [[ $NARGS -eq 1 ]] || die "--release option must be alone" + export NMTST_CHECK_GTK_DOC=1 + BUILDTYPE=SRPM + ;; -c|--clean) GIT_CLEAN=1 ;;