From: Todd Lyons Date: Mon, 21 Oct 2013 16:58:45 +0000 (-0700) Subject: Add sudo configuration X-Git-Url: https://git.exim.org/buildfarm-client-wiki.git/commitdiff_plain/2ab112807d67708017f74999b56f9393c9a56400 Add sudo configuration --- diff --git a/Installation.md b/Installation.md index 74c6b5e..1ce7641 100644 --- a/Installation.md +++ b/Installation.md @@ -6,20 +6,27 @@ So you want to give back to the Exim project but don't know how? Being a member 2. Create the master exim user (i.e. the user that Exim changes uid to when it runs in normal operation). I suggest the user **exim**. If you already have the Exim package provided by your distro installed, chances are good that you already have a user named **exim** or **exim4**. That user is fine. This howto also assumes you use the groupname **exim**. 3. Create a user that will run the Build Farm. I suggest the user **farm**. Due to some assumptions that are made in the test suite, the group name must also be **farm**. It is ok if you make it a secondary group or the primary group. 4. Add **exim** as a secondary group to the **farm** user. -5. Change to the **farm** user. -6. Checkout the client code: +5. Configure sudo to allow user **farm** to elevate to root without a password. Run `visudo` and add: +`farm ALL=(ALL) NOPASSWD: ALL` +6. Change to the **farm** user. +7. Checkout the client code: `git clone https://github.com/mrballcb/exim-build-farm-client.git code` This will create the repo checkout in the directory *~/code/*. -7. Change into the *~/code/* directory and copy the config template to the default filename: +8. Change into the *~/code/* directory and copy the config template to the default filename: `cp build-farm.conf.template build-farm.conf` -8. Edit the *build-farm.conf* file and adjust to your local configuration. The only options that absolutely require changing are the _animal_ and _secret_ configuration settings. Your machine's sysname alias must be assigned to *animal* and the secret key assigned to *secret*. The rest of the default build configuration should work to build a basic Exim configuration with no added features/capabilities and it will run the test suite. -9. Whatever directory is set as the *build_root* must exist before anything will run. If you didn't change it, this will be all that's needed: +9. Edit the *build-farm.conf* file and adjust to your local configuration. The only options that absolutely require changing are the _animal_ and _secret_ configuration settings. Your machine's sysname alias must be assigned to *animal* and the secret key assigned to *secret*. The rest of the default build configuration should work to build a basic Exim configuration with no added features/capabilities and it will run the test suite. +10. Whatever directory is set as the *build_root* must exist before anything will run. If you didn't change it, this will be all that's needed: `mkdir $HOME/buildfarm` -10. Directory permissions must be lax enough for the **exim** user running the test suite to be able to access the files that user farm has checked out. Make the **farm** user's home directory be world readable and world searchable: +11. Directory permissions must be lax enough for the **exim** user running the test suite to be able to access the files that user farm has checked out. Make the **farm** user's home directory be world readable and world searchable: `chmod o+rx $HOME` -11. Test the build process by running `./run_build.pl --test --verbose=2`. If there are build errors, make adjustments, install additional packages, etc, and repeat the test. You can repeat this as many times as you want because test mode does not store the status of the git repo or the status of each stage of the build. -12. The official process can be kicked off by running `/home/farm/code/run_cron.sh`. This will run the default build configuration and upload the results to the server. -13. Once that command runs with no complaints, add it to the **farm** user crontab. You can run it at whatever frequency you choose, I suggest 1 hour. If a previous instantiation is still running, the script will detect the lockfile and exit. -14. In the default configuration, a full rebuild of Exim will occur every 7 days, and it will also build and run the test suite. You can choose to also have it also build the docs, but there are several extra package requirements for it to build the documentation. -15. Review your enabled features in the Makefile and make adjustments to your *build-farm.conf* to enable those features, using either the makefile_set, makefile_add, or makefile_regex. You may also receive requests from the developers to enable specific features on your build. -16 The default build configuration will build all branches specified in a text file on the server. Most of the time this will only be HEAD, but occasionally the developers may have an interest in building some experimental code on a different branch. The above configuration will do all of it automatically for you. The *run_cron.sh* will also check the master repo at github and update itself (the Exim Build Farm Client software). \ No newline at end of file +12. Test the build process by running `./run_build.pl --test --verbose=2`. If there are build errors, make adjustments, install additional packages, etc, and repeat the test. You can repeat this as many times as you want because test mode does not store the status of the git repo or the status of each stage of the build. +13. The official process can be kicked off by running `/home/farm/code/run_cron.sh`. This will run the default build configuration and upload the results to the server. +14. Once that command runs with no complaints, add it to the **farm** user crontab. You can run it at whatever frequency you choose, I suggest 1 hour. If a previous instantiation is still running, the script will detect the lockfile and exit. + +## Overview + +In the default configuration, a full rebuild of Exim will occur every 7 days, and it will also build and run the test suite. You can choose to also have it also build the docs, but there are several extra package requirements for it to build the documentation. + +Review your enabled features in the Makefile and make adjustments to your *build-farm.conf* to enable those features, using either the makefile_set, makefile_add, or makefile_regex. You may also receive requests from the developers to enable specific features on your build. + +The default build configuration will build all branches specified in a text file on the server. Most of the time this will only be HEAD, but occasionally the developers may have an interest in building some experimental code on a different branch. The above configuration will do all of it automatically for you. The *run_cron.sh* will also check the master repo at github and update itself (the Exim Build Farm Client software). \ No newline at end of file