AutoConf.hs.in 5.2 KB
Newer Older
Jose A. Lopes's avatar
Jose A. Lopes committed
1 2 3 4 5 6 7 8 9
{-| Build-time configuration for Ganeti.

Note that this file is autogenerated by the Makefile with a header
from @AutoConf.hs.in@.

-}

{-

Jose A. Lopes's avatar
Jose A. Lopes committed
10
Copyright (C) 2013, 2014 Google Inc.
Klaus Aehlig's avatar
Klaus Aehlig committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Jose A. Lopes's avatar
Jose A. Lopes committed
35 36 37 38 39

-}

module AutoConf where

40 41 42 43 44 45
split :: String -> [String]
split str =
  case span (/= ',') str of
    (x, []) -> [x]
    (x, _:xs) -> x:split xs

Jose A. Lopes's avatar
Jose A. Lopes committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
packageVersion :: String
packageVersion = "PACKAGE_VERSION"

versionMajor :: Int
versionMajor = VERSION_MAJOR

versionMinor :: Int
versionMinor = VERSION_MINOR

versionRevision :: Int
versionRevision = VERSION_REVISION

versionSuffix :: String
versionSuffix = "VERSION_SUFFIX"

versionFull :: String
versionFull = "VERSION_FULL"

64 65 66
dirVersion :: String
dirVersion = "DIRVERSION"

Jose A. Lopes's avatar
Jose A. Lopes committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
localstatedir :: String
localstatedir = "LOCALSTATEDIR"

sysconfdir :: String
sysconfdir = "SYSCONFDIR"

sshConfigDir :: String
sshConfigDir = "SSH_CONFIG_DIR"

sshLoginUser :: String
sshLoginUser = "SSH_LOGIN_USER"

sshConsoleUser :: String
sshConsoleUser = "SSH_CONSOLE_USER"

exportDir :: String
exportDir = "EXPORT_DIR"

85 86 87
backupDir :: String
backupDir = "BACKUP_DIR"

Jose A. Lopes's avatar
Jose A. Lopes committed
88
osSearchPath :: [String]
89
osSearchPath = split OS_SEARCH_PATH
Jose A. Lopes's avatar
Jose A. Lopes committed
90 91

esSearchPath :: [String]
92
esSearchPath = split ES_SEARCH_PATH
Jose A. Lopes's avatar
Jose A. Lopes committed
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112

xenBootloader :: String
xenBootloader = "XEN_BOOTLOADER"

xenConfigDir :: String
xenConfigDir = "XEN_CONFIG_DIR"

xenKernel :: String
xenKernel = "XEN_KERNEL"

xenInitrd :: String
xenInitrd = "XEN_INITRD"

kvmKernel :: String
kvmKernel = "KVM_KERNEL"

sharedFileStorageDir :: String
sharedFileStorageDir = "SHARED_FILE_STORAGE_DIR"

iallocatorSearchPath :: [String]
113
iallocatorSearchPath = split IALLOCATOR_SEARCH_PATH
Jose A. Lopes's avatar
Jose A. Lopes committed
114 115 116 117 118 119 120 121

kvmPath :: String
kvmPath = "KVM_PATH"

ipPath :: String
ipPath = "IP_PATH"

socatPath :: String
122
socatPath = "SOCAT_PATH"
Jose A. Lopes's avatar
Jose A. Lopes committed
123

124 125 126
pythonPath :: String
pythonPath = "PYTHON_PATH"

Jose A. Lopes's avatar
Jose A. Lopes committed
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
socatUseEscape :: Bool
socatUseEscape = SOCAT_USE_ESCAPE

socatUseCompress :: Bool
socatUseCompress = SOCAT_USE_COMPRESS

lvmStripecount :: Int
lvmStripecount = LVM_STRIPECOUNT

toolsdir :: String
toolsdir = "TOOLSDIR"

gntScripts :: [String]
gntScripts = GNT_SCRIPTS[]

htoolsProgs :: [String]
htoolsProgs = HS_HTOOLS_PROGS[]

pkglibdir :: String
pkglibdir = "PKGLIBDIR"

Klaus Aehlig's avatar
Klaus Aehlig committed
148 149 150
sharedir :: String
sharedir = "SHAREDIR"

151 152 153
versionedsharedir :: String
versionedsharedir = "VERSIONEDSHAREDIR"

Jose A. Lopes's avatar
Jose A. Lopes committed
154 155 156 157 158 159
drbdBarriers :: String
drbdBarriers = "DRBD_BARRIERS"

drbdNoMetaFlush :: Bool
drbdNoMetaFlush = DRBD_NO_META_FLUSH

160 161
syslogUsage :: String
syslogUsage = "SYSLOG_USAGE"
Jose A. Lopes's avatar
Jose A. Lopes committed
162 163 164 165 166 167 168 169 170 171 172 173 174

daemonsGroup :: String
daemonsGroup = "DAEMONS_GROUP"

adminGroup :: String
adminGroup = "ADMIN_GROUP"

masterdUser :: String
masterdUser = "MASTERD_USER"

masterdGroup :: String
masterdGroup = "MASTERD_GROUP"

Jose A. Lopes's avatar
Jose A. Lopes committed
175 176 177 178 179 180
metadUser :: String
metadUser = "METAD_USER"

metadGroup :: String
metadGroup = "METAD_GROUP"

Jose A. Lopes's avatar
Jose A. Lopes committed
181 182 183 184 185 186 187 188 189 190 191 192
rapiUser :: String
rapiUser = "RAPI_USER"

rapiGroup :: String
rapiGroup = "RAPI_GROUP"

confdUser :: String
confdUser = "CONFD_USER"

confdGroup :: String
confdGroup = "CONFD_GROUP"

193 194 195 196 197 198
wconfdUser :: String
wconfdUser = "WCONFD_USER"

wconfdGroup :: String
wconfdGroup = "WCONFD_GROUP"

199 200 201 202 203 204
kvmdUser :: String
kvmdUser = "KVMD_USER"

kvmdGroup :: String
kvmdGroup = "KVMD_GROUP"

Jose A. Lopes's avatar
Jose A. Lopes committed
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
luxidUser :: String
luxidUser = "LUXID_USER"

luxidGroup :: String
luxidGroup = "LUXID_GROUP"

nodedUser :: String
nodedUser = "NODED_USER"

nodedGroup :: String
nodedGroup = "NODED_GROUP"

mondUser :: String
mondUser = "MOND_USER"

mondGroup :: String
mondGroup = "MOND_GROUP"

diskSeparator :: String
diskSeparator = "DISK_SEPARATOR"

qemuimgPath :: String
qemuimgPath = "QEMUIMG_PATH"

htools :: Bool
htools = True

enableConfd :: Bool
enableConfd = ENABLE_CONFD

xenCmd :: String
xenCmd = "XEN_CMD"

enableRestrictedCommands :: Bool
enableRestrictedCommands = ENABLE_RESTRICTED_COMMANDS

enableMond :: Bool
enableMond = ENABLE_MOND

244 245 246
enableMetad :: Bool
enableMetad = ENABLE_METADATA

247 248 249
hasGnuLn :: Bool
hasGnuLn = HAS_GNU_LN

Jose A. Lopes's avatar
Jose A. Lopes committed
250 251 252 253
-- Write dictionary with man page name as the key and the section
-- number as the value
manPages :: [(String, Int)]
manPages = MAN_PAGES[]
254 255 256 257 258 259

pyAfInet4 :: Int
pyAfInet4 = AF_INET4

pyAfInet6 :: Int
pyAfInet6 = AF_INET6