├── .dockerignore ├── .gitignore ├── .kitchen.yml ├── Gemfile ├── Gemfile.lock ├── README.md ├── config ├── projects │ └── itamae.rb └── software │ ├── itamae.rb │ └── specinfra-ec2_metadata-tags.rb ├── dockerfiles └── centos7 ├── files ├── mac_dmg │ └── Resources │ │ ├── background.png │ │ └── icon.png ├── mac_pkg │ └── Resources │ │ ├── background.png │ │ ├── license.html │ │ └── welcome.html └── windows_msi │ └── Resources │ ├── assets │ ├── LICENSE.rtf │ ├── banner_background.bmp │ ├── dialog_background.bmp │ ├── project.ico │ ├── project_16x16.ico │ └── project_32x32.ico │ ├── localization-en-us.wxl.erb │ ├── parameters.wxi.erb │ └── source.wxs ├── omnibus.rb ├── package-scripts └── itamae │ ├── makeselfinst │ ├── postinst │ ├── postrm │ ├── preinst │ └── prerm └── scripts └── build /.dockerignore: -------------------------------------------------------------------------------- 1 | /pkg/ 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | .bundle 3 | .kitchen/ 4 | .kitchen.local.yml 5 | vendor/bundle 6 | pkg/* 7 | .vagrant 8 | bin/* 9 | files/**/cache/ 10 | vendor/cookbooks 11 | /_* 12 | /tmp 13 | /static/deb/db 14 | /static/deb/dists 15 | /static/deb/pool 16 | -------------------------------------------------------------------------------- /.kitchen.yml: -------------------------------------------------------------------------------- 1 | driver: 2 | name: vagrant 3 | customize: 4 | cpus: 2 5 | memory: 2048 6 | synced_folders: 7 | - ['.', '/home/vagrant/itamae'] 8 | 9 | provisioner: 10 | require_chef_omnibus: 11.8.0 11 | 12 | platforms: 13 | - name: ubuntu-14.04 14 | run_list: apt::default 15 | - name: ubuntu-12.04 16 | run_list: apt::default 17 | - name: ubuntu-11.04 18 | run_list: apt::default 19 | - name: ubuntu-10.04 20 | run_list: apt::default 21 | - name: centos-5.10 22 | - name: centos-6.5 23 | 24 | suites: 25 | - name: default 26 | run_list: omnibus::default 27 | attributes: 28 | omnibus: 29 | build_user: vagrant 30 | build_dir: /home/vagrant/itamae 31 | install_dir: /opt/itamae 32 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'berkshelf' 4 | gem 'omnibus', git: 'https://github.com/chef/omnibus' 5 | 6 | gem 'omnibus-software', git: 'https://github.com/chef/omnibus-software' 7 | 8 | gem 'test-kitchen' 9 | gem 'kitchen-vagrant' 10 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/chef/omnibus 3 | revision: fb089c39c178da353d1d89a1f4bd79b6cbb78b77 4 | specs: 5 | omnibus (7.0.9) 6 | aws-sdk-s3 (~> 1) 7 | chef-cleanroom (~> 1.0) 8 | chef-sugar (>= 3.3) 9 | ffi-yajl (~> 2.2) 10 | license_scout (~> 1.0) 11 | mixlib-shellout (>= 2.0, < 4.0) 12 | mixlib-versioning 13 | ohai (>= 13, < 16) 14 | pedump 15 | ruby-progressbar (~> 1.7) 16 | thor (>= 0.18, < 2.0) 17 | 18 | GIT 19 | remote: https://github.com/chef/omnibus-software 20 | revision: 5f57d0a9243cc4c476d2acafc9aaafd61ceb1b03 21 | specs: 22 | omnibus-software (4.0.0) 23 | omnibus (>= 5.6.1) 24 | 25 | GEM 26 | remote: https://rubygems.org/ 27 | specs: 28 | addressable (2.8.0) 29 | public_suffix (>= 2.0.2, < 5.0) 30 | awesome_print (1.8.0) 31 | aws-eventstream (1.1.0) 32 | aws-partitions (1.303.0) 33 | aws-sdk-core (3.94.0) 34 | aws-eventstream (~> 1, >= 1.0.2) 35 | aws-partitions (~> 1, >= 1.239.0) 36 | aws-sigv4 (~> 1.1) 37 | jmespath (~> 1.0) 38 | aws-sdk-kms (1.30.0) 39 | aws-sdk-core (~> 3, >= 3.71.0) 40 | aws-sigv4 (~> 1.1) 41 | aws-sdk-s3 (1.63.0) 42 | aws-sdk-core (~> 3, >= 3.83.0) 43 | aws-sdk-kms (~> 1) 44 | aws-sigv4 (~> 1.1) 45 | aws-sigv4 (1.1.2) 46 | aws-eventstream (~> 1.0, >= 1.0.2) 47 | bcrypt_pbkdf (1.0.1) 48 | berkshelf (7.0.9) 49 | chef (>= 13.6.52) 50 | chef-config 51 | cleanroom (~> 1.0) 52 | concurrent-ruby (~> 1.0) 53 | minitar (>= 0.6) 54 | mixlib-archive (>= 0.4, < 2.0) 55 | mixlib-config (>= 2.2.5) 56 | mixlib-shellout (>= 2.0, < 4.0) 57 | octokit (~> 4.0) 58 | retryable (>= 2.0, < 4.0) 59 | solve (~> 4.0) 60 | thor (>= 0.20) 61 | builder (3.2.4) 62 | chef (15.10.12) 63 | addressable 64 | bcrypt_pbkdf (~> 1.0) 65 | bundler (>= 1.10) 66 | chef-config (= 15.10.12) 67 | chef-utils (= 15.10.12) 68 | chef-zero (>= 14.0.11) 69 | diff-lcs (~> 1.2, >= 1.2.4) 70 | ed25519 (~> 1.2) 71 | erubis (~> 2.7) 72 | ffi (~> 1.9, >= 1.9.25) 73 | ffi-libarchive 74 | ffi-yajl (~> 2.2) 75 | highline (>= 1.6.9, < 2) 76 | iniparse (~> 1.4) 77 | license-acceptance (~> 1.0, >= 1.0.5) 78 | mixlib-archive (>= 0.4, < 2.0) 79 | mixlib-authentication (>= 2.1, < 4) 80 | mixlib-cli (>= 2.1.1, < 3.0) 81 | mixlib-log (>= 2.0.3, < 4.0) 82 | mixlib-shellout (>= 3.0.3, < 4.0) 83 | net-sftp (~> 2.1, >= 2.1.2) 84 | net-ssh (>= 4.2, < 6) 85 | net-ssh-multi (~> 1.2, >= 1.2.1) 86 | ohai (~> 15.0) 87 | plist (~> 3.2) 88 | proxifier (~> 1.0) 89 | syslog-logger (~> 1.6) 90 | train-core (~> 3.2, >= 3.2.28) 91 | train-winrm (>= 0.2.5) 92 | tty-screen (~> 0.6) 93 | uuidtools (~> 2.1.5) 94 | chef-cleanroom (1.0.2) 95 | chef-config (15.10.12) 96 | addressable 97 | chef-utils (= 15.10.12) 98 | fuzzyurl 99 | mixlib-config (>= 2.2.12, < 4.0) 100 | mixlib-shellout (>= 2.0, < 4.0) 101 | tomlrb (~> 1.2) 102 | chef-sugar (5.1.9) 103 | chef-utils (15.10.12) 104 | chef-zero (15.0.0) 105 | ffi-yajl (~> 2.2) 106 | hashie (>= 2.0, < 5.0) 107 | mixlib-log (>= 2.0, < 4.0) 108 | rack (~> 2.0, >= 2.0.6) 109 | uuidtools (~> 2.1) 110 | citrus (3.0.2) 111 | cleanroom (1.0.0) 112 | concurrent-ruby (1.1.6) 113 | diff-lcs (1.3) 114 | ed25519 (1.2.4) 115 | equatable (0.6.1) 116 | erubi (1.9.0) 117 | erubis (2.7.0) 118 | faraday (1.0.1) 119 | multipart-post (>= 1.2, < 3) 120 | ffi (1.12.2) 121 | ffi-libarchive (1.0.0) 122 | ffi (~> 1.0) 123 | ffi-yajl (2.3.3) 124 | libyajl2 (~> 1.2) 125 | fuzzyurl (0.9.0) 126 | gssapi (1.3.0) 127 | ffi (>= 1.0.1) 128 | gyoku (1.3.1) 129 | builder (>= 2.1.2) 130 | hashie (4.1.0) 131 | highline (1.7.10) 132 | httpclient (2.8.3) 133 | iniparse (1.5.0) 134 | iostruct (0.0.4) 135 | ipaddress (0.8.3) 136 | jmespath (1.6.1) 137 | json (2.3.0) 138 | kitchen-vagrant (1.6.1) 139 | test-kitchen (>= 1.4, < 3) 140 | libyajl2 (1.2.0) 141 | license-acceptance (1.0.19) 142 | pastel (~> 0.7) 143 | tomlrb (~> 1.2) 144 | tty-box (~> 0.3) 145 | tty-prompt (~> 0.18) 146 | license_scout (1.1.8) 147 | ffi-yajl (~> 2.2) 148 | mixlib-shellout (>= 2.2, < 4.0) 149 | toml-rb (>= 1, < 3) 150 | little-plugger (1.1.4) 151 | logging (2.2.2) 152 | little-plugger (~> 1.1) 153 | multi_json (~> 1.10) 154 | minitar (0.9) 155 | mixlib-archive (1.0.5) 156 | mixlib-log 157 | mixlib-authentication (3.0.6) 158 | mixlib-cli (2.1.6) 159 | mixlib-config (3.0.6) 160 | tomlrb 161 | mixlib-install (3.12.1) 162 | mixlib-shellout 163 | mixlib-versioning 164 | thor 165 | mixlib-log (3.0.8) 166 | mixlib-shellout (3.0.9) 167 | mixlib-versioning (1.2.12) 168 | molinillo (0.6.6) 169 | multi_json (1.14.1) 170 | multipart-post (2.1.1) 171 | necromancer (0.5.1) 172 | net-scp (2.0.0) 173 | net-ssh (>= 2.6.5, < 6.0.0) 174 | net-sftp (2.1.2) 175 | net-ssh (>= 2.6.5) 176 | net-ssh (5.2.0) 177 | net-ssh-gateway (2.0.0) 178 | net-ssh (>= 4.0.0) 179 | net-ssh-multi (1.2.1) 180 | net-ssh (>= 2.6.5) 181 | net-ssh-gateway (>= 1.2.0) 182 | nori (2.6.0) 183 | octokit (4.18.0) 184 | faraday (>= 0.9) 185 | sawyer (~> 0.8.0, >= 0.5.3) 186 | ohai (15.9.1) 187 | chef-config (>= 12.8, < 16) 188 | ffi (~> 1.9) 189 | ffi-yajl (~> 2.2) 190 | ipaddress 191 | mixlib-cli (>= 1.7.0) 192 | mixlib-config (>= 2.0, < 4.0) 193 | mixlib-log (>= 2.0.1, < 4.0) 194 | mixlib-shellout (>= 2.0, < 4.0) 195 | plist (~> 3.1) 196 | systemu (~> 2.6.4) 197 | wmi-lite (~> 1.0) 198 | pastel (0.7.3) 199 | equatable (~> 0.6) 200 | tty-color (~> 0.5) 201 | pedump (0.5.4) 202 | awesome_print 203 | iostruct (>= 0.0.4) 204 | multipart-post (>= 2.0.0) 205 | progressbar 206 | rainbow 207 | zhexdump (>= 0.0.2) 208 | plist (3.5.0) 209 | progressbar (1.10.1) 210 | proxifier (1.0.3) 211 | public_suffix (4.0.6) 212 | rack (2.2.6.3) 213 | rainbow (3.0.0) 214 | retryable (3.0.5) 215 | ruby-progressbar (1.10.1) 216 | rubyntlm (0.6.2) 217 | rubyzip (2.3.0) 218 | sawyer (0.8.2) 219 | addressable (>= 2.3.5) 220 | faraday (> 0.8, < 2.0) 221 | semverse (3.0.0) 222 | solve (4.0.3) 223 | molinillo (~> 0.6) 224 | semverse (>= 1.1, < 4.0) 225 | strings (0.1.8) 226 | strings-ansi (~> 0.1) 227 | unicode-display_width (~> 1.5) 228 | unicode_utils (~> 1.4) 229 | strings-ansi (0.2.0) 230 | syslog-logger (1.6.8) 231 | systemu (2.6.5) 232 | test-kitchen (2.4.0) 233 | bcrypt_pbkdf (~> 1.0) 234 | ed25519 (~> 1.2) 235 | license-acceptance (~> 1.0, >= 1.0.11) 236 | mixlib-install (~> 3.6) 237 | mixlib-shellout (>= 1.2, < 4.0) 238 | net-scp (>= 1.1, < 3.0) 239 | net-ssh (>= 2.9, < 6.0) 240 | net-ssh-gateway (>= 1.2, < 3.0) 241 | thor (~> 0.19) 242 | winrm (~> 2.0) 243 | winrm-elevated (~> 1.0) 244 | winrm-fs (~> 1.1) 245 | thor (0.20.3) 246 | toml-rb (2.0.1) 247 | citrus (~> 3.0, > 3.0) 248 | tomlrb (1.3.0) 249 | train-core (3.2.28) 250 | addressable (~> 2.5) 251 | json (>= 1.8, < 3.0) 252 | mixlib-shellout (>= 2.0, < 4.0) 253 | net-scp (>= 1.2, < 3.0) 254 | net-ssh (>= 2.9, < 6.0) 255 | train-winrm (0.2.6) 256 | winrm (~> 2.0) 257 | winrm-fs (~> 1.0) 258 | tty-box (0.5.0) 259 | pastel (~> 0.7.2) 260 | strings (~> 0.1.6) 261 | tty-cursor (~> 0.7) 262 | tty-color (0.5.1) 263 | tty-cursor (0.7.1) 264 | tty-prompt (0.21.0) 265 | necromancer (~> 0.5.0) 266 | pastel (~> 0.7.0) 267 | tty-reader (~> 0.7.0) 268 | tty-reader (0.7.0) 269 | tty-cursor (~> 0.7) 270 | tty-screen (~> 0.7) 271 | wisper (~> 2.0.0) 272 | tty-screen (0.7.1) 273 | unicode-display_width (1.7.0) 274 | unicode_utils (1.4.0) 275 | uuidtools (2.1.5) 276 | winrm (2.3.4) 277 | builder (>= 2.1.2) 278 | erubi (~> 1.8) 279 | gssapi (~> 1.2) 280 | gyoku (~> 1.0) 281 | httpclient (~> 2.2, >= 2.2.0.2) 282 | logging (>= 1.6.1, < 3.0) 283 | nori (~> 2.0) 284 | rubyntlm (~> 0.6.0, >= 0.6.1) 285 | winrm-elevated (1.2.1) 286 | erubi (~> 1.8) 287 | winrm (~> 2.0) 288 | winrm-fs (~> 1.0) 289 | winrm-fs (1.3.4) 290 | erubi (~> 1.8) 291 | logging (>= 1.6.1, < 3.0) 292 | rubyzip (~> 2.0) 293 | winrm (~> 2.0) 294 | wisper (2.0.1) 295 | wmi-lite (1.0.5) 296 | zhexdump (0.0.2) 297 | 298 | PLATFORMS 299 | ruby 300 | 301 | DEPENDENCIES 302 | berkshelf 303 | kitchen-vagrant 304 | omnibus! 305 | omnibus-software! 306 | test-kitchen 307 | 308 | BUNDLED WITH 309 | 2.1.4 310 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | itamae Omnibus project 2 | ====================== 3 | 4 | This project creates full-stack platform-specific packages for 5 | `itamae`! 6 | 7 | Pre-built Packages 8 | ------------------ 9 | 10 | ### Debian/Ubuntu 11 | 12 | Moved to [itamae-kitchen/itamae-package](https://github.com/itamae-kitchen/itamae-package) 13 | 14 | ### CentOS 7 15 | 16 | [ ![Download](https://api.bintray.com/packages/itamae/itamae-rpm/itamae/images/download.svg) ](https://bintray.com/itamae/itamae-rpm/itamae/_latestVersion) 17 | 18 | ``` 19 | $ wget https://bintray.com/itamae/itamae-rpm/rpm -O bintray-itamae-itamae-rpm.repo 20 | $ sudo mv bintray-itamae-itamae-rpm.repo /etc/yum.repos.d/ 21 | ``` 22 | 23 | Installation 24 | ------------ 25 | You must have a sane Ruby 1.9+ environment with Bundler installed. Ensure all 26 | the required gems are installed: 27 | 28 | ```shell 29 | $ bundle install --binstubs 30 | ``` 31 | 32 | Usage 33 | ----- 34 | 35 | ### Quick with Docker 36 | 37 | Use `./scripts/build` 38 | 39 | ``` 40 | $ ./scripts/build all 41 | ``` 42 | 43 | or only perform build on specific distro: 44 | 45 | ``` 46 | $ ./scripts/build bionic 47 | ``` 48 | 49 | ### Build 50 | 51 | You create a platform-specific package using the `build project` command: 52 | 53 | ```shell 54 | $ bin/omnibus build itamae 55 | ``` 56 | 57 | The platform/architecture type of the package created will match the platform 58 | where the `build project` command is invoked. For example, running this command 59 | on a MacBook Pro will generate a Mac OS X package. After the build completes 60 | packages will be available in the `pkg/` folder. 61 | 62 | ### Clean 63 | 64 | You can clean up all temporary files generated during the build process with 65 | the `clean` command: 66 | 67 | ```shell 68 | $ bin/omnibus clean itamae 69 | ``` 70 | 71 | Adding the `--purge` purge option removes __ALL__ files generated during the 72 | build including the project install directory (`/opt/itamae`) and 73 | the package cache directory (`/var/cache/omnibus/pkg`): 74 | 75 | ```shell 76 | $ bin/omnibus clean itamae --purge 77 | ``` 78 | 79 | ### Publish 80 | 81 | Omnibus has a built-in mechanism for releasing to a variety of "backends", such 82 | as Amazon S3. You must set the proper credentials in your `omnibus.rb` config 83 | file or specify them via the command line. 84 | 85 | ```shell 86 | $ bin/omnibus publish path/to/*.deb --backend s3 87 | ``` 88 | 89 | ### Help 90 | 91 | Full help for the Omnibus command line interface can be accessed with the 92 | `help` command: 93 | 94 | ```shell 95 | $ bin/omnibus help 96 | ``` 97 | 98 | Kitchen-based Build Environment 99 | ------------------------------- 100 | Every Omnibus project ships will a project-specific 101 | [Berksfile](http://berkshelf.com/) that will allow you to build your omnibus projects on all of the projects listed 102 | in the `.kitchen.yml`. You can add/remove additional platforms as needed by 103 | changing the list found in the `.kitchen.yml` `platforms` YAML stanza. 104 | 105 | This build environment is designed to get you up-and-running quickly. However, 106 | there is nothing that restricts you to building on other platforms. Simply use 107 | the [omnibus cookbook](https://github.com/opscode-cookbooks/omnibus) to setup 108 | your desired platform and execute the build steps listed above. 109 | 110 | The default build environment requires Test Kitchen and VirtualBox for local 111 | development. Test Kitchen also exposes the ability to provision instances using 112 | various cloud providers like AWS, DigitalOcean, or OpenStack. For more 113 | information, please see the [Test Kitchen documentation](http://kitchen.ci). 114 | 115 | Once you have tweaked your `.kitchen.yml` (or `.kitchen.local.yml`) to your 116 | liking, you can bring up an individual build environment using the `kitchen` 117 | command. 118 | 119 | ```shell 120 | $ bin/kitchen converge ubuntu-1204 121 | ``` 122 | 123 | Then login to the instance and build the project as described in the Usage 124 | section: 125 | 126 | ```shell 127 | $ bundle exec kitchen login ubuntu-1204 128 | [vagrant@ubuntu...] $ cd itamae 129 | [vagrant@ubuntu...] $ bundle install 130 | [vagrant@ubuntu...] $ ... 131 | [vagrant@ubuntu...] $ bin/omnibus build itamae 132 | ``` 133 | 134 | For a complete list of all commands and platforms, run `kitchen list` or 135 | `kitchen help`. 136 | -------------------------------------------------------------------------------- /config/projects/itamae.rb: -------------------------------------------------------------------------------- 1 | name 'itamae' 2 | maintainer 'Ryota Arai' 3 | homepage 'https://github.com/ryotarai/itamae' 4 | 5 | install_dir '/opt/itamae' 6 | build_version do 7 | source :version, from_dependency: 'itamae' 8 | end 9 | build_iteration 1 10 | 11 | # creates required build directories 12 | dependency "preparation" 13 | 14 | # itamae dependencies/components 15 | dependency 'itamae' 16 | dependency 'specinfra-ec2_metadata-tags' 17 | override 'ruby', version: '2.6.6' 18 | 19 | # version manifest file 20 | dependency 'version-manifest' 21 | 22 | exclude '\.git*' 23 | exclude 'bundler\/git' 24 | 25 | package :deb do 26 | license 'MIT' 27 | vendor 'Ryota Arai ' 28 | end 29 | 30 | p build_version 31 | -------------------------------------------------------------------------------- /config/software/itamae.rb: -------------------------------------------------------------------------------- 1 | name "itamae" 2 | default_version "1.10.7" 3 | 4 | dependency "ruby" 5 | dependency "rubygems" 6 | 7 | env = { 8 | "PATH" => "#{install_dir}/embedded/bin:#{ENV["PATH"]}" 9 | } 10 | 11 | build do 12 | gem "install itamae --no-doc -v #{version}", env: env 13 | end 14 | -------------------------------------------------------------------------------- /config/software/specinfra-ec2_metadata-tags.rb: -------------------------------------------------------------------------------- 1 | name "specinfra-ec2_metadata-tags" 2 | default_version "0.0.4" 3 | 4 | dependency "ruby" 5 | dependency "rubygems" 6 | 7 | env = { 8 | "PATH" => "#{install_dir}/embedded/bin:#{ENV["PATH"]}" 9 | } 10 | 11 | build do 12 | gem "install specinfra-ec2_metadata-tags --no-doc -v #{version}", env: env 13 | end 14 | -------------------------------------------------------------------------------- /dockerfiles/centos7: -------------------------------------------------------------------------------- 1 | FROM centos:7 2 | 3 | RUN curl -L -o /tmp/chefdk.rpm https://packages.chef.io/files/stable/chefdk/3.5.13/el/7/chefdk-3.5.13-1.el7.x86_64.rpm && \ 4 | rpm -i /tmp/chefdk.rpm && \ 5 | yum install -y epel-release patch rpm-build git gcc make && \ 6 | yum install -y fakeroot && \ 7 | git config --global user.email "ryota.arai+itamae@gmail.com" && \ 8 | git config --global user.name "Itamae Builder" 9 | ADD . /work 10 | WORKDIR /work 11 | RUN rm -rf .bundle && \ 12 | /opt/chefdk/embedded/bin/bundle install -j4 13 | -------------------------------------------------------------------------------- /files/mac_dmg/Resources/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/mac_dmg/Resources/background.png -------------------------------------------------------------------------------- /files/mac_dmg/Resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/mac_dmg/Resources/icon.png -------------------------------------------------------------------------------- /files/mac_pkg/Resources/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/mac_pkg/Resources/background.png -------------------------------------------------------------------------------- /files/mac_pkg/Resources/license.html: -------------------------------------------------------------------------------- 1 | All Rights Reserved 2 | -------------------------------------------------------------------------------- /files/mac_pkg/Resources/welcome.html: -------------------------------------------------------------------------------- 1 | This will install itamae on your Mac. 2 | 3 | -------------------------------------------------- 4 | 5 | This is a basic welcome message that is generated for every Omnibus project. You should customize this message by editing the file at files/mac_pkg/welcome.html. 6 | 7 | If you are not the developer of itamae, the presence of this message is likely a bug and should be reported to the creator. 8 | 9 | Thank you for choosing Omnibus! Have a fantastic day! 10 | -------------------------------------------------------------------------------- /files/windows_msi/Resources/assets/LICENSE.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190 2 | {\fonttbl\f0\fmodern\fcharset0 CourierNewPSMT;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \vieww12000\viewh15840\viewkind0 5 | \deftab720 6 | \pard\pardeftab720\qc 7 | 8 | \f0\fs20 \cf0 All Rights Reserved.} -------------------------------------------------------------------------------- /files/windows_msi/Resources/assets/banner_background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/windows_msi/Resources/assets/banner_background.bmp -------------------------------------------------------------------------------- /files/windows_msi/Resources/assets/dialog_background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/windows_msi/Resources/assets/dialog_background.bmp -------------------------------------------------------------------------------- /files/windows_msi/Resources/assets/project.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/windows_msi/Resources/assets/project.ico -------------------------------------------------------------------------------- /files/windows_msi/Resources/assets/project_16x16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/windows_msi/Resources/assets/project_16x16.ico -------------------------------------------------------------------------------- /files/windows_msi/Resources/assets/project_32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itamae-kitchen/omnibus-itamae/1ce40dd79d5ae0882c737020d91149a60bb82875/files/windows_msi/Resources/assets/project_32x32.ico -------------------------------------------------------------------------------- /files/windows_msi/Resources/localization-en-us.wxl.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1033 5 | <%= project.friendly_name %> 6 | <%= project.maintainer %> 7 | {\WixUI_Font_Bigger}Welcome to the [ProductName] Setup Wizard 8 | 9 | {\WixUI_Font_Title_White}End-User License Agreement 10 | {\WixUI_Font_Normal_White}Please read the following license agreement carefully 11 | 12 | {\WixUI_Font_Title_White}Destination Folder 13 | {\WixUI_Font_Normal_White}Click Next to install to the default folder or click Change to choose another. 14 | 15 | {\WixUI_Font_Title_White}Installing [ProductName] 16 | 17 | {\WixUI_Font_Title_White}Ready to install [ProductName] 18 | 19 | <%= project.friendly_name %> 20 | 21 | -------------------------------------------------------------------------------- /files/windows_msi/Resources/parameters.wxi.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | " ?> 7 | " ?> 8 | 9 | 10 | -------------------------------------------------------------------------------- /files/windows_msi/Resources/source.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 13 | 14 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /omnibus.rb: -------------------------------------------------------------------------------- 1 | Encoding.default_external = Encoding::UTF_8 2 | 3 | append_timestamp false 4 | 5 | # 6 | # This file is used to configure the itamae project. It contains 7 | # some minimal configuration examples for working with Omnibus. For a full list 8 | # of configurable options, please see the documentation for +omnibus/config.rb+. 9 | # 10 | 11 | # Build internally 12 | # ------------------------------ 13 | # By default, Omnibus uses system folders (like +/var+ and +/opt+) to build and 14 | # cache components. If you would to build everything internally, you can 15 | # uncomment the following options. This will prevent the need for root 16 | # permissions in most cases. You will also need to update the itamae 17 | # project configuration to build at +./local/omnibus/build+ instead of 18 | # ++ 19 | # 20 | # Uncomment this line to change the default base directory to "local" 21 | # ------------------------------------------------------------------- 22 | # base_dir './local' 23 | # 24 | # Alternatively you can tune the individual values 25 | # ------------------------------------------------ 26 | # cache_dir './local/omnibus/cache' 27 | # git_cache_dir './local/omnibus/cache/install_path' 28 | # source_dir './local/omnibus/src' 29 | # build_dir './local/omnibus/build' 30 | # package_dir './local/omnibus/pkg' 31 | # package_tmp './local/omnibus/pkg-tmp' 32 | 33 | # Disable git caching 34 | # ------------------------------ 35 | # use_git_caching false 36 | 37 | # Enable S3 asset caching 38 | # ------------------------------ 39 | # use_s3_caching true 40 | # s3_access_key ENV['S3_ACCESS_KEY'] 41 | # s3_secret_key ENV['S3_SECRET_KEY'] 42 | # s3_bucket ENV['S3_BUCKET'] 43 | 44 | # Customize compiler bits 45 | # ------------------------------ 46 | # solaris_compiler 'gcc' 47 | # build_retries 5 48 | 49 | # Load additional software 50 | # ------------------------------ 51 | # software_gems ['omnibus-software', 'my-company-software'] 52 | # local_software_dirs ['/path/to/local/software'] 53 | -------------------------------------------------------------------------------- /package-scripts/itamae/makeselfinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Install a full itamae 4 | # 5 | 6 | PROGNAME=`basename $0` 7 | INSTALLER_DIR=`dirname $0` 8 | DEST_DIR=/opt/itamae 9 | CONFIG_DIR=/etc/itamae 10 | USAGE="usage: $0" 11 | 12 | error_exit() 13 | { 14 | echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2 15 | exit 1 16 | } 17 | 18 | # move the actual files into place 19 | rm -rf $DEST_DIR/* || error_exit "Cannot remove contents of $DEST_DIR" 20 | mkdir -p $DEST_DIR || error_exit "Cannot create $DEST_DIR" 21 | cp -R $INSTALLER_DIR $DEST_DIR || error_exit "Cannot install to $DEST_DIR" 22 | rm -f $DEST_DIR/$PROGNAME 23 | 24 | # You may want to symlink your packages bin files into /usr/bin 25 | # ln -sf $DEST_DIR/bin/itamae /usr/bin || error_exit "Cannot link itamae to /usr/bin" 26 | 27 | exit 0 28 | -------------------------------------------------------------------------------- /package-scripts/itamae/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Perform necessary itamae setup steps 4 | # after package is installed. 5 | # 6 | 7 | PROGNAME=$(basename $0) 8 | 9 | function error_exit 10 | { 11 | echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2 12 | exit 1 13 | } 14 | 15 | echo "Thank you for installing itamae!" 16 | 17 | ln -fs /opt/itamae/embedded/bin/itamae /usr/bin/itamae 18 | 19 | exit 0 20 | -------------------------------------------------------------------------------- /package-scripts/itamae/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Perform necessary itamae removal steps 4 | # after package is uninstalled. 5 | # 6 | 7 | echo "itamae has been uninstalled!" 8 | 9 | exit 0 10 | -------------------------------------------------------------------------------- /package-scripts/itamae/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Perform necessary itamae setup steps 4 | # before package is installed. 5 | # 6 | 7 | echo "You're about to install itamae!" 8 | -------------------------------------------------------------------------------- /package-scripts/itamae/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Perform necessary itamae setup steps 4 | # prior to installing package. 5 | # 6 | 7 | PROGNAME=$(basename $0) 8 | 9 | function error_exit 10 | { 11 | echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2 12 | exit 1 13 | } 14 | 15 | rm -f /usr/bin/itamae 16 | 17 | exit 0 18 | -------------------------------------------------------------------------------- /scripts/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'fileutils' 3 | require 'shellwords' 4 | require 'uri' 5 | require 'net/http' 6 | 7 | DISTS = %w!centos7! 8 | 9 | def run(*args) 10 | puts "> #{args}" 11 | unless system(*args) 12 | puts "#{args} failed." 13 | abort 14 | end 15 | end 16 | 17 | def bintray(url, path) 18 | http = Net::HTTP.new(url.host, url.port) 19 | http.use_ssl = url.scheme == 'https' 20 | http.start do 21 | print "* #{path} => #{url.path} ... " 22 | File.open(path, 'r') do |io| 23 | req = Net::HTTP::Put.new(url) 24 | req.basic_auth(ENV.fetch('BINTRAY_USERNAME'), ENV.fetch('BINTRAY_API_KEY')) 25 | 26 | req['Content-Type'] = 'application/vnd.debian.binary-package' 27 | #req['X-GPG-PASSPHRASE'] = config['bintray_gpg_key_passphrase'] 28 | req['Transfer-Encoding'] = 'chunked' 29 | req.body_stream = io 30 | http.request(req) 31 | end 32 | puts "done" 33 | end 34 | end 35 | 36 | def sudo(arg) 37 | if ENV["DOCKER_WITH_SUDO"] 38 | arg = arg.is_a?(Array) ? ['sudo', *arg] : "sudo #{arg}" 39 | end 40 | 41 | arg 42 | end 43 | 44 | def build(dist) 45 | run(sudo("docker build -t omnibus-itamae-builder:#{dist} -f dockerfiles/#{dist} .")) 46 | 47 | user = `id -u`.chomp 48 | run(*sudo([*%w(docker run --rm -v), "#{File.join(Dir.pwd, 'pkg')}:/work/pkg", "omnibus-itamae-builder:#{dist}", 'bash', '-xe', '-c', "bundle exec omnibus build itamae && chown -R #{user}:#{user} /work/pkg"])) 49 | end 50 | 51 | def release(dist) 52 | Dir['pkg/*.deb'].each do |f| 53 | release_deb(f, dist) 54 | end 55 | 56 | Dir['pkg/*.rpm'].each do |f| 57 | release_rpm(f, dist) 58 | end 59 | end 60 | 61 | def release_deb(path, dist) 62 | basename = File.basename(path) 63 | match = basename.match(/\A([^_]+)_([^_]+)_([^\.]+)\.deb\z/) 64 | name = match[1] 65 | version = match[2] 66 | arch = match[3] 67 | 68 | basename.sub!(/\.deb\z/, "_#{dist}.deb") 69 | 70 | url = URI("https://api.bintray.com/content/itamae/itamae/" \ 71 | "#{URI.encode_www_form_component(name)}/" \ 72 | "#{URI.encode_www_form_component(version)}/" \ 73 | "#{URI.encode_www_form_component(dist)}/pool/contrib/#{name[0]}/#{URI.encode_www_form_component(basename)};" \ 74 | "deb_distribution=#{URI.encode_www_form_component(dist)};" \ 75 | "deb_architecture=#{URI.encode_www_form_component(arch)};" \ 76 | "deb_component=contrib;" \ 77 | "publish=1") 78 | 79 | bintray(url, path) 80 | 81 | FileUtils.mv(path, "#{path}.done") 82 | end 83 | 84 | def release_rpm(path, dist) 85 | basename = File.basename(path) 86 | match = basename.match(/\A([^-]+)-(.+)\.[^\.]+\.rpm\z/) 87 | version = match[2] 88 | 89 | url = URI("https://api.bintray.com/content/itamae/itamae-rpm/" \ 90 | "itamae/" \ 91 | "#{URI.encode_www_form_component(version)}/" \ 92 | "#{URI.encode_www_form_component(basename)};" \ 93 | "publish=1") 94 | 95 | bintray(url, path) 96 | 97 | FileUtils.mv(path, "#{path}.done") 98 | end 99 | 100 | dists = ARGV 101 | dists = DISTS if dists.first == 'all' 102 | 103 | Dir.chdir(File.expand_path('..', __dir__)) do 104 | dists.each do |dist| 105 | build(dist) 106 | release(dist) 107 | end 108 | end 109 | 110 | --------------------------------------------------------------------------------