summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2018-02-04 11:59:02 -0400
committerJoey Hess2018-02-04 11:59:02 -0400
commitdcae58d6262117122dc8af0a0e6fc63ed2c25c88 (patch)
treec394be44bd65b8e4b7be4d8c90e3608400e148fc
parentc0a2701284a800f55abdd61f0b8619582c399a9e (diff)
parentab7a7f421c9b57b5963a44e57a6a4df7c594aca6 (diff)
Merge branch 'master' into joeyconfig
l---------config.hs2
-rwxr-xr-xcontrib/post-merge-hook4
-rw-r--r--debian/changelog14
-rw-r--r--doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor.mdwn43
-rw-r--r--doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_1_6ed53a6752f3f88acce023a4fe1b9bf6._comment27
-rw-r--r--doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_2_8592411690ea524b65e4fba580d51ba8._comment10
-rw-r--r--doc/forum/imageBuiltFor_mount_points_not_automatically_created/comment_19_22178bd21d8a44bdd67cad162f71c400._comment11
-rw-r--r--doc/news/version_5.2.0.mdwn24
-rw-r--r--doc/news/version_5.3.0.mdwn16
-rw-r--r--doc/todo/partition_properties_should_install_e2fsprogs/comment_2_54a6e8a53221d0db2fe37703cd0a011d._comment8
-rw-r--r--privdata/relocate1
-rw-r--r--propellor.cabal4
-rw-r--r--src/Propellor/Property.hs4
13 files changed, 135 insertions, 33 deletions
diff --git a/config.hs b/config.hs
index 97d90636..ec313725 120000
--- a/config.hs
+++ b/config.hs
@@ -1 +1 @@
-joeyconfig.hs \ No newline at end of file
+config-simple.hs \ No newline at end of file
diff --git a/contrib/post-merge-hook b/contrib/post-merge-hook
index fa9ab5b6..4bbb1de7 100755
--- a/contrib/post-merge-hook
+++ b/contrib/post-merge-hook
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# git post-merge hook, used by propellor's author to maintain a
-# joeyconfig branch with some changes while being able to merge
+# git post-merge (and post-checkout) hook, used by propellor's author to
+# maintain a joeyconfig branch with some changes while being able to merge
# between it and branches without the changes.
#
# Each time this hook is run, it checks if it's on a branch with
diff --git a/debian/changelog b/debian/changelog
index 23172a22..a0471182 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,12 @@
-propellor (5.3.0) UNRELEASED; urgency=medium
+propellor (5.3.1) UNRELEASED; urgency=medium
+
+ * Last release mistakenly contained my personal branch not master.
+ * contrib/post-merge-hook documentation updated to recommend also using
+ it as a post-checkout hook, to avoid such problems.
+
+ -- Joey Hess <id@joeyh.name> Sun, 04 Feb 2018 11:54:28 -0400
+
+propellor (5.3.0) unstable; urgency=medium
* Avoid bogus warning about new upstream version when /usr/bin/propellor
is run on a Debian system, but ~/.propellor was not cloned from the
@@ -8,12 +16,14 @@ propellor (5.3.0) UNRELEASED; urgency=medium
* Added rawPartition to PartSpec, for specifying partitions with no
filesystem.
* Added BiosGrubFlag to PartFlag.
+ * Add HasCallStack constraint to pickOS and unsupportedOS, so the
+ call stack includes the caller.
* Run su with --login, to avoid inheriting some problematic environment
variables, such as TMP, from the caller.
* Grub: Added properties to configure /etc/default/grub.
* Laptop: New module, starting with powertopAutoTuneOnBoot.
- -- Joey Hess <id@joeyh.name> Tue, 02 Jan 2018 13:06:45 -0400
+ -- Joey Hess <id@joeyh.name> Thu, 01 Feb 2018 12:27:01 -0400
propellor (5.2.0) unstable; urgency=medium
diff --git a/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor.mdwn b/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor.mdwn
new file mode 100644
index 00000000..8625ee00
--- /dev/null
+++ b/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor.mdwn
@@ -0,0 +1,43 @@
+Hello,
+
+I merged 5.2.0 into my .propellor, last merge was merging f6797bed.
+
+Since the merge, when I try to spin, I get:
+
+ riva4.ni.fr.eu.org has ipv4 91.121.114.4 ... ok
+ ** warning: Unknown host OS is not supported by this property.
+ CallStack (from HasCallStack):
+ error, called at src/Propellor/Property.hs:350:30 in main:Propellor.Property
+ riva4.ni.fr.eu.org container vz-web2 ... failed
+ riva4.ni.fr.eu.org overall ... failed
+
+I have in my config.hs:
+
+ riva4 :: Host
+ riva4 = host "riva4.ni.fr.eu.org" $ props
+ & ipv4 "91.121.114.4"
+ & stdContainerSpawn "vz-web2" "2g" vzWeb2
+
+ stdContainerSpawn :: Systemd.MachineName
+ -> String
+ -> Systemd.Container
+ -> Property (HasInfo + DebianLike)
+ stdContainerSpawn name size container =
+ Lvm.lvFormatted Lvm.YesReallyFormatLogicalVolume
+ (Lvm.LogicalVolume name (Lvm.VolumeGroup "vg0")) size
+ Partition.EXT4
+ `before` Fstab.mounted "auto" dev dir mempty
+ `before` Systemd.nspawned container
+ `describe` ("container " ++ name)
+ where
+ dev = "/dev/vg0" </> name
+ dir = "/var/lib/container" </> name
+
+ vzWeb2 :: Systemd.Container
+ vzWeb2 = Systemd.debContainer "vz-web2" $ props
+ & osDebian (Stable "stretch") X86_64
+ & ipv4 "10.42.2.13"
+
+I reviewed all changes in propellor, but I cannot find what can cause this.
+
+How can I debug this?
diff --git a/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_1_6ed53a6752f3f88acce023a4fe1b9bf6._comment b/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_1_6ed53a6752f3f88acce023a4fe1b9bf6._comment
new file mode 100644
index 00000000..608bc3e2
--- /dev/null
+++ b/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_1_6ed53a6752f3f88acce023a4fe1b9bf6._comment
@@ -0,0 +1,27 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2018-01-24T16:55:19Z"
+ content="""
+This comes from something using `unsupportedOS'`, perhaps via `pickOS`.
+
+Probably it's coming from the use of `Systemd.nspawned`,
+which is going to use debootstrap to build the container,
+since the container uses debian. To use debootstrap,
+it needs to install it, and `Debootstrap.installed`
+uses `pickOS` to work out how to install it, but only supports
+installing debootstrap on linux hosts. Your riva4 host does not have its OS
+declared, leading to the failure.
+
+It seems there ought to be a way to get a deeper call
+stack, to make it easier to work this out. It's possible to build
+propellor with profiling and get a complete call stack, as shown at
+<https://wiki.haskell.org/Debugging#Stack_trace>. It might make sense for
+propellor to always be built that way.
+
+A simpler approach is to
+add `HasCallStack =>` constraints to `pickOS` and `unsupportedOS'`,
+so that those will have a call stack that reaches back to their
+caller, which in your case would reach back to `Debootstrap.installed`,
+which is probably enough. For now, I've made this change.
+"""]]
diff --git a/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_2_8592411690ea524b65e4fba580d51ba8._comment b/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_2_8592411690ea524b65e4fba580d51ba8._comment
new file mode 100644
index 00000000..430c4e90
--- /dev/null
+++ b/doc/forum/__34__Unknown_host_OS__34___after_merging_recent_propellor/comment_2_8592411690ea524b65e4fba580d51ba8._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="Nicolas.Schodet"
+ avatar="http://cdn.libravatar.org/avatar/0d7ec808ec329d04ee9a93c0da3c0089"
+ subject="response"
+ date="2018-01-29T20:49:46Z"
+ content="""
+Thanks, it works :)
+
+riva4 is not configured by propellor yet, but osDebian does not touch anything so it's OK.
+"""]]
diff --git a/doc/forum/imageBuiltFor_mount_points_not_automatically_created/comment_19_22178bd21d8a44bdd67cad162f71c400._comment b/doc/forum/imageBuiltFor_mount_points_not_automatically_created/comment_19_22178bd21d8a44bdd67cad162f71c400._comment
new file mode 100644
index 00000000..bd34df0a
--- /dev/null
+++ b/doc/forum/imageBuiltFor_mount_points_not_automatically_created/comment_19_22178bd21d8a44bdd67cad162f71c400._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="gueux"
+ avatar="http://cdn.libravatar.org/avatar/2982bac2c2cd94ab3860efb189deafc8"
+ subject="comment 19"
+ date="2018-01-29T17:55:43Z"
+ content="""
+I tried several configurations, without success. Without a serial console, that was not fun to debug... I finally tried to boot the image with qemu, and that worked! So I thought that maybe I should try to use a MSDOS partition table instead of a GPT one, just to be sure. And that finally produced a bootable image on that damn card! :) I'll report a bug to PCEngines. It's unfortunate I can't test the GPT code more, but it would probably work, as it booted in qemu.
+
+Thanks a lot Joey!
+
+"""]]
diff --git a/doc/news/version_5.2.0.mdwn b/doc/news/version_5.2.0.mdwn
deleted file mode 100644
index 8cd1edaf..00000000
--- a/doc/news/version_5.2.0.mdwn
+++ /dev/null
@@ -1,24 +0,0 @@
-propellor 5.2.0 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * [ Joey Hess ]
- * bootstrappedFrom: Set up local privdata file.
- * Parted: Fix names used for FAT and VFAT partitions.
- * Parted: Add an Alignment parameter. (API change)
- A good default to use is safeAlignment, which is 4MiB,
- well suited for inexpensive flash drives, and fine for other disks too.
- Previously, a very non-optimial 1MB (not 1MiB) alignment had been used.
- * DiskImage: Use safeAlignment. It didn't seem worth making the
- alignment configurable here.
- * Fixed rounding bug in Parted.calcPartTable.
- * DiskImage: Fix rsync crash when a mount point does not exist in the
- chroot.
- * Fix bug in unmountBelow that caused unmounting of nested mounts to
- fail.
- * Grub.boots, Grub.bootsMounted: Pass --target to grub-install.
- * Added Propellor.Property.Installer modules, which can be used to create
- bootable installer disk images, which then run propellor to install
- a system. This code was extracted from the demo I gave in my
- talk at DebConf 2017.
- * [ Sean Whitton ]
- * Sbuild: add notes about Debian jessie hosts and backports of sbuild and
- autopkgtest."""]] \ No newline at end of file
diff --git a/doc/news/version_5.3.0.mdwn b/doc/news/version_5.3.0.mdwn
new file mode 100644
index 00000000..07900e0b
--- /dev/null
+++ b/doc/news/version_5.3.0.mdwn
@@ -0,0 +1,16 @@
+propellor 5.3.0 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Avoid bogus warning about new upstream version when /usr/bin/propellor
+ is run on a Debian system, but ~/.propellor was not cloned from the
+ Debian git bundle.
+ * Parted: Allow partitions to have no filesystem, for eg, GPT BIOS boot
+ partitions. (API change)
+ * Added rawPartition to PartSpec, for specifying partitions with no
+ filesystem.
+ * Added BiosGrubFlag to PartFlag.
+ * Add HasCallStack constraint to pickOS and unsupportedOS, so the
+ call stack includes the caller.
+ * Run su with --login, to avoid inheriting some problematic environment
+ variables, such as TMP, from the caller.
+ * Grub: Added properties to configure /etc/default/grub.
+ * Laptop: New module, starting with powertopAutoTuneOnBoot."""]] \ No newline at end of file
diff --git a/doc/todo/partition_properties_should_install_e2fsprogs/comment_2_54a6e8a53221d0db2fe37703cd0a011d._comment b/doc/todo/partition_properties_should_install_e2fsprogs/comment_2_54a6e8a53221d0db2fe37703cd0a011d._comment
new file mode 100644
index 00000000..e7527bdc
--- /dev/null
+++ b/doc/todo/partition_properties_should_install_e2fsprogs/comment_2_54a6e8a53221d0db2fe37703cd0a011d._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 2"
+ date="2018-01-19T22:59:44Z"
+ content="""
+Thanks for checking this!
+"""]]
diff --git a/privdata/relocate b/privdata/relocate
deleted file mode 100644
index 271692d8..00000000
--- a/privdata/relocate
+++ /dev/null
@@ -1 +0,0 @@
-.joeyconfig
diff --git a/propellor.cabal b/propellor.cabal
index e59a55a4..4f90c49c 100644
--- a/propellor.cabal
+++ b/propellor.cabal
@@ -1,5 +1,5 @@
Name: propellor
-Version: 5.2.0
+Version: 5.3.1
Cabal-Version: >= 1.20
License: BSD2
Maintainer: Joey Hess <id@joeyh.name>
@@ -126,8 +126,8 @@ Library
Propellor.Property.Installer.Target
Propellor.Property.Journald
Propellor.Property.Kerberos
- Propellor.Property.LetsEncrypt
Propellor.Property.Laptop
+ Propellor.Property.LetsEncrypt
Propellor.Property.List
Propellor.Property.LightDM
Propellor.Property.Locale
diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs
index 884ee683..8c0a5859 100644
--- a/src/Propellor/Property.hs
+++ b/src/Propellor/Property.hs
@@ -55,6 +55,7 @@ import Data.Maybe
import Data.List
import Data.Hashable
import Control.Applicative
+import GHC.Stack
import Prelude
import Propellor.Types
@@ -283,6 +284,7 @@ isNewerThan x y = do
-- fail that way.
pickOS
::
+ HasCallStack =>
( SingKind ('KProxy :: KProxy ka)
, SingKind ('KProxy :: KProxy kb)
, DemoteRep ('KProxy :: KProxy ka) ~ [MetaType]
@@ -344,7 +346,7 @@ unsupportedOS = property "unsupportedOS" unsupportedOS'
-- | Throws an error, for use in `withOS` when a property is lacking
-- support for an OS.
-unsupportedOS' :: Propellor Result
+unsupportedOS' :: HasCallStack => Propellor Result
unsupportedOS' = go =<< getOS
where
go Nothing = error "Unknown host OS is not supported by this property."