Skip to content

Commit

Permalink
Revert "Merge branch 'master' into xorg-system-package_manager"
Browse files Browse the repository at this point in the history
This reverts commit 0888c36, reversing
changes made to 3a251cd.
  • Loading branch information
jwillikers committed Jul 22, 2022
1 parent a0b019b commit f2a8ee8
Show file tree
Hide file tree
Showing 297 changed files with 892 additions and 3,127 deletions.
5 changes: 0 additions & 5 deletions .c3i/authorized_users.yml
Expand Up @@ -893,8 +893,3 @@ authorized_users:
- "netheril96"
- "atimin"
- "ssophie01"
- "mietzen"
- "mourogurt"
- "hoisunng"
- "abouvier"
- "jadamwilson2"
12 changes: 0 additions & 12 deletions docs/changelog.md
@@ -1,17 +1,5 @@
# Changelog

### 22-July-2022 - 12:13 CEST

- [feature]: ValidateInfrastructure: Add check to verify CMake 3.21 is installed in Windows machines.
- [feature]: ValidateInfrastructure: Execute the validation when a pull-request is modifying configuration files.
- [feature]: Conan v2: Iterate `cppstd` values in profiles to build first match.
- [feature]: Conan v2: Apply `shared` option for the whole dependency graph.
- [feature]: Add `tools.apple.sdk_path` to configuration in Macos (required by new build helpers).
- [feature]: Set `tools.system.package_manager:mode=install` and `tools.system.package_manager:sudo=True` in configuration files (required by new system package manager helpers to mimic the behavior of old ones).
- [feature]: Upgrade required Conan versions to work with the library. Minimum versions tested are now `1.49.0` and `2.0.0b1`.
- [fix]: ValidateInfrastructure: Fix error message split.
- [bugfix]: Accept missing HTTP code for requests.

### 06-July-2022 - 14:28 CEST

- [feature]: Configure AccessRequest job to run on Mondays and Thursdays.
Expand Down
5 changes: 2 additions & 3 deletions docs/error_knowledge_base.md
Expand Up @@ -360,9 +360,8 @@ The duality creates a heterogeneous way of solving dependencies, making it diffi

#### **<a name="KB-H056">#KB-H056</a>: "LICENSE PUBLIC DOMAIN"**

[Public Domain](https://en.wikipedia.org/wiki/Public-domain-equivalent_license) is not a license by itself, but consists of all the creative work to which
no exclusive intellectual property rights apply. If a project is under Public Domain and there is no license listed, the
[Unlicense](https://spdx.org/licenses/Unlicense) should be used as described in the [FAQ](faqs.md#what-license-should-i-use-for-public-domain).
[Public Domain](https://en.wikipedia.org/wiki/Public-domain-equivalent_license) is not a license by itself, but consists of all the creative work to which no exclusive intellectual property rights apply.
If a project is under Public Domain and there is no license listed, the [Unlicense](https://spdx.org/licenses/Unlicense) should be used.

#### **<a name="KB-H057">#KB-H057</a>: "TOOLS RENAME"**

Expand Down
6 changes: 0 additions & 6 deletions docs/faqs.md
Expand Up @@ -21,7 +21,6 @@ This section gathers the most common questions from the community related to pac
* [Can I remove an option from a recipe?](#can-i-remove-an-option-from-a-recipe)
* [Can I split a project into an installer and library package?](#can-i-split-a-project-into-an-installer-and-library-package)
* [What license should I use for Public Domain?](#what-license-should-i-use-for-public-domain)
* [What license should I use for a custom project specific license?](#what-license-should-i-use-for-a-custom-project-specific-license)
* [Why is a `tools.check_min_cppstd` call not enough?](#why-is-a-toolscheck_min_cppstd-call-not-enough)
* [What is the policy for adding older versions of a package?](#what-is-the-policy-for-adding-older-versions-of-a-package)
* [What is the policy for removing older versions of a package?](#what-is-the-policy-for-removing-older-versions-of-a-package)
Expand Down Expand Up @@ -173,11 +172,6 @@ No. Some projects provide more than a simple library, but also applications. For

[The Public Domain](https://fairuse.stanford.edu/overview/public-domain/welcome/) is not a license by itselt. Thus, we have [equivalent licenses](https://en.wikipedia.org/wiki/Public-domain-equivalent_license) to be used instead. By default, if a project uses Public Domain and there is no offcial license listed, you should use [Unlicense](https://spdx.org/licenses/Unlicense).

## What license should I use for a custom project specific license?

When a non standard open-source license is used, we have decided to use `LicenseRef-` as a prefix, followed by the name of the file which contains a custom license.
See [the reviewing guidlines](reviewing.md#license-attribute) for more details.

## Why is a `tools.check_min_cppstd` call not enough?

Very often C++ projects require a minimum standard version, such as 14 or 17, in order to compile. Conan offers tools which enable checking the relevant setting is enabled and above this support for a certain version is present. Otherwise, it uses the compiler's default.
Expand Down
4 changes: 0 additions & 4 deletions docs/how_to_add_packages.md
Expand Up @@ -188,10 +188,6 @@ project files as simple as possible, without the need of extra logic to handle d
The CI will explore all the folders and run the tests for the ones matching `test_*/conanfile.py` pattern. You can find the output of all
of them together in the testing logs.

> **Note.-** If, for any reason, it is useful to write a test that should only be checked using Conan v1, you can do so by using the pattern
> `test_v1_*/conanfile.py` for the folder. Please, have a look to [linter notes](v2_linter.md) to know how to prevent the linter from
> checking these files.
> Remember that the `test_<package>` recipes should **test the package configuration that has just been generated** for the _host_ context, otherwise
> it will fail in crossbuilding scenarios.
Expand Down
2 changes: 1 addition & 1 deletion docs/review_process.md
Expand Up @@ -138,7 +138,7 @@ PR is selected for the merge only if:
- PR is not a Draft.
- PR has a green status (successful build).
- PR doesn't have merge conflicts with `master` branch.
- PR has approved reviews (as described above).
- PR has 3 approved reviews (as described above).
- PR does not have any [official reviewers](#official-reviewers) requesting changes
- Master build is not running already (see below)

Expand Down
5 changes: 0 additions & 5 deletions docs/reviewing.md
Expand Up @@ -81,11 +81,6 @@ the order above resembles the execution order of methods on CI. therefore, for i

The mandatory license attribute of each recipe **should** be a [SPDX license](https://spdx.org/licenses/) [short Identifiers](https://spdx.dev/ids/) when applicable.

Outside cases of the SPDX guidelines should do the following:

- When no license is provided or when it's given to the "public domain", the value should be set to [Unlicense](https://spdx.org/licenses/Unlicense) as per [KB-H056](error_knowledge_base.md#kb-h056-license-public-domain) and [FAQ](faqs.md#what-license-should-i-use-for-public-domain).
- When a custom (e.g. project specific) license is given, the value should be set to `LicenseRef-` as a prefix, followed by the name of the file which contains a custom license. See [this example](https://github.com/conan-io/conan-center-index/blob/e604534bbe0ef56bdb1f8513b83404eff02aebc8/recipes/fft/all/conanfile.py#L8). For more details, [read this conversation](https://github.com/conan-io/conan-center-index/pull/4928/files#r596216206)

## Applying Patches

Patches can be applied in a different protected method, the pattern name is `_patch_sources`. When applying patch files, `tools.patch` is the best option.
Expand Down
21 changes: 0 additions & 21 deletions docs/v2_linter.md
@@ -1,12 +1,6 @@
Linter to help migration to Conan v2
====================================

<!-- toc -->
## Contents

* [Import ConanFile from `conan`](#import-conanfile-from-conan)
* [Import tools from `conan`](#import-tools-from-conan)<!-- endToc -->

On our [path to Conan v2](v2_roadmap.md) we are leveraging on custom Pylint rules. This
linter will run for every pull-request that is submitted to the repository and will
raise some warnings and errors that should be addressed in order to migrate the
Expand Down Expand Up @@ -48,18 +42,3 @@ class Recipe(ConanFile):
if not cross_building(self):
pass
```

# Disable linter for `test_v1_*/conanfile.py`

Using the pattern `test_v1_*/conanfile.py` you can write a test that will be executed using only Conan v1,
you probably don't want v2-migration linter to check this file, as it will likely contain syntax that is
specific to Conan v1.

To skip the file you just need to add the following comment to the file and `pylint` will skip it:

**`test_v1_*/conanfile.py`**
```python
# pylint: skip-file
from conans import ConanFile, CMake, tools
...
```
10 changes: 0 additions & 10 deletions recipes/aaf/all/conandata.yml
Expand Up @@ -6,21 +6,11 @@ patches:
"1.2.0":
- patch_file: "patches/1.2.0-001-simpler-cmakelists.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Simplify CMakeLists.txt"
- patch_file: "patches/1.2.0-002-link-core-with-find-library.patch"
base_path: "source_subfolder"
patch_type: "portability"
patch_description: "Link CoreFoundation and CoreServices with find_library"
- patch_file: "patches/1.2.0-003-remove-register-keyword.patch"
base_path: "source_subfolder"
patch_type: "portability"
patch_description: "Remove deprecated use of register keyword for c++11 builds"
- patch_file: "patches/1.2.0-004-remove-expat.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Remove expat dependency directory"
- patch_file: "patches/1.2.0-005-remove-libjpeg.patch"
base_path: "source_subfolder"
patch_type: "conan"
patch_description: "Remove libjpeg dependency directory"
4 changes: 2 additions & 2 deletions recipes/aaf/all/conanfile.py
@@ -1,4 +1,3 @@
from conan.tools.files import apply_conandata_patches
from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
import os
Expand Down Expand Up @@ -44,7 +43,8 @@ def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)

def build(self):
apply_conandata_patches(self)
for patch in self.conan_data.get("patches", {}).get(self.version, []):
tools.patch(**patch)

cmake = CMake(self)

Expand Down
3 changes: 0 additions & 3 deletions recipes/amgcl/all/conandata.yml
@@ -1,7 +1,4 @@
sources:
"1.4.3":
url: "https://github.com/ddemidov/amgcl/archive/1.4.3.tar.gz"
sha256: "e920d5767814ce697d707d1f359a16c9b9eb79eba28fe19e14c18c2a505fe0ad"
"1.4.2":
url: "https://github.com/ddemidov/amgcl/archive/1.4.2.tar.gz"
sha256: "db0de6b75e6c205f44542c3ac8d9935c8357a58072963228d0bb11a54181aea8"
Expand Down
2 changes: 0 additions & 2 deletions recipes/amgcl/config.yml
@@ -1,6 +1,4 @@
versions:
"1.4.3":
folder: all
"1.4.2":
folder: all
"1.4.0":
Expand Down
1 change: 0 additions & 1 deletion recipes/argon2/all/conanfile.py
Expand Up @@ -70,7 +70,6 @@ def build(self):
tools.replace_in_file(argon2_header, "__declspec(dllexport)", "")
tools.replace_in_file(vcxproj, "DynamicLibrary", "StaticLibrary")
tools.replace_in_file(vcxproj, "<ClCompile>", "<ClCompile><AdditionalIncludeDirectories>$(SolutionDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>")
tools.replace_in_file(vcxproj, "<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>", "")
if self.settings.compiler == "Visual Studio":
msbuild = MSBuild(self)
msbuild.build(os.path.join(self._source_subfolder, "Argon2.sln"), targets=("Argon2OptDll",))#, platforms={"x86": "Win32"})
Expand Down
3 changes: 0 additions & 3 deletions recipes/asio/all/conandata.yml
@@ -1,7 +1,4 @@
sources:
"1.23.0":
url: "https://github.com/chriskohlhoff/asio/archive/asio-1-23-0.tar.gz"
sha256: "facae7627ce6c716add3f328eee3d78c2e6e133a46ac5ecb80897b37ebacf05e"
"1.22.1":
url: "https://github.com/chriskohlhoff/asio/archive/asio-1-22-1.tar.gz"
sha256: "30cb54a5de5e465d10ec0c2026d6b5917f5e89fffabdbabeb1475846fc9a2cf0"
Expand Down
2 changes: 0 additions & 2 deletions recipes/asio/config.yml
@@ -1,6 +1,4 @@
versions:
"1.23.0":
folder: all
"1.22.1":
folder: all
"1.22.0":
Expand Down
3 changes: 0 additions & 3 deletions recipes/benchmark/all/conandata.yml
Expand Up @@ -23,6 +23,3 @@ sources:
"1.6.1":
url: "https://github.com/google/benchmark/archive/v1.6.1.tar.gz"
sha256: "6132883bc8c9b0df5375b16ab520fac1a85dc9e4cf5be59480448ece74b278d4"
"1.6.2":
url: "https://github.com/google/benchmark/archive/v1.6.2.tar.gz"
sha256: "6adf850c2be6aa15843c94ac63d0819d5bf9f5678ae41244f25a1f4bf9480827"
2 changes: 0 additions & 2 deletions recipes/benchmark/config.yml
Expand Up @@ -15,5 +15,3 @@ versions:
folder: all
"1.6.1":
folder: all
"1.6.2":
folder: all
3 changes: 0 additions & 3 deletions recipes/bertrand/all/conandata.yml
Expand Up @@ -11,6 +11,3 @@ sources:
0.0.17:
url: https://github.com/bernedom/bertrand/archive/0.0.17.tar.gz
sha256: 72e59971bd8ae48d95da9337ad78004b99ba4e8d0eeb3b613ce17b577ca41012
"0.013":
url: "https://github.com/bernedom/bertrand/archive/0.013.tar.gz"
sha256: "f2f071006d3a9b31382957b84e81405adba44cbf1a9bb8242ad4d0f44d7af7fb"
2 changes: 0 additions & 2 deletions recipes/bertrand/config.yml
Expand Up @@ -7,5 +7,3 @@ versions:
folder: all
0.0.17:
folder: all
"0.013":
folder: all
9 changes: 6 additions & 3 deletions recipes/bitmagic/all/conandata.yml
@@ -1,7 +1,4 @@
sources:
"7.12.3":
url: "https://github.com/tlk00/BitMagic/archive/refs/tags/v7.12.3.tar.gz"
sha256: "5e59507a01a8295bb57aebcf557a4a25b992244736f7924300cdb9635f1b2780"
"7.11.2":
url: "https://github.com/tlk00/BitMagic/archive/refs/tags/v7.11.2.tar.gz"
sha256: "09faf5b9da4e0cee4947e05b7af0bd834e63e90c8877c115b719b4f390709a6f"
Expand All @@ -23,3 +20,9 @@ sources:
"7.5.0":
url: "https://github.com/tlk00/BitMagic/archive/refs/tags/v7.5.0.tar.gz"
sha256: "dec7d316baf3be9cb058d9da302a7e4cb694ac429d4bd29138c24b1b0157a9e8"
"7.4.0":
url: "https://github.com/tlk00/BitMagic/archive/refs/tags/v7.4.0.tar.gz"
sha256: "80304bcfde1f263b2a680f6cf7b22aa72c757d7214688ec74de626778d332fb9"
"7.3.1":
url: "https://github.com/tlk00/BitMagic/archive/refs/tags/v7.3.1.tar.gz"
sha256: "a45a764c3519d64afdc734a6606645007e102aef799390a36426d2dc77919303"
22 changes: 14 additions & 8 deletions recipes/bitmagic/all/conanfile.py
Expand Up @@ -11,23 +11,26 @@ class BitmagicConan(ConanFile):
"promote combination of hardware optimizations and on the fly compression to fit " \
"inverted indexes and binary fingerprints into memory, minimize disk and network footprint."
license = "Apache-2.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "http://bitmagic.io"
topics = ("information-retrieval", "algorithm", "bit-manipulation",
topics = ("bitmagic", "information-retrieval", "algorithm", "bit-manipulation",
"integer-compression", "sparse-vector", "sparse-matrix", "bit-array",
"bit-vector", "indexing-engine", "adjacency-matrix", "associative-array")
settings = "os", "arch", "compiler", "build_type"
homepage = "http://bitmagic.io"
url = "https://github.com/conan-io/conan-center-index"
settings = "compiler"
no_copy_source = True

@property
def _source_subfolder(self):
return "source_subfolder"

def package_id(self):
self.info.header_only()

def _minimum_compilers_version(self, cppstd):
standards = {
"11": {
"Visual Studio": "15",
"gcc": "4.8",
"clang": "4",
"apple-clang": "9",
},
"17": {
"Visual Studio": "16",
"gcc": "7",
Expand All @@ -39,7 +42,7 @@ def _minimum_compilers_version(self, cppstd):

@property
def _cppstd(self):
return "17"
return "11" if tools.Version(self.version) < "7.5.0" else "17"

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
Expand All @@ -52,6 +55,9 @@ def validate(self):
else:
self.output.warn("{0} requires C++{1}. Your compiler is unknown. Assuming it supports C++{1}.".format(self.name, self._cppstd))

def package_id(self):
self.info.header_only()

def source(self):
tools.get(**self.conan_data["sources"][self.version],
destination=self._source_subfolder, strip_root=True)
Expand Down
3 changes: 1 addition & 2 deletions recipes/bitmagic/all/test_package/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.1)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
Expand All @@ -8,4 +8,3 @@ find_package(bitmagic REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} bitmagic::bitmagic)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
6 changes: 4 additions & 2 deletions recipes/bitmagic/config.yml
@@ -1,6 +1,4 @@
versions:
"7.12.3":
folder: all
"7.11.2":
folder: all
"7.10.3":
Expand All @@ -15,3 +13,7 @@ versions:
folder: all
"7.5.0":
folder: all
"7.4.0":
folder: all
"7.3.1":
folder: all
3 changes: 0 additions & 3 deletions recipes/bshoshany-thread-pool/all/conandata.yml
@@ -1,7 +1,4 @@
sources:
"3.1.0":
sha256: "c8b70ee63822ee21f25c201806e464100686b1faca5aeabeee96378d2a2c3be8"
url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v3.1.0.tar.gz"
"3.0.0":
sha256: "c36052b28b4f28698a6d6f3ad988d7979f6bf6823ebf2af2074714fde15dc19c"
url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v3.0.0.tar.gz"
47 changes: 12 additions & 35 deletions recipes/bshoshany-thread-pool/all/test_package/test_package.cpp
@@ -1,48 +1,25 @@
#include "BS_thread_pool.hpp"

BS::synced_stream sync_out;
BS::thread_pool pool;

BS::concurrency_t count_unique_threads()
void store_ID(std::thread::id* location)
{
const BS::concurrency_t num_tasks = pool.get_thread_count() * 2;
std::vector<std::thread::id> thread_IDs(num_tasks);
std::mutex ID_mutex, total_mutex;
std::condition_variable ID_cv, total_cv;
std::unique_lock<std::mutex> total_lock(total_mutex);
BS::concurrency_t total_count = 0;
bool ID_release = false;
pool.wait_for_tasks();
for (std::thread::id& id : thread_IDs)
pool.push_task(
[&]
{
id = std::this_thread::get_id();
{
const std::scoped_lock total_lock_local(total_mutex);
++total_count;
}
total_cv.notify_one();
std::unique_lock<std::mutex> ID_lock_local(ID_mutex);
ID_cv.wait(ID_lock_local, [&] { return ID_release; });
});
total_cv.wait_for(total_lock, std::chrono::milliseconds(500), [&] { return total_count == pool.get_thread_count(); });
{
const std::scoped_lock ID_lock(ID_mutex);
ID_release = true;
}
ID_cv.notify_all();
total_cv.wait_for(total_lock, std::chrono::milliseconds(500), [&] { return total_count == num_tasks; });
std::sort(thread_IDs.begin(), thread_IDs.end());
return static_cast<BS::concurrency_t>(std::unique(thread_IDs.begin(), thread_IDs.end()) - thread_IDs.begin());
*location = std::this_thread::get_id();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}

int main()
{
BS::synced_stream sync_out;
const char* line = "------------------------------------------";
sync_out.println(line);
sync_out.println("Testing thread pool...");
BS::concurrency_t unique_threads = count_unique_threads();
BS::thread_pool pool;
std::vector<std::thread::id> thread_IDs(pool.get_thread_count() * 4);
BS::multi_future<void> futures;
for (std::thread::id& id : thread_IDs)
futures.f.push_back(pool.submit(store_ID, &id));
futures.wait();
std::sort(thread_IDs.begin(), thread_IDs.end());
BS::concurrency_t unique_threads = (BS::concurrency_t)(std::unique(thread_IDs.begin(), thread_IDs.end()) - thread_IDs.begin());
if (pool.get_thread_count() == unique_threads)
{
sync_out.println("SUCCESS: Created ", unique_threads, " unique threads!");
Expand Down
2 changes: 0 additions & 2 deletions recipes/bshoshany-thread-pool/config.yml
@@ -1,5 +1,3 @@
versions:
"3.1.0":
folder: all
"3.0.0":
folder: all

0 comments on commit f2a8ee8

Please sign in to comment.