diff -Nru libdebian-installer-0.102ubuntu3/configure.ac libdebian-installer-0.110ubuntu1/configure.ac --- libdebian-installer-0.102ubuntu3/configure.ac 2015-12-24 00:24:26.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/configure.ac 2017-05-18 14:46:26.000000000 +0000 @@ -7,13 +7,18 @@ AC_CHECK_FUNCS(memrchr) +AC_ARG_ENABLE([check],AS_HELP_STRING([--disable-check],[Disable running the test suite])) + AC_CHECK_PROGS(DOXYGEN, doxygen, true) -PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) +AS_IF([test "x$enable_check" != xno],[ + PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) +]) +AM_CONDITIONAL([ENABLE_CHECK],[test "x$enable_check" != xno]) LIBRARY_VERSION_MAJOR=4 LIBRARY_VERSION_MINOR=0 -LIBRARY_VERSION_REVISION=7 +LIBRARY_VERSION_REVISION=8 LIBRARY_VERSION="$LIBRARY_VERSION_MAJOR.$LIBRARY_VERSION_MINOR.$LIBRARY_VERSION_REVISION" LIBRARY_VERSION_LIBTOOL="$LIBRARY_VERSION_MAJOR:$LIBRARY_VERSION_MINOR:$LIBRARY_VERSION_REVISION" diff -Nru libdebian-installer-0.102ubuntu3/debian/changelog libdebian-installer-0.110ubuntu1/debian/changelog --- libdebian-installer-0.102ubuntu3/debian/changelog 2016-06-07 17:25:00.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/debian/changelog 2017-05-18 20:16:36.000000000 +0000 @@ -1,3 +1,85 @@ +libdebian-installer (0.110ubuntu1) artful; urgency=low + + * Merge from Debian unstable. (LP: #1688246) Remaining changes: + - Add more OMAP4 Panda support. + - Add OMAP4 Blaze support. + - Add Freescale "P4080 DS" and "QEMU e500" support. + - Point to Bazaar packaging repository on Launchpad + + -- Balint Reczey Thu, 18 May 2017 16:16:36 -0400 + +libdebian-installer (0.110) unstable; urgency=medium + + [ Martin Michlmayr ] + * subarch-arm-linux.c: Add NETGEAR ReadyNAS Duo v2. Closes: #855965 + + -- Christian Perrier Wed, 22 Mar 2017 11:59:18 +0100 + +libdebian-installer (0.109) unstable; urgency=medium + + [ Samuel Thibault ] + * Fix build with gcc-7. Closes: #853489 + + [ Steven Chamberlain ] + * Parse SHA256 fields in Packages files. (closes: #856210) + * Parse SHA256 fields in Release files. + + [ Bastian Blank ] + * Update versions for changed symbols. + - Add Breaks on cdebootstrap. + + -- Bastian Blank Sun, 05 Mar 2017 11:02:27 +0000 + +libdebian-installer (0.108) unstable; urgency=medium + + [ Helmut Grohne ] + * Make Build-Depends: check optional via profile. + Closes: #787044. + + -- Christian Perrier Tue, 30 Aug 2016 06:45:17 +0200 + +libdebian-installer (0.107) unstable; urgency=medium + + [ Steve McIntyre ] + * armel/armhf: Fix missing efi include FTBFS + + -- Christian Perrier Mon, 20 Jun 2016 08:21:12 +0200 + +libdebian-installer (0.106) unstable; urgency=medium + + [ Steve McIntyre ] + * armhf: Add EFI detection. + + [ Mathieu Trudel-Lapierre ] + * validate the presence of efivars *or* vars under /sys/firmware/efi to + decide whether we should show the system as running in EFI mode; + either of these paths is required for efibootmgr to set a BootEntry at + the end of installation. Closes: #826665 + + -- Christian Perrier Sun, 12 Jun 2016 09:06:30 +0200 + +libdebian-installer (0.105) unstable; urgency=medium + + [ Aurelien Jarno ] + * Add mips64el support. + + -- Aurelien Jarno Sun, 22 May 2016 15:21:37 +0200 + +libdebian-installer (0.104) unstable; urgency=medium + + [ Roger Shimizu ] + * armel: Add various orion5x/kirkwood based Buffalo Linkstation devices + supported by device-tree + + -- Christian Perrier Wed, 17 Feb 2016 07:05:06 +0100 + +libdebian-installer (0.103) unstable; urgency=medium + + [ Colin Watson ] + * Use HTTPS for Vcs-* URLs, and link to cgit rather than gitweb. + + -- Christian Perrier Sat, 13 Feb 2016 15:17:19 +0100 + libdebian-installer (0.102ubuntu3) yakkety; urgency=medium * src/system/efi.c: fix my blunder; we still need to have ret declared as an diff -Nru libdebian-installer-0.102ubuntu3/debian/control libdebian-installer-0.110ubuntu1/debian/control --- libdebian-installer-0.102ubuntu3/debian/control 2016-06-07 15:59:25.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/debian/control 2017-05-18 14:46:26.000000000 +0000 @@ -4,10 +4,10 @@ Maintainer: Ubuntu Installer Team XSBC-Original-Maintainer: Debian Install System Team Uploaders: Bastian Blank , Colin Watson , Christian Perrier , Steve McIntyre <93sam@debian.org> -Build-Depends: dpkg-dev (>= 1.13.5), debhelper (>= 9), dh-autoreconf, doxygen, pkg-config, check +Build-Depends: dpkg-dev (>= 1.13.5), debhelper (>= 9), dh-autoreconf, doxygen, pkg-config, check Standards-Version: 3.9.6 -XS-Debian-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=d-i/libdebian-installer.git -XS-Debian-Vcs-Git: git://anonscm.debian.org/d-i/libdebian-installer.git +XS-Vcs-Browser: https://anonscm.debian.org/cgit/d-i/libdebian-installer.git +XS-Vcs-Git: https://anonscm.debian.org/git/d-i/libdebian-installer.git Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/libdebian-installer/ubuntu Package: libdebian-installer4 @@ -15,6 +15,7 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: cdebootstrap (<< 0.7.6+) Description: Library of common debian-installer functions This library is used by debian-installer to perform common functions such as logging messages and executing commands. If you aren't @@ -50,6 +51,7 @@ Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, libdebian-installer4 (= ${binary:Version}) +Breaks: cdebootstrap (<< 0.7.6+) Description: Library of some extra debian-installer functions This library is used by debian-installer to perform common functions such as logging messages and executing commands. If you aren't diff -Nru libdebian-installer-0.102ubuntu3/debian/rules libdebian-installer-0.110ubuntu1/debian/rules --- libdebian-installer-0.102ubuntu3/debian/rules 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/debian/rules 2017-05-18 14:46:26.000000000 +0000 @@ -16,6 +16,11 @@ export CFLAGS +ifneq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) +override_dh_auto_configure: + dh_auto_configure -- --disable-check +endif + override_dh_auto_build: dh_auto_build $(MAKE) -C build/doc doc diff -Nru libdebian-installer-0.102ubuntu3/include/debian-installer/package.h libdebian-installer-0.110ubuntu1/include/debian-installer/package.h --- libdebian-installer-0.102ubuntu3/include/debian-installer/package.h 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/include/debian-installer/package.h 2017-05-18 14:46:26.000000000 +0000 @@ -112,7 +112,7 @@ di_slist depends; /**< Any different dependency types */ char *filename; /**< Filename field */ size_t size; /**< Size field */ - char *md5sum; /**< MD5Sum field */ + char *sha256; /**< SHA256 field */ char *short_description; /**< Description field, first part*/ char *description; /**< Description field, second part */ unsigned int resolver; /**< @internal */ diff -Nru libdebian-installer-0.102ubuntu3/include/debian-installer/package_internal.h libdebian-installer-0.110ubuntu1/include/debian-installer/package_internal.h --- libdebian-installer-0.102ubuntu3/include/debian-installer/package_internal.h 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/include/debian-installer/package_internal.h 2017-05-18 14:46:26.000000000 +0000 @@ -52,7 +52,7 @@ internal_di_package_parser_field_enhances, internal_di_package_parser_field_filename, internal_di_package_parser_field_size, - internal_di_package_parser_field_md5sum, + internal_di_package_parser_field_sha256, internal_di_package_parser_field_description; /** diff -Nru libdebian-installer-0.102ubuntu3/include/debian-installer/release.h libdebian-installer-0.110ubuntu1/include/debian-installer/release.h --- libdebian-installer-0.102ubuntu3/include/debian-installer/release.h 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/include/debian-installer/release.h 2017-05-18 14:46:26.000000000 +0000 @@ -40,7 +40,7 @@ char *origin; /**< Origin field */ char *suite; /**< Suite field */ char *codename; /**< Codename field */ - di_hash_table *md5sum; /**< checksum fields, includes di_release_file */ + di_hash_table *sha256; /**< checksum fields, includes di_release_file */ di_mem_chunk *release_file_mem_chunk; /**< @internal */ }; @@ -55,7 +55,7 @@ di_rstring key; /**< @internal */ }; unsigned int size; /**< size */ - char *sum[2]; /**< checksums, currently md5 and sha1 */ + char *sum[2]; /**< checksums, currently md5 and sha256 */ }; di_release *di_release_alloc (void); diff -Nru libdebian-installer-0.102ubuntu3/Makefile.am libdebian-installer-0.110ubuntu1/Makefile.am --- libdebian-installer-0.102ubuntu3/Makefile.am 2015-12-24 00:24:26.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/Makefile.am 2017-05-18 14:46:26.000000000 +0000 @@ -1,6 +1,9 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = doc include src test +SUBDIRS = doc include src +if ENABLE_CHECK +SUBDIRS += test +endif pkgconfigdir = ${libdir}/pkgconfig pkgconfig_DATA = \ diff -Nru libdebian-installer-0.102ubuntu3/src/exec.c libdebian-installer-0.110ubuntu1/src/exec.c --- libdebian-installer-0.102ubuntu3/src/exec.c 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/exec.c 2017-05-18 14:46:26.000000000 +0000 @@ -159,6 +159,7 @@ break; case 3: files[1].handler = stderr_handler; + /* Fall through */ case 1: files[0].handler = stdout_handler; break; diff -Nru libdebian-installer-0.102ubuntu3/src/libdebian-installer-extra.ver libdebian-installer-0.110ubuntu1/src/libdebian-installer-extra.ver --- libdebian-installer-0.102ubuntu3/src/libdebian-installer-extra.ver 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/libdebian-installer-extra.ver 2017-05-18 14:46:26.000000000 +0000 @@ -9,13 +9,17 @@ di_list_prepend_chunk; di_release_alloc; di_release_free; - di_release_parser_fieldinfo; - di_release_parser_read_file; - di_release_read_file; local: *; }; +LIBDI_4.8 { + global: + di_release_parser_fieldinfo; + di_release_parser_read_file; + di_release_read_file; +} LIBDI_4.1; + #LIBDI_PRIVATE { # global: # internal_*; diff -Nru libdebian-installer-0.102ubuntu3/src/libdebian-installer.ver libdebian-installer-0.110ubuntu1/src/libdebian-installer.ver --- libdebian-installer-0.102ubuntu3/src/libdebian-installer.ver 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/libdebian-installer.ver 2017-05-18 14:46:26.000000000 +0000 @@ -26,7 +26,6 @@ di_mem_chunk_new; di_mem_chunk_size; di_package_destroy; - di_package_parser_fieldinfo; di_package_parser_info; di_package_parser_read_dependency; di_package_parser_read_description; @@ -37,7 +36,6 @@ di_package_parser_write_description; di_package_parser_write_priority; di_package_parser_write_status; - di_package_special_read_file; di_package_version_compare; di_package_version_free; di_package_version_parse; @@ -48,18 +46,10 @@ di_packages_free; di_packages_get_package; di_packages_get_package_new; - di_packages_minimal_parser_fieldinfo; - di_packages_minimal_parser_info; - di_packages_parser_fieldinfo; - di_packages_parser_info; di_packages_parser_read_name; di_packages_resolve_dependencies; di_packages_resolve_dependencies_array; di_packages_resolve_dependencies_mark; - di_packages_special_read_file; - di_packages_special_write_file; - di_packages_status_parser_fieldinfo; - di_packages_status_parser_info; di_parser_info_add; di_parser_info_alloc; di_parser_info_free; @@ -89,12 +79,8 @@ di_system_dpkg_package_control_file_exec; di_system_init; di_system_package_destroy; - di_system_package_parser_fieldinfo; - di_system_package_parser_info; di_system_packages_alloc; di_system_packages_allocator_alloc; - di_system_packages_parser_info; - di_system_packages_status_parser_info; di_system_prebaseconfig_append; di_vlog; local: @@ -160,6 +146,24 @@ di_system_subarch_analyze_guess; } LIBDI_4.6; +LIBDI_4.8 { + global: + di_package_parser_fieldinfo; + di_package_special_read_file; + di_packages_minimal_parser_fieldinfo; + di_packages_minimal_parser_info; + di_packages_parser_fieldinfo; + di_packages_parser_info; + di_packages_special_read_file; + di_packages_special_write_file; + di_packages_status_parser_fieldinfo; + di_packages_status_parser_info; + di_system_package_parser_fieldinfo; + di_system_package_parser_info; + di_system_packages_parser_info; + di_system_packages_status_parser_info; +} LIBDI_4.7; + #LIBDI_PRIVATE { # global: # internal_*; diff -Nru libdebian-installer-0.102ubuntu3/src/package.c libdebian-installer-0.110ubuntu1/src/package.c --- libdebian-installer-0.102ubuntu3/src/package.c 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/package.c 2017-05-18 14:46:26.000000000 +0000 @@ -38,7 +38,7 @@ di_free (package->architecture); di_free (package->version); di_free (package->filename); - di_free (package->md5sum); + di_free (package->sha256); di_free (package->short_description); di_free (package->description); diff -Nru libdebian-installer-0.102ubuntu3/src/package_parser.c libdebian-installer-0.110ubuntu1/src/package_parser.c --- libdebian-installer-0.102ubuntu3/src/package_parser.c 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/package_parser.c 2017-05-18 14:46:26.000000000 +0000 @@ -180,13 +180,13 @@ di_parser_write_int, offsetof (di_package, size) ), - internal_di_package_parser_field_md5sum = + internal_di_package_parser_field_sha256 = DI_PARSER_FIELDINFO ( - "MD5sum", + "SHA256", di_parser_read_string, di_parser_write_string, - offsetof (di_package, md5sum) + offsetof (di_package, sha256) ), internal_di_package_parser_field_description = DI_PARSER_FIELDINFO @@ -217,7 +217,7 @@ &internal_di_package_parser_field_enhances, &internal_di_package_parser_field_filename, &internal_di_package_parser_field_size, - &internal_di_package_parser_field_md5sum, + &internal_di_package_parser_field_sha256, &internal_di_package_parser_field_description, NULL }; diff -Nru libdebian-installer-0.102ubuntu3/src/packages_parser.c libdebian-installer-0.110ubuntu1/src/packages_parser.c --- libdebian-installer-0.102ubuntu3/src/packages_parser.c 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/packages_parser.c 2017-05-18 14:46:26.000000000 +0000 @@ -65,7 +65,7 @@ &internal_di_package_parser_field_enhances, &internal_di_package_parser_field_filename, &internal_di_package_parser_field_size, - &internal_di_package_parser_field_md5sum, + &internal_di_package_parser_field_sha256, &internal_di_package_parser_field_description, NULL }; @@ -109,7 +109,7 @@ &internal_di_package_parser_field_depends, &internal_di_package_parser_field_pre_depends, &internal_di_package_parser_field_filename, - &internal_di_package_parser_field_md5sum, + &internal_di_package_parser_field_sha256, &internal_di_package_parser_field_size, NULL }; diff -Nru libdebian-installer-0.102ubuntu3/src/release.c libdebian-installer-0.110ubuntu1/src/release.c --- libdebian-installer-0.102ubuntu3/src/release.c 2015-12-24 00:23:07.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/release.c 2017-05-18 14:46:26.000000000 +0000 @@ -69,10 +69,10 @@ NULL, 0 ), - internal_di_release_parser_field_sha1 = + internal_di_release_parser_field_sha256 = DI_PARSER_FIELDINFO ( - "SHA1", + "SHA256", di_release_parser_read_file, NULL, 1 @@ -87,7 +87,7 @@ &internal_di_release_parser_field_suite, &internal_di_release_parser_field_codename, &internal_di_release_parser_field_md5sum, - &internal_di_release_parser_field_sha1, + &internal_di_release_parser_field_sha256, NULL }; @@ -110,7 +110,7 @@ di_release *ret; ret = di_new0 (di_release, 1); - ret->md5sum = di_hash_table_new_full (di_rstring_hash, di_rstring_equal, NULL, internal_di_release_file_destroy_func); + ret->sha256 = di_hash_table_new_full (di_rstring_hash, di_rstring_equal, NULL, internal_di_release_file_destroy_func); ret->release_file_mem_chunk = di_mem_chunk_new (sizeof (di_release_file), 4096); return ret; @@ -124,7 +124,7 @@ di_free (release->origin); di_free (release->suite); di_free (release->codename); - di_hash_table_destroy (release->md5sum); + di_hash_table_destroy (release->sha256); di_mem_chunk_destroy (release->release_file_mem_chunk); di_free (release); } @@ -169,7 +169,7 @@ int ret; size_t buf_size; di_release *release = *data; - di_hash_table *table = release->md5sum; + di_hash_table *table = release->sha256; while (1) { diff -Nru libdebian-installer-0.102ubuntu3/src/system/Makefile.am libdebian-installer-0.110ubuntu1/src/system/Makefile.am --- libdebian-installer-0.102ubuntu3/src/system/Makefile.am 2015-12-24 00:24:26.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/system/Makefile.am 2017-05-18 14:46:26.000000000 +0000 @@ -25,6 +25,7 @@ subarch-m68k-linux.c \ subarch-mips-linux.c \ subarch-mipsel-linux.c \ + subarch-mips64el-linux.c \ subarch-powerpc-linux.c \ subarch-ppc64-linux.c \ subarch-ppc64el-linux.c \ diff -Nru libdebian-installer-0.102ubuntu3/src/system/subarch-armel-linux.c libdebian-installer-0.110ubuntu1/src/system/subarch-armel-linux.c --- libdebian-installer-0.102ubuntu3/src/system/subarch-armel-linux.c 2015-12-24 00:24:26.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/system/subarch-armel-linux.c 2017-05-18 14:46:26.000000000 +0000 @@ -6,6 +6,7 @@ #include #include +#include struct map { char *entry; @@ -64,6 +65,7 @@ { "LaCie 2Big Network v2", "kirkwood" }, { "LaCie 5Big Network v2", "kirkwood" }, { "Iomega Iconnect", "kirkwood" }, + { "NETGEAR ReadyNAS Duo v2", "kirkwood" }, { "Buffalo/Revogear Kurobox Pro", "orion5x" }, { "D-Link DNS-323", "orion5x" }, { "QNAP TS-109/TS-209", "orion5x" }, @@ -71,8 +73,17 @@ { "HP Media Vault mv2120", "orion5x" }, { "Buffalo Linkstation LiveV3 (LS-CHL)", "orion5x" }, { "Buffalo Linkstation LS-CHLv2", "kirkwood" }, /* aka: LS-CH1.0L */ + { "Buffalo Linkstation LS-QVL", "kirkwood" }, + { "Buffalo Linkstation LS-VL", "kirkwood" }, + { "Buffalo Linkstation LS-WSXL", "kirkwood" }, + { "Buffalo Linkstation LS-WTGL", "orion5x" }, + { "Buffalo Linkstation LS-WVL", "kirkwood" }, + { "Buffalo Linkstation LS-WVL/VL", "kirkwood" }, + { "Buffalo Linkstation LS-WXL", "kirkwood" }, + { "Buffalo Linkstation LS-WXL/WSXL", "kirkwood" }, { "Buffalo Linkstation LS-XHL", "kirkwood" }, { "Buffalo Linkstation Mini", "orion5x" }, + { "Buffalo Linkstation Mini (LS-WSGL)", "orion5x" }, { "Buffalo Linkstation Pro/Live", "orion5x" }, { "Marvell Orion-NAS Reference Design", "orion5x" }, { "Marvell Orion-2 Development Board", "orion5x" }, @@ -193,6 +204,10 @@ struct utsname sysinfo; size_t uname_release_len, i; + /* If we detect EFI firmware, bail out early here */ + if (di_system_is_efi()) + return "efi"; + /* Attempt to determine subarch based on kernel release version */ uname(&sysinfo); uname_release_len = strlen(sysinfo.release); diff -Nru libdebian-installer-0.102ubuntu3/src/system/subarch-armhf-linux.c libdebian-installer-0.110ubuntu1/src/system/subarch-armhf-linux.c --- libdebian-installer-0.102ubuntu3/src/system/subarch-armhf-linux.c 2015-12-24 00:24:26.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/system/subarch-armhf-linux.c 2017-05-18 14:46:26.000000000 +0000 @@ -6,6 +6,7 @@ #include #include +#include struct map { char *entry; @@ -64,6 +65,7 @@ { "LaCie 2Big Network v2", "kirkwood" }, { "LaCie 5Big Network v2", "kirkwood" }, { "Iomega Iconnect", "kirkwood" }, + { "NETGEAR ReadyNAS Duo v2", "kirkwood" }, { "Buffalo/Revogear Kurobox Pro", "orion5x" }, { "D-Link DNS-323", "orion5x" }, { "QNAP TS-109/TS-209", "orion5x" }, @@ -71,8 +73,17 @@ { "HP Media Vault mv2120", "orion5x" }, { "Buffalo Linkstation LiveV3 (LS-CHL)", "orion5x" }, { "Buffalo Linkstation LS-CHLv2", "kirkwood" }, /* aka: LS-CH1.0L */ + { "Buffalo Linkstation LS-QVL", "kirkwood" }, + { "Buffalo Linkstation LS-VL", "kirkwood" }, + { "Buffalo Linkstation LS-WSXL", "kirkwood" }, + { "Buffalo Linkstation LS-WTGL", "orion5x" }, + { "Buffalo Linkstation LS-WVL", "kirkwood" }, + { "Buffalo Linkstation LS-WVL/VL", "kirkwood" }, + { "Buffalo Linkstation LS-WXL", "kirkwood" }, + { "Buffalo Linkstation LS-WXL/WSXL", "kirkwood" }, { "Buffalo Linkstation LS-XHL", "kirkwood" }, { "Buffalo Linkstation Mini", "orion5x" }, + { "Buffalo Linkstation Mini (LS-WSGL)", "orion5x" }, { "Buffalo Linkstation Pro/Live", "orion5x" }, { "Marvell Orion-NAS Reference Design", "orion5x" }, { "Marvell Orion-2 Development Board", "orion5x" }, @@ -193,6 +204,10 @@ struct utsname sysinfo; size_t uname_release_len, i; + /* If we detect EFI firmware, bail out early here */ + if (di_system_is_efi()) + return "efi"; + /* Attempt to determine subarch based on kernel release version */ uname(&sysinfo); uname_release_len = strlen(sysinfo.release); diff -Nru libdebian-installer-0.102ubuntu3/src/system/subarch-arm-linux.c libdebian-installer-0.110ubuntu1/src/system/subarch-arm-linux.c --- libdebian-installer-0.102ubuntu3/src/system/subarch-arm-linux.c 2015-12-24 00:24:26.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/system/subarch-arm-linux.c 2017-05-18 14:46:26.000000000 +0000 @@ -6,6 +6,7 @@ #include #include +#include struct map { char *entry; @@ -64,6 +65,7 @@ { "LaCie 2Big Network v2", "kirkwood" }, { "LaCie 5Big Network v2", "kirkwood" }, { "Iomega Iconnect", "kirkwood" }, + { "NETGEAR ReadyNAS Duo v2", "kirkwood" }, { "Buffalo/Revogear Kurobox Pro", "orion5x" }, { "D-Link DNS-323", "orion5x" }, { "QNAP TS-109/TS-209", "orion5x" }, @@ -71,8 +73,17 @@ { "HP Media Vault mv2120", "orion5x" }, { "Buffalo Linkstation LiveV3 (LS-CHL)", "orion5x" }, { "Buffalo Linkstation LS-CHLv2", "kirkwood" }, /* aka: LS-CH1.0L */ + { "Buffalo Linkstation LS-QVL", "kirkwood" }, + { "Buffalo Linkstation LS-VL", "kirkwood" }, + { "Buffalo Linkstation LS-WSXL", "kirkwood" }, + { "Buffalo Linkstation LS-WTGL", "orion5x" }, + { "Buffalo Linkstation LS-WVL", "kirkwood" }, + { "Buffalo Linkstation LS-WVL/VL", "kirkwood" }, + { "Buffalo Linkstation LS-WXL", "kirkwood" }, + { "Buffalo Linkstation LS-WXL/WSXL", "kirkwood" }, { "Buffalo Linkstation LS-XHL", "kirkwood" }, { "Buffalo Linkstation Mini", "orion5x" }, + { "Buffalo Linkstation Mini (LS-WSGL)", "orion5x" }, { "Buffalo Linkstation Pro/Live", "orion5x" }, { "Marvell Orion-NAS Reference Design", "orion5x" }, { "Marvell Orion-2 Development Board", "orion5x" }, @@ -193,6 +204,10 @@ struct utsname sysinfo; size_t uname_release_len, i; + /* If we detect EFI firmware, bail out early here */ + if (di_system_is_efi()) + return "efi"; + /* Attempt to determine subarch based on kernel release version */ uname(&sysinfo); uname_release_len = strlen(sysinfo.release); diff -Nru libdebian-installer-0.102ubuntu3/src/system/subarch-mips64el-linux.c libdebian-installer-0.110ubuntu1/src/system/subarch-mips64el-linux.c --- libdebian-installer-0.102ubuntu3/src/system/subarch-mips64el-linux.c 1970-01-01 00:00:00.000000000 +0000 +++ libdebian-installer-0.110ubuntu1/src/system/subarch-mips64el-linux.c 2017-05-04 15:46:32.000000000 +0000 @@ -0,0 +1,99 @@ +#include +#include +#include +#include +#include + +#include + +struct hwmap_type { + const char *sys_regex; + const char *cpu_regex; + const char *ret; +}; + +static struct hwmap_type hwmap[] = { + {"MIPS Malta", "MIPS (4K|24K|34K|74K)", "4kc-malta" }, + {"MIPS Malta", "MIPS (5K|20K)", "5kc-malta" }, + {".*", "ICT Loongson-2 V0.2", "loongson-2e" }, + {".*", "ICT Loongson-2 V0.3", "loongson-2f" }, + {".*", "ICT Loongson-3", "loongson-3" }, + {".*", "Cavium Octeon", "octeon" }, + {"SGI (Indy|Indigo2)", "R4", "r4k-ip22" }, + {"SGI (Indy|Indigo2)", "R5000", "r5k-ip22" }, + {"SGI (Indy|Indigo2)", "R8000", "r8k-ip26" }, + {"SGI (Indy|Indigo2)", "R10000", "r10k-ip28" }, + {"SGI Origin", "R10000", "r10k-ip27" }, + {"SGI Origin", "R12000", "r12k-ip27" }, + {"SGI (O2|IP32)", "R5|Nevada|RM7000", "r5k-ip32" }, + {"SGI (O2|IP32)", "RM10000", "r10k-ip32" }, + {"SGI (O2|IP32)", "RM12000", "r12k-ip32" }, + {"SiByte BCM91250", "SiByte SB1", "sb1-bcm91250a" }, + {"SiByte BCM91.80", "SiByte SB1A", "sb1a-bcm91480b" }, + + /* add new hwmap here */ + + { ".*", ".*", "unknown" } +}; + +#define BUFFER_LENGTH (1024) + +const char *di_system_subarch_analyze(void) +{ + FILE *file; + char buf[BUFFER_LENGTH]; + const char *pos; + char *system = NULL, *cpu = NULL; + size_t len, i; + + file = fopen("/proc/cpuinfo", "r"); + + if (file) { + while (fgets(buf, sizeof(buf), file)) { + if (!(pos = strchr(buf, ':'))) + continue; + if (!(len = strspn(pos, ": \t"))) + continue; + if (!strncmp(buf, "system type", strlen("system type"))) + system = strdup(pos + len); + if (!strncmp(buf, "cpu model", strlen("cpu model"))) + cpu = strdup(pos + len); + } + + fclose(file); + } + + if (!system) + system = strdup(""); + if (!cpu) + cpu = strdup(""); + + for (i = 0; i < sizeof(hwmap) / sizeof(struct hwmap_type) ; i++) { + regex_t preg; + int ret; + + /* Check for matching system type */ + if (regcomp(&preg, hwmap[i].sys_regex, REG_NOSUB | REG_EXTENDED)) + continue; + ret = regexec(&preg, system, 0, NULL, 0); + regfree(&preg); + if (ret == REG_NOMATCH) + continue; + + /* Check for matching cpu type */ + if (regcomp(&preg, hwmap[i].cpu_regex, REG_NOSUB | REG_EXTENDED)) + continue; + ret = regexec(&preg, cpu, 0, NULL, 0); + regfree(&preg); + if (ret == REG_NOMATCH) + continue; + + /* Match both system and cpu type. Stop. */ + break; + } + + free(system); + free(cpu); + + return hwmap[i].ret; +}