From 26a4c164e46bf0ddc13674b9dd21813f067814d9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 22 Dec 2014 15:05:05 -0400 Subject: gitriddance --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index ad1c661a..930937c3 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -353,12 +353,20 @@ githubBackup = propertyList "github-backup box" in File.hasPrivContent f anyContext `onChange` File.ownerGroup f "joey" "joey" , Cron.niceJob "github-backup run" "30 4 * * *" "joey" - "/home/joey/lib/backup" $ intercalate "&&" + "/home/joey/lib/backup" $ intercalate "&&" $ [ "mkdir -p github" , "cd github" - , ". $HOME/.github-keys && github-backup joeyh" - ] + , ". $HOME/.github-keys" + , "github-backup joeyh" + ] ++ map gitriddance mirrors ] + where + gitriddance (r, msg) = "(cd " ++ r ++ " && gitriddance " ++ shellEscape msg ++ ")" + -- these repos are only mirrored on github, I don't want + -- all the proprietary features + mirrors = + [ ("ikiwiki", "please submit changes to http://ikiwiki.info/todo/ instead of using github pull requests") + ] rsyncNetBackup :: [Host] -> Property rsyncNetBackup hosts = Cron.niceJob "rsync.net copied in daily" "30 5 * * *" -- cgit v1.2.3 From b8be8c244eb2e5bd4863f1679706c9e026d17838 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 22 Dec 2014 17:16:52 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 930937c3..e5442867 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -358,15 +358,24 @@ githubBackup = propertyList "github-backup box" , "cd github" , ". $HOME/.github-keys" , "github-backup joeyh" - ] ++ map gitriddance mirrors + ] ++ map gitriddance githubMirrors ] where gitriddance (r, msg) = "(cd " ++ r ++ " && gitriddance " ++ shellEscape msg ++ ")" - -- these repos are only mirrored on github, I don't want - -- all the proprietary features - mirrors = - [ ("ikiwiki", "please submit changes to http://ikiwiki.info/todo/ instead of using github pull requests") - ] + + +-- these repos are only mirrored on github, I don't want +-- all the proprietary features +githubMirrors :: [(String, String)] +githubMirrors = + [ ("ikiwiki", plzuseurl "http://ikiwiki.info/todo/") + , ("git-annex", plzuseurl "http://git-annex.branchable.com/todo/") + , ("myrepos", plzuseurl "http://myrepos.branchable.com/todo/") + , ("propellor", plzuseurl "http://propellor.branchable.com/todo/") + , ("etckeeper", plzuseurl "http://etckeeper.branchable.com/todo/") + ] + where + plzuseurl u = "please submit changes to " ++ u ++ " instead of using github pull requests" rsyncNetBackup :: [Host] -> Property rsyncNetBackup hosts = Cron.niceJob "rsync.net copied in daily" "30 5 * * *" -- cgit v1.2.3 From a48f5916e117ef375edc43f9f5134d6203aff154 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Dec 2014 14:22:50 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index e5442867..6d4f2a18 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -358,12 +358,16 @@ githubBackup = propertyList "github-backup box" , "cd github" , ". $HOME/.github-keys" , "github-backup joeyh" + ] + , Cron.niceJob "gitriddance" "30 4 * * *" "joey" + "/home/joey/lib/backup" $ intercalate "&&" $ + [ "cd github" + , ". $HOME/.github-keys" ] ++ map gitriddance githubMirrors ] where gitriddance (r, msg) = "(cd " ++ r ++ " && gitriddance " ++ shellEscape msg ++ ")" - -- these repos are only mirrored on github, I don't want -- all the proprietary features githubMirrors :: [(String, String)] -- cgit v1.2.3 -- cgit v1.2.3 From 35ccb0fac6bffeb28acd5610ebd24bcc0bbd972a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Dec 2014 15:29:23 -0400 Subject: fix screen dir mode --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 6d4f2a18..fce4d319 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -90,7 +90,7 @@ oldUseNetInstalled pkg = check (not <$> Apt.isInstalled pkg) $ , "rm -rf /root/tmp/oldusenet" -- screen fails unless the directory has this mode. -- not sure what's going on. - , "chmod 777 /var/run/screen" + , "chmod 775 /var/run/screen" ] `describe` "olduse.net built" ] -- cgit v1.2.3 From c7aac0b35e0a8b18dd46d6533c2fbc348f0de461 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Dec 2014 15:45:35 -0400 Subject: remove screen workaround Turns out elephant's oldusenet shellbox docker instance somehow had a non-setguid screen binary. Dunno how; reinstall fixed it. --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index fce4d319..2df6749d 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -88,9 +88,6 @@ oldUseNetInstalled pkg = check (not <$> Apt.isInstalled pkg) $ , "dpkg -i ../" ++ pkg ++ "_*.deb || true" , "apt-get -fy install" -- dependencies , "rm -rf /root/tmp/oldusenet" - -- screen fails unless the directory has this mode. - -- not sure what's going on. - , "chmod 775 /var/run/screen" ] `describe` "olduse.net built" ] -- cgit v1.2.3