diff --git a/Replace-auto_ptr-with-unique_ptr.patch b/Replace-auto_ptr-with-unique_ptr.patch deleted file mode 100644 index 07788aa6ea84d396c25b3ee40241998e8ccb7194..0000000000000000000000000000000000000000 --- a/Replace-auto_ptr-with-unique_ptr.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 3c149a28d988654706b0dd7dc58900126be46f09 Mon Sep 17 00:00:00 2001 -From: cherry530 <707078654@qq.com> -Date: Sun, 29 Sep 2024 17:09:34 +0800 -Subject: [PATCH] Replace auto_ptr with unique_ptr - -Signed-off-by: cherry530 <707078654@qq.com> ---- - atf-c++/check.cpp | 4 ++-- - atf-c++/check.hpp | 4 ++-- - atf-c++/check_test.cpp | 22 +++++++++++----------- - atf-c++/detail/process_test.cpp | 8 ++++---- - atf-c++/tests.hpp | 2 +- - atf-sh/atf-check.cpp | 8 ++++---- - 6 files changed, 24 insertions(+), 24 deletions(-) - -diff --git a/atf-c++/check.cpp b/atf-c++/check.cpp -index e4d7db4..5d85800 100644 ---- a/atf-c++/check.cpp -+++ b/atf-c++/check.cpp -@@ -141,7 +141,7 @@ impl::build_cxx_o(const std::string& sfile, const std::string& ofile, - return success; - } - --std::auto_ptr< impl::check_result > -+std::unique_ptr< impl::check_result > - impl::exec(const atf::process::argv_array& argva) - { - atf_check_result_t result; -@@ -150,5 +150,5 @@ impl::exec(const atf::process::argv_array& argva) - if (atf_is_error(err)) - throw_atf_error(err); - -- return std::auto_ptr< impl::check_result >(new impl::check_result(&result)); -+ return std::unique_ptr< impl::check_result >(new impl::check_result(&result)); - } -diff --git a/atf-c++/check.hpp b/atf-c++/check.hpp -index 0144ded..4d7f079 100644 ---- a/atf-c++/check.hpp -+++ b/atf-c++/check.hpp -@@ -71,7 +71,7 @@ class check_result { - check_result(const atf_check_result_t* result); - - friend check_result test_constructor(const char* const*); -- friend std::auto_ptr< check_result > exec(const atf::process::argv_array&); -+ friend std::unique_ptr< check_result > exec(const atf::process::argv_array&); - - public: - //! -@@ -120,7 +120,7 @@ bool build_cpp(const std::string&, const std::string&, - const atf::process::argv_array&); - bool build_cxx_o(const std::string&, const std::string&, - const atf::process::argv_array&); --std::auto_ptr< check_result > exec(const atf::process::argv_array&); -+std::unique_ptr< check_result > exec(const atf::process::argv_array&); - - // Useful for testing only. - check_result test_constructor(void); -diff --git a/atf-c++/check_test.cpp b/atf-c++/check_test.cpp -index 7baf3fa..ecb5a93 100644 ---- a/atf-c++/check_test.cpp -+++ b/atf-c++/check_test.cpp -@@ -52,7 +52,7 @@ extern "C" { - // ------------------------------------------------------------------------ - - static --std::auto_ptr< atf::check::check_result > -+std::unique_ptr< atf::check::check_result > - do_exec(const atf::tests::tc* tc, const char* helper_name) - { - std::vector< std::string > argv; -@@ -65,7 +65,7 @@ do_exec(const atf::tests::tc* tc, const char* helper_name) - } - - static --std::auto_ptr< atf::check::check_result > -+std::unique_ptr< atf::check::check_result > - do_exec(const atf::tests::tc* tc, const char* helper_name, const char *carg2) - { - std::vector< std::string > argv; -@@ -248,11 +248,11 @@ ATF_TEST_CASE_HEAD(exec_cleanup) - } - ATF_TEST_CASE_BODY(exec_cleanup) - { -- std::auto_ptr< atf::fs::path > out; -- std::auto_ptr< atf::fs::path > err; -+ std::unique_ptr< atf::fs::path > out; -+ std::unique_ptr< atf::fs::path > err; - - { -- std::auto_ptr< atf::check::check_result > r = -+ std::unique_ptr< atf::check::check_result > r = - do_exec(this, "exit-success"); - out.reset(new atf::fs::path(r->stdout_path())); - err.reset(new atf::fs::path(r->stderr_path())); -@@ -272,7 +272,7 @@ ATF_TEST_CASE_HEAD(exec_exitstatus) - ATF_TEST_CASE_BODY(exec_exitstatus) - { - { -- std::auto_ptr< atf::check::check_result > r = -+ std::unique_ptr< atf::check::check_result > r = - do_exec(this, "exit-success"); - ATF_REQUIRE(r->exited()); - ATF_REQUIRE(!r->signaled()); -@@ -280,7 +280,7 @@ ATF_TEST_CASE_BODY(exec_exitstatus) - } - - { -- std::auto_ptr< atf::check::check_result > r = -+ std::unique_ptr< atf::check::check_result > r = - do_exec(this, "exit-failure"); - ATF_REQUIRE(r->exited()); - ATF_REQUIRE(!r->signaled()); -@@ -288,7 +288,7 @@ ATF_TEST_CASE_BODY(exec_exitstatus) - } - - { -- std::auto_ptr< atf::check::check_result > r = -+ std::unique_ptr< atf::check::check_result > r = - do_exec(this, "exit-signal"); - ATF_REQUIRE(!r->exited()); - ATF_REQUIRE(r->signaled()); -@@ -321,12 +321,12 @@ ATF_TEST_CASE_HEAD(exec_stdout_stderr) - } - ATF_TEST_CASE_BODY(exec_stdout_stderr) - { -- std::auto_ptr< atf::check::check_result > r1 = -+ std::unique_ptr< atf::check::check_result > r1 = - do_exec(this, "stdout-stderr", "result1"); - ATF_REQUIRE(r1->exited()); - ATF_REQUIRE_EQ(r1->exitcode(), EXIT_SUCCESS); - -- std::auto_ptr< atf::check::check_result > r2 = -+ std::unique_ptr< atf::check::check_result > r2 = - do_exec(this, "stdout-stderr", "result2"); - ATF_REQUIRE(r2->exited()); - ATF_REQUIRE_EQ(r2->exitcode(), EXIT_SUCCESS); -@@ -372,7 +372,7 @@ ATF_TEST_CASE_BODY(exec_unknown) - argv.push_back("/foo/bar/non-existent"); - - atf::process::argv_array argva(argv); -- std::auto_ptr< atf::check::check_result > r = atf::check::exec(argva); -+ std::unique_ptr< atf::check::check_result > r = atf::check::exec(argva); - ATF_REQUIRE(r->exited()); - ATF_REQUIRE_EQ(r->exitcode(), 127); - } -diff --git a/atf-c++/detail/process_test.cpp b/atf-c++/detail/process_test.cpp -index 0686d2a..97f9a08 100644 ---- a/atf-c++/detail/process_test.cpp -+++ b/atf-c++/detail/process_test.cpp -@@ -196,8 +196,8 @@ ATF_TEST_CASE_BODY(argv_array_assign) - const char* const carray1[] = { "arg1", NULL }; - const char* const carray2[] = { "arg1", "arg2", NULL }; - -- std::auto_ptr< argv_array > argv1(new argv_array(carray1)); -- std::auto_ptr< argv_array > argv2(new argv_array(carray2)); -+ std::unique_ptr< argv_array > argv1(new argv_array(carray1)); -+ std::unique_ptr< argv_array > argv2(new argv_array(carray2)); - - *argv2 = *argv1; - ATF_REQUIRE_EQ(argv2->size(), argv1->size()); -@@ -226,8 +226,8 @@ ATF_TEST_CASE_BODY(argv_array_copy) - - const char* const carray[] = { "arg0", NULL }; - -- std::auto_ptr< argv_array > argv1(new argv_array(carray)); -- std::auto_ptr< argv_array > argv2(new argv_array(*argv1)); -+ std::unique_ptr< argv_array > argv1(new argv_array(carray)); -+ std::unique_ptr< argv_array > argv2(new argv_array(*argv1)); - - ATF_REQUIRE_EQ(argv2->size(), argv1->size()); - ATF_REQUIRE(std::strcmp((*argv2)[0], (*argv1)[0]) == 0); -diff --git a/atf-c++/tests.hpp b/atf-c++/tests.hpp -index ce2fb1d..a03cc85 100644 ---- a/atf-c++/tests.hpp -+++ b/atf-c++/tests.hpp -@@ -73,7 +73,7 @@ class tc { - tc(const tc&); - tc& operator=(const tc&); - -- std::auto_ptr< tc_impl > pimpl; -+ std::unique_ptr< tc_impl > pimpl; - - protected: - virtual void head(void); -diff --git a/atf-sh/atf-check.cpp b/atf-sh/atf-check.cpp -index 866b7bb..c236652 100644 ---- a/atf-sh/atf-check.cpp -+++ b/atf-sh/atf-check.cpp -@@ -103,7 +103,7 @@ struct output_check { - }; - - class temp_file : public std::ostream { -- std::auto_ptr< atf::fs::path > m_path; -+ std::unique_ptr< atf::fs::path > m_path; - int m_fd; - - public: -@@ -326,7 +326,7 @@ flatten_argv(char* const* argv) - } - - static --std::auto_ptr< atf::check::check_result > -+std::unique_ptr< atf::check::check_result > - execute(const char* const* argv) - { - // TODO: This should go to stderr... but fixing it now may be hard as test -@@ -342,7 +342,7 @@ execute(const char* const* argv) - } - - static --std::auto_ptr< atf::check::check_result > -+std::unique_ptr< atf::check::check_result > - execute_with_shell(char* const* argv) - { - const std::string cmd = flatten_argv(argv); -@@ -802,7 +802,7 @@ atf_check::main(void) - - int status = EXIT_FAILURE; - -- std::auto_ptr< atf::check::check_result > r = -+ std::unique_ptr< atf::check::check_result > r = - m_xflag ? execute_with_shell(m_argv) : execute(m_argv); - - if (m_status_checks.empty()) --- -2.44.0 - diff --git a/atf-0.21.tar.gz b/atf-0.21.tar.gz deleted file mode 100644 index 6566cf2901db5decea7e0284da9067740385a800..0000000000000000000000000000000000000000 Binary files a/atf-0.21.tar.gz and /dev/null differ diff --git a/atf-0.23.tar.gz b/atf-0.23.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..91923ee334915a2f2e31cc4fad2554e3206ee7fe Binary files /dev/null and b/atf-0.23.tar.gz differ diff --git a/atf.spec b/atf.spec index aa1641c96ac202ab712c4a2e305fbf76bfc5ab82..023da13c1b5866713e3cfc9bc70585ec92d72b86 100644 --- a/atf.spec +++ b/atf.spec @@ -1,12 +1,10 @@ Name: atf -Version: 0.21 -Release: 3 +Version: 0.23 +Release: 1 License: BSD Summary: Testing Framework for Automated URL: https://github.com/jmmv/atf/ -Source0: https://github.com/jmmv/atf/archive/atf-0.21.tar.gz - -Patch0: Replace-auto_ptr-with-unique_ptr.patch +Source0: https://github.com/jmmv/atf/archive/atf-%{version}.tar.gz BuildRequires: gcc-c++ autoconf libtool @@ -81,7 +79,7 @@ Summary: Help documents for atf Man pages and other related help documents for atf. %prep -%autosetup -n atf-%{name}-%{version} -p1 +%autosetup -n %{name}-%{version} -p1 %build autoreconf -i -s @@ -130,7 +128,6 @@ make check %{_libdir}/pkgconfig/atf-sh.pc %files tests -%doc README %{_libexecdir}/atf/tests %files help @@ -139,6 +136,9 @@ make check %{_mandir}/man7/* %changelog +* Mon Jul 14 2025 dillon chen - 0.23-1 +- Package update to 0.23-1 + * Sun Sep 29 2024 xu_ping <707078654@qq.com> - 0.21-3 - Replace auto_ptr with unique_ptr