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
Comment:- refactor to allow package targets to override generate_specfile so puppet target can write multiple files (::package class and anticlass).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 31f554b9ca56d26a4db05f8bd4f63a6a54474098
User & Date: jls@semicomplete.com 2011-06-21 02:26:43
Context
2011-06-21
02:33
- previous commit missed some files; adding features to allow generating multiple files from 'specfile' phase. check-in: d3f725a8ea user: jls@semicomplete.com tags: trunk
02:26
- refactor to allow package targets to override generate_specfile so puppet target can write multiple files (::package class and anticlass). check-in: 31f554b9ca user: jls@semicomplete.com tags: trunk
2011-06-20
23:58
- Patch from jpluscplusm to work around misfeatures in debian's control file regarding multiline descriptions. check-in: 7ac93d172f user: jls@semicomplete.com tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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 -%>
  }
}