SlideShare a Scribd company logo
Open Build Service 道場 
パッケージの新規作成編 
作りかけバージョン 
Fuminobu TAKEYAMA (@ftake) 
2014-09-14 1
新規パッケージの作成 
● 新しいサブプロジェクトも作成しましょう 
– 新しいパッケージを作成して、どこかのプロジェクトに取り込んでも 
らいたい場合 
– home:xxxx を使わない 
● コマンドラインは面倒なのでWeb UI で 
– Subprojects タブのCreate subproject 
2014-09-14 2
プロジェクトの初期設定 
● リポジトリを追加 
● 必ず取り込んでもらう先のプロジェクトを追加する 
– openSUSE 13.1 とか…ではなく 
● 単に配布するつもりなら、これでOK 
– 追加したプロジェクトのパッケージがビルドに使われる 
● 例えばM17N 場合は 
– M17N/openSUSE_13.1 他を追加する 
● M17N のパッケージ+ openSUSE_13.1 
2014-09-14 3
リポジトリの追加 
● Add Repositories でpick one via advanced interface で 
順に追加する 
– 名前はビルド時に使う 
– M17N, openSUSE_Factory, i586, x86_64 
● Name はopenSUSE_Factory 
– M17N, openSUSE_13.1, i586, x86_64 
● Name はopenSUSE_13.1 
– M17N, openSUSE_12.3, i586, x86_64 
● Name はopenSUSE_12.3 
● M17N を含まないopenSUSE_13.1 だけを追加することも可能 
– 名前は衝突しないように工夫 
2014-09-14 4
リポジトリ設定のFlag とは 
● Build Flag 
– そのリポジトリ向けに実際にビルドするかどうか 
● Publish Flag 
– download.opensuse.org でビルドが終わったパッケージを 
公開するか 
● Debuginfo Flag 
– デバッグシンボルが入った*-debuginfo / *-debugsource 
パッケージを作成するかどうか 
● Use for Build Flag 
– パッケージを他のプロジェクト内の他のパッケージをビルドするため 
に使うかどうか(普通は常にON ) 
2014-09-14 5
いよいよパッケージの作成 
● プロジェクトのチェックアウト 
– $ osc co home:xxxx:yyyy 
● 作成したプロジェクト名 
● 初めての人はパスワードを求められます 
● cd でxxxx:yyyy へ移動 
● OBS パッケージの新規作成 
– $ osc mkpac hogehoge 
– Web UI でもOK だけど、co が必要 
2014-09-14 6
Spec ファイル新規作成 
● テンプレから新規作成 
– $ rpmdev-newspec hogehoge 
– ディレクトリ内にhogehoge.spec ができる 
rpmdev-newspec のインストール 
$ sudo zypper ar -c obs://devel:tools/openSUSE_13.1 devel_tools 
$ sudo zypper ref devel_tools 
$ sudo zypper install rpmdevtools 
2014-09-14 7
spec ファイルのヘッダー 
● Version: 1.0.0 
– # バージョンです 
● Release: 0 
– 変更しないでください 
● Summary: a very useful application 
– 説明を具体的に書いてください 
● License: GPL-2.0+ 
– 書き方には決まりがあります 
● https://en.opensuse.org/openSUSE:Packaging_guidelines#Licensing 
● このページの表に書いてある書式 
2014-09-14 8
spec ファイルのヘッダー 
● Group: System/I18n/Japanese 
– 以下の中から適当なものを選びます 
https://en.opensuse.org/openSUSE:Package_group_guidelines 
● Url: http://example.com/ 
– アップストリーププロジェクトのURL 
2014-09-14 9
spec ファイルのヘッダー 
● Source0: hoge-%{version}.tar.xz 
– ビルドに使用するソースファイル 
– %{version} はVersion: タグの値で置き換えらる 
– hoge-1.0.0.tar.xz はOBS パッケージのディレクトリに 
入っている必要あり 
● 注意 
– Source0: http://example.com/hoge-%{version}.tar.xz 
のような指定も可能であるが、URL が存在しないとエラーになる 
● この場合もファイルはパッケージ内に含まれている必要あり 
2014-09-14 10
spec ファイルのヘッダー 
● BuildRequires: libfoo-devel >= 1.0 
BuildRequires: libbar-devel 
– ビルドに必要なパッケージを列挙します 
● Requires: 
– インストール時に必要な依存関係(データ、依存するコマンド) 
– BuildRequires で指定したライブラリのパッケージは自動的に 
Requires に追加されるので書いてはいけない 
● libfoo1 など 
2014-09-14 11
%description, %prep 
● %description 
– パッケージの長い説明 
● %prep 
– 特に変更は必要なし 
– どのようにアーカイブを展開してcd するかを書く 
● デフォルトは、展開して、%{name}-%{version} へcd 
2014-09-14 12
%build, %install 
● %build 
– どうやってビルドするかをシェルスクリプトのように書く 
– %configure はopenSUSE で必要なオプションをつけて 
./configure をしてくれます 
● %install 
– ファイルをインストールために必要なコマンドを書く 
● (%clean) 
– openSUSE では必要ない 
2014-09-14 13
%files 
● このパッケージが提供するファイル一覧を列挙する 
● %{_bindir}/hoge 
– /usr/bin/hoge を追加する 
● %dir %{_datadir}/hoge/ 
– /usr/share/hoge ディレクトリを追加する 
● %dir %{_datadir}/hoge/* 
– /usr/share/hoge 以下のすべてのファイルを追加 
● %doc 
– 絶対パスの場合: ドキュメントとしてファイルをパッケージに追加 
– 相対パスの場合: /usr/share/packages/hoge/ にファイルを 
コピーし、ドキュメントとして追加 
2014-09-14 14
ライブラリの場合の注意 
● インストール・アンインストール時に/sbin/ldconfig 
– %post -p /sbin/ldconfig 
– %postun -p /sbin/ldconfig 
● インストール先は%{_libdir} で指定 
– ビルドターゲットに応じて変わる 
● /usr/lib64 (x86_64) 
● /usr/lib (i586) 
2014-09-14 15
更新履歴 
● パッケージの内容を更新して、提出するときは更新履歴に追記す 
る 
● $ osc vc 
– %changelog の下には直接書かない 
– hoge.changes に書き込まれる 
------------------------------------------------------------------- 
Mon Mar 24 19:00:00 UTC 2014 – ftake@example.com 
- Initial package 
2014-09-14 16
ソースファイルの登録 
● OBS パッケージの中身はおよそ以下の通り 
– パッチが入る場合も 
● osc add を使って登録する 
– $ osc add hoge-1.0.0.tar.xz 
– $ osc add hoge.spec 
– $ osc add hoge.changes 
2014-09-14 17
ビルド 
● ローカルビルド 
– $ osc build –-local-package openSUSE_13.1 x86_64 
● 後ろの2つのオプションは省略すると~/.oscrc に書かれた値が 
使われる 
● 一度commit するまで--local-package が必要 
● アップロード 
– $ osc commit 
● オンラインのOBS サーバーにファイルを転送 
2014-09-14 18
コミットの前に 
● format_spec_file を実行して、spec ファイルを整形する 
– $ osc service run format_spec_file 
● 変更点を確認する 
– $ diff -u hoge.spec _service:format_spec_file:hoge.spec 
● 変更点がなければファイルは出力されない 
– $ mv _service:format_spec_file:hoge.spec hoge.spec 
2014-09-14 19

More Related Content

What's hot

Iniciando com Docker
Iniciando com DockerIniciando com Docker
Iniciando com Docker
Emmanuel Neri
 
Docker 활용법: dumpdocker
Docker 활용법: dumpdockerDocker 활용법: dumpdocker
Docker 활용법: dumpdocker
Jaehwa Park
 
Pax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPax – Tools für den OSGi Alltag
Pax – Tools für den OSGi Alltag
Patrick Baumgartner
 
Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013
Jon Peck
 
Geek Sync I Working with SQL Server for Linux Cross-Platform
Geek Sync I Working with SQL Server for Linux Cross-PlatformGeek Sync I Working with SQL Server for Linux Cross-Platform
Geek Sync I Working with SQL Server for Linux Cross-Platform
IDERA Software
 
Building For Mer
Building For MerBuilding For Mer
Building For Mer
David Greaves
 
Solving the Package Problem
Solving the Package ProblemSolving the Package Problem
Solving the Package Problem
Joe Brockmeier
 
pkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past yearpkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past year
Akio OBATA
 
Meetup 05 27-2015
Meetup   05 27-2015Meetup   05 27-2015
Meetup 05 27-2015
Ranjan Parthasarathy
 
Fedora Atomic Host
Fedora Atomic HostFedora Atomic Host
Fedora Atomic Host
rranjithrajaram
 
Redis fundamental
Redis fundamentalRedis fundamental
Redis fundamental
Yuhao Zhang
 
Container sig#1 ansible-container
Container sig#1 ansible-containerContainer sig#1 ansible-container
Container sig#1 ansible-container
Naoya Hashimoto
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by example
Fabio Mora
 
Fosscon2013
Fosscon2013Fosscon2013
Fosscon2013
Dru Lavigne
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application development
shelloidhq
 
FISE Integration with Python and Plone
FISE Integration with Python and PloneFISE Integration with Python and Plone
FISE Integration with Python and Plone
Jens Klein
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
William Lee
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
William Lee
 

What's hot (20)

Iniciando com Docker
Iniciando com DockerIniciando com Docker
Iniciando com Docker
 
Docker 활용법: dumpdocker
Docker 활용법: dumpdockerDocker 활용법: dumpdocker
Docker 활용법: dumpdocker
 
Pax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPax – Tools für den OSGi Alltag
Pax – Tools für den OSGi Alltag
 
Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013
 
Geek Sync I Working with SQL Server for Linux Cross-Platform
Geek Sync I Working with SQL Server for Linux Cross-PlatformGeek Sync I Working with SQL Server for Linux Cross-Platform
Geek Sync I Working with SQL Server for Linux Cross-Platform
 
Building For Mer
Building For MerBuilding For Mer
Building For Mer
 
Scale13
Scale13Scale13
Scale13
 
Solving the Package Problem
Solving the Package ProblemSolving the Package Problem
Solving the Package Problem
 
pkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past yearpkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past year
 
Meetup 05 27-2015
Meetup   05 27-2015Meetup   05 27-2015
Meetup 05 27-2015
 
Fedora Atomic Host
Fedora Atomic HostFedora Atomic Host
Fedora Atomic Host
 
Redis fundamental
Redis fundamentalRedis fundamental
Redis fundamental
 
Container sig#1 ansible-container
Container sig#1 ansible-containerContainer sig#1 ansible-container
Container sig#1 ansible-container
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by example
 
Fosscon2013
Fosscon2013Fosscon2013
Fosscon2013
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application development
 
Dockerandjenkins citz2014
Dockerandjenkins citz2014Dockerandjenkins citz2014
Dockerandjenkins citz2014
 
FISE Integration with Python and Plone
FISE Integration with Python and PloneFISE Integration with Python and Plone
FISE Integration with Python and Plone
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
 

Viewers also liked

第1回 Open Build Service 道場
第1回 Open Build Service 道場第1回 Open Build Service 道場
第1回 Open Build Service 道場Fuminobu Takeyama
 
Develop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceDevelop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceSUSE Labs Taipei
 
A Closer Look at Fonts and Font Rendering System on openSUSE
A Closer Look at Fonts and Font Rendering System on openSUSEA Closer Look at Fonts and Font Rendering System on openSUSE
A Closer Look at Fonts and Font Rendering System on openSUSE
Fuminobu Takeyama
 
Proposal of openSUSE.Asia Summit 2017
Proposal of openSUSE.Asia Summit 2017Proposal of openSUSE.Asia Summit 2017
Proposal of openSUSE.Asia Summit 2017
Fuminobu Takeyama
 
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
Netwalker lab kapper
 
今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3
今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3
今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3
Fuminobu Takeyama
 

Viewers also liked (6)

第1回 Open Build Service 道場
第1回 Open Build Service 道場第1回 Open Build Service 道場
第1回 Open Build Service 道場
 
Develop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceDevelop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build Service
 
A Closer Look at Fonts and Font Rendering System on openSUSE
A Closer Look at Fonts and Font Rendering System on openSUSEA Closer Look at Fonts and Font Rendering System on openSUSE
A Closer Look at Fonts and Font Rendering System on openSUSE
 
Proposal of openSUSE.Asia Summit 2017
Proposal of openSUSE.Asia Summit 2017Proposal of openSUSE.Asia Summit 2017
Proposal of openSUSE.Asia Summit 2017
 
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
 
今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3
今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3
今さら聞けない! Linux コマンドラインツールテクニック その1 rev. 3
 

Similar to Open Build Service 道場―パッケージの新規作成編

[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
European Collaboration Summit
 
Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...
Justin James
 
Into The Box 2018 | Content box + docker
Into The Box 2018 | Content box + dockerInto The Box 2018 | Content box + docker
Into The Box 2018 | Content box + docker
Ortus Solutions, Corp
 
Continuous Integration and DevOps with Open Build Service(OBS)
Continuous Integration and DevOps with Open Build Service(OBS)Continuous Integration and DevOps with Open Build Service(OBS)
Continuous Integration and DevOps with Open Build Service(OBS)
Ralf Dannert
 
Zero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using DockerZero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using Docker
Tomasz Rękawek
 
Zero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using DockerZero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using Docker
Robert Munteanu
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
drupalindia
 
Binary Packaging for HPC with Spack
Binary Packaging for HPC with SpackBinary Packaging for HPC with Spack
Binary Packaging for HPC with Spack
inside-BigData.com
 
Deployment of xlwings-powered spreadsheets (webinar)
Deployment of xlwings-powered spreadsheets (webinar)Deployment of xlwings-powered spreadsheets (webinar)
Deployment of xlwings-powered spreadsheets (webinar)
xlwings
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
Jacob Nelson
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
nuppla
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedback
Nicolas Degardin
 
Composer & Drupal
Composer & DrupalComposer & Drupal
Composer & Drupal
drubb
 
12 Composer #burningkeyboards
12 Composer #burningkeyboards12 Composer #burningkeyboards
12 Composer #burningkeyboards
Denis Ristic
 
Composer namespacing
Composer namespacingComposer namespacing
Composer namespacing
Deepak Chandani
 
APACHE
APACHEAPACHE
APACHEARJUN
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
vjvarenya
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
Simeon Prusiyski
 
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Puppet
 
Continuos Integration @Knetminer
Continuos Integration @KnetminerContinuos Integration @Knetminer
Continuos Integration @Knetminer
Rothamsted Research, UK
 

Similar to Open Build Service 道場―パッケージの新規作成編 (20)

[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...
 
Into The Box 2018 | Content box + docker
Into The Box 2018 | Content box + dockerInto The Box 2018 | Content box + docker
Into The Box 2018 | Content box + docker
 
Continuous Integration and DevOps with Open Build Service(OBS)
Continuous Integration and DevOps with Open Build Service(OBS)Continuous Integration and DevOps with Open Build Service(OBS)
Continuous Integration and DevOps with Open Build Service(OBS)
 
Zero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using DockerZero downtime deployments for the Sling-based apps using Docker
Zero downtime deployments for the Sling-based apps using Docker
 
Zero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using DockerZero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using Docker
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Binary Packaging for HPC with Spack
Binary Packaging for HPC with SpackBinary Packaging for HPC with Spack
Binary Packaging for HPC with Spack
 
Deployment of xlwings-powered spreadsheets (webinar)
Deployment of xlwings-powered spreadsheets (webinar)Deployment of xlwings-powered spreadsheets (webinar)
Deployment of xlwings-powered spreadsheets (webinar)
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedback
 
Composer & Drupal
Composer & DrupalComposer & Drupal
Composer & Drupal
 
12 Composer #burningkeyboards
12 Composer #burningkeyboards12 Composer #burningkeyboards
12 Composer #burningkeyboards
 
Composer namespacing
Composer namespacingComposer namespacing
Composer namespacing
 
APACHE
APACHEAPACHE
APACHE
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
 
Continuos Integration @Knetminer
Continuos Integration @KnetminerContinuos Integration @Knetminer
Continuos Integration @Knetminer
 

More from Fuminobu Takeyama

Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバーBtrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
Fuminobu Takeyama
 
Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...
Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...
Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...
Fuminobu Takeyama
 
SUSE Studio Express を使ってみた
SUSE Studio Express を使ってみたSUSE Studio Express を使ってみた
SUSE Studio Express を使ってみた
Fuminobu Takeyama
 
Geeko Magazine: A Technical Magazine on openSUSE, editied on openSUSE
Geeko Magazine: A Technical Magazine on openSUSE, editied on openSUSEGeeko Magazine: A Technical Magazine on openSUSE, editied on openSUSE
Geeko Magazine: A Technical Magazine on openSUSE, editied on openSUSE
Fuminobu Takeyama
 
最近良く聞く Kubernetes を体験してみた イントロ + 活用編
最近良く聞く Kubernetes を体験してみた イントロ + 活用編最近良く聞く Kubernetes を体験してみた イントロ + 活用編
最近良く聞く Kubernetes を体験してみた イントロ + 活用編
Fuminobu Takeyama
 
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSERuby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
Fuminobu Takeyama
 
ここが違う! OSC Tokyo と台湾の COSCUP
ここが違う! OSC Tokyo と台湾の COSCUPここが違う! OSC Tokyo と台湾の COSCUP
ここが違う! OSC Tokyo と台湾の COSCUP
Fuminobu Takeyama
 
トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法
トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法
トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法
Fuminobu Takeyama
 
What is necessary for the next input method framework?
What is necessary for the next input method framework?What is necessary for the next input method framework?
What is necessary for the next input method framework?
Fuminobu Takeyama
 
Leap の初のメジャーアップデート! openSUSE Leap 15.0 リリース
Leap の初のメジャーアップデート! openSUSE Leap 15.0 リリースLeap の初のメジャーアップデート! openSUSE Leap 15.0 リリース
Leap の初のメジャーアップデート! openSUSE Leap 15.0 リリース
Fuminobu Takeyama
 
Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)
Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)
Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)
Fuminobu Takeyama
 
Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―
Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―
Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―
Fuminobu Takeyama
 
Welcome to openSUSE.Asia Summit 2017
Welcome to openSUSE.Asia Summit 2017Welcome to openSUSE.Asia Summit 2017
Welcome to openSUSE.Asia Summit 2017
Fuminobu Takeyama
 
告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介
告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介
告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介
Fuminobu Takeyama
 
今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4
今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4
今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4
Fuminobu Takeyama
 
【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用
【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用
【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用
Fuminobu Takeyama
 
サーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整える
サーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整えるサーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整える
サーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整える
Fuminobu Takeyama
 
今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2
今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2
今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2
Fuminobu Takeyama
 
20161106 osc-tokyo-lt-asia-summit
20161106 osc-tokyo-lt-asia-summit20161106 osc-tokyo-lt-asia-summit
20161106 osc-tokyo-lt-asia-summit
Fuminobu Takeyama
 
20161106 osc-tokyo-command-line
20161106 osc-tokyo-command-line20161106 osc-tokyo-command-line
20161106 osc-tokyo-command-line
Fuminobu Takeyama
 

More from Fuminobu Takeyama (20)

Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバーBtrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
 
Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...
Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...
Geeko Magazine: A Technical Magazine on openSUSE, edited on openSUSE―openSUSE...
 
SUSE Studio Express を使ってみた
SUSE Studio Express を使ってみたSUSE Studio Express を使ってみた
SUSE Studio Express を使ってみた
 
Geeko Magazine: A Technical Magazine on openSUSE, editied on openSUSE
Geeko Magazine: A Technical Magazine on openSUSE, editied on openSUSEGeeko Magazine: A Technical Magazine on openSUSE, editied on openSUSE
Geeko Magazine: A Technical Magazine on openSUSE, editied on openSUSE
 
最近良く聞く Kubernetes を体験してみた イントロ + 活用編
最近良く聞く Kubernetes を体験してみた イントロ + 活用編最近良く聞く Kubernetes を体験してみた イントロ + 活用編
最近良く聞く Kubernetes を体験してみた イントロ + 活用編
 
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSERuby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
 
ここが違う! OSC Tokyo と台湾の COSCUP
ここが違う! OSC Tokyo と台湾の COSCUPここが違う! OSC Tokyo と台湾の COSCUP
ここが違う! OSC Tokyo と台湾の COSCUP
 
トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法
トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法
トランザクショナルアップデート ― Btrfsを活用したパッケージ更新方法
 
What is necessary for the next input method framework?
What is necessary for the next input method framework?What is necessary for the next input method framework?
What is necessary for the next input method framework?
 
Leap の初のメジャーアップデート! openSUSE Leap 15.0 リリース
Leap の初のメジャーアップデート! openSUSE Leap 15.0 リリースLeap の初のメジャーアップデート! openSUSE Leap 15.0 リリース
Leap の初のメジャーアップデート! openSUSE Leap 15.0 リリース
 
Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)
Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)
Portus でプライベート Docker レジストリを構築してみよう(openSUSE の紹介パート)
 
Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―
Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―
Portus でプライベート Docker レジストリを構築してみよう ― 予告編 ―
 
Welcome to openSUSE.Asia Summit 2017
Welcome to openSUSE.Asia Summit 2017Welcome to openSUSE.Asia Summit 2017
Welcome to openSUSE.Asia Summit 2017
 
告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介
告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介
告知LT最終回! openSUSE.Asia Summit 2017 注目セッションのご紹介
 
今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4
今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4
今さら聞けない -Linux コマンドラインツールテクニック その1 rev. 4
 
【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用
【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用
【openSUSEの最新動向のみ】Solrで日本語全文検索システムの構築と応用
 
サーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整える
サーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整えるサーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整える
サーバーだけじゃない!Linux デスクトップを使い倒そう その3 ― 今話題の Kotlin から Ruby、C++ 1x…の開発環境を整える
 
今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2
今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2
今さら聞けない Linux コマンドラインツールテクニック その1 rev. 2
 
20161106 osc-tokyo-lt-asia-summit
20161106 osc-tokyo-lt-asia-summit20161106 osc-tokyo-lt-asia-summit
20161106 osc-tokyo-lt-asia-summit
 
20161106 osc-tokyo-command-line
20161106 osc-tokyo-command-line20161106 osc-tokyo-command-line
20161106 osc-tokyo-command-line
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 

Open Build Service 道場―パッケージの新規作成編

  • 1. Open Build Service 道場 パッケージの新規作成編 作りかけバージョン Fuminobu TAKEYAMA (@ftake) 2014-09-14 1
  • 2. 新規パッケージの作成 ● 新しいサブプロジェクトも作成しましょう – 新しいパッケージを作成して、どこかのプロジェクトに取り込んでも らいたい場合 – home:xxxx を使わない ● コマンドラインは面倒なのでWeb UI で – Subprojects タブのCreate subproject 2014-09-14 2
  • 3. プロジェクトの初期設定 ● リポジトリを追加 ● 必ず取り込んでもらう先のプロジェクトを追加する – openSUSE 13.1 とか…ではなく ● 単に配布するつもりなら、これでOK – 追加したプロジェクトのパッケージがビルドに使われる ● 例えばM17N 場合は – M17N/openSUSE_13.1 他を追加する ● M17N のパッケージ+ openSUSE_13.1 2014-09-14 3
  • 4. リポジトリの追加 ● Add Repositories でpick one via advanced interface で 順に追加する – 名前はビルド時に使う – M17N, openSUSE_Factory, i586, x86_64 ● Name はopenSUSE_Factory – M17N, openSUSE_13.1, i586, x86_64 ● Name はopenSUSE_13.1 – M17N, openSUSE_12.3, i586, x86_64 ● Name はopenSUSE_12.3 ● M17N を含まないopenSUSE_13.1 だけを追加することも可能 – 名前は衝突しないように工夫 2014-09-14 4
  • 5. リポジトリ設定のFlag とは ● Build Flag – そのリポジトリ向けに実際にビルドするかどうか ● Publish Flag – download.opensuse.org でビルドが終わったパッケージを 公開するか ● Debuginfo Flag – デバッグシンボルが入った*-debuginfo / *-debugsource パッケージを作成するかどうか ● Use for Build Flag – パッケージを他のプロジェクト内の他のパッケージをビルドするため に使うかどうか(普通は常にON ) 2014-09-14 5
  • 6. いよいよパッケージの作成 ● プロジェクトのチェックアウト – $ osc co home:xxxx:yyyy ● 作成したプロジェクト名 ● 初めての人はパスワードを求められます ● cd でxxxx:yyyy へ移動 ● OBS パッケージの新規作成 – $ osc mkpac hogehoge – Web UI でもOK だけど、co が必要 2014-09-14 6
  • 7. Spec ファイル新規作成 ● テンプレから新規作成 – $ rpmdev-newspec hogehoge – ディレクトリ内にhogehoge.spec ができる rpmdev-newspec のインストール $ sudo zypper ar -c obs://devel:tools/openSUSE_13.1 devel_tools $ sudo zypper ref devel_tools $ sudo zypper install rpmdevtools 2014-09-14 7
  • 8. spec ファイルのヘッダー ● Version: 1.0.0 – # バージョンです ● Release: 0 – 変更しないでください ● Summary: a very useful application – 説明を具体的に書いてください ● License: GPL-2.0+ – 書き方には決まりがあります ● https://en.opensuse.org/openSUSE:Packaging_guidelines#Licensing ● このページの表に書いてある書式 2014-09-14 8
  • 9. spec ファイルのヘッダー ● Group: System/I18n/Japanese – 以下の中から適当なものを選びます https://en.opensuse.org/openSUSE:Package_group_guidelines ● Url: http://example.com/ – アップストリーププロジェクトのURL 2014-09-14 9
  • 10. spec ファイルのヘッダー ● Source0: hoge-%{version}.tar.xz – ビルドに使用するソースファイル – %{version} はVersion: タグの値で置き換えらる – hoge-1.0.0.tar.xz はOBS パッケージのディレクトリに 入っている必要あり ● 注意 – Source0: http://example.com/hoge-%{version}.tar.xz のような指定も可能であるが、URL が存在しないとエラーになる ● この場合もファイルはパッケージ内に含まれている必要あり 2014-09-14 10
  • 11. spec ファイルのヘッダー ● BuildRequires: libfoo-devel >= 1.0 BuildRequires: libbar-devel – ビルドに必要なパッケージを列挙します ● Requires: – インストール時に必要な依存関係(データ、依存するコマンド) – BuildRequires で指定したライブラリのパッケージは自動的に Requires に追加されるので書いてはいけない ● libfoo1 など 2014-09-14 11
  • 12. %description, %prep ● %description – パッケージの長い説明 ● %prep – 特に変更は必要なし – どのようにアーカイブを展開してcd するかを書く ● デフォルトは、展開して、%{name}-%{version} へcd 2014-09-14 12
  • 13. %build, %install ● %build – どうやってビルドするかをシェルスクリプトのように書く – %configure はopenSUSE で必要なオプションをつけて ./configure をしてくれます ● %install – ファイルをインストールために必要なコマンドを書く ● (%clean) – openSUSE では必要ない 2014-09-14 13
  • 14. %files ● このパッケージが提供するファイル一覧を列挙する ● %{_bindir}/hoge – /usr/bin/hoge を追加する ● %dir %{_datadir}/hoge/ – /usr/share/hoge ディレクトリを追加する ● %dir %{_datadir}/hoge/* – /usr/share/hoge 以下のすべてのファイルを追加 ● %doc – 絶対パスの場合: ドキュメントとしてファイルをパッケージに追加 – 相対パスの場合: /usr/share/packages/hoge/ にファイルを コピーし、ドキュメントとして追加 2014-09-14 14
  • 15. ライブラリの場合の注意 ● インストール・アンインストール時に/sbin/ldconfig – %post -p /sbin/ldconfig – %postun -p /sbin/ldconfig ● インストール先は%{_libdir} で指定 – ビルドターゲットに応じて変わる ● /usr/lib64 (x86_64) ● /usr/lib (i586) 2014-09-14 15
  • 16. 更新履歴 ● パッケージの内容を更新して、提出するときは更新履歴に追記す る ● $ osc vc – %changelog の下には直接書かない – hoge.changes に書き込まれる ------------------------------------------------------------------- Mon Mar 24 19:00:00 UTC 2014 – ftake@example.com - Initial package 2014-09-14 16
  • 17. ソースファイルの登録 ● OBS パッケージの中身はおよそ以下の通り – パッチが入る場合も ● osc add を使って登録する – $ osc add hoge-1.0.0.tar.xz – $ osc add hoge.spec – $ osc add hoge.changes 2014-09-14 17
  • 18. ビルド ● ローカルビルド – $ osc build –-local-package openSUSE_13.1 x86_64 ● 後ろの2つのオプションは省略すると~/.oscrc に書かれた値が 使われる ● 一度commit するまで--local-package が必要 ● アップロード – $ osc commit ● オンラインのOBS サーバーにファイルを転送 2014-09-14 18
  • 19. コミットの前に ● format_spec_file を実行して、spec ファイルを整形する – $ osc service run format_spec_file ● 変更点を確認する – $ diff -u hoge.spec _service:format_spec_file:hoge.spec ● 変更点がなければファイルは出力されない – $ mv _service:format_spec_file:hoge.spec hoge.spec 2014-09-14 19