
synopsis:

   Dump of all config-files in the system

description:

    List all configuration-file revisions for all organizations, including
    file contents and file information

    (See spacewalk.configchannel.lookupFileInfo(chan-label, path, revision) )


columns:

    org_id        Organization identifier
    channel_id    ID of the configuration channel containing the file
    channel       Configuration channel containing the file
    channel_type  Config-channel type (normal, local_override, server_import)
    path          Path of the config-file
    file_type     Filetype of the cfg-file (file, directory, symlink)
    file_id       File-id of the cfg-file
    revision      Revision of this cfg-file in this channel
    is_binary     true if file is binary (base64-enc) or false if text
    contents      Actual content of this version of this cfg-file in this channel
    delim_start   Sequence used to delimit start-of-macro
    delim_end     Sequence used to delimit end-of-macro
    username      Username file is to be owned-by
    groupname     Groupname of file's grou-owner
    filemode      Filemode of the deployed file
    symbolic_link Path to be linked-to if filetype == symlink
    selinux_ctx   selinux context of delpoyed file


sql:

    select * from (
        select cchan.org_id,
               cchan.id as channel_id,
               cchan.label as channel,
               cct.label as channel_type,
               cfn.path,
               cft.label as file_type,
               cf.id file_id,
               crev.revision,
               cc.is_binary,
               cc.contents,
               cc.delim_start,
               cc.delim_end,
               cfi.username,
               cfi.groupname,
               cfi.filemode,
               cfn2.path as symbolic_link,
               cfi.selinux_ctx
          from rhnconfigfile cf
               inner join rhnconfigchannel cchan on cchan.id = cf.config_channel_id
               inner join rhnconfigchanneltype cct on cct.id = cchan.confchan_type_id
               inner join rhnconfigfilename cfn on cf.config_file_name_id = cfn.id
               inner join rhnconfigrevision crev on crev.config_file_id = cf.id
               left outer join rhnconfigcontent cc on cc.id = crev.config_content_id
               inner join rhnconfiginfo cfi on cfi.id = crev.config_info_id
               inner join rhnconfigfiletype cft on cft.id = crev.config_file_type_id
               left outer join rhnconfigfilename cfn2 on cfn2.id = cfi.symlink_target_filename_id
     ) X
 -- where placeholder
 order by org_id, channel, path, revision desc
