SlideShare uma empresa Scribd logo
1 de 15
Contributing to Upstream Open Source Projects Best Practices for the Yocto Project Team Scott Garman <scott.a.garman@intel.com> http://yoctoproject.org February 15, 2011
Getting to the Point When submitting patches to upstream projects, the name  of  the game is making it as convenient as possible  for the maintainers  to accept and integrate your patch.
Do Your Homework ,[object Object]
Does it: ,[object Object]
Add a feature (that the maintainer wants)?
Add a new test case to their test suite? The benefit of the patch should be articulated clearly and concisely.
Research How Upstream Projects Accept Patches ,[object Object]
Look for HACKING or README files in the source tree
Review project mailing list archives to find previous examples of patch submissions
Examples of Well-Organized Project Participation Guidelines OpenEmbedded: http://openembedded.org/index.php/How_to_submit_a_patch_to_OpenEmbedded GCC: http://gcc.gnu.org/contribute.html Mozilla: https://developer.mozilla.org/En/Developer_Guide/How_to_Submit_a_Patch GNOME: http://live.gnome.org/GnomeLove/SubmittingPatches
What NOT To Do ,[object Object]
Submit a compressed patch using gzip or similar tools
Submit a patch without a clear explanation of what it does and why
Use language that could be interpreted as being critical of the project, its code, or its members * Possible exceptions may include critical security bugs or if the project's contribution instructions explicitly ask you to submit patches to individuals
Making Your Patch a Slam-dunk: Follow the project's coding style ,[object Object]

Mais conteúdo relacionado

Mais procurados

DjangoCon 2013 - How to Write Fast and Efficient Unit Tests in Django
DjangoCon 2013 - How to Write Fast and Efficient Unit Tests in DjangoDjangoCon 2013 - How to Write Fast and Efficient Unit Tests in Django
DjangoCon 2013 - How to Write Fast and Efficient Unit Tests in Django
Casey Kinsey
 
Django strategy-test
Django strategy-testDjango strategy-test
Django strategy-test
Royce Haynes
 
Egit democamp-karlsruhe-2011-11-29
Egit democamp-karlsruhe-2011-11-29Egit democamp-karlsruhe-2011-11-29
Egit democamp-karlsruhe-2011-11-29
Stefan Lay
 

Mais procurados (20)

GitLab as an Alternative Development Platform for Github.com
GitLab as an Alternative Development Platform for Github.comGitLab as an Alternative Development Platform for Github.com
GitLab as an Alternative Development Platform for Github.com
 
Basics of Open Source Contribution - WWCodeMobile
Basics of Open Source Contribution - WWCodeMobileBasics of Open Source Contribution - WWCodeMobile
Basics of Open Source Contribution - WWCodeMobile
 
Git and Gerrit Code Review - Tech Talk - 2010_09_23
Git and Gerrit Code Review - Tech Talk - 2010_09_23Git and Gerrit Code Review - Tech Talk - 2010_09_23
Git and Gerrit Code Review - Tech Talk - 2010_09_23
 
Is TDD dead or alive?
Is TDD dead or alive?Is TDD dead or alive?
Is TDD dead or alive?
 
How to become open stack upstream contributor openstack days krakow 2018
How to become open stack upstream contributor   openstack days krakow 2018How to become open stack upstream contributor   openstack days krakow 2018
How to become open stack upstream contributor openstack days krakow 2018
 
It's all about feedback - code review as a great tool in the agile toolbox
It's all about feedback - code review as a great tool in the agile toolboxIt's all about feedback - code review as a great tool in the agile toolbox
It's all about feedback - code review as a great tool in the agile toolbox
 
ESE 2010: Using Git in Eclipse
ESE 2010: Using Git in EclipseESE 2010: Using Git in Eclipse
ESE 2010: Using Git in Eclipse
 
Let's Git Together! - Hacktoberfest 2020
Let's Git Together! - Hacktoberfest 2020Let's Git Together! - Hacktoberfest 2020
Let's Git Together! - Hacktoberfest 2020
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHub
 
DjangoCon 2013 - How to Write Fast and Efficient Unit Tests in Django
DjangoCon 2013 - How to Write Fast and Efficient Unit Tests in DjangoDjangoCon 2013 - How to Write Fast and Efficient Unit Tests in Django
DjangoCon 2013 - How to Write Fast and Efficient Unit Tests in Django
 
An Introduction to Travis-CI
An Introduction to Travis-CIAn Introduction to Travis-CI
An Introduction to Travis-CI
 
OSGi Versioning & Testing
OSGi Versioning & TestingOSGi Versioning & Testing
OSGi Versioning & Testing
 
Django strategy-test
Django strategy-testDjango strategy-test
Django strategy-test
 
Github, Travis-CI and Perl
Github, Travis-CI and PerlGithub, Travis-CI and Perl
Github, Travis-CI and Perl
 
Git, github and the hacktober fest
Git, github and the hacktober festGit, github and the hacktober fest
Git, github and the hacktober fest
 
Hacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginners
 
Egit democamp-karlsruhe-2011-11-29
Egit democamp-karlsruhe-2011-11-29Egit democamp-karlsruhe-2011-11-29
Egit democamp-karlsruhe-2011-11-29
 
Gerrit Code Review with GitHub plugin
Gerrit Code Review with GitHub pluginGerrit Code Review with GitHub plugin
Gerrit Code Review with GitHub plugin
 
You can git
You can gitYou can git
You can git
 
Hacktoberfest 2020
Hacktoberfest 2020Hacktoberfest 2020
Hacktoberfest 2020
 

Semelhante a Contributing to Upstream Open Source Projects

Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
Syed Armani
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Process
openstackindia
 

Semelhante a Contributing to Upstream Open Source Projects (20)

Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
A Git MVP Workflow
A Git MVP WorkflowA Git MVP Workflow
A Git MVP Workflow
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
 
Best practices for DuraMat software dissemination
Best practices for DuraMat software disseminationBest practices for DuraMat software dissemination
Best practices for DuraMat software dissemination
 
Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Process
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizations
 
Migrating To GitHub
Migrating To GitHub  Migrating To GitHub
Migrating To GitHub
 
Best practices for DuraMat software dissemination
Best practices for DuraMat software disseminationBest practices for DuraMat software dissemination
Best practices for DuraMat software dissemination
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
Technical Seminar Series: GIT Pull Requests Best Practices
Technical Seminar Series:  GIT Pull Requests Best PracticesTechnical Seminar Series:  GIT Pull Requests Best Practices
Technical Seminar Series: GIT Pull Requests Best Practices
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
Dreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developersDreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developers
 
Introduction to Git for Force.com Developers
Introduction to Git for Force.com DevelopersIntroduction to Git for Force.com Developers
Introduction to Git for Force.com Developers
 
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfWorkshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdf
 
GitHub Copilot.pptx
GitHub Copilot.pptxGitHub Copilot.pptx
GitHub Copilot.pptx
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developers
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Contributing to Upstream Open Source Projects

  • 1. Contributing to Upstream Open Source Projects Best Practices for the Yocto Project Team Scott Garman <scott.a.garman@intel.com> http://yoctoproject.org February 15, 2011
  • 2. Getting to the Point When submitting patches to upstream projects, the name of the game is making it as convenient as possible for the maintainers to accept and integrate your patch.
  • 3.
  • 4.
  • 5. Add a feature (that the maintainer wants)?
  • 6. Add a new test case to their test suite? The benefit of the patch should be articulated clearly and concisely.
  • 7.
  • 8. Look for HACKING or README files in the source tree
  • 9. Review project mailing list archives to find previous examples of patch submissions
  • 10. Examples of Well-Organized Project Participation Guidelines OpenEmbedded: http://openembedded.org/index.php/How_to_submit_a_patch_to_OpenEmbedded GCC: http://gcc.gnu.org/contribute.html Mozilla: https://developer.mozilla.org/En/Developer_Guide/How_to_Submit_a_Patch GNOME: http://live.gnome.org/GnomeLove/SubmittingPatches
  • 11.
  • 12. Submit a compressed patch using gzip or similar tools
  • 13. Submit a patch without a clear explanation of what it does and why
  • 14. Use language that could be interpreted as being critical of the project, its code, or its members * Possible exceptions may include critical security bugs or if the project's contribution instructions explicitly ask you to submit patches to individuals
  • 15.
  • 17. Use the same format for commit logs (git-based projects tend to be especially strict about this)
  • 18. Keep your commits atomic and logically separated
  • 19.
  • 20.
  • 21.
  • 22. Testing your code shows not only that your patch doesn't break anything, but that you're disciplined enough to test your code as a matter of routine.
  • 23. “ This patch has been tested on the Yocto Project's autobuilder and works for all of our architectures: x86/x86-64/arm/mips/ppc”
  • 24.
  • 25. Keeping documentation up to date is one of the more challenging and thankless jobs a maintainer has to do
  • 26. By including documentation patches, you will stand out above most other contributors as being detail-oriented and helpful
  • 27. Dealing with Rejection Sometimes your patch will be rejected. It is important to make sure you understand whether the rejection is due to fundamental differences in philosophy, or whether the patch might be accepted if it were re-worked according to the preferences of the maintainer. If it's the former case, remain polite and accept it. Explain that we will continue to maintain the patch and are open to future collaboration.
  • 28. The maintainer may want the patch re-worked to meet project requirements. This is acceptable, and the work should be done and the patch re-submitted. Remember, every patch we get upstream means we no longer have to maintain it . This saves us more work in the long run. It's also part of being a good citizen in open source communities! Dealing with Rejection
  • 29.
  • 30. git format-patch -N (where N is the number of commits to include in the patchset)
  • 31. Patch file(s) will be generated in the current directory. Use them as input to git send-email :
  • 32. git send-email --to=upstream@devel-list <patchfile1> <patchfile2> …
  • 33. man git-send-email for more details
  • 34.
  • 35. You can create an account and use it when working on open source projects for free
  • 36. GitHub allows you to clone repositories and submit pull requests via its web interface
  • 37. Screencast tutorial here: http://teachmetocode.com/screencasts/getting-started-with-github/
  • 38. Q&A I will also post this information on the Yocto Project wiki: http://wiki.yoctoproject.org