2014-11 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

2014-11-27 Thu

[別の年の同じ日: 2002 2004 2006 2007 2008 2009 2010 2011

Coreutils Viewer (cv) はてぶ

メモ

https://github.com/Xfennec/cv

coreutils に含まれる cp, mv, dd, tar, gzip, gunzip, cat, grep, fgrep, egrep, cut, sort などの
コマンドの進捗を表示してくれるツール。

[ Read More... ]

2014-11-26 Wed

[別の年の同じ日: 2003 2004 2005 2006 2007 2008 2011

ShellCheck はてぶ

メモ

https://github.com/koalaman/shellcheck

便利そうだけど、Haskell なので、Solaris に入れにくい。

Fedora はパッケージがあるので、yum install ShellCheck で入る。

Solaris は @karky7 先生が ghc 関連のパッケージをいい感じにしてくれるの待ち。

via: シェルスクリプトを簡単にチェックできるShellCheck, Vimでも使える - rcmdnk’s blog
     http://rcmdnk.github.io/blog/2014/11/26/computer-bash-zsh/

2014-11-21 Fri

[別の年の同じ日: 2002 2003 2006 2007 2008 2009 2010 2012

jposug の publisher 構築についての覚え書き はてぶ

基本的には publisher をたてて、
Apache で reverse proxy をするだけ。

注意が必要なのは 2 点だけ。

1. publisher 側で pkg/proxy_base を設定する
2. Apache 側で 'AllowEncodedSlashes NoDecode' が必要

1 は以下のような形

sudo svccfg -s svc:/application/pkg/server:nightly_public \
setprop pkg/proxy_base = astring: http://pkg.opensolaris.gr.jp/solaris11/nightly


(仮構築なので、URL は変わる可能性がある)

2 は以下のような形

    AllowEncodedSlashes NoDecode
    ProxyPass        /solaris11/nightly/ http://127.0.0.1:10001/ nocanon
    ProxyPassReverse /solaris11/nightly/ http://127.0.0.1:10001/


'AllowEncodedSlashes NoDecode' がないと、こんな感じで 404 になる。

[Thu Nov 20 12:55:53 2014] [info] [client 211.7.88.204] found %2f (encoded '/') in URI (decoded='/solaris11/jposug-nightly/info/0/pkg://jposug-nightly/database/berkeleydb-48/[email protected],5.11-0.0.175.2.0.0.42.0:20141120T025142Z'), returning 404, referer: http://120.137.170.91/solaris11/jposug-nightly/en/catalog.shtml


ref.
- IPS Knowledge - OpenIndiana - OpenIndiana Wiki
  http://wiki.openindiana.org/oi/IPS+Knowledge

2014-11-17 Mon

[別の年の同じ日: 2004 2005 2006 2007 2008 2010 2011

flymake-puppet が puppet-lint へオプションを渡せるようになっていた はてぶ

ので、さっそく、'--no-80chars-check' をわたすようにして、
flymake-puppet の設定は次のように。

(require 'flymake-puppet)
(setq flymake-puppet-options '("--no-80chars-check"))
(add-hook 'puppet-mode-hook 'flymake-puppet-load)


ssh_authorized_key とか 80 文字でおさまらないものがちょこちょこあるし、
それらがひっかからなくなるのは、ちょっとうれしい。

ref. https://github.com/benprew/flymake-puppet/commit/fc4cd25aeac37ed5722bc586d5350fd06ee3067c

2014-11-14 Fri

[別の年の同じ日: 2001 2003 2004 2005 2006 2007 2008 2009 2012

Lynis が便利そう はてぶ

Lynis - Security auditing tool for Unix/Linux systems
https://cisofy.com/lynis/

セキュリティ面から環境をいろいろとチェックしてくれるので、
Serverspec で構成をチェックしつつ、
Lynis でセキュリティ面をチェックするという使い方も良さそう。

一応、Solaris でも動くけど、
zone だから ntp たってなくても大丈夫とか
細かいところには対応していない。

実行方法

$ wget https://cisofy.com/files/lynis-1.6.4.tar.gz
$ tar xvf lynis-1.6.4.tar.gz
$ cd lynis
$ sudo chown root:root ./include/*
$ sudo ./lynis -c


2014-11-13 Thu

[別の年の同じ日: 2001 2003 2004 2005 2006 2007 2008 2009 2010 2011

MySQL 5.6.19 のビルド on Solaris 11.2 with Solaris Studio 12.4 はてぶ

Solaris Studio を 12.3 から 12.4 へアップデートして([2014-11-13-1])、
いろいろビルドしていたところ、
Solaris 11.2 with Solaris Studio 12.3 では通っていた MySQL 5.6.19 のビルドが
Solaris 11.2 with Solaris Studio 12.4 では通らなくなった。

要ビルド時のログ確認

MySQL 5.6.20, 5.6.21 のビルド on Solaris 11.2 はてぶ

Solaris 11.2 と Solaris Studio 12.3 で MySQL 5.6.20 と 5.6.21 のビルドに失敗する件のメモ。

概要: DTrace 関連で "ld: fatal: symbol referencing errors" が出るので、
'-DENABLE_DTRACE=OFF' にすればビルドは通る。

[ Read More... ]

CBE で Solaris Studio 12.4 を使う はてぶ

Solaris Stuidio 12.4 が release されたので、
CBE で Solaris Studio 12.4 を使うようにしてみた。

[ Read More... ]

Referrer (Inside):
[2014-11-13-3] MySQL 5.6.19 のビルド on Solaris 11.2 with Solaris Studio 12.4

2014-11-04 Tue

[別の年の同じ日: 2002 2003 2004 2005 2006 2007 2008 2010

Ansible 本の preview はてぶ


- PDF
- MOBI
- ePUB

のフォーマットで 3 章まで読めるようです。

2014-11-03 Mon

[別の年の同じ日: 2003 2004 2005 2006 2007 2008 2010

8 Tips To Solve Linux and Unix Disk Full & Can’t Write/Failure Problems はてぶ

こういうことが起こらないように運用するべきだけど、
万が一、起こってしまった場合に備えてメモ。

8 Tips To Solve Linux and Unix Disk Full & Can’t Write/Failure Problems
http://www.cyberciti.biz/datacenter/linux-unix-bsd-osx-cannot-write-to-hard-disk/

2014-11-01 Sat

[別の年の同じ日: 2002 2004 2005 2006 2007 2008 2009 2010

Serverspec で Encoding::CompatibilityError はてぶ

覚え書き

環境
- OS: Solaris 11.2
- Ruby: 2.1.3
- Serverspec: 2.3.1
- Specinfra: 2.4.1

問題

以下のような match 部分

describe file('hoge.txt') do
  its(:content){ should match(/日本語/) }
end



     Encoding::CompatibilityError:
       incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)


が出る。

回避方法

lib/serverspec/type/file.rb で以下のように @content ではなく @content.force_encoding('UTF-8') を返す。

    def content
      if @content.nil?
        @content = @runner.get_file_content(@name).stdout
      end
      @content.force_encoding('UTF-8')
    end


これだと乱暴なので、
以下のように書けるようにする方向で考えた方がよさげ。

describe file('hoge.txt') do
  its(:content){ should match(/日本語/).with_encoding('UTF-8') }
end