Check-in [32632f2a8d]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add architecture mapping, limit mode per & 07777. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
32632f2a8d1a1a43f414610bbbd61089 |
| User & Date: | mario 2015-05-01 02:17:52 |
Context
|
2015-05-01
| ||
| 22:40 | Retain more attributes: provides=, conflicts=, config_files as backup=, deb_recomends as optdepends=, update_filter as makepkgopt= for arch .PKGINFO check-in: 275407c9b1 user: mario tags: trunk | |
| 02:17 | Add architecture mapping, limit mode per & 07777. check-in: 32632f2a8d user: mario tags: trunk | |
|
2015-04-30
| ||
| 23:54 | New `-t arch` output package module. (Arch Linux binary tarballs with .PKGINFO and .MTREE meta files.) check-in: 006fa58cfa user: mario tags: trunk | |
Changes
Changes to lib/fpm/package/arch.rb.
| ︙ | ︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
::Dir::chdir(staging_path) do
args = ["tar", "-c", "-J", "--owner=0", "--group=0", "--xform", "s:./::", "--exclude", "./", "-f", tarfn, "."]
safesystem(*args)
end
end # def output
def pkginfo()
File.open(staging_path + "/.PKGINFO", "w") do |f|
f.write template("arch/PKGINFO.erb").result(binding)
end
end
def mtree()
Zlib::GzipWriter.open(staging_path + "/.MTREE") do |f|
| > > > > > > > > | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
::Dir::chdir(staging_path) do
args = ["tar", "-c", "-J", "--owner=0", "--group=0", "--xform", "s:./::", "--exclude", "./", "-f", tarfn, "."]
safesystem(*args)
end
end # def output
def pkginfo()
map = {
"all" => "any",
"amd64" => "x86-84",
"x86" => "i686",
}
if map.has_key?(architecture)
@architecture = map[architecture]
end
File.open(staging_path + "/.PKGINFO", "w") do |f|
f.write template("arch/PKGINFO.erb").result(binding)
end
end
def mtree()
Zlib::GzipWriter.open(staging_path + "/.MTREE") do |f|
f.write template("arch/MTREE.erb").result(binding)
end
end
end # class FPM::Package::Arch
|
Name change from templates/arch/MTREEgz.erb to templates/arch/MTREE.erb.
1 2 3 4 5 6 7 8 9 10 |
#mtree
<%
lines = ""
lasth = ""
::Dir.chdir(staging_path) do
::Dir.glob("./**/*") do |fn|
#-- per file/directory
stat = File.stat(fn)
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#mtree
<%
lines = ""
lasth = ""
::Dir.chdir(staging_path) do
::Dir.glob("./**/*") do |fn|
#-- per file/directory
stat = File.stat(fn)
f_mode = (stat.mode & 07777).to_s(8)
if File.directory? fn
head = "/set uid=0 gid=0 mode=#{f_mode}\n"
line = "#{fn} time=#{stat.mtime.to_f} type=dir\n"
else
f_md5 = Digest::MD5.file(fn).hexdigest
f_sha = Digest::SHA256.file(fn).hexdigest
head = "/set type=file uid=0 gid=0 mode=#{f_mode}\n"
|
| ︙ | ︙ |