packaging_rake_tasks 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/tasks/tarball.rake +29 -8
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5c3be51eb199420402e13a46fb9a480db7eb8b4
|
4
|
+
data.tar.gz: 19d6e1f4f32073eda4d3639fb5cae0cc02c901f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a94d5658ae03230e3ba53d7576ac7b89a8f5fb641d4d310a073fac4c3ba06d862e98a044496e0cca4d3f49fe6cab7fb611125db28f9a38a41c77c179f2b09ca
|
7
|
+
data.tar.gz: 3c3304cd78267662090fdbce54874fc9db1f18182aaa4657381f17633eb0f7089bd063de8740acf402bbe15eeeaf659db8be9d3b337696196c02e0d4588118a0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.2
|
data/lib/tasks/tarball.rake
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
#--
|
2
2
|
# Webyast Webservice framework
|
3
3
|
#
|
4
|
-
# Copyright (C) 2009, 2010 Novell, Inc.
|
4
|
+
# Copyright (C) 2009, 2010 Novell, Inc.
|
5
5
|
# This library is free software; you can redistribute it and/or modify
|
6
6
|
# it only under the terms of version 2.1 of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation.
|
7
|
+
# License as published by the Free Software Foundation.
|
8
8
|
#
|
9
9
|
# This library is distributed in the hope that it will be useful, but WITHOUT
|
10
10
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
11
|
-
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
12
|
-
# details.
|
11
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
12
|
+
# details.
|
13
13
|
#
|
14
14
|
# You should have received a copy of the GNU Lesser General Public
|
15
|
-
# License along with this library; if not, write to the Free Software
|
15
|
+
# License along with this library; if not, write to the Free Software
|
16
16
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
17
17
|
#++
|
18
18
|
|
@@ -20,6 +20,7 @@
|
|
20
20
|
require 'rake'
|
21
21
|
require 'fileutils'
|
22
22
|
require "packaging/configuration"
|
23
|
+
require "shellwords"
|
23
24
|
|
24
25
|
def package_file_name
|
25
26
|
config = Packaging::Configuration.instance
|
@@ -57,8 +58,9 @@ end
|
|
57
58
|
def create_package_task
|
58
59
|
require 'rake/packagetask'
|
59
60
|
config = Packaging::Configuration.instance
|
61
|
+
# this will just export (copy/link) the files to the target directory,
|
62
|
+
# no tarball created
|
60
63
|
Rake::PackageTask.new(config.package_name, config.version) do |p|
|
61
|
-
p.need_tar_bz2 = true
|
62
64
|
p.package_dir = Packaging::Configuration.instance.package_dir
|
63
65
|
|
64
66
|
add_git_files p
|
@@ -84,10 +86,29 @@ task :tarball do
|
|
84
86
|
|
85
87
|
# execute the real package task
|
86
88
|
config = Packaging::Configuration.instance
|
89
|
+
target = File.join(config.package_dir, package_file_name)
|
87
90
|
begin
|
88
|
-
Rake::Task[
|
91
|
+
Rake::Task[target].invoke
|
92
|
+
build_tarball
|
89
93
|
ensure
|
90
|
-
rm_rf
|
94
|
+
rm_rf target
|
91
95
|
end
|
92
96
|
end
|
97
|
+
|
98
|
+
# build the tarball in a reproducible way to have the very same output (bitwise)
|
99
|
+
# when called later again and also make the build machine (environmnet) independent
|
100
|
+
def build_tarball
|
101
|
+
# set the file time stamps according to the latest commit
|
102
|
+
mtime = `git show -s --format=%ci`.chomp
|
103
|
+
# For the reproducible output:
|
104
|
+
# - use the GNU format (the default POSIX format contains some time stamps)
|
105
|
+
# - sort the files (in a locale independent way)
|
106
|
+
# - set the owner and group to "root"
|
107
|
+
# - set the fixed modification time
|
108
|
+
sh("cd #{Shellwords.escape(Packaging::Configuration.instance.package_dir)} && " \
|
109
|
+
"tar -c -j -f #{Shellwords.escape(package_file_name)}.tar.bz2 --format=gnu " \
|
110
|
+
"--sort=name --owner=root --group=root --mtime=#{Shellwords.escape(mtime)} " \
|
111
|
+
"#{Shellwords.escape(package_file_name)}")
|
112
|
+
end
|
113
|
+
|
93
114
|
# vim: ft=ruby
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packaging_rake_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -72,3 +72,4 @@ specification_version: 4
|
|
72
72
|
summary: Rake tasks providing tasks to package project in git and integration with
|
73
73
|
build service
|
74
74
|
test_files: []
|
75
|
+
has_rdoc:
|