「DeveloperWiki:パッケージャになる方法」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
 
(セクション見出しの訳出)
1行目: 1行目:
[[Category:DeveloperWiki]]
+
[[カテゴリ:DeveloperWiki]]
  +
[[en:DeveloperWiki:HOWTO Be A Packager]]
== Follow Package Guidelines ==
 
  +
== パッケージガイドラインに従う ==
   
 
Package guidelines can be found in the Arch Linux documentation.
 
Package guidelines can be found in the Arch Linux documentation.
 
Please follow them closely.
 
Please follow them closely.
   
[[Arch packaging standards]]
+
[[Arch パッケージガイドライン]]
   
   
  +
== 準備とセットアップ ==
== Preparation and Setup ==
 
   
  +
=== パッケージのインストール ===
=== Installing the Packages ===
 
   
 
Make sure you have the packages {{ic|devtools}} and {{ic|namcap}} installed.
 
Make sure you have the packages {{ic|devtools}} and {{ic|namcap}} installed.
   
=== SSH Config ===
+
=== SSH 設定 ===
   
 
If you have multiple SSH keys in your SSH Agent, you will need to make sure that the correct key is being used to contact the Arch servers.
 
If you have multiple SSH keys in your SSH Agent, you will need to make sure that the correct key is being used to contact the Arch servers.
29行目: 30行目:
 
</pre>
 
</pre>
   
=== makepkg Config ===
+
=== makepkg 設定 ===
   
 
Make sure to configure your {{ic|~/.makepkg.conf}} with the correct {{ic|PACKAGER}} and {{ic|GPGKEY}} variables.
 
Make sure to configure your {{ic|~/.makepkg.conf}} with the correct {{ic|PACKAGER}} and {{ic|GPGKEY}} variables.
39行目: 40行目:
 
</pre>
 
</pre>
   
  +
=== 非再帰的チェックアウトを使ったローカルの SVN セットアップ ===
=== Local SVN Setup using Non-Recursive Checkouts ===
 
   
 
As SVN provides the ability to do scoped checkouts you can initialize an empty local checkout and later on only fetch the packages that you want.
 
As SVN provides the ability to do scoped checkouts you can initialize an empty local checkout and later on only fetch the packages that you want.
54行目: 55行目:
 
This creates two directories named {{ic|svn-packages}} and {{ic|svn-community}} which contain nothing but are properly setup as svn repositories.
 
This creates two directories named {{ic|svn-packages}} and {{ic|svn-community}} which contain nothing but are properly setup as svn repositories.
   
=== Helper Scripts (optional) ===
+
=== ヘルパースクリプト (任意) ===
   
 
==== ch ====
 
==== ch ====
73行目: 74行目:
   
   
== The Workflow ==
+
== ワークフロー ==
   
  +
=== ローカルリポジトリのチェックアウト・更新 ===
=== Checkout/update your Local Repository ===
 
 
cd svn-community
 
cd svn-community
 
# update a specific package
 
# update a specific package
82行目: 83行目:
 
svn update
 
svn update
   
  +
=== 新しいパッケージの追加 ===
=== Adding a new Package ===
 
 
This step is only required when adding a new package to the repository for the first time.
 
This step is only required when adding a new package to the repository for the first time.
 
cd svn-community
 
cd svn-community
92行目: 93行目:
 
svn commit
 
svn commit
   
  +
=== 必要なパッケージの更新 ===
=== Updating the needed Package ===
 
 
svn update some-package
 
svn update some-package
   
=== Change and build ===
+
=== 変更とビルド ===
It is '''mandatory''' to build your package using a clean [[DeveloperWiki:Building_in_a_Clean_Chroot|chroot]].
+
It is '''mandatory''' to build your package using a clean [[:en:DeveloperWiki:Building_in_a_Clean_Chroot|chroot]].
To ensure this, build with the scripts provided by devtools (i.e. {{ic|extra-x86_64-build}} for [[Official_repositories#extra|extra]] and [[Official_repositories#community|community]], {{ic|multilib-build}} for [[Official_repositories#multilib|multilib]], {{ic|multilib-staging-build}} for [[Official_repositories#Staging_repositories|multilib-staging]], {{ic|multilib-testing-build}} for [[Official_repositories#multilib-testing|multilib-testing]], {{ic|staging-x86_64-build}} for [[Official_repositories#Staging_repositories|staging]] and [[Official_repositories#Staging_repositories|community-staging]], {{ic|testing-x86_64-build}} for [[Official_repositories#testing|testing]] and [[Official_repositories#community-testing|community-testing]]).
+
To ensure this, build with the scripts provided by devtools (i.e. {{ic|extra-x86_64-build}} for [[公式リポジトリ#extra|extra]] and [[公式リポジトリ#community|community]], {{ic|multilib-build}} for [[公式リポジトリ#multilib|multilib]], {{ic|multilib-staging-build}} for [[公式リポジトリ#Staging_repositories|multilib-staging]], {{ic|multilib-testing-build}} for [[公式リポジトリ#multilib-testing|multilib-testing]], {{ic|staging-x86_64-build}} for [[公式リポジトリ#Staging_repositories|staging]] and [[公式リポジトリ#Staging_repositories|community-staging]], {{ic|testing-x86_64-build}} for [[公式リポジトリ#testing|testing]] and [[公式リポジトリ#community-testing|community-testing]]).
   
 
cd some-package/trunk/
 
cd some-package/trunk/
103行目: 104行目:
 
extra-x86_64-build
 
extra-x86_64-build
   
Or, if you are using the [[DeveloperWiki:HOWTO_Be_A_Packager#ch|ch]] helper, simply do:
+
Or, if you are using the [[#ch|ch]] helper, simply do:
 
cd some-package/trunk/
 
cd some-package/trunk/
 
$EDITOR PKGBUILD
 
$EDITOR PKGBUILD
110行目: 111行目:
 
ch build 64
 
ch build 64
   
=== Run namcap on both PKGBUILD and Package ===
+
=== PKGBUILD とパッケージに namcap を実行 ===
 
{{Note|This is automatically done, when using the devtools build scripts.}}
 
{{Note|This is automatically done, when using the devtools build scripts.}}
 
namcap PKGBUILD
 
namcap PKGBUILD
 
namcap some-package-1.0-1-x86_64.pkg.tar.xz
 
namcap some-package-1.0-1-x86_64.pkg.tar.xz
   
=== Run checkpkg on the Package ===
+
=== パッケージの checkpkg を実行 ===
 
Run in the directory with your freshly built package to get a file list diff compared with the package version currently in the repos.
 
Run in the directory with your freshly built package to get a file list diff compared with the package version currently in the repos.
 
checkpkg
 
checkpkg
   
{{Note|This can be skipped when adding a new package to the repository for the first time (e.g. by importing it from [[AUR]] to [[Official_repositories#community|community]]).}}
+
{{Note|This can be skipped when adding a new package to the repository for the first time (e.g. by importing it from [[AUR]] to [[公式リポジトリ#community|community]]).}}
   
  +
=== 識別された soname の変更に sogrep を実行 ===
=== Run sogrep on identified soname change ===
 
If [[DeveloperWiki:HOWTO_Be_A_Packager#Run_checkpkg_on_the_Package|checkpkg]] identified a shared object name (aka. soname) change in {{ic|package}}'s library {{ic|package.so}}, it is '''required''' to rebuild packages directly depending on it.
+
If [[#パッケージの checkpkg を実行|checkpkg]] identified a shared object name (aka. soname) change in {{ic|package}}'s library {{ic|package.so}}, it is '''required''' to rebuild packages directly depending on it.
   
 
To identify which packages rely on a given library in {{ic|package}} in a repository (e.g. {{ic|extra}} or {{ic|community}}), use sogrep (see {{man|1|sogrep}}).
 
To identify which packages rely on a given library in {{ic|package}} in a repository (e.g. {{ic|extra}} or {{ic|community}}), use sogrep (see {{man|1|sogrep}}).
 
sogrep <repository> package.so
 
sogrep <repository> package.so
   
Build {{ic|package}} for its respective [[Official_repositories#Staging_repositories|staging]] environment (by following the remaining steps in [[DeveloperWiki:HOWTO_Be_A_Packager#The_Workflow|The Workflow]]) and create a [https://www.archlinux.org/todo/ TODO] with the identified dependants, so their maintainers can rebuild them against the new version of {{ic|package}}.
+
Build {{ic|package}} for its respective [[公式リポジトリ#Staging_repositories|staging]] environment (by following the remaining steps in [[#ワークフロー|The Workflow]]) and create a [https://www.archlinux.org/todo/ TODO] with the identified dependants, so their maintainers can rebuild them against the new version of {{ic|package}}.
   
{{Note|First sync with [https://www.archlinux.org/people/trusted-users/ trusted users] and/ or [https://www.archlinux.org/people/developers/ developers], if any packages currently in the [[Official_repositories#Staging_repositories|staging]] environment block the rebuilds against {{ic|package}}.}}
+
{{Note|First sync with [https://www.archlinux.org/people/trusted-users/ trusted users] and/ or [https://www.archlinux.org/people/developers/ developers], if any packages currently in the [[公式リポジトリ#Staging_repositories|staging]] environment block the rebuilds against {{ic|package}}.}}
   
=== Use devtools to sign, upload and commit ===
+
=== devtools を使って署名・アップロード・コミット ===
 
Once you are satisfied with the package, you need to make sure all your changes are tracked in the repository.
 
Once you are satisfied with the package, you need to make sure all your changes are tracked in the repository.
 
Run:
 
Run:
144行目: 145行目:
 
Make sure to '''never''' add the binary packages, makepkg logs, etc. to the repository!
 
Make sure to '''never''' add the binary packages, makepkg logs, etc. to the repository!
   
When you're ready to proceed, you can run the devtools scripts to sign, upload and commit your work (i.e. {{ic|communitypkg}} for [[Official_repositories#community|community]], {{ic|community-stagingpkg}} for [[Official_repositories#Staging_repositories|community-staging]], {{ic|community-testingpkg}} for [[Official_repositories#community-testing|community-testing]], {{ic|extrapkg}} for [[Official_repositories#extra|extra]], {{ic|gnome-unstablepkg}} for [[Official_repositories#gnome-unstable|gnome-unstable]], {{ic|kde-unstablepkg}} for [[Official_repositories#kde-unstable|kde-unstable]], {{ic|multilibpkg}} for [[Official_repositories#multilib|multilib]], {{ic|multilib-stagingpkg}} for [[Official_repositories#Staging_repositories|multilib-staging]], {{ic|multilib-testingpkg}} for [[Official_repositories#multilib-testing|multilib-testing]], {{ic|stagingpkg}} for [[Official_repositories#Staging_repositories|staging]], {{ic|testingpkg}} for [[Official_repositories#testing|testing]]), e.g.:
+
When you're ready to proceed, you can run the devtools scripts to sign, upload and commit your work (i.e. {{ic|communitypkg}} for [[公式リポジトリ#community|community]], {{ic|community-stagingpkg}} for [[公式リポジトリ#Staging_repositories|community-staging]], {{ic|community-testingpkg}} for [[公式リポジトリ#community-testing|community-testing]], {{ic|extrapkg}} for [[公式リポジトリ#extra|extra]], {{ic|gnome-unstablepkg}} for [[公式リポジトリ#gnome-unstable|gnome-unstable]], {{ic|kde-unstablepkg}} for [[公式リポジトリ#kde-unstable|kde-unstable]], {{ic|multilibpkg}} for [[公式リポジトリ#multilib|multilib]], {{ic|multilib-stagingpkg}} for [[公式リポジトリ#Staging_repositories|multilib-staging]], {{ic|multilib-testingpkg}} for [[公式リポジトリ#multilib-testing|multilib-testing]], {{ic|stagingpkg}} for [[公式リポジトリ#Staging_repositories|staging]], {{ic|testingpkg}} for [[公式リポジトリ#testing|testing]]), e.g.:
   
 
extrapkg "update to 1.2.3, add post_upgrade hook to fix permissions"
 
extrapkg "update to 1.2.3, add post_upgrade hook to fix permissions"
153行目: 154行目:
 
This will upload the package and its signature to their repository specific location in your user's {{ic|~/staging}} directory on {{ic|repos.archlinux.org}}.
 
This will upload the package and its signature to their repository specific location in your user's {{ic|~/staging}} directory on {{ic|repos.archlinux.org}}.
   
=== Update the Repository ===
+
=== リポジトリの更新 ===
 
Using {{ic|db-update}} will find new packages for a set of repositories, depending on which is being called.
 
Using {{ic|db-update}} will find new packages for a set of repositories, depending on which is being called.
   
To release uploaded packages to [[Official_repositories#core|core]], [[Official_repositories#extra|extra]], [[Official_repositories#gnome-unstable|gnome-unstable]], [[Official_repositories#kde-unstable|kde-unstable]], [[Official_repositories#Staging_repositories|staging]], or [[Official_repositories#testing|testing]] use:
+
To release uploaded packages to [[公式リポジトリ#core|core]], [[公式リポジトリ#extra|extra]], [[公式リポジトリ#gnome-unstable|gnome-unstable]], [[公式リポジトリ#kde-unstable|kde-unstable]], [[公式リポジトリ#Staging_repositories|staging]], or [[公式リポジトリ#testing|testing]] use:
   
 
ssh repos.archlinux.org "/packages/db-update"
 
ssh repos.archlinux.org "/packages/db-update"
   
To release uploaded packages to [[Official_repositories#community|community]], [[Official_repositories#Staging_repositories|community-staging]], [[Official_repositories#community-testing|community-testing]], [[Official_repositories#multilib|multilib]], [[Official_repositories#Staging_repositories|multilib-staging]], or [[Official_repositories#multilib-testing|multilib-testing]] use:
+
To release uploaded packages to [[公式リポジトリ#community|community]], [[公式リポジトリ#Staging_repositories|community-staging]], [[公式リポジトリ#community-testing|community-testing]], [[公式リポジトリ#multilib|multilib]], [[公式リポジトリ#Staging_repositories|multilib-staging]], or [[公式リポジトリ#multilib-testing|multilib-testing]] use:
   
 
ssh repos.archlinux.org "/community/db-update"
 
ssh repos.archlinux.org "/community/db-update"
   
== Other Operations ==
+
== 他の操作 ==
   
=== Removing a Package ===
+
=== パッケージの削除 ===
 
Using {{ic|db-remove}} will remove a package from a specific binary repository.
 
Using {{ic|db-remove}} will remove a package from a specific binary repository.
   
To remove a package from [[Official_repositories#core|core]], [[Official_repositories#extra|extra]], [[Official_repositories#gnome-unstable|gnome-unstable]], [[Official_repositories#kde-unstable|kde-unstable]], [[Official_repositories#Staging_repositories|staging]], or [[Official_repositories#testing|testing]] use:
+
To remove a package from [[公式リポジトリ#core|core]], [[公式リポジトリ#extra|extra]], [[公式リポジトリ#gnome-unstable|gnome-unstable]], [[公式リポジトリ#kde-unstable|kde-unstable]], [[公式リポジトリ#Staging_repositories|staging]], or [[公式リポジトリ#testing|testing]] use:
   
 
ssh repos.archlinux.org "/packages/db-remove <repo> <arch> <package_name>"
 
ssh repos.archlinux.org "/packages/db-remove <repo> <arch> <package_name>"
177行目: 178行目:
 
ssh repos.archlinux.org "/packages/db-remove core x86_64 openssh"
 
ssh repos.archlinux.org "/packages/db-remove core x86_64 openssh"
   
To remove a package from [[Official_repositories#community|community]], [[Official_repositories#Staging_repositories|community-staging]], [[Official_repositories#community-testing|community-testing]], [[Official_repositories#multilib|multilib]], [[Official_repositories#Staging_repositories|multilib-staging]], or [[Official_repositories#multilib-testing|multilib-testing]] use:
+
To remove a package from [[公式リポジトリ#community|community]], [[公式リポジトリ#Staging_repositories|community-staging]], [[公式リポジトリ#community-testing|community-testing]], [[公式リポジトリ#multilib|multilib]], [[公式リポジトリ#Staging_repositories|multilib-staging]], or [[公式リポジトリ#multilib-testing|multilib-testing]] use:
   
 
ssh repos.archlinux.org "/community/db-remove <repo> <arch> <package_name>"
 
ssh repos.archlinux.org "/community/db-remove <repo> <arch> <package_name>"
197行目: 198行目:
 
svn rm svn+ssh://svn-packages@repos.archlinux.org/srv/repos/svn-packages/svn/<PKG>
 
svn rm svn+ssh://svn-packages@repos.archlinux.org/srv/repos/svn-packages/svn/<PKG>
   
  +
=== リポジトリ間でのパッケージの移動 ===
=== Moving a package between repos ===
 
 
Using {{ic|db-move}} will move a package between two binary repositories.
 
Using {{ic|db-move}} will move a package between two binary repositories.
   
To move a package somewhere between [[Official_repositories#core|core]], [[Official_repositories#extra|extra]], [[Official_repositories#gnome-unstable|gnome-unstable]], [[Official_repositories#kde-unstable|kde-unstable]], [[Official_repositories#Staging_repositories|staging]], or [[Official_repositories#testing|testing]] use:
+
To move a package somewhere between [[公式リポジトリ#core|core]], [[公式リポジトリ#extra|extra]], [[公式リポジトリ#gnome-unstable|gnome-unstable]], [[公式リポジトリ#kde-unstable|kde-unstable]], [[公式リポジトリ#Staging_repositories|staging]], or [[公式リポジトリ#testing|testing]] use:
   
 
ssh repos.archlinux.org "/packages/db-move <from_repo> <to_repo> <package_name>"
 
ssh repos.archlinux.org "/packages/db-move <from_repo> <to_repo> <package_name>"
209行目: 210行目:
   
   
To move a package somewhere between [[Official_repositories#community|community]], [[Official_repositories#Staging_repositories|community-staging]], [[Official_repositories#community-testing|community-testing]], [[Official_repositories#multilib|multilib]], [[Official_repositories#Staging_repositories|multilib-staging]], or [[Official_repositories#multilib-testing|multilib-testing]] use:
+
To move a package somewhere between [[公式リポジトリ#community|community]], [[公式リポジトリ#Staging_repositories|community-staging]], [[公式リポジトリ#community-testing|community-testing]], [[公式リポジトリ#multilib|multilib]], [[公式リポジトリ#Staging_repositories|multilib-staging]], or [[公式リポジトリ#multilib-testing|multilib-testing]] use:
   
 
ssh repos.archlinux.org "/community/db-move <from_repo> <to_repo> <package_name>"
 
ssh repos.archlinux.org "/community/db-move <from_repo> <to_repo> <package_name>"
225行目: 226行目:
 
If a package is only in testing, you have to use ''testing2core'', ''testing2core64'', ''testing2extra'' or ''testing2extra64''.
 
If a package is only in testing, you have to use ''testing2core'', ''testing2core64'', ''testing2extra'' or ''testing2extra64''.
   
For the special case of moving a binary package and its version controlled [[PKGBUILD]] (and potentially additional files) between [[Official_repositories#community|community]] and [[Official_repositories#extra|extra]] (either direction), there are the two devtools helper scripts {{ic|community2extra}} and {{ic|extra2community}}.
+
For the special case of moving a binary package and its version controlled [[PKGBUILD]] (and potentially additional files) between [[公式リポジトリ#community|community]] and [[公式リポジトリ#extra|extra]] (either direction), there are the two devtools helper scripts {{ic|community2extra}} and {{ic|extra2community}}.
   
E.g. to move a a package from [[Official_repositories#community|community]] to [[Official_repositories#extra|extra]], use:
+
E.g. to move a a package from [[公式リポジトリ#community|community]] to [[公式リポジトリ#extra|extra]], use:
 
community2extra <package_name>
 
community2extra <package_name>
   
=== "Tagging" releases ===
+
=== リリースの "タグ付け" ===
   
 
Fetch the package dir using {{ic|archco}} or {{ic|communityco}} or from an svn checkout.
 
Fetch the package dir using {{ic|archco}} or {{ic|communityco}} or from an svn checkout.
238行目: 239行目:
   
 
This makes an svn copy of the trunk entries in a directory named {{ic|extra-x86_64}} indicating that this package is in the extra repository for the ''x86_64'' architecture.
 
This makes an svn copy of the trunk entries in a directory named {{ic|extra-x86_64}} indicating that this package is in the extra repository for the ''x86_64'' architecture.
This will be done automatically when using tools such as {{ic|extrapkg}} (see [[DeveloperWiki:HOWTO_Be_A_Packager#Use_devtools_to_sign.2C_upload_and_commit|Use devtools to sign, upload and commit]]).
+
This will be done automatically when using tools such as {{ic|extrapkg}} (see [[#devtools を使って署名・アップロード・コミット|Use devtools to sign, upload and commit]]).
   
   
== Miscellaneous Stuff ==
+
== その他 ==
   
  +
=== チェックアウトのクリーンアップ ===
=== Cleaning up your checkout ===
 
   
 
Since you are now maintaining a non-recursive checkout, you may want to get rid of packages that you are no longer tracking:
 
Since you are now maintaining a non-recursive checkout, you may want to get rid of packages that you are no longer tracking:
253行目: 254行目:
 
svn update --set-depth empty
 
svn update --set-depth empty
   
  +
=== 毎回のパスワード入力を省略する ===
=== Avoid having to enter your password all the time ===
 
   
 
When working with {{ic|extrapkg}} and the other devtools, quite a few ssh connections are established, even when using ssh keys and the ssh agent.
 
When working with {{ic|extrapkg}} and the other devtools, quite a few ssh connections are established, even when using ssh keys and the ssh agent.

2020年5月16日 (土) 13:33時点における版

パッケージガイドラインに従う

Package guidelines can be found in the Arch Linux documentation. Please follow them closely.

Arch パッケージガイドライン


準備とセットアップ

パッケージのインストール

Make sure you have the packages devtools and namcap installed.

SSH 設定

If you have multiple SSH keys in your SSH Agent, you will need to make sure that the correct key is being used to contact the Arch servers. Also, when your local username differs from the one being used on the Arch servers, you need to take care of that too.

Example ~/.ssh/config excerpt:

host repos.archlinux.org
	hostname repos.archlinux.org
	port 22
	user foobar
	IdentityFile ~/.ssh/id_arch
	IdentitiesOnly yes

makepkg 設定

Make sure to configure your ~/.makepkg.conf with the correct PACKAGER and GPGKEY variables. Wrong signatures or missing PACKAGER will prevent your packages from entering the repository.

PACKAGER="Foo Bar <foo.bar@archlinux.org>"
GPGKEY="0x0123456789abcdef"

非再帰的チェックアウトを使ったローカルの SVN セットアップ

As SVN provides the ability to do scoped checkouts you can initialize an empty local checkout and later on only fetch the packages that you want. To setup the local checkouts run the following commands.

For core, extra, testing and staging repos:

  svn checkout -N svn+ssh://svn-packages@repos.archlinux.org/srv/repos/svn-packages/svn svn-packages

For community, community-testing, community-staging, multilib, multilib-testing, multilib-staging:

  svn checkout -N svn+ssh://svn-community@repos.archlinux.org/srv/repos/svn-community/svn svn-community

This creates two directories named svn-packages and svn-community which contain nothing but are properly setup as svn repositories.

ヘルパースクリプト (任意)

ch

This shell script eases setting up and maintaining the chroots for building the packages immensely. The script has been developed by Bluewind and can be found here: ch.

As this script relies on Btrfs, you have to create a Btrfs volume (20GiB is mostly sufficient), which can either be a file, a logical volume or a dedicated partition. Furthermore by default this script assumes that the Btrfs for the chroots is mounted at /mnt/chroots/arch.

Afterwards you can create a 64bit package using:

  ch build 64

(automatically and conveniently invokes makechrootpkg with all required arguments)

For further details please take a look at the head of the script, it provides some explanations and usage examples.


ワークフロー

ローカルリポジトリのチェックアウト・更新

  cd svn-community
  # update a specific package
  svn update <package_name>
  # update all packages
  svn update

新しいパッケージの追加

This step is only required when adding a new package to the repository for the first time.

  cd svn-community
  mkdir -p new-package/{repos,trunk}
  cd new-package
  cp /usr/share/pacman/PKGBUILD.proto trunk/PKGBUILD
  $EDITOR trunk/PKGBUILD
  svn add .
  svn commit

必要なパッケージの更新

  svn update some-package

変更とビルド

It is mandatory to build your package using a clean chroot. To ensure this, build with the scripts provided by devtools (i.e. extra-x86_64-build for extra and community, multilib-build for multilib, multilib-staging-build for multilib-staging, multilib-testing-build for multilib-testing, staging-x86_64-build for staging and community-staging, testing-x86_64-build for testing and community-testing).

  cd some-package/trunk/
  $EDITOR PKGBUILD
  extra-x86_64-build

Or, if you are using the ch helper, simply do:

  cd some-package/trunk/
  $EDITOR PKGBUILD
  ch clean 64
  ch update 64
  ch build 64

PKGBUILD とパッケージに namcap を実行

ノート: This is automatically done, when using the devtools build scripts.
  namcap PKGBUILD
  namcap some-package-1.0-1-x86_64.pkg.tar.xz

パッケージの checkpkg を実行

Run in the directory with your freshly built package to get a file list diff compared with the package version currently in the repos.

   checkpkg
ノート: This can be skipped when adding a new package to the repository for the first time (e.g. by importing it from AUR to community).

識別された soname の変更に sogrep を実行

If checkpkg identified a shared object name (aka. soname) change in package's library package.so, it is required to rebuild packages directly depending on it.

To identify which packages rely on a given library in package in a repository (e.g. extra or community), use sogrep (see sogrep(1)).

   sogrep <repository> package.so

Build package for its respective staging environment (by following the remaining steps in The Workflow) and create a TODO with the identified dependants, so their maintainers can rebuild them against the new version of package.

ノート: First sync with trusted users and/ or developers, if any packages currently in the staging environment block the rebuilds against package.

devtools を使って署名・アップロード・コミット

Once you are satisfied with the package, you need to make sure all your changes are tracked in the repository. Run:

  svn status

in the some-package/trunk/ directory and check the output carefully. If, for example, you have added a new some-package.install file, you need to tell svn to track that file, e.g.:

  svn add some-package.install

Make sure to never add the binary packages, makepkg logs, etc. to the repository!

When you're ready to proceed, you can run the devtools scripts to sign, upload and commit your work (i.e. communitypkg for community, community-stagingpkg for community-staging, community-testingpkg for community-testing, extrapkg for extra, gnome-unstablepkg for gnome-unstable, kde-unstablepkg for kde-unstable, multilibpkg for multilib, multilib-stagingpkg for multilib-staging, multilib-testingpkg for multilib-testing, stagingpkg for staging, testingpkg for testing), e.g.:

  extrapkg "update to 1.2.3, add post_upgrade hook to fix permissions"

Please try to write concise commit messages. If the package is simply an upstream change, that is fine, but if anything more complex changes, please inform us by writing an appropriate commit message.

This will upload the package and its signature to their repository specific location in your user's ~/staging directory on repos.archlinux.org.

リポジトリの更新

Using db-update will find new packages for a set of repositories, depending on which is being called.

To release uploaded packages to core, extra, gnome-unstable, kde-unstable, staging, or testing use:

  ssh repos.archlinux.org "/packages/db-update"

To release uploaded packages to community, community-staging, community-testing, multilib, multilib-staging, or multilib-testing use:

  ssh repos.archlinux.org "/community/db-update"

他の操作

パッケージの削除

Using db-remove will remove a package from a specific binary repository.

To remove a package from core, extra, gnome-unstable, kde-unstable, staging, or testing use:

  ssh repos.archlinux.org "/packages/db-remove <repo> <arch> <package_name>"

e.g.

  ssh repos.archlinux.org "/packages/db-remove core x86_64 openssh"

To remove a package from community, community-staging, community-testing, multilib, multilib-staging, or multilib-testing use:

  ssh repos.archlinux.org "/community/db-remove <repo> <arch> <package_name>"

e.g.

  ssh repos.archlinux.org "/community/db-remove community x86_64 jack2"

If removing the package from the repositories altogether, it is encouraged to remove the entire package directory from version control as well.

   svn update <package_name>
   svn rm --force <package_name>
   svn commit <package_name> -m "Deleting <package_name> because of reason."

Sometime the previous command yields:

   svn: E155035: "'/path/to/pkg/<PKG>' is the root of a working copy and cannot be deleted"

You can remotely remove it with:

   svn rm svn+ssh://svn-packages@repos.archlinux.org/srv/repos/svn-packages/svn/<PKG>

リポジトリ間でのパッケージの移動

Using db-move will move a package between two binary repositories.

To move a package somewhere between core, extra, gnome-unstable, kde-unstable, staging, or testing use:

  ssh repos.archlinux.org "/packages/db-move <from_repo> <to_repo> <package_name>"

e.g.:

  ssh repos.archlinux.org "/packages/db-move testing core openssh"


To move a package somewhere between community, community-staging, community-testing, multilib, multilib-staging, or multilib-testing use:

  ssh repos.archlinux.org "/community/db-move <from_repo> <to_repo> <package_name>"

e.g.:

  ssh repos.archlinux.org "/community/db-move community-testing community jack2"

Alternatively, the move from testing is so common, that there are helper scripts:

  /packages/testing2x openssh bzip2 coreutils
  /packages/testing2x64 openssh bzip2 coreutils

These scripts only work if the packages on the commandline are either in core or extra. If a package is only in testing, you have to use testing2core, testing2core64, testing2extra or testing2extra64.

For the special case of moving a binary package and its version controlled PKGBUILD (and potentially additional files) between community and extra (either direction), there are the two devtools helper scripts community2extra and extra2community.

E.g. to move a a package from community to extra, use:

   community2extra <package_name>

リリースの "タグ付け"

Fetch the package dir using archco or communityco or from an svn checkout. Then:

  cd package-name/trunk
  archrelease extra-x86_64

This makes an svn copy of the trunk entries in a directory named extra-x86_64 indicating that this package is in the extra repository for the x86_64 architecture. This will be done automatically when using tools such as extrapkg (see Use devtools to sign, upload and commit).


その他

チェックアウトのクリーンアップ

Since you are now maintaining a non-recursive checkout, you may want to get rid of packages that you are no longer tracking:

  svn update package1 package2 --set-depth exclude

Or if you want an empty toplevel again:

  svn update --set-depth empty

毎回のパスワード入力を省略する

When working with extrapkg and the other devtools, quite a few ssh connections are established, even when using ssh keys and the ssh agent. You can work around that.

Add this to your ~/.ssh/config:

  ControlPath ~/.ssh/master-%h-%p-%r
  
  Host repos.archlinux.org

Now, before you start working, open a ssh session with

  ssh -M repos.archlinux.org

Enter your password and leave that session open until you are finished. All ssh sessions (including scp and svn+ssh) will now be tunneled through this connection.