internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: conan-io/conan

Issue:
[bug] Conan 2.0 build command no longer displays input profiles
### Environment details

* Operating System+version: Debian 10
* Compiler+version: N/A
* Conan version: 2.0
* Python version: N/A


### Steps to reproduce

conan-2.0 build -pr:b tools.jinja -pr:h tools.jinja --name zlib --version 1.2.11 .

### Logs

conan-2.0 build -pr:b tools.jinja -pr:h tools.jinja --name zlib --version 1.2.11 .

======== Computing dependency graph ========
Graph root
    conanfile.py (zlib/1.2.11): /tmp/tmp.E0yZBKFZqA/zlib/conanfile.py
Build requirements
    cmake/3.25.2#3879379b09c6c62f34968ecd870c278f - Cache
    openssl/1.1.1t#48dbd82b8f9c47890074d82aafe302e1 - Cache

======== Computing necessary packages ========
Build requirements
    cmake/3.25.2#3879379b09c6c62f34968ecd870c278f:d51b94ec024af4a0f47ccf0400b7a0e260c30ff0#042b95eec03536ee7c6aea0e1157e2b9 - Cache
    openssl/1.1.1t#48dbd82b8f9c47890074d82aafe302e1:896855b1e3b5961bfcc08e699116d9ed588cac00#8a6a7d29ea2f08451c33f97867114fdc - Skip

======== Installing packages ========


Discussion:
This regression is fallout from the recent refactoring that occurred in #12746. It has significant usability implications when one is running discrete build commands. From looking at the code, I believe this was just an oversight. I have a simple fix for it that I will submit shortly.

Resolving patch:
diff --git a/conan/cli/commands/build.py b/conan/cli/commands/build.py
--- a/conan/cli/commands/build.py
+++ b/conan/cli/commands/build.py
@@ -5,6 +5,7 @@
 from conan.cli.commands import make_abs_path
 from conan.cli.args import add_lockfile_args, add_common_install_arguments, add_reference_args
 from conan.internal.conan_app import ConanApp
+from conan.cli.printers import print_profiles
 from conan.cli.printers.graph import print_graph_packages, print_graph_basic
 from conans.client.conanfile.build import run_build_method
 
@@ -36,6 +37,7 @@ def build(conan_api, parser, *args):
                                                cwd=cwd,
                                                partial=args.lockfile_partial)
     profile_host, profile_build = conan_api.profiles.get_profiles_from_args(args)
+    print_profiles(profile_host, profile_build)
 
     deps_graph = conan_api.graph.load_graph_consumer(path, args.name, args.version,
                                                      args.user, args.channel,


Test patch:
Repository: conan-io/conan

Issue:
[bug] Typo in help command for conan remote auth (Conan 2.0)
Hi,

I've observed the following typo when running **conan remote auth --help**:
```
...
positional arguments:
  remote       Pattern of the remote/s to disable. The pattern uses 'fnmatch' style wildcards.
...
```

**disable** doesn't make sense here ;).

Best regards,
gpxricky


Discussion:
Hi @gpxricky,
Thanks a lot for reporting, we'll fix that in 2.0.1 release

Resolving patch:
diff --git a/conan/cli/commands/remote.py b/conan/cli/commands/remote.py
--- a/conan/cli/commands/remote.py
+++ b/conan/cli/commands/remote.py
@@ -262,8 +262,8 @@ def remote_auth(conan_api, parser, subparser, *args):
     """
     Authenticate in the defined remotes
     """
-    subparser.add_argument("remote", help="Pattern of the remote/s to disable. "
-                                          "The pattern uses 'fnmatch' style wildcards.")
+    subparser.add_argument("remote", help="Pattern or name of the remote/s to authenticate against."
+                                          " The pattern uses 'fnmatch' style wildcards.")
     subparser.add_argument("--with-user", action="store_true",
                            help="Only try to auth in those remotes that already "
                                 "have a username or a CONAN_LOGIN_ env-var defined")


Test patch:
Repository: conan-io/conan

Issue:
[bug] Output of `conan install` displays `Install finished succesfully` instead of `Install finished successfully`
### Environment details

* Operating System+version: MacOS Ventura 13.2.1
* Compiler+version: NA
* Conan version: 2.0.2
* Python version: 3.9.6

After a successful call of `conan install .`, the final message which is displayed is `Install finished succesfully`. I suggest to use `successfully` instead of `succesfully`.

I can create a PR if necessary.

### Steps to reproduce

_No response_

### Logs

_No response_


Discussion:

Resolving patch:
diff --git a/conan/cli/commands/install.py b/conan/cli/commands/install.py
--- a/conan/cli/commands/install.py
+++ b/conan/cli/commands/install.py
@@ -86,7 +86,7 @@ def install(conan_api, parser, *args):
                                        deploy=args.deploy
                                        )
 
-    out.success("Install finished succesfully")
+    out.success("Install finished successfully")
     lockfile = conan_api.lockfile.update_lockfile(lockfile, deps_graph, args.lockfile_packages,
                                                   clean=args.lockfile_clean)
     conan_api.lockfile.save_lockfile(lockfile, args.lockfile_out, cwd)


Test patch:
Repository: conan-io/conan

Issue:
[bug] Xcode 14.2 with macos sdk 13.1 not working
### Environment details

* Operating System+version: MacOS 13.2
* Compiler+version: Xcode 14.2
* Conan version: 1.59.0
* Python version: 3.8


### Steps to reproduce

Setting macos sdk to 13.0 and building cmake on a default install of xcode 14.2 fails

### Logs

_No response_


Discussion:

Resolving patch:
diff --git a/conans/client/conf/__init__.py b/conans/client/conf/__init__.py
--- a/conans/client/conf/__init__.py
+++ b/conans/client/conf/__init__.py
@@ -36,7 +36,7 @@
                         "13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0", "15.2", "15.4", "16.0", "16.1"]
     Macos:
         version: [null, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13", "10.14", "10.15", "11.0", "12.0", "13.0"]
-        sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1", "12.3", "13.0"]
+        sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1", "12.3", "13.0", "13.1"]
         subsystem:
             null:
             catalyst:


Test patch:
Repository: conan-io/conan

Issue:
Take a look into normalizing the log levels of conan
Currently, it's not clear whether verbose or notice/status is the default one, and if their order is correct. We should take a look into normalizing all the log levels to be consistent across


Discussion:

Resolving patch:
diff --git a/conan/cli/command.py b/conan/cli/command.py
--- a/conan/cli/command.py
+++ b/conan/cli/command.py
@@ -117,8 +117,8 @@ def _process_log_level_args(args):
                   "warning": LEVEL_WARNING,  # -vwaring 60
                   "notice": LEVEL_NOTICE,  # -vnotice 50
                   "status": LEVEL_STATUS,  # -vstatus 40
+                  None: LEVEL_STATUS,  # -v 40
                   "verbose": LEVEL_VERBOSE,  # -vverbose 30
-                  None: LEVEL_VERBOSE,  # -v 30
                   "debug": LEVEL_DEBUG,  # -vdebug 20
                   "v": LEVEL_DEBUG,  # -vv 20
                   "trace": LEVEL_TRACE,  # -vtrace 10


Test patch:
diff --git a/conans/test/integration/command_v2/test_output_level.py b/conans/test/integration/command_v2/test_output_level.py
--- a/conans/test/integration/command_v2/test_output_level.py
+++ b/conans/test/integration/command_v2/test_output_level.py
@@ -41,7 +41,7 @@ def test_output_level():
     t.run("create . --name foo --version 1.0 -v")
     assert "This is a trace" not in t.out
     assert "This is a debug" not in t.out
-    assert "This is a verbose" in t.out
+    assert "This is a verbose" not in t.out
     assert "This is a info" in t.out
     assert "This is a highlight" in t.out
     assert "This is a success" in t.out
Repository: conan-io/conan

Issue:
[bug] Profile detect selects wrong default compiler on FreeBSD
### Environment details

`conan profile detect` when both `gcc` and `clang` installed, `gcc` is selected, while `FreeBSD` actually uses `clang` as core/standard compiler.

### Steps to reproduce

_No response_

### Logs

_No response_


Discussion:
Hi @jputcu 

Yes, would make sense to change it. This one should be relatively easy, would you like to try to contribute a PR yourself?
Sure, will need some time to get going with the code though.
Sure, no problem, as a hint, this is probably where it should go: https://github.com/conan-io/conan/blob/81f7f2d8ef87d24eef5c0dab509ffa035f5be9e3/conans/client/conf/detect.py#L113

No need to add tests, as we don't have FreeBSD on CI, as long as you test it locally, it would be fine.

Resolving patch:
diff --git a/conans/client/conf/detect.py b/conans/client/conf/detect.py
--- a/conans/client/conf/detect.py
+++ b/conans/client/conf/detect.py
@@ -112,7 +112,7 @@ def _get_default_compiler():
 
     if platform.system() == "Windows":
         return vs or cc or gcc or clang
-    elif platform.system() == "Darwin":
+    elif platform.system() in ["Darwin", "FreeBSD"]:
         return clang or cc or gcc
     elif platform.system() == "SunOS":
         return sun_cc or cc or gcc or clang


Test patch:
Repository: conan-io/conan

Issue:
[feature] Add '--strip' option to cmake install
### What is your suggestion?

Can you add a parameter to `cmake.install` function in order to be able to strip binaries before install ?

install and strip were added to CMake about 4 years ago, and if I got it correctly in version 3.15
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/3069

Strip is very useful to remove debug symbols (actually all DWARF extension) from binaries and especially release binaries.

I tried many options to make it work with conan, but without success, so I think adding this option as a parameter to `install` function in `cmake` tool will be the best solution instead of some workarounds.

### Have you read the CONTRIBUTING guide?

- [X] I've read the CONTRIBUTING guide


Discussion:

Resolving patch:
diff --git a/conan/tools/cmake/cmake.py b/conan/tools/cmake/cmake.py
--- a/conan/tools/cmake/cmake.py
+++ b/conan/tools/cmake/cmake.py
@@ -147,6 +147,10 @@ def install(self, build_type=None, component=None):
         arg_list = ["--install", build_folder, build_config, "--prefix", pkg_folder]
         if component:
             arg_list.extend(["--component", component])
+
+        do_strip = self._conanfile.conf.get("tools.cmake:install_strip", check_type=bool)
+        if do_strip:
+            arg_list.append("--strip")
         arg_list = " ".join(filter(None, arg_list))
         command = "%s %s" % (self._cmake_program, arg_list)
         self._conanfile.output.info("CMake command: %s" % command)


Test patch:
diff --git a/conans/test/unittests/tools/cmake/test_cmake_install.py b/conans/test/unittests/tools/cmake/test_cmake_install.py
--- a/conans/test/unittests/tools/cmake/test_cmake_install.py
+++ b/conans/test/unittests/tools/cmake/test_cmake_install.py
@@ -31,9 +31,38 @@ def test_run_install_component():
     conanfile.settings = settings
     conanfile.folders.set_base_package(temp_folder())
 
-    # Choose generator to match generic setttings
+    # Choose generator to match generic settings
     write_cmake_presets(conanfile, "toolchain", "Visual Studio 14 2015", {})
     cmake = CMake(conanfile)
     cmake.install(component="foo")
 
     assert "--component foo" in conanfile.command
+
+
+def test_run_install_strip():
+    """
+    Testing that the install/strip rule is called
+    Issue related: https://github.com/conan-io/conan/issues/14166
+    """
+
+    settings = Settings.loads(get_default_settings_yml())
+    settings.os = "Linux"
+    settings.arch = "x86_64"
+    settings.build_type = "Release"
+    settings.compiler = "gcc"
+    settings.compiler.version = "11"
+
+    conanfile = ConanFileMock()
+
+    conanfile.conf = Conf()
+    conanfile.conf["tools.cmake:install_strip"] = True
+
+    conanfile.folders.generators = "."
+    conanfile.folders.set_base_generators(temp_folder())
+    conanfile.settings = settings
+    conanfile.folders.set_base_package(temp_folder())
+
+    write_cmake_presets(conanfile, "toolchain", "Unix Makefiles", {})
+    cmake = CMake(conanfile)
+    cmake.install()
+    assert "--strip" in conanfile.command
Repository: conan-io/conan

Issue:
[feature] Don't add escape sequences to stdout of (some) query commands, regardless of CLICOLOR_FORCE
### What is your suggestion?

Hi!

My use case: I am running various conan commands in a wrapper script. The wrapper is using its own buffering when running subprocesses, so when I run the script in the terminal, conan doesn't know that it actually runs in terminal, and disables colors in logs. I set CLICOLOR_FORCE env variable when I want to see colored logs, which works nicely for me.

Sadly, when I want to capture stdout of a command and do something with it, CLICOLOR_FORCE adds unwanted escape sequences and breaks my script:

```bash
$ conan list 'zlib/*' --format=json | cat -A
{$
    "Local Cache": {$
        "zlib/1.2.13": {}$
    }$
}$
$ CLICOLOR_FORCE=1 conan list 'zlib/*' --format=json | cat -A
{$
    "Local Cache": {$
        "zlib/1.2.13": {}$
    }$
}^[[0m$
```

Same can be observed if I run simple `conan config home`. This is kinda expected since I add a variable to force colors, but JSON output format is meant to be processed automatically, so I think it shouldn't be touched with color decorations at all.

### Have you read the CONTRIBUTING guide?

- [X] I've read the CONTRIBUTING guide


Discussion:
It could make sense to add color decorators in [`cli_out_write`](https://github.com/conan-io/conan/blob/release/2.0/conan/api/output.py#L223) only when either `fg` or `bg` is not `None`, this would be enough for my use case. I can prepare a PR myself if it is OK with you!
Hi @BobIsOnFire 

Thanks for the report and the investigation.

I agree, when printing to ``stdout`` any json it shouldn't use any escape sequences at all, irrespective of all colors enabled or forced. It makes sense to fix ``cli_out_write()`` method so this doesn't happen. It would also make sense to use ``print()`` or ``sys.stdout.write()`` for many outputs like json files that don't use colors, but probably fix ``cli_out_write()`` will be simpler. Thanks for offering to submit a PR!

Resolving patch:
diff --git a/conan/api/output.py b/conan/api/output.py
--- a/conan/api/output.py
+++ b/conan/api/output.py
@@ -227,7 +227,7 @@ def cli_out_write(data, fg=None, bg=None, endline="\n", indentation=0):
 
     fg_ = fg or ''
     bg_ = bg or ''
-    if color_enabled(sys.stdout):
+    if (fg or bg) and color_enabled(sys.stdout):
         data = f"{' ' * indentation}{fg_}{bg_}{data}{Style.RESET_ALL}{endline}"
     else:
         data = f"{' ' * indentation}{data}{endline}"


Test patch:
Repository: conan-io/conan

Issue:
Have `ConanFile.run()` be able to get `stderr` just like it does for `stdout`
Somestimes recipes call to programs that outùt important info to stderr instead of stdout, and Conan currently provides no good way to fetch that info


_Originally posted by @RubenRBS in https://github.com/conan-io/conan-center-index/pull/20979#discussion_r1395712850_
            


Discussion:

Resolving patch:
diff --git a/conans/model/conan_file.py b/conans/model/conan_file.py
--- a/conans/model/conan_file.py
+++ b/conans/model/conan_file.py
@@ -318,7 +318,7 @@ def generators_path(self) -> Path:
         return Path(self.generators_folder)
 
     def run(self, command, stdout=None, cwd=None, ignore_errors=False, env="", quiet=False,
-            shell=True, scope="build"):
+            shell=True, scope="build", stderr=None):
         # NOTE: "self.win_bash" is the new parameter "win_bash" for Conan 2.0
         command = self._conan_helpers.cmd_wrapper.wrap(command, conanfile=self)
         if env == "":  # This default allows not breaking for users with ``env=None`` indicating
@@ -332,7 +332,7 @@ def run(self, command, stdout=None, cwd=None, ignore_errors=False, env="", quiet
         from conans.util.runners import conan_run
         if not quiet:
             ConanOutput().writeln(f"{self.display_name}: RUN: {command}", fg=Color.BRIGHT_BLUE)
-        retcode = conan_run(wrapped_cmd, cwd=cwd, stdout=stdout, shell=shell)
+        retcode = conan_run(wrapped_cmd, cwd=cwd, stdout=stdout, stderr=stderr, shell=shell)
         if not quiet:
             ConanOutput().writeln("")
 


Test patch:
diff --git a/conans/test/functional/conanfile/runner_test.py b/conans/test/functional/conanfile/runner_test.py
--- a/conans/test/functional/conanfile/runner_test.py
+++ b/conans/test/functional/conanfile/runner_test.py
@@ -56,3 +56,18 @@ def source(self):
         client.save({"conanfile.py": conanfile})
         client.run("source .")
         self.assertIn('conanfile.py: Buffer got msgs Hello', client.out)
+
+    def test_custom_stream_stderr(self):
+        conanfile = textwrap.dedent("""
+            from io import StringIO
+            from conan import ConanFile
+            class Pkg(ConanFile):
+                def source(self):
+                    my_buf = StringIO()
+                    self.run('echo Hello 1>&2', stderr=my_buf)
+                    self.output.info("Buffer got stderr msgs {}".format(my_buf.getvalue()))
+            """)
+        client = TestClient()
+        client.save({"conanfile.py": conanfile})
+        client.run("source .")
+        self.assertIn('conanfile.py: Buffer got stderr msgs Hello', client.out)
Repository: conan-io/conan

Issue:
[bug] Conan created toolchain accesses an undefined variable
### Environment details

* Operating System+version: mac and ubuntu in GitHub CI
* Compiler+version: -
* Conan version: 2.1.0
* Python version: 3.8

https://github.com/friendlyanon/cmake-init/actions/runs/8003305023/job/21858340788?check_suite_focus=true

### Steps to reproduce

Configure a project with `uninitialized` warning turned on and turned into an error.

### Logs

```
CMake Error (dev) at conan/conan_toolchain.cmake:44 (foreach):
  uninitialized variable 'CMAKE_CONFIGURATION_TYPES'
Call Stack (most recent call first):
  /usr/local/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:170 (include)
  CMakeLists.txt:5 (project)
This error is for project developers. Use -Wno-error=dev to suppress it.
```


Discussion:

Resolving patch:
diff --git a/conan/tools/cmake/toolchain/blocks.py b/conan/tools/cmake/toolchain/blocks.py
--- a/conan/tools/cmake/toolchain/blocks.py
+++ b/conan/tools/cmake/toolchain/blocks.py
@@ -635,7 +635,7 @@ def context(self):
 
 class CMakeFlagsInitBlock(Block):
     template = textwrap.dedent("""
-        foreach(config ${CMAKE_CONFIGURATION_TYPES})
+        foreach(config IN LISTS CMAKE_CONFIGURATION_TYPES)
             string(TOUPPER ${config} config)
             if(DEFINED CONAN_CXX_FLAGS_${config})
               string(APPEND CMAKE_CXX_FLAGS_${config}_INIT " ${CONAN_CXX_FLAGS_${config}}")


Test patch:
diff --git a/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py b/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py
--- a/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py
+++ b/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py
@@ -271,8 +271,8 @@ class Conan(ConanFile):
     client.run("create dep")
     client.run("install .")
     build_type = "-DCMAKE_BUILD_TYPE=Release" if platform.system() != "Windows" else ""
-    client.run_command("cmake . -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake {}"
-                       "-Werror=dev --warn-uninitialized".format(build_type))
+    client.run_command("cmake -Werror=dev --warn-uninitialized . {}"
+                       " -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake".format(build_type))
     assert "Using Conan toolchain" in client.out
     # The real test is that there are no errors, it returns successfully
Repository: conan-io/conan

Issue:
[bug] Problem with ``parse_musl_libc``
### Environment details

Introduced in https://github.com/conan-io/conan/pull/15683

cc @jwillikers 

```python
 if ldd_output is None:
     first_line = ldd_output.partition("\n")[0]
```

This is broken and will crash. Realized because the IDE linter was marking it.

Could you please have a look, retry locally and check what is happening, and how could it be working for your case in the past?

Many thanks!

### Steps to reproduce

_No response_

### Logs

_No response_


Discussion:
Yes, I can take a look. I'd guess that I hit undo or did something similarly clumsy in my editor.

Resolving patch:
diff --git a/conan/internal/api/detect_api.py b/conan/internal/api/detect_api.py
--- a/conan/internal/api/detect_api.py
+++ b/conan/internal/api/detect_api.py
@@ -172,7 +172,7 @@ def _detect_musl_libc(ldd="/usr/bin/ldd"):
             check_output_runner(f"{ldd}", stderr=stderr, ignore_error=True)
         ldd_output = load(tmp_file)
         version = _parse_musl_libc(ldd_output)
-        if ldd_output is None:
+        if version is None:
             first_line = ldd_output.partition("\n")[0]
             ConanOutput(scope="detect_api").warning(
                 f"detect_musl_libc() did not detect musl libc in the first line of output from '{ldd}': '{first_line}'"


Test patch:
Repository: conan-io/conan

Issue:
[feature] Add support for Pop!_OS to package_manager
### What is your suggestion?

[Pop!_OS](https://pop.system76.com/) is an Ubuntu-based Linux distribution. It would be great if it could be added to the list of distributions that support `apt-get`. Its `distro.id()` is `pop`.

### Have you read the CONTRIBUTING guide?

- [X] I've read the CONTRIBUTING guide


Discussion:
Sure, thanks for the suggestion @jwillikers 

That should be an easy one, do you want to submit the contribution yourself?
I can do that.

Resolving patch:
diff --git a/conan/tools/system/package_manager.py b/conan/tools/system/package_manager.py
--- a/conan/tools/system/package_manager.py
+++ b/conan/tools/system/package_manager.py
@@ -39,7 +39,7 @@ def get_default_tool(self):
             os_name = distro.id() or os_name
         elif os_name == "Windows" and self._conanfile.conf.get("tools.microsoft.bash:subsystem") == "msys2":
             os_name = "msys2"
-        manager_mapping = {"apt-get": ["Linux", "ubuntu", "debian", "raspbian", "linuxmint", 'astra', 'elbrus', 'altlinux'],
+        manager_mapping = {"apt-get": ["Linux", "ubuntu", "debian", "raspbian", "linuxmint", 'astra', 'elbrus', 'altlinux', 'pop'],
                            "apk": ["alpine"],
                            "yum": ["pidora", "scientific", "xenserver", "amazon", "oracle", "amzn",
                                    "almalinux", "rocky"],
@@ -61,7 +61,7 @@ def get_default_tool(self):
             for d in distros:
                 if d in os_name:
                     return tool
-                
+
         # No default package manager was found for the system,
         # so notify the user
         self._conanfile.output.info("A default system package manager couldn't be found for {}, "


Test patch:
diff --git a/conans/test/integration/tools/system/package_manager_test.py b/conans/test/integration/tools/system/package_manager_test.py
--- a/conans/test/integration/tools/system/package_manager_test.py
+++ b/conans/test/integration/tools/system/package_manager_test.py
@@ -62,6 +62,7 @@ def test_msys2():
     ('altlinux', "apt-get"),
     ("astra", 'apt-get'),
     ('elbrus', 'apt-get'),
+    ('pop', "apt-get"),
 ])
 @pytest.mark.skipif(platform.system() != "Linux", reason="Only linux")
 def test_package_manager_distro(distro, tool):