bdcs-0.2.0: Tools for managing a content store of software packages

Copyright(c) 2017 Red Hat Inc.
Safe HaskellNone



Parse a tmpfiles.d config file into TmpFileEntry records.

This parser is limited, it only supports types that are needed by the bdcs export tool (eg. creating files and directories)

Currently supported types are:

f Create a new file and optionally write the arg to it. Will not overwrite. F Remove existing file and make a new one, optionally writing arg to it. d Create a new directory, only if it doesn't exist. e Modify an existing directory's ownership and permissions L Create a new symlink. Do nothing if it already exists. L+ Remove file, directory tree, or symlink before creating it. WARNING this will remove a whole directory tree.



data TmpFileEntry Source #

Record for the tmpfiles.d config file entries. For more detailed information on these values, see "man 5 tmpfiles.d".




data TmpFileType Source #

Types for the tmpfiles.d config file. This is not a complete list, some don't make sense for an empty filesystem and are unimplemented NOTE Order is important, it needs to maintain at least: Directory, Symlink, File, etc. For more detailed information on these types, see "man 5 tmpfiles.d".

parseConfString :: String -> Either ParseError [TmpFileEntry] Source #

Given a string, convert it into a list of TmpFileEntry records or a ParseError.

setupFilesystem :: FilePath -> FilePath -> IO () Source #

Read the tmpfiles.d snippet and apply it to the output directory