resources: augeas: Make augeas support optional

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto
2017-02-13 07:03:35 +01:00
parent 35d3328e3e
commit 3261c405bd
4 changed files with 41 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ USERNAME := $(shell cat ~/.config/copr 2>/dev/null | grep username | awk -F '='
SERVER = 'dl.fedoraproject.org' SERVER = 'dl.fedoraproject.org'
REMOTE_PATH = 'pub/alt/$(USERNAME)/$(PROGRAM)' REMOTE_PATH = 'pub/alt/$(USERNAME)/$(PROGRAM)'
ifneq ($(GOTAGS),) ifneq ($(GOTAGS),)
BUILD_FLAGS = -tags $(GOTAGS) BUILD_FLAGS = -tags '$(GOTAGS)'
endif endif
# #

View File

@@ -558,7 +558,7 @@ no binary available continue working in a temporary directory to avoid failure.
You can control some compilation variables by using environment variables. You can control some compilation variables by using environment variables.
#### Disable livirt support #### Disable libvirt support
If you wish to compile mgmt without libvirt, you can use the following command: If you wish to compile mgmt without libvirt, you can use the following command:
@@ -566,6 +566,20 @@ If you wish to compile mgmt without libvirt, you can use the following command:
GOTAGS=novirt make build GOTAGS=novirt make build
``` ```
#### Disable augeas support
If you wish to compile mgmt without augeas support, you can use the following command:
```
GOTAGS=noaugeas make build
```
#### Combining compile-time flags
You can combine multiple tags by using a space-separated list:
GOTAGS="noaugeas novirt" make build
## Examples ## Examples
For example configurations, please consult the [examples/](https://github.com/purpleidea/mgmt/tree/master/examples) directory in the git For example configurations, please consult the [examples/](https://github.com/purpleidea/mgmt/tree/master/examples) directory in the git
source repository. It is available from: source repository. It is available from:

View File

@@ -14,6 +14,7 @@
// //
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
// +build !noaugeas
package resources package resources

View File

@@ -0,0 +1,24 @@
// Mgmt
// Copyright (C) 2013-2016+ James Shubin and the project contributors
// Written by James Shubin <james@shubin.ca> and the project contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// +build noaugeas
package resources
// AugeasRes represents the fields of the Augeas resource. Since this file is
// only invoked with the tag "noaugeas", we do not need any fields here.
type AugeasRes struct {
}