summaryrefslogtreecommitdiff
path: root/src/Propellor/Bootstrap.hs
AgeCommit message (Collapse)Author
2020-03-05Add haskell-type-errors package on Arch LinuxRobin Munn
2020-02-16Fix typo in Arch Linux dependenciesRobin Munn
2018-12-04libghc-stm-dev package won't be in new versions of debianJoey Hess
In Bootstrap, still try to install the package to support bootstrapping to old systems. If it's not available the bootstrapping will still succeed. The added apt-cache check is only to avoid apt complaining when asked to install a not available package. In debian/control, depend on ghc that includes stm, although propellor still supports being used with older versions of ghc Of course this control file is not being used for the package in debian any longer afaik, so something else will be done there.
2018-10-23src: Update Propellor.Bootstrap.cabalBuild.rsiddharth
Make the `cp` command openbsd and gnu/linux compatible. * src/Propellor/Bootstrap.hs (cabalBuild): Update function.
2018-06-03remove wheezy referenceJoey Hess
2018-04-30Revert "Added dependency on concurrent-output; removed embedded copy."Joey Hess
This reverts commit 02eca2ae4cf51d8e83d94d8359e15ac053451109. This seems to have broken propellor badly, in testing I'm seeing it crash at the end of a run with "thread blocked indefinitely in an STM transaction" and also during the run it printed out some odd output like: apache2: apache2: dummy IN SSHFP 4 1 35df80973f5877e4041f1b70947385eb2f6a0822 dummy IN SSHFP 4 2 3a0bb426e76eebc5c56e3b0f1428aa9d18539e9621bf8f9e3b7f56a4e7d81c85 Which seems like it might be output of commands that propellor is supposed to be reading? Seems likely that there's a bug or two that have crept into then concurrent-output library since the version embedded in propellor.
2018-04-23Added dependency on concurrent-output; removed embedded copy.Joey Hess
Removed deps on transformers, text, stm. Updated debian/control and Propellor.Bootstrap accordingly. Sorted the lists of deps to make it easier to keep them in sync.
2017-11-17another -j1Joey Hess
2017-11-17run cabal build with -j1Joey Hess
In an arm chroot, ghc tends to hang when building in parallel, this avoids that problem.
2017-10-04get deps back in syncJoey Hess
propellor currently still embeds concurrent-output, so the debian package does not need to depend on the library.
2017-08-23Add Typeable instance to Bootstrapper, fixing build with old versions of ↵Joey Hess
ghc. (Previous attempt was incomplete.)
2017-07-25Add Typeable instance to Bootstrapper, fixing build with old versions of ghc.Joey Hess
2017-07-13fix typo in build pathJoey Hess
2017-07-13use stack build --dry-run to check if deps are installedJoey Hess
The system might have stack installed, so stack --version would succeed, but need stack setup to be run to get a working ghc. This will fail if stack is not installed, or if stack setup needs to be run. It does not fail when haskell libraries are not installed, but stack build will install those anyway, so that's ok.
2017-07-12add bootstrapWith property to support stack and moreJoey Hess
* Hosts can be configured to build propellor using stack, by adding a property: & bootstrapWith (Robustly Stack) * Hosts can be configured to build propellor using cabal, but using only packages installed from the operating system. This will work on eg Debian: & bootstrapWith OSOnly propellor build its config using stack. (This does not affect how propellor is bootstrapped on a host by "propellor --spin host".) This has not yet been tested at all! But should probably work fine. This is based on earlier work by Arnaud Bailly, who made Propellor.Bootstrap use stack without parameterization. In Arnaud's patch, stack was installed using wget, but that only worked on linux-x86_64 and was insecure. I instead chose to use the distribution packages of stack, like is done for cabal. Debian stack has haskell-stack now, and it's getting into many distributions. This commit was sponsored by Francois Marier on Patreon.
2017-07-04Bootstrap.bootstrappedFrom: Fix bug that caused propellor to only be built ↵Joey Hess
from the bootstrapped config the first time. When the config changes, the bootstrapped propellor needs to get rebuilt. This commit was sponsored by Fernando Jimenez on Patreon.
2017-05-15Removed dependency on MissingH, instead depends on split and hashable.Joey Hess
MissingH is a heavy dependency, which pulls in parsec and a bunch of stuff. So eliminating it makes propellor easier to install and less likely to fail to build. changesFileContent now uses hashable's hash. This may not be stable across upgrades, I'm not sure -- but it's surely ok here, as the hash is not stored. socketFile also uses hash. I *think* this is ok, even if it's not stable. If it's not stable, an upgrade might make propellor hash a hostname to a different number, but with 9 digets of number in use, the chances of a collision are small. In any case, I've opned a bug report asking for the stability to be documented, and I think it's intended to be stable, only the documentation is bad. NB: I have not checked that the arch linux and freebsd packages for the new deps, that Propellor.Bootstrap lists, are the right names or even exist. Since propellor depends on hashable, it could be changed to use unordered-containers, rather than containers, which would be faster and perhaps less deps too. This commit was sponsored by Alexander Thompson on Patreon.
2017-04-09avoid "sh: 1: git: not found" before auto-install of gitJoey Hess
2017-03-08Remove make from propellor's dependency listJoey Hess
It's not used by propellor any longer. Has not been used for a long time actually.
2017-02-03Bootstrap using PacmanZihao Wang
Signed-off-by: Zihao Wang <dev@wzhd.org>
2016-06-13add DebianKernel datatypeFélix Sipma
(cherry picked from commit 3590a1241580ddcdd153e2619a3c02ce18a8db8c but without the changes to src/Propellor/Precompiled.hs)
2016-04-05propellor spinJoey Hess
2016-04-02Stack support.Joey Hess
* Stack support. "git config propellor.buildsystem stack" will make propellor build its config using stack. * When propellor is installed using stack, propellor --init will automatically set propellor.buildsystem=stack.
2016-03-30apt install propellor dependencies more quietlyJoey Hess
Avoids spam when most deps are installed
2016-03-30When new dependencies are added to propellor or the propellor config, try ↵Joey Hess
harder to get them installed. In particular, this makes propellor --spin work when the remote host needs to get dependencies installed in order to build the updated config. Fixes http://propellor.branchable.com/todo/problem_with_spin_after_new_dependencies_added/
2016-03-30add hs-concurrent-output to freebsd depsJoey Hess
2016-03-27add dep on concurrent-output, and re-enable -O0Joey Hess
Using the external concurrent-output library lets it be built with -O2 as is needed to get good runtime memory use. Enabling -O0 because ghc is using rather a lot more time and memory due to the new more complex types. old master branch: Linking dist/build/propellor-config/propellor-config ... 24.59user 0.97system 0:25.93elapsed 98%CPU (0avgtext+0avgdata 354612maxresident)k 1544inputs+46064outputs (0major+371244minor)pagefaults 0swaps this branch before -O0: Linking dist/build/propellor-config/propellor-config ... 25.56user 0.73system 0:26.61elapsed 98%CPU (0avgtext+0avgdata 345348maxresident)k 0inputs+43480outputs (0major+364163minor)pagefaults 0swaps this branch with -O0: Linking dist/build/propellor-config/propellor-config ... 11.91user 0.75system 0:12.97elapsed 97%CPU (0avgtext+0avgdata 237472maxresident)k 16inputs+37264outputs (0major+336166minor)pagefaults 0swaps Above benchmarks are building all source files needed by config-simple.hs. The story is rather worse for joeyconfig.hs; building it now needs over 500 mb even with -O0 :-/
2016-03-09Speed up propellor's build of itself, by asking cabal to only build the ↵Joey Hess
propellor-config binary and not all the libraries. This is a super speedup!
2016-03-08fix reversion in bootstrap spin of system with no declared OSJoey Hess
The freebsd changes caused a bootstrap of a system with no declared OS to not work, where before it was assumed to be some debian-like system where apt can be used. Brought back this assumption.
2016-03-07make Cron.runPropellor pass System to bootstrapPropellorCommandJoey Hess
Rather than having the property fail when the Host has no OS defined, I made bootstrapPropellorCommand not install deps in this situation. The cron job will (probably) still work, unless a system upgrade causes deps to be removed.
2016-03-07refactorJoey Hess
2016-03-07indentsJoey Hess
2016-03-07unnecessary parensJoey Hess
2016-03-07fix checkBinaryCommandJoey Hess
The freebsd branch made it run ./propellor --check after verifying that command fails, which is clearly wrong.
2016-03-07fix indentJoey Hess
2016-03-07FreeBSD Support including:Evan Cofsky
- Propellor bootstrapping - Basic pkg - Basic ZFS datasets and properties - Simple Poudriere configuration (regular and ZFS) - Poudriere jail creation FIXME: - Cron.hs: runPropellor needs the System, but hasn't yet gotten it. Reorganizing: - Remove FreeBSD.Process - Move ZFS up to Property - Add Info for Pkg.update/Pkg.upgrade - Move FreeBSD.md to doc so it'll show up automatically. - Merge the FreeBSD config with the other sample config. - Use Info to check Pkg updated/upgraded and Poudriere configured. - Warnings clean-up, move ZFS types to Propellor.Types. - Maintainer and license statements.
2015-12-30Bootstrap apt-get installs run with deconf noninteractive frontend.Joey Hess
Debconf was prompting because installing git needed a new libc, which prompts for service restarts..
2015-11-17Removed the (unused) dependency on quickcheck.Joey Hess
2015-10-29generalize what can be outputJoey Hess
This adds a dependency on Text, but I don't mind propellor depending on it and am somewhat surprised it doesn't already. Using Text also lets this use encodeUtf8 instead of the nasty hack it was using to go from String -> ByteString.
2015-10-28fix bad MVar use, use STMJoey Hess
I had 2 MVars both involved in the same lock, and it seemed intractable to avoid deadlocks with them. STM makes it easy. At this point, the concurrent process stuff seems to work pretty well, but I'm not 100% sure it's not got some bugs.
2015-10-10propellor spinJoey Hess
2015-09-30force copy when destination existsJoey Hess
2015-09-25propellor spinJoey Hess
2015-09-25Guard against power loss etc when building propellor, by updating the ↵Joey Hess
executable atomically.
2015-08-12Make sure that make is installed when bootstrapping propellor.Joey Hess
2015-05-27Export CommandParam, boolSystem, safeSystem and shellEscape from ↵Joey Hess
Propellor.Property.Cmd, so they are available for use in constricting your own Properties when using propellor as a library. Several imports of Utility.SafeCommand now redundant.
2015-04-29avoid checking build deps if cabal configures okJoey Hess
2015-04-29Ensure build deps are installed before building propellor in --spin and cron ↵Joey Hess
job, even if propellor was already built before, to deal with upgrades that add new dependencies.
2015-04-29propellor spinJoey Hess
2015-04-02/dev/null any error from propellor --checkJoey Hess
This includes "unknown option" from old versions of propellor..