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

⌈⌋ ⎇ branch:  cross package maker


Check-in [fec5fcaca3]

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

Overview
Comment:Make fixperms ignore symlinks / or any other chmod errors.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fec5fcaca303f93dbc20bea294b6bf9fffdeba48
User & Date: mario 2015-02-08 06:12:20
Context
2015-02-13
13:39
Preprocessor filter for source-based packages. check-in: 662bafecd7 user: mario tags: trunk
2015-02-08
06:12
Make fixperms ignore symlinks / or any other chmod errors. check-in: fec5fcaca3 user: mario tags: trunk
01:48
Make lintian happy: move DEB changelog generation before write_md5sums. (Workaround for [#833](https://github.com/jordansissel/fpm/issues/833).) Add stub copyright (actually prepared for DEP-5 / parseable debian/copyright). Augment deb/control.erb regex check for empty lines. check-in: 06727e35c2 user: mario tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/fpm/package/filter_fixperms.rb.

1
2
3
4
5
6
7
8
9


10




11
12
13
# Set file permissions to 644/755 maximum

require "fpm/package"
require "fpm/util"
require "fileutils"

class FPM::Package::Filter_fixperms < FPM::Package
  def update(opts=nil)
    ::Dir["#{staging_path}/**/*"].each do |fn|


      File.chmod(File.stat(fn).mode & 0777755, fn)




    end
  end
end



<
<




>
>
|
>
>
>
>



1
2
3


4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Set file permissions to 644/755 maximum

require "fpm/package"



class FPM::Package::Filter_fixperms < FPM::Package
  def update(opts=nil)
    ::Dir["#{staging_path}/**/*"].each do |fn|
      begin
        unless File.symlink?(fn)
          File.chmod(File.stat(fn).mode & 0777755, fn)
        end
      rescue => e
        logger.warn("Can't fix permissions", e)
      end
    end
  end
end