GNOME Bugzilla – Bug 579877
add support for setting buildbot paths in config
Last modified: 2021-05-17 15:49:39 UTC
At SugarLabs, we're using jhbuild for providing the developer setup with the latest versions of all components (i.e. like you're doing for GNOME) and the BuildBot integration for automated build testing as well. We're using the (almost) unmodified jhbuild git tree with a slim wrapper module (providing e.g. support for handling Sugar "bundles" as module type) in order to get upstream changes without needing to merge them every time (as we would if we'd maintain a custom branch). Until now, we patched jhbuild to change some hardcoded locations in order for the buildbot support of jhbuild to use our paths (configs etc.). It would be great if we could just set these in the jhbuildrc instead. There are two things we need to customise: a) command name (to call the wrapper instead of upstream jhbuild) b) buildbot directory location I'll attach the patch we used so you can see the locations of the hardcoded strings.
Fixing product again.
Created attachment 133142 [details] [review] Changes to hardcoded paths Not against current git, but applies cleanly.
Perhaps current command could be known via sys.argv[0] so it would work without any configuration, I'll have to check. Before adding an option to set the buildbot directory, what kind of changes do you have in that one ? (i.e. would it make sense to have options to set those instead)
Mainly the config files (for which command line options exist, but not configuration options) and the HTML files for the web interface. Having the working dirs below our directory is nice (though a fully configurable directory would be even better), but entirely optional. Using sys.argv[0] is a nice idea and should work (haven't tested it, though).
Sorry I took so much time to get back on this bug report. I experienced a little bit with sys.argv[0] and the problem is it is evaluated on the build master, for a shell command to be launched on the slaves. They could have different paths but this can be worked around using os.basename(sys.argv[0]), but is your build master also started with sugar-jhbuild ? Anyway I pushed the part about the configurable buildbot directory: commit 03c9fba115eba086fe693a2adaad7923f238b981 Author: Frederic Peters <fpeters@0d.be> Date: Thu May 7 00:01:56 2009 +0200 [bot] new --buildbot-dir option for build masters Add a new option for specifying which work directory the build master should use. (part of GNOME #579877)
Works fine, thanks! I would have expected --slaves-dir to default to --buildbot-dir and --pidfile to default to buildbot-dir/twist.pid, but we all of them given it works without custom patches now which is a huge step forward. Is there any way to specify these in the config file (jhbuildrc)?
OK, almost. :) Still had to change jhbuild -> sugar-jhbuild in jhbuild/buildbot/steps.py (on the master). We're always starting via sugar-jhbuild, but currently stop using kill (with the pid file) because --stop doesn't work ("sugar-jhbuild bot: failed to get buildbot PID").
There is no way to specify the pidfile from the configuration file. slaves_dir is config.jhbuildbot_slaves_dir. mastercfgfile is config.jhbuildbot_mastercfg. buildbot_dir is config.jhbuildbot_dir. For the sugar-jhbuild script name issue, I asked in comment #5: > I experienced a little bit with sys.argv[0] and the problem is it is evaluated > on the build master, for a shell command to be launched on the slaves. They > could have different paths but this can be worked around using > os.basename(sys.argv[0]), but is your build master also started with > sugar-jhbuild ?
I was sure I'd answered this, but the comment doesn't show up on this bug, so here we go again: > I experienced a little bit with sys.argv[0] and the problem is it is evaluated > on the build master, for a shell command to be launched on the slaves. They > could have different paths but this can be worked around using > os.basename(sys.argv[0]), but is your build master also started with > sugar-jhbuild ? From comment #7: We're always starting via sugar-jhbuild, [...] The paths on master and slaves are different, BTW.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/jhbuild/-/issues/97.