Skip to content

Commit

Permalink
(#13736) docs: Create a subfolder for "adding packages"
Browse files Browse the repository at this point in the history
* docs: group files about "adding packages"

* fixing links

* fixing links

* rename file

* minor changes

* fix merge conflicts

* touch ups

* fix order

* fix links

* Clean up notes

* Update docs/error_knowledge_base.md

* Update docs/developing_recipes_locally.md

* merge conflicts

* Apply suggestions from code review
  • Loading branch information
Chris Mc authored Nov 15, 2022
1 parent 0e0f7f8 commit edacf97
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 87 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ To contribute follow the next steps:

1. Comment in the corresponding issue that you want to contribute the package/fix proposed. If there is no open issue, we strongly suggest
opening one to gather feedback.
2. Make sure to [request access](docs/how_to_add_packages.md#request-access) and be aware there is a [CLA](docs/CONTRIBUTOR_LICENSE_AGREEMENT.md).
2. Make sure to [request access](docs/adding_packages/README.md#request-access) and be aware there is a [CLA](docs/CONTRIBUTOR_LICENSE_AGREEMENT.md).
3. Get setup by following the [Developing Recipes](docs/developing_recipes_locally.md) guide and learn the basic commands.
4. Check the [How To Add Packages](docs/how_to_add_packages.md) page for the break down of ConanCenterIndex specific conventions and practices.
4. Check the [How To Add Packages](docs/adding_packages/README.md) page for the break down of ConanCenterIndex specific conventions and practices.
5. In your fork create a `package/xxx` branch from the `master` branch and develop
your fix/packages as discussed in previous step.
6. [Submit a pull request](docs/how_to_add_packages.md#submitting-a-package) once you are ready. This can be when you
6. [Submit a pull request](docs/adding_packages/README.md#submitting-a-package) once you are ready. This can be when you
got everything working or even if you need help. Add the text to the issue body (besides other comments): "fixes #IssueNumber"
in the body of the PR, referring to the issue of step 1.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ All the documentation is available in this same repository in the [`docs/` subfo

This is a list of shortcuts to some interesting topics:

* :rocket: If you want to learn how to **contribute new recipes**, please read [docs/how_to_add_packages.md](docs/how_to_add_packages.md).
* :rocket: If you want to learn how to **contribute new recipes**, please read [docs/adding_packages/](docs/adding_packages/README.md).
* :speech_balloon: **FAQ**: most common questions are listed in [docs/faqs.md](docs/faqs.md).
* :warning: The conan-center **hook errors** reported by CCI Bot can be found in the [docs/error_knowledge_base.md](docs/error_knowledge_base.md).
* :hammer_and_wrench: The internal changes related to infrastructure can be checked in [docs/changelog.md](docs/changelog.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When pull requests are merged, the CI will upload the generated packages to the
* User documentation
+ [Contributing to Conan Center Index](../CONTRIBUTING.md)
+ [Developing Recipes Locally](developing_recipes_locally.md)
+ [Adding Packages to ConanCenter](how_to_add_packages.md) :point_left: Best place to learn how to contribute
+ [Adding Packages to ConanCenter](adding_packages/README.md) :point_left: Best place to learn how to contribute
+ [Errors from the conan-center hook (KB-Hxxx)](error_knowledge_base.md)
+ [Review Process](review_process.md)
+ [Labels](labels.md)
Expand Down
39 changes: 20 additions & 19 deletions docs/how_to_add_packages.md → docs/adding_packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ConanCenterIndex aims to provide the best quality packages of any open source project.
Any C/C++ project can be made available by contributing a "recipe".

Getting started is easy. Try building an existing package with our [developing recipes](developing_recipes_locally.md) tutorial.
Getting started is easy. Try building an existing package with our [developing recipes](../developing_recipes_locally.md) tutorial.
To deepen you understanding, start with the [How to provide a good recipe](#how-to-provide-a-good-recipe) section.
You can follow the three steps (:one: :two: :three:) described below! :tada:

Expand Down Expand Up @@ -37,14 +37,16 @@ You can follow the three steps (:one: :two: :three:) described below! :tada:

:one: The first step to add packages to ConanCenter is requesting access. To enroll in ConanCenter repository, please write a comment
requesting access in this GitHub [issue](https://github.com/conan-io/conan-center-index/issues/4). Feel free to introduce yourself and
your motivation to join ConanCenter.
your motivation to join ConanCenter community.

This process helps conan-center-index against spam and malicious code. The process is not not automated on purpose and the requests are generally approved on a weekly basis.
This process helps ConanCenter against spam and malicious code. The process is not not automated on purpose and the requests are generally approved
on a weekly basis.

> :warning: The requests are reviewed manually, checking the GitHub profile activity of the requester to avoid a misuse of the service. In case of detecting a misuse or inappropriate behavior, the requester will be dropped from the authorized users list and at last instance even banned from the repository.
> **Note** The requests are reviewed manually, checking the GitHub profile activity of the requester to avoid any misuse of the service.
> All interactions are subject to the expectations of the [code of conduct](../code_of_conduct.md). Any misuse or inappropriate behavior are subject
> to the same principals.
When submitting a pull request for the first time, you will be prompted to sign the [CLA](CONTRIBUTOR_LICENSE_AGREEMENT.md) for your code contributions.
You can view your signed CLA's by going to <https://cla-assistant.io/> and signing in.
When submitting a pull request for the first time, you will be prompted to sign the [CLA](../CONTRIBUTOR_LICENSE_AGREEMENT.md) for your code contributions. You can view your signed CLA's by going to <https://cla-assistant.io/> and signing in.


## Inactivity and user removal
Expand All @@ -61,18 +63,18 @@ In case you are interested in coming back, please, ask again to be included in t
The specific steps to add new packages are:

* Fork the [conan-center-index](https://github.com/conan-io/conan-center-index) git repository, and then clone it locally.
* Copy a template from [package_templates](package_templates) folder in the recipes/ folder and rename it to the project name (it should be lower-case). Read templates [documentation](package_templates/README.md) to find more information.
* Copy a template from [package_templates](../package_templates) folder in the recipes/ folder and rename it to the project name (it should be lower-case). Read templates [documentation](../package_templates/README.md) to find more information.
* Make sure you are using the latest [Conan client](https://conan.io/downloads) version, as recipes might evolve introducing features of the newer Conan releases.
* Commit and Push to GitHub then submit a pull request.
* Our automated build service will build 100+ different configurations, and provide messages that indicate if there were any issues found during the pull request on GitHub.

:three: When the pull request is [reviewed and merged](review_process.md), those packages are published to [JFrog ConanCenter](https://conan.io/center/) and available for everyone.
:three: When the pull request is [reviewed and merged](../review_process.md), those packages are published to [JFrog ConanCenter](https://conan.io/center/) and available for everyone.

### The Build Service

The **build service** associated to this repo will generate binary packages automatically for the most common platforms and compilers. See [the Supported Platforms and Configurations page](supported_platforms_and_configurations.md) for a list of generated configurations. For a C++ library, the system is currently generating more than 100 binary packages.
The **build service** associated to this repo will generate binary packages automatically for the most common platforms and compilers. See [the Supported Platforms and Configurations page](../supported_platforms_and_configurations.md) for a list of generated configurations. For a C++ library, the system is currently generating more than 100 binary packages.

> ⚠️ **Note**: This not a testing service, it is a binary building service for package **released**. Unit tests shouldn't be built nor run in recipes by default, see the [FAQs](faqs.md#why-conancenter-does-not-build-and-execute-tests-in-recipes) for more. Before submitting a pull request, please ensure that it works locally for some configurations.
> ⚠️ **Note**: This not a testing service, it is a binary building service for package **released**. Unit tests shouldn't be built nor run in recipes by default, see the [FAQs](../faqs.md#why-conancenter-does-not-build-and-execute-tests-in-recipes) for more. Before submitting a pull request, please ensure that it works locally for some configurations.
- The CI bot will start a new build only after the author is approved. Your PR may be reviewed in the mean time, but is not guaranteed.
- The CI system will also report with messages in the PR any error in the process, even linking to the logs to see more details and debug.
Expand Down Expand Up @@ -202,7 +204,7 @@ The CI will explore all the folders and run the tests for the ones matching `tes
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
> `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
Expand All @@ -215,12 +217,12 @@ The [recipes](https://github.com/conan-io/conan-center-index/tree/master/recipes
### Header Only
If you are looking for header-only projects, you can take a look on [header-only template](package_templates/header_only).
If you are looking for header-only projects, you can take a look on [header-only template](../package_templates/header_only).
Also, Conan Docs has a section about [how to package header-only libraries](https://docs.conan.io/en/latest/howtos/header_only.html).
### CMake
For C/C++ projects which use CMake for building, you can take a look on [cmake package template](package_templates/cmake_package).
For C/C++ projects which use CMake for building, you can take a look on [cmake package template](../package_templates/cmake_package).
#### Components
Expand All @@ -240,7 +242,7 @@ For cases where a project only offers source files, but not a build script, you
### System Packages
> :information_source: For exceptional cases where only system packages can be used and a regular Conan package may result in an incompatible and fragile package, a separated system package may be created. See the [FAQs](faqs.md#can-i-install-packages-from-the-system-package-manager) for more.
> :information_source: For exceptional cases where only system packages can be used and a regular Conan package may result in an incompatible and fragile package, a separated system package may be created. See the [FAQs](../faqs.md#can-i-install-packages-from-the-system-package-manager) for more.
The [SystemPackageTool](https://docs.conan.io/en/latest/reference/conanfile/methods.html#systempackagetool) can easily manage a system package manager (e.g. apt,
pacman, brew, choco) and install packages which are missing on Conan Center but available for most distributions. It is key to correctly fill in the `cpp_info` for the consumers of a system package to have access to whatever was installed.
Expand Down Expand Up @@ -278,14 +280,13 @@ An example of this can be found in the [sdl_image recipe](https://github.com/con
The system will use the [conan-center hook](https://github.com/conan-io/hooks) to perform some quality checks. These are required for the
the CI to merge any pull request.

Follow the [Developing Recipes Locally](developing_recipes_locally.md#installing-the-conancenter-hooks) guide for instructions.
Follow the [Developing Recipes Locally](../developing_recipes_locally.md#installing-the-conancenter-hooks) guide for instructions.

Go to the [Error Knowledge Base](error_knowledge_base.md) page to know more about Conan Center hook errors.
Go to the [Error Knowledge Base](../error_knowledge_base.md) page to know more about Conan Center hook errors.
Some common errors related to Conan can be found on the [troubleshooting](https://docs.conan.io/en/latest/faq/troubleshooting.html) section.

### Linters

Linters are always executed by Github actions to validate parts of your recipe, for instance, if it uses migrated Conan tools imports.
All executed linters are documented in [linters.md](linters.md).
Check the [Developing Recipes](developing_recipes_locally.md#running-the-python-linters) page for running them locally.
Check the [Developing Recipes](developing_recipes_locally.md#running-the-python-linters) for running them locally.
All executed linters are documented in [linters.md](../linters.md).
Check the [Developing Recipes](../developing_recipes_locally.md#running-the-python-linters) page for running them locally.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# conandata.yml

[conandata.yml](https://docs.conan.io/en/latest/reference/config_files/conandata.yml.html) is a [YAML](https://yaml.org/) file to provide declarative data for the recipe (which is imperative). `conandata.yml` is a built-in Conan feature (available since 1.22.0) without a fixed structure, but ConanCenterIndex uses it for its own purposes and imposes some requirements.
[conandata.yml](https://docs.conan.io/en/latest/reference/config_files/conandata.yml.html) is a [YAML](https://yaml.org/)
file to provide declarative data for the recipe (which is imperative). This is a built-in Conan feature (available since
1.22.0) without a fixed structure, but ConanCenter has a specific format to ensure quality of recipes.

In the context of ConanCenterIndex, this file is mandatory and consists of two main sections that we will explain in the next sections with more detail:
In the context of ConanCenterIndex, this file is _mandatory_ and consists of two main sections that will be explained in the
next sections with more detail:

* `sources`: Library sources origin with their verification checksums. Freeform structure specific to a recipe.
* `patches`: Details about the different patches the library needs along with details for traceability.
Expand Down Expand Up @@ -128,7 +131,10 @@ Also, you may use [sha256sum](https://linux.die.net/man/1/sha256sum) command ([w

Sometimes sources provided by project require patching for various reasons. The `conandata.yml` file is the right place to indicate this information as well.

This section follows the same pattern as the `sources` above: one entry per version with a list of patches to apply.
> **Note**: Under our mission to ensure quality, patches undergo extra scrutiny. **Make sure to review** our
> [Patching Policy](policy_patching.md) to understand the requirements before adding any.

This section follows the same pattern as the `sources` above - one entry per version with a list of patches to apply.

```yaml
patches:
Expand Down Expand Up @@ -215,7 +221,7 @@ As sources with backports don't act exactly the same as the version officially r

#### patch_source

_Optional_
_Recommended_

`patch_source` is the URL from where patch was taken from. https scheme is preferred, but other URLs (e.g. git/svn/hg) are also accepted if there is no alternative. Types of patch sources are:

Expand Down
Loading

0 comments on commit edacf97

Please sign in to comment.