背景
我が家では、数年前から自宅サーバ(とはいっても自作PC筐体でLinuxを入れているだけですが…)を運用しており、その主要サービスに録画サービスがあります。
録画サービスでは、EPGStationとMirakurunを用いたいわゆるTS抜きをしており、VM上のUbuntu ServerにEPGStation・Mirakurunをインストールし、チューナーとB-CASカードリーダーをVMにパススルーすることで実現しています。
しかし、サーバー環境にコンテナベース・IaCを取り入れるにあたり、録画環境も同様に構築する必要が生じたため、従来のVMでの手動構築から一新することにします。
そこで本記事ではその一環として、コンテナ上で動作するMirakurunをAnsibleで自動構築するようにします。
環境
今回は、以下のような環境を想定します。
物理Ubuntuマシン上にMirakurunのpodmanコンテナ(dockerでも良かったですが気分です。おまけにdocker版を記載しています)を構築しています。 EPGStationの部分は、別途構築するkubernetesクラスタの上で動作させるため、この記事のスコープ外となっています。
使用している機材・ソフトウェアは、以下のとおりです。
- 物理マシン
- CPU:Intel Core i7-8700K
- メモリ:16GB
- OS:Ubuntu 22.04.3 LTS
- チューナー:PLEX PX-S1UD V2.0
- B-CASカードリーダー:SCR3310/v2.0
チューナーとB-CASカードリーダーはそれぞれこんな感じの見た目です。
Ansibleプレイブック
Ansibleプレイブックは、以下のようにPodmanのロールとMirakurunのロールにモジュール化した上でそれをインポートして使います。
---
- name: Install Mirakurun
hosts: {ホスト名}
tasks:
- ansible.builtin.import_role: name=podman
- ansible.builtin.import_role: name=mirakurun
Podmanロール
Podmanロールは、以下のようなシンプルなものとなっています。
roles/podman
└── tasks
└── main.yml
公式ドキュメントのインストール手順は非常に簡単なので、それを再現する形でタスクを定義します。
# main.yml
- name: Install Podman
become: true
ansible.builtin.apt:
name: podman
update_cache: true
本当はバージョン指定をしたほうがいいのでしょうが、面倒なのでこれで済ませます。
Mirakurunロール
Podmanと比べるとMirakurunロールは複雑ですが、分解してみると
- filesディレクトリ:Mirakurun自体の設定ファイル
- handlersディレクトリ:ドライバをインストールした後の再起動処理(後述)
- tasksディレクトリ:タスク定義
となっています。
roles/mirakurun
├── files
│ ├── config
│ │ ├── channels.yml
│ │ ├── server.yml
│ │ └── tuners.yml
│ └── startup
├── handlers
│ └── main.yml
└── tasks
└── main.yml
タスク定義
タスク定義は少し長いので、部分毎に見ていきます。
tasks/main.yml全体
# tasks/main.yml
- name: Install required package
become: true
ansible.builtin.apt:
name: unzip
- name: Install tuner driver
block:
- name: Create temporary directory
ansible.builtin.tempfile:
state: directory
suffix: tuner-driver
register: driver_directory
changed_when: false
- name: Download and unarchive tuner driver
ansible.builtin.unarchive:
src: http://plex-net.co.jp/plex/px-s1ud/PX-S1UD_driver_Ver.1.0.1.zip
remote_src: true
dest: "{{ driver_directory.path }}"
register: unarchived_driver
changed_when: false
- name: Install tuner driver
become: true
ansible.builtin.copy:
src: "{{ unarchived_driver.dest }}/PX-S1UD_driver_Ver.1.0.1/x64/amd64/isdbt_rio.inp"
remote_src: true
dest: /lib/firmware
notify: Reboot
- name: Locate Mirakurun related files
block:
- name: create dedicated directory
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/mirakurun"
state: directory
register: mirakurun_directory
changed_when: false
- name: Copy files
block:
- ansible.builtin.copy:
src: ../files/startup
dest: "{{ mirakurun_directory.path }}/startup"
mode: '755'
- ansible.builtin.copy:
src: ../files/config
dest: "{{ mirakurun_directory.path }}"
- name: Run container
become: true
containers.podman.podman_container:
name: mirakurun
image: docker.io/chinachu/mirakurun:3.9.0-rc.4
restart_policy: always
cap_add:
- SYS_ADMIN
- SYS_NICE
device:
- /dev/bus
- /dev/dvb
publish:
- 40772:40772
volume:
- "{{ mirakurun_directory.path }}/startup:/opt/bin/startup:ro"
- "{{ mirakurun_directory.path }}/config:/app-config"
まず、ダウンロードしてきたチューナードライバを解凍するためにunzipを入れます。
- name: Install required package
become: true
ansible.builtin.apt:
name: unzip
次にチューナードライバをインストールします。 使用するチューナーの機材によって入れるべきドライバやその手順は異なるので、他の機材を使う場合には適宜変更するようにしてください。
インストールされなかった場合にchangedがなくなるようなべき等なタスクとするために、一部changed_when
を手動で設定しています。
また、notify
によってインストールした後に自動的に再起動するようにしています(後述)。
- name: Install tuner driver
block:
# 作業ディレクトリを作成
- name: Create temporary directory
ansible.builtin.tempfile:
state: directory
suffix: tuner-driver
register: driver_directory
changed_when: false
# PLEXの公式サイトからチューナードライバをダウンロードして解凍する
- name: Download and unarchive tuner driver
ansible.builtin.unarchive:
src: http://plex-net.co.jp/plex/px-s1ud/PX-S1UD_driver_Ver.1.0.1.zip
remote_src: true
dest: "{{ driver_directory.path }}"
register: unarchived_driver
changed_when: false
# チューナードライバをインストールした後再起動する
- name: Install tuner driver
become: true
ansible.builtin.copy:
src: "{{ unarchived_driver.dest }}/PX-S1UD_driver_Ver.1.0.1/x64/amd64/isdbt_rio.inp"
remote_src: true
dest: /lib/firmware
notify: Reboot
そして、コンテナにマウントするためのMirakurunの設定ファイルを配置します。 ファイルの中身自体は後述します。
- name: Locate Mirakurun related files
block:
- name: create dedicated directory
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/mirakurun"
state: directory
register: mirakurun_directory
changed_when: false
- name: Copy files
block:
- ansible.builtin.copy:
src: ../files/startup
dest: "{{ mirakurun_directory.path }}/startup"
mode: '755'
- ansible.builtin.copy:
src: ../files/config
dest: "{{ mirakurun_directory.path }}"
最後に、podmanモジュールを用いてコンテナを起動します。 コンテナの起動オプションは、docker-mirakurun-epgstation/docker-compose-sample.ymlを参考に設定しています。
- name: Run container
become: true
containers.podman.podman_container:
name: mirakurun
image: docker.io/chinachu/mirakurun:3.9.0-rc.4
restart_policy: always
cap_add:
- SYS_ADMIN
- SYS_NICE
device:
- /dev/bus
- /dev/dvb
publish:
- 40772:40772
volume:
- "{{ mirakurun_directory.path }}/startup:/opt/bin/startup:ro"
- "{{ mirakurun_directory.path }}/config:/app-config"
Handlers
Handlersでは、チューナドライバをインストールした際に再起動をかけるようにしています。
# handlers/main.yml
- name: Reboot
ansible.builtin.reboot:
become: true
Mirakurun設定ファイル
startupには、Mirakurunコンテナの起動時に実行したいスクリプトを配置します(cf. 公式ドキュメント)。
このスクリプトでは、以下の2つのライブラリ・コマンドをインストールしています。
#!/bin/bash
if !(type "b25" > /dev/null 2>&1); then
apt update
apt install -y build-essential pkg-config git cmake libpcsclite-dev
cd /tmp
git clone https://github.com/stz2012/libarib25.git
cd libarib25
cmake .
make
make install
fi
if !(type "recdvb" > /dev/null 2>&1); then
apt update
apt install -y git autoconf
cd /tmp
git clone https://github.com/dogeel/recdvb.git
cd recdvb
./autogen.sh
./configure --enable-b25
make
make install
fi
config以下にはMirakurunの設定ファイルを配置しています。 公式ドキュメントに沿って設定していくだけなので基本的にコメントはありません。
# files/config/channels.yml
- name: TOKYO MX
type: GR
channel: '16'
- name: フジテレビ
type: GR
channel: '21'
- name: TBS
type: GR
channel: '22'
- name: テレビ東京
type: GR
channel: '23'
- name: テレビ朝日
type: GR
channel: '24'
- name: 日テレ
type: GR
channel: '25'
- name: NHKEテレ
type: GR
channel: '26'
- name: NHK総合
type: GR
channel: '27'
- name: チバテレ
type: GR
channel: '30'
# files/config/server.yml
logLevel: 2
path: /var/run/mirakurun.sock
port: 40772
# files/config/tuners.yml
- name: PX-S1UD-0
types:
- GR
command: recdvb --b25 <channel> - -
isDisabled: false
実際の挙動
上のプレイブックを適用すると、初回はこのように各種インストールが走った後、自動的に再起動されます。
PLAY [Install Mirakurun] *****************************************************************************************
TASK [Gathering Facts] *******************************************************************************************
ok: [172.16.1.9]
TASK [podman : Install Podman] ***********************************************************************************
changed: [172.16.1.9]
TASK [mirakurun : Install required package] **********************************************************************
changed: [172.16.1.9]
TASK [mirakurun : Create temporary directory] ********************************************************************
ok: [172.16.1.9]
TASK [mirakurun : Download and unarchive tuner driver] ***********************************************************
ok: [172.16.1.9]
TASK [mirakurun : Install tuner driver] **************************************************************************
changed: [172.16.1.9]
TASK [mirakurun : create dedicated directory] ********************************************************************
ok: [172.16.1.9]
TASK [mirakurun : ansible.builtin.copy] **************************************************************************
changed: [172.16.1.9]
TASK [mirakurun : ansible.builtin.copy] **************************************************************************
changed: [172.16.1.9]
TASK [mirakurun : Run container] *********************************************************************************
changed: [172.16.1.9]
RUNNING HANDLER [mirakurun : Reboot] *****************************************************************************
changed: [172.16.1.9]
PLAY RECAP *******************************************************************************************************
172.16.1.9 : ok=11 changed=7 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
2回目以降は全部okとなり、べき等なプレイブックとなっています。
PLAY [Install Mirakurun] *****************************************************************************************
TASK [Gathering Facts] *******************************************************************************************
ok: [172.16.1.9]
TASK [podman : Install Podman] ***********************************************************************************
ok: [172.16.1.9]
TASK [mirakurun : Install required package] **********************************************************************
ok: [172.16.1.9]
TASK [mirakurun : Create temporary directory] ********************************************************************
ok: [172.16.1.9]
TASK [mirakurun : Download and unarchive tuner driver] ***********************************************************
ok: [172.16.1.9]
TASK [mirakurun : Install tuner driver] **************************************************************************
ok: [172.16.1.9]
TASK [mirakurun : create dedicated directory] ********************************************************************
ok: [172.16.1.9]
TASK [mirakurun : ansible.builtin.copy] **************************************************************************
ok: [172.16.1.9]
TASK [mirakurun : ansible.builtin.copy] **************************************************************************
ok: [172.16.1.9]
TASK [mirakurun : Run container] *********************************************************************************
ok: [172.16.1.9]
PLAY RECAP *******************************************************************************************************
172.16.1.9 : ok=10 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
コンテナのログ
executing /opt/bin/startup...
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7909 kB]
Get:5 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [589 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [8788 B]
Fetched 8720 kB in 2s (5376 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
33 packages can be upgraded. Run 'apt list --upgradable' to see them.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
libpcsclite-dev is already the newest version (1.8.24-1).
pkg-config is already the newest version (0.29-6).
The following additional packages will be installed:
bzip2 cmake-data dirmngr dpkg-dev fakeroot git-man gnupg gnupg-l10n
gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm less
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libarchive13 libassuan0 libcurl3-gnutls libcurl4 libedit2 liberror-perl
libfakeroot libgpm2 libjsoncpp1 libksba8 libldap-2.4-2 libldap-common
libncurses6 libncursesw6 libnghttp2-14 libnpth0 libpcre2-8-0 libprocps7
libreadline7 librhash0 librtmp1 libsasl2-2 libsasl2-modules
libsasl2-modules-db libssh2-1 libtinfo6 libuv1 libxmuu1 openssh-client patch
pinentry-curses procps psmisc readline-common xauth xz-utils
Suggested packages:
bzip2-doc cmake-doc ninja-build pinentry-gnome3 tor debian-keyring
gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email
git-gui gitk gitweb git-cvs git-mediawiki git-svn parcimonie xloadimage
scdaemon lrzip gpm libsasl2-modules-gssapi-mit
| libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp
libsasl2-modules-sql keychain libpam-ssh monkeysphere ssh-askpass ed
diffutils-doc pinentry-doc readline-doc
The following NEW packages will be installed:
build-essential bzip2 cmake cmake-data dirmngr dpkg-dev fakeroot git git-man
gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server
gpgconf gpgsm less libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libarchive13 libassuan0 libcurl3-gnutls libcurl4
libedit2 liberror-perl libfakeroot libgpm2 libjsoncpp1 libksba8
libldap-2.4-2 libldap-common libncurses6 libnghttp2-14 libnpth0 libpcre2-8-0
libprocps7 libreadline7 librhash0 librtmp1 libsasl2-2 libsasl2-modules
libsasl2-modules-db libssh2-1 libuv1 libxmuu1 openssh-client patch
pinentry-curses procps psmisc readline-common xauth xz-utils
The following packages will be upgraded:
libncursesw6 libtinfo6
2 upgraded, 56 newly installed, 0 to remove and 31 not upgraded.
Need to get 26.4 MB of archives.
After this operation, 94.2 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian-security buster/updates/main amd64 libtinfo6 amd64 6.1+20181013-2+deb10u5 [326 kB]
Get:2 http://deb.debian.org/debian-security buster/updates/main amd64 libncursesw6 amd64 6.1+20181013-2+deb10u5 [131 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 less amd64 487-0.1+b1 [129 kB]
Get:4 http://deb.debian.org/debian-security buster/updates/main amd64 libncurses6 amd64 6.1+20181013-2+deb10u5 [102 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 libprocps7 amd64 2:3.3.15-2 [61.7 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 procps amd64 2:3.3.15-2 [259 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 readline-common all 7.0-5 [70.6 kB]
Get:8 http://deb.debian.org/debian-security buster/updates/main amd64 bzip2 amd64 1.0.6-9.2~deb10u2 [48.5 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 libedit2 amd64 3.1-20181209-1 [94.0 kB]
Get:10 http://deb.debian.org/debian-security buster/updates/main amd64 openssh-client amd64 1:7.9p1-10+deb10u4 [785 kB]
Get:11 http://deb.debian.org/debian buster/main amd64 xz-utils amd64 5.2.4-1+deb10u1 [183 kB]
Get:12 http://deb.debian.org/debian buster/main amd64 patch amd64 2.7.6-3+deb10u1 [126 kB]
Get:13 http://deb.debian.org/debian buster/main amd64 dpkg-dev all 1.19.8 [1776 kB]
Get:14 http://deb.debian.org/debian buster/main amd64 build-essential amd64 12.6 [7576 B]
Get:15 http://deb.debian.org/debian buster/main amd64 cmake-data all 3.13.4-1 [1476 kB]
Get:16 http://deb.debian.org/debian-security buster/updates/main amd64 libarchive13 amd64 3.3.3-4+deb10u3 [314 kB]
Get:17 http://deb.debian.org/debian buster/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg-1+deb10u2 [69.2 kB]
Get:18 http://deb.debian.org/debian buster/main amd64 libsasl2-2 amd64 2.1.27+dfsg-1+deb10u2 [106 kB]
Get:19 http://deb.debian.org/debian buster/main amd64 libldap-common all 2.4.47+dfsg-3+deb10u7 [90.1 kB]
Get:20 http://deb.debian.org/debian buster/main amd64 libldap-2.4-2 amd64 2.4.47+dfsg-3+deb10u7 [224 kB]
Get:21 http://deb.debian.org/debian-security buster/updates/main amd64 libnghttp2-14 amd64 1.36.0-2+deb10u2 [85.8 kB]
Get:22 http://deb.debian.org/debian buster/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2 [60.5 kB]
Get:23 http://deb.debian.org/debian-security buster/updates/main amd64 libssh2-1 amd64 1.8.0-2.1+deb10u1 [141 kB]
Get:24 http://deb.debian.org/debian-security buster/updates/main amd64 libcurl4 amd64 7.64.0-4+deb10u9 [336 kB]
Get:25 http://deb.debian.org/debian buster/main amd64 libjsoncpp1 amd64 1.7.4-3 [75.6 kB]
Get:26 http://deb.debian.org/debian buster/main amd64 librhash0 amd64 1.3.8-1 [122 kB]
Get:27 http://deb.debian.org/debian-security buster/updates/main amd64 libuv1 amd64 1.24.1-1+deb10u2 [110 kB]
Get:28 http://deb.debian.org/debian buster/main amd64 cmake amd64 3.13.4-1 [3480 kB]
Get:29 http://deb.debian.org/debian buster/main amd64 libassuan0 amd64 2.5.2-1 [49.4 kB]
Get:30 http://deb.debian.org/debian buster/main amd64 libreadline7 amd64 7.0-5 [151 kB]
Get:31 http://deb.debian.org/debian buster/main amd64 gpgconf amd64 2.2.12-1+deb10u2 [510 kB]
Get:32 http://deb.debian.org/debian-security buster/updates/main amd64 libksba8 amd64 1.3.5-2+deb10u2 [102 kB]
Get:33 http://deb.debian.org/debian buster/main amd64 libnpth0 amd64 1.6-1 [18.4 kB]
Get:34 http://deb.debian.org/debian buster/main amd64 dirmngr amd64 2.2.12-1+deb10u2 [712 kB]
Get:35 http://deb.debian.org/debian buster/main amd64 libfakeroot amd64 1.23-1 [45.9 kB]
Get:36 http://deb.debian.org/debian buster/main amd64 fakeroot amd64 1.23-1 [85.8 kB]
Get:37 http://deb.debian.org/debian-security buster/updates/main amd64 libcurl3-gnutls amd64 7.64.0-4+deb10u9 [333 kB]
Get:38 http://deb.debian.org/debian-security buster/updates/main amd64 libpcre2-8-0 amd64 10.32-5+deb10u1 [213 kB]
Get:39 http://deb.debian.org/debian buster/main amd64 liberror-perl all 0.17027-2 [30.9 kB]
Get:40 http://deb.debian.org/debian-security buster/updates/main amd64 git-man all 1:2.20.1-2+deb10u8 [1623 kB]
Get:41 http://deb.debian.org/debian-security buster/updates/main amd64 git amd64 1:2.20.1-2+deb10u8 [5631 kB]
Get:42 http://deb.debian.org/debian buster/main amd64 gnupg-l10n all 2.2.12-1+deb10u2 [1009 kB]
Get:43 http://deb.debian.org/debian buster/main amd64 gnupg-utils amd64 2.2.12-1+deb10u2 [861 kB]
Get:44 http://deb.debian.org/debian buster/main amd64 gpg amd64 2.2.12-1+deb10u2 [865 kB]
Get:45 http://deb.debian.org/debian buster/main amd64 pinentry-curses amd64 1.1.0-2 [64.5 kB]
Get:46 http://deb.debian.org/debian buster/main amd64 gpg-agent amd64 2.2.12-1+deb10u2 [617 kB]
Get:47 http://deb.debian.org/debian buster/main amd64 gpg-wks-client amd64 2.2.12-1+deb10u2 [485 kB]
Get:48 http://deb.debian.org/debian buster/main amd64 gpg-wks-server amd64 2.2.12-1+deb10u2 [478 kB]
Get:49 http://deb.debian.org/debian buster/main amd64 gpgsm amd64 2.2.12-1+deb10u2 [604 kB]
Get:50 http://deb.debian.org/debian buster/main amd64 gnupg all 2.2.12-1+deb10u2 [715 kB]
Get:51 http://deb.debian.org/debian buster/main amd64 libalgorithm-diff-perl all 1.19.03-2 [47.9 kB]
Get:52 http://deb.debian.org/debian buster/main amd64 libalgorithm-diff-xs-perl amd64 0.04-5+b1 [11.8 kB]
Get:53 http://deb.debian.org/debian buster/main amd64 libalgorithm-merge-perl all 0.08-3 [12.7 kB]
Get:54 http://deb.debian.org/debian buster/main amd64 libgpm2 amd64 1.20.7-5 [35.1 kB]
Get:55 http://deb.debian.org/debian buster/main amd64 libsasl2-modules amd64 2.1.27+dfsg-1+deb10u2 [104 kB]
Get:56 http://deb.debian.org/debian buster/main amd64 libxmuu1 amd64 2:1.1.2-2+b3 [23.9 kB]
Get:57 http://deb.debian.org/debian buster/main amd64 psmisc amd64 23.2-1+deb10u1 [126 kB]
Get:58 http://deb.debian.org/debian buster/main amd64 xauth amd64 1:1.0.10-1 [40.3 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 26.4 MB in 1s (33.0 MB/s)
(Reading database ... 21759 files and directories currently installed.)
Preparing to unpack .../libtinfo6_6.1+20181013-2+deb10u5_amd64.deb ...
Unpacking libtinfo6:amd64 (6.1+20181013-2+deb10u5) over (6.1+20181013-2+deb10u3) ...
Setting up libtinfo6:amd64 (6.1+20181013-2+deb10u5) ...
(Reading database ... 21759 files and directories currently installed.)
Preparing to unpack .../libncursesw6_6.1+20181013-2+deb10u5_amd64.deb ...
Unpacking libncursesw6:amd64 (6.1+20181013-2+deb10u5) over (6.1+20181013-2+deb10u3) ...
Setting up libncursesw6:amd64 (6.1+20181013-2+deb10u5) ...
Selecting previously unselected package less.
(Reading database ... 21759 files and directories currently installed.)
Preparing to unpack .../00-less_487-0.1+b1_amd64.deb ...
Unpacking less (487-0.1+b1) ...
Selecting previously unselected package libncurses6:amd64.
Preparing to unpack .../01-libncurses6_6.1+20181013-2+deb10u5_amd64.deb ...
Unpacking libncurses6:amd64 (6.1+20181013-2+deb10u5) ...
Selecting previously unselected package libprocps7:amd64.
Preparing to unpack .../02-libprocps7_2%3a3.3.15-2_amd64.deb ...
Unpacking libprocps7:amd64 (2:3.3.15-2) ...
Selecting previously unselected package procps.
Preparing to unpack .../03-procps_2%3a3.3.15-2_amd64.deb ...
Unpacking procps (2:3.3.15-2) ...
Selecting previously unselected package readline-common.
Preparing to unpack .../04-readline-common_7.0-5_all.deb ...
Unpacking readline-common (7.0-5) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../05-bzip2_1.0.6-9.2~deb10u2_amd64.deb ...
Unpacking bzip2 (1.0.6-9.2~deb10u2) ...
Selecting previously unselected package libedit2:amd64.
Preparing to unpack .../06-libedit2_3.1-20181209-1_amd64.deb ...
Unpacking libedit2:amd64 (3.1-20181209-1) ...
Selecting previously unselected package openssh-client.
Preparing to unpack .../07-openssh-client_1%3a7.9p1-10+deb10u4_amd64.deb ...
Unpacking openssh-client (1:7.9p1-10+deb10u4) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../08-xz-utils_5.2.4-1+deb10u1_amd64.deb ...
Unpacking xz-utils (5.2.4-1+deb10u1) ...
Selecting previously unselected package patch.
Preparing to unpack .../09-patch_2.7.6-3+deb10u1_amd64.deb ...
Unpacking patch (2.7.6-3+deb10u1) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../10-dpkg-dev_1.19.8_all.deb ...
Unpacking dpkg-dev (1.19.8) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../11-build-essential_12.6_amd64.deb ...
Unpacking build-essential (12.6) ...
Selecting previously unselected package cmake-data.
Preparing to unpack .../12-cmake-data_3.13.4-1_all.deb ...
Unpacking cmake-data (3.13.4-1) ...
Selecting previously unselected package libarchive13:amd64.
Preparing to unpack .../13-libarchive13_3.3.3-4+deb10u3_amd64.deb ...
Unpacking libarchive13:amd64 (3.3.3-4+deb10u3) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../14-libsasl2-modules-db_2.1.27+dfsg-1+deb10u2_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg-1+deb10u2) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../15-libsasl2-2_2.1.27+dfsg-1+deb10u2_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27+dfsg-1+deb10u2) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../16-libldap-common_2.4.47+dfsg-3+deb10u7_all.deb ...
Unpacking libldap-common (2.4.47+dfsg-3+deb10u7) ...
Selecting previously unselected package libldap-2.4-2:amd64.
Preparing to unpack .../17-libldap-2.4-2_2.4.47+dfsg-3+deb10u7_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.47+dfsg-3+deb10u7) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../18-libnghttp2-14_1.36.0-2+deb10u2_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.36.0-2+deb10u2) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../19-librtmp1_2.4+20151223.gitfa8646d.1-2_amd64.deb ...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ...
Selecting previously unselected package libssh2-1:amd64.
Preparing to unpack .../20-libssh2-1_1.8.0-2.1+deb10u1_amd64.deb ...
Unpacking libssh2-1:amd64 (1.8.0-2.1+deb10u1) ...
Selecting previously unselected package libcurl4:amd64.
Preparing to unpack .../21-libcurl4_7.64.0-4+deb10u9_amd64.deb ...
Unpacking libcurl4:amd64 (7.64.0-4+deb10u9) ...
Selecting previously unselected package libjsoncpp1:amd64.
Preparing to unpack .../22-libjsoncpp1_1.7.4-3_amd64.deb ...
Unpacking libjsoncpp1:amd64 (1.7.4-3) ...
Selecting previously unselected package librhash0:amd64.
Preparing to unpack .../23-librhash0_1.3.8-1_amd64.deb ...
Unpacking librhash0:amd64 (1.3.8-1) ...
Selecting previously unselected package libuv1:amd64.
Preparing to unpack .../24-libuv1_1.24.1-1+deb10u2_amd64.deb ...
Unpacking libuv1:amd64 (1.24.1-1+deb10u2) ...
Selecting previously unselected package cmake.
Preparing to unpack .../25-cmake_3.13.4-1_amd64.deb ...
Unpacking cmake (3.13.4-1) ...
Selecting previously unselected package libassuan0:amd64.
Preparing to unpack .../26-libassuan0_2.5.2-1_amd64.deb ...
Unpacking libassuan0:amd64 (2.5.2-1) ...
Selecting previously unselected package libreadline7:amd64.
Preparing to unpack .../27-libreadline7_7.0-5_amd64.deb ...
Unpacking libreadline7:amd64 (7.0-5) ...
Selecting previously unselected package gpgconf.
Preparing to unpack .../28-gpgconf_2.2.12-1+deb10u2_amd64.deb ...
Unpacking gpgconf (2.2.12-1+deb10u2) ...
Selecting previously unselected package libksba8:amd64.
Preparing to unpack .../29-libksba8_1.3.5-2+deb10u2_amd64.deb ...
Unpacking libksba8:amd64 (1.3.5-2+deb10u2) ...
Selecting previously unselected package libnpth0:amd64.
Preparing to unpack .../30-libnpth0_1.6-1_amd64.deb ...
Unpacking libnpth0:amd64 (1.6-1) ...
Selecting previously unselected package dirmngr.
Preparing to unpack .../31-dirmngr_2.2.12-1+deb10u2_amd64.deb ...
Unpacking dirmngr (2.2.12-1+deb10u2) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../32-libfakeroot_1.23-1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.23-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../33-fakeroot_1.23-1_amd64.deb ...
Unpacking fakeroot (1.23-1) ...
Selecting previously unselected package libcurl3-gnutls:amd64.
Preparing to unpack .../34-libcurl3-gnutls_7.64.0-4+deb10u9_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.64.0-4+deb10u9) ...
Selecting previously unselected package libpcre2-8-0:amd64.
Preparing to unpack .../35-libpcre2-8-0_10.32-5+deb10u1_amd64.deb ...
Unpacking libpcre2-8-0:amd64 (10.32-5+deb10u1) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../36-liberror-perl_0.17027-2_all.deb ...
Unpacking liberror-perl (0.17027-2) ...
Selecting previously unselected package git-man.
Preparing to unpack .../37-git-man_1%3a2.20.1-2+deb10u8_all.deb ...
Unpacking git-man (1:2.20.1-2+deb10u8) ...
Selecting previously unselected package git.
Preparing to unpack .../38-git_1%3a2.20.1-2+deb10u8_amd64.deb ...
Unpacking git (1:2.20.1-2+deb10u8) ...
Selecting previously unselected package gnupg-l10n.
Preparing to unpack .../39-gnupg-l10n_2.2.12-1+deb10u2_all.deb ...
Unpacking gnupg-l10n (2.2.12-1+deb10u2) ...
Selecting previously unselected package gnupg-utils.
Preparing to unpack .../40-gnupg-utils_2.2.12-1+deb10u2_amd64.deb ...
Unpacking gnupg-utils (2.2.12-1+deb10u2) ...
Selecting previously unselected package gpg.
Preparing to unpack .../41-gpg_2.2.12-1+deb10u2_amd64.deb ...
Unpacking gpg (2.2.12-1+deb10u2) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../42-pinentry-curses_1.1.0-2_amd64.deb ...
Unpacking pinentry-curses (1.1.0-2) ...
Selecting previously unselected package gpg-agent.
Preparing to unpack .../43-gpg-agent_2.2.12-1+deb10u2_amd64.deb ...
Unpacking gpg-agent (2.2.12-1+deb10u2) ...
Selecting previously unselected package gpg-wks-client.
Preparing to unpack .../44-gpg-wks-client_2.2.12-1+deb10u2_amd64.deb ...
Unpacking gpg-wks-client (2.2.12-1+deb10u2) ...
Selecting previously unselected package gpg-wks-server.
Preparing to unpack .../45-gpg-wks-server_2.2.12-1+deb10u2_amd64.deb ...
Unpacking gpg-wks-server (2.2.12-1+deb10u2) ...
Selecting previously unselected package gpgsm.
Preparing to unpack .../46-gpgsm_2.2.12-1+deb10u2_amd64.deb ...
Unpacking gpgsm (2.2.12-1+deb10u2) ...
Selecting previously unselected package gnupg.
Preparing to unpack .../47-gnupg_2.2.12-1+deb10u2_all.deb ...
Unpacking gnupg (2.2.12-1+deb10u2) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../48-libalgorithm-diff-perl_1.19.03-2_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.03-2) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../49-libalgorithm-diff-xs-perl_0.04-5+b1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-5+b1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../50-libalgorithm-merge-perl_0.08-3_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-3) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../51-libgpm2_1.20.7-5_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.7-5) ...
Selecting previously unselected package libsasl2-modules:amd64.
Preparing to unpack .../52-libsasl2-modules_2.1.27+dfsg-1+deb10u2_amd64.deb ...
Unpacking libsasl2-modules:amd64 (2.1.27+dfsg-1+deb10u2) ...
Selecting previously unselected package libxmuu1:amd64.
Preparing to unpack .../53-libxmuu1_2%3a1.1.2-2+b3_amd64.deb ...
Unpacking libxmuu1:amd64 (2:1.1.2-2+b3) ...
Selecting previously unselected package psmisc.
Preparing to unpack .../54-psmisc_23.2-1+deb10u1_amd64.deb ...
Unpacking psmisc (23.2-1+deb10u1) ...
Selecting previously unselected package xauth.
Preparing to unpack .../55-xauth_1%3a1.0.10-1_amd64.deb ...
Unpacking xauth (1:1.0.10-1) ...
Setting up libksba8:amd64 (1.3.5-2+deb10u2) ...
Setting up libgpm2:amd64 (1.20.7-5) ...
Setting up libarchive13:amd64 (3.3.3-4+deb10u3) ...
Setting up psmisc (23.2-1+deb10u1) ...
Setting up libalgorithm-diff-perl (1.19.03-2) ...
Setting up libprocps7:amd64 (2:3.3.15-2) ...
Setting up libedit2:amd64 (3.1-20181209-1) ...
Setting up libsasl2-modules:amd64 (2.1.27+dfsg-1+deb10u2) ...
Setting up libnghttp2-14:amd64 (1.36.0-2+deb10u2) ...
Setting up less (487-0.1+b1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Setting up libnpth0:amd64 (1.6-1) ...
Setting up libassuan0:amd64 (2.5.2-1) ...
Setting up bzip2 (1.0.6-9.2~deb10u2) ...
Setting up libldap-common (2.4.47+dfsg-3+deb10u7) ...
Setting up libfakeroot:amd64 (1.23-1) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-1+deb10u2) ...
Setting up fakeroot (1.23-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/fakeroot.1.gz because associated file /usr/share/man/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/faked.1.gz because associated file /usr/share/man/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/es/man1/fakeroot.1.gz because associated file /usr/share/man/es/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/es/man1/faked.1.gz because associated file /usr/share/man/es/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/fakeroot.1.gz because associated file /usr/share/man/fr/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/faked.1.gz because associated file /usr/share/man/fr/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/sv/man1/fakeroot.1.gz because associated file /usr/share/man/sv/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/sv/man1/faked.1.gz because associated file /usr/share/man/sv/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist
Setting up liberror-perl (0.17027-2) ...
Setting up libuv1:amd64 (1.24.1-1+deb10u2) ...
Setting up gnupg-l10n (2.2.12-1+deb10u2) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ...
Setting up libncurses6:amd64 (6.1+20181013-2+deb10u5) ...
Setting up xz-utils (5.2.4-1+deb10u1) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist
Setting up patch (2.7.6-3+deb10u1) ...
Setting up libpcre2-8-0:amd64 (10.32-5+deb10u1) ...
Setting up libsasl2-2:amd64 (2.1.27+dfsg-1+deb10u2) ...
Setting up librhash0:amd64 (1.3.8-1) ...
Setting up procps (2:3.3.15-2) ...
update-alternatives: using /usr/bin/w.procps to provide /usr/bin/w (w) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/w.1.gz because associated file /usr/share/man/man1/w.procps.1.gz (of link group w) doesn't exist
Setting up git-man (1:2.20.1-2+deb10u8) ...
Setting up libssh2-1:amd64 (1.8.0-2.1+deb10u1) ...
Setting up cmake-data (3.13.4-1) ...
Setting up libalgorithm-diff-xs-perl (0.04-5+b1) ...
Setting up readline-common (7.0-5) ...
Setting up libxmuu1:amd64 (2:1.1.2-2+b3) ...
Setting up libjsoncpp1:amd64 (1.7.4-3) ...
Setting up libreadline7:amd64 (7.0-5) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up gnupg-utils (2.2.12-1+deb10u2) ...
Setting up pinentry-curses (1.1.0-2) ...
Setting up openssh-client (1:7.9p1-10+deb10u4) ...
Setting up libldap-2.4-2:amd64 (2.4.47+dfsg-3+deb10u7) ...
Setting up libcurl3-gnutls:amd64 (7.64.0-4+deb10u9) ...
Setting up dpkg-dev (1.19.8) ...
Setting up git (1:2.20.1-2+deb10u8) ...
Setting up xauth (1:1.0.10-1) ...
Setting up gpgconf (2.2.12-1+deb10u2) ...
Setting up build-essential (12.6) ...
Setting up libcurl4:amd64 (7.64.0-4+deb10u9) ...
Setting up gpg (2.2.12-1+deb10u2) ...
Setting up gpg-agent (2.2.12-1+deb10u2) ...
Setting up gpgsm (2.2.12-1+deb10u2) ...
Setting up dirmngr (2.2.12-1+deb10u2) ...
Setting up gpg-wks-server (2.2.12-1+deb10u2) ...
Setting up cmake (3.13.4-1) ...
Setting up gpg-wks-client (2.2.12-1+deb10u2) ...
Setting up gnupg (2.2.12-1+deb10u2) ...
Processing triggers for systemd (241-7~deb10u9) ...
Processing triggers for libc-bin (2.28-10+deb10u2) ...
Cloning into 'libarib25'...
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.20.1")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Found PCSC: /usr/lib/x86_64-linux-gnu/libpcsclite.so
-- ELF Interpreter: /lib64/ld-linux-x86-64.so.2
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/libarib25
Scanning dependencies of target arib25-objlib
[ 10%] Building C object CMakeFiles/arib25-objlib.dir/src/arib_std_b25.c.o
[ 20%] Building C object CMakeFiles/arib25-objlib.dir/src/b_cas_card.c.o
[ 30%] Building CXX object CMakeFiles/arib25-objlib.dir/src/multi2.cc.o
[ 40%] Building C object CMakeFiles/arib25-objlib.dir/src/ts_section_parser.c.o
[ 50%] Building C object CMakeFiles/arib25-objlib.dir/src/version.c.o
[ 50%] Built target arib25-objlib
Scanning dependencies of target arib25-static
[ 60%] Linking CXX static library libarib25.a
[ 60%] Built target arib25-static
Scanning dependencies of target arib25-shared
[ 70%] Linking CXX shared library libarib25.so
[ 70%] Built target arib25-shared
Scanning dependencies of target b25
[ 80%] Building C object CMakeFiles/b25.dir/src/td.c.o
[ 90%] Building C object CMakeFiles/b25.dir/src/getopt.c.o
[100%] Linking C executable b25
[100%] Built target b25
[ 50%] Built target arib25-objlib
[ 60%] Built target arib25-static
[ 70%] Built target arib25-shared
[100%] Built target b25
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/b25
-- Set runtime path of "/usr/local/bin/b25" to ""
-- Installing: /usr/local/lib/libarib25.a
-- Installing: /usr/local/lib/libarib25.so.0.2.5
-- Installing: /usr/local/lib/libarib25.so.0
-- Installing: /usr/local/lib/libarib25.so
-- Installing: /usr/local/include/arib25/arib_std_b25.h
-- Installing: /usr/local/include/arib25/b_cas_card.h
-- Installing: /usr/local/include/arib25/multi2.h
-- Installing: /usr/local/include/arib25/ts_section_parser.h
-- Installing: /usr/local/include/arib25/portable.h
-- Installing: /usr/local/include/arib25/arib25_api.h
-- Installing: /usr/local/lib/pkgconfig/libarib25.pc
-- Running: ldconfig
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Reading package lists...
Building dependency tree...
Reading state information...
31 packages can be upgraded. Run 'apt list --upgradable' to see them.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.20.1-2+deb10u8).
The following additional packages will be installed:
automake autotools-dev libsigsegv2 m4
Suggested packages:
autoconf-archive gnu-standards autoconf-doc libtool gettext m4-doc
The following NEW packages will be installed:
autoconf automake autotools-dev libsigsegv2 m4
0 upgraded, 5 newly installed, 0 to remove and 31 not upgraded.
Need to get 1425 kB of archives.
After this operation, 4319 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 libsigsegv2 amd64 2.12-2 [32.8 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 m4 amd64 1.4.18-2 [203 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 autoconf all 2.69-11 [341 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 autotools-dev all 20180224.1 [77.0 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 automake all 1:1.16.1-4 [771 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1425 kB in 0s (11.0 MB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 26274 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.12-2_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.12-2) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.18-2_amd64.deb ...
Unpacking m4 (1.4.18-2) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../autoconf_2.69-11_all.deb ...
Unpacking autoconf (2.69-11) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../autotools-dev_20180224.1_all.deb ...
Unpacking autotools-dev (20180224.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../automake_1%3a1.16.1-4_all.deb ...
Unpacking automake (1:1.16.1-4) ...
Setting up autotools-dev (20180224.1) ...
Setting up libsigsegv2:amd64 (2.12-2) ...
Setting up m4 (1.4.18-2) ...
Setting up autoconf (2.69-11) ...
Setting up automake (1:1.16.1-4) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/automake.1.gz because associated file /usr/share/man/man1/automake-1.16.1.gz (of link group automake) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/aclocal.1.gz because associated file /usr/share/man/man1/aclocal-1.16.1.gz (of link group automake) doesn't exist
Processing triggers for libc-bin (2.28-10+deb10u2) ...
Cloning into 'recdvb'...
Generating configure script and Makefiles for recpt1.
Running aclocal ...
Running autoheader ...
Running autoconf ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for create_arib_std_b25 in -larib25... yes
checking for log10 in -lm... yes
checking for pthread_kill in -lpthread... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
revh=`hg parents --template 'const char *version = "r{rev}:{node|short} ({date|shortdate})";\n' 2>/dev/null`; \
if [ -n "$revh" ] ; then \
echo "$revh" > version.h; \
else \
echo "const char *version = \""1.2.1.1"\";" > version.h; \
fi
gcc -MM recpt1.c decoder.c mkpath.c tssplitter_lite.c recpt1core.c recpt1ctl.c recpt1core.c -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > .deps
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o recpt1.o recpt1.c
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o decoder.o decoder.c
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o mkpath.o mkpath.c
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o tssplitter_lite.o tssplitter_lite.c
tssplitter_lite.c: In function 'AnalyzePat':
tssplitter_lite.c:549:30: warning: '%d' directive writing between 1 and 11 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~
tssplitter_lite.c:549:6: note: 'sprintf' output between 3 and 524 bytes into a destination of size 512
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tssplitter_lite.c:537:31: warning: '%d' directive writing between 1 and 11 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~
tssplitter_lite.c:537:7: note: 'sprintf' output between 3 and 524 bytes into a destination of size 512
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tssplitter_lite.c:524:31: warning: '%d' directive writing between 1 and 11 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~
tssplitter_lite.c:524:7: note: 'sprintf' output between 3 and 524 bytes into a destination of size 512
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tssplitter_lite.c:511:31: warning: '%d' directive writing between 1 and 11 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~
tssplitter_lite.c:511:7: note: 'sprintf' output between 3 and 524 bytes into a destination of size 512
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tssplitter_lite.c:498:31: warning: '%d' directive writing between 1 and 11 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~
tssplitter_lite.c:498:7: note: 'sprintf' output between 3 and 524 bytes into a destination of size 512
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tssplitter_lite.c:486:30: warning: '%d' directive writing between 1 and 11 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~
tssplitter_lite.c:486:6: note: 'sprintf' output between 3 and 524 bytes into a destination of size 512
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tssplitter_lite.c:601:29: warning: '%d' directive writing between 1 and 5 bytes into a region of size between 0 and 511 [-Wformat-overflow=]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~
tssplitter_lite.c:601:25: note: directive argument in the range [0, 65535]
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~
tssplitter_lite.c:601:5: note: 'sprintf' output between 3 and 518 bytes into a destination of size 512
sprintf(chosen_sid, "%s %d", *chosen_sid ? chosen_sid : "", service_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o recpt1core.o recpt1core.c
recpt1core.c: In function 'calc_cn':
recpt1core.c:554:34: warning: format '%d' expects argument of type 'int', but argument 3 has type '__u64' {aka 'long long unsigned int'} [-Wformat=]
fprintf(stderr,"\rSNR0: %d", prop[0].u.st.stat[0].uvalue);
~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
%lld
gcc -o recdvb recpt1.o decoder.o mkpath.o tssplitter_lite.o recpt1core.o -lpthread -lm -larib25
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o recpt1ctl.o recpt1ctl.c
gcc -o recpt1ctl recpt1ctl.o recpt1core.o -lm
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o checksignal.o checksignal.c
gcc -o chkdvbsignal checksignal.o recpt1core.o -lpthread -lm
gcc -O2 -g -pthread -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o tsmain.o tsmain.c
gcc -o tssplitter_lite tssplitter_lite.o tsmain.o
install -m 755 recdvb recpt1ctl chkdvbsignal tssplitter_lite /usr/local/bin
done.
added 1 package in 1s
npm notice
npm notice New major version of npm available! 9.5.0 -> 10.5.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.0>
npm notice Run `npm install -g [email protected]` to update!
npm notice
'/opt/bin/arib-b25-stream-test' -> '/opt/node_modules/arib-b25-stream-test/bin/b25'
starting pcscd...
Using reader plug'n play mechanism
Scanning present readers...
0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312015228184) 00 00
Sat Mar 23 07:25:08 2024
Reader 0: SCM Microsystems Inc. SCR 3310 [CCID Interface] (53312015228184) 00 00
Event number: 0
Card state: Card inserted,
ATR: 3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
ATR: 3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
+ TS = 3B --> Direct Convention
+ T0 = F0, Y(1): 1111, K: 0 (historical bytes)
TA(1) = 12 --> Fi=372, Di=2, 186 cycles/ETU
21505 bits/s at 4 MHz, fMax for Fi = 5 MHz => 26881 bits/s
TB(1) = 00 --> VPP is not electrically connected
TC(1) = FF --> Extra guard time: 255 (special value)
TD(1) = 91 --> Y(i+1) = 1001, Protocol T = 1
-----
TA(2) = 81 --> Protocol to be used in spec mode: T=1 - Unable to change - defined by interface bytes
TD(2) = B1 --> Y(i+1) = 1011, Protocol T = 1
-----
TA(3) = 7C --> IFSC: 124
TB(3) = 45 --> Block Waiting Integer: 4 - Character Waiting Integer: 5
TD(3) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes following
-----
TA(4) = 03 --> Clock stop: not supported - Class accepted by the card: (3G) A 5V B 3V
+ Historical bytes:
+ TCK = 99 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B F0 12 00 FF 91 81 B1 7C 45 1F 03 99
Japanese Chijou Digital B-CAS Card (pay TV)
-
2024-03-23T07:25:10.443+00:00 info: load server config `/app-config/server.yml`
2024-03-23T07:25:10.444+00:00 info: load server config (merged w/ env): {"logLevel":2,"path":"/var/run/mirakurun.sock","port":40772,"allowIPv4CidrRanges":["10.0.0.0/8","127.0.0.0/8","172.16.0.0/12","192.168.0.0/16"],"allowIPv6CidrRanges":["fc00::/7"],"disableIPv6":true,"hostname":"6f7905480ce8"}
2024-03-23T07:25:10.448+00:00 info: load channels config `/app-config/channels.yml`
2024-03-23T07:25:10.449+00:00 info: load tuners config `/app-config/tuners.yml`
2024-03-23T07:25:10.450+00:00 info: 1 of 1 tuners loaded
2024-03-23T07:25:10.450+00:00 info: load db `/app-data/services.json` w/ integrity (UmWPFBfVqN/6itdZ8YU2uI16pzH2hv7N4fGV1IpzKfg=)
2024-03-23T07:25:10.450+00:00 info: db `/app-data/services.json` is not exists
2024-03-23T07:25:10.450+00:00 info: load db `/app-data/programs.json` w/ integrity (UmWPFBfVqN/6itdZ8YU2uI16pzH2hv7N4fGV1IpzKfg=)
2024-03-23T07:25:10.450+00:00 info: db `/app-data/programs.json` is not exists
2024-03-23T07:25:10.829+00:00 info: RPC interface is enabled
2024-03-23T07:25:10.830+00:00 info: listening on http+unix://%2Fvar%2Frun%2Fmirakurun.sock
2024-03-23T07:25:10.830+00:00 info: listening on http://10.88.0.2:40772
2024-03-23T07:25:10.830+00:00 info: listening on http://127.0.0.1:40772
2024-03-23T07:25:13.453+00:00 info: ChannelItem#'TOKYO MX' service scan has started
2024-03-23T07:25:13.458+00:00 info: TSFilter: created (serviceId=0, eventId=0)
2024-03-23T07:25:13.459+00:00 info: TSFilter: waiting for serviceId=0, eventId=0
2024-03-23T07:25:13.472+00:00 info: TunerDevice#0 process has spawned by command `recdvb --b25 16 - -` (pid=2216)
2024-03-23T07:25:13.472+00:00 info: TunerDevice#0 streaming to user `Mirakurun:getServices()` (priority=-1)
コンテナのログを確認してみると、startupスクリプトが正常に動作し、Mirakurunが起動できていることがわかります。
おまけ
上ではpodmanを用いましたが、Dockerを使うことも可能です。
dockerのインストールを行うdockerロールも紹介します。
roles/docker
├── tasks
│ └── main.yml
└── vars
└── main.yml
インストール時に用いるアーキテクチャの識別のための変数を宣言しています。
---
# vars/main.yml
deb_architecture:
"aarch64": "arm64"
"x86_64": "amd64"
公式ドキュメントの手順を再現する形になっています。
---
- name: Install required tool
become: true
ansible.builtin.apt:
name:
- ca-certificates
- curl
- gnupg
update_cache: true
- name: Set up apt keyring directory
become: true
ansible.builtin.file:
path: /etc/apt/keyrings
state: directory
mode: '0755'
owner: root
group: root
- name: Download gpg key
become: true
ansible.builtin.get_url:
url: https://download.docker.com/linux/ubuntu/gpg
dest: /etc/apt/keyrings/docker.asc
force: true
mode: '0644'
owner: root
group: root
- name: Setup repository
become: true
ansible.builtin.apt_repository:
repo: "deb [arch={{ [ansible_architecture] | map('extract', deb_architecture) | first }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ansible_distribution_release}} stable"
state: present
- name: Install docker
become: true
ansible.builtin.apt:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
update_cache: true