Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Contribute to Free/Libre and OpenSourceSoftware
HowTo Get Your Things Upstream
Alexander Dahl
http://www.lespocky.de/
2016-09-26
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 1 / 31
What?
Why?
How?CommunicateGit
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 2 / 31
Who?
MeYet another free software developer . . .
Background
I using Free Software since ≈ 2001I contributing to Free Software since ≈ 2003I diploma in engineering (mechatronics)I working as Embedded Linux developer
Projects
I fli4lI buildrootI ptxdistI libcgiI Freifunk
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 3 / 31
Who?
MeYet another free software developer . . .
Background
I using Free Software since ≈ 2001I contributing to Free Software since ≈ 2003I diploma in engineering (mechatronics)I working as Embedded Linux developer
Projects
I fli4lI buildrootI ptxdistI libcgiI Freifunk
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 3 / 31
What?
What?
Why?
How?CommunicateGit
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 4 / 31
What?
Free/Libre and OpenSource SoftwareWhat Do We Want?
I Free beer!!1!
I Free speech!
Freedoms as Defined by Free Software Foundation (FSF)
Freedom 0 The freedom to run the program for any purpose.Freedom 1 The freedom to study how the program works, and
change it to make it do what you wish.Freedom 2 The freedom to redistribute and make copies so you
can help your neighbor.Freedom 3 The freedom to improve the program, and release
your improvements (and modified versions ingeneral) to the public, so that the whole communitybenefits.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 5 / 31
What?
Free/Libre and OpenSource SoftwareWhat Do We Want?
I Free beer!!1!I Free speech!
Freedoms as Defined by Free Software Foundation (FSF)
Freedom 0 The freedom to run the program for any purpose.Freedom 1 The freedom to study how the program works, and
change it to make it do what you wish.Freedom 2 The freedom to redistribute and make copies so you
can help your neighbor.Freedom 3 The freedom to improve the program, and release
your improvements (and modified versions ingeneral) to the public, so that the whole communitybenefits.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 5 / 31
What?
Free/Libre and OpenSource SoftwareWhat Do We Want?
I Free beer!!1!I Free speech!
Freedoms as Defined by Free Software Foundation (FSF)
Freedom 0 The freedom to run the program for any purpose.Freedom 1 The freedom to study how the program works, and
change it to make it do what you wish.Freedom 2 The freedom to redistribute and make copies so you
can help your neighbor.Freedom 3 The freedom to improve the program, and release
your improvements (and modified versions ingeneral) to the public, so that the whole communitybenefits.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 5 / 31
What?
Components of FLOSS
I SourcecodeI DocumentationI ArtworkI CommunityI TestsI Infrastructure
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 6 / 31
Why?
What?
Why?
How?CommunicateGit
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 7 / 31
Why?
Why Contribute?
I add featuresI fix bugsI improve softwareI for funI social responsibilityI sustainability (use old devices)I learningI businessI . . .
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 8 / 31
Why?
Why Upstreaming?
I more people can use itI review and improvement of your stuffI less future workI avoid fragmentationI give back to communityI . . .
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 9 / 31
How?
What?
Why?
How?CommunicateGit
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 10 / 31
How?
I Want to Help!
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 11 / 31
How?
I Want to Help!
> Note that at some point in the (hopefully) near> future, I expect to create an arguably more> useful 0.13 release off of the master branch.> Volunteers are always welcome to help.
I’m volunteer for improving a lot json-c. I havefull ideas and good knowledge.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 12 / 31
How?
It Depends . . .
I what type of contributionI SourcecodeI DocumentationI ArtworkI CommunityI TestsI (Infrastructure)
I which project/communityI your preference
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 13 / 31
How? Communicate
Ask and Answer QuestionsThe community part
I mailing listI forumI chatI stackoverflowI social mediaI usenetI . . .
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 14 / 31
How? Communicate
Talk, Talk, TalkIt’s a trap . . .
I make yourself familiar with community rulesI Code of ConductI non written rules
I choose the right channelI be politeI be patientI learn.to/quote
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 15 / 31
How? Communicate
Use the BugtrackerWhich
I Bugzilla (run far, run fast)I TracI Mantis (maybe run)I RedmineI GitHubI Atlassian Jira (you could run while it still loads)
HowI make sure it’s a bug (not a »layer 8 problem«)I detailed descriptionI reproducible (minimal example)I (add a patch)
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 16 / 31
How? Communicate
Use the BugtrackerWhich
I Bugzilla (run far, run fast)I TracI Mantis (maybe run)I RedmineI GitHubI Atlassian Jira (you could run while it still loads)
HowI make sure it’s a bug (not a »layer 8 problem«)I detailed descriptionI reproducible (minimal example)I (add a patch)
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 16 / 31
How? Git
What’s a Patch?From: Alexander Dahl <alex@netz39 .de >Date: Thu , 17 Mar 2016 15:04:09 +0100Subject : x86: fix platform_export_bootpart () for Xen virtual disks
Virtual disk devices in a Xen virtual machine (DomU) can be /dev/xvda ,/dev/xvdb and so on with partitions like /dev/ xdva1 . Devices named likethis where not considered before . This resulted in a non workingsysupgrade , because the boot partition could not be found .
Signed -off -by: Alexander Dahl <alex@netz39 .de >Suggested -by: Matthias Schiffer <mschiffer@universe - factory .net >
diff --git a/ target / linux /x86/base - files /lib/ upgrade / platform .sh b/ target / linux /x86/base - files /lib/ upgrade / platform .shindex 73 ab5ef .. adc119c 100644--- a/ target / linux /x86/base - files /lib/ upgrade / platform .sh+++ b/ target / linux /x86/base - files /lib/ upgrade / platform .sh@@ -17,7 +17 ,7 @@ platform_export_bootpart () {
PARTUUID =[a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9] -02)uuid ="${disk# PARTUUID =}"uuid ="${uuid % -02}"
- for disk in /dev /[ hsv]d[a-z]; do+ for disk in /dev /[ hsv]d[a-z] /dev/xvd[a-z]; do
set -- $(dd if= $disk bs =1 skip =440 count =4 2>/ dev/null | hexdump -v -e ’4/1 "%02x "’)if [ " $4$3$2$1 " = " $uuid " ]; then
export BOOTPART ="${disk }1"
This fixed sysupgrade for OpenWRT Xen VM. Merged both ingluon (Freifunk) and upstream. See PR-692 on GitHub.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 17 / 31
How? Git
What’s a Patch?From: Alexander Dahl <alex@netz39 .de >Date: Thu , 17 Mar 2016 15:04:09 +0100Subject : x86: fix platform_export_bootpart () for Xen virtual disks
Virtual disk devices in a Xen virtual machine (DomU) can be /dev/xvda ,/dev/xvdb and so on with partitions like /dev/ xdva1 . Devices named likethis where not considered before . This resulted in a non workingsysupgrade , because the boot partition could not be found .
Signed -off -by: Alexander Dahl <alex@netz39 .de >Suggested -by: Matthias Schiffer <mschiffer@universe - factory .net >
diff --git a/ target / linux /x86/base - files /lib/ upgrade / platform .sh b/ target / linux /x86/base - files /lib/ upgrade / platform .shindex 73 ab5ef .. adc119c 100644--- a/ target / linux /x86/base - files /lib/ upgrade / platform .sh+++ b/ target / linux /x86/base - files /lib/ upgrade / platform .sh@@ -17,7 +17 ,7 @@ platform_export_bootpart () {
PARTUUID =[a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9][a-f0 -9] -02)uuid ="${disk# PARTUUID =}"uuid ="${uuid % -02}"
- for disk in /dev /[ hsv]d[a-z]; do+ for disk in /dev /[ hsv]d[a-z] /dev/xvd[a-z]; do
set -- $(dd if= $disk bs =1 skip =440 count =4 2>/ dev/null | hexdump -v -e ’4/1 "%02x "’)if [ " $4$3$2$1 " = " $uuid " ]; then
export BOOTPART ="${disk }1"
This fixed sysupgrade for OpenWRT Xen VM. Merged both ingluon (Freifunk) and upstream. See PR-692 on GitHub.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 17 / 31
How? Git
Why Git?
Why?
I in 2016 most projects start with GitI GitHubI lots of projects converted their old VCS to GitI distributed (offline) work possible
Why not?
I the bad things: https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 18 / 31
How? Git
Why Git?
Why?
I in 2016 most projects start with GitI GitHubI lots of projects converted their old VCS to GitI distributed (offline) work possible
Why not?
I the bad things: https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 18 / 31
How? Git
Learn Git
I BooksI e. g. Pro Git
I TutorialsI WorkshopsI see https://git-scm.com/doc
I Use it!
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 19 / 31
How? Git
Learn Git
I BooksI e. g. Pro Git
I TutorialsI WorkshopsI see https://git-scm.com/doc
I Use it!
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 19 / 31
How? Git
It’s Distributed!
upstream
local clone
pull
I addI branchI checkoutI commitI diffI logI status
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 20 / 31
How? Git
Send PatchesYes, to mailing lists . . .
Do SendI clone upstream repositoryI create a local branchI work, work . . .I git format-patchI git send-email
Let PullI host your own git serverI synchronize with upstream and your git server
(git help remote)I write a mail saying someone should pull from your server
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 21 / 31
How? Git
Send PatchesYes, to mailing lists . . .
Do SendI clone upstream repositoryI create a local branchI work, work . . .I git format-patchI git send-email
Let PullI host your own git serverI synchronize with upstream and your git server
(git help remote)I write a mail saying someone should pull from your server
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 21 / 31
How? Git
Pull RequestsGet some changes from my tree!
I git request-pullI click this GitHub button
What does it mean?I made some changes and pushed it to my public repository.Would you mind pulling from there to review what I did andmaybe integrate it upstream?
I upstream maintainer should review patch (series)I tools like patchworks help maintainerI http://www.marmalade.de/magazin/2014/12/
pullrequests-fluch-und-segen/
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 22 / 31
How? Git
Pull RequestsGet some changes from my tree!
I git request-pullI click this GitHub button
What does it mean?I made some changes and pushed it to my public repository.Would you mind pulling from there to review what I did andmaybe integrate it upstream?
I upstream maintainer should review patch (series)I tools like patchworks help maintainerI http://www.marmalade.de/magazin/2014/12/
pullrequests-fluch-und-segen/
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 22 / 31
How? Git
Pull RequestsGet some changes from my tree!
I git request-pullI click this GitHub button
What does it mean?I made some changes and pushed it to my public repository.Would you mind pulling from there to review what I did andmaybe integrate it upstream?
I upstream maintainer should review patch (series)I tools like patchworks help maintainerI http://www.marmalade.de/magazin/2014/12/
pullrequests-fluch-und-segen/
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 22 / 31
How? Git
GitHub®
I Git repository hostingI issue trackerI wikiI easy fork, branch, pull request,
merge . . .I social net (follower)I statisticsI service integrationI website hostingI (enterprise services)
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 23 / 31
How? Git
GitHub WorkflowLooks easier at first sight . . .
upstream my fork
local clone
fork
git fetch
pull
git pull
git push
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 24 / 31
How? Git
Patch Improvement
Better PatchesI change one thing at a timeI write a good commit message
I short first lineI one empty lineI describe the reason for the changeI reference ticket numbers
Patch v2I git format-patch -v4 -M -s -o outgoing origin/master
I what can git rebase do for you?I see buildroot manual on submitting patches
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 25 / 31
How? Git
Patch Improvement
Better PatchesI change one thing at a timeI write a good commit message
I short first lineI one empty lineI describe the reason for the changeI reference ticket numbers
Patch v2I git format-patch -v4 -M -s -o outgoing origin/master
I what can git rebase do for you?I see buildroot manual on submitting patches
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 25 / 31
How? Git
Contribute Without Git
I sourcecode and documentationI patch and quiltI other VCSI things not in VCSI . . .
I other categoriesI you probably won’t need a VCS
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 26 / 31
What else?
What Happened Next on the JSON-C Mailing List?
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 27 / 31
What else?
What Happened Next on the JSON-C Mailing List?
> I’m volunteer for improving a lot json-c. I have> full ideas and good knowledge.
Great! If you have some changes you’re thinking ofmaking to json-c feel free to post a message withyour idea (w/ a separate subject please). If youhave code changes, pull requests are welcome,especially if they include tests and any necessarydoc changes.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 28 / 31
What else?
What Happened Next on the JSON-C Mailing List?
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 29 / 31
What else?
Legal Stuff
The Git LogoGit Logo by Jason Long is licensed under the Creative CommonsAttribution 3.0 Unported License.
The GitHub LogoGITHUB®, the GITHUB® logo design, OCTOCAT® and theOCTOCAT® logo design are exclusive trademarks registered inthe United States by GitHub, Inc.The OCTOCAT design is the exclusive property of GitHub, Incand has been federally registered with the United StatesCopyright Office. All rights reserved.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 30 / 31
What else?
The Last Slide
Contact MeE-Mail [email protected] lespocky.de or blog.antiblau.deTwitter @LeSpocky
SlidesI hg clone https://bitbucket.org/lespocky/talks
LicenseThese slides are licensed under the Creative CommonsAttribution-ShareAlike 4.0 International License. (CC BY-SA 4.0)To view a copy of this license, visithttp://creativecommons.org/licenses/by-sa/4.0/.
Alexander Dahl (lespocky.de) Contrib To FLOSS 2016-09-26 31 / 31