summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2016-10-01 19:41:05 -0400
committerJoey Hess2016-10-01 19:41:05 -0400
commit25c722819042ada1efe91567a839105e5a6757bc (patch)
tree4df88f868685f606b1bb1c95f17edcea3bf0ae3b /src
parent96b551f2ffc72be23c0510e52a0b6896a5fd9bd0 (diff)
parent2413f4d6a633b815fda69db8dc8b3fbdb377e963 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Debootstrap.hs39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs
index c0226b7e..59850c4c 100644
--- a/src/Propellor/Property/Debootstrap.hs
+++ b/src/Propellor/Property/Debootstrap.hs
@@ -74,9 +74,7 @@ built' installprop target system@(System _ arch) config =
cmd <- fromMaybe "debootstrap" <$> programPath
de <- standardPathEnv
ifM (boolSystemEnv cmd params (Just de))
- ( do
- fixForeignDev target
- return MadeChange
+ ( return MadeChange
, return FailedChange
)
@@ -165,7 +163,6 @@ sourceInstall' = withTmpDir "debootstrap" $ \tmpd -> do
case l of
(subdir:[]) -> do
changeWorkingDirectory subdir
- makeDevicesTarball
makeWrapperScript (localInstallDir </> subdir)
return MadeChange
_ -> errorMessage "debootstrap tar file did not contain exactly one directory"
@@ -206,40 +203,6 @@ makeWrapperScript dir = do
]
modifyFileMode wrapperScript (addModes $ readModes ++ executeModes)
--- Work around for <http://bugs.debian.org/770217>
-makeDevicesTarball :: IO ()
-makeDevicesTarball = do
- -- TODO append to tarball; avoid writing to /dev
- writeFile foreignDevFlag "1"
- ok <- boolSystem "sh" [Param "-c", Param tarcmd]
- nukeFile foreignDevFlag
- unless ok $
- errorMessage "Failed to tar up /dev to generate devices.tar.gz"
- where
- tarcmd = "(cd / && tar cf - dev) | gzip > devices.tar.gz"
-
-fixForeignDev :: FilePath -> IO ()
-fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ do
- de <- standardPathEnv
- void $ boolSystemEnv "chroot"
- [ File target
- , Param "sh"
- , Param "-c"
- , Param $ intercalate " && "
- [ "apt-get update"
- , "apt-get -y install makedev"
- , "rm -rf /dev"
- , "mkdir /dev"
- , "cd /dev"
- , "mount -t proc proc /proc"
- , "/sbin/MAKEDEV std ptmx fd consoleonly"
- ]
- ]
- (Just de)
-
-foreignDevFlag :: FilePath
-foreignDevFlag = "/dev/.propellor-foreign-dev"
-
localInstallDir :: FilePath
localInstallDir = "/usr/local/debootstrap"