image_optim_pack 0.5.6.20190728-x86-linux → 0.6.0.20201024-x86-linux
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/.rubocop.yml +17 -4
- data/.travis.yml +15 -18
- data/CHANGELOG.markdown +21 -0
- data/LICENSE.txt +1 -1
- data/Makefile +15 -15
- data/README.markdown +13 -13
- data/Vagrantfile +0 -20
- data/boxes/.rubocop.yml +2 -5
- data/checksums.mk +5 -5
- data/image_optim_pack.gemspec +4 -4
- data/script/livecheck +9 -11
- data/spec/image_optim_spec.rb +5 -4
- data/vendor/linux-i686/jhead +0 -0
- data/vendor/linux-i686/jpeg-recompress +0 -0
- data/vendor/linux-i686/jpegoptim +0 -0
- data/vendor/linux-i686/jpegtran +0 -0
- data/vendor/linux-i686/libjpeg.so +0 -0
- data/vendor/linux-i686/pngquant +0 -0
- metadata +12 -25
- data/boxes/definitions/freebsd-amd64/definition.rb +0 -40
- data/boxes/definitions/freebsd-amd64/install.sh +0 -66
- data/boxes/definitions/freebsd-i386/definition.rb +0 -40
- data/boxes/definitions/freebsd-i386/install.sh +0 -66
- data/boxes/definitions/freebsd-postinstall.sh +0 -38
- data/boxes/definitions/openbsd-amd64/definition.rb +0 -69
- data/boxes/definitions/openbsd-i386/definition.rb +0 -69
- data/boxes/definitions/openbsd-postinstall.sh +0 -29
- data/image_optim_pack-fake-x42.gemspec +0 -3
- data/image_optim_pack-freebsd-amd64.gemspec +0 -3
- data/image_optim_pack-freebsd-x86.gemspec +0 -3
- data/image_optim_pack-openbsd-x86.gemspec +0 -3
- data/image_optim_pack-openbsd-x86_64.gemspec +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c40b7429b420a857a13843ecafc6b0b63f2dc92c430b90798b1c852b2767a61
|
4
|
+
data.tar.gz: adefce3e6b6aac0b15e81b62d0c5041d169a83c02a18d4c9d58a53673f615fef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 216b646e2c8c25b93ecae2274918b97b58021453fc50e9ed5080842f34369cd6ae967f10ec8db6ed6d74da99707d2bb15f3efda432f901ef87005533c7f795e9
|
7
|
+
data.tar.gz: e2f82a3409892e9dda51fbc8de9c57a4c834c7f0a19b792730a08931fb935a8dd838ac535fb63a0450864304a149eb55ab79b96ae9181affa38477af44d5b321
|
data/.rubocop.yml
CHANGED
@@ -4,6 +4,7 @@ AllCops:
|
|
4
4
|
- 'build/**/*'
|
5
5
|
- 'download/**/*'
|
6
6
|
- Vagrantfile
|
7
|
+
NewCops: enable
|
7
8
|
|
8
9
|
Bundler/OrderedGems:
|
9
10
|
Enabled: false
|
@@ -14,9 +15,12 @@ Layout/AccessModifierIndentation:
|
|
14
15
|
Layout/DotPosition:
|
15
16
|
EnforcedStyle: trailing
|
16
17
|
|
17
|
-
Layout/
|
18
|
+
Layout/FirstHashElementIndentation:
|
18
19
|
EnforcedStyle: consistent
|
19
20
|
|
21
|
+
Layout/LineLength:
|
22
|
+
Max: 120
|
23
|
+
|
20
24
|
Layout/RescueEnsureAlignment:
|
21
25
|
Enabled: false
|
22
26
|
|
@@ -30,9 +34,6 @@ Metrics/BlockLength:
|
|
30
34
|
Exclude:
|
31
35
|
- spec/**/*_spec.rb
|
32
36
|
|
33
|
-
Metrics/LineLength:
|
34
|
-
Max: 120
|
35
|
-
|
36
37
|
Metrics/MethodLength:
|
37
38
|
Max: 15
|
38
39
|
|
@@ -40,6 +41,9 @@ Security/YAMLLoad:
|
|
40
41
|
Exclude:
|
41
42
|
- script/livecheck
|
42
43
|
|
44
|
+
Style/AccessorGrouping:
|
45
|
+
Enabled: false
|
46
|
+
|
43
47
|
Style/Alias:
|
44
48
|
EnforcedStyle: prefer_alias_method
|
45
49
|
|
@@ -52,9 +56,18 @@ Style/EmptyCaseCondition:
|
|
52
56
|
Style/FormatStringToken:
|
53
57
|
Enabled: false
|
54
58
|
|
59
|
+
Style/HashEachMethods:
|
60
|
+
Enabled: true
|
61
|
+
|
55
62
|
Style/HashSyntax:
|
56
63
|
EnforcedStyle: hash_rockets
|
57
64
|
|
65
|
+
Style/HashTransformKeys:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
Style/HashTransformValues:
|
69
|
+
Enabled: false
|
70
|
+
|
58
71
|
Style/IfUnlessModifier:
|
59
72
|
Enabled: false
|
60
73
|
|
data/.travis.yml
CHANGED
@@ -2,42 +2,39 @@ sudo: false
|
|
2
2
|
dist: trusty
|
3
3
|
language: ruby
|
4
4
|
rvm:
|
5
|
-
- '1.8.7-
|
5
|
+
- '1.8.7-p374'
|
6
6
|
- '1.9.3-p551'
|
7
7
|
- '2.0.0-p648'
|
8
8
|
- '2.1.10'
|
9
9
|
- '2.2.10'
|
10
10
|
- '2.3.8'
|
11
|
-
- '2.4.
|
12
|
-
- '2.5.
|
13
|
-
- '2.6.
|
14
|
-
- '
|
11
|
+
- '2.4.10'
|
12
|
+
- '2.5.8'
|
13
|
+
- '2.6.6'
|
14
|
+
- '2.7.2'
|
15
|
+
- 'jruby-9.2.11.1'
|
15
16
|
script:
|
16
17
|
- make test
|
17
18
|
- bundle exec image_optim --info
|
18
19
|
- bundle exec rspec
|
19
20
|
before_install:
|
21
|
+
- 'echo "gem: --no-ri --no-rdoc --no-document" > ~/.gemrc'
|
20
22
|
- gem install rubygems-update || gem install rubygems-update --version '< 3'
|
21
|
-
-
|
23
|
+
- update_rubygems
|
22
24
|
- gem install bundler || gem install bundler --version '< 2'
|
23
|
-
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install imagemagick; fi
|
25
|
+
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install imagemagick; fi; which convert
|
24
26
|
- make ldd-version
|
25
27
|
matrix:
|
26
28
|
include:
|
27
|
-
- dist: trusty
|
28
|
-
rvm: default
|
29
|
-
- os: osx
|
30
|
-
rvm: default
|
31
|
-
osx_image: xcode8.3
|
32
29
|
- os: osx
|
33
30
|
rvm: default
|
34
|
-
osx_image:
|
31
|
+
osx_image: xcode10.1
|
35
32
|
- os: osx
|
36
33
|
rvm: default
|
37
|
-
osx_image:
|
38
|
-
- env: RUBOCOP
|
39
|
-
rvm: '2.6.
|
34
|
+
osx_image: xcode11.2
|
35
|
+
- env: RUBOCOP=1
|
36
|
+
rvm: '2.6.6'
|
40
37
|
script: bundle exec rubocop
|
41
|
-
- env: CHECK_RUBIES
|
42
|
-
rvm: '2.6.
|
38
|
+
- env: CHECK_RUBIES=1
|
39
|
+
rvm: '2.6.6'
|
43
40
|
script: bundle exec travis_check_rubies
|
data/CHANGELOG.markdown
CHANGED
@@ -2,6 +2,27 @@
|
|
2
2
|
|
3
3
|
## unreleased
|
4
4
|
|
5
|
+
## v0.6.0.20201024 (2020-10-24)
|
6
|
+
|
7
|
+
* pngquant 2.13.0 [@toy](https://github.com/toy)
|
8
|
+
|
9
|
+
## v0.6.0.20200215 (2020-02-15)
|
10
|
+
|
11
|
+
* jpegarchive 2.2.0 and libmozjpeg 3.3.1 [@toy](https://github.com/toy)
|
12
|
+
|
13
|
+
## v0.6.0.20200116 (2020-01-16)
|
14
|
+
|
15
|
+
* libjpeg 9d [@toy](https://github.com/toy)
|
16
|
+
|
17
|
+
## v0.6.0.20191208 (2019-12-08)
|
18
|
+
|
19
|
+
* jhead 3.04 [@toy](https://github.com/toy)
|
20
|
+
* Update jhead source and use https where possible [@toy](https://github.com/toy)
|
21
|
+
|
22
|
+
## v0.6.0 (2019-08-15)
|
23
|
+
|
24
|
+
* Remove FreeBSD and OpenBSD binaries/platforms [#16](https://github.com/toy/image_optim_pack/issues/16) [@toy](https://github.com/toy)
|
25
|
+
|
5
26
|
## v0.5.6.20190728 (2019-07-28)
|
6
27
|
|
7
28
|
* pngquant 2.12.5 [@toy](https://github.com/toy)
|
data/LICENSE.txt
CHANGED
data/Makefile
CHANGED
@@ -4,16 +4,16 @@ all :
|
|
4
4
|
|
5
5
|
ADVANCECOMP_VER := 2.1
|
6
6
|
GIFSICLE_VER := 1.92
|
7
|
-
JHEAD_VER := 3.
|
8
|
-
JPEGARCHIVE_VER := 2.
|
7
|
+
JHEAD_VER := 3.04
|
8
|
+
JPEGARCHIVE_VER := 2.2.0
|
9
9
|
JPEGOPTIM_VER := 1.4.6
|
10
|
-
LIBJPEG_VER :=
|
11
|
-
LIBMOZJPEG_VER := 3.1
|
10
|
+
LIBJPEG_VER := 9d
|
11
|
+
LIBMOZJPEG_VER := 3.3.1
|
12
12
|
LIBPNG_VER := 1.6.37
|
13
13
|
LIBZ_VER := 1.2.11
|
14
14
|
OPTIPNG_VER := 0.7.7
|
15
15
|
PNGCRUSH_VER := 1.8.13
|
16
|
-
PNGQUANT_VER := 2.
|
16
|
+
PNGQUANT_VER := 2.13.0
|
17
17
|
|
18
18
|
# ====== CHECKSUMS ======
|
19
19
|
|
@@ -83,17 +83,17 @@ $$($1_TGZ) :
|
|
83
83
|
endef
|
84
84
|
|
85
85
|
$(eval $(call archive-dl,ADVANCECOMP, https://github.com/amadvance/advancecomp/releases/download/v[VER]/advancecomp-[VER].tar.gz))
|
86
|
-
$(eval $(call archive-dl,GIFSICLE,
|
87
|
-
$(eval $(call archive-dl,JHEAD,
|
88
|
-
$(eval $(call archive-dl,JPEGARCHIVE, https://github.com/danielgtaylor/jpeg-archive/archive/[VER].tar.gz))
|
89
|
-
$(eval $(call archive-dl,JPEGOPTIM,
|
90
|
-
$(eval $(call archive-dl,LIBJPEG,
|
86
|
+
$(eval $(call archive-dl,GIFSICLE, https://www.lcdf.org/gifsicle/gifsicle-[VER].tar.gz))
|
87
|
+
$(eval $(call archive-dl,JHEAD, https://www.sentex.ca/~mwandel/jhead/jhead-[VER].tar.gz))
|
88
|
+
$(eval $(call archive-dl,JPEGARCHIVE, https://github.com/danielgtaylor/jpeg-archive/archive/v[VER].tar.gz))
|
89
|
+
$(eval $(call archive-dl,JPEGOPTIM, https://www.kokkonen.net/tjko/src/jpegoptim-[VER].tar.gz))
|
90
|
+
$(eval $(call archive-dl,LIBJPEG, https://www.ijg.org/files/jpegsrc.v[VER].tar.gz))
|
91
91
|
$(eval $(call archive-dl,LIBMOZJPEG, https://github.com/mozilla/mozjpeg/archive/v[VER].tar.gz))
|
92
|
-
$(eval $(call archive-dl,LIBPNG,
|
93
|
-
$(eval $(call archive-dl,LIBZ,
|
94
|
-
$(eval $(call archive-dl,OPTIPNG,
|
95
|
-
$(eval $(call archive-dl,PNGCRUSH,
|
96
|
-
$(eval $(call archive-dl,PNGQUANT,
|
92
|
+
$(eval $(call archive-dl,LIBPNG, https://prdownloads.sourceforge.net/libpng/libpng-[VER].tar.gz?download))
|
93
|
+
$(eval $(call archive-dl,LIBZ, https://prdownloads.sourceforge.net/libpng/zlib-[VER].tar.gz?download))
|
94
|
+
$(eval $(call archive-dl,OPTIPNG, https://prdownloads.sourceforge.net/optipng/optipng-[VER].tar.gz?download))
|
95
|
+
$(eval $(call archive-dl,PNGCRUSH, https://prdownloads.sourceforge.net/pmt/pngcrush-[VER]-nolib.tar.gz?download))
|
96
|
+
$(eval $(call archive-dl,PNGQUANT, https://pngquant.org/pngquant-[VER]-src.tar.gz))
|
97
97
|
|
98
98
|
download : $(foreach archive,$(ARCHIVES),$($(archive)_TGZ))
|
99
99
|
.PHONY : download
|
data/README.markdown
CHANGED
@@ -8,36 +8,36 @@
|
|
8
8
|
|
9
9
|
Precompiled binaries for [`image_optim`](https://github.com/toy/image_optim).
|
10
10
|
|
11
|
-
Contains binaries for Mac OS X (>= 10.
|
11
|
+
Contains binaries for Mac OS X (>= 10.7, i386 and x86\_64) and Linux (i686 and x86\_64).
|
12
12
|
|
13
13
|
A test application with latest `image_optim` and `image_optim_pack` is available on heroku: https://iopack.herokuapp.com/.
|
14
14
|
|
15
15
|
## Binaries and libraries
|
16
16
|
|
17
|
-
* [advpng](
|
18
|
-
* contains parts of [7z](
|
17
|
+
* [advpng](https://www.advancemame.it/doc-advpng.html) by Andrea Mazzoleni and Filipe Estima ([GNU GPLv3](acknowledgements/advancecomp.txt))
|
18
|
+
* contains parts of [7z](https://7-zip.org) by Igor Pavlov with modifications by Andrea Mazzoleni ([license](acknowledgements/7z.txt))
|
19
19
|
* and [zopfli](https://code.google.com/p/zopfli/) by Lode Vandevenne and Jyrki Alakuijala ([license](acknowledgements/zopfli.txt), [contributors](acknowledgements/zopfli-contributors.txt))
|
20
|
-
* [gifsicle](
|
21
|
-
* [jhead](
|
20
|
+
* [gifsicle](https://lcdf.org/gifsicle/) by Eddie Kohler ([GNU GPLv2](acknowledgements/gifsicle.txt))
|
21
|
+
* [jhead](https://www.sentex.ca/~mwandel/jhead/) by Matthias Wandel ([public domain](acknowledgements/jhead.txt))
|
22
22
|
* [jpeg-recompress](https://github.com/danielgtaylor/jpeg-archive) by Daniel G. Taylor ([license](acknowledgements/jpeg-archive.txt))
|
23
23
|
* includes [Image Quality Assessment (IQA)](http://tdistler.com/iqa/) by Tom Distler ([license](acknowledgements/iqa.txt))
|
24
24
|
* includes [SmallFry](https://github.com/dwbuiten/smallfry) by Derek Buitenhuis ([license](acknowledgements/smallfry.txt))
|
25
25
|
* statically linked against mozjpeg, see below
|
26
|
-
* [jpegoptim](
|
27
|
-
* [libjpeg and jpegtran](
|
28
|
-
* [libjpeg-turbo](
|
26
|
+
* [jpegoptim](https://www.kokkonen.net/tjko/projects.html) by Timo Kokkonen ([GNU GPLv2](acknowledgements/jpegoptim.txt) or later)
|
27
|
+
* [libjpeg and jpegtran](https://ijg.org/) by the Independent JPEG Group ([license](acknowledgements/libjpeg.txt))
|
28
|
+
* [libjpeg-turbo](https://www.libjpeg-turbo.org/) by libjpeg-turbo Project ([license](acknowledgements/libjpeg-turbo.txt))
|
29
29
|
* based on libjpeg, see above
|
30
|
-
* includes [x86 SIMD extension for IJG JPEG library](
|
30
|
+
* includes [x86 SIMD extension for IJG JPEG library](https://cetus.sakura.ne.jp/softlab/jpeg-x86simd/jpegsimd.html) by Miyasaka Masaru ([license](acknowledgements/libjpeg-x86-simd.txt))
|
31
31
|
* [libpng](http://libpng.org/pub/png/) by Guy Eric Schalnat, Andreas Dilger, Glenn Randers-Pehrson and others ([license](acknowledgements/libpng.txt))
|
32
32
|
* [mozjpeg](https://github.com/mozilla/mozjpeg) by Mozilla Research ([license](acknowledgements/mozjpeg.txt))
|
33
33
|
* base on libjpeg and libjpeg-turbo, see above
|
34
34
|
* [optipng](http://optipng.sourceforge.net/) by Cosmin Truta ([license](acknowledgements/optipng.txt), [authors](acknowledgements/optipng-authors.txt))
|
35
35
|
* contains code based in part on the work of Miyasaka Masaru for BMP support ([license](acknowledgements/bmp2png.txt))
|
36
36
|
* and David Koblas for GIF support ([license](acknowledgements/gifread.txt))
|
37
|
-
* [pngcrush](
|
37
|
+
* [pngcrush](https://pmt.sourceforge.io/pngcrush/) by Glenn Randers-Pehrson, portions by Greg Roelofs ([license](acknowledgements/pngcrush.txt))
|
38
38
|
* contains [cexcept](http://www.nicemice.net/cexcept/) interface by Adam M. Costello and Cosmin Truta ([license](acknowledgements/cexcept.txt))
|
39
|
-
* [pngquant](
|
40
|
-
* [zlib](
|
39
|
+
* [pngquant](https://pngquant.org/) by Kornel Lesiński based on code by Greg Roelofs and Jef Poskanzer after an idea by Stefan Schneider ([license](acknowledgements/pngquant.txt))
|
40
|
+
* [zlib](https://zlib.net/) by Jean-Loup Gailly and Mark Adler ([license](acknowledgements/zlib.txt))
|
41
41
|
|
42
42
|
**NOTE: On FreeBSD and OpenBSD `make` is not the GNU Make, so `gmake` should be used instead.**
|
43
43
|
|
@@ -92,4 +92,4 @@ make clobber # `clean-all` and remove download directory
|
|
92
92
|
|
93
93
|
## Copyright
|
94
94
|
|
95
|
-
Copyright (c) 2014-
|
95
|
+
Copyright (c) 2014-2020 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
|
data/Vagrantfile
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
Vagrant.require_version '!= 1.8.5' # OpenBSD can't be halted in 1.8.5
|
2
|
-
|
3
1
|
Vagrant.configure('2') do |config|
|
4
2
|
# don't mess with keys
|
5
3
|
config.ssh.insert_key = false
|
@@ -19,10 +17,6 @@ Vagrant.configure('2') do |config|
|
|
19
17
|
{
|
20
18
|
'linux-x86_64' => 'boxes/centos-amd64.box',
|
21
19
|
'linux-i686' => 'boxes/centos-i386.box',
|
22
|
-
'freebsd-amd64' => 'boxes/freebsd-amd64.box',
|
23
|
-
'freebsd-i386' => 'boxes/freebsd-i386.box',
|
24
|
-
'openbsd-amd64' => 'boxes/openbsd-amd64.box',
|
25
|
-
'openbsd-i386' => 'boxes/openbsd-i386.box',
|
26
20
|
}.each do |name, location|
|
27
21
|
config.vm.define name do |machine|
|
28
22
|
machine.vm.hostname = name.gsub('_', '-')
|
@@ -39,20 +33,6 @@ Vagrant.configure('2') do |config|
|
|
39
33
|
yum -y install rsync ntpdate make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm
|
40
34
|
fi
|
41
35
|
SH
|
42
|
-
when /^freebsd/
|
43
|
-
<<-SH
|
44
|
-
set -ex
|
45
|
-
pkg install -y rsync gmake wget gcc chrpath perl5 pkgconf autoconf automake libtool nasm
|
46
|
-
SH
|
47
|
-
when /^openbsd/
|
48
|
-
<<-SH
|
49
|
-
set -ex
|
50
|
-
pkg_add -z rsync-- ntp gmake gtar-- wget g++-4.8.2p2 autoconf-2.69 automake-1.14.1 libtool nasm
|
51
|
-
real_workdir_path=/home/vagrant/shared
|
52
|
-
mkdir -p $real_workdir_path
|
53
|
-
chown vagrant:vagrant $real_workdir_path
|
54
|
-
ln -nfs $real_workdir_path /vagrant
|
55
|
-
SH
|
56
36
|
end
|
57
37
|
|
58
38
|
machine.vm.provision :shell, inline: <<-SH
|
data/boxes/.rubocop.yml
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
inherit_from: ../.rubocop.yml
|
2
2
|
|
3
|
-
|
3
|
+
Layout/LineLength:
|
4
4
|
Enabled: false
|
5
5
|
|
6
|
-
|
6
|
+
Lint/RedundantSplatExpansion:
|
7
7
|
Enabled: false
|
8
8
|
|
9
9
|
Security/Eval:
|
10
10
|
Exclude: [Rakefile]
|
11
|
-
|
12
|
-
Style/BracesAroundHashParameters:
|
13
|
-
Enabled: false
|
data/checksums.mk
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
ADVANCECOMP_SHA256 := 3ac0875e86a8517011976f04107186d5c60d434954078bc502ee731480933eb8
|
2
2
|
GIFSICLE_SHA256 := 5ab556c01d65fddf980749e3ccf50b7fd40de738b6df679999294cc5fabfce65
|
3
|
-
JHEAD_SHA256 :=
|
4
|
-
JPEGARCHIVE_SHA256 :=
|
3
|
+
JHEAD_SHA256 := ef89bbcf4f6c25ed88088cf242a47a6aedfff4f08cc7dc205bf3e2c0f10a03c9
|
4
|
+
JPEGARCHIVE_SHA256 := 3da16a5abbddd925dee0379aa51d9fe0cba33da0b5703be27c13a2dda3d7ed75
|
5
5
|
JPEGOPTIM_SHA256 := 88b1eb64c2a33a2f013f068df8b0331f42c019267401ae3fa28e3277403a5ab7
|
6
|
-
LIBJPEG_SHA256 :=
|
7
|
-
LIBMOZJPEG_SHA256 :=
|
6
|
+
LIBJPEG_SHA256 := 99cb50e48a4556bc571dadd27931955ff458aae32f68c4d9c39d624693f69c32
|
7
|
+
LIBMOZJPEG_SHA256 := aebbea60ea038a84a2d1ed3de38fdbca34027e2e54ee2b7d08a97578be72599d
|
8
8
|
LIBPNG_SHA256 := daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4
|
9
9
|
LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
|
10
10
|
OPTIPNG_SHA256 := 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
|
11
11
|
PNGCRUSH_SHA256 := fed0aaf5c098aa8c7f78c75365cd18d7341417326ecbdba547876b7b4f3df4be
|
12
|
-
PNGQUANT_SHA256 :=
|
12
|
+
PNGQUANT_SHA256 := 0d1d5dcdb5785961abf64397fb0735f8a29da346b6fee6666e4ef082b516c07e
|
data/image_optim_pack.gemspec
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'image_optim_pack'
|
5
|
-
s.version = '0.
|
5
|
+
s.version = '0.6.0.20201024'
|
6
6
|
s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, pngcrush, pngquant}
|
7
|
-
s.homepage = "
|
7
|
+
s.homepage = "https://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
9
9
|
s.license = 'MIT'
|
10
10
|
|
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
|
|
54
54
|
s.add_dependency 'fspath', '>= 2.1', '< 4'
|
55
55
|
|
56
56
|
s.add_development_dependency 'rspec', '~> 3.0'
|
57
|
-
if RUBY_VERSION >= '2.
|
58
|
-
s.add_development_dependency 'rubocop', '~> 0
|
57
|
+
if RUBY_VERSION >= '2.4'
|
58
|
+
s.add_development_dependency 'rubocop', '~> 1.0'
|
59
59
|
end
|
60
60
|
end
|
data/script/livecheck
CHANGED
@@ -72,11 +72,7 @@ class Livecheck
|
|
72
72
|
def changelog_entry
|
73
73
|
github_user = `git config github.user`.strip
|
74
74
|
changed = livechecks.select(&:changed?)
|
75
|
-
|
76
|
-
*
|
77
|
-
#{to_sentence(changed.map(&:name_n_latest_version))}
|
78
|
-
[@#{github_user}](https://github.com/#{github_user})
|
79
|
-
].join(' ') + "\n"
|
75
|
+
"* #{to_sentence(changed.map(&:name_n_latest_version))} [@#{github_user}](https://github.com/#{github_user})\n"
|
80
76
|
end
|
81
77
|
|
82
78
|
def to_sentence(array)
|
@@ -90,7 +86,9 @@ class Livecheck
|
|
90
86
|
def write(path, data)
|
91
87
|
path.temp_file(path.dirname) do |io|
|
92
88
|
io.write data
|
89
|
+
mode = path.exist? ? path.stat.mode : (0o777 & ~File.umask)
|
93
90
|
io.path.rename(path)
|
91
|
+
path.chmod(mode)
|
94
92
|
end
|
95
93
|
warn "Wrote #{path}"
|
96
94
|
end
|
@@ -173,25 +171,25 @@ Livecheck::Cli.new(ARGV).run
|
|
173
171
|
__END__
|
174
172
|
advancecomp:
|
175
173
|
url: https://github.com/amadvance/advancecomp/releases.atom
|
176
|
-
regexp:
|
174
|
+
regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
|
177
175
|
gifsicle:
|
178
176
|
url: https://www.lcdf.org/gifsicle/
|
179
177
|
regexp: gifsicle-(\d+(?:\.\d+)*)\.tar\.gz
|
180
178
|
jhead:
|
181
|
-
url:
|
179
|
+
url: https://www.sentex.ca/~mwandel/jhead/
|
182
180
|
regexp: jhead-(\d+(?:\.\d+)*)
|
183
181
|
jpegoptim:
|
184
182
|
url: https://github.com/tjko/jpegoptim/releases.atom
|
185
|
-
regexp: <
|
183
|
+
regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
|
186
184
|
jpegarchive:
|
187
185
|
url: https://github.com/danielgtaylor/jpeg-archive/releases.atom
|
188
|
-
regexp: <
|
186
|
+
regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
|
189
187
|
libjpeg:
|
190
|
-
url:
|
188
|
+
url: https://www.ijg.org/files/
|
191
189
|
regexp: jpegsrc.v(.*?).tar.gz
|
192
190
|
libmozjpeg:
|
193
191
|
url: https://github.com/mozilla/mozjpeg/releases.atom
|
194
|
-
regexp: <
|
192
|
+
regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
|
195
193
|
libpng:
|
196
194
|
url: https://sourceforge.net/projects/libpng/rss?path=/libpng16
|
197
195
|
regexp: /libpng\d*/(\d+(?:\.\d+)*)/
|
data/spec/image_optim_spec.rb
CHANGED
@@ -15,10 +15,11 @@ describe ImageOptim do
|
|
15
15
|
images_dir = FSPath.new(image_optim_root) / 'spec/images'
|
16
16
|
test_images = images_dir.glob('**/*.*')
|
17
17
|
|
18
|
-
isolated_options_base =
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
isolated_options_base = Hash[
|
19
|
+
ImageOptim::Worker.klasses.map do |klass|
|
20
|
+
[klass.bin_sym, false]
|
21
|
+
end
|
22
|
+
].merge(:skip_missing_workers => false)
|
22
23
|
|
23
24
|
ImageOptim::Worker.klasses.each do |worker_klass|
|
24
25
|
next if [:pngout, :svgo].include?(worker_klass.bin_sym)
|
data/vendor/linux-i686/jhead
CHANGED
Binary file
|
Binary file
|
data/vendor/linux-i686/jpegoptim
CHANGED
Binary file
|
data/vendor/linux-i686/jpegtran
CHANGED
Binary file
|
Binary file
|
data/vendor/linux-i686/pngquant
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_optim_pack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0.20201024
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: image_optim
|
@@ -64,16 +64,16 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0
|
67
|
+
version: '1.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0
|
75
|
-
description:
|
76
|
-
email:
|
74
|
+
version: '1.0'
|
75
|
+
description:
|
76
|
+
email:
|
77
77
|
executables: []
|
78
78
|
extensions: []
|
79
79
|
extra_rdoc_files: []
|
@@ -119,24 +119,11 @@ files:
|
|
119
119
|
- boxes/definitions/centos-i386/definition.rb
|
120
120
|
- boxes/definitions/centos-i386/ks.cfg
|
121
121
|
- boxes/definitions/centos-postinstall.sh
|
122
|
-
- boxes/definitions/freebsd-amd64/definition.rb
|
123
|
-
- boxes/definitions/freebsd-amd64/install.sh
|
124
|
-
- boxes/definitions/freebsd-i386/definition.rb
|
125
|
-
- boxes/definitions/freebsd-i386/install.sh
|
126
|
-
- boxes/definitions/freebsd-postinstall.sh
|
127
|
-
- boxes/definitions/openbsd-amd64/definition.rb
|
128
|
-
- boxes/definitions/openbsd-i386/definition.rb
|
129
|
-
- boxes/definitions/openbsd-postinstall.sh
|
130
122
|
- checksums.mk
|
131
123
|
- image_optim_pack-darwin-x86.gemspec
|
132
124
|
- image_optim_pack-darwin-x86_64.gemspec
|
133
|
-
- image_optim_pack-fake-x42.gemspec
|
134
|
-
- image_optim_pack-freebsd-amd64.gemspec
|
135
|
-
- image_optim_pack-freebsd-x86.gemspec
|
136
125
|
- image_optim_pack-linux-x86.gemspec
|
137
126
|
- image_optim_pack-linux-x86_64.gemspec
|
138
|
-
- image_optim_pack-openbsd-x86.gemspec
|
139
|
-
- image_optim_pack-openbsd-x86_64.gemspec
|
140
127
|
- image_optim_pack.gemspec
|
141
128
|
- lib/image_optim/pack.rb
|
142
129
|
- lib/image_optim_pack.rb
|
@@ -158,15 +145,15 @@ files:
|
|
158
145
|
- vendor/linux-i686/optipng
|
159
146
|
- vendor/linux-i686/pngcrush
|
160
147
|
- vendor/linux-i686/pngquant
|
161
|
-
homepage:
|
148
|
+
homepage: https://github.com/toy/image_optim_pack
|
162
149
|
licenses:
|
163
150
|
- MIT
|
164
151
|
metadata:
|
165
152
|
bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
|
166
153
|
changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
|
167
|
-
documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.
|
154
|
+
documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.6.0.20201024
|
168
155
|
source_code_uri: https://github.com/toy/image_optim_pack
|
169
|
-
post_install_message:
|
156
|
+
post_install_message:
|
170
157
|
rdoc_options: []
|
171
158
|
require_paths:
|
172
159
|
- lib
|
@@ -181,8 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
168
|
- !ruby/object:Gem::Version
|
182
169
|
version: '0'
|
183
170
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
185
|
-
signing_key:
|
171
|
+
rubygems_version: 3.1.4
|
172
|
+
signing_key:
|
186
173
|
specification_version: 4
|
187
174
|
summary: 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress,
|
188
175
|
jpegoptim, jpegtran, optipng, pngcrush, pngquant'
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Veewee::Session.declare({
|
4
|
-
:cpu_count => '1',
|
5
|
-
:memory_size => '512',
|
6
|
-
:disk_size => '8192',
|
7
|
-
:disk_format => 'VDI',
|
8
|
-
:hostiocache => 'off',
|
9
|
-
:os_type_id => 'FreeBSD_64',
|
10
|
-
:iso_file => 'FreeBSD-10.3-RELEASE-amd64-disc1.iso',
|
11
|
-
:iso_src => 'http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.3/FreeBSD-10.3-RELEASE-amd64-disc1.iso',
|
12
|
-
:iso_sha256 => 'fef068cf6dea26923ab84b62ba9f21461ca0bdec90a0741c8ffb0e1ca29e410d',
|
13
|
-
:iso_download_timeout => '1000',
|
14
|
-
:boot_wait => '10',
|
15
|
-
:boot_cmd_sequence => [
|
16
|
-
'<Esc>',
|
17
|
-
'boot -s',
|
18
|
-
'<Enter>',
|
19
|
-
'<Wait>' * 10,
|
20
|
-
'/bin/sh<Enter>',
|
21
|
-
'mdmfs -s 100m md1 /tmp<Enter>',
|
22
|
-
'dhclient -l /tmp/dhclient.lease.em0 em0<Enter>',
|
23
|
-
'<Wait>' * 10,
|
24
|
-
'fetch -o /tmp/install.sh http://%IP%:%PORT%/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh %NAME%<Enter>',
|
25
|
-
],
|
26
|
-
:kickstart_port => '7122',
|
27
|
-
:kickstart_timeout => '300',
|
28
|
-
:kickstart_file => 'install.sh',
|
29
|
-
:ssh_login_timeout => '10000',
|
30
|
-
:ssh_user => 'root',
|
31
|
-
:ssh_password => 'vagrant',
|
32
|
-
:ssh_key => '',
|
33
|
-
:ssh_host_port => '7222',
|
34
|
-
:ssh_guest_port => '22',
|
35
|
-
:sudo_cmd => "sh '%f'",
|
36
|
-
:shutdown_cmd => 'shutdown -p now',
|
37
|
-
:postinstall_files => %w[../freebsd-postinstall.sh],
|
38
|
-
:postinstall_timeout => '10000',
|
39
|
-
:skip_iso_transfer => true,
|
40
|
-
})
|
@@ -1,66 +0,0 @@
|
|
1
|
-
#!/bin/sh -x
|
2
|
-
|
3
|
-
# Credit: http://www.aisecure.net/2011/05/01/root-on-zfs-freebsd-current/
|
4
|
-
|
5
|
-
NAME=$1
|
6
|
-
|
7
|
-
# create disks
|
8
|
-
gpart create -s gpt ada0
|
9
|
-
gpart add -t freebsd-boot -l boot -b 40 -s 512K ada0
|
10
|
-
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
|
11
|
-
gpart add -t freebsd-ufs -l root -b 1M -s 2G ada0
|
12
|
-
gpart add -t freebsd-swap -l swap -s 512M ada0
|
13
|
-
gpart add -t freebsd-ufs -l var -s 1G ada0
|
14
|
-
gpart add -t freebsd-ufs -l tmp -s 512M ada0
|
15
|
-
gpart add -t freebsd-ufs -l usr -a 1M ada0
|
16
|
-
|
17
|
-
# create filesystems
|
18
|
-
newfs -U /dev/gpt/root
|
19
|
-
newfs -U /dev/gpt/var
|
20
|
-
newfs -U /dev/gpt/tmp
|
21
|
-
newfs -U /dev/gpt/usr
|
22
|
-
|
23
|
-
# mount the filesystems
|
24
|
-
mount /dev/gpt/root /mnt
|
25
|
-
mkdir /mnt/var && mount /dev/gpt/var /mnt/var
|
26
|
-
mkdir /mnt/tmp && mount /dev/gpt/tmp /mnt/tmp
|
27
|
-
mkdir /mnt/usr && mount /dev/gpt/usr /mnt/usr
|
28
|
-
|
29
|
-
# correct permissions
|
30
|
-
chmod 1777 /mnt/tmp
|
31
|
-
mkdir /mnt/var/tmp && chmod 1777 /mnt/var/tmp
|
32
|
-
cd /mnt && mkdir usr/home && ln -s usr/home home
|
33
|
-
|
34
|
-
# Install the OS
|
35
|
-
cd /usr/freebsd-dist
|
36
|
-
cat base.txz | tar --unlink -xpJf - -C /mnt
|
37
|
-
cat lib32.txz | tar --unlink -xpJf - -C /mnt
|
38
|
-
cat kernel.txz | tar --unlink -xpJf - -C /mnt
|
39
|
-
cat src.txz | tar --unlink -xpJf - -C /mnt
|
40
|
-
|
41
|
-
# Enable required services
|
42
|
-
cat >> /mnt/etc/rc.conf << EOT
|
43
|
-
hostname="${NAME}"
|
44
|
-
ifconfig_em0="dhcp"
|
45
|
-
sshd_enable="YES"
|
46
|
-
EOT
|
47
|
-
|
48
|
-
# Enable swap
|
49
|
-
cat >> /mnt/etc/fstab << EOT
|
50
|
-
/dev/gpt/swap none swap sw 0 0
|
51
|
-
/dev/gpt/root / ufs rw 1 1
|
52
|
-
/dev/gpt/var /var ufs rw 1 1
|
53
|
-
/dev/gpt/tmp /tmp ufs rw 1 1
|
54
|
-
/dev/gpt/usr /usr ufs rw 1 1
|
55
|
-
EOT
|
56
|
-
|
57
|
-
# Install a few requirements
|
58
|
-
touch /mnt/etc/resolv.conf
|
59
|
-
echo 'PermitRootLogin yes' >> /mnt/etc/ssh/sshd_config
|
60
|
-
|
61
|
-
# Set up user accounts
|
62
|
-
mkdir /mnt/usr/home/vagrant && chown 1001:1001 /mnt/home/vagrant
|
63
|
-
echo "vagrant" | pw -V /mnt/etc useradd vagrant -h 0 -s csh -G wheel -d /home/vagrant -c "Vagrant User"
|
64
|
-
echo "vagrant" | pw -V /mnt/etc usermod root -h 0
|
65
|
-
|
66
|
-
reboot
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Veewee::Session.declare({
|
4
|
-
:cpu_count => '1',
|
5
|
-
:memory_size => '512',
|
6
|
-
:disk_size => '8192',
|
7
|
-
:disk_format => 'VDI',
|
8
|
-
:hostiocache => 'off',
|
9
|
-
:os_type_id => 'FreeBSD',
|
10
|
-
:iso_file => 'FreeBSD-10.3-RELEASE-i386-disc1.iso',
|
11
|
-
:iso_src => 'http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.3/FreeBSD-10.3-RELEASE-i386-disc1.iso',
|
12
|
-
:iso_sha256 => '8329ee2ca4779892edbb001c303670d74642e4353e97d02f4521895023cacd5d',
|
13
|
-
:iso_download_timeout => '1000',
|
14
|
-
:boot_wait => '10',
|
15
|
-
:boot_cmd_sequence => [
|
16
|
-
'<Esc>',
|
17
|
-
'boot -s',
|
18
|
-
'<Enter>',
|
19
|
-
'<Wait>' * 10,
|
20
|
-
'/bin/sh<Enter>',
|
21
|
-
'mdmfs -s 100m md1 /tmp<Enter>',
|
22
|
-
'dhclient -l /tmp/dhclient.lease.em0 em0<Enter>',
|
23
|
-
'<Wait>' * 10,
|
24
|
-
'fetch -o /tmp/install.sh http://%IP%:%PORT%/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh %NAME%<Enter>',
|
25
|
-
],
|
26
|
-
:kickstart_port => '7122',
|
27
|
-
:kickstart_timeout => '300',
|
28
|
-
:kickstart_file => 'install.sh',
|
29
|
-
:ssh_login_timeout => '10000',
|
30
|
-
:ssh_user => 'root',
|
31
|
-
:ssh_password => 'vagrant',
|
32
|
-
:ssh_key => '',
|
33
|
-
:ssh_host_port => '7222',
|
34
|
-
:ssh_guest_port => '22',
|
35
|
-
:sudo_cmd => "sh '%f'",
|
36
|
-
:shutdown_cmd => 'shutdown -p now',
|
37
|
-
:postinstall_files => %w[../freebsd-postinstall.sh],
|
38
|
-
:postinstall_timeout => '10000',
|
39
|
-
:skip_iso_transfer => true,
|
40
|
-
})
|
@@ -1,66 +0,0 @@
|
|
1
|
-
#!/bin/sh -x
|
2
|
-
|
3
|
-
# Credit: http://www.aisecure.net/2011/05/01/root-on-zfs-freebsd-current/
|
4
|
-
|
5
|
-
NAME=$1
|
6
|
-
|
7
|
-
# create disks
|
8
|
-
gpart create -s gpt ada0
|
9
|
-
gpart add -t freebsd-boot -l boot -b 40 -s 512K ada0
|
10
|
-
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
|
11
|
-
gpart add -t freebsd-ufs -l root -b 1M -s 2G ada0
|
12
|
-
gpart add -t freebsd-swap -l swap -s 512M ada0
|
13
|
-
gpart add -t freebsd-ufs -l var -s 1G ada0
|
14
|
-
gpart add -t freebsd-ufs -l tmp -s 512M ada0
|
15
|
-
gpart add -t freebsd-ufs -l usr -a 1M ada0
|
16
|
-
|
17
|
-
# create filesystems
|
18
|
-
newfs -U /dev/gpt/root
|
19
|
-
newfs -U /dev/gpt/var
|
20
|
-
newfs -U /dev/gpt/tmp
|
21
|
-
newfs -U /dev/gpt/usr
|
22
|
-
|
23
|
-
# mount the filesystems
|
24
|
-
mount /dev/gpt/root /mnt
|
25
|
-
mkdir /mnt/var && mount /dev/gpt/var /mnt/var
|
26
|
-
mkdir /mnt/tmp && mount /dev/gpt/tmp /mnt/tmp
|
27
|
-
mkdir /mnt/usr && mount /dev/gpt/usr /mnt/usr
|
28
|
-
|
29
|
-
# correct permissions
|
30
|
-
chmod 1777 /mnt/tmp
|
31
|
-
mkdir /mnt/var/tmp && chmod 1777 /mnt/var/tmp
|
32
|
-
cd /mnt && mkdir usr/home && ln -s usr/home home
|
33
|
-
|
34
|
-
# Install the OS
|
35
|
-
cd /usr/freebsd-dist
|
36
|
-
cat base.txz | tar --unlink -xpJf - -C /mnt
|
37
|
-
cat lib32.txz | tar --unlink -xpJf - -C /mnt
|
38
|
-
cat kernel.txz | tar --unlink -xpJf - -C /mnt
|
39
|
-
cat src.txz | tar --unlink -xpJf - -C /mnt
|
40
|
-
|
41
|
-
# Enable required services
|
42
|
-
cat >> /mnt/etc/rc.conf << EOT
|
43
|
-
hostname="${NAME}"
|
44
|
-
ifconfig_em0="dhcp"
|
45
|
-
sshd_enable="YES"
|
46
|
-
EOT
|
47
|
-
|
48
|
-
# Enable swap
|
49
|
-
cat >> /mnt/etc/fstab << EOT
|
50
|
-
/dev/gpt/swap none swap sw 0 0
|
51
|
-
/dev/gpt/root / ufs rw 1 1
|
52
|
-
/dev/gpt/var /var ufs rw 1 1
|
53
|
-
/dev/gpt/tmp /tmp ufs rw 1 1
|
54
|
-
/dev/gpt/usr /usr ufs rw 1 1
|
55
|
-
EOT
|
56
|
-
|
57
|
-
# Install a few requirements
|
58
|
-
touch /mnt/etc/resolv.conf
|
59
|
-
echo 'PermitRootLogin yes' >> /mnt/etc/ssh/sshd_config
|
60
|
-
|
61
|
-
# Set up user accounts
|
62
|
-
mkdir /mnt/usr/home/vagrant && chown 1001:1001 /mnt/home/vagrant
|
63
|
-
echo "vagrant" | pw -V /mnt/etc useradd vagrant -h 0 -s csh -G wheel -d /home/vagrant -c "Vagrant User"
|
64
|
-
echo "vagrant" | pw -V /mnt/etc usermod root -h 0
|
65
|
-
|
66
|
-
reboot
|
@@ -1,38 +0,0 @@
|
|
1
|
-
set -ex
|
2
|
-
|
3
|
-
ntpdate -v -b in.pool.ntp.org
|
4
|
-
date > /etc/vagrant_box_build_time
|
5
|
-
|
6
|
-
ASSUME_ALWAYS_YES=yes pkg info
|
7
|
-
pkg install -y sudo bash-static wget
|
8
|
-
|
9
|
-
# setup the vagrant key
|
10
|
-
mkdir -p /home/vagrant/.ssh
|
11
|
-
chmod 700 /home/vagrant/.ssh
|
12
|
-
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
|
13
|
-
chmod 600 /home/vagrant/.ssh/authorized_keys
|
14
|
-
chown -R vagrant /home/vagrant/.ssh
|
15
|
-
|
16
|
-
# passwordless sudo
|
17
|
-
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /usr/local/etc/sudoers
|
18
|
-
|
19
|
-
# undo customizations
|
20
|
-
sed -i '' -e '/^REFUSE /d' /etc/portsnap.conf
|
21
|
-
sed -i '' -e '/^PermitRootLogin /d' /etc/ssh/sshd_config
|
22
|
-
|
23
|
-
# set vagrant shell to bash
|
24
|
-
pw usermod vagrant -s /usr/local/bin/bash
|
25
|
-
|
26
|
-
# cleanup
|
27
|
-
sudo pkg clean -y
|
28
|
-
rm -rf \
|
29
|
-
/var/db/freebsd-update/* \
|
30
|
-
/var/cache/pkg/* \
|
31
|
-
/etc/ssh/ssh_host_key* \
|
32
|
-
/usr/src \
|
33
|
-
/var/log/* \
|
34
|
-
/var/tmp/* \
|
35
|
-
/tmp/*
|
36
|
-
dd if=/dev/zero of=filler bs=1M || rm filler
|
37
|
-
|
38
|
-
shutdown -p now
|
@@ -1,69 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Veewee::Session.declare({
|
4
|
-
:cpu_count => '1',
|
5
|
-
:memory_size => '512',
|
6
|
-
:disk_size => '8192',
|
7
|
-
:disk_format => 'VDI',
|
8
|
-
:hostiocache => 'off',
|
9
|
-
:os_type_id => 'OpenBSD_64',
|
10
|
-
:iso_file => 'OpenBSD-5.9-amd64.iso',
|
11
|
-
:iso_src => 'https://www.mirrorservice.org/pub/OpenBSD/5.9/amd64/install59.iso',
|
12
|
-
:iso_sha256 => '685262fc665425c61a2952b2820389a2d331ac5558217080e6d564d2ce88eecb',
|
13
|
-
:iso_download_timeout => '1000',
|
14
|
-
:boot_wait => '50',
|
15
|
-
:boot_cmd_sequence => [
|
16
|
-
'I<Enter>', # I - install
|
17
|
-
'us<Enter>', # set the keyboard
|
18
|
-
'OpenBSD59-x64<Enter>', # set the hostname
|
19
|
-
'<Enter>', # Which nic to config ? [em0]
|
20
|
-
'<Enter>', # do you want dhcp ? [dhcp]
|
21
|
-
'<Wait>' * 5,
|
22
|
-
'<Enter>', # IPV6 for em0 ? [none]
|
23
|
-
'<Enter>', # Which other nic do you wish to configure [done]
|
24
|
-
'vagrant<Enter>', # Pw for root account
|
25
|
-
'vagrant<Enter>',
|
26
|
-
'yes<Enter>', # Start sshd by default ? [yes]
|
27
|
-
'no<Enter>', # Do you want the X window system [yes]
|
28
|
-
'vagrant<Enter>', # Setup a user ?
|
29
|
-
'vagrant<Enter>', # Full username
|
30
|
-
'vagrant<Enter>', # Pw for this user
|
31
|
-
'vagrant<Enter>',
|
32
|
-
'yes<Enter>', # Do you want to allow sshd for root ? [no]
|
33
|
-
'GB<Enter>', # What timezone are you in ?
|
34
|
-
'<Enter>', # Available disks [sd0]
|
35
|
-
'W<Enter>', # Use (W)whole disk or (E)edit MBR ? [whole]
|
36
|
-
'A<Enter>', # Use (A)auto layout ... ? [a]
|
37
|
-
'<Wait>' * 5,
|
38
|
-
'<Enter>', # location of the sets [cd0]
|
39
|
-
'<Enter>', # Pathname to sets ? [5.9/amd64]
|
40
|
-
'-game59.tgz<Enter>', # Remove games and X
|
41
|
-
'-xbase59.tgz<Enter>',
|
42
|
-
'-xshare59.tgz<Enter>',
|
43
|
-
'-xfont59.tgz<Enter>',
|
44
|
-
'-xserv59.tgz<Enter>',
|
45
|
-
'done<Enter>',
|
46
|
-
'<Wait>',
|
47
|
-
'yes<Enter>', # CD does not contain SHA256.sig (5.9) Continue without verification?
|
48
|
-
'<Wait>' * 60,
|
49
|
-
'done<Enter>', # Location of sets?
|
50
|
-
'yes<Enter><Wait>', # Time appears wrong. Set to ...? [yes]
|
51
|
-
'<Wait>' * 6,
|
52
|
-
'reboot<Enter>',
|
53
|
-
'<Wait>' * 6,
|
54
|
-
],
|
55
|
-
:kickstart_port => '7122',
|
56
|
-
:kickstart_timeout => '300',
|
57
|
-
:kickstart_file => '',
|
58
|
-
:ssh_login_timeout => '10000',
|
59
|
-
:ssh_user => 'root',
|
60
|
-
:ssh_password => 'vagrant',
|
61
|
-
:ssh_key => '',
|
62
|
-
:ssh_host_port => '7222',
|
63
|
-
:ssh_guest_port => '22',
|
64
|
-
:sudo_cmd => "sh '%f'",
|
65
|
-
:shutdown_cmd => '/sbin/halt -p',
|
66
|
-
:postinstall_files => %w[../openbsd-postinstall.sh],
|
67
|
-
:postinstall_timeout => '10000',
|
68
|
-
:skip_iso_transfer => true,
|
69
|
-
})
|
@@ -1,69 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Veewee::Session.declare({
|
4
|
-
:cpu_count => '1',
|
5
|
-
:memory_size => '512',
|
6
|
-
:disk_size => '8192',
|
7
|
-
:disk_format => 'VDI',
|
8
|
-
:hostiocache => 'off',
|
9
|
-
:os_type_id => 'OpenBSD',
|
10
|
-
:iso_file => 'OpenBSD-5.9-i386.iso',
|
11
|
-
:iso_src => 'https://www.mirrorservice.org/pub/OpenBSD/5.9/i386/install59.iso',
|
12
|
-
:iso_sha256 => 'd5579f49e1100c3131c674260959ee024b80ad579ea8fff767500652c9691030',
|
13
|
-
:iso_download_timeout => '1000',
|
14
|
-
:boot_wait => '50',
|
15
|
-
:boot_cmd_sequence => [
|
16
|
-
'I<Enter>', # I - install
|
17
|
-
'us<Enter>', # set the keyboard
|
18
|
-
'OpenBSD59-x32<Enter>', # set the hostname
|
19
|
-
'<Enter>', # Which nic to config ? [em0]
|
20
|
-
'<Enter>', # do you want dhcp ? [dhcp]
|
21
|
-
'<Wait>' * 5,
|
22
|
-
'<Enter>', # IPV6 for em0 ? [none]
|
23
|
-
'<Enter>', # Which other nic do you wish to configure [done]
|
24
|
-
'vagrant<Enter>', # Pw for root account
|
25
|
-
'vagrant<Enter>',
|
26
|
-
'yes<Enter>', # Start sshd by default ? [yes]
|
27
|
-
'no<Enter>', # Do you want the X window system [yes]
|
28
|
-
'vagrant<Enter>', # Setup a user ?
|
29
|
-
'vagrant<Enter>', # Full username
|
30
|
-
'vagrant<Enter>', # Pw for this user
|
31
|
-
'vagrant<Enter>',
|
32
|
-
'yes<Enter>', # Do you want to allow sshd for root ? [no]
|
33
|
-
'GB<Enter>', # What timezone are you in ?
|
34
|
-
'<Enter>', # Available disks [sd0]
|
35
|
-
'W<Enter>', # Use (W)whole disk or (E)edit MBR ? [whole]
|
36
|
-
'A<Enter>', # Use (A)auto layout ... ? [a]
|
37
|
-
'<Wait>' * 5,
|
38
|
-
'<Enter>', # location of the sets [cd0]
|
39
|
-
'<Enter>', # Pathname to sets ? [5.9/i386]
|
40
|
-
'-game59.tgz<Enter>', # Remove games and X
|
41
|
-
'-xbase59.tgz<Enter>',
|
42
|
-
'-xshare59.tgz<Enter>',
|
43
|
-
'-xfont59.tgz<Enter>',
|
44
|
-
'-xserv59.tgz<Enter>',
|
45
|
-
'done<Enter>',
|
46
|
-
'<Wait>',
|
47
|
-
'yes<Enter>', # CD does not contain SHA256.sig (5.9) Continue without verification?
|
48
|
-
'<Wait>' * 60,
|
49
|
-
'done<Enter>', # Location of sets?
|
50
|
-
'yes<Enter><Wait>', # Time appears wrong. Set to ...? [yes]
|
51
|
-
'<Wait>' * 6,
|
52
|
-
'reboot<Enter>',
|
53
|
-
'<Wait>' * 6,
|
54
|
-
],
|
55
|
-
:kickstart_port => '7122',
|
56
|
-
:kickstart_timeout => '300',
|
57
|
-
:kickstart_file => '',
|
58
|
-
:ssh_login_timeout => '10000',
|
59
|
-
:ssh_user => 'root',
|
60
|
-
:ssh_password => 'vagrant',
|
61
|
-
:ssh_key => '',
|
62
|
-
:ssh_host_port => '7222',
|
63
|
-
:ssh_guest_port => '22',
|
64
|
-
:sudo_cmd => "sh '%f'",
|
65
|
-
:shutdown_cmd => '/sbin/halt -p',
|
66
|
-
:postinstall_files => %w[../openbsd-postinstall.sh],
|
67
|
-
:postinstall_timeout => '10000',
|
68
|
-
:skip_iso_transfer => true,
|
69
|
-
})
|
@@ -1,29 +0,0 @@
|
|
1
|
-
set -ex
|
2
|
-
|
3
|
-
date > /etc/vagrant_box_build_time
|
4
|
-
|
5
|
-
# set pkg path for users
|
6
|
-
export PKG_PATH=http://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/packages/`arch -s`/
|
7
|
-
echo "export PKG_PATH=$PKG_PATH" >> /root/.profile
|
8
|
-
echo "export PKG_PATH=$PKG_PATH" >> /home/vagrant/.profile
|
9
|
-
|
10
|
-
# install bash, wget and sudo
|
11
|
-
pkg_add -z bash wget sudo--
|
12
|
-
|
13
|
-
# set vagrant shell to bash
|
14
|
-
usermod -s /usr/local/bin/bash vagrant
|
15
|
-
|
16
|
-
# sudo
|
17
|
-
echo "# Uncomment to allow people in group wheel to run all commands without a password" >> /etc/sudoers
|
18
|
-
echo "%wheel ALL=(ALL) NOPASSWD: SETENV: ALL" >> /etc/sudoers
|
19
|
-
|
20
|
-
# setup the vagrant key
|
21
|
-
mkdir -p /home/vagrant/.ssh
|
22
|
-
chmod 700 /home/vagrant/.ssh
|
23
|
-
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
|
24
|
-
chmod 600 /home/vagrant/.ssh/authorized_keys
|
25
|
-
chown -R vagrant.vagrant /home/vagrant/.ssh
|
26
|
-
|
27
|
-
perl -pi -e 's/(?<=:maxproc-(?:max|cur)=)\d+(?=:)/1024/' -- /etc/login.conf
|
28
|
-
|
29
|
-
/sbin/halt -p
|