Cross package maker. DEB/RPM generation or conversion. Derived from jordansissel/fpm.

⌈⌋ branch:  cross package maker


Check-in [31f554b9ca]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1:31f554b9ca56d26a4db05f8bd4f63a6a54474098
Date: 2011-06-21 02:26:43
User: jls
Comment:- refactor to allow package targets to override generate_specfile so puppet target can write multiple files (::package class and anticlass).
Tags And Properties
  • sym-trunk inherited from [2b439be7d6]
Context
2011-06-21
02:33
[d3f725a8ea] - previous commit missed some files; adding features to allow generating multiple files from 'specfile' phase. (user: jls, tags: trunk)
02:26
[31f554b9ca] - refactor to allow package targets to override generate_specfile so puppet target can write multiple files (::package class and anticlass). (user: jls, tags: trunk)
2011-06-20
23:58
[7ac93d172f] - Patch from jpluscplusm to work around misfeatures in debian's control file regarding multiline descriptions. (user: jls, tags: trunk)
Changes

Added templates/puppet/package.pp.erb.





































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# TODO(sissel): implement 'anti' class for this package.
class <%= name %>::package {
  $version = "<%= version %>"
  $iteration = "<%= iteration %>"

  file {
<% paths.each do |path|
     stat = File.lstat(path)
     params = {}
     if stat.directory?
       params[:ensure] = "directory"
     elsif stat.symlink?
       params[:ensure] = "link"
       params[:target] = File.readlink(path)
       stat = File.stat(path)
     else
       params[:ensure] = "file"
       params[:source] = "puppet:///modules/#{name}/#{path}"
     end

     if params[:ensure] != "link"
       params[:owner] = uid2user(stat.uid)
       params[:group] = gid2group(stat.gid)
       params[:mode] = sprintf("%04o", stat.mode & 0777)
     end

     settings = puppetsort(params).collect { |k,v| "#{k} => \"#{v}\"" }.join(",\n      ")
-%>
    # <%= stat.inspect %>
    "<%= fixpath(path) %>":
      <%= settings %>;
<% end # paths.each -%>
  }
}

Added templates/puppet/package/remove.pp.erb.























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
class <%= name %>::package::remove {
  $version = "<%= version %>"
  $iteration = "<%= iteration %>"

  file {
<% paths.each do |path| -%>
    "<%= fixpath(path) %>":
      <%= settings %>;
<% end # paths.each -%>
  }
}