diff --git a/Packages b/Packages deleted file mode 100644 index 054023bdabf47cd26a8cd6b8c234857d59fc512e..0000000000000000000000000000000000000000 --- a/Packages +++ /dev/null @@ -1,45 +0,0 @@ - - -
-- diff --git a/Replace-auto_ptr-with-unique_ptr.patch b/Replace-auto_ptr-with-unique_ptr.patch new file mode 100644 index 0000000000000000000000000000000000000000..cc317d77d250f51ab98a363372485cad8ac988ad --- /dev/null +++ b/Replace-auto_ptr-with-unique_ptr.patch @@ -0,0 +1,227 @@ +From af2d53b81d134b2ae05630a39292800673683bb4 Mon Sep 17 00:00:00 2001 +From: cherry530 <707078654@qq.com> +Date: Mon, 30 Sep 2024 14:59:45 +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 b099b07..a26ca01 100644 +--- a/atf-c++/check.cpp ++++ b/atf-c++/check.cpp +@@ -145,7 +145,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; +@@ -154,5 +154,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 f838efb..461eac0 100644 +--- a/atf-c++/check.hpp ++++ b/atf-c++/check.hpp +@@ -75,7 +75,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: + //! +@@ -124,7 +124,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 a92511c..9417069 100644 +--- a/atf-c++/check_test.cpp ++++ b/atf-c++/check_test.cpp +@@ -57,7 +57,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; +@@ -70,7 +70,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; +@@ -253,11 +253,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())); +@@ -277,7 +277,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()); +@@ -285,7 +285,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()); +@@ -293,7 +293,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()); +@@ -326,12 +326,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); +@@ -377,7 +377,7 @@ ATF_TEST_CASE_BODY(exec_unknown) + argv.push_back(atf::config::get("atf_workdir") + "/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 a40f663..adad139 100644 +--- a/atf-c++/detail/process_test.cpp ++++ b/atf-c++/detail/process_test.cpp +@@ -199,8 +199,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()); +@@ -229,8 +229,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 4c8ca91..5e09904 100644 +--- a/atf-c++/tests.hpp ++++ b/atf-c++/tests.hpp +@@ -77,7 +77,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 b08c020..071aa81 100644 +--- a/atf-sh/atf-check.cpp ++++ b/atf-sh/atf-check.cpp +@@ -108,7 +108,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: +@@ -328,7 +328,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 +@@ -344,7 +344,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); +@@ -806,7 +806,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.27.0 + diff --git a/atf-0.20-12.fc29.src.rpm b/atf-0.20-12.fc29.src.rpm deleted file mode 100644 index 131152c506814ce17ff10c5d0555a3f9466be6e0..0000000000000000000000000000000000000000 Binary files a/atf-0.20-12.fc29.src.rpm and /dev/null differ diff --git a/atf.spec b/atf.spec index e861859ce3707d115d6b98d0309b14f5b9b6f604..f0c2d646e3f98b0c104cd72e5fbc7fb8f32e3c87 100644 --- a/atf.spec +++ b/atf.spec @@ -1,12 +1,14 @@ Name: atf Version: 0.20 -Release: 13 +Release: 14 License: BSD Summary: Testing Framework for Automated URL: http://code.google.com/p/kyua/wiki/ATF Source0: https://github.com/jmmv/atf/releases/download/atf-0.20/atf-0.20.tar.gz Source1: README +Patch0: Replace-auto_ptr-with-unique_ptr.patch + BuildRequires: gcc-c++ %description @@ -141,5 +143,9 @@ make check %changelog +* Mon Sep 30 2024 xu_ping <707078654@qq.com> - 0.20-14 +- Replace auto_ptr with unique_ptr +- Remove extra files + * Tue Dec 31 2019 duyeyuName Last modified Size Description
Parent Directory - -
0/ 2018-10-24 21:05 - -
2/ 2018-10-24 21:05 - -
3/ 2018-10-24 21:05 - -
4/ 2018-10-24 21:05 - -
5/ 2018-10-24 21:05 - -
6/ 2018-10-24 21:05 - -
7/ 2018-10-24 21:05 - -
8/ 2018-10-24 21:05 - -
9/ 2018-10-24 21:05 - -
a/ 2018-10-24 21:30 - -
b/ 2018-10-24 22:01 - -
c/ 2018-10-24 21:30 - -
d/ 2018-10-24 21:30 - -
e/ 2018-10-24 22:01 - -
f/ 2018-10-24 22:01 - -
g/ 2018-10-24 21:30 - -
h/ 2018-10-24 22:01 - -
i/ 2018-10-24 22:01 - -
j/ 2018-10-24 21:30 - -
k/ 2018-10-24 21:20 - -
l/ 2018-10-24 22:01 - -
m/ 2018-10-24 22:01 - -
n/ 2018-10-24 22:01 - -
o/ 2018-10-24 21:51 - -
p/ 2018-10-24 22:01 - -
q/ 2018-10-24 22:01 - -
r/ 2018-10-24 21:30 - -
s/ 2018-10-24 22:01 - -
t/ 2018-10-24 21:30 - -
u/ 2018-10-24 21:30 - -
v/ 2018-10-24 21:30 - -
w/ 2018-10-24 21:30 - -
x/ 2018-10-24 21:30 - -
y/ 2018-10-24 21:30 - -
z/ 2018-10-24 21:20 - -