Package: ensurecvs
PurposeThis tool shall help identify commits in current source tree that areavailable remote on the same branchavailable in the parent branchand are likely to contain bugfixes.HistoryWhen you’re using a 3rd party components in your project it’s hard to
balance between keeping it safe and tested against keeping in touch with
upstream/mainline, especially when you have to decide if the code is as
safe as possible.Most would rely here on CVE-notifications for the used component and the
corresponding version.I was watching the2019’s keynote of Greg Kroah-Hartman at Embedded
Linux Conference Europe in
Lyonwhere he said, that most issues don’t even get a CVE entry anymore, they
will just be fixed with a commit in upstream (at least for the kernel).This is somehow hard to maintain, as mostly you simply don’t want to
change the feature-set (as this has been tested and approved) but need
the bug- and issue-fixes from that project.That is where this tool comes into play - It performs automatic checks
if there are upstream fixes available - and if so, if they only contain
fixes and NOT features.Ensurecvs, helps you toensureand you’re using the best of the usedcontent versioning systemWhat it doesIt extracts the currently used commit from the local repository clonethis can be overridden by specifying--srcrevor--srctagin command lineIt extracts the currently used branch from the local repository clonethis can be overridden by specifying--srcbranchin command
lineIt gets all remote available commits in current branchIt gets all commits made to ‘master’ since current branch has been
branched off (an alternative branch to ‘master’ can be specified by
using--upstreamin command line)it filters all commits out, that might have been cherry-picked in
current branchall the remaining commits are classified regarding their commit
messagecommits that are classified to be likely bugfixes are presented at
the console (STDOUT)Usageusage:ensurecsv[-h][--srcbranchSRCBRANCH][--srcrevSRCREV|--srctagSRCTAG][--upstreamUPSTREAM]localdirEnsurethatyou'reusingthemostsecuresourcecodepositionalarguments:localdirPathtolocalrepooptionalarguments:-h,--helpshowthishelpmessageandexit--srcbranchSRCBRANCHUseexplicitlygivenbranch--srcrevSRCREVUseexplicitlygivensourcerevision--srctagSRCTAGUseexplicitlygiventag--upstreamUPSTREAMUseexplicitlygivenbranchasupstreamInstallationFrom pypisimply runpip3installensurecvsFrom sourcegit clone this repositorycd to <clone folder>/ensurecvsInstall the needed requirements by runningpip3 install-rrequirements.txtrunpython3 setup.py build install(possibly ‘sudo’ is needed)OutputThe tool will return[branch]commit<commithash>:'<commit message>'islikelytocontainbugfixese.g.[master]commit173dfc1c07c9fa901a91adbc9bf8fd41961b9837:'Fix compile issue with python-astor'islikelytocontainbugfixesthat means that commit173dfc1c07c9fa901a91adbc9bf8fd41961b9837currently to be found in branchmasteris likely to contain a bugfix
that isn’t yet used in the currently selected branchImplementation notesCurrently only git-repositories are supportedFutureIf you have interest in one or more of the following topics, feel free
to get in contact with mebetter commit classification (maybe with something likethis
here)better documentationchangeset code analysis for better commit classificationcheck on out-of-tree patches in local codecompare the changeset diff for cherry-pick analysisstreamline codesvn-repository supportContributionFeel free to add issues or pull requests