[Libosinfo] [osinfo-db-tools PATCH v2 07/16] tools: Don't import config.h

2019-07-09 Thread Fabiano Fidêncio
config.h file is only used in osinfo-db-tools for the GETTEXT_PACKAGE
macro. Fortunately, when AC_CONFIG_HEADER macro is dropped from
configure, -DGETTEXT_PACKAGE=... is automatically passed as a compilar
argument, allowing us then to drop the file.

Together with this change, let's also drop both sc_require_config_h and
sc_require_config_h_first checks from `make syntax-check`.

Signed-off-by: Fabiano Fidêncio 
---
 cfg.mk | 4 +++-
 configure.ac   | 1 -
 tools/osinfo-db-export.c   | 2 --
 tools/osinfo-db-import.c   | 2 --
 tools/osinfo-db-path.c | 2 --
 tools/osinfo-db-util.c | 2 --
 tools/osinfo-db-validate.c | 2 --
 7 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index fc4b313..84ca1cd 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -33,7 +33,9 @@ local-checks-to-skip =\
   sc_two_space_separator_in_usage  \
   sc_error_message_uppercase   \
   sc_program_name  \
-  sc_makefile_check
+  sc_makefile_check\
+  sc_require_config_h  \
+  sc_require_config_h_first
 
 # Files that should never cause syntax check failures.
 VC_LIST_ALWAYS_EXCLUDE_REGEX = \
diff --git a/configure.ac b/configure.ac
index 4df1139..e32af7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([1.11.1 foreign color-tests tar-ustar])
 AC_PREREQ([2.61])
 AC_CONFIG_SRCDIR([tools/osinfo-db-validate.c])
-AC_CONFIG_HEADERS([config.h])
 AC_PROG_CC
 AC_PROG_LN_S
 
diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index eef6688..8fa9889 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -20,8 +20,6 @@
  *   Daniel P. Berrange 
  */
 
-#include 
-
 #include 
 #include 
 #include 
diff --git a/tools/osinfo-db-import.c b/tools/osinfo-db-import.c
index 675961d..026b895 100644
--- a/tools/osinfo-db-import.c
+++ b/tools/osinfo-db-import.c
@@ -20,8 +20,6 @@
  *   Daniel P. Berrange 
  */
 
-#include 
-
 #include 
 #include 
 #include 
diff --git a/tools/osinfo-db-path.c b/tools/osinfo-db-path.c
index 8ef7e55..e38758b 100644
--- a/tools/osinfo-db-path.c
+++ b/tools/osinfo-db-path.c
@@ -20,8 +20,6 @@
  *   Daniel P. Berrange 
  */
 
-#include 
-
 #include 
 #include 
 #include 
diff --git a/tools/osinfo-db-util.c b/tools/osinfo-db-util.c
index 1030b06..40c6079 100644
--- a/tools/osinfo-db-util.c
+++ b/tools/osinfo-db-util.c
@@ -20,8 +20,6 @@
  *   Daniel P. Berrange 
  */
 
-#include 
-
 #include 
 
 #include "osinfo-db-util.h"
diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index 7fd87d2..97db5f2 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -20,8 +20,6 @@
  *   Daniel P. Berrange 
  */
 
-#include 
-
 #include 
 #include 
 #include 
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 05/16] cfg.mk: Remove exclude_file_name_regexp--sc_bindtextdomain

2019-07-09 Thread Fabiano Fidêncio
Let's run the check in all files.

Signed-off-by: Fabiano Fidêncio 
---
 cfg.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index b7839c8..fc4b313 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -100,5 +100,3 @@ sc_bracket_spacing_check:
 
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
-
-exclude_file_name_regexp--sc_bindtextdomain = ^tools/.*.c|test/.*.c
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 11/16] prepare-release: Adapt to use meson

2019-07-09 Thread Fabiano Fidêncio
Let's adapt the prepare-release script to use meson build system instead
of autotools.

This change has been tested and is working fine on Fedora 30+.

Signed-off-by: Fabiano Fidêncio 
---
 prepare-release.sh | 78 ++
 1 file changed, 24 insertions(+), 54 deletions(-)

diff --git a/prepare-release.sh b/prepare-release.sh
index e95a177..5f886c5 100755
--- a/prepare-release.sh
+++ b/prepare-release.sh
@@ -7,86 +7,56 @@ test -n "$1" && RESULTS=$1 || RESULTS=results.log
 INSTALL_ROOT=$HOME/builder
 
 # Make things clean.
-test -f Makefile && make -k distclean || :
-
 rm -rf build
-mkdir build
-cd build
-
-../autogen.sh --prefix=$INSTALL_ROOT \
---enable-werror
+meson build --prefix=$INSTALL_ROOT --werror
 
-# If the MAKEFLAGS envvar does not yet include a -j option,
-# add -jN where N depends on the number of processors.
-case $MAKEFLAGS in
-  *-j*) ;;
-  *) n=$(getconf _NPROCESSORS_ONLN 2> /dev/null)
-test "$n" -gt 0 || n=1
-n=$(expr $n + 1)
-MAKEFLAGS="$MAKEFLAGS -j$n"
-export MAKEFLAGS
-;;
-esac
-
-make
-make install
+ninja -C build
+ninja -C build install
 
 # set -o pipefail is a bashism; this use of exec is the POSIX alternative
 exec 3>&1
 st=$(
   exec 4>&1 >&3
-  { make check syntax-check 2>&1 3>&- 4>&-; echo $? >&4; } | tee "$RESULTS"
+  { ninja -C build test 2>&1 3>&- 4>&-; echo $? >&4; } | tee "$RESULTS"
 )
 exec 3>&-
 test "$st" = 0
 
-rm -f *.tar.gz
-make dist
+ninja -C build dist
 
 if [ -f /usr/bin/rpmbuild ]; then
   rpmbuild --nodeps \
- --define "_sourcedir `pwd`" \
- -ba --clean osinfo-db-tools.spec
+ --define "_sourcedir `pwd`/build/meson-dist/" \
+ -ba --clean build/osinfo-db-tools.spec
 fi
 
 # Test mingw32 cross-compile
-if test -x /usr/bin/i686-w64-mingw32-gcc ; then
-  make distclean
-
-  
PKG_CONFIG_PATH="$INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
-  CC="i686-w64-mingw32-gcc" \
-  ../configure \
---build=$(uname -m)-pc-linux \
---host=i686-w64-mingw32 \
---prefix="$INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
---enable-werror
-
-  make
-  make install
+if test -x /usr/bin/i686-w64-mingw32-gcc && test -r 
/usr/share/mingw/toolchain-mingw32.meson ; then
+  rm -rf build || :
+  meson build --prefix="$INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" 
--werror --cross-file="/usr/share/mingw/toolchain-mingw32.meson"
 
+  ninja -C build
+  ninja -C build install
 fi
 
 # Test mingw64 cross-compile
-if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
-  make distclean
-
-  
PKG_CONFIG_PATH="$INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig" 
\
-  CC="x86_64-w64-mingw32-gcc" \
-  ../configure \
---build=$(uname -m)-pc-linux \
---host=x86_64-w64-mingw32 \
---prefix="$INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
---enable-werror
+if test -x /usr/bin/x86_64-w64-mingw32-gcc && test -r 
/usr/share/mingw/toolchain-mingw64.meson ; then
+  rm -rf build || :
 
-  make
-  make install
+  meson build --prefix="$INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw" 
--werror --cross-file="/usr/share/mingw/toolchain-mingw64.meson"
 
+  ninja -C build
+  ninja -C build install
 fi
 
-if test -x /usr/bin/i686-w64-mingw32-gcc && test -x 
/usr/bin/x86_64-w64-mingw32-gcc ; then
+if test -x /usr/bin/i686-w64-mingw32-gcc && test -r 
/usr/share/mingw/toolchain-mingw32.meson && test -x 
/usr/bin/x86_64-w64-mingw32-gcc && test -r 
/usr/share/mingw/toolchain-mingw64.meson ; then
+  rm -rf build || :
+  meson build
+  ninja -C build dist
+
   if test -f /usr/bin/rpmbuild ; then
 rpmbuild --nodeps \
-   --define "_sourcedir `pwd`" \
-   -ba --clean mingw-osinfo-db-tools.spec
+   --define "_sourcedir `pwd`/build/meson-dist/" \
+   -ba --clean build/mingw-osinfo-db-tools.spec
   fi
 fi
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 16/16] prepare-release: Add `ninja syntax-check`

2019-07-09 Thread Fabiano Fidêncio
Now that ninja has a `syntax-check` target, let's add it to
prepare-release script in a similar that `make syntax-check` was used
before.

Signed-off-by: Fabiano Fidêncio 
---
 prepare-release.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/prepare-release.sh b/prepare-release.sh
index 5f886c5..f69ce5e 100755
--- a/prepare-release.sh
+++ b/prepare-release.sh
@@ -18,6 +18,8 @@ exec 3>&1
 st=$(
   exec 4>&1 >&3
   { ninja -C build test 2>&1 3>&- 4>&-; echo $? >&4; } | tee "$RESULTS"
+  exec 4>&1 >&3
+  { ninja -C build syntax-check 2>&1 3>&- 4>&-; echo $? >&4; } | tee --append 
"$RESULTS"
 )
 exec 3>&-
 test "$st" = 0
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 09/16] spec: Adapt to use meson

2019-07-09 Thread Fabiano Fidêncio
The changes needed in the spec files are not so intrusive.

One thing that has to be mentioned is the requirement for
mingw-filesystem >= 107 (which is only present on Fedora 30+) in order
to generate the mingw rpms for osinfo-db-tools. This huge bump in the
version happened because the `%mingw_ninja_install` was only recently
introduced to mingw-filesystem package.

Signed-off-by: Fabiano Fidêncio 
---
 mingw-osinfo-db-tools.spec.in | 14 +++---
 osinfo-db-tools.spec.in   | 17 ++---
 2 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/mingw-osinfo-db-tools.spec.in b/mingw-osinfo-db-tools.spec.in
index 14e68c5..6d9fd95 100644
--- a/mingw-osinfo-db-tools.spec.in
+++ b/mingw-osinfo-db-tools.spec.in
@@ -5,15 +5,16 @@ Version: @VERSION@
 Release: 1%{?dist}%{?extra_release}
 Summary: MinGW Windows port of a library for managing OS information for 
virtualization
 License: LGPLv2+
-Source: https://releases.pagure.org/libosinfo/osinfo-db-tools-%{version}.tar.gz
+Source: https://releases.pagure.org/libosinfo/osinfo-db-tools-%{version}.tar.xz
 URL: https://libosinfo.org
 
 BuildArch: noarch
 
+BuildRequires: meson
 BuildRequires: gettext
 
-BuildRequires: mingw32-filesystem >= 95
-BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw32-filesystem >= 107
+BuildRequires: mingw64-filesystem >= 107
 BuildRequires: mingw32-gcc
 BuildRequires: mingw64-gcc
 BuildRequires: mingw32-binutils
@@ -62,12 +63,11 @@ information about operating systems for use with 
virtualization
 %setup -q -n osinfo-db-tools-%{version}
 
 %build
-%mingw_configure
-%mingw_make %{?_smp_mflags}
-
+%mingw_meson
+%mingw_ninja
 
 %install
-%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
+%mingw_ninja_install
 
 # Manpages don't need to be bundled
 rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/man
diff --git a/osinfo-db-tools.spec.in b/osinfo-db-tools.spec.in
index 459dde9..848ce3b 100644
--- a/osinfo-db-tools.spec.in
+++ b/osinfo-db-tools.spec.in
@@ -11,8 +11,9 @@ Name: osinfo-db-tools
 Version: @VERSION@
 Release: 1%{?dist}%{?extra_release}
 License: GPLv2+
-Source: https://releases.pagure.org/libosinfo/%{name}-%{version}.tar.gz
+Source: https://releases.pagure.org/libosinfo/%{name}-%{version}.tar.xz
 URL: https://libosinfo.org
+BuildRequires: meson
 BuildRequires: gcc
 BuildRequires: gettext-devel
 BuildRequires: glib2-devel
@@ -38,18 +39,12 @@ information about operating systems for use with 
virtualization
 %setup -q
 
 %build
-%configure
-%__make %{?_smp_mflags} V=1
-
-%check
-if ! make check
-then
-  cat tests/test-suite.log || true
-  exit 1
-fi
+%meson
+%meson_build
+%meson_test
 
 %install
-%__make install DESTDIR=%{buildroot}
+%meson_install
 
 %find_lang %{name}
 
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 04/16] cfg.mk: Remove exclude_file_name_regexp--sc_prohibit_strcmp

2019-07-09 Thread Fabiano Fidêncio
Let's run the check in all files.

Signed-off-by: Fabiano Fidêncio 
---
 cfg.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 5490603..b7839c8 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -101,6 +101,4 @@ sc_bracket_spacing_check:
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
 
-exclude_file_name_regexp--sc_prohibit_strcmp = ^*/*.[ch]
-
 exclude_file_name_regexp--sc_bindtextdomain = ^tools/.*.c|test/.*.c
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 08/16] Add support to meson build system

2019-07-09 Thread Fabiano Fidêncio
Meson build system is a way simpler and easier to understand build
system that can provide (with some work-arounds here and there) the same
functionalities currently available with our current build system
(autotools).

For now, as meson support is not fully complete* and requires a quite
new version of meson still not present in all systems supported on
libvirt-jenkis-ci, let's keep autotools around so more extensive testing
if meson's functionalities can be done before actually removing
autotools support.

*: the support is not fully complete as there's still no equivalent of
`make syntax-check` provided.

Signed-off-by: Fabiano Fidêncio 
---
 build-aux/dist.sh |  11 +++
 meson.build   | 218 ++
 po/meson.build|   2 +
 tests/meson.build |  21 +
 tools/meson.build |  97 +
 5 files changed, 349 insertions(+)
 create mode 100755 build-aux/dist.sh
 create mode 100644 meson.build
 create mode 100644 po/meson.build
 create mode 100644 tests/meson.build
 create mode 100644 tools/meson.build

diff --git a/build-aux/dist.sh b/build-aux/dist.sh
new file mode 100755
index 000..422d593
--- /dev/null
+++ b/build-aux/dist.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+SOURCE_ROOT=$1
+BUILD_ROOT=$2
+
+$SOURCE_ROOT/build-aux/gitlog-to-changelog > $MESON_DIST_ROOT/ChangeLog
+
+cp $BUILD_ROOT/{mingw-,}osinfo-db-tools.spec $MESON_DIST_ROOT/
+
+out="`git log --pretty=format:'%aN <%aE>' | sort -u`"
+perl -p -e "s/#authorslist#// and print '$out'" < $SOURCE_ROOT/AUTHORS.in > 
$MESON_DIST_ROOT/AUTHORS
diff --git a/meson.build b/meson.build
new file mode 100644
index 000..97ad60c
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,218 @@
+project(
+'osinfo-db-tools', 'c',
+version: '1.6.0',
+license: 'GPLv2+',
+meson_version: '>= 0.49.0'
+)
+
+osinfo_db_tools_prefix = get_option('prefix')
+
+# those directories have to be known by the project
+osinfo_db_tools_datadir = join_paths(osinfo_db_tools_prefix, 
get_option('datadir'))
+osinfo_db_tools_localedir = join_paths(osinfo_db_tools_prefix, 
get_option('localedir'))
+osinfo_db_tools_pkgdatadir = join_paths(osinfo_db_tools_datadir, 
meson.project_name())
+osinfo_db_tools_sysconfdir = join_paths(osinfo_db_tools_prefix, 
get_option('sysconfdir'))
+
+# those directories will have files installed in
+osinfo_db_tools_bindir = join_paths(osinfo_db_tools_prefix, 
get_option('bindir'))
+osinfo_db_tools_docdir = join_paths(osinfo_db_tools_datadir, 'doc', 
meson.project_name())
+osinfo_db_tools_licensedir = join_paths(osinfo_db_tools_datadir, 'license', 
meson.project_name())
+osinfo_db_tools_mandir = join_paths(osinfo_db_tools_prefix, 
get_option('mandir'))
+
+# spec files
+osinfo_db_tools_spec_data = configuration_data()
+osinfo_db_tools_spec_data.set('VERSION', meson.project_version())
+
+specs = ['osinfo-db-tools.spec', 'mingw-osinfo-db-tools.spec']
+foreach spec: specs
+configure_file(
+input: spec + '.in',
+output: spec,
+configuration: osinfo_db_tools_spec_data
+)
+endforeach
+
+# ninja dist helper
+meson.add_dist_script('build-aux/dist.sh', meson.source_root(), 
meson.build_root())
+
+# dependencies
+#  glib stuff
+glib_version = '2.36'
+glib_version_info = '>= @0@'.format(glib_version)
+glib_dep = dependency('glib-2.0', version: glib_version_info)
+gio_dep = dependency('gio-2.0', version: glib_version_info)
+gobject_dep = dependency('gobject-2.0', version: glib_version_info)
+
+#  everything else
+libarchive_dep = dependency('libarchive', version: '>= 3.0.0')
+libxml_dep = dependency('libxml-2.0', version: '>= 2.6.0')
+json_glib_dep = dependency('json-glib-1.0')
+
+#  common dependencies
+osinfo_db_tools_common_dependencies = [gobject_dep, gio_dep, glib_dep]
+
+# arguments
+osinfo_db_tools_cflags = []
+
+#  glib stuff
+osinfo_db_tools_cflags += [
+'-DGLIB_MIN_REQUIRED_VERSION="0"'.format(glib_version),
+'-DGLIB_MAX_ALLOWED_VERSION="0"'.format(glib_version)
+]
+
+#  directories used
+osinfo_db_tools_cflags += [
+'-DPKGDATADIR="@0@"'.format(osinfo_db_tools_pkgdatadir),
+'-DDATA_DIR="@0@"'.format(osinfo_db_tools_datadir),
+'-DSYSCONFDIR="@0@"'.format(osinfo_db_tools_sysconfdir),
+'-DLOCALEDIR="@0@"'.format(osinfo_db_tools_localedir),
+]
+
+#  gettext package name
+osinfo_db_tools_cflags += 
['-DGETTEXT_PACKAGE="0"'.format(meson.project_name())]
+
+#  cflags to check whether the compiler supports them or not
+osinfo_db_tools_check_cflags = [
+  '-W',
+  '-Waddress',
+  '-Waggressive-loop-optimizations',
+  '-Wall',
+  '-Warray-bounds',
+  '-Wattributes',
+  '-Wbuiltin-macro-redefined',
+  '-Wcast-align',
+  '-Wchar-subscripts',
+  '-Wclobbered',
+  '-Wcomment',
+  '-Wcomments',
+  '-Wcoverage-mismatch',
+  '-Wcpp',
+  '-Wdate-time',
+  '-Wdeprecated-declarations',
+  '-Wdisabled-optimization',
+  '-Wdiv-by-zero',
+  '-Wdouble-promotion',
+  '-Wempty-body',
+  '-Wendif-labels',
+  '-Wenum-compare',
+  '-Wextra',
+  '-Wformat-contains-nul',
+  

[Libosinfo] [osinfo-db-tools PATCH v2 13/16] Support `make syntax-check` without Makefile

2019-07-09 Thread Fabiano Fidêncio
A few dirty hacks have been done in GNUmakefile, cfg.mk, and maint.mk
in order to support running `make syntax-check` without having to have a
Makefile around.

GNUmakefile: set srcdir & top_srcdir and remove the parts that would
cause an error due to no presence of a Makefile.

cfg.mk: add sc_prohibit_always-defined_macros to the list of local
checks to skip as it looks for Makefile, which is generated after
running ./configure.

maint.mk: allow running `make syntax-check` without having a Makefile
generated.

Signed-off-by: Fabiano Fidêncio 
---
 GNUmakefile | 28 ++--
 cfg.mk  |  3 ++-
 maint.mk|  2 --
 3 files changed, 4 insertions(+), 29 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index ca88b6b..a62b880 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -30,10 +30,8 @@ else
 SHELL = sh
 endif
 
-# If the user runs GNU make but has not yet run ./configure,
-# give them a diagnostic.
-_have-Makefile := $(shell test -f Makefile && echo yes)
-ifeq ($(_have-Makefile),yes)
+srcdir = .
+top_srcdir = .
 
 # Make tar archive easier to reproduce.
 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
@@ -41,8 +39,6 @@ export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
 # Allow the user to add to this in the Makefile.
 ALL_RECURSIVE_TARGETS =
 
-include Makefile
-
 # Some projects override e.g., _autoreconf here.
 -include $(srcdir)/cfg.mk
 
@@ -94,26 +90,6 @@ _version:
cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
$(MAKE) $(AM_MAKEFLAGS) Makefile
 
-else
-
-.DEFAULT_GOAL := abort-due-to-no-makefile
-srcdir = .
-
-# The package can override .DEFAULT_GOAL to run actions like autoreconf.
--include ./cfg.mk
-include ./maint.mk
-
-ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
-$(MAKECMDGOALS): abort-due-to-no-makefile
-endif
-
-abort-due-to-no-makefile:
-   @echo There seems to be no Makefile in this directory.   1>&2
-   @echo "You must run ./configure before running \`make'." 1>&2
-   @exit 1
-
-endif
-
 # Tell version 3.79 and up of GNU make to not build goals in this
 # directory in parallel, in case someone tries to build multiple
 # targets, and one of them can cause a recursive target to be invoked.
diff --git a/cfg.mk b/cfg.mk
index 84ca1cd..8f41450 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -35,7 +35,8 @@ local-checks-to-skip =\
   sc_program_name  \
   sc_makefile_check\
   sc_require_config_h  \
-  sc_require_config_h_first
+  sc_require_config_h_first\
+  sc_prohibit_always-defined_macros
 
 # Files that should never cause syntax check failures.
 VC_LIST_ALWAYS_EXCLUDE_REGEX = \
diff --git a/maint.mk b/maint.mk
index 16e9360..b8c207d 100644
--- a/maint.mk
+++ b/maint.mk
@@ -159,7 +159,6 @@ export LC_ALL = C
 ## Sanity checks.  ##
 ## --- ##
 
-ifneq ($(_gl-Makefile),)
 _cfg_mk := $(wildcard $(srcdir)/cfg.mk)
 
 # Collect the names of rules starting with 'sc_'.
@@ -201,7 +200,6 @@ local-check :=  
\
 $(filter-out $(local-checks-to-skip), $(local-checks-available)))
 
 syntax-check: $(local-check)
-endif
 
 # _sc_search_regexp
 #
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 12/16] Drop autotools support

2019-07-09 Thread Fabiano Fidêncio
Let's try to drop autotools support as meson is in place. There are a
few files that were not dropped though, as:
- cfg.mk
- maint.mk
- GNUmakefile
- build-aux/bracket-spacing.pl
- build-aux/gitlog-to-changelog
- build-aux/useless-if-before-free
- build-aux/vc-list-files

>From the list above, build-aux/gitlog-to-changelog is currently used by
meson as part of the `dist`.

All the other files, with a few changes, will be useful for meson as,
with a few changes, we will be able have `ninja syntax-check` working.

Signed-off-by: Fabiano Fidêncio 
---
 Makefile.am  |  48 --
 build-aux/mktempd| 135 -
 configure.ac |  88 ---
 docs/Makefile.am |   2 -
 m4/libosinfo-compile-warnings.m4 | 135 -
 m4/manywarnings.m4   | 245 ---
 m4/warnings.m4   |  79 --
 po/Makevars  |  78 --
 tests/Makefile.am|  30 
 tools/Makefile.am|  53 ---
 10 files changed, 893 deletions(-)
 delete mode 100644 Makefile.am
 delete mode 100755 build-aux/mktempd
 delete mode 100644 configure.ac
 delete mode 100644 docs/Makefile.am
 delete mode 100644 m4/libosinfo-compile-warnings.m4
 delete mode 100644 m4/manywarnings.m4
 delete mode 100644 m4/warnings.m4
 delete mode 100644 po/Makevars
 delete mode 100644 tests/Makefile.am
 delete mode 100644 tools/Makefile.am

diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 8c81f5a..000
--- a/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-
-SUBDIRS = tools docs po tests
-
-EXTRA_DIST = \
-  osinfo-db-tools.spec \
-  osinfo-db-tools.spec.in \
-  mingw-osinfo-db-tools.spec.in \
-  build-aux/mktempd \
-  cfg.mk \
-  GNUmakefile \
-  maint.mk \
-  AUTHORS.in \
-  $(NULL)
-
-MAINTAINERCLEANFILES = \
-   po/Makefile.in.in   \
-   po/Makevars.template\
-   po/Rules-quot   \
-   po/boldquot.sed \
-   po/en@boldquot.header   \
-   po/en@quot.header   \
-   po/insert-header.sin\
-   po/quot.sed \
-   po/remove-potcdate.sin  \
-   $(NULL)
-
-ACLOCAL_AMFLAGS = -I m4
-
-dist-hook: gen-ChangeLog gen-AUTHORS
-
-# Generate the ChangeLog file (with all entries since the switch to git)
-# and insert it into the directory we're about to use to create a tarball.
-.PHONY: gen-ChangeLog gen-AUTHORS
-gen-ChangeLog:
-   if test -d $(srcdir)/.git; then \
- $(top_srcdir)/build-aux/gitlog-to-changelog   \
-   > $(distdir)/cl-t;  \
- rm -f $(distdir)/ChangeLog;   \
- mv $(distdir)/cl-t $(distdir)/ChangeLog;  \
-   fi
-
-gen-AUTHORS:
-   $(AM_V_GEN)if test -d $(srcdir)/.git; then  \
-  out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort 
-u`" && \
- perl -p -e "s/#authorslist#// and print '$$out'"\
-< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp &&\
-  mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ;   \
-   fi
diff --git a/build-aux/mktempd b/build-aux/mktempd
deleted file mode 100755
index ab3cf14..000
--- a/build-aux/mktempd
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/bin/sh
-# Create a temporary directory, much like mktemp -d does.
-
-# Copyright (C) 2007-2012 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 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU 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 .
-
-# Written by Jim Meyering.
-
-# Usage: mktempd /tmp phoey.XX
-
-# First, try to use the mktemp program.
-# Failing that, we'll roll our own mktemp-like function:
-#  - try to get random bytes from /dev/urandom
-#  - failing that, generate output from a combination of quickly-varying
-#  sources and gzip.  Ignore non-varying gzip header, and extract
-#  "random" bits from there.
-#  - given those bits, map to file-name bytes using tr, and try to create
-#  the desired directory.
-#  - make only $MAX_TRIES attempts
-
-ME=`basename "$0"`
-die() { echo >&2 "$ME: $@"; exit 1; }
-
-MAX_TRIES=4
-
-rand_bytes()
-{
-  n=$1
-
-  

[Libosinfo] [osinfo-db-tools PATCH v2 10/16] prepare-release: Remove non-valid configure options

2019-07-09 Thread Fabiano Fidêncio
Those options have been added as the `prepare-release.sh` was copied
from the libosinfo project. However, those options are not valid for
osinfo-db-tools project.

Signed-off-by: Fabiano Fidêncio 
---
 prepare-release.sh | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/prepare-release.sh b/prepare-release.sh
index 731b4e4..e95a177 100755
--- a/prepare-release.sh
+++ b/prepare-release.sh
@@ -14,7 +14,7 @@ mkdir build
 cd build
 
 ../autogen.sh --prefix=$INSTALL_ROOT \
---enable-werror --enable-gtk-doc
+--enable-werror
 
 # If the MAKEFLAGS envvar does not yet include a -j option,
 # add -jN where N depends on the number of processors.
@@ -59,9 +59,7 @@ if test -x /usr/bin/i686-w64-mingw32-gcc ; then
 --build=$(uname -m)-pc-linux \
 --host=i686-w64-mingw32 \
 --prefix="$INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
---enable-werror \
---enable-introspection=no \
---enable-tests=no
+--enable-werror
 
   make
   make install
@@ -78,9 +76,7 @@ if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
 --build=$(uname -m)-pc-linux \
 --host=x86_64-w64-mingw32 \
 --prefix="$INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
---enable-werror \
---enable-introspection=no \
---enable-tests=no
+--enable-werror
 
   make
   make install
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 02/16] util: Indent includes/defines

2019-07-09 Thread Fabiano Fidêncio
By doing this, we can stop excluding files from
sc_preprocessor_indentation check.

Signed-off-by: Fabiano Fidêncio 
---
 tools/osinfo-db-util.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/osinfo-db-util.h b/tools/osinfo-db-util.h
index 7b4e501..8d7a456 100644
--- a/tools/osinfo-db-util.h
+++ b/tools/osinfo-db-util.h
@@ -21,11 +21,11 @@
  */
 
 #ifndef OSINFO_DB_UTIL_H__
-#define OSINFO_DB_UTIL_H__
+# define OSINFO_DB_UTIL_H__
 
-#include 
+# include 
 
-#define OSINFO_DB_ERROR osinfo_db_error_quark()
+# define OSINFO_DB_ERROR osinfo_db_error_quark()
 
 GQuark osinfo_db_error_quark(void);
 GFile *osinfo_db_get_system_path(const gchar *root);
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 06/16] maint.mk: Update to the latest gnulib version

2019-07-09 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio 
---
 maint.mk | 407 ++-
 1 file changed, 255 insertions(+), 152 deletions(-)

diff --git a/maint.mk b/maint.mk
index 04a839a..16e9360 100644
--- a/maint.mk
+++ b/maint.mk
@@ -2,7 +2,7 @@
 # This Makefile fragment tries to be general-purpose enough to be
 # used by many projects via the gnulib maintainer-makefile module.
 
-## Copyright (C) 2001-2014 Free Software Foundation, Inc.
+## Copyright (C) 2001-2019 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
@@ -15,12 +15,19 @@
 ## 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 .
+## along with this program.  If not, see .
 
 # This is reported not to work with make-3.79.1
 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 ME := maint.mk
 
+# These variables ought to be defined through the configure.ac section
+# of the module description. But some packages import this file directly,
+# ignoring the module description.
+AWK ?= awk
+GREP ?= grep
+SED ?= sed
+
 # Helper variables.
 _empty =
 _sp = $(_empty) $(_empty)
@@ -46,7 +53,7 @@ member-check =
\
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
 gzip_rsyncable := \
-  $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
+  $(shell gzip --help 2>/dev/null|$(GREP) rsyncable >/dev/null \
 && printf %s --rsyncable)
 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
 
@@ -55,6 +62,10 @@ VC = $(GIT)
 
 VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
 
+# You can override this variable in cfg.mk if your gnulib submodule lives
+# in a different location.
+gnulib_dir ?= $(srcdir)/gnulib
+
 # You can override this variable in cfg.mk to set your own regexp
 # matching files to ignore.
 VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
@@ -79,9 +90,9 @@ _sc_excl = \
   $(or $(exclude_file_name_regexp--$@),^$$)
 VC_LIST_EXCEPT = \
   $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \
-   | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
- else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
-   | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
+   | if test -f $(srcdir)/.x-$@; then $(GREP) -vEf $(srcdir)/.x-$@; \
+ else $(GREP) -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
+   | $(GREP) -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
$(_prepend_srcdir_prefix)
 
 ifeq ($(origin prev_version_file), undefined)
@@ -126,8 +137,8 @@ gnu_ftp_host-stable = ftp.gnu.org
 gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
 
 url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org),   \
- http://ftpmirror.gnu.org/$(PACKAGE),  \
- ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
+ https://ftpmirror.gnu.org/$(PACKAGE), \
+ https://$(gnu_rel_host)/gnu/$(PACKAGE))
 
 # Override this in cfg.mk if you are using a different format in your
 # NEWS file.
@@ -148,6 +159,7 @@ export LC_ALL = C
 ## Sanity checks.  ##
 ## --- ##
 
+ifneq ($(_gl-Makefile),)
 _cfg_mk := $(wildcard $(srcdir)/cfg.mk)
 
 # Collect the names of rules starting with 'sc_'.
@@ -179,7 +191,7 @@ $(sc_z_rules_): %.z: %
@end=$$(date +%s.%N);   \
start=$$(cat .sc-start-$*); \
rm -f .sc-start-$*; \
-   awk -v s=$$start -v e=$$end \
+   $(AWK) -v s=$$start -v e=$$end  \
  'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null
 
 # The patsubst here is to replace each sc_% rule with its sc_%.z wrapper
@@ -189,6 +201,7 @@ local-check :=  
\
 $(filter-out $(local-checks-to-skip), $(local-checks-available)))
 
 syntax-check: $(local-check)
+endif
 
 # _sc_search_regexp
 #
@@ -286,42 +299,56 @@ define _sc_search_regexp
\
: Filter by file name;  \
if test -n "$$in_files"; then   \
- files=$$(find $(srcdir) | grep -E "$$in_files"\
-  | grep -Ev '$(_sc_excl)');   \
+ files=$$(find $(srcdir) | $(GREP) -E "$$in_files" \
+  | $(GREP) -Ev '$(_sc_excl)');\
else

[Libosinfo] [osinfo-db-tools PATCH v2 14/16] Move files needed for `make syntax-check` to build-aux

2019-07-09 Thread Fabiano Fidêncio
Together with the changes, let's adapt GNUmakefile and maint.mk in order
to be able to run those files from build-aux.

GNUmakefile:
- changing both srcdir & top_srcdir, and adjusting the includes of
  cfg.mk and maint.mk were enough to be able to run `make syntax-check`
  from build-aux directory;

maint.mk:
- "ME" variable had to be changed to point to the right place;
- Some paths expecting cfg.mk in the top_srcdir had to be changed;
- tight-scope.mk target dependency has been changed from $(ME) to
  maint.mk;

Signed-off-by: Fabiano Fidêncio 
---
 GNUmakefile => build-aux/GNUmakefile | 8 
 cfg.mk => build-aux/cfg.mk   | 0
 maint.mk => build-aux/maint.mk   | 8 
 3 files changed, 8 insertions(+), 8 deletions(-)
 rename GNUmakefile => build-aux/GNUmakefile (97%)
 rename cfg.mk => build-aux/cfg.mk (100%)
 rename maint.mk => build-aux/maint.mk (99%)

diff --git a/GNUmakefile b/build-aux/GNUmakefile
similarity index 97%
rename from GNUmakefile
rename to build-aux/GNUmakefile
index a62b880..6811db1 100644
--- a/GNUmakefile
+++ b/build-aux/GNUmakefile
@@ -30,8 +30,8 @@ else
 SHELL = sh
 endif
 
-srcdir = .
-top_srcdir = .
+srcdir = ..
+top_srcdir = ..
 
 # Make tar archive easier to reproduce.
 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
@@ -40,13 +40,13 @@ export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
 ALL_RECURSIVE_TARGETS =
 
 # Some projects override e.g., _autoreconf here.
--include $(srcdir)/cfg.mk
 
 # Allow cfg.mk to override these.
 _build-aux ?= build-aux
 _autoreconf ?= autoreconf -v
 
-include $(srcdir)/maint.mk
+-include $(srcdir)/$(_build-aux)/cfg.mk
+include $(srcdir)/$(_build-aux)/maint.mk
 
 # Ensure that $(VERSION) is up to date for dist-related targets, but not
 # for others: rerunning autoreconf and recompiling everything isn't cheap.
diff --git a/cfg.mk b/build-aux/cfg.mk
similarity index 100%
rename from cfg.mk
rename to build-aux/cfg.mk
diff --git a/maint.mk b/build-aux/maint.mk
similarity index 99%
rename from maint.mk
rename to build-aux/maint.mk
index b8c207d..fe8bcf4 100644
--- a/maint.mk
+++ b/build-aux/maint.mk
@@ -19,7 +19,7 @@
 
 # This is reported not to work with make-3.79.1
 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-ME := maint.mk
+ME := $(_build-aux)/maint.mk
 
 # These variables ought to be defined through the configure.ac section
 # of the module description. But some packages import this file directly,
@@ -1660,7 +1660,7 @@ _gl_TS_dir ?= src
 ALL_RECURSIVE_TARGETS += sc_tight_scope
 sc_tight_scope: tight-scope.mk
@fail=0;\
-   if ! $(GREP) '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \
+   if ! $(GREP) '^ *export _gl_TS_headers *=' 
$(srcdir)/$(_build-aux)/cfg.mk   \
> /dev/null \
   && ! $(GREP) -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
> /dev/null 2>&1; then  \
@@ -1668,7 +1668,7 @@ sc_tight_scope: tight-scope.mk
else\
$(MAKE) -s -C $(_gl_TS_dir) \
-f Makefile \
-   -f $(abs_top_srcdir)/cfg.mk \
+   -f $(abs_top_srcdir)/$(_build-aux)/cfg.mk   
\
-f $(abs_top_builddir)/$<   \
  _gl_tight_scope   \
|| fail=1;  \
@@ -1676,7 +1676,7 @@ sc_tight_scope: tight-scope.mk
rm -f $<;   \
exit $$fail
 
-tight-scope.mk: $(ME)
+tight-scope.mk: maint.mk
@rm -f $@ $@-t
@perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t
@chmod a=r $@-t && mv $@-t $@
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 00/16] Add support to meson build system

2019-07-09 Thread Fabiano Fidêncio
The following patch series:
- Add suppor to meson build system;
- Drop support to autotools build system;

If we decide to go for it, there's still work to be done in
libvirt-jenkins-ci as it has to have meson support added there.

Changes since v1:
https://www.redhat.com/archives/libosinfo/2019-June/msg00063.html
- Improve commit message in the patch dropping config.h
- Some cleanups on cfg.mk were done;
  - In order to do so, a patch indentng includes/defines in util.h
was needed;
- Updated maint.mk in order to avoid doing de s/$(SED)/sed hack;
- Added the .spec files to the generated tarball;
- Don't purge the git checkout, just delete the build dir when
  running `./prepare-release`;
- Moved GNUmakefile, cfg.mk, and maint.mk to build-aux dir;
- Introduced a new patch dropping the non-valid configure options,
  as it makes clear that we're not removing them just because we
  are switching to meson;

A few points that still have to be considered:
- meson version in the major distros:
  - Fedora 29 - 0.50.0
  - Fedora 30 - 0.50.1
  - Debian 9 - 0.37.1
  - Debian 10 - 0.49.2
  - OpenSUSE 15.1 - 0.51.0
  - Ubuntu 18.04 - 0.45.1-2
  - Ubuntu 18.10 - 0.47.2
  - Ubuntu 19.04 - 0.49.0
  - FreeBSD - 0.51.0
- This is what internet returns me as part of devel/meson
  - CentOS 7 - not present
- EPEL: 0.47.2
  If we do the switch, we'd stop building on:
  - Debian 9 & older;
  - Ubuntu 18.10 & older;
  - EL 7 & older;

  For osinfo-db-tools, I truly believe it's not a big deal, as it'd
  be for more important packages (as libvirt).

- meson support on libvirt-jenkins-ci:
  - I'll happily work on that before having these patches merged!

- a last release with autotools:
  - I'd like to have a last release with autotools, including some
patches that are still pending review (as the ones using libsoup
instead of gvfs);

- can we have a more generic/simplified version of GNUmakefile &
  friends?
  - That would take me some considerable amount of time to do and,
although I'm not discarding this for the future, it's not something
I'd like to consider for now.

Fabiano Fidêncio (16):
  tests: Unset OSINFO_LOCAL_DIR envvar
  util: Indent includes/defines
  cfg.mk: Remove exclude_file_name_regexp--sc_preprocessor_indentation
  cfg.mk: Remove exclude_file_name_regexp--sc_prohibit_strcmp
  cfg.mk: Remove exclude_file_name_regexp--sc_bindtextdomain
  maint.mk: Update to the latest gnulib version
  tools: Don't import config.h
  Add support to meson build system
  spec: Adapt to use meson
  prepare-release: Remove non-valid configure options
  prepare-release: Adapt to use meson
  Drop autotools support
  Support `make syntax-check` without Makefile
  Move files needed for `make syntax-check` to build-aux
  meson: Add ninja syntax-check
  prepare-release: Add `ninja syntax-check`

 Makefile.am  |  48 
 GNUmakefile => build-aux/GNUmakefile |  32 +--
 cfg.mk => build-aux/cfg.mk   |  11 +-
 build-aux/dist.sh|  11 +
 maint.mk => build-aux/maint.mk   | 411 +--
 build-aux/mktempd| 135 -
 build-aux/syntax-check   |   5 +
 configure.ac |  89 --
 docs/Makefile.am |   2 -
 m4/libosinfo-compile-warnings.m4 | 135 -
 m4/manywarnings.m4   | 245 
 m4/warnings.m4   |  79 -
 meson.build  | 221 ++
 mingw-osinfo-db-tools.spec.in|  14 +-
 osinfo-db-tools.spec.in  |  17 +-
 po/Makevars  |  78 -
 po/meson.build   |   2 +
 prepare-release.sh   |  84 ++
 tests/Makefile.am|  30 --
 tests/meson.build|  21 ++
 tests/test_osinfo_db_path.py |   4 +-
 tools/Makefile.am|  53 
 tools/meson.build|  97 +++
 tools/osinfo-db-export.c |   2 -
 tools/osinfo-db-import.c |   2 -
 tools/osinfo-db-path.c   |   2 -
 tools/osinfo-db-util.c   |   2 -
 tools/osinfo-db-util.h   |   6 +-
 tools/osinfo-db-validate.c   |   2 -
 29 files changed, 665 insertions(+), 1175 deletions(-)
 delete mode 100644 Makefile.am
 rename GNUmakefile => build-aux/GNUmakefile (85%)
 rename cfg.mk => build-aux/cfg.mk (94%)
 create mode 100755 build-aux/dist.sh
 rename maint.mk => build-aux/maint.mk (83%)
 delete mode 100755 build-aux/mktempd
 create mode 100755 build-aux/syntax-check
 delete mode 100644 configure.ac
 delete mode 100644 docs/Makefile.am
 delete mode 100644 m4/libosinfo-compile-warnings.m4
 delete mode 100644 m4/manywarnings.m4
 delete mode 100644 m4/warnings.m4
 create mode 100644 meson.build
 delete mode 100644 po/Makevars
 create mode 100644 po/meson.build
 delete mode 100644 tests/Makefile.am
 create mode 100644 tests/meson.build
 

[Libosinfo] [osinfo-db-tools PATCH v2 01/16] tests: Unset OSINFO_LOCAL_DIR envvar

2019-07-09 Thread Fabiano Fidêncio
Commit 1df4c0dbede tried to unset all OSINFO_*_DIR envvars but instead
of unsetting OSINFO_LOCAL_DIR it unset OSINFO_DATA_DIR, which doesn't
exist.

Signed-off-by: Fabiano Fidêncio 
---
 tests/test_osinfo_db_path.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_osinfo_db_path.py b/tests/test_osinfo_db_path.py
index b0b6aff..c862b7a 100755
--- a/tests/test_osinfo_db_path.py
+++ b/tests/test_osinfo_db_path.py
@@ -30,8 +30,8 @@ def test_osinfo_db_path_local():
 """
 Test osinfo-db-path --local
 """
-if "OSINFO_DATA_DIR" in os.environ:
-del os.environ["OSINFO_DATA_DIR"]
+if "OSINFO_LOCAL_DIR" in os.environ:
+del os.environ["OSINFO_LOCAL_DIR"]
 cmd = [util.Tools.db_path, util.ToolsArgs.LOCAL]
 output = util.get_output(cmd)
 expected_output = os.path.join(SYSCONFDIR, "osinfo\n")
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 03/16] cfg.mk: Remove exclude_file_name_regexp--sc_preprocessor_indentation

2019-07-09 Thread Fabiano Fidêncio
Let's run the check in all files.

Signed-off-by: Fabiano Fidêncio 
---
 cfg.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 570bbb2..5490603 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -101,8 +101,6 @@ sc_bracket_spacing_check:
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
 
-exclude_file_name_regexp--sc_preprocessor_indentation = ^*/*.[ch]
-
 exclude_file_name_regexp--sc_prohibit_strcmp = ^*/*.[ch]
 
 exclude_file_name_regexp--sc_bindtextdomain = ^tools/.*.c|test/.*.c
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH v2 15/16] meson: Add ninja syntax-check

2019-07-09 Thread Fabiano Fidêncio
Let's take advantage of that we can run `make syntax-check` without the
need of having a Makefile around and add a `ninja syntax-check` target
that ends up calling `make syntax-check`.

Signed-off-by: Fabiano Fidêncio 
---
 build-aux/syntax-check | 5 +
 meson.build| 3 +++
 2 files changed, 8 insertions(+)
 create mode 100755 build-aux/syntax-check

diff --git a/build-aux/syntax-check b/build-aux/syntax-check
new file mode 100755
index 000..65d6433
--- /dev/null
+++ b/build-aux/syntax-check
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd $MESON_SOURCE_ROOT/build-aux
+
+make syntax-check
diff --git a/meson.build b/meson.build
index 97ad60c..e1cce62 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,9 @@ foreach spec: specs
 )
 endforeach
 
+# ninja syntax-check target
+run_target('syntax-check', command: 'build-aux/syntax-check')
+
 # ninja dist helper
 meson.add_dist_script('build-aux/dist.sh', meson.source_root(), 
meson.build_root())
 
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [libosinfo PATCH v2 1/2] tools, install-script: Add --config-file (-f) option

2019-07-09 Thread Fabiano Fidêncio
Let's add a new option so users can set their config from a file,
instead of directly passing the values via command-line.

Signed-off-by: Fabiano Fidêncio 
---
 tools/osinfo-install-script.c | 103 +-
 1 file changed, 102 insertions(+), 1 deletion(-)

diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index 15af48d..a525645 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -37,6 +37,34 @@ static gboolean list_profile = FALSE;
 static gboolean list_inj_method = FALSE;
 static gboolean quiet = FALSE;
 
+static const gchar *configs[] = {
+OSINFO_INSTALL_CONFIG_PROP_HARDWARE_ARCH,
+OSINFO_INSTALL_CONFIG_PROP_L10N_TIMEZONE,
+OSINFO_INSTALL_CONFIG_PROP_L10N_LANGUAGE,
+OSINFO_INSTALL_CONFIG_PROP_L10N_KEYBOARD,
+OSINFO_INSTALL_CONFIG_PROP_ADMIN_PASSWORD,
+OSINFO_INSTALL_CONFIG_PROP_USER_PASSWORD,
+OSINFO_INSTALL_CONFIG_PROP_USER_LOGIN,
+OSINFO_INSTALL_CONFIG_PROP_USER_REALNAME,
+OSINFO_INSTALL_CONFIG_PROP_USER_AUTOLOGIN,
+OSINFO_INSTALL_CONFIG_PROP_USER_ADMIN,
+OSINFO_INSTALL_CONFIG_PROP_REG_LOGIN,
+OSINFO_INSTALL_CONFIG_PROP_REG_PASSWORD,
+OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY,
+OSINFO_INSTALL_CONFIG_PROP_HOSTNAME,
+OSINFO_INSTALL_CONFIG_PROP_TARGET_DISK,
+OSINFO_INSTALL_CONFIG_PROP_SCRIPT_DISK,
+OSINFO_INSTALL_CONFIG_PROP_AVATAR_LOCATION,
+OSINFO_INSTALL_CONFIG_PROP_AVATAR_DISK,
+OSINFO_INSTALL_CONFIG_PROP_PRE_INSTALL_DRIVERS_DISK,
+OSINFO_INSTALL_CONFIG_PROP_PRE_INSTALL_DRIVERS_LOCATION,
+OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_DISK,
+OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_LOCATION,
+OSINFO_INSTALL_CONFIG_PROP_DRIVER_SIGNING,
+OSINFO_INSTALL_CONFIG_PROP_INSTALLATION_URL,
+NULL
+};
+
 static OsinfoInstallConfig *config;
 
 static gboolean handle_config(const gchar *option_name G_GNUC_UNUSED,
@@ -65,6 +93,47 @@ static gboolean handle_config(const gchar *option_name 
G_GNUC_UNUSED,
 }
 
 
+static gboolean handle_config_file(const gchar *option_name G_GNUC_UNUSED,
+   const gchar *value,
+   gpointer data G_GNUC_UNUSED,
+   GError **error)
+{
+GKeyFile *key_file = NULL;
+gchar *val = NULL;
+gsize i;
+gboolean ret = FALSE;
+
+key_file = g_key_file_new();
+if (!g_key_file_load_from_file(key_file, value, G_KEY_FILE_NONE, error))
+goto error;
+
+for (i = 0; configs[i] != NULL; i++) {
+val = g_key_file_get_string(key_file, "install-script", configs[i], 
error);
+if (val == NULL) {
+if (g_error_matches(*error, G_KEY_FILE_ERROR,
+G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
+g_clear_error(error);
+continue;
+}
+
+goto error;
+}
+
+osinfo_entity_set_param(OSINFO_ENTITY(config),
+configs[i],
+val);
+g_free(val);
+}
+
+ret = TRUE;
+
+error:
+g_key_file_unref(key_file);
+
+return ret;
+}
+
+
 static GOptionEntry entries[] =
 {
 { "profile", 'p', 0, G_OPTION_ARG_STRING, (void*),
@@ -78,6 +147,9 @@ static GOptionEntry entries[] =
 { "config", 'c', 0, G_OPTION_ARG_CALLBACK,
   handle_config,
   N_("Set configuration parameter"), "key=value" },
+{ "config-file", 'f', 0, G_OPTION_ARG_CALLBACK,
+  handle_config_file,
+  N_("Set configuration parameters"), "file:///path/to/config/file" },
 { "list-config", '\0', 0, G_OPTION_ARG_NONE, (void*)_config,
   N_("List configuration parameters"), NULL },
 { "list-profiles", '\0', 0, G_OPTION_ARG_NONE, (void*)_profile,
@@ -448,6 +520,15 @@ script. Defaults to C, but can also be C.
 
 Set the configuration parameter C to C.
 
+=item B<--config-file=config-file>
+
+Set the configurations parameters according to the config-file passed.
+
+Note that use of --config-file is strongly recommended if the user or
+admin passwords need to be set. Providing passwords directly using
+B<--config=> is insecure as the password is visible to all processes
+and users on the same host.
+
 =back
 
 =head1 CONFIGURATION KEYS
@@ -510,9 +591,29 @@ The software registration user password
 
 =back
 
+=head1 CONFIGURATION FILE FORMAT
+
+The configuration file must consist in a file which contains a
+`install-script` group and, under this group, C=C
+pairs, as shown below:
+
+[install-script]
+l10n-timezone=GMT
+l10n-keyboard=uk
+l10n-language=en_GB
+admin-password=123456
+user-login=berrange
+user-password=123456
+user-realname="Daniel P Berrange"
+
 =head1 EXAMPLE USAGE
 
-The following usage generates a Fedora 16 kickstart script
+The following usages generates a Fedora 16 kickstart script
+
+  # osinfo-install-script \
+ --profile jeos \
+ --config-file /path/to/the/config/file \
+ fedora16
 
   # 

[Libosinfo] [libosinfo PATCH v2 2/2] tools, install-script: Deprecate --config

2019-07-09 Thread Fabiano Fidêncio
Let's deprecate --config and warn out whenever a user or admin password
is passed to osinfo-install-script.

Signed-off-by: Fabiano Fidêncio 
---
 tools/osinfo-install-script.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index a525645..f756ba3 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -85,6 +85,12 @@ static gboolean handle_config(const gchar *option_name 
G_GNUC_UNUSED,
 val++;
 key = g_strndup(value, len);
 
+if (g_str_equal(key, OSINFO_INSTALL_CONFIG_PROP_USER_PASSWORD) ||
+g_str_equal(key, OSINFO_INSTALL_CONFIG_PROP_ADMIN_PASSWORD)) {
+g_warning("When setting user or admin password, use --config-file "
+  "instead.\n");
+}
+
 osinfo_entity_set_param(OSINFO_ENTITY(config),
 key,
 val);
@@ -519,6 +525,7 @@ script. Defaults to C, but can also be C.
 =item B<--config=key=value>
 
 Set the configuration parameter C to C.
+This option has been deprecated in favour of B<--config-file>.
 
 =item B<--config-file=config-file>
 
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [libosinfo PATCH v2 0/2] Do not expose user & admin password in the command line

2019-07-09 Thread Fabiano Fidêncio
Those two patches introduce a fix for a low impact CVE where both user
& admin password would be passed to the osinfo-install-script via
command line.

In order to avoid doing so, let's introduce a --config-file and warn out
whenever a password is passed via --config.

Changes since v1:
https://www.redhat.com/archives/libosinfo/2019-July/msg00026.html
- Added a note that --config-file is strongly recommended if the user or
  admin passwords need to be set;
- Added a note in the manpage that --config is deprecated and
  --config-file should be used instead;
- Changed the error to warning when --config is used to set user or admin
  passwords;

Changes not done after v1 review:
- Add a new API to OsinfoInstallConfig:
  Adding a new API would force us to, instead of easily backporting the
  change, force distros to use a new release of libosinfo;
- Fix Daniel's name:
  Better be consistent all over the place. :-)
  (Jokes apart, I can just fix this before pushing)

Fabiano Fidêncio (2):
  tools,install-script: Add --config-file (-f) option
  tools,install-script: Deprecate --config

 tools/osinfo-install-script.c | 110 +-
 1 file changed, 109 insertions(+), 1 deletion(-)

-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db-tools PATCH] tests: Unset OSINFO_LOCAL_DIR envvar

2019-07-09 Thread Fabiano Fidêncio
Commit 1df4c0dbede tried to unset all OSINFO_*_DIR envvars but instead
of unsetting OSINFO_LOCAL_DIR it unset OSINFO_DATA_DIR, which doesn't
exist.

Signed-off-by: Fabiano Fidêncio 
---
 tests/test_osinfo_db_path.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_osinfo_db_path.py b/tests/test_osinfo_db_path.py
index b0b6aff..c862b7a 100755
--- a/tests/test_osinfo_db_path.py
+++ b/tests/test_osinfo_db_path.py
@@ -30,8 +30,8 @@ def test_osinfo_db_path_local():
 """
 Test osinfo-db-path --local
 """
-if "OSINFO_DATA_DIR" in os.environ:
-del os.environ["OSINFO_DATA_DIR"]
+if "OSINFO_LOCAL_DIR" in os.environ:
+del os.environ["OSINFO_LOCAL_DIR"]
 cmd = [util.Tools.db_path, util.ToolsArgs.LOCAL]
 output = util.get_output(cmd)
 expected_output = os.path.join(SYSCONFDIR, "osinfo\n")
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db PATCH 1/2] debian9: Update dead links

2019-07-09 Thread Fabiano Fidêncio
As Debian 10 has been released, Debian 9 ISOs have been moved to the
archive.

Signed-off-by: Fabiano Fidêncio 
---
 data/os/debian.org/debian-9.xml.in | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/data/os/debian.org/debian-9.xml.in 
b/data/os/debian.org/debian-9.xml.in
index 859c979..3eee3ce 100644
--- a/data/os/debian.org/debian-9.xml.in
+++ b/data/os/debian.org/debian-9.xml.in
@@ -53,7 +53,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/i386/iso-cd/debian-9.9.0-i386-netinst.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/i386/iso-cd/debian-9.9.0-i386-netinst.iso
   
 Debian 9.(\d)+.(\d)+ i386 n
   
@@ -62,7 +62,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/amd64/iso-cd/debian-9.9.0-amd64-netinst.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/iso-cd/debian-9.9.0-amd64-netinst.iso
   
 Debian 9.(\d)+.(\d)+ amd64 n
   
@@ -71,7 +71,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/arm64/iso-cd/debian-9.9.0-arm64-netinst.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/arm64/iso-cd/debian-9.9.0-arm64-netinst.iso
   
 Debian 9.(\d)+.(\d)+ arm64 n
   
@@ -80,7 +80,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/armhf/iso-cd/debian-9.9.0-armhf-netinst.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/armhf/iso-cd/debian-9.9.0-armhf-netinst.iso
   
 Debian 9.(\d)+.(\d)+ armhf n
   
@@ -89,7 +89,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/ppc64el/iso-cd/debian-9.9.0-ppc64el-netinst.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/ppc64el/iso-cd/debian-9.9.0-ppc64el-netinst.iso
   
 Debian 9.(\d)+.(\d)+ ppc64el n
   
@@ -98,7 +98,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/s390x/iso-cd/debian-9.9.0-s390x-netinst.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/s390x/iso-cd/debian-9.9.0-s390x-netinst.iso
   
 Debian 9.(\d)+.(\d)+ s390x n
   
@@ -109,7 +109,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/i386/iso-dvd/debian-9.9.0-i386-DVD-1.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/i386/iso-dvd/debian-9.9.0-i386-DVD-1.iso
   
 Debian 9.(\d)+.(\d)+ i386 (\d)+
   
@@ -118,7 +118,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/amd64/iso-dvd/debian-9.9.0-amd64-DVD-1.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/iso-dvd/debian-9.9.0-amd64-DVD-1.iso
   
 Debian 9.(\d)+.(\d)+ amd64 (\d)+
   
@@ -127,7 +127,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/arm64/iso-dvd/debian-9.9.0-arm64-DVD-1.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/arm64/iso-dvd/debian-9.9.0-arm64-DVD-1.iso
   
 Debian 9.(\d)+.(\d)+ arm64 (\d)+
   
@@ -136,7 +136,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/armhf/iso-dvd/debian-9.9.0-armhf-DVD-1.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/armhf/iso-dvd/debian-9.9.0-armhf-DVD-1.iso
   
 Debian 9.(\d)+.(\d)+ armhf (\d)+
   
@@ -145,7 +145,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/ppc64el/iso-dvd/debian-9.9.0-ppc64el-DVD-1.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/ppc64el/iso-dvd/debian-9.9.0-ppc64el-DVD-1.iso
   
 Debian 9.(\d)+.(\d)+ ppc64el (\d)+
   
@@ -154,7 +154,7 @@
 
 
   
-  
http://cdimage.debian.org/cdimage/release/9.9.0/s390x/iso-dvd/debian-9.9.0-s390x-DVD-1.iso
+  
http://cdimage.debian.org/mirror/cdimage/archive/9.9.0/s390x/iso-dvd/debian-9.9.0-s390x-DVD-1.iso
   
 Debian 9.(\d)+.(\d)+ s390x (\d)+
   
-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db PATCH 0/2] debian: Add Debian 10 info & update Debian 9 URLs

2019-07-09 Thread Fabiano Fidêncio
In this series let's:
- Update the deadlinks from Debian 9 as, due to the Debian 10 release,
  its ISOs have been moved to the archive;
- Add Debian 10 info;
  * Unattended installation on both jeos/desktop have been tested using
Debian tree;

Fabiano Fidêncio (2):
  debian9: Update dead links
  debian10: Add info

 data/os/debian.org/debian-10.xml.in   | 203 ++
 data/os/debian.org/debian-9.xml.in|  24 +--
 .../debian-10.0.0-amd64-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-amd64-netinst.iso.txt   |  29 +++
 .../debian-10.0.0-arm64-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-arm64-netinst.iso.txt   |  29 +++
 .../debian-10.0.0-armhf-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-armhf-netinst.iso.txt   |  29 +++
 .../debian10/debian-10.0.0-i386-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-i386-netinst.iso.txt|  29 +++
 .../debian-10.0.0-ppc64el-DVD-1.iso.txt   |  16 ++
 .../debian-10.0.0-ppc64el-netinst.iso.txt |  16 ++
 .../debian-10.0.0-s390x-DVD-1.iso.txt |  16 ++
 .../debian-10.0.0-s390x-netinst.iso.txt   |  16 ++
 14 files changed, 511 insertions(+), 12 deletions(-)
 create mode 100644 data/os/debian.org/debian-10.xml.in
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-amd64-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-amd64-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-arm64-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-arm64-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-armhf-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-armhf-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-i386-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-i386-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-ppc64el-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-ppc64el-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-s390x-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-s390x-netinst.iso.txt

-- 
2.21.0

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


[Libosinfo] [osinfo-db PATCH 2/2] debian10: Add info

2019-07-09 Thread Fabiano Fidêncio
Debian 10 has been released on July 6th, 2019.

Signed-off-by: Fabiano Fidêncio 
---
 data/os/debian.org/debian-10.xml.in   | 203 ++
 .../debian-10.0.0-amd64-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-amd64-netinst.iso.txt   |  29 +++
 .../debian-10.0.0-arm64-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-arm64-netinst.iso.txt   |  29 +++
 .../debian-10.0.0-armhf-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-armhf-netinst.iso.txt   |  29 +++
 .../debian10/debian-10.0.0-i386-DVD-1.iso.txt |  29 +++
 .../debian-10.0.0-i386-netinst.iso.txt|  29 +++
 .../debian-10.0.0-ppc64el-DVD-1.iso.txt   |  16 ++
 .../debian-10.0.0-ppc64el-netinst.iso.txt |  16 ++
 .../debian-10.0.0-s390x-DVD-1.iso.txt |  16 ++
 .../debian-10.0.0-s390x-netinst.iso.txt   |  16 ++
 13 files changed, 499 insertions(+)
 create mode 100644 data/os/debian.org/debian-10.xml.in
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-amd64-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-amd64-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-arm64-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-arm64-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-armhf-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-armhf-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-i386-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-i386-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-ppc64el-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-ppc64el-netinst.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-s390x-DVD-1.iso.txt
 create mode 100644 
tests/isodata/debian/debian10/debian-10.0.0-s390x-netinst.iso.txt

diff --git a/data/os/debian.org/debian-10.xml.in 
b/data/os/debian.org/debian-10.xml.in
new file mode 100644
index 000..47537e3
--- /dev/null
+++ b/data/os/debian.org/debian-10.xml.in
@@ -0,0 +1,203 @@
+
+
+  http://debian.org/debian/10;>
+debian10
+debianbuster
+<_name>Debian 10
+10
+<_vendor>Debian Project
+linux
+debian
+buster
+http://debian.org/debian/9"/>
+http://debian.org/debian/9"/>
+
+2018-07-06
+
+
+  
+10
+1
+1073741824
+10737418240
+  
+  
+10
+1073741824
+21474836480
+  
+
+
+
+  <_name>Debian 10
+
+
+  <_name>Debian 10
+
+
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/i386/iso-cd/debian-10.0.0-i386-netinst.iso
+  
+Debian 10.(\d)+.(\d)+ i386 n
+  
+  install.386/vmlinuz
+  install.386/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/amd64/iso-cd/debian-10.0.0-amd64-netinst.iso
+  
+Debian 10.(\d)+.(\d)+ amd64 n
+  
+  install.amd/vmlinuz
+  install.amd/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/arm64/iso-cd/debian-10.0.0-arm64-netinst.iso
+  
+Debian 10.(\d)+.(\d)+ arm64 n
+  
+  install.a64/vmlinuz
+  install.a64/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/armhf/iso-cd/debian-10.0.0-armhf-netinst.iso
+  
+Debian 10.(\d)+.(\d)+ armhf n
+  
+  install.armhf/vmlinuz
+  install.armhf/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/ppc64el/iso-cd/debian-10.0.0-ppc64el-netinst.iso
+  
+Debian 10.(\d)+.(\d)+ ppc64el n
+  
+  install/vmlinux
+  install/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/s390x/iso-cd/debian-10.0.0-s390x-netinst.iso
+  
+Debian 10.(\d)+.(\d)+ s390x n
+  
+  boot/linux_vm
+  boot/root.bin
+
+
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/i386/iso-dvd/debian-10.0.0-i386-DVD-1.iso
+  
+Debian 10.(\d)+.(\d)+ i386 (\d)+
+  
+  install.386/vmlinuz
+  install.386/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-1.iso
+  
+Debian 10.(\d)+.(\d)+ amd64 (\d)+
+  
+  install.amd/vmlinuz
+  install.amd/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/arm64/iso-dvd/debian-10.0.0-arm64-DVD-1.iso
+  
+Debian 10.(\d)+.(\d)+ arm64 (\d)+
+  
+  install.a64/vmlinuz
+  install.a64/initrd.gz
+
+
+  
+  
http://cdimage.debian.org/cdimage/release/10.0.0/armhf/iso-dvd/debian-10.0.0-armhf-DVD-1.iso
+  
+Debian 10.(\d)+.(\d)+ armhf (\d)+
+  
+  install.armhf/vmlinuz
+