-
Notifications
You must be signed in to change notification settings - Fork 166
gstreamer1.0-plugins-base: Add bbappend to apply patches from external git repo #1349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
gstreamer1.0-plugins-base: Add bbappend to apply patches from external git repo #1349
Conversation
…l git repo - Fetched additional patches and series file from external Git repository - Imported and applied patches in series file order using quilt import and push - Skipped patches prefixed with '#' in the series file (treated as comments) Signed-off-by: Raja Ganapathi Busam <rbusam@qti.qualcomm.com>
|
I'm sorry, this is a nice hack, but no. Please follow the usual process: add the patches to the layer repo instead of storing them in the external repo. Contribute all the patches to the upstream project, UBWC compression should be supported upstream, it doesn't differ any other compression schemes. |
|
@lumag As canonical suggesting hosting in separate repo instead of putting patches along with distribution and we would like to maintain patches in one central repo for all distributions and our team had initial discussion with Nico and explained the reason to host in Github @ndechesne could you please comment your feedback here. |
|
There are complications in upstreaming patches related to the UBWC (Universal Bandwidth Compression) format. Since UBWC is a proprietary format, we cannot provide the pack/unpack logic in open source. The upstream community does not accept a packed format without corresponding pack/unpack implementations. We are actively collaborating with the community to find a way forward, but this will take time to reach alignment. |
|
hi. this is indeed aligned with what we discussed (privately), but let's discuss that here now. I proposed to manage gstreamer in a different way because it has , I think, different challenges.
I understand it is not the standard way to host patches for OE recipes, but it's a practical solution to help us overall. |
| SRCREV_qti_patches = "${AUTOREV}" | ||
|
|
||
| qcom_do_patch() { | ||
| PATCHREPO="${WORKDIR}/sources/patchrepo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start as do_patch_
Can you name this more appropriately in the purpose?
| esac | ||
|
|
||
| if [ -f "${PATCHREPO}/${p}" ]; then | ||
| quilt import "${PATCHREPO}/${p}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to depend on quit-native
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my understanding, Yocto uses quilt as the default PATCHTOOL.
Since this function runs inside do_patch:append, the environment already ensures quilt-native is available.
Therefore, we do not need to explicitly add DEPENDS += "quilt-native" in the .bbappend file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course you need to do it. If something is changed in OE-Core then your recipe gets broken.
| git://github.com/Raja-Ganapathi-Busam/gst-qti-oss-patches.git;protocol=ssh;user=git;branch=${PV};name=qti_patches;destsuffix=patchrepo;subpath=${BPN} \ | ||
| " | ||
|
|
||
| SRCREV_qti_patches = "${AUTOREV}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no AUTOREV, we only rely on fixed content/metadata in meta-qcom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our intention is to avoid making changes in meta-qcom repo if there is any update in patches repo.
Please suggest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no other way around. You need to make changes to meta-qcom when you change the version of the software we build in meta-qcom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 here. If you make changes to your repo, it is a different version, a different recipe revision and a different set of packages. The item will go away once you drop the custom do_patch implementation and use OE's one (together with using raw URIs)
| @@ -0,0 +1,37 @@ | |||
| # To apply patches to support Qualcomm specific formats and fixes | |||
| SRC_URI:append:qcom = " \ | |||
| git://github.com/Raja-Ganapathi-Busam/gst-qti-oss-patches.git;protocol=ssh;user=git;branch=${PV};name=qti_patches;destsuffix=patchrepo;subpath=${BPN} \ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the patches are available in a public http link, perhaps we could list them here directly. that might be a better approach that strictly depending on an external git tree.
a link like this one (this is just an example)
At least you wouldn't need to have a custom do_patch implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are in process of making git://github.com/qualcomm/gst-qti-oss-patches public. Meanwhile, we would like to have a review of our approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are in the process of making the patches repository public.
Once it becomes publicly accessible, I will update the link accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, and I made the review in this context. I am not saying that the link is not public, but suggesting a different approach. Instead of downloading the whole tree and manually applying the patches yourself in the qcom_do_patch() function, you can list all the patches as http:// links SRC_URI.
That way, you still preserver your tree with standalone patches which is convenient for what we discussed, and we still integrate patches 'normally' (almost) from an OE metadata perspective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, and I made the review in this context. I am not saying that the link is not public, but suggesting a different approach. Instead of downloading the whole tree and manually applying the patches yourself in the qcom_do_patch() function, you can list all the patches as http:// links SRC_URI.
That way, you still preserver your tree with standalone patches which is convenient for what we discussed, and we still integrate patches 'normally' (almost) from an OE metadata perspective
I think that is also what as suggested by me in the meetings before the solstice break. Having a custom do_patch is very fragile and rarely required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can still point out the raw URIs inside your repo (and change them later to the official one once it's public).
|
Okay.
This will not work in a long term. Ubuntu, Debian, Fedora and OE will have different versions of the GStreamer. At some point your patches won't be unuquelly applicable to those versions, so you will have to have separate branches or revisions. Having that in mind it is much easier to incorporate those patches into the distro package as it is usually done. I definitely don't expect Debian / Ubuntu packages fetching additional repo during the build stage.
UBWC format has been reverse engineered. There was another study of the compressed formats, which I can find quickly at this moment. As such, I can only recommend actually defining the compress and decompress functions and following Gstreamer requirements. Other projects would also benefit from it. We have hard time testing the UBWC support on the display side because there is no defined way to create or validate generated UBWC images. |
| } | ||
|
|
||
| python do_patch:append:qcom() { | ||
| bb.build.exec_func('qcom_do_patch', d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for not extending the function directly?
Summary
This PR adds
bbappendfile to thegstreamer1.0-plugins-baserecipe to append additional patches from an external series file after the base recipe patches. The patches are imported usingquiltin the correct order and applied after existing patches.Key Changes
seriesfile from external Git repository#in the series file (treated as comments).Temporary Setup
There is a separate pull request raised on the patches repository which is pending review and merge.
Until that PR is merged,
SRC_URIin this recipe points to my forked repository to fetch the patches.Merge Condition
Please merge this PR only after the patches PR is merged in the patches repository,
gst-qti-oss-patches, to ensure consistency.Testing
seriesfile.#) in the series file, if any, are skipped.