Various improvements: Multi sources support, patches, variables, auto generated packages#25
Merged
Conversation
Collaborator
Author
|
FYI @akritkbehera |
smuzaffar
marked this pull request as ready for review
August 13, 2025 12:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes following updates which make building/configuring packages easy. All these changes should be backward compatible and should not change/rebuilt existing packages (if package recipe is not changed). See [a] for a example package recipe
Support for non-git based sources. This also allows to have multiple sources for a package e.g.
RocMhas around 30 binary sources which one can not push to github. Havingsources:in the package recipe will override defaultsource:. For each sourcebits buildwill setSOURCEnenv variable (wherenis source number starting with0for first source). In build recipe one can use$SOURCEDIR/$SOURCE0to access the first source.SOURCE_COUNTenv will be set to point to total number of sources. Changes in expandedsourceswill result in changed hash of package and should trigger a re-buildSupport for providing patches from the local build recipe config directory. patches should be available in the
recipe_dir/patchese.g.general.bit/patches.bits buildwill setPATCHnenv variable (wherenis patch number starting with0for first patch). In build recipe one can use$SOURCEDIR/$PATCH0to access the first patch.PATCH_COUNTenv will be set to point to total number of patches. Change in the patch content will result in the change of package hash and should re-trigger the buildOne can add configuration parameters via
variables:. One can use these to substitute values withinvariables, sources, patches and prepend_pathvariables using%(variable_name)s. It can also recursively expand variables e.g.%%(%(v1)s_%(v2)s)swill be first expanded to%(<v1_value>_<v2_value>)sand then it will be expanded to the value of<v1_value>_<v2_value>. This is helpful when there are different sources based on arch or some configuration parameters. variables do not change the hash of package unless used by the packagerecipe/sources/patchesetc. Also addedroot_dirin the known variables which expands to${<PACKAGE_NAME>_ROOT}. this is helpful for adding prepend_path e.g. instead ofone can do
it helps when one copy/paste the package recipes
Added support to auto-generate packages without having their
<package>.shfile. This is helpful for generating python's pip based packages using therequirements.txtfile or generate data packages which has the same build recipe but different package repos and tags.Newly generated
init.shfile now do something like the following i.e. check if directory existsalso added
lib64in the defaultLD_LIBRARY_PATHof packagevariablesor explicitly has addedexpand_recipe: truethenbitswill expand the build recipe too e.g. it will replace all%(var_name)swith the value ofvar_name[a]