Skip to content
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

[RFC] start converting tmpfiles from shell to C #10

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on May 18, 2019

  1. rename tmpfiles with .sh extension in the source tree

    This will make adding a compiled wrapper easier during transition.
    vapier committed May 18, 2019
    Configuration menu
    Copy the full SHA
    06d0455 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2019

  1. add build machinery

    We don't compile any code yet.  This is just the framework split
    out for easier review.  We'll start compiling things in follow up
    commits.
    vapier committed May 21, 2019
    Configuration menu
    Copy the full SHA
    87ee897 View commit details
    Browse the repository at this point in the history
  2. start the compiled tmpfiles program

    For now, we wrap the existing shell script to maintain full compat.
    We'll start moving over functionality in pieces so we can test.
    vapier committed May 21, 2019
    Configuration menu
    Copy the full SHA
    dc6b720 View commit details
    Browse the repository at this point in the history
  3. add test framework using gtest

    We don't have any tests here yet, but provides the basic framework
    for adding them.  The test runner can link & run fine though.
    
    Tests are written using Google Test (gtest) and in C++ to make our
    lives easier with more powerful data structures.
    vapier committed May 21, 2019
    Configuration menu
    Copy the full SHA
    9137c54 View commit details
    Browse the repository at this point in the history
  4. add some memory helper functions

    These will be used whenever we need to allocate memory and abort if
    it fails for any reason.
    vapier committed May 21, 2019
    Configuration menu
    Copy the full SHA
    c2303e6 View commit details
    Browse the repository at this point in the history
  5. add a simple set data structure

    We work with a few sets, so add a data structure for it to avoid
    ad-hoc implementations in other modules.  This is simplify a list
    as the sets we're working with tends to be quite small: typically
    less than 10.  As long as we don't need to support more, the perf
    should be good enough.
    vapier committed May 21, 2019
    Configuration menu
    Copy the full SHA
    ccdacdd View commit details
    Browse the repository at this point in the history
  6. move cli processing to the compiled code

    The shell script is no longer responsible for parsing the command
    line at all.
    vapier committed May 21, 2019
    Configuration menu
    Copy the full SHA
    e2afb33 View commit details
    Browse the repository at this point in the history
  7. update travis to use xenial distro

    This is needed for newer gcc versions.
    vapier committed May 21, 2019
    Configuration menu
    Copy the full SHA
    d46f44d View commit details
    Browse the repository at this point in the history