Hello community, here is the log from the commit of package libzbc for openSUSE:Factory checked in at 2020-02-03 11:14:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzbc (Old) and /work/SRC/openSUSE:Factory/.libzbc.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzbc" Mon Feb 3 11:14:16 2020 rev:14 rq:769226 version:5.8.4 Changes: -------- --- /work/SRC/openSUSE:Factory/libzbc/libzbc.changes 2019-12-12 23:20:47.542199326 +0100 +++ /work/SRC/openSUSE:Factory/.libzbc.new.26092/libzbc.changes 2020-02-03 11:14:29.281880405 +0100 @@ -1,0 +2,14 @@ +Sat Jan 25 08:32:56 UTC 2020 - Jan Engelhardt <jeng...@inai.de> + +- Update to release 5.8.4 + * zbc_device_is_zoned() does not use a device real path as + given by zbc_realpath(), causing problems with symbolic + links. + * Better handling of sense data reporting feature on ATA + drives: some drives do not accept setting this feature + causing zbc_open(). to fail. Fix this by testing first if the + feature is already enabled instead of blindly setting it. + * Fix zbc_write_zone tool not writing any data to a zone due to + a loop control error. + +------------------------------------------------------------------- Old: ---- v5.8.3.tar.gz New: ---- v5.8.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzbc.spec ++++++ --- /var/tmp/diff_new_pack.u9RI8m/_old 2020-02-03 11:14:29.985880760 +0100 +++ /var/tmp/diff_new_pack.u9RI8m/_new 2020-02-03 11:14:29.989880763 +0100 @@ -1,7 +1,7 @@ # # spec file for package libzbc # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,8 @@ Name: libzbc -%define lname libzbc-5_8_3 -Version: 5.8.3 +%define lname libzbc-5_8_4 +Version: 5.8.4 Release: 0 Summary: Library for manipulating ZBC and ZAC disks License: BSD-2-Clause AND LGPL-3.0-or-later ++++++ v5.8.3.tar.gz -> v5.8.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzbc-5.8.3/.gitignore new/libzbc-5.8.4/.gitignore --- old/libzbc-5.8.3/.gitignore 2019-12-12 17:46:42.000000000 +0100 +++ new/libzbc-5.8.4/.gitignore 2020-01-25 01:33:14.000000000 +0100 @@ -37,7 +37,9 @@ zbc_set_zones zbc_set_write_ptr gzbc +!tools/gzbc gzviewer +!tools/gzviewer test/programs/zbc_test_print_devinfo test/programs/zbc_test_report_zones diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzbc-5.8.3/README.md new/libzbc-5.8.4/README.md --- old/libzbc-5.8.3/README.md 2019-12-12 17:46:42.000000000 +0100 +++ new/libzbc-5.8.4/README.md 2020-01-25 01:33:14.000000000 +0100 @@ -82,7 +82,7 @@ ``` The library file is by default installed under /usr/lib (or /usr/lib64). The -library header files are installed in /usr/include/libzbc. The executable files +library header file is installed in /usr/include/libzbc. The executable files for the example applications are installed under /usr/bin. These defaults can be changed using the configure script. Executing the following command displays the options used to control the installation paths. @@ -91,6 +91,18 @@ # ./configure --help ``` +## Compilation with GUI tools + +The *gzbc* and *gzviewer* tools implement a graphical user interface (GUI) using +the GTK3 toolkit. The configure script will automatically detect the presence of +GTK3 development headers and compile these tools if the header files are found. +This behavior can be manually changed and the compilation of *gzbc* and +*gzviewer* disabled using the `--disable-gui` configuration option. + +``` +# ./configure --disable-gui +``` + ## Compilation for device tests The test directory contains several test programs and scripts allowing testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzbc-5.8.3/configure.ac new/libzbc-5.8.4/configure.ac --- old/libzbc-5.8.3/configure.ac 2019-12-12 17:46:42.000000000 +0100 +++ new/libzbc-5.8.4/configure.ac 2020-01-25 01:33:14.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([libzbc], [5.8.3], +AC_INIT([libzbc], [5.8.4], [damien.lem...@wdc.com, dmitry.fomic...@wdc.com], [libzbc], [https://github.com/hgst/libzbc]) AC_CONFIG_AUX_DIR([build-aux]) @@ -37,9 +37,10 @@ AS_HELP_STRING([--disable-gui], [Disable build of GUI tools (gzbc and gzviewer) [default=no]])) AS_IF([test "x$enable_gui" != "xno"], [ - # Build gzbc only if GTK3 is installed. - PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0]) - AM_CONDITIONAL([BUILD_GUI], [test "$HAVE_GTK3" -eq 1]) + # Build gzbc only if GTK3 is installed and can be detected with pkg-config. + m4_ifdef([PKG_CHECK_MODULES], + [PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0])], + [HAVE_GTK3=0]) AM_CONDITIONAL([BUILD_GUI], [test "$HAVE_GTK3" -eq 1]) ], [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzbc-5.8.3/lib/zbc.c new/libzbc-5.8.4/lib/zbc.c --- old/libzbc-5.8.3/lib/zbc.c 2019-12-12 17:46:42.000000000 +0100 +++ new/libzbc-5.8.4/lib/zbc.c 2020-01-25 01:33:14.000000000 +0100 @@ -295,7 +295,7 @@ /* Test all backends until one accepts the drive. */ for (i = 0; zbc_drv[i]; i++) { - ret = zbc_drv[i]->zbd_open(filename, O_RDONLY, &dev); + ret = zbc_drv[i]->zbd_open(path, O_RDONLY, &dev); if (ret == 0) { /* This backend accepted the device */ dev->zbd_drv = zbc_drv[i]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzbc-5.8.3/lib/zbc_ata.c new/libzbc-5.8.4/lib/zbc_ata.c --- old/libzbc-5.8.3/lib/zbc_ata.c 2019-12-12 17:46:42.000000000 +0100 +++ new/libzbc-5.8.4/lib/zbc_ata.c 2020-01-25 01:33:14.000000000 +0100 @@ -61,6 +61,7 @@ #define ZBC_ATA_IDENTIFY_DEVICE_DATA_LOG_ADDR 0x30 #define ZBC_ATA_CAPACITY_PAGE 0x02 #define ZBC_ATA_SUPPORTED_CAPABILITIES_PAGE 0x03 +#define ZBC_ATA_CURRENT_SETTINGS_PAGE 0x04 #define ZBC_ATA_STRINGS_PAGE 0x05 #define ZBC_ATA_ZONED_DEVICE_INFORMATION_PAGE 0x09 @@ -1349,6 +1350,53 @@ } /** + * Check sense data reporting is enabled. ZAC mandates it then it is expected + * already enabled. In case it is disabled, call set feature command to enable. + */ +static void zbc_ata_enable_sense_data_reporting(struct zbc_device *dev) +{ + uint8_t buf[512]; + int ret; + + /* Get current settings page */ + ret = zbc_ata_read_log(dev, + ZBC_ATA_IDENTIFY_DEVICE_DATA_LOG_ADDR, + ZBC_ATA_CURRENT_SETTINGS_PAGE, + buf, + sizeof(buf)); + if (ret != 0) { + zbc_debug("%s: Get current settings log page failed %d\n", + dev->zbd_filename, ret); + return; + } + + /* + * Sense data reporting should be enabled as mandated by ACS. If it is, + * nothing needs to be done. Otherwise, warn about it and try to enable + * it. + */ + if (zbc_ata_get_qword(&buf[8]) & (1ULL << 10)) + return; + + zbc_warning("%s: Sense data reporting is disabled\n", + dev->zbd_filename); + zbc_warning("%s: ACS mandates sense data reporting being enabled\n", + dev->zbd_filename); + zbc_warning("%s: Trying to enable sense data reporting\n", + dev->zbd_filename); + ret = zbc_ata_set_features(dev, + ZBC_ATA_ENABLE_SENSE_DATA_REPORTING, 0x01); + if (ret != 0) { + zbc_warning("%s: Enable sense data reporting failed %d\n", + dev->zbd_filename, ret); + zbc_warning("%s: Detailed error reporting may not work\n", + dev->zbd_filename); + } + + return; +} + +/** * Open a device. */ static int zbc_ata_open(const char *filename, @@ -1409,14 +1457,7 @@ if (ret != 0) goto out_free_filename; - /* Set sense data reporting */ - ret = zbc_ata_set_features(dev, - ZBC_ATA_ENABLE_SENSE_DATA_REPORTING, 0x01); - if (ret != 0) { - zbc_error("%s: Enable sense data reporting failed\n", - filename); - goto out_free_filename; - } + zbc_ata_enable_sense_data_reporting(dev); *pdev = dev; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzbc-5.8.3/tools/write_zone/zbc_write_zone.c new/libzbc-5.8.4/tools/write_zone/zbc_write_zone.c --- old/libzbc-5.8.3/tools/write_zone/zbc_write_zone.c 2019-12-12 17:46:42.000000000 +0100 +++ new/libzbc-5.8.4/tools/write_zone/zbc_write_zone.c 2020-01-25 01:33:14.000000000 +0100 @@ -374,10 +374,14 @@ } - if (zbc_zone_sequential_req(iozone) && !zbc_zone_full(iozone)) - sector_max = zbc_zone_wp(iozone) - zbc_zone_start(iozone); - else - sector_max = zbc_zone_length(iozone); + sector_max = zbc_zone_length(iozone); + if (zbc_zone_sequential_req(iozone)) { + if (zbc_zone_full(iozone)) + sector_max = 0; + else if (zbc_zone_wp(iozone) > zbc_zone_start(iozone)) + sector_max = + zbc_zone_wp(iozone) - zbc_zone_start(iozone); + } elapsed = zbc_write_zone_usec();