diff --git a/backport-correct-realpath-test-failure.patch b/backport-correct-realpath-test-failure.patch new file mode 100644 index 0000000..2094578 --- /dev/null +++ b/backport-correct-realpath-test-failure.patch @@ -0,0 +1,44 @@ +commit 56335fff0f21d294cd0e478d49542a43e9495ed0 +Author: R. Bernstein +Date: Wed Aug 24 14:34:33 2022 -0400 + + Correct realpath test failure + + See https://savannah.gnu.org/bugs/?62948 + Patch courtesy of Martin Liška + +diff --git a/test/driver/realpath.c b/test/driver/realpath.c +index 289253e4..cd46d620 100644 +--- a/test/driver/realpath.c ++++ b/test/driver/realpath.c +@@ -1,5 +1,7 @@ + /* -*- C -*- +- Copyright (C) 2010-2012, 2015, 2017 Rocky Bernstein ++ ++ Copyright (C) 2010-2012, 2015, 2017, 2022 Rocky Bernstein ++ + + 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 +@@ -175,16 +177,17 @@ main(int argc, const char *argv[]) + rc = check_rc(symlink(psz_symlink_file, psz_symlink_file), + "symlink", psz_symlink_file); + if (0 == rc) { +- cdio_realpath(psz_symlink_file, psz_file_check); +- if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) { ++ char *retvalue = cdio_realpath(psz_symlink_file, psz_file_check); ++ if (0 != retvalue) { ++ if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) { + fprintf(stderr, "direct cdio_realpath cycle test failed. %s vs %s\n", + psz_file_check, symlink_file); + rc = 5; + goto err_exit; ++ } ++ check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file); + } +- check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file); + } +- + } + + check_rc(unlink(psz_orig_file), "unlink", psz_orig_file); diff --git a/libcdio.spec b/libcdio.spec index bff6810..83641e9 100644 --- a/libcdio.spec +++ b/libcdio.spec @@ -1,12 +1,13 @@ Name: libcdio Version: 2.1.0 -Release: 5 +Release: 6 Summary: CD-ROM input and control library License: GPLv3+ URL: http://www.gnu.org/software/libcdio/ Source0: https://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.bz2 Source1: https://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.bz2.sig Source2: libcdio_x86_64_config.h +Patch6000: backport-correct-realpath-test-failure.patch Patch9000: 0001-fix-Werror-format-security.patch BuildRequires: gcc gcc-c++ pkgconfig doxygen ncurses-devel help2man chrpath gettext-devel @@ -96,6 +97,9 @@ fi %{_infodir}/* %changelog +* Tue Jan 17 2023 zhouwenpei - 2.1.0-6 +- fix test case fail + * Mon Apr 18 2022 Chenxi Mao - 2.1.0-5 - Remove self-dependency