summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rw-r--r--joeyconfig.hs41
-rw-r--r--src/Propellor/Property/Apt.hs6
-rw-r--r--src/Propellor/Property/Machine.hs2
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs30
5 files changed, 56 insertions, 30 deletions
diff --git a/debian/changelog b/debian/changelog
index 3d9e82cb..9af87222 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+propellor (5.3.5) UNRELEASED; urgency=medium
+
+ * Apt.stdSourcesList now adds stable-updates suite
+ Thanks, Sean Whitton
+
+ -- Joey Hess <id@joeyh.name> Wed, 18 Apr 2018 10:12:21 -0400
+
propellor (5.3.4) unstable; urgency=medium
* Apt.trustsKey: Use apt-key to add key rather than manually driving gpg,
diff --git a/joeyconfig.hs b/joeyconfig.hs
index fa312f1c..bba2072f 100644
--- a/joeyconfig.hs
+++ b/joeyconfig.hs
@@ -49,7 +49,6 @@ main = defaultMain hosts -- / \___-=O`/|O`/__| (____.'
hosts :: [Host] -- * \ | | '--------'
hosts = -- (o) `
[ darkstar
- , gnu
, dragon
, clam
, orca
@@ -64,25 +63,6 @@ hosts = -- (o) `
, keysafe
] ++ monsters
-testvm :: Host
-testvm = host "testvm.kitenet.net" $ props
- & osDebian Unstable X86_64
- & OS.cleanInstallOnce (OS.Confirmed "testvm.kitenet.net")
- `onChange` postinstall
- & Hostname.sane
- & Hostname.searchDomain
- & Apt.installed ["linux-image-amd64"]
- & Apt.installed ["ssh"]
- & User.hasPassword (User "root")
- where
- postinstall :: Property (HasInfo + DebianLike)
- postinstall = propertyList "fixing up after clean install" $ props
- & OS.preserveRootSshAuthorized
- & OS.preserveResolvConf
- & Apt.update
- & Grub.boots "/dev/sda"
- `requires` Grub.installed Grub.PC
-
darkstar :: Host
darkstar = host "darkstar.kitenet.net" $ props
& osDebian Unstable X86_64
@@ -106,10 +86,9 @@ darkstar = host "darkstar.kitenet.net" $ props
-- & imageBuiltFor honeybee
-- (RawDiskImage "/srv/honeybee.img")
-- (Debootstrapped mempty)
-
-gnu :: Host
-gnu = host "gnu.kitenet.net" $ props
- & Postfix.satellite
+ & imageBuiltFor banana
+ (RawDiskImage "/srv/banana.img")
+ (Debootstrapped mempty)
dragon :: Host
dragon = host "dragon.kitenet.net" $ props
@@ -182,6 +161,17 @@ orca = host "orca.kitenet.net" $ props
& Systemd.nspawned (GitAnnexBuilder.androidAutoBuilderContainer
(Cron.Times "1 1 * * *") "3h")
+banana :: Host
+banana = host "banana.kitenet.net" $ props
+ & lemaker_Banana_Pi
+ & hasPartition
+ ( partition EXT4
+ `mountedAt` "/"
+ `setSize` MegaBytes 950
+ )
+ & osDebian Testing ARMHF
+ & User.hasInsecurePassword (User "root") "root"
+
honeybee :: Host
honeybee = host "honeybee.kitenet.net" $ props
& standardSystem Testing ARMHF
@@ -637,8 +627,7 @@ monsters = -- but do want to track their public keys etc.
, host "ns6.gandi.net" $ props
& ipv4 "217.70.177.40"
, host "animx" $ props
- & ipv4 "76.7.162.186"
- & ipv4 "76.7.162.187"
+ & ipv4 "76.7.174.49"
]
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index 7275205a..5080b1e2 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -88,6 +88,8 @@ binandsrc :: String -> SourcesGenerator
binandsrc url suite = catMaybes
[ Just l
, Just $ srcLine l
+ , sul
+ , srcLine <$> sul
, bl
, srcLine <$> bl
]
@@ -96,6 +98,10 @@ binandsrc url suite = catMaybes
bl = do
bs <- backportSuite suite
return $ debLine bs url stdSections
+ -- formerly known as 'volatile'
+ sul = do
+ sus <- stableUpdatesSuite suite
+ return $ debLine sus url stdSections
stdArchiveLines :: Propellor SourcesGenerator
stdArchiveLines = return . binandsrc =<< getMirror
diff --git a/src/Propellor/Property/Machine.hs b/src/Propellor/Property/Machine.hs
index 0fe172b5..698c7717 100644
--- a/src/Propellor/Property/Machine.hs
+++ b/src/Propellor/Property/Machine.hs
@@ -48,10 +48,10 @@ module Propellor.Property.Machine (
marvell_SheevaPlug,
cubietech_Cubietruck,
olimex_A10_OLinuXino_LIME,
+ lemaker_Banana_Pi,
-- * ARM boards (untested)
cubietech_Cubieboard,
cubietech_Cubieboard2,
- lemaker_Banana_Pi,
lemaker_Banana_Pro,
olimex_A10s_OLinuXino_Micro,
olimex_A20_OLinuXino_LIME,
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 8aa2f3bd..7d2ae9df 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -15,6 +15,7 @@ import qualified Propellor.Property.Git as Git
import qualified Propellor.Property.Cron as Cron
import qualified Propellor.Property.Service as Service
import qualified Propellor.Property.User as User
+import qualified Propellor.Property.Group as Group
import qualified Propellor.Property.Borg as Borg
import qualified Propellor.Property.Apache as Apache
import qualified Propellor.Property.Postfix as Postfix
@@ -916,10 +917,15 @@ homePowerMonitor user hosts ctx sshkey = propertyList "home power monitor" $ pro
& File.ownerGroup "/var/www/html" user (userGroup user)
& Git.cloned user "git://git.kitenet.net/joey/homepower" d Nothing
& buildpoller
+ & Systemd.enabled setupservicename
+ `requires` setupserviceinstalled
+ `onChange` Systemd.started setupservicename
& Systemd.enabled servicename
`requires` serviceinstalled
`onChange` Systemd.started servicename
& User.hasGroup user (Group "dialout")
+ & Group.exists (Group "gpio") Nothing
+ & User.hasGroup user (Group "gpio")
& Cron.niceJob "homepower upload"
(Cron.Times "1 * * * *") user d rsynccommand
`requires` Ssh.userKeyAt (Just sshkeyfile) user ctx sshkey
@@ -951,6 +957,23 @@ homePowerMonitor user hosts ctx sshkey = propertyList "home power monitor" $ pro
, "[Install]"
, "WantedBy=multi-user.target"
]
+ setupservicename = "homepower-setup"
+ setupservicefile = "/etc/systemd/system/" ++ setupservicename ++ ".service"
+ setupserviceinstalled = setupservicefile `File.hasContent`
+ [ "[Unit]"
+ , "Description=home power monitor setup"
+ , ""
+ , "[Service]"
+ , "ExecStart=" ++ d ++ "/setup"
+ , "WorkingDirectory=" ++ d
+ , "User=root"
+ , "Group=root"
+ , "Type=oneshot"
+ , ""
+ , "[Install]"
+ , "WantedBy=multi-user.target"
+ , "WantedBy=homepower.target"
+ ]
-- Any changes to the rsync command will need my .authorized_keys
-- rsync server command to be updated too.
rsynccommand = "rsync -e 'ssh -i" ++ sshkeyfile ++ "' -avz rrds/recent/ joey@kitenet.net:/srv/web/homepower.joeyh.name/rrds/recent/"
@@ -987,6 +1010,7 @@ homeRouter = propertyList "home router" $ props
, "dhcp-range=10.1.1.100,10.1.1.150,24h"
, "no-hosts"
, "address=/honeybee.kitenet.net/10.1.1.1"
+ , "address=/house.kitenet.net/10.1.1.1"
]
`onChange` Service.restarted "dnsmasq"
& ipmasq "wlan0"
@@ -1097,13 +1121,13 @@ cubieTruckOneWire =
["--debian", "sun7i-a20-cubietruck"]
`assume` MadeChange
mydts =
- [ "/* Device tree addition enabling onewire sensors on CubieTruck GPIO pin PG8 */"
+ [ "/* Device tree addition enabling onewire sensors on CubieTruck GPIO pin PC21 */"
, "#include <dt-bindings/gpio/gpio.h>"
, ""
, "/ {"
, "\tonewire_device {"
, "\t\tcompatible = \"w1-gpio\";"
- , "\t\tgpios = <&pio 6 8 GPIO_ACTIVE_HIGH>; /* PG8 */"
+ , "\t\tgpios = <&pio 2 21 GPIO_ACTIVE_HIGH>; /* PC21 */"
, "\t\tpinctrl-names = \"default\";"
, "\t\tpinctrl-0 = <&my_w1_pin>;"
, "\t};"
@@ -1111,7 +1135,7 @@ cubieTruckOneWire =
, ""
, "&pio {"
, "\tmy_w1_pin: my_w1_pin@0 {"
- , "\t\tallwinner,pins = \"PG8\";"
+ , "\t\tallwinner,pins = \"PC21\";"
, "\t\tallwinner,function = \"gpio_in\";"
, "\t};"
, "};"