Commit Graph

877 Commits

Author SHA1 Message Date
Joey Hess 63ccccb1bb cmdProperty' renamed to cmdPropertyEnv to make way for a new, more generic cmdProperty' (API change) 2015-05-07 12:16:48 -04:00
Joey Hess 53a084632c merge from git-annex 2015-05-07 12:08:26 -04:00
Joey Hess 9ec4b33dbb Merge branch 'joeyconfig' 2015-05-06 14:29:12 -04:00
Joey Hess e4432caa12 remove unused import 2015-04-29 14:44:56 -04:00
Joey Hess 6288393b4b avoid checking build deps if cabal configures ok 2015-04-29 14:41:46 -04:00
Joey Hess a584268334 Ensure build deps are installed before building propellor in --spin and cron job, even if propellor was already built before, to deal with upgrades that add new dependencies. 2015-04-29 14:31:54 -04:00
Joey Hess 15ab46fd52
propellor spin 2015-04-29 14:28:09 -04:00
Joey Hess 681e4dbbcb
propellor spin 2015-04-29 14:26:13 -04:00
Joey Hess b4877efea5 Merge branch 'joeyconfig' 2015-04-28 16:01:19 -04:00
Joey Hess 960745b95e won't be ueing stable here 2015-04-25 11:24:47 -04:00
Joey Hess 1706ca682e Removed Obnam.latestVersion which was only needed for Debian wheezy backport. 2015-04-25 11:23:54 -04:00
Joey Hess 7964ed7caf
propellor spin 2015-04-23 11:58:37 -04:00
Joey Hess 2d7c493403 Merge branch 'joeyconfig'
Conflicts:
	privdata.joey/privdata.gpg
2015-04-23 09:24:53 -04:00
Joey Hess 89b6629464 fix type signature, filepath and string params were flipped
thanks, gueux
2015-04-23 09:24:23 -04:00
Joey Hess 4c86f8adf5
propellor spin 2015-04-22 22:36:45 -04:00
Joey Hess 9699945ad4 Merge branch 'joeyconfig' 2015-04-22 21:00:45 -04:00
Jelmer Vernooij c7a156a8c3 ensureProperty takes a list of commands to run, but Git.bareRepo
previously passed a list of arguments instead.

Signed-Off-By: Jelmer Vernooij <jelmer@debian.org>
2015-04-22 20:59:14 -04:00
Joey Hess 66a8012a1a Merge branch 'joeyconfig'
Conflicts:
	privdata.joey/privdata.gpg
2015-04-22 13:50:16 -04:00
Joey Hess a3c1e8ada3 use new property 2015-04-22 13:48:52 -04:00
Joey Hess f35ef9d697 API change: Added User and Group newtypes, and Properties that used to use the type UserName = String were changed to use them.
Note that UserName is kept and PrivData still uses it in its sum type.
This is to avoid breaking PrivData serialization.
2015-04-22 13:04:39 -04:00
Joey Hess d3dbdb1f4d
propellor spin 2015-04-21 23:08:10 -04:00
Joey Hess dc22e14341
propellor spin 2015-04-21 23:01:48 -04:00
Joey Hess f7f758af28
propellor spin 2015-04-21 22:43:31 -04:00
Joey Hess 54f6972041
propellor spin 2015-04-21 22:39:35 -04:00
Joey Hess a4a582089c
propellor spin 2015-04-21 22:23:29 -04:00
Joey Hess 0fc926934a Merge branch 'joeyconfig' 2015-04-21 12:52:22 -04:00
Joey Hess 07be883258 debCdn changed to new httpredir.debian.org official replacement for http.debian.net. 2015-04-19 21:36:07 -04:00
Joey Hess 96631ad0cb Merge branch 'joeyconfig' 2015-04-19 21:02:00 -04:00
Joey Hess 3d735c52f4 Added hasLoginShell and shellEnabled.
My code with some improvements from weinzwang.
2015-04-19 21:00:21 -04:00
Joey Hess 10ed35441f Merge branch 'joeyconfig' 2015-04-19 12:51:12 -04:00
Joey Hess b9a093c988 jessie is almost ready to be the new debian stable, update a few examples
no behavior changes
2015-04-19 09:41:40 -04:00
Joey Hess 08a38e705b Merge branch 'joeyconfig' 2015-04-14 14:52:26 -04:00
Joey Hess 64adadd9ff
propellor spin 2015-04-12 15:10:03 -04:00
Joey Hess 9377e9ce7b Merge branch 'joeyconfig'
Conflicts:
	privdata.joey/privdata.gpg
2015-04-11 10:13:36 -04:00
Joey Hess aa278d34a0 expand 2015-04-11 10:13:17 -04:00
Joey Hess 15569ee17a remove ssh key from desc, too long 2015-04-09 00:42:51 -04:00
Joey Hess c704271c52
propellor spin 2015-04-07 12:51:40 -04:00
Joey Hess 8d2e46ab98
propellor spin 2015-04-07 12:46:26 -04:00
Joey Hess c25be89f87
propellor spin 2015-04-07 12:42:54 -04:00
Joey Hess 2c2cde0b5c
propellor spin 2015-04-07 12:36:52 -04:00
Joey Hess ccdb432d2d split out a module 2015-04-07 12:34:02 -04:00
Joey Hess 006b1c3585 Merge branch 'joeyconfig' 2015-04-02 10:26:51 -04:00
Joey Hess 1413e9c619 /dev/null any error from propellor --check
This includes "unknown option" from old versions of propellor..
2015-04-02 10:25:35 -04:00
Joey Hess 86783dc52d Make propellor resistent to changes to shared libraries, such as libffi
* Make propellor resistent to changes to shared libraries, such as libffi,
  which might render the propellor binary unable to run. This is dealt with
  by checking the binary both when running propellor on a remote host,
  and by Cron.runPropellor. If the binary doesn't work, it will be rebuilt.
* Note that since a new switch had to be added to allow testing the binary,
  upgrading to this version will cause a rebuild from scratch of propellor.
2015-04-02 10:20:44 -04:00
Joey Hess fe7b1233f4 Merge branch 'joeyconfig' 2015-03-22 10:05:03 -04:00
Joey Hess b32d05a661 simplify setup process for minimal config mode
Allow cloning a branch.

Updated wrapper to check for propellor.cabal and not try to update
if it's not present, to handle this case.
2015-03-22 10:04:02 -04:00
Joey Hess cec0929a26
propellor spin 2015-03-21 09:52:58 -04:00
Joey Hess c3aee9b545
propellor spin 2015-03-16 19:44:37 -04:00
Joey Hess 93fe81bae9 Merge branch 'joeyconfig' 2015-03-14 16:00:04 -04:00
Joey Hess f5cbda9b3e
propellor spin 2015-03-13 16:50:44 -04:00
Joey Hess 15e4a92d34
propellor spin 2015-03-13 14:32:00 -04:00
Joey Hess 937ad0bb61
propellor spin 2015-03-12 22:48:29 -04:00
Joey Hess beb49d2c2b
propellor spin 2015-03-12 22:05:17 -04:00
Joey Hess 62805fb0f5 need openssl for shellinabox with ssl 2015-03-12 20:29:39 -04:00
Joey Hess bc60edb50a Merge branch 'joeyconfig'
Conflicts:
	privdata.joey/privdata.gpg
2015-03-12 20:09:31 -04:00
Joey Hess 370aad7825
propellor spin 2015-03-12 19:53:40 -04:00
Joey Hess 93e750fc83
propellor spin 2015-03-12 19:41:35 -04:00
Joey Hess d51863e698
propellor spin 2015-03-12 17:15:01 -04:00
Joey Hess 16c9717a8d
propellor spin 2015-03-12 17:13:37 -04:00
Joey Hess 4cf549414b
propellor spin 2015-03-12 17:06:47 -04:00
Joey Hess 7987870782 seems that setting postfix/destinations to " " makes debconf put in a
default config, not appropriate for a client relay. Set to localhost
instead.
2015-03-12 16:59:33 -04:00
Joey Hess 677ce2d28f
propellor spin 2015-03-12 16:46:52 -04:00
Joey Hess 82e8311fc5
propellor spin 2015-03-12 16:43:09 -04:00
Joey Hess 6d978d71ea
propellor spin 2015-03-12 16:38:47 -04:00
Joey Hess ec1e16a9f3
propellor spin 2015-03-12 16:38:29 -04:00
Joey Hess f2750857b8
propellor spin 2015-03-12 16:34:44 -04:00
Joey Hess 1196bffdb5
propellor spin 2015-03-12 16:23:45 -04:00
Joey Hess b3f231c750
propellor spin 2015-03-12 16:12:36 -04:00
Joey Hess febe818cb1
propellor spin 2015-03-11 23:07:41 -04:00
Joey Hess 17dde04739
propellor spin 2015-03-11 22:58:05 -04:00
Joey Hess 294f61b2b1
propellor spin 2015-03-11 22:53:37 -04:00
Joey Hess c8ea87877e
propellor spin 2015-03-11 22:47:39 -04:00
Joey Hess a82b7d3e00
propellor spin 2015-03-11 22:38:15 -04:00
Joey Hess d9d5bf6d44
propellor spin 2015-03-11 22:34:10 -04:00
Joey Hess b508bb52fd
propellor spin 2015-03-11 22:31:45 -04:00
Joey Hess 971d688a72
propellor spin 2015-03-11 22:24:09 -04:00
Joey Hess bd8efb76a3
propellor spin 2015-03-11 22:18:50 -04:00
Joey Hess 09435e9bcc
propellor spin 2015-03-11 22:06:08 -04:00
Joey Hess 4c94fd4703 Merge branch 'joeyconfig' 2015-03-09 12:03:09 -04:00
Joey Hess 164f78ca05
propellor spin 2015-03-06 15:40:38 -04:00
Joey Hess 15b2c167b5 Merge branch 'joeyconfig' 2015-02-28 14:19:30 -04:00
Joey Hess f7a02ae4ff better deps installation
Less special cases, and will work more broadly.
2015-02-28 14:00:53 -04:00
Joey Hess 970ffbd0d6 Merge branch 'joeyconfig' 2015-02-28 13:08:05 -04:00
Joey Hess 42c1106ea0 support installing build deps using pure cabal, rather than debian packages
for non-debian systems
2015-02-28 12:57:20 -04:00
Joey Hess e26c232d15 avoid using the makefile when bootstrapping with --spin 2015-02-28 12:51:16 -04:00
Joey Hess dc03e317b4 Propellor now builds itself without needing the Makefile. 2015-02-28 12:27:07 -04:00
Joey Hess 1a62575d3d
propellor spin 2015-02-27 19:17:42 -04:00
Joey Hess d67d59a25a
propellor spin 2015-02-27 19:14:20 -04:00
Joey Hess f0a4e642c4
propellor spin 2015-02-27 19:01:11 -04:00
Joey Hess e8b0e7c6ca
propellor spin 2015-02-27 18:55:51 -04:00
Joey Hess fa7656f743 Add shebang to cron.daily etc files. 2015-02-25 14:58:40 -04:00
Joey Hess 5b56a416c1 endpoint 2015-02-19 18:40:50 -04:00
Joey Hess be1a3a7c89 When running shimmed (eg in a docker container), improve process name visible in ps. 2015-02-16 19:01:32 -04:00
Joey Hess fac02a6a82
propellor spin 2015-02-13 15:59:50 -04:00
Joey Hess cb67eb1d08 Merge branch 'joeyconfig'
Conflicts:
	privdata.joey/privdata.gpg
2015-02-12 12:35:26 -04:00
Joey Hess da77276378 ssh user perm fixes
* Ssh.authorizedKey: Make the authorized_keys file and .ssh directory
  be owned by the user, not root.
* Ssh.knownHost: Make the .ssh directory be owned by the user, not root.
2015-02-12 12:35:15 -04:00
Joey Hess ca2640d037
propellor spin 2015-02-10 22:31:00 -04:00
Joey Hess a407af3f03
propellor spin 2015-02-10 21:55:39 -04:00
Joey Hess 8f813dc875
propellor spin 2015-02-10 21:46:31 -04:00
Joey Hess f5c82083fe
propellor spin 2015-02-10 21:39:16 -04:00
Joey Hess b2dccb5fb5
propellor spin 2015-02-10 21:21:51 -04:00
Joey Hess 920b7bf56d
propellor spin 2015-02-10 21:18:41 -04:00
Joey Hess e32f157374 Fix Git.daemonRunning to restart inetd after enabling the git server. 2015-02-10 21:04:32 -04:00
Joey Hess 8d73419dbe
propellor spin 2015-02-10 21:01:38 -04:00
Joey Hess 5ae2a1dc3c
propellor spin 2015-02-10 20:58:47 -04:00
Joey Hess 0119bf8531
propellor spin 2015-02-10 20:56:57 -04:00
Joey Hess d08c98d8b3
propellor spin 2015-02-10 20:29:04 -04:00
Joey Hess 824ebdd76f
propellor spin 2015-02-10 19:57:18 -04:00
Joey Hess 057509c5cd
propellor spin 2015-02-10 15:09:57 -04:00
Joey Hess d1ebc7c145
propellor spin 2015-02-10 10:02:37 -04:00
Joey Hess 991249185c
propellor spin 2015-02-09 18:51:07 -04:00
Joey Hess 162df37da4
propellor spin 2015-02-01 17:38:05 -04:00
Joey Hess 8edc7ed3ae
propellor spin 2015-02-01 17:34:04 -04:00
Joey Hess 30c8621f5c
propellor spin 2015-02-01 17:01:32 -04:00
Joey Hess 2e2e30fc39
propellor spin 2015-02-01 16:58:32 -04:00
Joey Hess b3bdb95ed0
propellor spin 2015-02-01 16:51:55 -04:00
Joey Hess 8ff2b77385
propellor spin 2015-02-01 16:40:03 -04:00
Joey Hess db7a9aa9f6
propellor spin 2015-02-01 16:19:37 -04:00
Joey Hess 0ea9794324
propellor spin 2015-02-01 15:08:30 -04:00
Joey Hess 3c7c40dd67
propellor spin 2015-02-01 14:50:54 -04:00
Joey Hess bcdc5754fc
propellor spin 2015-02-01 14:48:13 -04:00
Joey Hess f276466cf2
propellor spin 2015-02-01 13:36:58 -04:00
Joey Hess 1b7a00372b
propellor spin 2015-02-01 13:14:45 -04:00
Joey Hess 3585f14d4e
propellor spin 2015-01-29 01:37:53 -04:00
Joey Hess d7697a4b25
propellor spin 2015-01-29 01:04:59 -04:00
Joey Hess 7da64306a0 store PropList reversed to optimise &
PropList is now an opaque type, to prevent misuse.

Note that the PropAccum Host instance cannot use reversed order.
2015-01-25 15:40:38 -04:00
Joey Hess 401b857eef Merge branch 'joeyconfig'
Conflicts:
	doc/todo/info_propigation_out_of_nested_properties.mdwn
	privdata.joey/privdata.gpg
2015-01-25 15:16:58 -04:00
Joey Hess e9d5d9aff1 remove toSimpleProp
It didn't do what I thought it did with a RevertableProperty; it always
returned Nothing because even if the input properties to <!> are NoInfo, it
casts them to HasInfo.

Even if it had worked, it lost type safety. Better to export the
Property NoInfo that is used in a RevertableProperty, so it can be used
directly.
2015-01-25 14:47:57 -04:00
Joey Hess 334abae312 fix combines instance
The old one caused the actions to run in the right order, but with the
wrong description.

This problem was found by comparing the [Host] between this branch and
current joeyconfig, and printing out their properties, info, and also their
list of child properties.

The only other difference found is that onChange orders the child property
list differently. That does not have any real effect and would be difficult
to change, so I've left it as-is.
2015-01-25 13:28:04 -04:00
Joey Hess f4fc24aa5c avoid needing to define Show twice 2015-01-25 13:04:39 -04:00
Joey Hess f5da1c2b23 improve docs 2015-01-25 01:26:38 -04:00
Joey Hess a780cae441 fix typo 2015-01-24 23:43:24 -04:00
Joey Hess 0ee04ecc43 GADT properties seem to work (untested)
* Property has been converted to a GADT, and will be Property NoInfo
  or Property HasInfo.
  This was done to make sure that ensureProperty is only used on
  properties that do not have Info.
  Transition guide:
  - Change all "Property" to "Property NoInfo" or "Property WithInfo"
    (The compiler can tell you if you got it wrong!)
  - To construct a RevertableProperty, it is useful to use the new
    (<!>) operator
  - Constructing a list of properties can be problimatic, since
    Property NoInto and Property WithInfo are different types and cannot
    appear in the same list. To deal with this, "props" has been added,
    and can built up a list of properties of different types,
    using the same (&) and (!) operators that are used to build
    up a host's properties.
2015-01-24 22:38:51 -04:00
Joey Hess 141a7c028b use type level functions to fix type inference for `require` 2015-01-24 19:40:43 -04:00
Joey Hess 45c94ffdd7 moving to using the GADT
The problem this exposes has to do with requires. As implemented,
requires yields either a Property HasInfo or a Property NoInfo depending
on its inputs. That works. But look what happens when it's used:

*Propellor.Types> let foo = IProperty "foo" (return NoChange) mempty mempty
*Propellor.Types> let bar = IProperty "bar" (return NoChange) mempty mempty
*Propellor.Types> foo `requires` bar

<interactive>:17:5:
    No instance for (Requires (Property HasInfo) (Property HasInfo) r0)
      arising from a use of `requires'
    The type variable `r0' is ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Note: there is a potential instance available:
      instance Requires
                 (Property HasInfo) (Property HasInfo) (Property HasInfo)
        -- Defined at Propellor/Types.hs:167:10
    Possible fix:
      add an instance declaration for
      (Requires (Property HasInfo) (Property HasInfo) r0)
    In the expression: foo `requires` bar
    In an equation for `it': it = foo `requires` bar

This can be avoided by specifying the result type:

*Propellor.Types> (foo `requires` bar) :: Property HasInfo
property "foo"

But then when multiple `requires` are given, the result type has to be
given each time:

*Propellor.Types> (foo `requires` bar `requires` bar) :: Property HasInfo
<interactive>:22:6:
    No instance for (Requires (Property HasInfo) (Property HasInfo) x0)
      arising from a use of `requires'
    The type variable `x0' is ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Note: there is a potential instance available:
      instance Requires
                 (Property HasInfo) (Property HasInfo) (Property HasInfo)
        -- Defined at Propellor/Types.hs:167:10
    Possible fix:
      add an instance declaration for
      (Requires (Property HasInfo) (Property HasInfo) x0)
    In the first argument of `requires', namely `foo `requires` bar'
    In the expression:
        (foo `requires` bar `requires` bar) :: Property HasInfo
    In an equation for `it':
        it = (foo `requires` bar `requires` bar) :: Property HasInfo

<interactive>:22:21:
    No instance for (Requires x0 (Property HasInfo) (Property HasInfo))
      arising from a use of `requires'
    The type variable `x0' is ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Note: there are several potential instances:
      instance Requires
                 (Property NoInfo) (Property HasInfo) (Property HasInfo)
        -- Defined at Propellor/Types.hs:175:10
      instance Requires
                 (Property HasInfo) (Property HasInfo) (Property HasInfo)
        -- Defined at Propellor/Types.hs:167:10
    Possible fix:
      add an instance declaration for
      (Requires x0 (Property HasInfo) (Property HasInfo))
    In the expression:
        (foo `requires` bar `requires` bar) :: Property HasInfo
    In an equation for `it':
        it = (foo `requires` bar `requires` bar) :: Property HasInfo

*Propellor.Types> (((foo `requires` bar) :: Property HasInfo) `requires` bar) :: Property HasInfo
property "foo"

Yuggh!
2015-01-24 16:54:49 -04:00
Joey Hess 414ee7eee6 added GADT to determine between a property with info and without
Not yet used
2015-01-24 16:53:59 -04:00
Joey Hess 38eec6fc37 OS.preserveNetwork finally written 2015-01-23 01:30:50 -04:00
Joey Hess d156a1e9ba Added more network interface configuration properties. 2015-01-23 01:18:47 -04:00
Joey Hess bbac845900
propellor spin 2015-01-22 16:10:22 -04:00
Joey Hess 4d34b837d2 reorg 2015-01-21 23:28:47 -04:00
Joey Hess a37e0a6bc3
propellor spin 2015-01-21 23:22:42 -04:00
Joey Hess fa66cb49d6 Added journald configuration properties. 2015-01-21 23:21:24 -04:00
Joey Hess 88082c7293 Added systemd configuration properties. 2015-01-21 22:49:03 -04:00
Joey Hess 0a2a553d31 add back a warning aboit info propigation to ensureProperty 2015-01-19 16:14:01 -04:00
Joey Hess c8153ff0bd fix haddock 2015-01-19 15:55:02 -04:00
Joey Hess e28b1ab92b clean up exports 2015-01-19 15:20:12 -04:00
Joey Hess a738a20d79 export 2015-01-19 15:15:22 -04:00
Joey Hess e583c40c65 more reorg 2015-01-19 15:11:10 -04:00
Joey Hess 603e6d3406 split out types to improve haddock for Propellor.Types 2015-01-19 15:09:03 -04:00
Joey Hess 04d4d0d6c4 Fix info propigation from fallback combinator's second Property. 2015-01-19 14:43:25 -04:00