From 5011529def36b3a10e2cc17a747686a80d41438e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 Aug 2014 16:31:35 -0400 Subject: [PATCH 1/6] propellor spin --- config-joey.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-joey.hs b/config-joey.hs index b9a2bed..e7a2268 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -70,7 +70,7 @@ hosts = -- (o) ` & Docker.docked hosts "i386-git-annex-builder" & Docker.docked hosts "android-git-annex-builder" -- not currently working - ! Docker.docked hosts "armel-git-annex-builder-companion" + & Docker.docked hosts "armel-git-annex-builder-companion" ! Docker.docked hosts "armel-git-annex-builder" & Docker.garbageCollected `period` Daily & Apt.buildDep ["git-annex"] `period` Daily From f727bceb7529725f5619ccb05e81731550abb0ac Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 Aug 2014 16:52:32 -0400 Subject: [PATCH 2/6] propellor spin --- config-joey.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-joey.hs b/config-joey.hs index e7a2268..8e9c6bd 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -71,7 +71,7 @@ hosts = -- (o) ` & Docker.docked hosts "android-git-annex-builder" -- not currently working & Docker.docked hosts "armel-git-annex-builder-companion" - ! Docker.docked hosts "armel-git-annex-builder" + & Docker.docked hosts "armel-git-annex-builder" & Docker.garbageCollected `period` Daily & Apt.buildDep ["git-annex"] `period` Daily From f162c629e4934b787e5a0fd6ef0bdc801aa16114 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 19 Aug 2014 12:33:29 -0400 Subject: [PATCH 3/6] update --- config-joey.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config-joey.hs b/config-joey.hs index 8e9c6bd..57a431c 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -415,14 +415,13 @@ monsters = -- but do want to track their public keys etc. - /imap server - /pop server - /apache - - (need to re-rsync /srv/web to new kite.kitenet.net - - server before decommissioning) - bitlbee (EOL?) - prosody (EOL?) - ftpd (EOL) - - Pre-transition: - - re-rsync /home (skip ~joey and .pine*) + - cd /home && rsync -4 --progress -avz root@wren.kitenet.net:/home/ ./ --exclude='.pine*' --exclude='joey/*' --delete - - Transition plan: - - on darkstar: offlineimap run & disable cron job @@ -436,10 +435,11 @@ monsters = -- but do want to track their public keys etc. - - point wren.kitenet.net at kite.kitenet.net temporarily - (make real-wren.kitenet.net alias) - - reconfigure errol's email client to use new server - - - re-run offlinimap against new server + - - on darkstar: re-run offlinimap against new server - - test mail - - test virus filtering - - test http://kitenet.net/~kyle/ (user home dirs) + - - test mailman - - migrate user cron jobs -} , host "mouse.kitenet.net" From 1ed98cc755ed5ac1cf6635d6683f0734004b224b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 19 Aug 2014 14:16:53 -0400 Subject: [PATCH 4/6] Included the config.hs symlink to config-simple.hs in the cabal and Debian packages. --- debian/changelog | 7 +++++++ propellor.cabal | 1 + 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 29dec10..ca41319 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +propellor (0.8.3) UNRELEASED; urgency=medium + + * Included the config.hs symlink to config-simple.hs in the cabal and Debian + packages. + + -- Joey Hess Tue, 19 Aug 2014 14:16:32 -0400 + propellor (0.8.2) unstable; urgency=medium * Fix bug in File.containsLines that caused lines that were already in the diff --git a/propellor.cabal b/propellor.cabal index 878113c..809636c 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -17,6 +17,7 @@ Extra-Source-Files: Makefile config-simple.hs config-joey.hs + config.hs debian/changelog debian/README.Debian debian/propellor.1 From c3c1f921bb96f4ae86564f28f53392f2c08e4007 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 19 Aug 2014 14:17:04 -0400 Subject: [PATCH 5/6] upgrade note --- debian/README.Debian | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/README.Debian b/debian/README.Debian index e32a0ee..7807748 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -5,3 +5,7 @@ of the source code. /usr/bin/propellor is a wrapper which will set up a propellor git repository in ~/.propellor/, and run ~/.propellor/propellor if it exists. Edit ~/.propellor/config.hs to configure it. + +Note that upgrading the propellor package will not update your +~/.propellor/ repository. You can `git pull upstream` in your repository to +update to the current upstream. From e6f13a9af9c4253a1f41c3949ee78ddcc4e7f8a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 19 Aug 2014 14:33:43 -0400 Subject: [PATCH 6/6] The Debian package now includes a single-revision git repository in /usr/src/propellor/, and ~/.propellor/ is set up to use this repository as its "upstream" remote. This avoids relying on the security of the github repository when using the Debian package. --- Makefile | 1 + debian/README.Debian | 7 ++++++- debian/changelog | 4 ++++ debian/control | 1 + src/wrapper.hs | 34 +++++++++++++++------------------- 5 files changed, 27 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index d6e8fe6..07c6279 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ install: $(CABAL) sdist cat dist/propellor-*.tar.gz | \ (cd $(DESTDIR)/usr/src/propellor && tar zx --strip-components=1) + cd $(DESTDIR)/usr/src/propellor && git init && git add . && git commit "current version of propellor" clean: rm -rf dist Setup tags propellor privdata/local diff --git a/debian/README.Debian b/debian/README.Debian index 7807748..73fea47 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -8,4 +8,9 @@ Edit ~/.propellor/config.hs to configure it. Note that upgrading the propellor package will not update your ~/.propellor/ repository. You can `git pull upstream` in your repository to -update to the current upstream. +update to the current upstream source, as distributed in the Debian +package. + +Older versions of propellor set the upstream remote to +point to a repository on github, so if you used one of them, you may want +to change it to point to the new location, /usr/src/propellor/ diff --git a/debian/changelog b/debian/changelog index ca41319..286c5a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ propellor (0.8.3) UNRELEASED; urgency=medium + * The Debian package now includes a single-revision git repository in + /usr/src/propellor/, and ~/.propellor/ is set up to use this repository as + its "upstream" remote. This avoids relying on the security of the github + repository when using the Debian package. * Included the config.hs symlink to config-simple.hs in the cabal and Debian packages. diff --git a/debian/control b/debian/control index a4dc246..2d113cd 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Section: admin Priority: optional Build-Depends: debhelper (>= 9), + git, ghc (>= 7.4), cabal-install, libghc-async-dev, diff --git a/src/wrapper.hs b/src/wrapper.hs index 4d2c50f..694067d 100644 --- a/src/wrapper.hs +++ b/src/wrapper.hs @@ -9,8 +9,8 @@ -- uses it to build the real propellor program (if not already built), -- and runs it. -- --- The source is either copied from /usr/src/propellor, or is cloned from --- git over the network. +-- The source is cloned from /usr/src/propellor when available, +-- or is cloned from git over the network. module Main where @@ -28,13 +28,13 @@ import System.Environment (getArgs) import System.Exit import System.Posix.Directory -srcdir :: FilePath -srcdir = "/usr/src/propellor" +localrepo :: FilePath +localrepo = "/usr/src/propellor" -- Using the github mirror of the main propellor repo because -- it is accessible over https for better security. -srcrepo :: String -srcrepo = "https://github.com/joeyh/propellor.git" +netrepo :: String +netrepo = "https://github.com/joeyh/propellor.git" main :: IO () main = do @@ -56,29 +56,25 @@ wrapper args propellordir propellorbin = do makeRepo = do putStrLn $ "Setting up your propellor repo in " ++ propellordir putStrLn "" - ifM (doesDirectoryExist srcdir) + ifM (doesDirectoryExist localrepo) ( do - void $ boolSystem "cp" [Param "-a", File srcdir, File propellordir] - changeWorkingDirectory propellordir - void $ boolSystem "git" [Param "init"] - void $ boolSystem "git" [Param "add", Param "."] - setuprepo True + void $ boolSystem "git" [Param "clone", File localrepo, File propellordir] + setuprepo True localrepo , do - void $ boolSystem "git" [Param "clone", Param srcrepo, File propellordir] - void $ boolSystem "git" [Param "remote", Param "rm", Param "origin"] - setuprepo False + void $ boolSystem "git" [Param "clone", Param netrepo, File propellordir] + setuprepo False netrepo ) - setuprepo fromsrcdir = do + setuprepo fromlocalrepo repolocation = do changeWorkingDirectory propellordir whenM (doesDirectoryExist "privdata") $ mapM_ nukeFile =<< dirContents "privdata" - void $ boolSystem "git" [Param "commit", Param "--allow-empty", Param "--quiet", Param "-m", Param "setting up propellor git repository"] - void $ boolSystem "git" [Param "remote", Param "add", Param "upstream", Param srcrepo] + void $ boolSystem "git" [Param "remote", Param "rm", Param "origin"] + void $ boolSystem "git" [Param "remote", Param "add", Param "upstream", Param repolocation] -- Connect synthetic git repo with upstream history so -- merging with upstream will work going forward. -- Note -s ours is used to avoid getting any divergent -- changes from upstream. - when fromsrcdir $ do + when (not fromlocalrepo) $ do void $ boolSystem "git" [Param "fetch", Param "upstream"] version <- readProcess "dpkg-query" ["--showformat", "${Version}", "--show", "propellor"] void $ boolSystem "git" [Param "merge", Param "-s", Param "ours", Param version]