08 2月

xfsのファイルシステムの情報を確認するコマンド

xfs_info /dev/sda2
meta-data=/dev/sda2              isize=256    agcount=4, agsize=439744 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=1758976, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
03 2月

CentOS6.7でMumble1.2.13のパッケージをビルドする

有志が公開しているSRPMをダウンロード

wget https://www.dropbox.com/s/nc0odvada3u6hc4/mumble-server-1.2.4-1.el6.src.rpm

SRPMを展開

rpm -ivh mumble-server-1.2.4-1.el6.src.rpm

SPECFILEを更新

cd ~/rpmbuild/SPECS/
cp -p mumble-server.spec mumble-server.spec.org
vi mumble-server.spec
diff -u mumble-server.spec.org mumble-server.spec

--- mumble-server.spec.org      2013-06-23 03:08:34.000000000 +0900
+++ mumble-server.spec  2016-02-03 12:27:10.881006160 +0900
@@ -1,5 +1,5 @@
 Name:          mumble-server
-Version:       1.2.4
+Version:       1.2.13
 Release:       1%{?dist}
 Summary:       Mumble voice chat server

patchファイルの変更

cd ~/rpmbuild/SOURCES/

cp -p mumble-server-1.2.4-logrotate.patch mumble-server-1.2.13-logrotate.patch
cp -p mumble-server-1.2.4-slice2cpp.patch mumble-server-1.2.13-slice2cpp.patch

vi mumble-server-1.2.13-slice2cpp.patch
diff mumble-server-1.2.4-slice2cpp.patch mumble-server-1.2.13-slice2cpp.patch

9c9
< +             slice.commands = slice2cpp --checksum -I/usr/local/share/Ice -I/usr/share/Ice/slice -I/usr/share/slice -I/usr/share/Ice-3.4.1/slice/ -I/usr/share/Ice-3.3.1/slice/ -I/usr/share/Ice-3.5.0/slice/ ${QMAKE_FILE_NAME}
---
> +             slice.commands = slice2cpp --checksum -I/usr/local/share/Ice -I/usr/share/Ice/slice -I/usr/share/slice -I/usr/share/Ice-3.4.1/slice/ -I/usr/share/Ice-3.3.1/slice/ -I/usr/share/Ice-3.5.1/slice/ ${QMAKE_FILE_NAME}

Githubからソースをダウンロード

cd ~
wget https://github.com/mumble-voip/mumble/archive/1.2.13.tar.gz

コンパイル用にtar玉の中身を変更

tar zxvf 1.2.13.tar.gz
cd mumble-1.2.13/scripts

cp -p murmur.ini murmur.ini.system

vi murmur.ini.system
diff -u murmur.ini murmur.ini.system

--- murmur.ini  2016-01-10 21:26:50.000000000 +0900
+++ murmur.ini.system   2016-02-03 15:09:12.619005168 +0900
@@ -13,7 +13,7 @@

 # Path to database. If blank, will search for
 # murmur.sqlite in default locations or create it if not found.
-database=
+database=/var/lib/mumble-server/mumble-server.sqlite

 # If you wish to use something other than SQLite, you'll need to set the name
 # of the database above, and also uncomment the below.
@@ -31,7 +31,7 @@
 # Murmur defaults to not using D-Bus. If you wish to use dbus, which is one of the
 # RPC methods available in Murmur, please specify so here.
 #
-dbus=session
+dbus=system

 # Alternate D-Bus service name. Only use if you are running distinct
 # murmurd processes connected to the same D-Bus daemon.
@@ -42,7 +42,7 @@
 # with ICE, you should only use it if you trust all the users who have
 # shell access to your machine.
 # Please see the ICE documentation on how to specify endpoints.
-#ice="tcp -h 127.0.0.1 -p 6502"
+ice="tcp -h 127.0.0.1 -p 6502"

 # Ice primarily uses local sockets. This means anyone who has a
 # user account on your machine can connect to the Ice services.
@@ -72,13 +72,13 @@
 # logs to the file 'murmur.log'. If you leave this field blank
 # on Unix-like systems, Murmur will force itself into foreground
 # mode which logs to the console.
-#logfile=murmur.log
+logfile=/var/log/mumble-server/mumble-server.log

 # If set, Murmur will write its process ID to this file
 # when running in daemon mode (when the -fg flag is not
 # specified on the command line). Only available on
 # Unix-like systems.
-#pidfile=
+pidfile=/var/run/mumble-server/mumble-server.pid

 # The below will be used as defaults for new configured servers.
 # If you're just running one server (the default), it's easier to
@@ -180,7 +180,7 @@

 # If Murmur is started as root, which user should it switch to?
 # This option is ignored if Murmur isn't started with root privileges.
-#uname=
+uname=mumble-server

 # If this options is enabled, only clients which have a certificate are allowed
 # to connect.

tar玉の作成

cd ~
tar czf mumble-1.2.13.tar.gz mumble-1.2.13

tar玉を移動

cp -p mumble-1.2.13.tar.gz ~/rpmbuild/SOURCES

コンパイルに必要なパッケージをインストール

sudo wget --directory-prefix=/etc/yum.repos.d/ http://zeroc.com/download/Ice/3.5/el6/zeroc-ice-el6.repo

sudo yum install -y gcc-c++ qt-devel qt-sqlite openssl-devel boost-devel avahi-compat-libdns_sd-devel libdaemon-devel libcap-devel protobuf-compiler protobuf-devel ice-c++-devel rpm-build

パッケージをビルド

rpmbuild -ba --clean ~/rpmbuild/SPECS/mumble-server.spec

ビルドしたパッケージのインストール

cd ~/rpmbuild/RPMS/

sudo sed -i 's/enable=1/enable=0/g' /etc/yum.repos.d/zeroc-ice-el6.repo

yum install -y mumble-server-1.2.13-1.el6.x86_64.rpm

※依存パッケージがかなりの量インストールされる。