SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Iniciando com Docker
Iniciando com DockerIniciando com Docker
Iniciando com DockerEmmanuel Neri
 
Docker 활용법: dumpdocker
Docker 활용법: dumpdockerDocker 활용법: dumpdocker
Docker 활용법: dumpdockerJaehwa 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 AlltagPatrick Baumgartner
 
Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Jon 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-PlatformIDERA Software
 
Solving the Package Problem
Solving the Package ProblemSolving the Package Problem
Solving the Package ProblemJoe 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 yearAkio OBATA
 
Redis fundamental
Redis fundamentalRedis fundamental
Redis fundamentalYuhao Zhang
 
Container sig#1 ansible-container
Container sig#1 ansible-containerContainer sig#1 ansible-container
Container sig#1 ansible-containerNaoya 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 exampleFabio Mora
 
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 developmentshelloidhq
 
FISE Integration with Python and Plone
FISE Integration with Python and PloneFISE Integration with Python and Plone
FISE Integration with Python and PloneJens 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 PHPWilliam Lee
 

Tendances (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
 

En vedette

第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 openSUSEFuminobu Takeyama
 
Proposal of openSUSE.Asia Summit 2017
Proposal of openSUSE.Asia Summit 2017Proposal of openSUSE.Asia Summit 2017
Proposal of openSUSE.Asia Summit 2017Fuminobu 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. 3Fuminobu Takeyama
 

En vedette (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
 

Similaire à 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 modelEuropean 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 + dockerOrtus 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 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 DockerRobert Munteanu
 
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 DockerTomasz Rękawek
 
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 sitesdrupalindia
 
Binary Packaging for HPC with Spack
Binary Packaging for HPC with SpackBinary Packaging for HPC with Spack
Binary Packaging for HPC with Spackinside-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 JSJacob Nelson
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedbackNicolas Degardin
 
Composer & Drupal
Composer & DrupalComposer & Drupal
Composer & Drupaldrubb
 
12 Composer #burningkeyboards
12 Composer #burningkeyboards12 Composer #burningkeyboards
12 Composer #burningkeyboardsDenis Ristic
 
APACHE
APACHEAPACHE
APACHEARJUN
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guidevjvarenya
 
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 - 2020Puppet
 

Similaire à 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 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
 
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
 
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
 

Plus de 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 openSUSEFuminobu Takeyama
 
最近良く聞く Kubernetes を体験してみた イントロ + 活用編
最近良く聞く Kubernetes を体験してみた イントロ + 活用編最近良く聞く Kubernetes を体験してみた イントロ + 活用編
最近良く聞く Kubernetes を体験してみた イントロ + 活用編Fuminobu Takeyama
 
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSERuby でできていると言っても過言ではない Linux ディストリビューション―openSUSE
Ruby でできていると言っても過言ではない Linux ディストリビューション―openSUSEFuminobu Takeyama
 
ここが違う! OSC Tokyo と台湾の COSCUP
ここが違う! OSC Tokyo と台湾の COSCUPここが違う! OSC Tokyo と台湾の COSCUP
ここが違う! OSC Tokyo と台湾の COSCUPFuminobu 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 2017Fuminobu 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. 4Fuminobu 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. 2Fuminobu Takeyama
 
20161106 osc-tokyo-lt-asia-summit
20161106 osc-tokyo-lt-asia-summit20161106 osc-tokyo-lt-asia-summit
20161106 osc-tokyo-lt-asia-summitFuminobu Takeyama
 
20161106 osc-tokyo-command-line
20161106 osc-tokyo-command-line20161106 osc-tokyo-command-line
20161106 osc-tokyo-command-lineFuminobu Takeyama
 

Plus de 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
 

Dernier

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Dernier (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

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