summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rw-r--r--doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_5_060b3ab57e525669c44192bbfdc730a4._comment17
-rw-r--r--doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_6_9d6536b85cd3fd3ca3b0128aff56d797._comment8
-rw-r--r--doc/todo/Ignore_lost+found_directory.mdwn10
-rw-r--r--doc/todo/Ignore_lost+found_directory/comment_1_77d239c2f73d23aa28a4db6806d1bbdb._comment21
-rw-r--r--doc/todo/Ignore_lost+found_directory/comment_2_cfdc0231f0f52ac1dda7a1b005e25ce0._comment10
-rw-r--r--doc/todo/creates_mount_point_and_always_tries_to_mount_when_using_Fstab.mounted.mdwn12
-rw-r--r--src/Propellor/Property/Fstab.hs3
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs2
9 files changed, 84 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 42eebb96..3ffd818c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ propellor (4.9.0) UNRELEASED; urgency=medium
* Made the PropellorRepo.hasOriginUrl property override the repository
url that --spin passes to a host.
* PropellorRepo.hasOriginUrl type changed to include HasInfo. (API change)
+ * Fstab.mounted: Create mount point if necessary, and mount it
+ if it's not already mounted.
+ Thanks, Nicolas Schodet
-- Joey Hess <id@joeyh.name> Wed, 04 Oct 2017 12:46:23 -0400
diff --git a/doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_5_060b3ab57e525669c44192bbfdc730a4._comment b/doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_5_060b3ab57e525669c44192bbfdc730a4._comment
new file mode 100644
index 00000000..2578ef8e
--- /dev/null
+++ b/doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_5_060b3ab57e525669c44192bbfdc730a4._comment
@@ -0,0 +1,17 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 5"""
+ date="2017-10-04T17:12:59Z"
+ content="""
+Not sure why unpropelling blocks this. IIRC we discussed using a regular
+propellor chroot to set up the sbuild chroot. And I pointed out that when
+propellor runs inside a chroot, it does it without installing any
+dependencies into the chroot; everything propellor needs to run is
+bind mounted into /usr/local/propellor in the chroot.
+
+So, the most an "unpropell" property would need to do in a chroot is to
+unmount below /usr/local/propellor and remove that directory, which should
+then be empty. This might be desirable to be sure that the sbuild
+environment is 100% clean, in the unlikely chance that something
+builds differently when /usr/local/propellor exists.
+"""]]
diff --git a/doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_6_9d6536b85cd3fd3ca3b0128aff56d797._comment b/doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_6_9d6536b85cd3fd3ca3b0128aff56d797._comment
new file mode 100644
index 00000000..32427cef
--- /dev/null
+++ b/doc/forum/Sbuild_chroot_are_not_compatible_with_schroot/comment_6_9d6536b85cd3fd3ca3b0128aff56d797._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 6"
+ date="2017-10-20T21:47:43Z"
+ content="""
+I'd forgotten that detail of our discussion. Thanks. Moving this onto my TODO list; hope to work on it soon.
+"""]]
diff --git a/doc/todo/Ignore_lost+found_directory.mdwn b/doc/todo/Ignore_lost+found_directory.mdwn
new file mode 100644
index 00000000..9b1469b3
--- /dev/null
+++ b/doc/todo/Ignore_lost+found_directory.mdwn
@@ -0,0 +1,10 @@
+Hello,
+
+I had a problem where propellor refused to create a chroot because the target
+directory was not empty. Actually, the directory contained `lost+found`.
+
+I made a patch to ignore this directory, do you see any bad side effect?
+
+You can pull the `ignore-lost-n-found` branch at `http://git.ni.fr.eu.org/nicolas/propellor.git`.
+
+Nicolas.
diff --git a/doc/todo/Ignore_lost+found_directory/comment_1_77d239c2f73d23aa28a4db6806d1bbdb._comment b/doc/todo/Ignore_lost+found_directory/comment_1_77d239c2f73d23aa28a4db6806d1bbdb._comment
new file mode 100644
index 00000000..80efdeec
--- /dev/null
+++ b/doc/todo/Ignore_lost+found_directory/comment_1_77d239c2f73d23aa28a4db6806d1bbdb._comment
@@ -0,0 +1,21 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-10-15T16:52:44Z"
+ content="""
+I feel that modifying `dirCruft` to include "lost+found" is a layering
+violation, because it could change the behavior of a lot of things besides
+checking if a directory is empty "enough". Consider code that recurses
+through a directory and sets permissions or owner.
+
+This calls for a new function, or a modification to a more specific
+function, to handle the "lost+found" case.
+`Propellor.Property.Chroot.Util.unpopulated` seems like a good place to
+handle it.
+
+There are also some backup/restore properties, for Borg and Restic etc, that
+only do a restore if a directory is empty or missing, and it seems to make
+sense for them to also special-case handling of "lost+found". So it would
+make sense to move `unpopulated` to a module that's not chroot-specific
+and make those things also use it.
+"""]]
diff --git a/doc/todo/Ignore_lost+found_directory/comment_2_cfdc0231f0f52ac1dda7a1b005e25ce0._comment b/doc/todo/Ignore_lost+found_directory/comment_2_cfdc0231f0f52ac1dda7a1b005e25ce0._comment
new file mode 100644
index 00000000..72a24a30
--- /dev/null
+++ b/doc/todo/Ignore_lost+found_directory/comment_2_cfdc0231f0f52ac1dda7a1b005e25ce0._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="Nicolas.Schodet"
+ avatar="http://cdn.libravatar.org/avatar/0d7ec808ec329d04ee9a93c0da3c0089"
+ subject="comment 2"
+ date="2017-10-19T19:40:25Z"
+ content="""
+Here is a new version.
+
+I have put it in `Utility.Directory` as it is quite generic.
+"""]]
diff --git a/doc/todo/creates_mount_point_and_always_tries_to_mount_when_using_Fstab.mounted.mdwn b/doc/todo/creates_mount_point_and_always_tries_to_mount_when_using_Fstab.mounted.mdwn
new file mode 100644
index 00000000..d491bce9
--- /dev/null
+++ b/doc/todo/creates_mount_point_and_always_tries_to_mount_when_using_Fstab.mounted.mdwn
@@ -0,0 +1,12 @@
+Hello,
+
+this simple change creates mount point and always tries to mount when using
+Fstab.mounted.
+
+See [[forum/Fstab.mounted_does_not_mount_if_entry_exists]].
+
+Please pull `fstab-mounted` branch at `http://git.ni.fr.eu.org/nicolas/propellor.git`.
+
+Nicolas.
+
+> [[done]] thanks! --[[Joey]]
diff --git a/src/Propellor/Property/Fstab.hs b/src/Propellor/Property/Fstab.hs
index 29b85426..53ed4fba 100644
--- a/src/Propellor/Property/Fstab.hs
+++ b/src/Propellor/Property/Fstab.hs
@@ -26,7 +26,8 @@ import Utility.Table
mounted :: FsType -> Source -> MountPoint -> MountOpts -> Property Linux
mounted fs src mnt opts = tightenTargets $
listed fs src mnt opts
- `onChange` mountnow
+ `before` mountnow
+ `requires` File.dirExists mnt
where
-- This use of mountPoints, which is linux-only, is why this
-- property currently only supports linux.
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 3076cbfd..7812c855 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -912,7 +912,7 @@ alarmClock oncalendar (User user) command = combineProperties "goodmorning timer
homePowerMonitor :: IsContext c => User -> c -> (SshKeyType, Ssh.PubKeyText) -> Property (HasInfo + DebianLike)
homePowerMonitor user ctx sshkey = propertyList "home power monitor" $ props
& Apache.installed
- & Apt.installed ["python2", "python-pymodbus"]
+ & Apt.installed ["python", "python-pymodbus"]
& File.ownerGroup "/var/www/html" user (userGroup user)
& Git.cloned user "git://git.kitenet.net/joey/homepower" d Nothing
`onChange` buildpoller