mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-24 09:17:15 +01:00
genkernel: overlayfs testing
This commit is contained in:
parent
00b340713b
commit
a14db17c8d
9 changed files with 927 additions and 0 deletions
25
sys-kernel/genkernel/Manifest
Normal file
25
sys-kernel/genkernel/Manifest
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
DIST LVM2.2.02.88.tgz 1029151 SHA256 a129d1d3949524da7d6d2a67218254baea02df06a6744faa5808a4182b2fb432 SHA512 5c334c2c78220f4f9f082a74cbf0b156e96f2a07b5e55f054ff70c752ada97a67f83fa1d89c02accb7cbe5a62e356588831d96a102b7bf16cdce2591d4e37e4b WHIRLPOOL b30a1f2403e71ff6fb381ec82291018632e1d10258dd615efae4e39077a304a66271013247793390f57c26886599d8bad8f4b896d230f3e4f846e74c12282f71
|
||||
DIST busybox-1.20.2.tar.bz2 2186738 SHA256 eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882 SHA512 089b67cd920f332daf910711739b1e55ba4c76cfa2122dfe5464432e0d76d3af8327837ebc3cc9954deef3e8f766d16a1928aecb2c169fe3de5a722eea7ea3dd WHIRLPOOL aa8fec92d0ac8bb246dea7353537d425a5fecfa0bb807d0e291c7351e8289b84aab83303c45b75f9b7a98cd10177e210511064f0709425c2f84b069fe6a06420
|
||||
DIST busybox-1.26.0.tar.bz2 2143958 SHA256 3ad227375ee870d529007f6ce83f173b8bd5a37df624ecb460295554261c0f4c SHA512 9e38c2f4c5ddb6c3a184170b5526c1a78cf53a575ed359fb18c407976cab9788fa95a26ca2d4e5c32e1d639890944d98e118149ee1402b18fe085b0baf0186d3 WHIRLPOOL c8a7419bd711d3e0249807ef9f9ff6123ff8d0767479ea3b3e54ef48f6132514942bc37b79334ca2afd6009d32c5e242712bd6b3995f49904c33040c66df9dcc
|
||||
DIST dmraid-1.0.0.rc16-3.tar.bz2 232743 SHA256 93421bd169d71ff5e7d2db95b62b030bfa205a12010b6468dcdef80337d6fbd8 SHA512 7c45e5117adc52fc2094b1b2bad4f4c518a46317a2196611966d72085ba3587c4ac8d1080f9d934888c01788f2b2d3d621c6f0d3e2a023c0fb1f9f3fa7fc127e WHIRLPOOL 87915ea0013766da8a9722b437bfe146b4b2c7560a7814ac6caab92054ddc3b4b59ceb4d413609d5eaab92b5cee67886ade7924455f1dba19f1b8dabc25d3498
|
||||
DIST fuse-2.8.6.tar.gz 505334 SHA256 1ec1913e38f09b2a9ec1579e1800805b5e2c747d1dce515e316dbb665ca139d6 SHA512 03cacc45c8ba6700fcdfa9064ef4e10d3ad6fc0e4fc49d41693de2caf03d44513d449b00a7c5d200d055d9481821252509259f5f3d2d6127fa51957a006a90fd WHIRLPOOL 668c01f5ae9742f3e70248d6d2b57cbeaa0decf93d5f7987550fe54d4ebdb6e445ff841e8d36a60a4824c114651b8a93b118e15b8a00ac30ddc813e583fa2b51
|
||||
DIST genkernel-3.4.45.1.tar.bz2 265391 SHA256 8285aff3b27a56a2bbb9c8d91d8c8332f8fc15df7eb892f618859a5a74f92981 SHA512 4333cb4d2eceb8d25bd7e86c0a9cc11576926eceabed9e00a52ab6e3b341a8beb0c83e61bf1ffb5e865956d54be145f971a89a992496837f539def449efde3a4 WHIRLPOOL 3e9d94e7e6a3836ee327cb53eef746904eb2a146375508ca3f5cf25dfcb2ee98e7b23dd21aae3d3bd370630354a4ea86e2c0e50d3394b61ca82b4e63b3c99676
|
||||
DIST genkernel-3.4.48.tar.bz2 274876 SHA256 ac35531074765afdab6d1762f9facaf8b0d799797d4ec95885bd20a2f41c9727 SHA512 707c06f90a57502ee3bd3f4ef4be58d6dfba0839299baed38d75e4962b04fe8de24d01c480ea3d1bfa2fa1cdf935da3dd5ccb2ddb24e7be9eddf2ed01fc6ddb8 WHIRLPOOL a42939de0b606ac7499a8f194828bd4983fdfb94b220af66b850353a2ee0861e61ea6c9f5cbd62f5f30dc3e14f0b347068576f6df5a191e64bb7ab29a30a6cd3
|
||||
DIST genkernel-3.4.49.2.tar.bz2 266427 SHA256 62ade4f83cefc2278e1dc7cf1456974b037a2aedc6dafcaf05c02b53e29a6e34 SHA512 f66b0107438d420a16de546ee28e2a2f09281fcf21c2ffc26c94438ba4c7467e607bf296081954e90d01a92e7db7642091267bade458b837758041a64b0b97ea WHIRLPOOL 626adac32a9b4c9f1ab9acc62a2354d894db806171a4fe28bd4697e28b7315d2ac1da1fcc438fbdb8ce5d9ce9bb88269c4e4f549122bae425b8d98e7f32315fa
|
||||
DIST genkernel-3.4.50.tar.bz2 273874 SHA256 d1450b9a38837147f3ec2600bcd05a56df5537a1d9de0c41db123833a5f2f450 SHA512 8b56c0736abaffa1c04dd1315d38ed35be46b72a2e20b5602e946dbabde9c05a66691d3059306f58a17f436124912dd0b39ccc012fff8562b1531cfcb90e7d28 WHIRLPOOL 09d88f2013267021e792b784850057472b40d216b45c8cd8f67c9340c30ee4cdf8161beaa7fd628fb71755a35fed6e64adddd9b957f5c5b7698207fb70d4a7e4
|
||||
DIST genkernel-3.4.51.4.tar.xz 250400 SHA256 72062b11628eb967690691a7003625fffcd183117a22a8ae718e9bec116ec24f SHA512 85c138fea889b12662e9b0a782b1cd9121c740de35d96f3c56ed37d13fdc0178b265a30f409e7247b69ed4209e5dd13e9cff297079d626bad85f8846d8144e3b WHIRLPOOL 4ca49fe6cf5307ee950da89862a915766a6ca9b36995bb3937ff42cce2f250a845b9733c773e5f77212f2e4b15bfef5aade1f378bd71d7097f8d73292db3df44
|
||||
DIST genkernel-3.4.52.2.tar.xz 278792 SHA256 3bb893bcf6b3bcf11ded61127a4321df8d4405d196ae256873b9c6680310cb6e SHA512 af8c93b77bdc7601e102311e1a2e168400a83ebf0d664d67fa99e0f4891835c62627cbce5be0e2d14b7e16389441643e90386fe258b4164c1ea414edba7a8557 WHIRLPOOL d2d527a64db46386af6f3b09d37aca0aef6aaecda7249c9247c7c81e6f31d4cec1160473feb5a55750331e80232c140b70ad9cf77f6026fb4173f539cdc170b4
|
||||
DIST genkernel-3.4.52.3.tar.xz 282976 SHA256 7873c7ff94f3a36f2c71f4915e82b92afd16f1ecd29af290c5d3e8d300857bf5 SHA512 a68b0149b9a69f59ab3e8d772f35f12643b9500c0c684d4824ca1f3c669b0ea01989a55643cd5b413f35d6fff284cd5ede7183971e202b3788caeb399259191f WHIRLPOOL 6212b7df42755784ade2741150e7093c3dea440cc89897991985fb867d46a05b56931d1a7b083f141fd71ffe96237b1cd26d53ce4e35a155f28508a8e131c03f
|
||||
DIST genkernel-3.4.52.4.tar.xz 284064 SHA256 3a2fd217c4817f4b8a4a1bef7051c373f10fddd6983125b61050a134c4a78c2a SHA512 2dcdf2acb19c868ea7bfd5a0f9c7c3b179ac0f9f31b74306641dd8a1e8b076f5122e60a96c006e20f634e9e540d51723ef94bf91d8e28217dbb2159ff4d896dc WHIRLPOOL 92ec9850ec67e3b227dc8689a494fb31554872ad772fdfdb152fe2033fcaff9c34669b3a76806171bb3971e34e2ea63d118ab268220d18669b298574e976edda
|
||||
DIST genkernel-3.5.0.0.tar.xz 283880 SHA256 11d20c45d9dd0b75de1526805d11c578d8d4003e9e0761e4caa42f36021b568f SHA512 8c54981da2b98ae20f96a27e7a7583ea53e75b24d8e787a469e8ff4252c1f66feb7726657e48f5afc26f08d091aec81271670d02e048121e4c96018c91be38a7 WHIRLPOOL 4a7c36cee89d98bea05bd5fc626a744b7b519bc4a4dde6f6edb001ee9ba2a7fc33e7addf066a30d755d1088a1c6b6cdbe89fee4ae71f56bb960a3b0b2710256b
|
||||
DIST genkernel-3.5.0.1.tar.xz 284736 SHA256 333460df76260e494d353850687f0891e88382a1bcba71999a6879b257dadd1a SHA512 2ff6c38686e00c5e84312fbe33f3ac3579a5169a98f6bc29ee6c718864b6187fde8f21536767fdaaddfcc7a405c6ebff3c2b7f095ec137e74bc7c028e9a19447 WHIRLPOOL 4dbc053c6af4ef490b9575e942a525d21fedf3ab3b626355f131074d1d67bf393f05785497de50bc2b6a26f3dcc9518e021054603994c1bdb42323e3031976eb
|
||||
DIST genkernel-3.5.0.2.tar.xz 285696 SHA256 757774319091eaa9477cf814efc7e8be0e74e18daf313894726722c30509dae7 SHA512 3f714754cb0981ba4f41ba338ac5ec5f7e0a9c69d6de649dac769ae41383636f198fd9b2540af4c2391d7b33702d70c279b08f1793436cedb0165f22b64f3b1a WHIRLPOOL 7e11aa2a533c06935328421a53bbfc496e9937231394f0322b4a5cafc35801a5386acf906a47f6c6765457b0f6dcf7ed307f0ad0b7871e69fcd835016ac06dd8
|
||||
DIST genkernel-3.5.0.3.tar.xz 283456 SHA256 0b9714561569c203222cf50af57f246761ada0ac3991c165ed782804b0c031da SHA512 27f6bd00727d685eb81853696d53a0f3efc8bac311c1f562f15ad7f56043687487fbe8367df98ddb976665e732eac107ced63735a731b03e6ca79c3de292cff7 WHIRLPOOL 20f4fb97c7476c7ee96ffa8e403c167d18a48c666f409dfd4c060dc108a47b498256414d8e986433d25babc86cc508be81c70fde3f5b6666b3e25f9c2f0b242b
|
||||
DIST genkernel-3.5.0.4.tar.xz 283608 SHA256 4555681354d97cbed2e0a696ab62937bede4f1efb450235db7438197952154c6 SHA512 3edd55f0f83fe2f85099fe8fc56d97a9179596d42d0495810494441ac72ab146a5d4a071ca9955503b54d7af03423b9387d0edb8e4ffec56ffd8de03cde13ffa WHIRLPOOL 8a9bc392a1ec80bd05ec7e0f16afe3eacd0519607b5c2502d0389f9ea1ecb483b57e7777013d627b5e899547e8b38a6360095a719d902c12f7b1addb349c670c
|
||||
DIST genkernel-3.5.0.5.tar.xz 284000 SHA256 f3d4e5e878100566c1d12b9c9c4e081384a2ae89c21f9dd94bb9100c582a7872 SHA512 9441dc0aac22ab33f3c8600f0e775d440197af0d0821f17fd6dea5a9de0b4758a3cd34e3cd7130add41a2af39106b4a7478e1b553dbd67fabfcd960f09ef0364 WHIRLPOOL 76ff696d0168a226e371b50feed983edb15cceebff9054ad926cd66b3785df6bf4b6587d02b8a8e82b1173622e0bfb7a28203558ebdf94d825faecedb83409ec
|
||||
DIST genkernel-3.5.0.6.tar.xz 284972 SHA256 03e96d05ace6e418fd49c4662ac56cad64005ee112f1ab69cf9bdc61fd903bf8 SHA512 113923bf77dfc0edc0ab16016a09ff3fc0fa3b37101575c934c5b38b43c8bdc40a0dc8795758b4f92c507e8b28da1912b21ca18bc07c43e7d1cc10bed0734322 WHIRLPOOL d2e8ac345f382ba157b9e04a86f852fb1cac35b7e41e3fc75d9ec31771f65bab5befe3420f6788b4cfae90371c7e300e4e1f459bc1a37d98a118dce1e0e04cd1
|
||||
DIST genkernel-3.5.0.8.tar.xz 287876 SHA256 17f5722666c1e9eaa40dde198b9a498cfd336d7b7e525ce94c25b404573ba2f4 SHA512 92014ef2af4e52b20647fee344eecd91c943750e0095a552615367229eff875ee6fd70c6bf256d79a8c04cab6f6ade7b669f1cca435cd5a0faacdccd524ac648 WHIRLPOOL ea173a208c943d41ce1449118930091a767584eade89d2b9f8288fa92405a5e83270c919e35e3a0a68e8804468bc32a2cccf4d9ecf6d9fe3850f83465413a26f
|
||||
DIST gnupg-1.4.11.tar.bz2 3407075 SHA256 d18ceeac16e554a501170b9bfde611625252d0fe9448685a69c93bf149ee6ef6 SHA512 97e7b8b0f972cc2f7cabdb0e013cbee1c33e7d48407d040cca5c2037e32abe1c2100194be7d3b569d4f05eb16b24c205a5b83f06718f0241f8d4ee174f1c37ae WHIRLPOOL 6f914627e2f527f6616e1f99d2ae06942b734f839d03a45ffa45bf67516a81d58f89e6a85612cf8e5fd83be04ab0b6bc2da8f81114143dad7523e5fcea62366b
|
||||
DIST mdadm-3.1.5.tar.bz2 292709 SHA256 1d547d0b36a88968e9fc9fb08b0e64de54a53f3d1cfa3656a9f319180f0727d3 SHA512 6fcf426d63ede01f99ebeee9be686857a04f9b601b37f76722c091ae2999b3ff66fdba52d47323f27900553125a897fc1815fe7be850aa9cc991dd5fa91a5d5d WHIRLPOOL 003595a1338b3a95ccc176b07a31f26dd5fda9460f2c4d3513b9ca09cdab1c91dab05f8914f2354047fccff42c4dcfc6131a383c84467c2838ac7b1af2f9bef8
|
||||
DIST open-iscsi-2.0-872.tar.gz 900081 SHA256 37753697a170223ac02a292b3a23a315a3c747b490c42480e4057b676c9f8d4f SHA512 d26c87772b0b1d13a8bd2eea9db86b3c61af83efbb788116c01ab6a914ff3de634a7b1bff56c1161b28965315543edbfc2735b6c7fbd3f7797471fde63b69cc0 WHIRLPOOL 4b04c8481c6c5f094ca6f7761828006a84eda7a22a6b3a4d65e7b3e4b39e73ef839ec710b491e7ca731b047fa8c74a9c03a17e85519a62dfbeb95222cfbdd935
|
||||
DIST unionfs-fuse-0.24.tar.bz2 30381 SHA256 d8abc855eb618ac356b1e716599c82f8f0f74dbaee36d4062edc707567121937 SHA512 e0e414f4edbf641ec9d0135a8723e43fc75412359b482f7aedd66fe8245e4df03943c5ecb6f8de4fdbd97f0346033c691e766cc4f4a755f5b43748e1441d3fbd WHIRLPOOL dc132086d9614895961dc8b498c435145b4390fc80331e0575ee8420faea0201325ab2394b9090d8f721c602ef1f93e150573b1b88b77ee4f7be4a262103b986
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/gen_bootloader.sh b/gen_bootloader.sh
|
||||
index 4bbd303..fdca749 100755
|
||||
--- a/gen_bootloader.sh
|
||||
+++ b/gen_bootloader.sh
|
||||
@@ -49,8 +49,10 @@ set_bootloader_grub2() {
|
||||
fi
|
||||
|
||||
print_info 1 "You can customize Grub2 parameters in /etc/default/grub."
|
||||
- print_info 1 "Running grub2-mkconfig to create ${GRUB_CONF}..."
|
||||
- grub2-mkconfig -o "${GRUB_CONF}" 2> /dev/null || gen_die "grub2-mkconfig failed"
|
||||
+ print_info 1 "Running grub-mkconfig to create ${GRUB_CONF}..."
|
||||
+ grub-mkconfig -o "${GRUB_CONF}" 2> /dev/null ||
|
||||
+ grub2-mkconfig -o "${GRUB_CONF}" 2> /dev/null ||
|
||||
+ gen_die "grub-mkconfig failed"
|
||||
[ "${BUILD_RAMDISK}" -ne 0 ] && sed -i 's/ro single/ro debug/' "${GRUB_CONF}"
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 4fb8318037a8ea12f54b7c711d702b432113f233 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@gentoo.org>
|
||||
Date: Sun, 27 Mar 2016 02:04:41 -0400
|
||||
Subject: [PATCH] adjust System.map die check for #570822
|
||||
|
||||
Builds with newer genkernel have been failing in catalyst like so:
|
||||
* ERROR: Could not copy System.map from kerncache for the kernel package!
|
||||
|
||||
The code that added it seems to have been meant to check the minkernpackage/
|
||||
subdir where the file was renamed instead of the current subdir. Change the
|
||||
check to simplify verify the mv didn't fail instead of duplicating the file
|
||||
name entirely.
|
||||
|
||||
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||
---
|
||||
gen_package.sh | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gen_package.sh b/gen_package.sh
|
||||
index 9dd166b..b08ff03 100755
|
||||
--- a/gen_package.sh
|
||||
+++ b/gen_package.sh
|
||||
@@ -45,11 +45,8 @@ gen_minkernpackage() {
|
||||
if [ "${KERNCACHE}" != "" ]
|
||||
then
|
||||
/bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} System.map-${ARCH}-${KV}
|
||||
- mv minkernpackage/{System.map-${ARCH}-${KV},System.map-${KNAME}-${ARCH}-${KV}}
|
||||
- if [ ! -f System.map-${KNAME}-${ARCH}-${KV} ]
|
||||
- then
|
||||
+ mv minkernpackage/{System.map-${ARCH}-${KV},System.map-${KNAME}-${ARCH}-${KV}} ||
|
||||
gen_die 'Could not copy System.map from kerncache for the kernel package!'
|
||||
- fi
|
||||
else
|
||||
cp "${KERNEL_OUTPUTDIR}/System.map" "${TEMP}/minkernpackage/System.map-${KNAME}-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!';
|
||||
fi
|
||||
--
|
||||
2.7.4
|
||||
|
||||
73
sys-kernel/genkernel/files/genkernel.bash
Normal file
73
sys-kernel/genkernel/files/genkernel.bash
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# genkernel (8) completion
|
||||
# Copyright 2006 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# Written by Aron Griffis <agriffis@gentoo.org>
|
||||
|
||||
_genkernel()
|
||||
{
|
||||
declare cur prev genkernel_help actions params
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
# extract initial list of params/actions from genkernel --help
|
||||
genkernel_help=$(command genkernel --help)
|
||||
actions=( $(<<<"$genkernel_help" sed -n \
|
||||
'/^Available Actions:/,/^$/s/^[[:space:]]\+\([^[:space:]]\+\).*/\1/p') )
|
||||
params=( $(<<<"$genkernel_help" egrep -oe '--[^[:space:]]{2,}') )
|
||||
|
||||
# attempt to complete the current parameter based on the list
|
||||
COMPREPLY=($(compgen -W "${params[*]/=*/=} ${actions[*]}" -- "$cur"))
|
||||
|
||||
# if we don't have a rhs to complete
|
||||
if [[ ${#COMPREPLY[@]} -gt 1 ]]; then
|
||||
return
|
||||
elif [[ ${#COMPREPLY[@]} -eq 0 && $cur != --*=* ]]; then
|
||||
return
|
||||
elif [[ ${#COMPREPLY[@]} -eq 1 && $COMPREPLY != --*= ]]; then
|
||||
# using nospace completion, add an explicit space
|
||||
COMPREPLY="${COMPREPLY} "
|
||||
return
|
||||
fi
|
||||
|
||||
# we have a unique lhs and need to complete the rhs
|
||||
declare args lhs rhs
|
||||
if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
|
||||
lhs=$COMPREPLY
|
||||
else
|
||||
lhs=${cur%%=*}=
|
||||
rhs=${cur#*=}
|
||||
fi
|
||||
|
||||
# genkernel's help gives clues as to what belongs on the rhs.
|
||||
# extract the clue for the current parameter
|
||||
args=" ${params[*]} "
|
||||
args="${args##* $lhs}"
|
||||
args="${args%% *}"
|
||||
|
||||
# generate a list of completions for the argument; this replaces args with
|
||||
# an array of results
|
||||
args=( $(case $args in
|
||||
('<0-5>') compgen -W "$(echo {1..5})" -- "$rhs" ;;
|
||||
('<outfile>'|'<file>') compgen -A file -o plusdirs -- "$rhs" ;;
|
||||
('<dir>') compgen -A directory -S / -- "$rhs" ;;
|
||||
('<tbz2>') compgen -G '*.tbz2' -G '*.tar.bz2' -o plusdirs -- "$rhs" ;;
|
||||
(*) compgen -o bashdefault -- "$rhs" ;; # punt
|
||||
esac) )
|
||||
|
||||
# we're using nospace completion to prevent spaces after paths that aren't
|
||||
# "done" yet. So do some hacking to the args to add spaces after
|
||||
# non-directories.
|
||||
declare slash=/
|
||||
args=( "${args[@]/%/ }" ) # add space to all
|
||||
args=( "${args[@]/%$slash /$slash}" ) # remove space from dirs
|
||||
|
||||
# recreate COMPREPLY
|
||||
if [[ $cur == "$lhs"* ]]; then
|
||||
COMPREPLY=( "${args[@]}" )
|
||||
elif [[ ${#args[@]} -gt 0 ]]; then
|
||||
COMPREPLY=( "${args[@]/#/$lhs}" )
|
||||
fi
|
||||
}
|
||||
|
||||
complete -o nospace -F _genkernel genkernel
|
||||
23
sys-kernel/genkernel/files/initramfs.mounts
Normal file
23
sys-kernel/genkernel/files/initramfs.mounts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# This specifies which mounts from your fstab should be mounted before
|
||||
# switching to the real root. If this file is missing, genkernel's code will
|
||||
# default to just "/usr", which will suffice on most systems with a seperate
|
||||
# /usr mount.
|
||||
#
|
||||
# If you have a complex configuration with a bindmount or symlink at /usr, or
|
||||
# need some other mountpoints at boot, you should update this file such that
|
||||
# /usr and anything else needed will be available after the switch into the
|
||||
# real root.
|
||||
#
|
||||
# The lines without comments in this file are used as exact matches against the
|
||||
# second column of your /etc/fstab and the device, fstype and mount options are
|
||||
# taken from that line in fstab. If no line matches, the line from this file
|
||||
# will be ignored.
|
||||
#
|
||||
|
||||
/usr
|
||||
|
||||
# If you had some need of these:
|
||||
#/usr/local
|
||||
#/opt
|
||||
#/var
|
||||
#/home
|
||||
403
sys-kernel/genkernel/files/overlayfs.patch
Normal file
403
sys-kernel/genkernel/files/overlayfs.patch
Normal file
|
|
@ -0,0 +1,403 @@
|
|||
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
|
||||
index 4b0bbad..797eaad 100644
|
||||
--- a/defaults/initrd.scripts
|
||||
+++ b/defaults/initrd.scripts
|
||||
@@ -296,12 +296,50 @@ mount_sysfs() {
|
||||
[ ${ret} -eq 0 ] || bad_msg "Failed to mount /sys!"
|
||||
}
|
||||
|
||||
-# Insert a directory tree $2 to an union specified by $1
|
||||
+# Check support for both aufs and overlayfs
|
||||
+# union file system style support
|
||||
+#
|
||||
+is_union_modules() {
|
||||
+ local mod mod_dir
|
||||
+
|
||||
+ case $1 in
|
||||
+ aufs)
|
||||
+ mod=$aufs_modules
|
||||
+ mod_dir=$aufs_modules_dir
|
||||
+ ;;
|
||||
+ overlayfs)
|
||||
+ mod=$overlayfs_modules
|
||||
+ mod_dir=$overlayfs_modules_dir
|
||||
+ esac
|
||||
+
|
||||
+ # When {aufs,overlayfs}.modules= is used or $CDROOT_PATH/modules
|
||||
+ # directory is available
|
||||
+ if [[ 1 = "$mod" || -d $CDROOT_PATH/modules ]]; then
|
||||
+ if [ -d $CDROOT_PATH/modules ]; then
|
||||
+ warn_msg "Adding all modules in $CDROOT_PATH/modules"
|
||||
+ union_insert_modules "$CDROOT_PATH"/modules
|
||||
+ # Is it a block device?
|
||||
+ elif [ ! -b "$mod_dir" ]; then
|
||||
+ bad_msg "$mod_dir is not a valid block device"
|
||||
+ bad_msg "aborting modules insert into $CHROOT"
|
||||
+ else
|
||||
+ warn_msg "Adding all modules in $mod_dir"
|
||||
+
|
||||
+ mkdir /mnt/modules
|
||||
+ mount "$mod_dir" /mnt/modules
|
||||
+ union_insert_modules /mnt/modules
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+# Insert a directory tree $2 to a aufs union specified by $1
|
||||
# Top-level read-write branch is specified by it's index 0
|
||||
# $1 = union absolute path (starting with /)
|
||||
# $2 = path to data directory
|
||||
#
|
||||
-union_insert_dir() {
|
||||
+aufs_insert_dir() {
|
||||
# Always mount it over the precedent (add:1:)
|
||||
if mount -n -o "remount,add:1:$2=rr" aufs "$1"; then
|
||||
good_msg "Addition of $2 to $1 successful"
|
||||
@@ -313,30 +351,47 @@ union_insert_dir() {
|
||||
union_insert_modules() {
|
||||
local module
|
||||
|
||||
- for module in "$1/modules/"*.mo; do
|
||||
- union_mod "$module" || bad_msg "Unable to insert module: '$module'"
|
||||
- done
|
||||
+ for module in "$1/"*.lzm; do
|
||||
+ if [ 1 = "$overlayfs" ];then
|
||||
+ union_mod overlayfs "$module" || bad_msg "Unable to insert module: '$module'"
|
||||
|
||||
- for module in "$1/modules/"*.lzm; do
|
||||
- union_mod "$module" || bad_msg "Unable to insert module: '$module'"
|
||||
+ # Used in setup_overlayfs()
|
||||
+ mod_path="$mod_path:$mod_dir/.$mod"
|
||||
+
|
||||
+ # Assign variable with paths to modules mount point
|
||||
+ # TODO: Stop using eval
|
||||
+ eval $mod="$mod_dir/.$mod"
|
||||
+ mods="$mods $mod"
|
||||
+ else
|
||||
+ union_mod aufs "$module" || bad_msg "Unable to insert module: '$module'"
|
||||
+ fi
|
||||
done
|
||||
}
|
||||
|
||||
# Helper function for union_insert_modules()
|
||||
union_mod() {
|
||||
- [ -e "$1" ] || return 0
|
||||
+ [ -e "$2" ] || return 0
|
||||
|
||||
- local mod
|
||||
+ mod_dir=/mnt/overlay
|
||||
|
||||
- mod=${1##*/}
|
||||
+ mod=${2##*/}
|
||||
+ mod=${mod//-/_}
|
||||
mod=${mod%.*}
|
||||
|
||||
- if [ ! -d "$aufs_union"/mnt/"$mod" ]; then
|
||||
- mkdir -p "$aufs_union"/mnt/modules/"$mod" || return
|
||||
- fi
|
||||
+ if [ 1 = "$aufs" ]; then
|
||||
+ if [ ! -d "$aufs_union"/mnt/"$mod" ]; then
|
||||
+ mkdir -p "$aufs_union"/mnt/modules/"$mod" || return
|
||||
+ fi
|
||||
|
||||
- mount -o loop,ro "$1" "$aufs_union"/mnt/modules/"$mod"
|
||||
- union_insert_dir "$aufs_union" "$aufs_union"/mnt/modules/"$mod"
|
||||
+ mount -o loop,ro "$2" "$aufs_union"/mnt/modules/"$mod"
|
||||
+ aufs_insert_dir "$aufs_union" "$aufs_union"/mnt/modules/"$mod"
|
||||
+ else
|
||||
+ if [ ! -d "$mod_dir/.$mod" ]; then
|
||||
+ mkdir -p "$mod_dir/.$mod" || return
|
||||
+ fi
|
||||
+
|
||||
+ mount -o loop,ro "$2" "$mod_dir/.$mod"
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Implements no_umounts variable into $CHROOT/etc/conf.d/localmount for a cleaner shutdown process
|
||||
@@ -526,6 +581,44 @@ setup_aufs() {
|
||||
fi
|
||||
}
|
||||
|
||||
+setup_overlayfs() {
|
||||
+ # Setup directories and vars
|
||||
+ local overlay=/mnt/overlay
|
||||
+ local upperdir="${overlay}/.upper"
|
||||
+ local workdir="${overlay}/.work"
|
||||
+ local static=/mnt/livecd
|
||||
+
|
||||
+ for i in "${overlay}" "${static}"; do
|
||||
+ [ ! -d "${i}" ] && mkdir -p "${i}"
|
||||
+ done
|
||||
+
|
||||
+ good_msg "Loading overlayfs"
|
||||
+ modprobe overlay > /dev/null 2>&1
|
||||
+
|
||||
+ mount -t squashfs -o loop,ro "$CDROOT_PATH/$LOOPEXT$LOOP" "${static}"
|
||||
+ mount -t tmpfs none "${overlay}"
|
||||
+ mkdir "${upperdir}" "${workdir}"
|
||||
+
|
||||
+ is_union_modules overlayfs
|
||||
+ mount -t overlay overlay -o lowerdir="${static}${mod_path}",upperdir="${upperdir}",workdir="${workdir}" "${NEW_ROOT}"
|
||||
+
|
||||
+ [ ! -d "${NEW_ROOT}${overlay}" ] && mkdir -p "${NEW_ROOT}${overlay}"
|
||||
+ [ ! -d "${NEW_ROOT}${static}" ] && mkdir -p "${NEW_ROOT}${static}"
|
||||
+
|
||||
+ echo "overlay / overlay defaults 0 0" > "${NEW_ROOT}"/etc/fstab
|
||||
+
|
||||
+ for i in "${overlay}" "${static}"; do
|
||||
+ mount --bind "${i}" "${NEW_ROOT}${i}"
|
||||
+ done
|
||||
+
|
||||
+ # Did we populate the overlayfs modules path locations variable?
|
||||
+ if [ -n "$mods" ]; then
|
||||
+ for i in $mods; do
|
||||
+ mount --bind "${overlay}/.${i}" "${NEW_ROOT}/${overlay}/.${i}"
|
||||
+ done
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
|
||||
findnfsmount() {
|
||||
if [ "${IP}" != '' ] || busybox udhcpc -n -T 15 -q
|
||||
@@ -843,15 +936,15 @@ setup_keymap() {
|
||||
[ -f /lib/keymaps/keymapList ] && chooseKeymap
|
||||
|
||||
[ "${DEVBIND}" = '1' ] && umount /dev
|
||||
-
|
||||
- if [ -e /etc/sysconfig/keyboard -a "${CDROOT}" = '1' ]
|
||||
- then
|
||||
- mkdir -p ${NEW_ROOT}/etc/sysconfig/
|
||||
- cp /etc/sysconfig/keyboard ${NEW_ROOT}/etc/sysconfig/keyboard
|
||||
- fi
|
||||
fi
|
||||
}
|
||||
|
||||
+setup_locale() {
|
||||
+ if [ ! -z "${locale}" ]; then
|
||||
+ echo "LANG=${locale}" > ${NEW_ROOT}/etc/sysconfig/locale
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
chooseKeymap() {
|
||||
good_msg "Loading keymaps"
|
||||
if [ -z "${keymap}" ]
|
||||
@@ -931,6 +1024,16 @@ chooseKeymap() {
|
||||
fi
|
||||
}
|
||||
|
||||
+#
|
||||
+# Copy over user selected keymap
|
||||
+#
|
||||
+copyKeymap() {
|
||||
+ if [ -e /etc/sysconfig/keyboard -a "${CDROOT}" = '1' ]; then
|
||||
+ [ ! -d ${NEW_ROOT}/etc/sysconfig ] && mkdir -p ${NEW_ROOT}/etc/sysconfig
|
||||
+ cp /etc/sysconfig/keyboard ${NEW_ROOT}/etc/sysconfig/keyboard
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
# This helper function is to be called using call_func_timeout.
|
||||
# It enables us to wait a reasonable amount of time until /dev/zfs appears.
|
||||
waitForZFS() {
|
||||
@@ -1629,5 +1732,5 @@ strip_mount_options()
|
||||
{
|
||||
sed -r \
|
||||
-e 's/(,|^)(no)?auto(,|$)/,/g' \
|
||||
- -e 's/(,|^)iversion(,|$)/,/g'
|
||||
+ -e 's/(,|^)iversion(,|$)/,/g'
|
||||
}
|
||||
diff --git a/defaults/linuxrc b/defaults/linuxrc
|
||||
index df2272b..4412251 100644
|
||||
--- a/defaults/linuxrc
|
||||
+++ b/defaults/linuxrc
|
||||
@@ -255,12 +255,19 @@ do
|
||||
keymap=*)
|
||||
keymap=${x#*=}
|
||||
;;
|
||||
+ locale=*)
|
||||
+ locale=${x#*=}
|
||||
+ ;;
|
||||
aufs)
|
||||
- aufs=1
|
||||
+ if [ -f /proc/config.gz ]; then
|
||||
+ zcat /proc/config.gz | grep -E 'CONFIG_AUFS_FS=(m|y)' 1>/dev/null && aufs=1
|
||||
+ else
|
||||
+ warn_msg "No CONFIG_IKCONFIG support"
|
||||
+ warn_msg "AUFS is not guarantee to work on this medium"
|
||||
+ aufs=1
|
||||
+ fi
|
||||
;;
|
||||
aufs\=*)
|
||||
- aufs=1
|
||||
-
|
||||
if echo "${x#*=}" | grep , &>/dev/null; then
|
||||
aufs_dev_uid=${x#*,}
|
||||
aufs_dev=${x%,*}
|
||||
@@ -273,6 +280,29 @@ do
|
||||
aufs_modules_dir=${x#*=}
|
||||
aufs_modules=1
|
||||
;;
|
||||
+
|
||||
+ overlayfs)
|
||||
+ if [ -f /proc/config.gz ]; then
|
||||
+ zcat /proc/config.gz | grep -E 'CONFIG_OVERLAY_FS=(m|y)' 1>/dev/null && overlayfs=1
|
||||
+ else
|
||||
+ warn_msg "No CONFIG_IKCONFIG support"
|
||||
+ warn_msg "OVERLAYFS is not guarantee to work on this medium"
|
||||
+ overlayfs=1
|
||||
+ fi
|
||||
+ ;;
|
||||
+ overlayfs\=*)
|
||||
+ if echo "${x#*=}" | grep , &>/dev/null; then
|
||||
+ overlayfs_dev_uid=${x#*,}
|
||||
+ overlayfs_dev=${x%,*}
|
||||
+ else
|
||||
+ overlayfs_dev=${x#*=}
|
||||
+ fi
|
||||
+ ;;
|
||||
+ # Allow user to specify the modules location
|
||||
+ overlayfs.modules\=*)
|
||||
+ overlayfs_modules_dir=${x#*=}
|
||||
+ overlayfs_modules=1
|
||||
+ ;;
|
||||
unionfs)
|
||||
if [ ! -x /sbin/unionfs ]
|
||||
then
|
||||
@@ -454,11 +484,12 @@ then
|
||||
if [ 1 = "$aufs" ]; then
|
||||
setup_aufs
|
||||
CHROOT=$aufs_union
|
||||
- else
|
||||
+ elif [ 1 = "$overlayfs" ]; then
|
||||
+ bootstrapCD
|
||||
CHROOT=${NEW_ROOT}
|
||||
fi
|
||||
|
||||
- if [ /dev/nfs != "$REAL_ROOT" ] && [ sgimips != "$LOOPTYPE" ] && [ 1 != "$aufs" ]; then
|
||||
+ if [ /dev/nfs != "$REAL_ROOT" ] && [ sgimips != "$LOOPTYPE" ] && [ 1 != "$aufs" ] && [ 1 != "$overlayfs" ]; then
|
||||
bootstrapCD
|
||||
fi
|
||||
|
||||
@@ -717,27 +748,30 @@ then
|
||||
FS_LOCATION='mnt/livecd'
|
||||
elif [ "${LOOPTYPE}" = 'squashfs' ]
|
||||
then
|
||||
- if [ 1 != "$aufs" ]; then
|
||||
- good_msg 'Mounting squashfs filesystem'
|
||||
- _CACHED_SQUASHFS_PATH="${NEW_ROOT}/mnt/${LOOP}"
|
||||
- _squashfs_path="${CDROOT_PATH}/${LOOPEXT}${LOOP}" # Default to uncached
|
||||
- # Upgrade to cached version if possible
|
||||
- [ "${DO_cache}" -a -f "${_CACHED_SQUASHFS_PATH}" ] \
|
||||
- && _squashfs_path=${_CACHED_SQUASHFS_PATH}
|
||||
- mount -t squashfs -o loop,ro "${_squashfs_path}" "${NEW_ROOT}/mnt/livecd" || {
|
||||
- bad_msg "Squashfs filesystem could not be mounted, dropping into shell."
|
||||
- if [ -e /proc/filesystems ]; then
|
||||
- fgrep -q squashfs /proc/filesystems || \
|
||||
- bad_msg "HINT: Your kernel does not know filesystem \"squashfs\"."
|
||||
- fi
|
||||
- do_rundebugshell
|
||||
- }
|
||||
- else
|
||||
- good_msg 'Mounting squashfs filesystem'
|
||||
+ good_msg 'Mounting squashfs filesystem'
|
||||
+
|
||||
+ if [ 1 = "$aufs" ]; then
|
||||
+ setup_squashfs_aufs
|
||||
+ test_success 'Mount aufs filesystem'
|
||||
+ elif [ 1 = "$overlayfs" ]; then
|
||||
+ setup_overlayfs
|
||||
+ test_success 'Mount overlayfs filesystem'
|
||||
+ else
|
||||
+ _CACHED_SQUASHFS_PATH="${NEW_ROOT}/mnt/${LOOP}"
|
||||
+ _squashfs_path="${CDROOT_PATH}/${LOOPEXT}${LOOP}" # Default to uncached
|
||||
+ # Upgrade to cached version if possible
|
||||
+ [ "${DO_cache}" -a -f "${_CACHED_SQUASHFS_PATH}" ] \
|
||||
+ && _squashfs_path=${_CACHED_SQUASHFS_PATH}
|
||||
+ mount -t squashfs -o loop,ro "${_squashfs_path}" "${NEW_ROOT}/mnt/livecd" || {
|
||||
+ bad_msg "Squashfs filesystem could not be mounted, dropping into shell."
|
||||
+ if [ -e /proc/filesystems ]; then
|
||||
+ fgrep -q squashfs /proc/filesystems || \
|
||||
+ bad_msg "HINT: Your kernel does not know filesystem \"squashfs\"."
|
||||
+ fi
|
||||
+ do_rundebugshell
|
||||
+ }
|
||||
+ fi
|
||||
|
||||
- setup_squashfs_aufs
|
||||
- test_success 'Mount aufs filesystem'
|
||||
- fi
|
||||
FS_LOCATION='mnt/livecd'
|
||||
elif [ "${LOOPTYPE}" = 'gcloop' ]
|
||||
then
|
||||
@@ -780,7 +814,7 @@ then
|
||||
fi # if [ -n "${CRYPT_ROOT}" ]
|
||||
|
||||
if [ 1 = "$aufs" ]; then
|
||||
- union_insert_dir "$CHROOT" "$aufs_ro_branch"
|
||||
+ aufs_insert_dir "$CHROOT" "$aufs_ro_branch"
|
||||
|
||||
# Function to handle the RC_NO_UMOUNTS variable in $CHROOT/etc/rc.conf
|
||||
conf_rc_no_umounts
|
||||
@@ -802,28 +836,8 @@ tmp /tmp tmpfs defaults 0 0
|
||||
FSTAB
|
||||
fi
|
||||
|
||||
- # When aufs.modules= is used or $CDROOT_PATH/modules
|
||||
- # directory is available
|
||||
- if [[ 1 = "$aufs_modules" || -d $CDROOT_PATH/modules ]]; then
|
||||
- warn_msg "Adding all modules in $aufs_modules_dir/modules/"
|
||||
-
|
||||
- if [ mnt/cdrom = "$aufs_modules_dir" ]; then
|
||||
- union_insert_modules "$CDROOT_PATH"
|
||||
- elif [ ! -b "$aufs_modules_dir" ]; then
|
||||
- bad_msg "$aufs_modules_dir is not a valid block device"
|
||||
- bad_msg "aborting modules insert into $aufs_union"
|
||||
- else
|
||||
- mkdir /mnt/modules
|
||||
- mount "$aufs_modules_dir" /mnt/modules
|
||||
- union_insert_modules /mnt/modules
|
||||
- fi
|
||||
- fi
|
||||
-
|
||||
- # Copy user keymap file
|
||||
- if [ -e /etc/sysconfig/keyboard ]; then
|
||||
- [ ! -d $CHROOT/etc/sysconfig ] && mkdir -p "$CHROOT/etc/sysconfig"
|
||||
- cp /etc/sysconfig/keyboard "$CHROOT/etc/sysconfig/"
|
||||
- fi
|
||||
+ # Check modules support
|
||||
+ is_union_modules aufs
|
||||
|
||||
# Create the directories for our new union mounts
|
||||
[ ! -d $CHROOT$NEW_ROOT ] && mkdir -p "$CHROOT$NEW_ROOT"
|
||||
@@ -855,7 +869,7 @@ FSTAB
|
||||
if [ "${USE_UNIONFS_NORMAL}" = '1' ]; then
|
||||
setup_unionfs ${NEW_ROOT} /${FS_LOCATION}
|
||||
CHROOT=/union
|
||||
- elif [ 1 != "$aufs" ]; then
|
||||
+ elif [ 1 != "$aufs" ] | [ 1 != "$overlayfs" ]; then
|
||||
good_msg "Copying read-write image contents to tmpfs"
|
||||
|
||||
# Copy over stuff that should be writable
|
||||
@@ -935,7 +949,7 @@ else
|
||||
setup_unionfs /union_changes ${NEW_ROOT}
|
||||
mkdir -p ${UNION}/tmp/.initrd
|
||||
elif [ 1 = "$aufs" ]; then
|
||||
- union_insert_dir "$aufs_union" "$NEW_ROOT"
|
||||
+ aufs_insert_dir "$aufs_union" "$NEW_ROOT"
|
||||
mkdir -p "$aufs_union/tmp/.initrd"
|
||||
fi
|
||||
|
||||
@@ -1000,6 +1014,12 @@ if [ 1 = "$aufs" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
+# Copy user keymap generated file if available
|
||||
+copyKeymap
|
||||
+
|
||||
+# Setup any user defined environment locales for desktop usage
|
||||
+setup_locale
|
||||
+
|
||||
good_msg "Booting (initramfs)"
|
||||
|
||||
cd "${CHROOT}"
|
||||
166
sys-kernel/genkernel/genkernel-3.5.0.8.ebuild
Normal file
166
sys-kernel/genkernel/genkernel-3.5.0.8.ebuild
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# genkernel-9999 -> latest Git branch "master"
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
EAPI=5 # approved 2012.09.11, required by all profiles since 2014.03.12
|
||||
|
||||
VERSION_BUSYBOX='1.26.0'
|
||||
VERSION_DMRAID='1.0.0.rc16-3'
|
||||
VERSION_MDADM='3.1.5'
|
||||
VERSION_FUSE='2.8.6'
|
||||
VERSION_ISCSI='2.0-872'
|
||||
VERSION_LVM='2.02.88'
|
||||
VERSION_UNIONFS_FUSE='0.24'
|
||||
VERSION_GPG='1.4.11'
|
||||
|
||||
RH_HOME="ftp://sourceware.org/pub"
|
||||
DM_HOME="https://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="https://busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
mirror://kernel/linux/utils/raid/mdadm/mdadm-${VERSION_MDADM}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
http://www.open-iscsi.org/bits/open-iscsi-${VERSION_ISCSI}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2
|
||||
mirror://gnupg/gnupg/gnupg-${VERSION_GPG}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git
|
||||
https://anongit.gentoo.org/git/proj/${PN}.git"
|
||||
inherit git-2 bash-completion-r1 eutils
|
||||
S="${WORKDIR}/${PN}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion-r1 eutils
|
||||
SRC_URI="mirror://gentoo/${P}.tar.xz
|
||||
${COMMON_URI}"
|
||||
#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="https://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
IUSE="cryptsetup ibm +firmware selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )"
|
||||
RDEPEND="${DEPEND}
|
||||
cryptsetup? ( sys-fs/cryptsetup )
|
||||
app-arch/cpio
|
||||
>=app-misc/pax-utils-0.2.1
|
||||
firmware? ( sys-kernel/linux-firmware )
|
||||
!<sys-apps/openrc-0.9.9"
|
||||
# pax-utils is used for lddtree
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
DEPEND="${DEPEND} app-text/asciidoc"
|
||||
fi
|
||||
|
||||
pkg_pretend() {
|
||||
if ! use cryptsetup && has_version "sys-kernel/genkernel[crypt]"; then
|
||||
ewarn "Local use flag 'crypt' has been renamed to 'cryptsetup' (bug #414523)."
|
||||
ewarn "Please set flag 'cryptsetup' for this very package if you would like"
|
||||
ewarn "to have genkernel create an initramfs with LUKS support."
|
||||
ewarn "Sorry for the inconvenience."
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git-2_src_unpack
|
||||
else
|
||||
unpack ${P}.tar.xz
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
einfo "Updating version tag"
|
||||
GK_V="$(git describe --tags | sed 's:^v::')-git"
|
||||
sed "/^GK_V/s,=.*,='${GK_V}',g" -i "${S}"/genkernel
|
||||
einfo "Producing ChangeLog from Git history..."
|
||||
pushd "${S}/.git" >/dev/null || die
|
||||
git log > "${S}"/ChangeLog || die
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
if use selinux ; then
|
||||
sed -i 's/###//g' "${S}"/gen_compile.sh || die
|
||||
fi
|
||||
|
||||
# Update software.sh
|
||||
sed -i \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_MDADM:$VERSION_MDADM:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_ISCSI:$VERSION_ISCSI:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
-e "s:VERSION_GPG:$VERSION_GPG:" \
|
||||
"${S}"/defaults/software.sh \
|
||||
|| die "Could not adjust versions"
|
||||
|
||||
epatch "${FILESDIR}"/overlayfs.patch
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
emake
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /etc
|
||||
doins "${S}"/genkernel.conf
|
||||
|
||||
doman genkernel.8
|
||||
dodoc AUTHORS ChangeLog README TODO
|
||||
dobin genkernel
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
if use ibm ; then
|
||||
cp "${S}"/arch/ppc64/kernel-2.6{-pSeries,} || die
|
||||
else
|
||||
cp "${S}"/arch/ppc64/kernel-2.6{.g5,} || die
|
||||
fi
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/*
|
||||
|
||||
newbashcomp "${FILESDIR}"/genkernel.bash "${PN}"
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/initramfs.mounts
|
||||
|
||||
cd "${DISTDIR}"
|
||||
insinto /usr/share/genkernel/distfiles
|
||||
doins ${A/${P}.tar.xz/}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'https://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext4."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
}
|
||||
165
sys-kernel/genkernel/genkernel-9999.ebuild
Normal file
165
sys-kernel/genkernel/genkernel-9999.ebuild
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# genkernel-9999 -> latest Git branch "master"
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
EAPI=5 # approved 2012.09.11, required by all profiles since 2014.03.12
|
||||
|
||||
VERSION_BUSYBOX='1.26.0'
|
||||
VERSION_DMRAID='1.0.0.rc16-3'
|
||||
VERSION_MDADM='3.1.5'
|
||||
VERSION_FUSE='2.8.6'
|
||||
VERSION_ISCSI='2.0-872'
|
||||
VERSION_LVM='2.02.88'
|
||||
VERSION_UNIONFS_FUSE='0.24'
|
||||
VERSION_GPG='1.4.11'
|
||||
|
||||
RH_HOME="ftp://sourceware.org/pub"
|
||||
DM_HOME="https://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="https://busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
mirror://kernel/linux/utils/raid/mdadm/mdadm-${VERSION_MDADM}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
http://www.open-iscsi.org/bits/open-iscsi-${VERSION_ISCSI}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2
|
||||
mirror://gnupg/gnupg/gnupg-${VERSION_GPG}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git
|
||||
https://anongit.gentoo.org/git/proj/${PN}.git"
|
||||
inherit git-2 bash-completion-r1 eutils
|
||||
S="${WORKDIR}/${PN}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion-r1 eutils
|
||||
SRC_URI="mirror://gentoo/${P}.tar.xz
|
||||
${COMMON_URI}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="https://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
IUSE="cryptsetup ibm +firmware selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )"
|
||||
RDEPEND="${DEPEND}
|
||||
cryptsetup? ( sys-fs/cryptsetup )
|
||||
app-arch/cpio
|
||||
>=app-misc/pax-utils-0.2.1
|
||||
firmware? ( sys-kernel/linux-firmware )
|
||||
!<sys-apps/openrc-0.9.9"
|
||||
# pax-utils is used for lddtree
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
DEPEND="${DEPEND} app-text/asciidoc"
|
||||
fi
|
||||
|
||||
pkg_pretend() {
|
||||
if ! use cryptsetup && has_version "sys-kernel/genkernel[crypt]"; then
|
||||
ewarn "Local use flag 'crypt' has been renamed to 'cryptsetup' (bug #414523)."
|
||||
ewarn "Please set flag 'cryptsetup' for this very package if you would like"
|
||||
ewarn "to have genkernel create an initramfs with LUKS support."
|
||||
ewarn "Sorry for the inconvenience."
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git-2_src_unpack
|
||||
else
|
||||
unpack ${P}.tar.xz
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
einfo "Updating version tag"
|
||||
GK_V="$(git describe --tags | sed 's:^v::')-git"
|
||||
sed "/^GK_V/s,=.*,='${GK_V}',g" -i "${S}"/genkernel
|
||||
einfo "Producing ChangeLog from Git history..."
|
||||
pushd "${S}/.git" >/dev/null || die
|
||||
git log > "${S}"/ChangeLog || die
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
if use selinux ; then
|
||||
sed -i 's/###//g' "${S}"/gen_compile.sh || die
|
||||
fi
|
||||
|
||||
# Update software.sh
|
||||
sed -i \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_MDADM:$VERSION_MDADM:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_ISCSI:$VERSION_ISCSI:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
-e "s:VERSION_GPG:$VERSION_GPG:" \
|
||||
"${S}"/defaults/software.sh \
|
||||
|| die "Could not adjust versions"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
emake
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /etc
|
||||
doins "${S}"/genkernel.conf
|
||||
|
||||
doman genkernel.8
|
||||
dodoc AUTHORS ChangeLog README TODO
|
||||
dobin genkernel
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
if use ibm ; then
|
||||
cp "${S}"/arch/ppc64/kernel-2.6{-pSeries,} || die
|
||||
else
|
||||
cp "${S}"/arch/ppc64/kernel-2.6{.g5,} || die
|
||||
fi
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/*
|
||||
|
||||
newbashcomp "${FILESDIR}"/genkernel.bash "${PN}"
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/initramfs.mounts
|
||||
|
||||
cd "${DISTDIR}"
|
||||
insinto /usr/share/genkernel/distfiles
|
||||
doins ${A/${P}.tar.xz/}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'https://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext4."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
}
|
||||
17
sys-kernel/genkernel/metadata.xml
Normal file
17
sys-kernel/genkernel/metadata.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>genkernel@gentoo.org</email>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="crypt">Obsolete USE flag. Use cryptsetup for LUKS support. (bug ##414523)</flag>
|
||||
<flag name="cryptsetup">Enable support for Luks disk encryption using <pkg>sys-fs/cryptsetup</pkg></flag>
|
||||
<flag name="firmware">Prefer system firmware <pkg>sys-kernel/linux-firmware</pkg> over local copy.</flag>
|
||||
</use>
|
||||
<!--
|
||||
<upstream>
|
||||
<remote-id type="gentoo">git://git.gentoo.org/proj/genkernel</remote-id>
|
||||
</upstream>
|
||||
-->
|
||||
</pkgmetadata>
|
||||
Loading…
Reference in a new issue