We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[package] libx265/3.2.1: hash of source tar.gz changed
### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **libx265/3.2.1**
  * Operating System+version: **Linux Ubuntu 18.04 and 20.04 **
  * Compiler+version: **GCC 7.5 and 8**
  * Conan version: **conan 1.28.1**
  * Python version: **Python 3.6.8**


### Conan profile
```
Configuration for profile default:

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7.5
compiler.libcxx=libstdc++11
build_type=Release
[options]
[build_requires]
[env]
```


### Steps to reproduce (Include if Applicable)
Try to build libx265/3.2.1 from source. 


### Logs (Include/Attach if Applicable)
<details><summary>Click to expand log</summary>

```
ERROR: libx265/3.2.1: Error in source() method, line 50
	tools.get(**self.conan_data["sources"][self.version])
	ConanException: sha256 signature failed for 'x265_3.2.1.tar.gz' file. 
 Provided signature: 7cf8ed2927fcb2914cdca51c974594770da705cb43288beea62b69c53725b5d7  
 Computed signature: fb9badcf92364fd3567f8b5aa0e5e952aeea7a39a2b864387cec31e3b58cbbcc (edited) 
```

</details>

I'm surprised that this wasn't caught earlier. Indeed, when downloading the file manually and computing the sha256sum I get the same as the computed signature above. What's the best way to make a PR for this? Would we bump the recipe version or just overwrite the current 3.2.1?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `recipes/libx265/all/conanfile.py`
Content:
```
1 from conans import CMake, ConanFile, tools
2 import os
3 import shutil
4 
5 
6 class Libx265Conan(ConanFile):
7     name = "libx265"
8     description = "x265 is the leading H.265 / HEVC encoder software library"
9     topics = ("conan", "libx265", "codec", "video", "H.265")
10     url = "https://github.com/conan-io/conan-center-index"
11     homepage = " https://bitbucket.org/multicoreware/x265"
12     exports_sources = ["CMakeLists.txt", "patches/*"]
13     generators = "cmake"
14     license = ("GPL-2.0-only", "commercial")  # https://bitbucket.org/multicoreware/x265/src/default/COPYING
15     settings = "os", "arch", "compiler", "build_type"
16     options = {
17         "shared": [True, False],
18         "fPIC": [True, False],
19         "bit_depth": [8, 10, 12],
20         "HDR10": [True, False],
21         "SVG_HEVC_encoder": [True, False],
22     }
23     default_options = {
24         "shared": False,
25         "fPIC": True,
26         "bit_depth": 8,
27         "HDR10": False,
28         "SVG_HEVC_encoder": False,
29     }
30 
31     _cmake = None
32 
33     @property
34     def _source_subfolder(self):
35         return "source_subfolder"
36 
37     @property
38     def _build_subfolder(self):
39         return "build_subfolder"
40 
41     def config_options(self):
42         if self.settings.os == "Windows":
43             del self.options.fPIC
44 
45     def configure(self):
46         if self.options.shared:
47             del self.options.fPIC
48 
49     def source(self):
50         tools.get(**self.conan_data["sources"][self.version])
51         os.rename("x265_{}".format(self.version), self._source_subfolder)
52 
53     def _configure_cmake(self):
54         if self._cmake:
55             return self._cmake
56         self._cmake = CMake(self)
57         self._cmake.definitions["ENABLE_SHARED"] = self.options.shared
58         self._cmake.definitions["ENABLE_LIBNUMA"] = False
59         if self.settings.os == "Macos":
60             self._cmake.definitions["CMAKE_SHARED_LINKER_FLAGS"] = "-Wl,-read_only_relocs,suppress"
61         self._cmake.definitions["HIGH_BIT_DEPTH"] = self.options.bit_depth != 8
62         self._cmake.definitions["MAIN12"] = self.options.bit_depth == 12
63         self._cmake.definitions["ENABLE_HDR10_PLUS"] = self.options.HDR10
64         self._cmake.definitions["ENABLE_SVT_HEVC"] = self.options.SVG_HEVC_encoder
65         if self.settings.compiler == "Visual Studio":
66             self._cmake.definitions["STATIC_LINK_CRT"] = "T" in str(self.settings.compiler.runtime)
67         if self.settings.os == "Linux":
68             self._cmake.definitions["PLATFORM_LIBS"] = "dl"
69         self._cmake.configure(build_folder=self._build_subfolder)
70         return self._cmake
71 
72     def _patch_sources(self):
73         cmakelists = os.path.join(self._source_subfolder, "source", "CMakeLists.txt")
74         tools.replace_in_file(cmakelists,
75                                 "if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))",
76                                 "if(FALSE)")
77         if self.settings.os == "Android":
78             tools.replace_in_file(cmakelists,
79                 "list(APPEND PLATFORM_LIBS pthread)", "")
80             tools.replace_in_file(cmakelists,
81                 "list(APPEND PLATFORM_LIBS rt)", "")
82         for patch in self.conan_data.get("patches", {}).get(self.version, []):
83             tools.patch(**patch)
84 
85     def build(self):
86         self._patch_sources()
87         cmake = self._configure_cmake()
88         cmake.build()
89 
90     def package(self):
91         self.copy("COPYING", src=self._source_subfolder, dst="licenses")
92         cmake = self._configure_cmake()
93         cmake.install()
94 
95         if self.options.shared:
96             if self.settings.compiler == "Visual Studio":
97                 static_lib = "x265-static.lib"
98             else:
99                 static_lib = "libx265.a"
100             os.unlink(os.path.join(self.package_folder, "lib", static_lib))
101 
102         if self.settings.compiler == "Visual Studio":
103             name = "libx265.lib" if self.options.shared else "x265-static.lib"
104             shutil.move(os.path.join(self.package_folder, "lib", name),
105                         os.path.join(self.package_folder, "lib", "x265.lib"))
106 
107         if self.settings.os != "Windows" or not self.options.shared:
108             tools.rmdir(os.path.join(self.package_folder, "bin"))
109         else:
110             for file in os.listdir(os.path.join(self.package_folder, "bin")):
111                 if not file.endswith(".dll"):
112                     os.unlink(os.path.join(self.package_folder, "bin", file))
113         tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
114 
115     def package_info(self):
116         self.cpp_info.names["pkg_config"] = "x265"
117         self.cpp_info.libs = ["x265"]
118         if self.settings.os == "Linux":
119             self.cpp_info.system_libs.extend(["dl", "pthread", "m"])
120         if self.settings.os == "Android":
121             self.cpp_info.libs.extend(["dl", "m"])
122         libcxx = self.settings.get_safe("compiler.libcxx")
123         if libcxx in ["libstdc++", "libstdc++11"]:
124             self.cpp_info.system_libs.append("stdc++")
125         elif libcxx == "libc++":
126             self.cpp_info.system_libs.append("c++")
127         elif libcxx in ["c++_static", "c++_shared"]:
128             self.cpp_info.system_libs.extend([libcxx, "c++abi"])
129
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/recipes/libx265/all/conanfile.py b/recipes/libx265/all/conanfile.py
--- a/recipes/libx265/all/conanfile.py
+++ b/recipes/libx265/all/conanfile.py
@@ -48,7 +48,7 @@
 
     def source(self):
         tools.get(**self.conan_data["sources"][self.version])
-        os.rename("x265_{}".format(self.version), self._source_subfolder)
+        os.rename("x265-{}".format(self.version), self._source_subfolder)
 
     def _configure_cmake(self):
         if self._cmake:

{"golden_diff": "diff --git a/recipes/libx265/all/conanfile.py b/recipes/libx265/all/conanfile.py\n--- a/recipes/libx265/all/conanfile.py\n+++ b/recipes/libx265/all/conanfile.py\n@@ -48,7 +48,7 @@\n \n     def source(self):\n         tools.get(**self.conan_data[\"sources\"][self.version])\n-        os.rename(\"x265_{}\".format(self.version), self._source_subfolder)\n+        os.rename(\"x265-{}\".format(self.version), self._source_subfolder)\n \n     def _configure_cmake(self):\n         if self._cmake:\n", "issue": "[package] libx265/3.2.1: hash of source tar.gz changed\n### Package and Environment Details (include every applicable attribute)\r\n  * Package Name/Version: **libx265/3.2.1**\r\n  * Operating System+version: **Linux Ubuntu 18.04 and 20.04 **\r\n  * Compiler+version: **GCC 7.5 and 8**\r\n  * Conan version: **conan 1.28.1**\r\n  * Python version: **Python 3.6.8**\r\n\r\n\r\n### Conan profile\r\n```\r\nConfiguration for profile default:\r\n\r\n[settings]\r\nos=Linux\r\nos_build=Linux\r\narch=x86_64\r\narch_build=x86_64\r\ncompiler=gcc\r\ncompiler.version=7.5\r\ncompiler.libcxx=libstdc++11\r\nbuild_type=Release\r\n[options]\r\n[build_requires]\r\n[env]\r\n```\r\n\r\n\r\n### Steps to reproduce (Include if Applicable)\r\nTry to build libx265/3.2.1 from source. \r\n\r\n\r\n### Logs (Include/Attach if Applicable)\r\n<details><summary>Click to expand log</summary>\r\n\r\n```\r\nERROR: libx265/3.2.1: Error in source() method, line 50\r\n\ttools.get(**self.conan_data[\"sources\"][self.version])\r\n\tConanException: sha256 signature failed for 'x265_3.2.1.tar.gz' file. \r\n Provided signature: 7cf8ed2927fcb2914cdca51c974594770da705cb43288beea62b69c53725b5d7  \r\n Computed signature: fb9badcf92364fd3567f8b5aa0e5e952aeea7a39a2b864387cec31e3b58cbbcc (edited) \r\n```\r\n\r\n</details>\r\n\r\nI'm surprised that this wasn't caught earlier. Indeed, when downloading the file manually and computing the sha256sum I get the same as the computed signature above. What's the best way to make a PR for this? Would we bump the recipe version or just overwrite the current 3.2.1?\n", "before_files": [{"content": "from conans import CMake, ConanFile, tools\nimport os\nimport shutil\n\n\nclass Libx265Conan(ConanFile):\n    name = \"libx265\"\n    description = \"x265 is the leading H.265 / HEVC encoder software library\"\n    topics = (\"conan\", \"libx265\", \"codec\", \"video\", \"H.265\")\n    url = \"https://github.com/conan-io/conan-center-index\"\n    homepage = \" https://bitbucket.org/multicoreware/x265\"\n    exports_sources = [\"CMakeLists.txt\", \"patches/*\"]\n    generators = \"cmake\"\n    license = (\"GPL-2.0-only\", \"commercial\")  # https://bitbucket.org/multicoreware/x265/src/default/COPYING\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\n        \"shared\": [True, False],\n        \"fPIC\": [True, False],\n        \"bit_depth\": [8, 10, 12],\n        \"HDR10\": [True, False],\n        \"SVG_HEVC_encoder\": [True, False],\n    }\n    default_options = {\n        \"shared\": False,\n        \"fPIC\": True,\n        \"bit_depth\": 8,\n        \"HDR10\": False,\n        \"SVG_HEVC_encoder\": False,\n    }\n\n    _cmake = None\n\n    @property\n    def _source_subfolder(self):\n        return \"source_subfolder\"\n\n    @property\n    def _build_subfolder(self):\n        return \"build_subfolder\"\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.options.shared:\n            del self.options.fPIC\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        os.rename(\"x265_{}\".format(self.version), self._source_subfolder)\n\n    def _configure_cmake(self):\n        if self._cmake:\n            return self._cmake\n        self._cmake = CMake(self)\n        self._cmake.definitions[\"ENABLE_SHARED\"] = self.options.shared\n        self._cmake.definitions[\"ENABLE_LIBNUMA\"] = False\n        if self.settings.os == \"Macos\":\n            self._cmake.definitions[\"CMAKE_SHARED_LINKER_FLAGS\"] = \"-Wl,-read_only_relocs,suppress\"\n        self._cmake.definitions[\"HIGH_BIT_DEPTH\"] = self.options.bit_depth != 8\n        self._cmake.definitions[\"MAIN12\"] = self.options.bit_depth == 12\n        self._cmake.definitions[\"ENABLE_HDR10_PLUS\"] = self.options.HDR10\n        self._cmake.definitions[\"ENABLE_SVT_HEVC\"] = self.options.SVG_HEVC_encoder\n        if self.settings.compiler == \"Visual Studio\":\n            self._cmake.definitions[\"STATIC_LINK_CRT\"] = \"T\" in str(self.settings.compiler.runtime)\n        if self.settings.os == \"Linux\":\n            self._cmake.definitions[\"PLATFORM_LIBS\"] = \"dl\"\n        self._cmake.configure(build_folder=self._build_subfolder)\n        return self._cmake\n\n    def _patch_sources(self):\n        cmakelists = os.path.join(self._source_subfolder, \"source\", \"CMakeLists.txt\")\n        tools.replace_in_file(cmakelists,\n                                \"if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))\",\n                                \"if(FALSE)\")\n        if self.settings.os == \"Android\":\n            tools.replace_in_file(cmakelists,\n                \"list(APPEND PLATFORM_LIBS pthread)\", \"\")\n            tools.replace_in_file(cmakelists,\n                \"list(APPEND PLATFORM_LIBS rt)\", \"\")\n        for patch in self.conan_data.get(\"patches\", {}).get(self.version, []):\n            tools.patch(**patch)\n\n    def build(self):\n        self._patch_sources()\n        cmake = self._configure_cmake()\n        cmake.build()\n\n    def package(self):\n        self.copy(\"COPYING\", src=self._source_subfolder, dst=\"licenses\")\n        cmake = self._configure_cmake()\n        cmake.install()\n\n        if self.options.shared:\n            if self.settings.compiler == \"Visual Studio\":\n                static_lib = \"x265-static.lib\"\n            else:\n                static_lib = \"libx265.a\"\n            os.unlink(os.path.join(self.package_folder, \"lib\", static_lib))\n\n        if self.settings.compiler == \"Visual Studio\":\n            name = \"libx265.lib\" if self.options.shared else \"x265-static.lib\"\n            shutil.move(os.path.join(self.package_folder, \"lib\", name),\n                        os.path.join(self.package_folder, \"lib\", \"x265.lib\"))\n\n        if self.settings.os != \"Windows\" or not self.options.shared:\n            tools.rmdir(os.path.join(self.package_folder, \"bin\"))\n        else:\n            for file in os.listdir(os.path.join(self.package_folder, \"bin\")):\n                if not file.endswith(\".dll\"):\n                    os.unlink(os.path.join(self.package_folder, \"bin\", file))\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n\n    def package_info(self):\n        self.cpp_info.names[\"pkg_config\"] = \"x265\"\n        self.cpp_info.libs = [\"x265\"]\n        if self.settings.os == \"Linux\":\n            self.cpp_info.system_libs.extend([\"dl\", \"pthread\", \"m\"])\n        if self.settings.os == \"Android\":\n            self.cpp_info.libs.extend([\"dl\", \"m\"])\n        libcxx = self.settings.get_safe(\"compiler.libcxx\")\n        if libcxx in [\"libstdc++\", \"libstdc++11\"]:\n            self.cpp_info.system_libs.append(\"stdc++\")\n        elif libcxx == \"libc++\":\n            self.cpp_info.system_libs.append(\"c++\")\n        elif libcxx in [\"c++_static\", \"c++_shared\"]:\n            self.cpp_info.system_libs.extend([libcxx, \"c++abi\"])\n", "path": "recipes/libx265/all/conanfile.py"}], "after_files": [{"content": "from conans import CMake, ConanFile, tools\nimport os\nimport shutil\n\n\nclass Libx265Conan(ConanFile):\n    name = \"libx265\"\n    description = \"x265 is the leading H.265 / HEVC encoder software library\"\n    topics = (\"conan\", \"libx265\", \"codec\", \"video\", \"H.265\")\n    url = \"https://github.com/conan-io/conan-center-index\"\n    homepage = \" https://bitbucket.org/multicoreware/x265\"\n    exports_sources = [\"CMakeLists.txt\", \"patches/*\"]\n    generators = \"cmake\"\n    license = (\"GPL-2.0-only\", \"commercial\")  # https://bitbucket.org/multicoreware/x265/src/default/COPYING\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\n        \"shared\": [True, False],\n        \"fPIC\": [True, False],\n        \"bit_depth\": [8, 10, 12],\n        \"HDR10\": [True, False],\n        \"SVG_HEVC_encoder\": [True, False],\n    }\n    default_options = {\n        \"shared\": False,\n        \"fPIC\": True,\n        \"bit_depth\": 8,\n        \"HDR10\": False,\n        \"SVG_HEVC_encoder\": False,\n    }\n\n    _cmake = None\n\n    @property\n    def _source_subfolder(self):\n        return \"source_subfolder\"\n\n    @property\n    def _build_subfolder(self):\n        return \"build_subfolder\"\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.options.shared:\n            del self.options.fPIC\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        os.rename(\"x265-{}\".format(self.version), self._source_subfolder)\n\n    def _configure_cmake(self):\n        if self._cmake:\n            return self._cmake\n        self._cmake = CMake(self)\n        self._cmake.definitions[\"ENABLE_SHARED\"] = self.options.shared\n        self._cmake.definitions[\"ENABLE_LIBNUMA\"] = False\n        if self.settings.os == \"Macos\":\n            self._cmake.definitions[\"CMAKE_SHARED_LINKER_FLAGS\"] = \"-Wl,-read_only_relocs,suppress\"\n        self._cmake.definitions[\"HIGH_BIT_DEPTH\"] = self.options.bit_depth != 8\n        self._cmake.definitions[\"MAIN12\"] = self.options.bit_depth == 12\n        self._cmake.definitions[\"ENABLE_HDR10_PLUS\"] = self.options.HDR10\n        self._cmake.definitions[\"ENABLE_SVT_HEVC\"] = self.options.SVG_HEVC_encoder\n        if self.settings.compiler == \"Visual Studio\":\n            self._cmake.definitions[\"STATIC_LINK_CRT\"] = \"T\" in str(self.settings.compiler.runtime)\n        if self.settings.os == \"Linux\":\n            self._cmake.definitions[\"PLATFORM_LIBS\"] = \"dl\"\n        self._cmake.configure(build_folder=self._build_subfolder)\n        return self._cmake\n\n    def _patch_sources(self):\n        cmakelists = os.path.join(self._source_subfolder, \"source\", \"CMakeLists.txt\")\n        tools.replace_in_file(cmakelists,\n                                \"if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))\",\n                                \"if(FALSE)\")\n        if self.settings.os == \"Android\":\n            tools.replace_in_file(cmakelists,\n                \"list(APPEND PLATFORM_LIBS pthread)\", \"\")\n            tools.replace_in_file(cmakelists,\n                \"list(APPEND PLATFORM_LIBS rt)\", \"\")\n        for patch in self.conan_data.get(\"patches\", {}).get(self.version, []):\n            tools.patch(**patch)\n\n    def build(self):\n        self._patch_sources()\n        cmake = self._configure_cmake()\n        cmake.build()\n\n    def package(self):\n        self.copy(\"COPYING\", src=self._source_subfolder, dst=\"licenses\")\n        cmake = self._configure_cmake()\n        cmake.install()\n\n        if self.options.shared:\n            if self.settings.compiler == \"Visual Studio\":\n                static_lib = \"x265-static.lib\"\n            else:\n                static_lib = \"libx265.a\"\n            os.unlink(os.path.join(self.package_folder, \"lib\", static_lib))\n\n        if self.settings.compiler == \"Visual Studio\":\n            name = \"libx265.lib\" if self.options.shared else \"x265-static.lib\"\n            shutil.move(os.path.join(self.package_folder, \"lib\", name),\n                        os.path.join(self.package_folder, \"lib\", \"x265.lib\"))\n\n        if self.settings.os != \"Windows\" or not self.options.shared:\n            tools.rmdir(os.path.join(self.package_folder, \"bin\"))\n        else:\n            for file in os.listdir(os.path.join(self.package_folder, \"bin\")):\n                if not file.endswith(\".dll\"):\n                    os.unlink(os.path.join(self.package_folder, \"bin\", file))\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n\n    def package_info(self):\n        self.cpp_info.names[\"pkg_config\"] = \"x265\"\n        self.cpp_info.libs = [\"x265\"]\n        if self.settings.os == \"Linux\":\n            self.cpp_info.system_libs.extend([\"dl\", \"pthread\", \"m\"])\n        if self.settings.os == \"Android\":\n            self.cpp_info.libs.extend([\"dl\", \"m\"])\n        libcxx = self.settings.get_safe(\"compiler.libcxx\")\n        if libcxx in [\"libstdc++\", \"libstdc++11\"]:\n            self.cpp_info.system_libs.append(\"stdc++\")\n        elif libcxx == \"libc++\":\n            self.cpp_info.system_libs.append(\"c++\")\n        elif libcxx in [\"c++_static\", \"c++_shared\"]:\n            self.cpp_info.system_libs.extend([libcxx, \"c++abi\"])\n", "path": "recipes/libx265/all/conanfile.py"}]}