diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-09 15:43:36 +0100 |
commit | 2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch) | |
tree | 8c816148bcbd22757d892089c989ae614eae4f5a /sys-apps/busybox | |
parent | 0f558761aa2dee1017b4751e4017205e015a9560 (diff) |
gentoo resync : 09.07.2022
Diffstat (limited to 'sys-apps/busybox')
-rw-r--r-- | sys-apps/busybox/Manifest | 21 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.33.1.ebuild | 337 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.34.1-r1.ebuild (renamed from sys-apps/busybox/busybox-1.33.1-r2.ebuild) | 81 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.35.0-r1.ebuild (renamed from sys-apps/busybox/busybox-1.32.1-r1.ebuild) | 90 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-9999.ebuild | 34 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch | 21 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.36.0-fix-wx-sections.patch | 74 | ||||
-rw-r--r-- | sys-apps/busybox/files/crond.confd | 2 | ||||
-rw-r--r-- | sys-apps/busybox/files/crond.initd | 12 | ||||
-rw-r--r-- | sys-apps/busybox/files/mdev/dvbdev | 8 | ||||
-rw-r--r-- | sys-apps/busybox/files/mdev/ide_links | 20 | ||||
-rw-r--r-- | sys-apps/busybox/files/mdev/usbdev | 42 | ||||
-rw-r--r-- | sys-apps/busybox/files/mdev/usbdisk_link | 36 |
13 files changed, 309 insertions, 469 deletions
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest index 75b9dcc69925..3dc732da1ee0 100644 --- a/sys-apps/busybox/Manifest +++ b/sys-apps/busybox/Manifest @@ -1,26 +1,27 @@ AUX busybox-1.26.2-bb.patch 2416 BLAKE2B 2e227c11b0fd5558bfdb91a2d8bf3fd73e348e7efff9ecc6820e9ecd92047ffe4e94fe8f2aa864db87a3f081c2e3ff599546563fff83c78fc36a44fafc559de6 SHA512 cb767a613ede504a7b1a87da3270992ffa44d3b6f76eebefceffc8a5a49119a99333c482420efab9d1e5a92a26280376c7e9ec62fcb2193d9172f4e7bc19f50e +AUX busybox-1.34.1-skip-selinux-search.patch 724 BLAKE2B 068334c468bb9c2199311be836f38264df4c6fc12a410119f989e210a27ea9561190f554c17b8d29fca4b83fc2016e1211edc4b1ca7d127449381291720946f1 SHA512 bc6eb9e8cbc21e8e00f696505d88ad3c7be5a3e4f7414a2dc4c8fe98088e7602f44b1d5b58b13ae85675b635be23bee13db800b6ab639babf89b306669980b43 +AUX busybox-1.36.0-fix-wx-sections.patch 2276 BLAKE2B 79570d6165ad6b4846bb4071ea67793e9fbd6e6cd9fd53b0f473d25b2de8f7bbff64fe09d1dbc680641699bb9b679bfef9d5d73abf00a24a8d8e037dc85fc6da SHA512 f58779d113c136219a4f1a140ec29b4dd235b37178ef473cffed8a438dec84ef2ce4fa354f659d38aea64c500da185eb7ae617f3c99d94145a2bf07ca5555172 +AUX crond.confd 55 BLAKE2B 23e5530472b9ea09177b8e5ea944528a0ff9ba62a8b434a547da16b2e8721c8a1500405b69af8840be3a3b3d86d2d3b7bd1fd5a27a34de874ca44caf961d5cee SHA512 10a3c88ecf7ccf0c1e0581c78433846135ee8b1092d07082e745d5371108194871c7502b4c58ad430e065c25441fea7ba0e73268c95df13cd6f8e9146ef312d7 +AUX crond.initd 256 BLAKE2B f5dc6126bcdc9991aaaa931f8b06b68bcbec7b10115d7bb18a639e4e79aa45112688a1cffa17ef1fad14c68464ac7fcabcdc80ed7186bc68dd56164ba00e94c2 SHA512 e8b72a05e8fbe94b84c9e2e8c678fae9bc4dd1ec58763ddc3027bfc39d2ba8170e5a9c5057199df39568c7088b2c742fa18af01225c1b9ffe327ba3d912be1bf AUX ginit.c 3097 BLAKE2B 77a9382dfa5dabc7541fab85fe211760604c757c3f2c5e49556d0ae9e82239833d21eb8954f595ebf814925d3508a5016701344985c6ef15e6f3d23ea675f646 SHA512 8bf70f13db0fbeecedf9a9f862c5391c0d8b7aa3ddd2ec85cda9b360c3117a01e32b01017b8c30197f587e521ba360ff70d1caf8d0f69d5c3a27f37ecc252e7c AUX klogd.confd 218 BLAKE2B e4c814e673dc4fa555bca9cf2065659facbb4878b4a794a56c18366be3077944bf15b1dcf665d83e7ab53a279e23a0cdc1ea8dd01399bb6747247c9bb0d65da3 SHA512 3348d5376b368b28d1431692a93868cd4550be12ad729340c5f78da35a5bd295e7613d70ce8ccde5029ad6d87a41c2f24155180f3570de8a9174dd63dece143f AUX klogd.initd 245 BLAKE2B e8b8045cebfd39a8a088b70142e47442224ddf51d06b7ba7614721eb06bb8662184133d5464c79ece4826e5f338b54b6e2154b67f59c25dc9324fa526e82caf6 SHA512 6c28b5f2db40eeeae14f859f56a5e4f96a034b69639f38da3a437eabd1f74f61240b87eac2f7e5ca9a3377ceb9a37e939ab69b7db6a70c962062e5ae29f7e835 AUX mdev.initd 869 BLAKE2B 1ad0ce41749e54e16aaea99cb02f1912efe3f29ab94505e692a5c588972ec947bc75791f076db2f7d7b640639ffbef9ca775923cf1e8a6ecdf6bd13e7384dfca SHA512 d7c7074384e8fcc6c8e7e55f94103bc575b101426ed8012a352546e8c741e90dd224869a9308a29e21491021d4372a4fab73c0f0d4453c6a53ea8ae537ca8e7a -AUX mdev/dvbdev 356 BLAKE2B 1819cd2903fc9894183153ed6fca49e992a840a1546ccebbd47698a59085de376a2331f008785eb4a07173f27553e4bd07b6126877019d3dfb0a9c1c5861f526 SHA512 ebd82f935da2ca89097234dd8a8f47e179a423652c151123a1f3343f3e1e7bfaba2b8800380e988d4e8f4294545d3a9ab6708ae2e77c5b108b5f091bbce8f94a -AUX mdev/ide_links 440 BLAKE2B 245bec553726d745b3e665331591ec2a403b67af87e69cd93398635cd1b86057cee0ca47f9447a291b09fff9032702f73700304fa96d67334e4513a7a6a20910 SHA512 0142234d0bda86ad1e5f88f1da34669e5fda46a0fd52ce507bd49ce74d2b7c12c323e8db863bccb924e6d632b568db8b243361b217c5b2e1d92a25feb6e62dec -AUX mdev/usbdev 1624 BLAKE2B 6b3876626a32b598ddf7aa1c53370df614918f95c9817b4e3e3f7a603af29ed9abd6dd9365a94497bed574457207b68ace8d082dbc1079c597afc11723670741 SHA512 f2d98050eeeb2fbb299298e221f47182a74ed901d2c8c848aa297ebd461c62c30d2fb968bb3eb723a6d9c268fac4a3c40a18aa59ed934043d42c38a1f6b9f5a2 -AUX mdev/usbdisk_link 984 BLAKE2B fd05e4223c800b3865adc4963446ee2c13a7df48a366a5c934969cc963db6f9b62a0fddbe82b5dba95672978684d8b90315d959f95516fc7a2729c0b4b34106d SHA512 05bc589f067cf988f97f10def3c05e139ac4f4ebe045bdb4c2f5453f5e672bf61d3dc1636974c5680c8c9cf22498bee9cfa28a8f4a264d9f5b10a72a9da0ca16 +AUX mdev/dvbdev 366 BLAKE2B 5755ec01204c0520cfc6aa07fb2df25b1c8074aa120f5fed5068a273b925ec3e20053e0c0bac79349b1ac2b024ed1f74c74c597e59c032bdeb90db41bf578acf SHA512 9c51f87e6ead2b01a581d24bf8c0dccff0d515a219ab21f5b5be7c0892305fec5b41b65fbc383a5005a2fd0a07af6e5ce8548de6e3eaec0ca95614bafe33755d +AUX mdev/ide_links 488 BLAKE2B 9bd9e6003f8b999aa0c520667f736285224497151dcc9837f01d83afcebc480c135c92fbe17f3e3fd09e8d5e2acaf7376d359cb5503c7ee455f3706860f790bc SHA512 7b8c718a9bf9481f2545f1b97f1127e44363c2d9bbde8f01fcd60d7ec7552ae811237b5202bb37e10bbbd68817c2539231b3e0e3603b4b4ad02d6a70264cafb3 +AUX mdev/usbdev 1726 BLAKE2B 50e612e1cdc10510d60c9771b3e509fa7fbf3f70a7d88c66d9cf2e73ab6d1c0a14e462cf4b0b505734aa0933f2dbc206b03cc48d4ac7a380564a7376ad5c9016 SHA512 7c9a25d04d28fdd0f3446d8d06ce57833b9b84df140d074b576192adad693ea2c9e3b65000a0a49b645e40a66e5192b93579e0460f569016aecbc0c2e0a786f6 +AUX mdev/usbdisk_link 1066 BLAKE2B 3c9c0cfad43de607a2681126a7da13a76b8ba2642332eebb596c56a8c1abb4be030b9bf7081da982178520a334db9026523233230a4a6c68e55b826c26526b0f SHA512 f74b2f596f08179417c3dea4ee2fe3bb7ba76563e178cbe8261105ed304d7f501068d4bc834c7abd18bce5936d457c066855c04b5bbcd2f714bed4215a174b8c AUX ntpd.confd 186 BLAKE2B c8beac2e21c9aa7bd42e771c40065cfa9251f94d893d02db4567d53f45a3c751ebf7981cd806e3220f6d1a708fc098592b4aef6e688e3a1fe3b94259e23de76e SHA512 b0ef111ea7dd6a096acf711d2d84a7c3d38e7e8c181f734053d38c565ab44ecf843ef32c0de0c4e7ecec990e97468a2545f83821beedb125cd6723ed74c67ad8 AUX ntpd.initd 259 BLAKE2B 3a8e41728d613b50721544eafe11f327578817c8ee49d777058508210deefbc2b0927a60489968ed63cdfe040371701f5b6588aecb2acc535c9ea5e173471c96 SHA512 bdae71e811af7165f014bd9a918824ee1b0c68df78f3457296d6be36e85c5e6d813610979f6d6b9af3c9e2fd4c95a451a63900461a948cbe88d7b6e3201cf03a AUX syslogd.confd 234 BLAKE2B a1601c31dab14e5c2712f49133758479914bcf37e0d9704fe71c6ac26409d7b48fd234b6584b8349cd067c6e914029a67ab4a4e141b95a21a23c7d6ee05eb760 SHA512 01a2ecf89c49e3e06dd1b6f6673fca16d0f2dd01ff27c0d609c803bc2c81b5ced8245b6388e48ffa2f05ff4e8c1824af73df6364bbebebc722166447bd412f52 AUX syslogd.initd 267 BLAKE2B 1daf252138bfb5904feb04dcc2127b8e8058d9d43652474e7594d60bb9adfbbb631eede30f375cf38370606c93d10e8fba05f50e88ede6709ee30b6ae6aec7a7 SHA512 856dd97ed46b08fdd13e497737f1eb192594e33bfc5d395d7ca6eed2e6bc212cf0cf33518b36a6f9a18d6962d462430c7b50c07e9dc08e85606ef68b240b1211 AUX watchdog.confd 232 BLAKE2B 14ff3813297bc987e98bf3cabee2e7b150e23d8aa9f016303396569ffca3633b3e048497f85649c20d769233baa430a4cb54d2d5e5d63646db8113761960552d SHA512 8fd7121075535195f3e5d43ec773713c883fb7865cd5e5927b3b20c2605c50acb81d50461bd1a246c1282006ce74b11932ac1cec67ddc2be15da2f9aa8674232 AUX watchdog.initd 219 BLAKE2B 3726fec4551962d6e20859c52e18582fbf127e2fc2807379afe9d490ad32b19a6d10d456155fdeb0468c67816f061b1cac166db7f104dbadadf0d175082efdb4 SHA512 d329fb72ce078a95a1fb77b72321dee56d19c76b45cb78a7a57a46d9fa385b982a114be49dd8696c2d4fc2b2dd90a17ee728ef2938172cc2f8b12b5a9ebd62f5 -DIST busybox-1.32.1.tar.bz2 2444679 BLAKE2B b0258345d40628d8c12b4cc5c3efdb318cfb469e029242942cdad22aeec5142963291a746fbac450b43a4a1f2f7e9204442456691fa98f18eeaa58c70d714caf SHA512 3a33e99adaf7cbd51dcbeb31b5361123bf61ac040c0a032656c654ddb69c4074af75fb4335ba63f283067f61a22d7d7cbca8e1ed265c9522982c453ce48ea2fd -DIST busybox-1.33.1.tar.bz2 2453694 BLAKE2B 2dce3427ab7703c56cbb3bdc0c93c1fe1c6dc24c5b467b6213b8f9cf55223ec63136b3837970e41293cc3d55d320599945d29a69a4ef8b4b3ab9fb5e2a527632 SHA512 d24931432f65e4e79cf54a6c2b91c9cafba817b637d337f456ce8f505434fc06c4345c65cde4fe2a019650a8a089a6f5336bfafb5ef64a4f14659a9d0b3ddb1a DIST busybox-1.34.1.tar.bz2 2476932 BLAKE2B 1f45f58db26ae0bae2eb728db3a7d49680d611f489c4633d1fdf2827d3c33285721e232f722ac1f80f2ad7616352df9fd6b8880bcb5fa0dc6787b70c897dd033 SHA512 fb7e53a56c07b1098a12ee7232ad5401b147816648a0619b3b5358fdcf0915cfbb054500c0e0dd4acb3bc0a93a584b62bc5448e1f16b28004f58b39518a13b9d DIST busybox-1.35.0.tar.bz2 2480624 BLAKE2B c08656bc863cd3fa8f7269032e808a30832215c36414c12f8233ab00503636ed1979541b7df42df654f1dfdfdd46fc00c8fe790bf0bed629a915b4c806c643b9 SHA512 62b2e718b6669271380445ed6db249618d777a4e8d5e6d879fa39ffee43887b6a2e93ceef874c615c565ad492deb772b03a19b7475c403202741579fb151e16a -EBUILD busybox-1.32.1-r1.ebuild 9458 BLAKE2B 2f23e64aed42ab56411e6b000c33aeaf9008bc0077d0039b412f3d94db41a9f3954922c7a00068f221177d254f0e2478c84f59002004403a444be70ed37291f2 SHA512 d6c2b162d3bb23f63e701108250dde39d613ecd5f62183cab64e9ba2803789533d6beb0efd1fb960c946afa9c5a0c43aab5194a164bb040c0bf309a318fd3482 -EBUILD busybox-1.33.1-r2.ebuild 9815 BLAKE2B eed0b930aeb82af04d2685a3a355b9fbef9bab402659a558dc38ac90d56159ab7eccc99c63a4aeb1a311ea8d48a4d7159791e3ed95667b2e3a6b89d5c177d495 SHA512 bacf3b935be115edb9b6bad09ad47316e7eb5821bc079cdf86f9441fecf73cc47bbd825fc0e70e9e859bea65368584671952159b7d3dd6e18818982e4dfcaa18 -EBUILD busybox-1.33.1.ebuild 9466 BLAKE2B 81dad4531ac36a23e88646ccd3f19a26d6ae199d46313f9b9b792fdd2139f4ad5710fb9bb611fc773cbd5ffd20fc76cea09785b5581c6dc95f16817c6f01e60a SHA512 b8cfc1a8d4a14cdaf3265acf8ce4e9880c391bf00cd35d9a2cf6c94a56e3d7869fe7fec49a756b81ac4fb9a2c8977fdc9e3312b625cdaa274d1b818c58f805c8 +EBUILD busybox-1.34.1-r1.ebuild 10435 BLAKE2B 1c39c6c6577a6964aa42e2637e17fdabe008dfd732a73dca3c4414d15c4c418d8c453e25eb01eb07c47d569271b46237756227faf3026d9c5090975c26e2fbd2 SHA512 b855d3972e524c9a8b39d7a4863eeef92d26b3484a709f1636da340545b58dfe917886975ff52fa4895088c78912bdadff491385e5017f969cc886ec8e121176 EBUILD busybox-1.34.1.ebuild 9269 BLAKE2B 59a8175829486b5380ee5f5b28cbab39cf65042329391e8d5d3a561ef37c09b020bede8da131268f3db670d71669ab1ce6de123373f8bd597bc65e9668e6d0ca SHA512 90ce4e384662f3d526cbf168e40a9d1743704ac10ebfbccbe3ef3299c4166badd0644aa8dd85a1193caef8076eb8912f6ba257aca1decbd696a4c42535528772 +EBUILD busybox-1.35.0-r1.ebuild 10471 BLAKE2B 84447022c8ac79039ab68ca2e355cf8da1d26b61e080defc6720dbca9e4561f2f286c1ba9e4f1e3b1b1848b44ee20cacb6fafce657493a71ca5bf36cb8349da0 SHA512 349483a992b68aa6fe5084945ea8b48fc4db12460d9fced9637ac52e72af22851549db24a6dd3790ae4f47d160671d58f3b8fc81a69a1dd4a32c1e53aeb8d975 EBUILD busybox-1.35.0.ebuild 9313 BLAKE2B 7f600ddda357dee3f5d17c0970bf7fc015771a82cfd982df754bdf4e93c3fb215a11679589caf2f717ef3fd52877d6c9806512774e04c4f209d36aa81f73c5a5 SHA512 ac656a8411d03e79283f72b72e976983fd3e3fb4d57680cf658ffb98c93ba331579936c1e7ab86d0e211e50355dc84f56b324f60cd7a6e7350f85c64c7cb1fe4 -EBUILD busybox-9999.ebuild 9277 BLAKE2B 6ec26199443a6b86edf07bfb28811308d2d14ebf857ac59f824c9a7f78af6d56d4d85da63c03718dfc76a1d07f39c806093d6f00a063f20bcf4dfbb6a9707ba1 SHA512 bce1af5586f3f3aca8762f77a898fcf72fb6ccf8e30447b3276b30a298702527f9e04f9ac2d05293cc565a4028493cec4d69d9f8b091bb3c8682e043199fef5a +EBUILD busybox-9999.ebuild 10485 BLAKE2B e17f72ee9950458acd2541ddf5b6f8eb244e0f8f5d722bbeac5c767727c7ec3218aaf2ae4496e119e736bc17ef488d8ee1944e48d130c4d50e4f3e92e92143ce SHA512 fcecce559944aa1401105e1ba25d6599d8c6538b8c83d498b92b052993bd4429d41e4a4fd84d956678b7889382cdd33b255da8d09979b5392b9a643d2a236db2 MISC metadata.xml 873 BLAKE2B d9c3725e1c3587d497894761d9eda08b670522d5c1a5518ea879cb5c9f222519005d28a36d6dea0b34d4bf4a2352e54aa151177f98ac730ce5b83e87ae4d35a2 SHA512 4c74f718046b41fbcf0111c797d6cdfa1f647914bfa5ff9aaedd6844ba1367722f225ed8ac17717d7b44c5ddc3b450e130da46cc0f6e21501b66cfd267a8f9ad diff --git a/sys-apps/busybox/busybox-1.33.1.ebuild b/sys-apps/busybox/busybox-1.33.1.ebuild deleted file mode 100644 index 1ba499654370..000000000000 --- a/sys-apps/busybox/busybox-1.33.1.ebuild +++ /dev/null @@ -1,337 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# See `man savedconfig.eclass` for info on how to use USE=savedconfig. - -EAPI=7 - -inherit flag-o-matic savedconfig toolchain-funcs - -DESCRIPTION="Utilities for rescue and embedded systems" -HOMEPAGE="https://www.busybox.net/" -if [[ ${PV} == "9999" ]] ; then - MY_P=${P} - EGIT_REPO_URI="https://git.busybox.net/busybox" - inherit git-r3 -else - MY_P=${PN}-${PV/_/-} - SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -fi - -LICENSE="GPL-2" # GPL-2 only -SLOT="0" -IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd" -REQUIRED_USE="pam? ( !static )" -RESTRICT="test" - -# TODO: Could make pkgconfig conditional on selinux? bug #782829 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) ) - pam? ( sys-libs/pam ) - virtual/libcrypt:=" -DEPEND="${COMMON_DEPEND} - static? ( - virtual/libcrypt[static-libs] - selinux? ( sys-libs/libselinux[static-libs(+)] ) - ) - >=sys-kernel/linux-headers-2.6.39" -BDEPEND="virtual/pkgconfig" -RDEPEND="${COMMON_DEPEND} - mdev? ( !<sys-apps/openrc-0.13 )" - -S="${WORKDIR}/${MY_P}" - -busybox_config_option() { - local flag=$1 ; shift - if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then - busybox_config_option $(usex ${flag} y n) "$@" - return - fi - local expr - while [[ $# -gt 0 ]] ; do - case ${flag} in - y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;; - n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;; - *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;; - esac - sed -i -e "${expr}" .config || die - einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")" - shift - done -} - -busybox_config_enabled() { - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config) - case ${val} in - "") return 1 ;; - y) return 0 ;; - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;; - esac -} - -# patches go here! -PATCHES=( - "${FILESDIR}"/${PN}-1.26.2-bb.patch - # "${FILESDIR}"/${P}-*.patch -) - -src_prepare() { - default - unset KBUILD_OUTPUT #88088 - append-flags -fno-strict-aliasing #310413 - use ppc64 && append-flags -mminimal-toc #130943 - - cp "${FILESDIR}"/ginit.c init/ || die - - # flag cleanup - sed -i -r \ - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ - Makefile.flags || die - #sed -i '/bbsh/s:^//::' include/applets.h - sed -i '/^#error Aborting compilation./d' applets/applets.c || die - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile - sed -i \ - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ - -e "/^AR\>/s:=.*:= $(tc-getAR):" \ - -e "/^CC\>/s:=.*:= $(tc-getCC):" \ - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ - Makefile || die - sed -i \ - -e 's:-static-libgcc::' \ - Makefile.flags || die -} - -src_configure() { - # check for a busybox config before making one of our own. - # if one exist lets return and use it. - - restore_config .config - if [ -f .config ]; then - yes "" | emake -j1 -s oldconfig >/dev/null - return 0 - else - ewarn "Could not locate user configfile, so we will save a default one" - fi - - # setup the config file - emake -j1 -s allyesconfig >/dev/null - # nommu forces a bunch of things off which we want on #387555 - busybox_config_option n NOMMU - sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig >/dev/null - - # now turn off stuff we really don't want - busybox_config_option n DMALLOC - busybox_config_option n FEATURE_2_4_MODULES #607548 - busybox_config_option n FEATURE_SUID_CONFIG - busybox_config_option n BUILD_AT_ONCE - busybox_config_option n BUILD_LIBBUSYBOX - busybox_config_option n FEATURE_CLEAN_UP - busybox_config_option n MONOTONIC_SYSCALL - busybox_config_option n USE_PORTABLE_CODE - busybox_config_option n WERROR - # triming the BSS size may be dangerous - busybox_config_option n FEATURE_USE_BSS_TAIL - - # These cause trouble with musl. - if use elibc_musl; then - busybox_config_option n FEATURE_UTMP - busybox_config_option n EXTRA_COMPAT - busybox_config_option n FEATURE_VI_REGEX_SEARCH - fi - - # If these are not set and we are using a busybox setup - # all calls to system() will fail. - busybox_config_option y ASH - busybox_config_option y SH_IS_ASH - busybox_config_option n HUSH - busybox_config_option n SH_IS_HUSH - - busybox_config_option '"/run"' PID_FILE_PATH - busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH - - # disable ipv6 applets - if ! use ipv6; then - busybox_config_option n FEATURE_IPV6 - busybox_config_option n TRACEROUTE6 - busybox_config_option n PING6 - busybox_config_option n UDHCPC6 - fi - - busybox_config_option pam PAM - busybox_config_option static STATIC - busybox_config_option syslog {K,SYS}LOGD LOGGER - busybox_config_option systemd FEATURE_SYSTEMD - busybox_config_option math FEATURE_AWK_LIBM - - # all the debug options are compiler related, so punt them - busybox_config_option n DEBUG_SANITIZE - busybox_config_option n DEBUG - busybox_config_option y NO_DEBUG_LIB - busybox_config_option n DMALLOC - busybox_config_option n EFENCE - busybox_config_option $(usex debug y n) TFTP_DEBUG - - busybox_config_option selinux SELINUX - - # this opt only controls mounting with <linux-2.6.23 - busybox_config_option n FEATURE_MOUNT_NFS - - # glibc-2.26 and later does not ship RPC implientation - busybox_config_option n FEATURE_HAVE_RPC - busybox_config_option n FEATURE_INETD_RPC - - # default a bunch of uncommon options to off - local opt - for opt in \ - ADD_SHELL \ - BEEP BOOTCHARTD \ - CRONTAB \ - DC DEVFSD DNSD DPKG{,_DEB} \ - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \ - FEATURE_DEVFS \ - HOSTID HUSH \ - INETD INOTIFYD IPCALC \ - LOCALE_SUPPORT LOGNAME LPD \ - MAKEMIME MKFS_MINIX MSH \ - OD \ - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \ - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \ - TASKSET TCPSVD \ - RPM RPM2CPIO \ - UDPSVD UUDECODE UUENCODE - do - busybox_config_option n ${opt} - done - - emake -j1 oldconfig > /dev/null -} - -src_compile() { - unset KBUILD_OUTPUT #88088 - export SKIP_STRIP=y - - emake V=1 busybox - - # bug #701512 - emake V=1 doc -} - -src_install() { - unset KBUILD_OUTPUT #88088 - save_config .config - - into / - dodir /bin - if use sep-usr ; then - # install /ginit to take care of mounting stuff - exeinto / - newexe busybox_unstripped ginit - dosym /ginit /bin/bb - dosym bb /bin/busybox - else - newbin busybox_unstripped busybox - dosym busybox /bin/bb - fi - if use mdev ; then - dodir /$(get_libdir)/mdev/ - use make-symlinks || dosym /bin/bb /sbin/mdev - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf - - exeinto /$(get_libdir)/mdev/ - doexe "${FILESDIR}"/mdev/* - - newinitd "${FILESDIR}"/mdev.initd mdev - fi - if use livecd ; then - dosym busybox /bin/vi - fi - - # add busybox daemon's, bug #444718 - if busybox_config_enabled FEATURE_NTPD_SERVER; then - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd" - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd" - fi - if busybox_config_enabled SYSLOGD; then - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd" - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd" - fi - if busybox_config_enabled KLOGD; then - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd" - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd" - fi - if busybox_config_enabled WATCHDOG; then - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog" - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog" - fi - if busybox_config_enabled UDHCPC; then - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT) - exeinto "${path%/*}" - newexe examples/udhcp/simple.script "${path##*/}" - fi - if busybox_config_enabled UDHCPD; then - insinto /etc - doins examples/udhcp/udhcpd.conf - fi - - # bundle up the symlink files for use later - emake DESTDIR="${ED}" install - rm _install/bin/busybox - # for compatibility, provide /usr/bin/env - mkdir -p _install/usr/bin - ln -s /bin/env _install/usr/bin/env - tar cf busybox-links.tar -C _install . || : #;die - insinto /usr/share/${PN} - use make-symlinks && doins busybox-links.tar - - dodoc AUTHORS README TODO - - cd docs || die - doman busybox.1 - docinto txt - dodoc *.txt - docinto pod - dodoc *.pod - docinto html - dodoc *.html - - cd ../examples || die - docinto examples - dodoc inittab depmod.pl *.conf *.script undeb unrpm -} - -pkg_preinst() { - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then - ewarn "setting USE=make-symlinks and emerging to / is very dangerous." - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." - ewarn "If you are creating a binary only and not merging this is probably ok." - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." - die "silly options will destroy your system" - fi - - if use make-symlinks ; then - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die - fi -} - -pkg_postinst() { - savedconfig_pkg_postinst - - if use make-symlinks ; then - cd "${T}" || die - mkdir _install - tar xf busybox-links.tar -C _install || die - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" - fi - - if use sep-usr ; then - elog "In order to use the sep-usr support, you have to update your" - elog "kernel command line. Add the option:" - elog " init=/ginit" - elog "To launch a different init than /sbin/init, use:" - elog " init=/ginit /sbin/yourinit" - elog "To get a rescue shell, you may boot with:" - elog " init=/ginit bb" - fi -} diff --git a/sys-apps/busybox/busybox-1.33.1-r2.ebuild b/sys-apps/busybox/busybox-1.34.1-r1.ebuild index 169995d3ca48..8fb10aebdff0 100644 --- a/sys-apps/busybox/busybox-1.33.1-r2.ebuild +++ b/sys-apps/busybox/busybox-1.34.1-r1.ebuild @@ -5,18 +5,18 @@ EAPI=7 -inherit flag-o-matic savedconfig toolchain-funcs +inherit eapi8-dosym flag-o-matic savedconfig toolchain-funcs DESCRIPTION="Utilities for rescue and embedded systems" HOMEPAGE="https://www.busybox.net/" if [[ ${PV} == "9999" ]] ; then - MY_P=${P} + MY_P="${P}" EGIT_REPO_URI="https://git.busybox.net/busybox" inherit git-r3 else - MY_P=${PN}-${PV/_/-} + MY_P="${PN}-${PV/_/-}" SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" fi LICENSE="GPL-2" # GPL-2 only @@ -26,18 +26,18 @@ REQUIRED_USE="pam? ( !static )" RESTRICT="test" # TODO: Could make pkgconfig conditional on selinux? bug #782829 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) ) +RDEPEND=" + virtual/libcrypt:= + !static? ( selinux? ( sys-libs/libselinux ) ) pam? ( sys-libs/pam ) - virtual/libcrypt:=" -DEPEND="${COMMON_DEPEND} +" +DEPEND="${RDEPEND} static? ( virtual/libcrypt[static-libs] selinux? ( sys-libs/libselinux[static-libs(+)] ) ) - >=sys-kernel/linux-headers-2.6.39" + sys-kernel/linux-headers" BDEPEND="virtual/pkgconfig" -RDEPEND="${COMMON_DEPEND} - mdev? ( !<sys-apps/openrc-0.13 )" S="${WORKDIR}/${MY_P}" @@ -72,6 +72,7 @@ busybox_config_enabled() { # patches go here! PATCHES=( "${FILESDIR}"/${PN}-1.26.2-bb.patch + "${FILESDIR}"/${PN}-1.34.1-skip-selinux-search.patch # "${FILESDIR}"/${P}-*.patch ) @@ -114,12 +115,14 @@ src_configure() { ewarn "Could not locate user configfile, so we will save a default one" fi + # setting SKIP_SELINUX skips searching for selinux at this stage. We don't + # need to search now in case we end up not needing it after all. # setup the config file - emake -j1 -s allyesconfig >/dev/null + emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # nommu forces a bunch of things off which we want on #387555 busybox_config_option n NOMMU sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig >/dev/null + yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # now turn off stuff we really don't want busybox_config_option n DMALLOC @@ -131,6 +134,10 @@ src_configure() { busybox_config_option n MONOTONIC_SYSCALL busybox_config_option n USE_PORTABLE_CODE busybox_config_option n WERROR + # CONFIG_MODPROBE_SMALL=y disables depmod.c and uses a smaller one that + # does not support -b. Setting this to no creates slightly larger and + # slightly more useful modutils + busybox_config_option n MODPROBE_SMALL #472464 # triming the BSS size may be dangerous busybox_config_option n FEATURE_USE_BSS_TAIL @@ -245,7 +252,10 @@ src_install() { if use mdev ; then dodir /$(get_libdir)/mdev/ use make-symlinks || dosym /bin/bb /sbin/mdev - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf + cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf || die + if [[ ! "$(get_libdir)" == "lib" ]]; then + sed -i -e "s:/lib/:/$(get_libdir)/:g" "${ED}"/etc/mdev.conf || die #831251 - replace lib with lib64 where appropriate + fi exeinto /$(get_libdir)/mdev/ doexe "${FILESDIR}"/mdev/* @@ -258,22 +268,23 @@ src_install() { # add busybox daemon's, bug #444718 if busybox_config_enabled FEATURE_NTPD_SERVER; then - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd" - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd" + newconfd "${FILESDIR}"/ntpd.confd busybox-ntpd + newinitd "${FILESDIR}"/ntpd.initd busybox-ntpd fi if busybox_config_enabled SYSLOGD; then - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd" - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd" + newconfd "${FILESDIR}"/syslogd.confd busybox-syslogd + newinitd "${FILESDIR}"/syslogd.initd busybox-syslogd fi if busybox_config_enabled KLOGD; then - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd" - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd" + newconfd "${FILESDIR}"/klogd.confd busybox-klogd + newinitd "${FILESDIR}"/klogd.initd busybox-klogd fi if busybox_config_enabled WATCHDOG; then - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog" - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog" + newconfd "${FILESDIR}"/watchdog.confd busybox-watchdog + newinitd "${FILESDIR}"/watchdog.initd busybox-watchdog fi if busybox_config_enabled UDHCPC; then + sed -i 's:$((metric++)):$metric; metric=$((metric + 1)):' examples/udhcp/simple.script || die #801535 local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT) exeinto "${path%/*}" newexe examples/udhcp/simple.script "${path##*/}" @@ -282,13 +293,22 @@ src_install() { insinto /etc doins examples/udhcp/udhcpd.conf fi + if busybox_config_enabled ASH && ! use make-symlinks; then + dosym8 -r /bin/busybox /bin/ash + fi + if busybox_config_enabled CROND; then + newconfd "${FILESDIR}"/crond.confd busybox-crond + newinitd "${FILESDIR}"/crond.initd busybox-crond + fi # bundle up the symlink files for use later emake DESTDIR="${ED}" install - rm _install/bin/busybox + rm _install/bin/busybox || die # for compatibility, provide /usr/bin/env - mkdir -p _install/usr/bin - ln -s /bin/env _install/usr/bin/env + mkdir -p _install/usr/bin || die + if [[ ! -e _install/usr/bin/env ]]; then + ln -s /bin/env _install/usr/bin/env || die + fi tar cf busybox-links.tar -C _install . || : #;die insinto /usr/share/${PN} use make-symlinks && doins busybox-links.tar @@ -307,17 +327,12 @@ src_install() { cd ../examples || die docinto examples dodoc inittab depmod.pl *.conf *.script undeb unrpm + + cd ../networking || die + dodoc httpd_indexcgi.c httpd_post_upload.cgi } pkg_preinst() { - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then - ewarn "setting USE=make-symlinks and emerging to / is very dangerous." - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." - ewarn "If you are creating a binary only and not merging this is probably ok." - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." - die "silly options will destroy your system" - fi - if use make-symlinks ; then mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die fi @@ -330,7 +345,7 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - false | cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" fi if use sep-usr ; then diff --git a/sys-apps/busybox/busybox-1.32.1-r1.ebuild b/sys-apps/busybox/busybox-1.35.0-r1.ebuild index 962ff5a9bfeb..76d06dcb9b29 100644 --- a/sys-apps/busybox/busybox-1.32.1-r1.ebuild +++ b/sys-apps/busybox/busybox-1.35.0-r1.ebuild @@ -5,18 +5,19 @@ EAPI=7 -inherit flag-o-matic savedconfig toolchain-funcs +inherit eapi8-dosym flag-o-matic savedconfig toolchain-funcs DESCRIPTION="Utilities for rescue and embedded systems" HOMEPAGE="https://www.busybox.net/" if [[ ${PV} == "9999" ]] ; then - MY_P=${P} + MY_P="${P}" EGIT_REPO_URI="https://git.busybox.net/busybox" inherit git-r3 else - MY_P=${PN}-${PV/_/-} + MY_P="${PN}-${PV/_/-}" SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" + # unstable release - no keywords + # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" fi LICENSE="GPL-2" # GPL-2 only @@ -26,18 +27,18 @@ REQUIRED_USE="pam? ( !static )" RESTRICT="test" # TODO: Could make pkgconfig conditional on selinux? bug #782829 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) ) +RDEPEND=" + virtual/libcrypt:= + !static? ( selinux? ( sys-libs/libselinux ) ) pam? ( sys-libs/pam ) - virtual/libcrypt:=" -DEPEND="${COMMON_DEPEND} +" +DEPEND="${RDEPEND} static? ( virtual/libcrypt[static-libs] selinux? ( sys-libs/libselinux[static-libs(+)] ) ) - >=sys-kernel/linux-headers-2.6.39" + sys-kernel/linux-headers" BDEPEND="virtual/pkgconfig" -RDEPEND="${COMMON_DEPEND} - mdev? ( !<sys-apps/openrc-0.13 )" S="${WORKDIR}/${MY_P}" @@ -72,6 +73,7 @@ busybox_config_enabled() { # patches go here! PATCHES=( "${FILESDIR}"/${PN}-1.26.2-bb.patch + "${FILESDIR}"/${PN}-1.34.1-skip-selinux-search.patch # "${FILESDIR}"/${P}-*.patch ) @@ -114,12 +116,14 @@ src_configure() { ewarn "Could not locate user configfile, so we will save a default one" fi + # setting SKIP_SELINUX skips searching for selinux at this stage. We don't + # need to search now in case we end up not needing it after all. # setup the config file - emake -j1 -s allyesconfig >/dev/null + emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # nommu forces a bunch of things off which we want on #387555 busybox_config_option n NOMMU sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig >/dev/null + yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # now turn off stuff we really don't want busybox_config_option n DMALLOC @@ -131,6 +135,10 @@ src_configure() { busybox_config_option n MONOTONIC_SYSCALL busybox_config_option n USE_PORTABLE_CODE busybox_config_option n WERROR + # CONFIG_MODPROBE_SMALL=y disables depmod.c and uses a smaller one that + # does not support -b. Setting this to no creates slightly larger and + # slightly more useful modutils + busybox_config_option n MODPROBE_SMALL #472464 # triming the BSS size may be dangerous busybox_config_option n FEATURE_USE_BSS_TAIL @@ -141,6 +149,14 @@ src_configure() { busybox_config_option n FEATURE_VI_REGEX_SEARCH fi + # Disable standalone shell mode when using make-symlinks, else Busybox calls its + # applets by default without looking up in PATH. + # This also enables users to disable a builtin by deleting the corresponding symlink. + if use make-symlinks; then + busybox_config_option n FEATURE_PREFER_APPLETS + busybox_config_option n FEATURE_SH_STANDALONE + fi + # If these are not set and we are using a busybox setup # all calls to system() will fail. busybox_config_option y ASH @@ -237,7 +253,10 @@ src_install() { if use mdev ; then dodir /$(get_libdir)/mdev/ use make-symlinks || dosym /bin/bb /sbin/mdev - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf + cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf || die + if [[ ! "$(get_libdir)" == "lib" ]]; then + sed -i -e "s:/lib/:/$(get_libdir)/:g" "${ED}"/etc/mdev.conf || die #831251 - replace lib with lib64 where appropriate + fi exeinto /$(get_libdir)/mdev/ doexe "${FILESDIR}"/mdev/* @@ -250,22 +269,23 @@ src_install() { # add busybox daemon's, bug #444718 if busybox_config_enabled FEATURE_NTPD_SERVER; then - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd" - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd" + newconfd "${FILESDIR}"/ntpd.confd busybox-ntpd + newinitd "${FILESDIR}"/ntpd.initd busybox-ntpd fi if busybox_config_enabled SYSLOGD; then - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd" - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd" + newconfd "${FILESDIR}"/syslogd.confd busybox-syslogd + newinitd "${FILESDIR}"/syslogd.initd busybox-syslogd fi if busybox_config_enabled KLOGD; then - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd" - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd" + newconfd "${FILESDIR}"/klogd.confd busybox-klogd + newinitd "${FILESDIR}"/klogd.initd busybox-klogd fi if busybox_config_enabled WATCHDOG; then - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog" - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog" + newconfd "${FILESDIR}"/watchdog.confd busybox-watchdog + newinitd "${FILESDIR}"/watchdog.initd busybox-watchdog fi if busybox_config_enabled UDHCPC; then + sed -i 's:$((metric++)):$metric; metric=$((metric + 1)):' examples/udhcp/simple.script || die #801535 local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT) exeinto "${path%/*}" newexe examples/udhcp/simple.script "${path##*/}" @@ -274,13 +294,22 @@ src_install() { insinto /etc doins examples/udhcp/udhcpd.conf fi + if busybox_config_enabled ASH && ! use make-symlinks; then + dosym8 -r /bin/busybox /bin/ash + fi + if busybox_config_enabled CROND; then + newconfd "${FILESDIR}"/crond.confd busybox-crond + newinitd "${FILESDIR}"/crond.initd busybox-crond + fi # bundle up the symlink files for use later emake DESTDIR="${ED}" install - rm _install/bin/busybox + rm _install/bin/busybox || die # for compatibility, provide /usr/bin/env - mkdir -p _install/usr/bin - ln -s /bin/env _install/usr/bin/env + mkdir -p _install/usr/bin || die + if [[ ! -e _install/usr/bin/env ]]; then + ln -s /bin/env _install/usr/bin/env || die + fi tar cf busybox-links.tar -C _install . || : #;die insinto /usr/share/${PN} use make-symlinks && doins busybox-links.tar @@ -299,17 +328,12 @@ src_install() { cd ../examples || die docinto examples dodoc inittab depmod.pl *.conf *.script undeb unrpm + + cd ../networking || die + dodoc httpd_indexcgi.c httpd_post_upload.cgi } pkg_preinst() { - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then - ewarn "setting USE=make-symlinks and emerging to / is very dangerous." - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." - ewarn "If you are creating a binary only and not merging this is probably ok." - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." - die "silly options will destroy your system" - fi - if use make-symlinks ; then mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die fi @@ -322,7 +346,7 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" fi if use sep-usr ; then diff --git a/sys-apps/busybox/busybox-9999.ebuild b/sys-apps/busybox/busybox-9999.ebuild index 490896632feb..5e059850212f 100644 --- a/sys-apps/busybox/busybox-9999.ebuild +++ b/sys-apps/busybox/busybox-9999.ebuild @@ -5,7 +5,7 @@ EAPI=7 -inherit flag-o-matic savedconfig toolchain-funcs +inherit eapi8-dosym flag-o-matic savedconfig toolchain-funcs DESCRIPTION="Utilities for rescue and embedded systems" HOMEPAGE="https://www.busybox.net/" @@ -72,6 +72,8 @@ busybox_config_enabled() { # patches go here! PATCHES=( "${FILESDIR}"/${PN}-1.26.2-bb.patch + "${FILESDIR}"/${PN}-1.34.1-skip-selinux-search.patch + "${FILESDIR}"/${PN}-1.36.0-fix-wx-sections.patch # "${FILESDIR}"/${P}-*.patch ) @@ -114,12 +116,14 @@ src_configure() { ewarn "Could not locate user configfile, so we will save a default one" fi + # setting SKIP_SELINUX skips searching for selinux at this stage. We don't + # need to search now in case we end up not needing it after all. # setup the config file - emake -j1 -s allyesconfig >/dev/null + emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # nommu forces a bunch of things off which we want on #387555 busybox_config_option n NOMMU sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig >/dev/null + yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # now turn off stuff we really don't want busybox_config_option n DMALLOC @@ -131,6 +135,10 @@ src_configure() { busybox_config_option n MONOTONIC_SYSCALL busybox_config_option n USE_PORTABLE_CODE busybox_config_option n WERROR + # CONFIG_MODPROBE_SMALL=y disables depmod.c and uses a smaller one that + # does not support -b. Setting this to no creates slightly larger and + # slightly more useful modutils + busybox_config_option n MODPROBE_SMALL #472464 # triming the BSS size may be dangerous busybox_config_option n FEATURE_USE_BSS_TAIL @@ -245,7 +253,10 @@ src_install() { if use mdev ; then dodir /$(get_libdir)/mdev/ use make-symlinks || dosym /bin/bb /sbin/mdev - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf + cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf || die + if [[ ! "$(get_libdir)" == "lib" ]]; then + sed -i -e "s:/lib/:/$(get_libdir)/:g" "${ED}"/etc/mdev.conf || die #831251 - replace lib with lib64 where appropriate + fi exeinto /$(get_libdir)/mdev/ doexe "${FILESDIR}"/mdev/* @@ -274,6 +285,7 @@ src_install() { newinitd "${FILESDIR}"/watchdog.initd busybox-watchdog fi if busybox_config_enabled UDHCPC; then + sed -i 's:$((metric++)):$metric; metric=$((metric + 1)):' examples/udhcp/simple.script || die #801535 local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT) exeinto "${path%/*}" newexe examples/udhcp/simple.script "${path##*/}" @@ -282,13 +294,22 @@ src_install() { insinto /etc doins examples/udhcp/udhcpd.conf fi + if busybox_config_enabled ASH && ! use make-symlinks; then + dosym8 -r /bin/busybox /bin/ash + fi + if busybox_config_enabled CROND; then + newconfd "${FILESDIR}"/crond.confd busybox-crond + newinitd "${FILESDIR}"/crond.initd busybox-crond + fi # bundle up the symlink files for use later emake DESTDIR="${ED}" install rm _install/bin/busybox || die # for compatibility, provide /usr/bin/env mkdir -p _install/usr/bin || die - ln -s /bin/env _install/usr/bin/env || die + if [[ ! -e _install/usr/bin/env ]]; then + ln -s /bin/env _install/usr/bin/env || die + fi tar cf busybox-links.tar -C _install . || : #;die insinto /usr/share/${PN} use make-symlinks && doins busybox-links.tar @@ -307,6 +328,9 @@ src_install() { cd ../examples || die docinto examples dodoc inittab depmod.pl *.conf *.script undeb unrpm + + cd ../networking || die + dodoc httpd_indexcgi.c httpd_post_upload.cgi } pkg_preinst() { diff --git a/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch b/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch new file mode 100644 index 000000000000..6fe043bf39e4 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch @@ -0,0 +1,21 @@ +Setting SKIP_SELINUX skips searching for selinux. The current ebuild calls +make 3 times. The first 2 times we don't need to search for selinux packages +because we might end up not needing them and we get useless warnings. + +--- a/Makefile.flags ++++ b/Makefile.flags +@@ -176,12 +176,14 @@ + LDLIBS += pam pam_misc + endif + ++ifneq ($(SKIP_SELINUX),y) + ifeq ($(CONFIG_SELINUX),y) + SELINUX_PC_MODULES = libselinux libsepol + $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) + CPPFLAGS += $(SELINUX_CFLAGS) + LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%)) + endif ++endif + + ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) + ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine))) diff --git a/sys-apps/busybox/files/busybox-1.36.0-fix-wx-sections.patch b/sys-apps/busybox/files/busybox-1.36.0-fix-wx-sections.patch new file mode 100644 index 000000000000..16118cf9b95f --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.36.0-fix-wx-sections.patch @@ -0,0 +1,74 @@ + * QA Notice: The following files contain writable and executable sections + * Files with such sections will not work properly (or at all!) on some + * architectures/operating systems. A bug should be filed at + * https://bugs.gentoo.org/ to make sure the issue is fixed. + * For more information, see: + * + * https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart + * + * Please include the following list of files in your report: + * Note: Bugs should be filed for the respective maintainers + * of the package in question and not hardened@gentoo.org. + * RWX --- --- bin/busybox + +$ scanelf -qeR . +RWX --- --- ./busybox +RWX --- --- ./busybox_unstripped +!WX --- --- ./libbb/hash_md5_sha_x86-64_shaNI.o +!WX --- --- ./libbb/hash_md5_sha_x86-64.o +!WX --- --- ./libbb/hash_md5_sha_x86-32_shaNI.o +!WX --- --- ./libbb/hash_md5_sha256_x86-64_shaNI.o +!WX --- --- ./libbb/hash_md5_sha256_x86-32_shaNI.o + +Try to fix this QA issue + +--- a/libbb/hash_md5_sha256_x86-32_shaNI.S ++++ b/libbb/hash_md5_sha256_x86-32_shaNI.S +@@ -278,4 +278,7 @@ + PSHUFFLE_BSWAP32_FLIP_MASK: + .octa 0x0c0d0e0f08090a0b0405060700010203 + ++#if defined(__linux__) && defined(__ELF__) ++ .section .note.GNU-stack, "", %progbits ++#endif + #endif +--- a/libbb/hash_md5_sha256_x86-64_shaNI.S ++++ b/libbb/hash_md5_sha256_x86-64_shaNI.S +@@ -284,4 +284,7 @@ + PSHUFFLE_BSWAP32_FLIP_MASK: + .octa 0x0c0d0e0f08090a0b0405060700010203 + ++#if defined(__linux__) && defined(__ELF__) ++ .section .note.GNU-stack, "", %progbits ++#endif + #endif +--- a/libbb/hash_md5_sha_x86-32_shaNI.S ++++ b/libbb/hash_md5_sha_x86-32_shaNI.S +@@ -228,4 +228,7 @@ + PSHUFFLE_BYTE_FLIP_MASK: + .octa 0x000102030405060708090a0b0c0d0e0f + ++#if defined(__linux__) && defined(__ELF__) ++ .section .note.GNU-stack, "", %progbits ++#endif + #endif +--- a/libbb/hash_md5_sha_x86-64.S ++++ b/libbb/hash_md5_sha_x86-64.S +@@ -1483,4 +1483,7 @@ + .long 0x8F1BBCDC + .long 0xCA62C1D6 + ++#if defined(__linux__) && defined(__ELF__) ++ .section .note.GNU-stack, "", %progbits ++#endif + #endif +--- a/libbb/hash_md5_sha_x86-64_shaNI.S ++++ b/libbb/hash_md5_sha_x86-64_shaNI.S +@@ -226,4 +226,7 @@ + PSHUFFLE_BYTE_FLIP_MASK: + .octa 0x000102030405060708090a0b0c0d0e0f + ++#if defined(__linux__) && defined(__ELF__) ++ .section .note.GNU-stack, "", %progbits ++#endif + #endif diff --git a/sys-apps/busybox/files/crond.confd b/sys-apps/busybox/files/crond.confd new file mode 100644 index 000000000000..707366252913 --- /dev/null +++ b/sys-apps/busybox/files/crond.confd @@ -0,0 +1,2 @@ +# Config file for /etc/init.d/busybox-crond +CRONDARGS= diff --git a/sys-apps/busybox/files/crond.initd b/sys-apps/busybox/files/crond.initd new file mode 100644 index 000000000000..e098b14714a4 --- /dev/null +++ b/sys-apps/busybox/files/crond.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/bin/busybox crond" +command_args="${CRONDARGS}" +pidfile="/run/crond.pid" + +depend() { + need clock logger + provide cron +} diff --git a/sys-apps/busybox/files/mdev/dvbdev b/sys-apps/busybox/files/mdev/dvbdev index f0186c176cd8..971b0efc9096 100644 --- a/sys-apps/busybox/files/mdev/dvbdev +++ b/sys-apps/busybox/files/mdev/dvbdev @@ -8,11 +8,11 @@ DVB_DEV=${MDEV#*.} case "$ACTION" in add|"") - mkdir -p dvb/adapter${N} - mv ${MDEV} dvb/adapter${N}/${DVB_DEV} + mkdir -p "dvb/adapter${N}" + mv "${MDEV}" "dvb/adapter${N}/${DVB_DEV}" ;; remove) - rm -f dvb/adapter${N}/${DVB_DEV} - rmdir dvb/adapter${N} 2>/dev/null + rm -f "dvb/adapter${N}/${DVB_DEV}" + rmdir "dvb/adapter${N}" 2>/dev/null rmdir dvb/ 2>/dev/null esac diff --git a/sys-apps/busybox/files/mdev/ide_links b/sys-apps/busybox/files/mdev/ide_links index be0c95aa9c0e..dfb7c9cb46d5 100644 --- a/sys-apps/busybox/files/mdev/ide_links +++ b/sys-apps/busybox/files/mdev/ide_links @@ -1,23 +1,23 @@ #!/bin/sh -[ -f /proc/ide/$MDEV/media ] || exit +[ -f /proc/ide/"${MDEV}"/media ] || exit -media=`cat /proc/ide/$MDEV/media` -for i in $media $media[0-9]* ; do - if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then - LINK=$i +media=$(cat /proc/ide/"${MDEV}"/media) +for i in "${media}" "${media}"[0-9]* ; do + if [ "$(readlink "$i" 2>/dev/null)" = "${MDEV}" ] ; then + LINK="$i" break fi done # link exist, remove if necessary and exit -if [ "$LINK" ] ; then - [ "$ACTION" = remove ] && rm $LINK +if [ "${LINK}" ] ; then + [ "${ACTION}" = remove ] && rm "${LINK}" exit fi # create a link -num=`ls $media[0-9]* 2>/dev/null | wc -l` -ln -sf $MDEV "$media`echo $num`" -[ -e "$media" ] || ln -sf $MDEV "$media" +num=$(ls "${media}"[0-9]* 2>/dev/null | wc -l) +ln -sf "${MDEV}" "${media}${num}" +[ -e "${media}" ] || ln -sf "${MDEV}" "${media}" diff --git a/sys-apps/busybox/files/mdev/usbdev b/sys-apps/busybox/files/mdev/usbdev index ea5b9155736c..eda3825df287 100644 --- a/sys-apps/busybox/files/mdev/usbdev +++ b/sys-apps/busybox/files/mdev/usbdev @@ -5,7 +5,7 @@ # add zeros to device or bus add_zeros () { - case "$(echo $1 | wc -L)" in + case "$(echo "$1" | wc -L)" in 1) echo "00$1" ;; 2) echo "0$1" ;; *) echo "$1" @@ -15,48 +15,48 @@ add_zeros () { # bus and device dirs in /sys -USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/') -USB_PATH=$(find /sys/devices -type d -name "$USB_PATH") -USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/') +USB_PATH=$(echo "${MDEV}" | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/') +USB_PATH=$(find /sys/devices -type d -name "${USB_PATH}") +USB_DEV_DIR=$(echo "${MDEV}" | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/') # dir names in /dev -BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/')) -USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/')) +BUS=$(add_zeros "$(echo "${MDEV}" | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/')") +USB_DEV=$(add_zeros "$(echo "${MDEV}" | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/')") # try to load the proper driver for usb devices -case "$ACTION" in +case "${ACTION}" in add|"") # load usb bus driver - for i in $USB_PATH/*/modalias ; do - modprobe `cat $i` 2>/dev/null + for i in "${USB_PATH}"/*/modalias ; do + modprobe "$(cat "$i")" 2>/dev/null done # load usb device driver if existent - if [ -d $USB_PATH/$USB_DEV_DIR ]; then - for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do - modprobe `cat $i` 2>/dev/null + if [ -d "${USB_PATH}/${USB_DEV_DIR}" ]; then + for i in "${USB_PATH}/${USB_DEV_DIR}"/*/modalias ; do + modprobe "$(cat "$i")" 2>/dev/null done fi # move usb device file - mkdir -p bus/usb/$BUS - mv $MDEV bus/usb/$BUS/$USB_DEV + mkdir -p "bus/usb/${BUS}" + mv "${MDEV}" "bus/usb/${BUS}/${USB_DEV}" ;; remove) # unload device driver, if device dir is existent - if [ -d $USB_PATH/$USB_DEV_DIR ]; then - for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do - modprobe -r `cat $i` 2>/dev/null + if [ -d "${USB_PATH}/${USB_DEV_DIR}" ]; then + for i in "${USB_PATH}/${USB_DEV_DIR}"/*/modalias ; do + modprobe -r "$(cat "$i")" 2>/dev/null done fi # unload usb bus driver. Does this make sense? # what happens, if two usb devices are plugged in # and one is removed? - for i in $USB_PATH/*/modalias ; do - modprobe -r `cat $i` 2>/dev/null + for i in "${USB_PATH}"/*/modalias ; do + modprobe -r "$(cat "$i")" 2>/dev/null done # remove device file and possible empty dirs - rm -f bus/usb/$BUS/$USB_DEV - rmdir bus/usb/$BUS/ 2>/dev/null + rm -f "bus/usb/${BUS}/${USB_DEV}" + rmdir "bus/usb/${BUS}/" 2>/dev/null rmdir bus/usb/ 2>/dev/null rmdir bus/ 2>/dev/null esac diff --git a/sys-apps/busybox/files/mdev/usbdisk_link b/sys-apps/busybox/files/mdev/usbdisk_link index 6bb069243f4c..e42cc8bc9085 100644 --- a/sys-apps/busybox/files/mdev/usbdisk_link +++ b/sys-apps/busybox/files/mdev/usbdisk_link @@ -4,31 +4,35 @@ current=$(readlink usbdisk) -if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then +if [ "${current}" = "${MDEV}" ] && [ "${ACTION}" = "remove" ]; then rm -f usbdisk usba1 fi -[ -n "$current" ] && exit +[ -n "${current}" ] && exit -if [ -e /sys/block/$MDEV ]; then - SYSDEV=$(readlink -f /sys/block/$MDEV/device) +if [ -e /sys/block/"${MDEV}" ]; then + SYSDEV=$(readlink -f /sys/block/"${MDEV}"/device) # if /sys device path contains '/usb[0-9]' then we assume its usb # also, if it's a usb without partitions we require FAT - if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then + if [ "${SYSDEV##*/usb[0-9]}" != "${SYSDEV}" ]; then # do not create link if there is not FAT - dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0 + dd if=/dev/"${MDEV}" bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0 - ln -sf $MDEV usbdisk + ln -sf "${MDEV}" usbdisk # keep this for compat. people have it in fstab - ln -sf $MDEV usba1 + ln -sf "${MDEV}" usba1 fi -elif [ -e /sys/block/*/$MDEV ] ; then - PARENT=$(dirname /sys/block/*/$MDEV) - SYSDEV=$(readlink -f $PARENT/device) - if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then - ln -sf $MDEV usbdisk - # keep this for compat. people have it in fstab - ln -sf $MDEV usba1 - fi +else + for i in /sys/block/*/"${MDEV}"; do + if [ -e "$i" ]; then + PARENT=$(dirname "$i") + SYSDEV=$(readlink -f "${PARENT}"/device) + if [ "${SYSDEV##*/usb[0-9]}" != "${SYSDEV}" ]; then + ln -sf "${MDEV}" usbdisk + # keep this for compat. people have it in fstab + ln -sf "${MDEV}" usba1 + fi + fi + done fi |