Maintain additional features on top of an open source project (upstream)

At my work, we used open source software for some of our products and developed some additional features and capabilities in addition to what the main project offers. The open source project is actively developing, and I intend to make some changes to the open source project.

However, I also added some other features needed for our products. These features have security implications that are acceptable for my use case but not acceptable in general. Thus, an open source project will never accept these functions as part of the development of the main line, so I will have to support these functions myself.

I would like to see new releases of the main line development sometimes, but it seems to me that this will require me to “re-fix” my locally supported functions in the main line so often.

How can I support the features that I need as a separate development line from the main line with minimal overhead? I would like not to overwrite locally supported functions every time something changes in the main line project, but I would prefer not to “fork” the whole project, since I would like to continue to make corrections and pull updates from the main line.

Would it be better to keep my own set of “patch files” that implement my individual functions (where am I trying to apply these fixes) to future releases of the main line project? (Note: The open source project uses git for version control if there are any git tools that help with this.)

+4
source share
1 answer

Just use topic threads. When you code, make sure that the code you can add to the project lives in different branches than the code needed for your specific implementation. Privately, for your employer, combine all of them into a master to make your software work. Publicly, only publish and pull-request (or patch via email or whatever the project) are those that do not contain your site code.

There is nothing unusual in this workflow. Thematic branches, which are also branches, are also a good git habit; the workflow will have other benefits.

+2
source

All Articles