| 50 | |
| 51 | = Arch Build System = |
| 52 | * archja:Arch_Build_System |
| 53 | * /etc/abs.conf |
| 54 | {{{#!diff |
| 55 | -MIRRORLIST="/etc/pacman.d/mirrorlist" |
| 56 | +MIRRORLIST="/etc/pacman.d/mirrorlist.jp" |
| 57 | }}} |
| 58 | * ミラーをmirrorlist以外のファイルに独自に追加している場合など |
| 59 | * $ abs |
| 60 | {{{ |
| 61 | ==> ERROR: No mirrors found in mirrorlist file /etc/pacman.d/mirrorlist |
| 62 | }}} |
| 63 | |
| 64 | * archja:Makepkg |
| 65 | * https://www.archlinux.org/pacman/makepkg.8.html |
| 66 | * /etc/makepkg.conf (デフォルトのインストール設定では、/tmpはtmpfsになるので注意) |
| 67 | {{{#!diff |
| 68 | --- a/etc/makepkg.conf |
| 69 | +++ b/etc/makepkg.conf |
| 70 | @@ -37,11 +37,11 @@ CHOST="x86_64-unknown-linux-gnu" |
| 71 | # -march (or -mcpu) builds exclusively for an architecture |
| 72 | # -mtune optimizes for an architecture, but builds for whole processor family |
| 73 | CPPFLAGS="-D_FORTIFY_SOURCE=2" |
| 74 | -CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" |
| 75 | -CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" |
| 76 | +CFLAGS="-march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" |
| 77 | +CXXFLAGS="${CFLAGS}" |
| 78 | LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro" |
| 79 | #-- Make Flags: change this for DistCC/SMP systems |
| 80 | -#MAKEFLAGS="-j2" |
| 81 | +MAKEFLAGS="-j8" |
| 82 | #-- Debugging flags |
| 83 | DEBUG_CFLAGS="-g -fvar-tracking-assignments" |
| 84 | DEBUG_CXXFLAGS="-g -fvar-tracking-assignments" |
| 85 | @@ -66,7 +66,7 @@ BUILDENV=(!distcc color !ccache check !sign) |
| 86 | #DISTCC_HOSTS="" |
| 87 | # |
| 88 | #-- Specify a directory for package building. |
| 89 | -#BUILDDIR=/tmp/makepkg |
| 90 | +BUILDDIR=/tmp/makepkg |
| 91 | |
| 92 | ######################################################################### |
| 93 | # GLOBAL PACKAGE OPTIONS |
| 94 | }}} |
| 95 | |
| 96 | == build kernel == |
| 97 | * abs/makepkg を使う場合 |
| 98 | |
| 99 | 1. abs/core/linux を適宜コピー |
| 100 | 2. {{{xmlto docbook-xsl bc}}}パッケージをインストール |
| 101 | 3. gpg keyのインポート |
| 102 | {{{ |
| 103 | ==> Verifying source file signatures with gpg... |
| 104 | linux-4.0.tar ... FAILED (unknown public key 79BE3E4300411886) |
| 105 | patch-4.0.5 ... FAILED (unknown public key 38DBBDC86092693E) |
| 106 | ==> ERROR: One or more PGP signatures could not be verified! |
| 107 | }}} |
| 108 | * gpg --recv-keys 79BE3E4300411886 |
| 109 | * gpg --recv-keys 38DBBDC86092693E |
| 110 | * see also [https://bbs.archlinux.org/viewtopic.php?id=192347 (SOLVED) gpg cannot add pkgbuild keys / System Administration / Arch Linux Forums] |
| 111 | 4. makepkg |
| 112 | * 数10分待機すると、{{{linux-custom-4.0.5-1-x86_64.pkg.tar.xz}}}が出来上がるので、適宜{{{pacman -U}}}, {{{grub-mkconfig -o /boot/grub/grub.cfg}}}する |
| 113 | |
| 114 | * 手動でパッチなどを当てる場合 |
| 115 | 1. {{{PKGBUILD}}}からソースのDL、展開、公式パッチ適用 |
| 116 | * {{{makepkg -o}}} |
| 117 | 2. 適宜ソースを修正 |
| 118 | 3. make |
| 119 | * {{{make -j8 LOCALVERSION= bzImage modules}}}もしくは{{{makepkg --noextract --noarchive}}} |
| 120 | * 後者だとfakeroot installされる |
| 121 | 4. {{{makepkg -R}}} |