1. 12 Jan, 2019 1 commit
    • Michael Pyne's avatar
      Fix cxxflags being set to a space when globally empty. · b01505be
      Michael Pyne authored
      When cxxflags is globally set to an empty value, the getOption magic
      that appends module values to global values for cxxflags causes it the
      result to equal ' ' (i.e. one space). This is because the space is a
      separator between two empty values.
      
      This causes code testing against cxxflags to think it's actually been
      set to a value and to add it in the cmake calls.
      
      I fix this and add a test case, but also add some insurance by trimming
      leading/trailing white space so that the existing check for empty
      cxxflags would have had a chance to catch this.
      
      Differential Revision: https://phabricator.kde.org/D18165
      b01505be
  2. 06 Jan, 2019 1 commit
    • Michael Pyne's avatar
      first-run: Add basic installer and packages for Debian distros. · 845e9da4
      Michael Pyne authored
      This adds the installer to allow Debian-based distros to run and a basic
      set of packages needed to at least allow kdesrc-build to successfully
      run --initial-setup, as tested under a Docker image of debian 9.
      
      This will still miss the dependencies required to fully make it through
      any kind of reasonable KDE software build. In particular even if I
      included the list of Qt modules that Debian 9 stable has available, they
      are too old for current git-based applications. But other modules are
      probably needed and still missing (suggestions accepted! :).
      
      So there's still more to do here, which is why the bug remains open.
      
      See issue #15
      
      CCBUG:402901
      845e9da4
  3. 30 Dec, 2018 1 commit
  4. 29 Dec, 2018 3 commits
  5. 28 Dec, 2018 3 commits
  6. 27 Dec, 2018 4 commits
  7. 26 Dec, 2018 2 commits
  8. 25 Dec, 2018 1 commit
    • Michael Pyne's avatar
      Fix broken cmdline parsing when --stop-on-failure in use. · e743b5bb
      Michael Pyne authored
      As reported in bug 402509, as position of command line argument changes
      the module build list.
      
      What was happening was --stop-on-failure in particular could 'eat' the
      next command line argument, because even though it was manually
      specified as a 'flag' argument to Getopt::Long, the 'stop-on-failure'
      entry was then overridden in the function call to read options by
      including the options in ksb::BuildContext::defaultGlobalFlags.
      
      A coding error on my part caused this inclusion of options to treat the
      options as requiring string values instead of boolean flags. As a result
      Getopt::Long would read the next non-option value and assign it to the
      'stop-on-failure' result.
      
      Fixed by treating the included flags as boolean flags instead of string
      valued, and by ensuring that the two sources for cmdline options are
      fully disjoint. I also added a test that fails with the old code and
      works with the new.
      
      Fixes #8
      
      BUG:402509
      FIXED-IN:19.01
      e743b5bb
  9. 21 Dec, 2018 2 commits
    • Michael Pyne's avatar
      Try to streamline 'quick start' documentation. · a7090fc7
      Michael Pyne authored
      This should document really almost everything the user needs to do to
      get started with kdesrc-build.
      
      The big thing missing is the .setup-env parts. I think that should go in
      kdesrc-build-setup but that's a separate discussion.
      
      Either way, once the documentation is accurate that should help in
      determining which features to include in kdesrc-build to be able to make
      this documentation even simpler so that we can broaden the base of users
      able to be productive with this and related tools.
      a7090fc7
    • Michael Pyne's avatar
      cmdline: Make -v stand for --version, not --verbose. · d285496c
      Michael Pyne authored
      A user mistakenly running "kdesrc-build -v" would otherwise be in for
      quite a surprise.
      d285496c
  10. 05 Dec, 2018 2 commits
    • Gregor Mi's avatar
      Add .arcconfig · 1c39943b
      Gregor Mi authored
      Reviewers: mpyne, dfaure
      
      Reviewed By: mpyne
      
      Differential Revision: https://phabricator.kde.org/D17291
      1c39943b
    • Michael Pyne's avatar
      Apply a consistent ordering of module list generation. · 671140a6
      Michael Pyne authored
      This fixes one of the most annoying outstanding issues with
      kdesrc-build. Though if I had known it would be this easy I'd have done
      it sooner.
      
      The issue is that running the same build command, with the same
      dependencies applied, would often come up with different build orders.
      
      $ kdesrc-build -p --print-modules --resume-from kcoreaddons
       ... build list shown
      $ kdesrc-build -p --print-modules --resume-from kcoreaddons
       ... a different build list shown
      
      The major cause of this is that the implicit ordering is derived from
      how the KDE project modules are loaded, using a filesystem search.
      Sorting the list of loaded modules when doing a search through the KDE
      project hierarchy is enough to handle this.
      
      A more theoretical issue is that the loaded dependencies themselves
      could be reordered even though the dependencies haven't really changed.
      To pre-emptively address this before the next kde-build-metadata cleanup
      we also canonicalize all loaded dependencies into a sorted order.
      
      Test suite passes.
      671140a6
  11. 02 Dec, 2018 1 commit
    • Gregor Mi's avatar
      Don't set DCMAKE_BUILD_TYPE in kf5-frameworks-build-include · 78a666fd
      Gregor Mi authored
      Summary:
      In kde/src/log/2018-12-01-04/kconfig/cmake.log, I found this:
      
      ```
      # kdesrc-build running: 'cmake' '/home/gregor/kde/src/frameworks/kconfig' '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache' '-GNinja' '-DCMAKE_BUILD_TYPE=Debug' '-DBUILD_TESTING=TRUE' '-DCMAKE_BUILD_TYPE:STRING=debug' '-DCMAKE_CXX_FLAGS:STRING=-pipe ' '-DCMAKE_INSTALL_PREFIX=/home/gregor/kde/usr' '-DCMAKE_PREFIX_PATH=/usr'
      # from directory: /home/gregor/kde/build/frameworks/kconfig
      -- The C compiler identification is GNU 8.2.1
      -- The CXX compiler identification is GNU 8.2.1
      ...
      
      ```
      
      Note, that CMAKE_BUILD_TYPE from my global .kdesrc-buildrc gets overridden from "Debug" to "debug". For me, this came surprising (also the lowercase "debug" is less common than the capital D).
      
      This change  removes the definition of CMAKE_BUILD_TYPE from kf5-frameworks-build-include.
      
      Reviewers: mpyne, dfaure
      
      Reviewed By: dfaure
      
      Differential Revision: https://phabricator.kde.org/D17290
      78a666fd
  12. 23 Nov, 2018 5 commits
  13. 18 Nov, 2018 2 commits
  14. 05 Nov, 2018 1 commit
  15. 03 Nov, 2018 2 commits
    • Michael Pyne's avatar
      test: Add a test case for the 2 bugs added by FindBin removal. · b3a5dd7e
      Michael Pyne authored
      This is the barest "does kdesrc-build --version even work" test, done 3
      ways over:
      
      1. Direct call to the kdesrc-build script
      2. Symlinked "kdesrc-build" pointing to kdesrc-build script run from a
      directory in PATH
      3. Call to installed version of kdesrc-build (installing to a temp dir)
      
      Note: Anyone can run the test suite with Perl's Test::Harness module set
      installed, using the command "prove -I modules" from the kdesrc-build
      source dir. "prove" may have different names on some distros to allow
      for multiple versions.
      b3a5dd7e
    • Michael Pyne's avatar
      first-run: Make kdesrc-build work when run as a symlink. · 9c7e88e5
      Michael Pyne authored
      This was another feature lost in dropping FindBin to run in minimal
      environments. Reported by Dominik Haumann.
      9c7e88e5
  16. 27 Oct, 2018 1 commit
  17. 25 Oct, 2018 1 commit
  18. 22 Oct, 2018 2 commits
    • Michael Pyne's avatar
      first-run: Make it possible to run system installer on first run. · cabaa343
      Michael Pyne authored
      Tested with OpenSuSE docker image (opensuse-leap:latest). With it, this
      sequence of commands run in the container succeeds, with kdesrc-build
      git dir bind-mounted to /opt/kdesrc-build in the container:
      
          export PATH=/opt/kdesrc-build:$PATH
          kdesrc-build --initial-setup
          kdesrc-build --metadata-only
          kdesrc-build extra-cmake-modules
      
      I mention containers, but that's mostly to make it easier to test. There
      is separate work by others to actually make kdesrc-build part of a fully
      container-based workflow which I don't want/need to reinvent.
      cabaa343
    • Michael Pyne's avatar
      first-run: Make --initial-setup work in minimal env, impl sample-rc. · a6bbfba1
      Michael Pyne authored
      We still don't install packages (although infra exists for it), but we
      can at least install a simple sample configuration.
      
      With the opensuse/unknown packages installed in the opensuse-leap:latest
      Docker container (separately), kdesrc-build can go straight from base
      image to being able to run "kdesrc-build --initial-setup" and then
      immediately after run "kdesrc-build --metadata-only".
      
      Progress!....
      a6bbfba1
  19. 21 Oct, 2018 3 commits
    • Michael Pyne's avatar
      sample-rc: Remove ancient sample file. · e4f6829c
      Michael Pyne authored
      I thought about moving the current KF5 sample to have this name, but I
      figure if there's a KF6 we'll want to have two different names anyways
      for that transition period, so no need to potentially force people to
      adjust any configurations already pointing to the existing KF5 sample.
      e4f6829c
    • Michael Pyne's avatar
      first-run: Reduce use of ksb::Util, remove dead code. · 8f5daca9
      Michael Pyne authored
      Some minimal versions of popular Linux distros have Docker images that
      provide a stripped-down Perl install to save space. You cannot rely on
      "core" modules being present in this case.
      
      kdesrc-build should be able to at least spit out a message of which
      packages are required on the distribution. This means that
      ksb::OSSupport and ksb::FirstRun must be loadable in this distros, and
      kdesrc-build must not load "full fat" Perl modules until after checking
      whether to handle initial setup.
      
      Making this happen leads me to refactor exception code out of ksb::Util.
      While doing so I noticed that download_file is no longer needed
      (kde_projects.xml support drove that need), so that is removed as well
      to eliminate a dependency on HTTP::Tiny (a core module, but not
      available in minimal distros).
      8f5daca9
    • Michael Pyne's avatar
      Clean up --help, add stub for initial setup helper. · 6b48a781
      Michael Pyne authored
      Big thanks to the sysadmin team for setting up URL shortlinks for the
      docs URLs!
      
      This takes another step towards the idea of being able to automatically
      install known dependencies for common distributions, adding .xsession,
      adjusting .bashrc, making a configuration file, and all the other
      initial tasks that need to be done.
      6b48a781
  20. 20 Oct, 2018 1 commit
  21. 19 Oct, 2018 1 commit