Merge branch 'joeyconfig'

This commit is contained in:
Joey Hess 2014-08-19 15:03:11 -04:00
commit 21897c955e
5 changed files with 24 additions and 32 deletions

View File

@ -23,9 +23,13 @@ install:
install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/src/propellor install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/src/propellor
install -s dist/build/propellor/propellor $(DESTDIR)/usr/bin/propellor install -s dist/build/propellor/propellor $(DESTDIR)/usr/bin/propellor
$(CABAL) sdist $(CABAL) sdist
cat dist/propellor-*.tar.gz | \ mkdir -p dist/gittmp
(cd $(DESTDIR)/usr/src/propellor && tar zx --strip-components=1) cat dist/propellor-*.tar.gz | (cd dist/gittmp && tar zx --strip-components=1)
cd $(DESTDIR)/usr/src/propellor && git init && git add . && git commit -m "current version of propellor" cd dist/gittmp && git init && \
git add . \
&& git commit -m "distributed version of propellor" \
&& git bundle create $(DESTDIR)/usr/src/propellor/propellor.git master HEAD
rm -rf dist/gittmp
clean: clean:
rm -rf dist Setup tags propellor privdata/local rm -rf dist Setup tags propellor privdata/local

18
debian/README.Debian vendored
View File

@ -7,10 +7,16 @@ repository in ~/.propellor/, and run ~/.propellor/propellor if it exists.
Edit ~/.propellor/config.hs to configure it. Edit ~/.propellor/config.hs to configure it.
Note that upgrading the propellor package will not update your Note that upgrading the propellor package will not update your
~/.propellor/ repository. You can `git pull upstream` in your repository to ~/.propellor/ repository. This is because you may have local changes
update to the current upstream source, as distributed in the Debian to the source, or may need to adapt your config.hs to work with the new
package. version of propellor. Instead, if your ~/.propellor/ is from an older
version of propellor, /usr/bin/propellor will warn that it's out of date.
Older versions of propellor set the upstream remote to You can `git pull upstream` in your repository to update to the
point to a repository on github, so if you used one of them, you may want current upstream source, as distributed in the Debian package.
to change it to point to the new location, /usr/src/propellor/
In older versions of propellor, the upstream remote was pointed at
the repository on github, so you may want to change it to point
to the repository included in the Debian package:
git config remote.upstream.url /usr/src/propellor/propellor.git

View File

@ -1,2 +0,0 @@
# These files are used in a git repository that propellor sets up.
propellor: package-contains-vcs-control-file usr/src/propellor/.gitignore

View File

@ -25,7 +25,6 @@ Extra-Source-Files:
debian/control debian/control
debian/copyright debian/copyright
debian/rules debian/rules
debian/lintian-overrides
Synopsis: property-based host configuration management in haskell Synopsis: property-based host configuration management in haskell
Description: Description:
Propellor enures that the system it's run in satisfies a list of Propellor enures that the system it's run in satisfies a list of

View File

@ -29,7 +29,7 @@ import System.Exit
import System.Posix.Directory import System.Posix.Directory
localrepo :: FilePath localrepo :: FilePath
localrepo = "/usr/src/propellor" localrepo = "/usr/src/propellor/propellor.git"
-- Using the github mirror of the main propellor repo because -- Using the github mirror of the main propellor repo because
-- it is accessible over https for better security. -- it is accessible over https for better security.
@ -56,28 +56,13 @@ wrapper args propellordir propellorbin = do
makeRepo = do makeRepo = do
putStrLn $ "Setting up your propellor repo in " ++ propellordir putStrLn $ "Setting up your propellor repo in " ++ propellordir
putStrLn "" putStrLn ""
ifM (doesDirectoryExist localrepo) ifM (doesFileExist localrepo <||> doesDirectoryExist localrepo)
( do ( void $ boolSystem "git" [Param "clone", File localrepo, File propellordir]
void $ boolSystem "git" [Param "clone", File localrepo, File propellordir]
setuprepo True localrepo
, do , do
void $ boolSystem "git" [Param "clone", Param netrepo, File propellordir] void $ boolSystem "git" [Param "clone", Param netrepo, File propellordir]
setuprepo False netrepo whenM (doesDirectoryExist (propellordir </> "privdata")) $
mapM_ nukeFile =<< dirContents (propellordir </> "privdata")
) )
setuprepo fromlocalrepo repolocation = do
changeWorkingDirectory propellordir
whenM (doesDirectoryExist "privdata") $
mapM_ nukeFile =<< dirContents "privdata"
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 (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]
buildruncfg = do buildruncfg = do
changeWorkingDirectory propellordir changeWorkingDirectory propellordir
ifM (boolSystem "make" [Param "build"]) ifM (boolSystem "make" [Param "build"])