akabei 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52604057edd7d358099dee7d00be7e1f4a82a4b0
4
- data.tar.gz: bd75e223fcefc7464911e31b588abaa9b587858d
3
+ metadata.gz: 37430f6491dee2d877942915bc0a25bc7ea85faf
4
+ data.tar.gz: 69449642a9808f4227477c2e4647bd6a5502ec1e
5
5
  SHA512:
6
- metadata.gz: ae4b2aa2c1894092876336e80a112cc8d801f7bc4bd977c1b40645f3f17e41f7ec78eef9bec9239c631b080e7d26a64411c52ffc70903cd2c5fdad7d42fb3c66
7
- data.tar.gz: 935f90dd05513568b2b6709fa58b10ede079cf5318fa9b2a349cdee8d1341f405cb79b29f28977f0baaf219cd12735fefdba8999d4880ac5c2b5bde0b75d0923
6
+ metadata.gz: b4f279daae2e2dcae04e44aadc454f00102aa25390409982dc7112322e29e38bb483b7d8217fcc4cc717a2268575a8f795c91fa2adf84b51df68ff326aea4930
7
+ data.tar.gz: d8db38d394e73ced5c95f11b35ca3a79e880c7da8874e5ea73876c1e7b83177915cd4f7073713881238484c124bb9e6554ed30c9ee745e9ae352d4d63c4e5db9
@@ -1,12 +1,15 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
3
  - 2.1
6
4
  - 2.2
5
+ - 2.3.0
7
6
  - ruby-head
7
+ addons:
8
+ apt:
9
+ packages:
10
+ - libarchive-dev
8
11
  before_install:
9
- - sudo apt-get install -y libarchive-dev
12
+ - gem update bundler
10
13
  matrix:
11
14
  allow_failures:
12
15
  - rvm: ruby-head
@@ -1,3 +1,6 @@
1
+ # 0.5.0 (2016-01-10)
2
+ - Add `chroot` option to .akabei.yml
3
+
1
4
  # 0.4.1 (2015-01-10)
2
5
  - Do not depend on aws-sdk-resources
3
6
 
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Akabei
2
- [![Gem Version](https://badge.fury.io/rb/akabei.png)](http://badge.fury.io/rb/akabei)
2
+ [![Gem Version](https://badge.fury.io/rb/akabei.svg)](https://badge.fury.io/rb/akabei)
3
3
  [![Build Status](https://api.travis-ci.org/eagletmt/akabei.svg)](https://travis-ci.org/eagletmt/akabei)
4
- [![Code Climate](https://codeclimate.com/github/eagletmt/akabei.png)](https://codeclimate.com/github/eagletmt/akabei)
5
- [![Coverage Status](https://coveralls.io/repos/eagletmt/akabei/badge.png)](https://coveralls.io/r/eagletmt/akabei)
4
+ [![Code Climate](https://codeclimate.com/github/eagletmt/akabei.svg)](https://codeclimate.com/github/eagletmt/akabei)
5
+ [![Coverage Status](https://img.shields.io/coveralls/eagletmt/akabei.svg)](https://coveralls.io/r/eagletmt/akabei)
6
6
 
7
7
  Custom repository manager for ArchLinux pacman.
8
8
 
@@ -11,7 +11,7 @@ module Akabei
11
11
  attr_path_accessor :makepkg_config, :pacman_config
12
12
 
13
13
  def initialize(root, arch)
14
- @root = root && Pathname.new(root)
14
+ @root = root && Pathname.new(root).realpath
15
15
  @arch = arch
16
16
  end
17
17
 
@@ -19,7 +19,9 @@ module Akabei
19
19
 
20
20
  def with_chroot(&block)
21
21
  if @root
22
- mkarchroot(BASE_PACKAGES)
22
+ unless @root.join('root').directory?
23
+ mkarchroot(BASE_PACKAGES)
24
+ end
23
25
  block.call
24
26
  else
25
27
  @root = Pathname.new(Dir.mktmpdir)
@@ -78,7 +78,7 @@ module Akabei
78
78
  s3 = S3.new(config['s3'], shell)
79
79
 
80
80
  config.builds.each do |arch, config_file|
81
- chroot = ChrootTree.new(nil, arch)
81
+ chroot = ChrootTree.new(config_file['chroot'], arch)
82
82
  chroot.makepkg_config = config_file['makepkg']
83
83
  chroot.pacman_config = config_file['pacman']
84
84
 
@@ -10,6 +10,9 @@ builds:
10
10
  <%= arch %>:
11
11
  makepkg: etc/makepkg.<%= arch %>.conf
12
12
  pacman: etc/pacman.<%= arch %>.conf
13
+ # Uncomment the following line to keep chroot directory.
14
+ # btrfs users are recommended to uncomment it.
15
+ # chroot: ../<%= arch %>-root
13
16
  <%- end -%>
14
17
  s3:
15
18
  <%- if options[:s3] -%>
@@ -1,3 +1,3 @@
1
1
  module Akabei
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -75,26 +75,6 @@ module TarHelpers
75
75
  end
76
76
  end
77
77
 
78
- module ArrayStartingWith
79
- class Matcher
80
- def initialize(expected)
81
- @expected = expected
82
- end
83
-
84
- def description
85
- "array_starting_with(#{@expected.join(',')})"
86
- end
87
-
88
- def ==(actual)
89
- actual[0 ... @expected.length] == @expected
90
- end
91
- end
92
-
93
- def array_starting_with(expected)
94
- Matcher.new(expected)
95
- end
96
- end
97
-
98
78
  module IntegrationSpecHelper
99
79
  def akabei(*cmd)
100
80
  system(File.expand_path('../../bin/akabei', __FILE__), *cmd)
@@ -103,7 +83,7 @@ end
103
83
 
104
84
  module BuildSpecHelper
105
85
  def setup_command_expectations(arch, package_dir)
106
- expect(Akabei::System).to receive(:sudo).with(array_starting_with(['mkarchroot']), hash_including(arch: arch))
86
+ expect(Akabei::System).to receive(:sudo).with(start_with('mkarchroot'), hash_including(arch: arch))
107
87
  expect(Akabei::System).to receive(:sudo).with(['rm', '-rf', anything], {})
108
88
 
109
89
  expect(Akabei::System).to receive(:sudo).with(['makechrootpkg', '-cur', anything], hash_including(arch: arch, chdir: package_dir)) { |args, opts|
@@ -143,6 +123,5 @@ RSpec.configure do |config|
143
123
  config.include OutputHelpers
144
124
  config.include TarHelpers
145
125
  config.include IntegrationSpecHelper
146
- config.include ArrayStartingWith
147
126
  config.include BuildSpecHelper
148
127
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akabei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Suzuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-10 00:00:00.000000000 Z
11
+ date: 2016-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gpgme
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  version: '0'
238
238
  requirements: []
239
239
  rubyforge_project:
240
- rubygems_version: 2.4.5
240
+ rubygems_version: 2.5.1
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: Custom repository manager for ArchLinux pacman