diff options
Diffstat (limited to 'sys-apps/systemd-utils')
-rw-r--r-- | sys-apps/systemd-utils/Manifest | 28 | ||||
-rw-r--r-- | sys-apps/systemd-utils/files/musl-efi-wchar.patch | 29 | ||||
-rw-r--r-- | sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch | 61 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-254.13.ebuild (renamed from sys-apps/systemd-utils/systemd-utils-254.10-r1.ebuild) | 8 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-254.16.ebuild (renamed from sys-apps/systemd-utils/systemd-utils-254.12.ebuild) | 8 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-254.17.ebuild (renamed from sys-apps/systemd-utils/systemd-utils-254.11.ebuild) | 8 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-254.18.ebuild (renamed from sys-apps/systemd-utils/systemd-utils-254.8-r1.ebuild) | 11 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-255.10.ebuild (renamed from sys-apps/systemd-utils/systemd-utils-255.4.ebuild) | 80 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-255.11.ebuild | 621 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-255.12.ebuild | 621 |
10 files changed, 1417 insertions, 58 deletions
diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest index 87438c726d7f..f55866ae6c0a 100644 --- a/sys-apps/systemd-utils/Manifest +++ b/sys-apps/systemd-utils/Manifest @@ -1,20 +1,26 @@ AUX 40-gentoo.rules 167 BLAKE2B 07116c6e5aab7de9fa8a88c6cdd9ad76a09d797d6f7bc3d0535c93ccf83486bbdae8f68d682714576b072a174df070505cce9c6f4b729e91a6f61ed89da72e8e SHA512 92e2be610839432f46cefab4d128825199dc9f2c5ef33119f9ff84dfe635ef56a4f7aaed64ba52ea2798868b00c3a1b7955caa33219aa298c6a2b8290181f94b AUX legacy.conf 80 BLAKE2B 23eca4dd1743a5cf77767894d23d419c1663147c5aee6be971da64fdea0531eadfe97ac8bc4e63b44404dcf89940d438de6b7081158b78639945ce0fadbb103c SHA512 f74f05991102b644dee7822a80cb8e6c14cd1eb48bd9342bc662d5947b9f04d32e875d2a5e6476a67bdbface4d2b2159b99c11d72eb4658c5cb4caf595f138be +AUX musl-efi-wchar.patch 938 BLAKE2B 92cf6983032a1bbf39255de7ed77371113fa87b21b9606c3d3d83bbcf868933d3d49301faea90fcf64f4a4accb03aa7dabadb57f8940f7df91f5372ed2c953b1 SHA512 17f44277678e30d48c57dbf99380b955c06c444e0986f8beb216064297eb4e5e95162433ae4e3230eda9a4e0d9ac342706e4f1ee55e7ed96d4bb16d760240537 AUX systemd-tmpfiles-clean 58 BLAKE2B 6a33f92a136218f3a27ea31e5cdd519706b15a3bba368f6f900d1d540f50493905a2cdab35ee3d216c9cb45e821251bfacc4965ad5a2ca7b1e1ae5627f4a3680 SHA512 3084eb1623b56cb09e4c9bd3e314a3e1d6d88f002149bea75b1c506a30b6345c51c7a90a1330baa5eec86ae6b90116f9970d8ff5add91929167df84bef6e82fe AUX systemd-tmpfiles-setup 329 BLAKE2B 7b4d801ec7c29a3d6073c47af8fa1c9fa670b3762c5358d0008ecf372e675e3f65cba3ea453d374c5e23453cfe32252421b69dff23aaeea636c611b960eb7b11 SHA512 cd7f7c69d1b1861cb4eac90d44579361e365ee77906376b6124ff79ba1c0d414b8891ffca19e715585d7400bddc5e9ad973f191125039a4a2c37acb95a111c37 AUX systemd-tmpfiles-setup-dev 342 BLAKE2B 95956e57d4f2aa10a09f23c08045ceed6fac3c569ee604a83707310f074740a41832d2e3fa3b528a3816202132e18be50ce40dbcded9430031ed9a2a172d3187 SHA512 3c5e29fc5bc2829984458149de1186075eec48775983376a8b47da162cbf4892754f19a3b277170f8b759a862bb5d910789da1db2bbf8447d6dacccb411be222 AUX systemd-utils-254.3-add-link-kernel-install-shared-option.patch 2350 BLAKE2B b9ad80ddadea96516198b8bee351443ec155e5bdf916b6ee86ec5b6712565ddafc04fa632dd0c56bd9e18345d444a7e17d63446121e84402a85c9a828c20e670 SHA512 390fc403630a6abd5724d8939162de4f869e9b7681824a1280a769742bbcccac4126e1cbcc076b48aaf1aa07097b5eae1f5375da1702a8cc452f92996fd0d4f8 +AUX systemd-utils-255-musl-fgetxxent.patch 2001 BLAKE2B e667f10c829b40b51111090cbc203218f05c5dd68eba559748540ffc5eb9c9b2996370321f69e0f4b70a97c5826a25df24b5f7a744669e1cb65cdbc3635bbac2 SHA512 f0028ebec6481e90bff11e87cf166a7ef3c12c7bb40591c326275e652225776ea894d00bb248f1f2a2c36ba13b5f3a41f0161afa85a359a54de84e72ff7c8533 AUX tmp.conf 48 BLAKE2B 04e0b6bd652b67e18eb96d47cc049ba89fdc28512edca4f5719f21938efbce2f59214e329f2fc3c862afa2b15156ec3fafbc696a1cc8795a8ec3c9dcd7a6b563 SHA512 45743d48ce7c3932310522fbeb7344f6d53c3cc38ca42b1b6aff7619fa91f7722dd328204432aa0fdd19c9107a44f3d0814c12f24bdbeca99b94b217e6927a72 DIST systemd-musl-patches-254.3-r1.tar.gz 29971 BLAKE2B 2568c0ce93c410177d775fedb7a67b9498d66f39bfaca220237b3b55cd42c94569d7e3bfde11a9b1faa5eac1804eb75bfdee0ee465c2faac3b8213026b97daec SHA512 817c94765a70eaaa5d23454e03887e149db4612f01c29690baa0c75d61b4b328b742e5d02e8cc63c531eadcd72ae37c0a407aad37c22f1d399dbba81a6bed79d -DIST systemd-musl-patches-255.4.tar.gz 31633 BLAKE2B 86fb36fbfa90dfe7d183f3c814600af93a690c7cfefc551cd23e6b8bdc2a48267910f4e5ef119b1b5d8e4e0cb2e6843e1b7147464809febad3085d2c82a728c3 SHA512 86bbb735012ce20bbc0af34ea062e83d6d3adf7883f5710ab00db7188fa6779e8dc361cdac427540042c4cf2f157242e6409ed5fc213c01d06cc13380e0cc95f -DIST systemd-stable-254.10.tar.gz 14428960 BLAKE2B 488c27b9657ec7452f876ab6c18bbfe711f1351afa022801f5a646f2dd1d76d63c17e52e6ebf43b38a76807907287b654a7eaca3afdb0688f5b05839e98ad727 SHA512 0c127d38d0ade8655ae12172c2edbaa8af68bd29f42d965b988d75e74626846ae859bcf0b39b535c9a99ad8c709ad7575ed4d5ea5bc95ce8729e3caafdb32b70 -DIST systemd-stable-254.11.tar.gz 14439741 BLAKE2B 5103bad91cd01b019ebb431f54f2d795ab995359c90b5c2e7376b5c7b5aec121ea6d070143b8581e3fb0d66ad2ac7e44113fa5e5fae4cb5adbf0e996727264fe SHA512 597c559b27a2879ce3f89efded7adce55d054bbb8ce97cf35efe52b0dcacbfabcbd05b582bd7064d3ba713ec2ec7931241971e67d39f12226e477df23c0d0dc7 -DIST systemd-stable-254.12.tar.gz 14529517 BLAKE2B ed6e4a78363930840e505c4bd789d1d44c238f30d3c0768d435e1cacb43ac3ab07e0dc9085546b4142152bbb4ceb4e2c0a9560e74e1a2b8c09fc885620695e73 SHA512 fa3679915392e641bed73ccb48f5def386ab13ba5ff7efdac952214193c3311543bec4c4370d6880f9599f63e377506b343805c3c56b7dde7eb5e3bbc0dc7a87 -DIST systemd-stable-254.8.tar.gz 14418468 BLAKE2B e5a151ece86e57c7224fc95bda1b4ede1277fce4a2ba28d3605ab0431a2aafe1088f90c49a20e3b53a5b56aeef7c0f1f5da0601db740150f5efdf6eae7bbde80 SHA512 a3f35d9fcafcccd8d9c33ab1047241f226146017be95562a67c7dcc9eeb4b77bded92ad80e92f4767f2bf2009df0172a621d4c54a805e07ed5a5ed03940ec28e -DIST systemd-stable-255.4.tar.gz 14952427 BLAKE2B 27f5080f83a9e870fbe8e3ebcb500a63c42022f1f96f26f35c76eeeea85dab691291c31ee716cab330b76df5e576910a6a82f51267eff4f766b1d4c304d815c9 SHA512 8a2bde11a55f7f788ba7751789a5e9be6ce9634e88d54e49f6e832c4c49020c6cacaf2a610fe26f92998b0cbf43c6c2150a96b2c0953d23261009f57d71ea979 -EBUILD systemd-utils-254.10-r1.ebuild 13329 BLAKE2B a86c581f5fb3af69a590a994169aca5ded7d9cc34c07542ca86292991db5d39a023bd859c9b7bc1dfd9f8fde95b50348cd959c9e6bff08e94675a8753e16483d SHA512 b3f8c8d3c0647ee8701d7a6ebc921a0760540d8e38410fd6e8d257b6b6f11ceb72e1dc12e55df009a52f0d4e15ee7302a1d309bedef4da2a770ed625d0fc60e0 -EBUILD systemd-utils-254.11.ebuild 13337 BLAKE2B ca4405757ee54acc143f1f2af2c974cfd90c36a11681d62ee07f3da0c82972aa239dbb280c9bb179022f2da9628e1a37bbae5e0a9c186534e1bf0c937fed4502 SHA512 bcb56e7d0ca145789f7b293155937e7b7d7e3cbf4416b592aafac8fe64641014947606ac950102c6dc0c9371dbb080e4d0603fd915177127a57dcfa5559dc7cd -EBUILD systemd-utils-254.12.ebuild 13337 BLAKE2B ca4405757ee54acc143f1f2af2c974cfd90c36a11681d62ee07f3da0c82972aa239dbb280c9bb179022f2da9628e1a37bbae5e0a9c186534e1bf0c937fed4502 SHA512 bcb56e7d0ca145789f7b293155937e7b7d7e3cbf4416b592aafac8fe64641014947606ac950102c6dc0c9371dbb080e4d0603fd915177127a57dcfa5559dc7cd -EBUILD systemd-utils-254.8-r1.ebuild 13369 BLAKE2B fdc9404b69630bbda889014d7e97c96b93a7e99fdd070b8e819867183d7ecdeeca6e4f0b928cc3325d9039b724e60b0f850cd99afcbca12b61da33cabb23aa32 SHA512 e2b92995283a7fc01cfb4a0f5223baabb1bfe1dce65498544a3c6815b54ad5a7bdf85394f5aee422f44e05d85d744c93d268dae35261787a9e2543f49fccba95 -EBUILD systemd-utils-255.4.ebuild 13753 BLAKE2B 96ae2f52c47ff4a22d5fe9c8d42bff6e70c00656c50cefc6353e9c96cfe58977b05c589567ef334f591ef0ee8459b44472c9ff06917227a5e563f0eba72d4540 SHA512 e2242b212c0f79cc2a06b0491fa1903b4381b2436dd5e8e844b8be9f39d3c01b8f351f6c20adb6e5d96f0cf1b5bd842e0751b93e44c9745bb637788be0dbd513 +DIST systemd-musl-patches-255.6.tar.gz 31529 BLAKE2B 14b737968168238c62a776052bdb97a3cee87c076317f260147939051f24f9ee8f39dec5e38f9b2ce61ea4737422eece680c4d15dd1fdcc5f3e61b6e5ec5f5c4 SHA512 0ab39a653d42d7b58ad875176270aed93e03ba28b33616520548a01e7d06d170379f9206b4a2b280a588d4f7084af10a2a0ec7a6cb724902ddff149e512d789d +DIST systemd-stable-254.13.tar.gz 14533359 BLAKE2B 6f37bf5f1868840f122652fdca270e1f97ba78f8280f45100b1b5b33c3531cf79587b596ccbbe594f1e623d918c1fdf19f2231d677e27b5421f1852fbe3225b3 SHA512 852cbc992128dc3ab6ded4215c2540fa3c0b7c7ad98e54036f3981d77a2162f5393ee50960773419133e0d584844af329d3726f45829a56c00b1827e33edf3e1 +DIST systemd-stable-254.16.tar.gz 14564160 BLAKE2B fdf028b128fa8181bc1a4c2d3b5f761431e55613149bee5055a6c2697055a06a52573c4f2ea5a2b9633080a0b7a8d4312d95cb4b61d3943f918bdadf45bc5586 SHA512 0958859610c50f1625a10d67e373c9841678f63dc091abec9d8e7e57bff7e82d2f34a1d54e8ec3c44952f8dc2a5581e65ee54cfbb48c3589561f5bd8658498e0 +DIST systemd-stable-254.17.tar.gz 14566862 BLAKE2B fca04c8db285cf22551f7c980da52a8aa3ef3eb78d6005b38cdece4b53ac43a69aa401f8498ee00fcab037dbb22c996b8c626db32c6e4be481f41f752e7a848b SHA512 11ae971e5463fb511c32fbc1ce4012765c73cf87d68ca44c36b85a2ed12f73655b6d071975008c6dd56a27963d1dff5d3c22039fc813bff30be23e6f2dd425ae +DIST systemd-stable-254.18.tar.gz 14567354 BLAKE2B 30605ae63bdb650d380bcf4697eeaaba96f5e7a32051aa103ad9f8d32bb9a0c3bd9859ca23fda6b4e6ffab98a814748bc30638a01d03473191013758a958c70b SHA512 437db125a15021a5f51f59f8cc66992c8d2d767fd3fa13331c41502d1d362a3fd0024058a708602bb2760689bd61ec656c6faffcb22932776d54e9815a43d4ed +DIST systemd-stable-255.10.tar.gz 15102376 BLAKE2B ef35c243e98c43230682904a75f36201ea0f6776a5f17026e98c6a697746e5eebbcd19d614bd1107905c5bf23fbf5913918e7b4790a5d01bbd7a2ec79529234c SHA512 f672cfff18ab80136dedb34908b73d8152f9cb07776c27405a90eb2ad49e22ef86b979a5125c66c6b17d9c76ea516ed920cdbc8e929dda1382f632b414a03df0 +DIST systemd-stable-255.11.tar.gz 15107037 BLAKE2B 7839323367d47dc57914fb501c7be38206f3bc882e560c4df25c65d421e5756108711b0ce57df6ad444d5eabb256d6730366e21d283cb02e1ef014b670855669 SHA512 be06010b56f4ea0651ebe921cd2a68f1794a64367fedea6752f7ba71ac5e00c5f0167d52ba5b662fd9781f5aa3f372e174b65f99a9bac66d4bf6af92caa67ba7 +DIST systemd-stable-255.12.tar.gz 15107917 BLAKE2B d3e3922e326f9a06557769800cf21b61562e4d26776be50a87ce04503e16fbcb2ee73e2a78c3ba1ce1b343f0e31bec7c2346188331c5558dcbb4cd7d023906d6 SHA512 bb31854da5a2f2ac7c2c4a5a92457352ceabcb4fc7063a08e29f0d0e500a1a684d2d76bc75695425ebff53e150986bdd925455493928df46c6b4546e1c7fcf72 +EBUILD systemd-utils-254.13.ebuild 13349 BLAKE2B 3ada6ca89512726442cefe7d3e1fc64401f76a0688be936eac7fb0b0cda3f8aa5f357d40cf77e5654c86ad4ec021d82912aafce6333234fa2ccffbdccc865f43 SHA512 dfb4bdb8e4ab97db6408ce2996572115ee0f7531bfc0837effe3aa6f68b0bf2bae9e98e6cc9be7441d883bbc9202df0604dcee124002ac114fa69e2145986ea5 +EBUILD systemd-utils-254.16.ebuild 13357 BLAKE2B 66b0be6fbd1a28a3aaee185a852bb703b4340d6e2eb7c18d3d06b9f153758aa72b3c2b3d4e6acd5eed127bc9d1b69c589998d77f6a7f6482db4882f6398f37aa SHA512 740115818e359dae371c96bc90ebe11b5de2f90bdadeb930495e988789d2d98a2c5e84067b379bb50b3399af212e96bfe11421322bd83b9a41c6d1d3dc23bf9f +EBUILD systemd-utils-254.17.ebuild 13349 BLAKE2B 3ada6ca89512726442cefe7d3e1fc64401f76a0688be936eac7fb0b0cda3f8aa5f357d40cf77e5654c86ad4ec021d82912aafce6333234fa2ccffbdccc865f43 SHA512 dfb4bdb8e4ab97db6408ce2996572115ee0f7531bfc0837effe3aa6f68b0bf2bae9e98e6cc9be7441d883bbc9202df0604dcee124002ac114fa69e2145986ea5 +EBUILD systemd-utils-254.18.ebuild 13357 BLAKE2B 66b0be6fbd1a28a3aaee185a852bb703b4340d6e2eb7c18d3d06b9f153758aa72b3c2b3d4e6acd5eed127bc9d1b69c589998d77f6a7f6482db4882f6398f37aa SHA512 740115818e359dae371c96bc90ebe11b5de2f90bdadeb930495e988789d2d98a2c5e84067b379bb50b3399af212e96bfe11421322bd83b9a41c6d1d3dc23bf9f +EBUILD systemd-utils-255.10.ebuild 14233 BLAKE2B 41a83db315b0dcc8d9b1a49af18eaded9b35daf6a8f262b5563565f1a390c957df3e039837a8d21c1c23099f6f1d2a0b5bed866858c1aba3b19bfd2ef50f6ce7 SHA512 982b3d2c3ecd992ae88f336eb191e24c088ddd83ee69e7ddfde03e7763e7c7d296d3cf3e71602f7f6114dbf903ed11270c43562036b5e0d31bd5a3de93a4df60 +EBUILD systemd-utils-255.11.ebuild 14233 BLAKE2B 41a83db315b0dcc8d9b1a49af18eaded9b35daf6a8f262b5563565f1a390c957df3e039837a8d21c1c23099f6f1d2a0b5bed866858c1aba3b19bfd2ef50f6ce7 SHA512 982b3d2c3ecd992ae88f336eb191e24c088ddd83ee69e7ddfde03e7763e7c7d296d3cf3e71602f7f6114dbf903ed11270c43562036b5e0d31bd5a3de93a4df60 +EBUILD systemd-utils-255.12.ebuild 14233 BLAKE2B 787997d6b0076157281bfb165075755024780d95e835e4c90c879b200f72b2b63c4481aac315783014867c2b14d73cc444154c0181003c6003a009564b751824 SHA512 b4f9a7fdf67132906971b97465b1ffb115cc36defa07fdaccb48392771873fc1580ad432b939e798dad675a16fee1543a2e4bceb95773c9c15f5b06f47f90835 MISC metadata.xml 888 BLAKE2B b799e1d62a1208dbbec1a1cfb47592b069d5c79cb18efffef922c72b0d61e30938d26c6f4e0d3951f9c327601dd71de14062dad0a47e6b84a61b1a8b125f1a6b SHA512 6debd964f9c127ba4332e0c0b86e506d3cf10cbe3cd45442bf7955b16e790a9eccdd928d473b3722b11b4a75d34fe5bb91f4867a5dc92e786ba73d9ec3f54712 diff --git a/sys-apps/systemd-utils/files/musl-efi-wchar.patch b/sys-apps/systemd-utils/files/musl-efi-wchar.patch new file mode 100644 index 000000000000..a3681552d33f --- /dev/null +++ b/sys-apps/systemd-utils/files/musl-efi-wchar.patch @@ -0,0 +1,29 @@ +From c4050bd401611f6223c00e58ac9c26b9caccd286 Mon Sep 17 00:00:00 2001 +From: Violet Purcell <vimproved@inventati.org> +Date: Sat, 9 Sep 2023 13:10:53 -0400 +Subject: [PATCH] efi: append -D__DEFINED_wchar_t to LDFLAGS + +This forces systemd-boot to use the wchar_t type defined from +__WCHAR_TYPE__ in efi.h, instead of the wchar_t defined in musl's +alltypes.h. Adapted from openembedded's solution. + +Signed-off-by: Violet Purcell <vimproved@inventati.org> +--- + src/boot/efi/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build +index 2773eaf286..3c1e09c729 100644 +--- a/src/boot/efi/meson.build ++++ b/src/boot/efi/meson.build +@@ -130,6 +130,7 @@ efi_includes = [fundamental_include, include_directories('.')] + + efi_c_args = [ + '-DSD_BOOT=1', ++ '-D__DEFINED_wchar_t', + '-ffreestanding', + '-fno-strict-aliasing', + '-fshort-wchar', +-- +2.42.0 + diff --git a/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch b/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch new file mode 100644 index 000000000000..682c0c7c21af --- /dev/null +++ b/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch @@ -0,0 +1,61 @@ +https://github.com/systemd/systemd/pull/33252 + +From 85277a97b222ce19cf951d2c99b1693e8c34fc45 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Fri, 7 Jun 2024 12:28:41 -0400 +Subject: [PATCH] user-util: fix fgetxxent_sane on musl + +musl's implementation does not set errno to ENOENT when the end of file +is reached. It returns NULL and leaves errno unchanged. +--- + src/basic/user-util.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/basic/user-util.c b/src/basic/user-util.c +index b3df413be6b06..6bdf5bf1cdc9a 100644 +--- a/src/basic/user-util.c ++++ b/src/basic/user-util.c +@@ -977,8 +977,8 @@ int fgetpwent_sane(FILE *stream, struct passwd **pw) { + + errno = 0; + struct passwd *p = fgetpwent(stream); +- if (!p && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!p && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *pw = p; + return !!p; +@@ -990,8 +990,8 @@ int fgetspent_sane(FILE *stream, struct spwd **sp) { + + errno = 0; + struct spwd *s = fgetspent(stream); +- if (!s && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!s && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *sp = s; + return !!s; +@@ -1003,8 +1003,8 @@ int fgetgrent_sane(FILE *stream, struct group **gr) { + + errno = 0; + struct group *g = fgetgrent(stream); +- if (!g && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!g && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *gr = g; + return !!g; +@@ -1017,8 +1017,8 @@ int fgetsgent_sane(FILE *stream, struct sgrp **sg) { + + errno = 0; + struct sgrp *s = fgetsgent(stream); +- if (!s && errno != ENOENT) +- return errno_or_else(EIO); ++ if (!s && !IN_SET(errno, 0, ENOENT)) ++ return -errno; + + *sg = s; + return !!s; diff --git a/sys-apps/systemd-utils/systemd-utils-254.10-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-254.13.ebuild index ca3697269cd2..a209256cd923 100644 --- a/sys-apps/systemd-utils/systemd-utils-254.10-r1.ebuild +++ b/sys-apps/systemd-utils/systemd-utils-254.13.ebuild @@ -27,7 +27,7 @@ SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.t LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" REQUIRED_USE=" || ( kernel-install tmpfiles sysusers udev ) @@ -292,7 +292,7 @@ multilib_src_compile() { if use kernel-install; then targets+=( kernel-install - 90-loaderentry.install + src/kernel-install/90-loaderentry.install man/kernel-install.8 ) fi @@ -368,14 +368,14 @@ multilib_src_compile() { if use ukify; then targets+=( ukify - 60-ukify.install + src/kernel-install/60-ukify.install man/ukify.1 ) fi fi if use udev; then targets+=( - udev:shared_library + libudev src/libudev/libudev.pc ) if use test; then diff --git a/sys-apps/systemd-utils/systemd-utils-254.12.ebuild b/sys-apps/systemd-utils/systemd-utils-254.16.ebuild index 9ba529076182..2703ab5295a2 100644 --- a/sys-apps/systemd-utils/systemd-utils-254.12.ebuild +++ b/sys-apps/systemd-utils/systemd-utils-254.16.ebuild @@ -27,7 +27,7 @@ SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.t LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" REQUIRED_USE=" || ( kernel-install tmpfiles sysusers udev ) @@ -292,7 +292,7 @@ multilib_src_compile() { if use kernel-install; then targets+=( kernel-install - 90-loaderentry.install + src/kernel-install/90-loaderentry.install man/kernel-install.8 ) fi @@ -368,14 +368,14 @@ multilib_src_compile() { if use ukify; then targets+=( ukify - 60-ukify.install + src/kernel-install/60-ukify.install man/ukify.1 ) fi fi if use udev; then targets+=( - udev:shared_library + libudev src/libudev/libudev.pc ) if use test; then diff --git a/sys-apps/systemd-utils/systemd-utils-254.11.ebuild b/sys-apps/systemd-utils/systemd-utils-254.17.ebuild index 9ba529076182..a209256cd923 100644 --- a/sys-apps/systemd-utils/systemd-utils-254.11.ebuild +++ b/sys-apps/systemd-utils/systemd-utils-254.17.ebuild @@ -27,7 +27,7 @@ SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.t LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" REQUIRED_USE=" || ( kernel-install tmpfiles sysusers udev ) @@ -292,7 +292,7 @@ multilib_src_compile() { if use kernel-install; then targets+=( kernel-install - 90-loaderentry.install + src/kernel-install/90-loaderentry.install man/kernel-install.8 ) fi @@ -368,14 +368,14 @@ multilib_src_compile() { if use ukify; then targets+=( ukify - 60-ukify.install + src/kernel-install/60-ukify.install man/ukify.1 ) fi fi if use udev; then targets+=( - udev:shared_library + libudev src/libudev/libudev.pc ) if use test; then diff --git a/sys-apps/systemd-utils/systemd-utils-254.8-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-254.18.ebuild index ced613ea99e1..2703ab5295a2 100644 --- a/sys-apps/systemd-utils/systemd-utils-254.8-r1.ebuild +++ b/sys-apps/systemd-utils/systemd-utils-254.18.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{10..12} ) QA_PKGCONFIG_VERSION=$(ver_cut 1) inherit bash-completion-r1 flag-o-matic linux-info meson-multilib optfeature -inherit python-single-r1 secureboot toolchain-funcs udev usr-ldscript +inherit python-single-r1 secureboot toolchain-funcs udev DESCRIPTION="Utilities split out from systemd for OpenRC users" HOMEPAGE="https://systemd.io/" @@ -27,7 +27,7 @@ SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.t LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" REQUIRED_USE=" || ( kernel-install tmpfiles sysusers udev ) @@ -292,7 +292,7 @@ multilib_src_compile() { if use kernel-install; then targets+=( kernel-install - 90-loaderentry.install + src/kernel-install/90-loaderentry.install man/kernel-install.8 ) fi @@ -368,14 +368,14 @@ multilib_src_compile() { if use ukify; then targets+=( ukify - 60-ukify.install + src/kernel-install/60-ukify.install man/ukify.1 ) fi fi if use udev; then targets+=( - udev:shared_library + libudev src/libudev/libudev.pc ) if use test; then @@ -492,7 +492,6 @@ multilib_src_install() { fi if use udev; then meson_install --no-rebuild --tags libudev - gen_usr_ldscript -a udev insinto "/usr/$(get_libdir)/pkgconfig" doins src/libudev/libudev.pc fi diff --git a/sys-apps/systemd-utils/systemd-utils-255.4.ebuild b/sys-apps/systemd-utils/systemd-utils-255.10.ebuild index 4c64afbd80c1..c1918ffcbc32 100644 --- a/sys-apps/systemd-utils/systemd-utils-255.4.ebuild +++ b/sys-apps/systemd-utils/systemd-utils-255.10.ebuild @@ -6,8 +6,8 @@ PYTHON_COMPAT=( python3_{10..12} ) QA_PKGCONFIG_VERSION=$(ver_cut 1) -inherit bash-completion-r1 flag-o-matic linux-info meson-multilib python-single-r1 -inherit secureboot udev +inherit bash-completion-r1 flag-o-matic linux-info meson-multilib ninja-utils +inherit python-single-r1 secureboot udev DESCRIPTION="Utilities split out from systemd for OpenRC users" HOMEPAGE="https://systemd.io/" @@ -22,12 +22,12 @@ else SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" fi -MUSL_PATCHSET="systemd-musl-patches-255.4" +MUSL_PATCHSET="systemd-musl-patches-255.6" SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )" LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0" -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" REQUIRED_USE=" || ( kernel-install tmpfiles sysusers udev ) @@ -86,7 +86,6 @@ RDEPEND="${COMMON_DEPEND} acct-group/usb acct-group/video !sys-apps/gentoo-systemd-integration - !sys-apps/hwids[udev] !<sys-fs/udev-250 !sys-fs/eudev ) @@ -108,8 +107,10 @@ BDEPEND=" $(python_gen_cond_dep " dev-python/jinja[\${PYTHON_USEDEP}] dev-python/lxml[\${PYTHON_USEDEP}] - boot? ( >=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] ) - ukify? ( test? ( ${PEFILE_DEPEND} ) ) + boot? ( + >=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] + test? ( ${PEFILE_DEPEND} ) + ) ") " @@ -131,11 +132,13 @@ pkg_setup() { src_prepare() { local PATCHES=( + "${FILESDIR}/systemd-utils-255-musl-fgetxxent.patch" ) if use elibc_musl; then PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" + "${FILESDIR}/musl-efi-wchar.patch" ) fi default @@ -252,6 +255,17 @@ multilib_src_configure() { fi } +have_dmi() { + # see dmi_arches in meson.build + case ${CHOST} in + mips64*) + return 1 ;; + aarch64*|arm*|ia64*|i?86*|loongarch64*|mips*|x86_64*) + return 0 ;; + esac + return 1 +} + multilib_src_compile() { local targets=() optional_targets=() if multilib_is_native_abi; then @@ -289,7 +303,7 @@ multilib_src_compile() { if use kernel-install; then targets+=( kernel-install - 90-loaderentry.install + src/kernel-install/90-loaderentry.install man/kernel-install.8 ) fi @@ -302,7 +316,6 @@ multilib_src_compile() { if use test; then targets+=( systemd-runtest.env - test-offline-passwd ) fi fi @@ -314,7 +327,10 @@ multilib_src_compile() { tmpfiles.d/{etc,static-nodes-permissions,var}.conf ) if use test; then - targets+=( test-tmpfile-util ) + targets+=( + test-offline-passwd + test-tmpfile-util + ) fi fi if use udev; then @@ -323,7 +339,6 @@ multilib_src_compile() { systemd-hwdb ata_id cdrom_id - dmi_memory_id fido_id iocost mtd_probe @@ -353,11 +368,12 @@ multilib_src_compile() { rules.d/50-udev-default.rules rules.d/60-persistent-storage.rules rules.d/64-btrfs.rules - rules.d/70-uaccess.rules - rules.d/71-seat.rules - rules.d/73-seat-late.rules + # Needed for tests rules.d/99-systemd.rules ) + if have_dmi; then + targets+=( dmi_memory_id ) + fi if use test; then targets+=( test-fido-id-desc @@ -377,14 +393,14 @@ multilib_src_compile() { if use ukify; then targets+=( ukify - 60-ukify.install + src/kernel-install/60-ukify.install man/ukify.1 ) fi fi if use udev; then targets+=( - udev:shared_library + libudev src/libudev/libudev.pc ) if use test; then @@ -399,7 +415,7 @@ multilib_src_compile() { meson_src_compile "${targets[@]}" fi if [[ ${#optional_targets[@]} -ne 0 ]]; then - nonfatal meson_src_compile "${optional_targets[@]}" + ninja ${NINJAOPTS} "${optional_targets[@]}" fi } @@ -471,10 +487,19 @@ multilib_src_install() { set_rpath udevadm systemd-hwdb dobin udevadm systemd-hwdb dosym ../../bin/udevadm /usr/lib/systemd/systemd-udevd + if use split-usr; then + # elogind installs udev rules that hard-code /bin/udevadm + dosym ../usr/bin/udevadm /bin/udevadm + fi exeinto /usr/lib/udev - set_rpath {ata_id,cdrom_id,dmi_memory_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} - doexe {ata_id,cdrom_id,dmi_memory_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + set_rpath {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + doexe {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + + if have_dmi; then + set_rpath dmi_memory_id + doexe dmi_memory_id + fi rm -f rules.d/99-systemd.rules insinto /usr/lib/udev/rules.d @@ -492,8 +517,8 @@ multilib_src_install() { doman man/udev_*.3 fi if use ukify; then - exeinto /usr/lib/systemd - doexe ukify + dobin ukify + dosym ../../bin/ukify /usr/lib/systemd/ukify doman man/ukify.1 fi fi @@ -554,11 +579,6 @@ multilib_src_install_all() { use ukify && python_fix_shebang "${ED}" use boot && secureboot_auto_sign - - if use split-usr; then - dosym ../usr/lib/systemd /lib/systemd - dosym ../usr/lib/udev /lib/udev - fi } add_service() { @@ -573,13 +593,15 @@ add_service() { pkg_preinst() { # Migrate /lib/{systemd,udev} to /usr/lib - # Symlinks will be installed in the merge phase if use split-usr; then local d for d in systemd udev; do + dosym ../usr/lib/${d} /lib/${d} if [[ -e ${EROOT}/lib/${d} && ! -L ${EROOT}/lib/${d} ]]; then - cp -rpPT "${EROOT}"/{,usr/}lib/${d} || die - rm -r "${EROOT}"/lib/${d} || die + einfo "Copying files from '${EROOT}/lib/${d}' to '${EROOT}/usr/lib/${d}'" + cp -rpPT "${EROOT}/lib/${d}" "${EROOT}/usr/lib/${d}" || die + einfo "Removing '${EROOT}/lib/${d}'" + rm -r "${EROOT}/lib/${d}" || die fi done fi diff --git a/sys-apps/systemd-utils/systemd-utils-255.11.ebuild b/sys-apps/systemd-utils/systemd-utils-255.11.ebuild new file mode 100644 index 000000000000..c1918ffcbc32 --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-255.11.ebuild @@ -0,0 +1,621 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +inherit bash-completion-r1 flag-o-matic linux-info meson-multilib ninja-utils +inherit python-single-r1 secureboot udev + +DESCRIPTION="Utilities split out from systemd for OpenRC users" +HOMEPAGE="https://systemd.io/" + +if [[ ${PV} == *.* ]]; then + MY_P="systemd-stable-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +else + MY_P="systemd-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +fi + +MUSL_PATCHSET="systemd-musl-patches-255.6" +SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" +REQUIRED_USE=" + || ( kernel-install tmpfiles sysusers udev ) + boot? ( kernel-install ) + ukify? ( boot ) + ${PYTHON_REQUIRED_USE} +" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + elibc_musl? ( >=sys-libs/musl-1.2.3 ) + selinux? ( sys-libs/libselinux:0= ) + tmpfiles? ( + acl? ( sys-apps/acl:0= ) + ) + udev? ( + >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + ) + !udev? ( + >=sys-apps/util-linux-2.30:0= + sys-libs/libcap:0= + virtual/libcrypt:= + ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-3.11 +" + +PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]' + +RDEPEND="${COMMON_DEPEND} + boot? ( !<sys-boot/systemd-boot-250 ) + ukify? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep "${PEFILE_DEPEND}") + ) + tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 ) + udev? ( + acct-group/audio + acct-group/cdrom + acct-group/dialout + acct-group/disk + acct-group/floppy + acct-group/input + acct-group/kmem + acct-group/kvm + acct-group/lp + acct-group/render + acct-group/sgx + acct-group/tape + acct-group/tty + acct-group/usb + acct-group/video + !sys-apps/gentoo-systemd-integration + !<sys-fs/udev-250 + !sys-fs/eudev + ) + !sys-apps/systemd +" +PDEPEND=" + udev? ( >=sys-fs/udev-init-scripts-34 ) +" +BDEPEND=" + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-util/gperf + dev-util/patchelf + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig + $(python_gen_cond_dep " + dev-python/jinja[\${PYTHON_USEDEP}] + dev-python/lxml[\${PYTHON_USEDEP}] + boot? ( + >=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] + test? ( ${PEFILE_DEPEND} ) + ) + ") +" + +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" + +CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX" + +pkg_setup() { + if [[ ${MERGE_TYPE} != buildonly ]] && use udev; then + linux-info_pkg_setup + fi + use boot && secureboot_pkg_setup +} + +src_prepare() { + local PATCHES=( + "${FILESDIR}/systemd-utils-255-musl-fgetxxent.patch" + ) + + if use elibc_musl; then + PATCHES+=( + "${WORKDIR}/${MUSL_PATCHSET}" + "${FILESDIR}/musl-efi-wchar.patch" + ) + fi + default +} + +src_configure() { + python_setup + meson-multilib_src_configure +} + +multilib_src_configure() { + local emesonargs=( + -Dsysvinit-path= + $(meson_native_use_bool boot bootloader) + $(meson_native_use_bool kernel-install) + $(meson_native_use_bool selinux) + $(meson_native_use_bool sysusers) + $(meson_use test tests) + $(meson_native_use_bool tmpfiles) + $(meson_use udev hwdb) + $(meson_native_use_bool ukify) + + # Disable all optional features + -Dadm-group=false + -Danalyze=false + -Dapparmor=false + -Daudit=false + -Dbacklight=false + -Dbinfmt=false + -Dbpf-framework=false + -Dbzip2=false + -Dcoredump=false + -Ddbus=false + -Delfutils=false + -Denvironment-d=false + -Dfdisk=false + -Dgcrypt=false + -Dglib=false + -Dgshadow=false + -Dgnutls=false + -Dhibernate=false + -Dhostnamed=false + -Didn=false + -Dima=false + -Dinitrd=false + -Dfirstboot=false + -Dldconfig=false + -Dlibcryptsetup=false + -Dlibcurl=false + -Dlibfido2=false + -Dlibidn=false + -Dlibidn2=false + -Dlibiptc=false + -Dlocaled=false + -Dlogind=false + -Dlz4=false + -Dmachined=false + -Dmicrohttpd=false + -Dnetworkd=false + -Dnscd=false + -Dnss-myhostname=false + -Dnss-resolve=false + -Dnss-systemd=false + -Doomd=false + -Dopenssl=false + -Dp11kit=false + -Dpam=false + -Dpcre2=false + -Dpolkit=false + -Dportabled=false + -Dpstore=false + -Dpwquality=false + -Drandomseed=false + -Dresolve=false + -Drfkill=false + -Dseccomp=false + -Dsmack=false + -Dsysext=false + -Dtimedated=false + -Dtimesyncd=false + -Dtpm=false + -Dqrencode=false + -Dquotacheck=false + -Duserdb=false + -Dutmp=false + -Dvconsole=false + -Dwheel-group=false + -Dxdg-autostart=false + -Dxkbcommon=false + -Dxz=false + -Dzlib=false + -Dzstd=false + ) + + if use tmpfiles || use udev; then + emesonargs+=( $(meson_native_use_bool acl) ) + else + emesonargs+=( -Dacl=false ) + fi + + if use udev; then + emesonargs+=( $(meson_native_use_bool kmod) ) + else + emesonargs+=( -Dkmod=false ) + fi + + if use elibc_musl; then + # Avoid redefinition of struct ethhdr. + append-cppflags -D__UAPI_DEF_ETHHDR=0 + fi + + if multilib_is_native_abi || use udev; then + meson_src_configure + fi +} + +have_dmi() { + # see dmi_arches in meson.build + case ${CHOST} in + mips64*) + return 1 ;; + aarch64*|arm*|ia64*|i?86*|loongarch64*|mips*|x86_64*) + return 0 ;; + esac + return 1 +} + +multilib_src_compile() { + local targets=() optional_targets=() + if multilib_is_native_abi; then + if use boot; then + local efi_arch= efi_arch_alt= + case ${CHOST} in + aarch64*) efi_arch=aa64 ;; + arm*) efi_arch=arm ;; + loongarch32*) efi_arch=loongarch32 ;; + loongarch64*) efi_arch=loongarch64 ;; + riscv32*) efi_arch=riscv32 ;; + riscv64*) efi_arch=riscv64 ;; + x86_64*) efi_arch=x64 efi_arch_alt=ia32;; + i?86*) efi_arch=ia32 ;; + esac + targets+=( + bootctl + man/bootctl.1 + src/boot/efi/systemd-boot${efi_arch}.efi + src/boot/efi/linux${efi_arch}.efi.stub + src/boot/efi/addon${efi_arch}.efi.stub + ) + if [[ -n ${efi_arch_alt} ]]; then + # If we have a multilib toolchain, meson.build will build the + # "alt" arch (ia32). There's no easy way to detect this, so try + # to build it and ignore failure. + optional_targets+=( + src/boot/efi/systemd-boot${efi_arch_alt}.efi + src/boot/efi/linux${efi_arch_alt}.efi.stub + src/boot/efi/addon${efi_arch_alt}.efi.stub + ) + fi + + fi + if use kernel-install; then + targets+=( + kernel-install + src/kernel-install/90-loaderentry.install + man/kernel-install.8 + ) + fi + if use sysusers; then + targets+=( + systemd-sysusers + man/sysusers.d.5 + man/systemd-sysusers.8 + ) + if use test; then + targets+=( + systemd-runtest.env + ) + fi + fi + if use tmpfiles; then + targets+=( + systemd-tmpfiles + man/tmpfiles.d.5 + man/systemd-tmpfiles.8 + tmpfiles.d/{etc,static-nodes-permissions,var}.conf + ) + if use test; then + targets+=( + test-offline-passwd + test-tmpfile-util + ) + fi + fi + if use udev; then + targets+=( + udevadm + systemd-hwdb + ata_id + cdrom_id + fido_id + iocost + mtd_probe + scsi_id + v4l_id + src/udev/udev.pc + man/udev.conf.5 + man/systemd.link.5 + man/hwdb.7 + man/udev.7 + man/systemd-hwdb.8 + man/systemd-udevd.service.8 + man/udevadm.8 + man/libudev.3 + man/udev_device_get_syspath.3 + man/udev_device_has_tag.3 + man/udev_device_new_from_syspath.3 + man/udev_enumerate_add_match_subsystem.3 + man/udev_enumerate_new.3 + man/udev_enumerate_scan_devices.3 + man/udev_list_entry.3 + man/udev_monitor_filter_update.3 + man/udev_monitor_new_from_netlink.3 + man/udev_monitor_receive_device.3 + man/udev_new.3 + hwdb.d/60-autosuspend-chromiumos.hwdb + rules.d/50-udev-default.rules + rules.d/60-persistent-storage.rules + rules.d/64-btrfs.rules + # Needed for tests + rules.d/99-systemd.rules + ) + if have_dmi; then + targets+=( dmi_memory_id ) + fi + if use test; then + targets+=( + test-fido-id-desc + test-link-config-tables + test-udev-builtin + test-udev-device-thread + test-udev-format + test-udev-manager + test-udev-node + test-udev-rule-runner + test-udev-rules + test-udev-spawn + test-udev-util + ) + fi + fi + if use ukify; then + targets+=( + ukify + src/kernel-install/60-ukify.install + man/ukify.1 + ) + fi + fi + if use udev; then + targets+=( + libudev + src/libudev/libudev.pc + ) + if use test; then + targets+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + fi + if [[ ${#targets[@]} -ne 0 ]]; then + meson_src_compile "${targets[@]}" + fi + if [[ ${#optional_targets[@]} -ne 0 ]]; then + ninja ${NINJAOPTS} "${optional_targets[@]}" + fi +} + +multilib_src_test() { + local tests=() + if multilib_is_native_abi; then + if use boot; then + tests+=( --suite boot ) + fi + if use kernel-install; then + tests+=( --suite kernel-install ) + fi + if use sysusers; then + tests+=( --suite sysusers ) + fi + if use tmpfiles; then + tests+=( --suite tmpfiles ) + fi + if use udev; then + tests+=( --suite udev ) + fi + fi + if use udev; then + tests+=( --suite libudev ) + fi + if [[ ${#tests[@]} -ne 0 ]]; then + meson_src_test --no-rebuild "${tests[@]}" + fi +} + +src_install() { + meson-multilib_src_install +} + +set_rpath() { + patchelf --set-rpath "${EPREFIX}/usr/$(get_libdir)/systemd" "$@" || die "patchelf failed" +} + +multilib_src_install() { + if multilib_is_native_abi; then + exeinto "/usr/$(get_libdir)/systemd" + doexe src/shared/libsystemd-shared-${PV%%.*}.so + if use boot; then + set_rpath bootctl + dobin bootctl + doman man/bootctl.1 + meson_install --no-rebuild --tags systemd-boot + fi + if use kernel-install; then + set_rpath kernel-install + dobin kernel-install + doman man/kernel-install.8 + exeinto /usr/lib/kernel/install.d + doexe src/kernel-install/*.install + fi + if use sysusers; then + set_rpath systemd-sysusers + dobin systemd-sysusers + doman man/{systemd-sysusers.8,sysusers.d.5} + fi + if use tmpfiles; then + set_rpath systemd-tmpfiles + dobin systemd-tmpfiles + doman man/{systemd-tmpfiles.8,tmpfiles.d.5} + insinto /usr/lib/tmpfiles.d + doins tmpfiles.d/{etc,static-nodes-permissions,var}.conf + fi + if use udev; then + set_rpath udevadm systemd-hwdb + dobin udevadm systemd-hwdb + dosym ../../bin/udevadm /usr/lib/systemd/systemd-udevd + if use split-usr; then + # elogind installs udev rules that hard-code /bin/udevadm + dosym ../usr/bin/udevadm /bin/udevadm + fi + + exeinto /usr/lib/udev + set_rpath {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + doexe {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + + if have_dmi; then + set_rpath dmi_memory_id + doexe dmi_memory_id + fi + + rm -f rules.d/99-systemd.rules + insinto /usr/lib/udev/rules.d + doins rules.d/*.rules + + insinto /usr/lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + insinto /usr/share/pkgconfig + doins src/udev/udev.pc + + doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8} + newman man/systemd-udevd.service.8 systemd-udevd.8 + doman man/libudev.3 + doman man/udev_*.3 + fi + if use ukify; then + dobin ukify + dosym ../../bin/ukify /usr/lib/systemd/ukify + doman man/ukify.1 + fi + fi + if use udev; then + meson_install --no-rebuild --tags libudev + insinto "/usr/$(get_libdir)/pkgconfig" + doins src/libudev/libudev.pc + fi +} + +multilib_src_install_all() { + einstalldocs + if use boot; then + dobashcomp shell-completion/bash/bootctl + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/{_bootctl,_kernel-install} + fi + if use kernel-install; then + exeinto /usr/lib/kernel/install.d + doexe src/kernel-install/*.install + fi + if use tmpfiles; then + doinitd "${FILESDIR}"/systemd-tmpfiles-setup + doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev + exeinto /etc/cron.daily + doexe "${FILESDIR}"/systemd-tmpfiles-clean + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_systemd-tmpfiles + insinto /usr/lib/tmpfiles.d + doins tmpfiles.d/x11.conf + doins "${FILESDIR}"/{legacy,tmp}.conf + fi + if use udev; then + doheader src/libudev/libudev.h + + insinto /etc/udev + doins src/udev/udev.conf + keepdir /etc/udev/{hwdb.d,rules.d} + + insinto /usr/lib/systemd/network + doins network/99-default.link + + # Remove to avoid conflict with elogind + # https://bugs.gentoo.org/856433 + rm rules.d/70-power-switch.rules || die + insinto /usr/lib/udev/rules.d + doins rules.d/*.rules + doins "${FILESDIR}"/40-gentoo.rules + + insinto /usr/lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + dobashcomp shell-completion/bash/udevadm + + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_udevadm + fi + + use ukify && python_fix_shebang "${ED}" + use boot && secureboot_auto_sign +} + +add_service() { + local initd=$1 + local runlevel=$2 + + ebegin "Adding '${initd}' service to the '${runlevel}' runlevel" + mkdir -p "${EROOT}/etc/runlevels/${runlevel}" && + ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}" + eend $? +} + +pkg_preinst() { + # Migrate /lib/{systemd,udev} to /usr/lib + if use split-usr; then + local d + for d in systemd udev; do + dosym ../usr/lib/${d} /lib/${d} + if [[ -e ${EROOT}/lib/${d} && ! -L ${EROOT}/lib/${d} ]]; then + einfo "Copying files from '${EROOT}/lib/${d}' to '${EROOT}/usr/lib/${d}'" + cp -rpPT "${EROOT}/lib/${d}" "${EROOT}/usr/lib/${d}" || die + einfo "Removing '${EROOT}/lib/${d}'" + rm -r "${EROOT}/lib/${d}" || die + fi + done + fi +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + add_service systemd-tmpfiles-setup-dev sysinit + add_service systemd-tmpfiles-setup boot + fi + if use udev; then + ebegin "Updating hwdb" + systemd-hwdb --root="${ROOT}" update + eend $? + udev_reload + fi +} diff --git a/sys-apps/systemd-utils/systemd-utils-255.12.ebuild b/sys-apps/systemd-utils/systemd-utils-255.12.ebuild new file mode 100644 index 000000000000..a073f48a82c8 --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-255.12.ebuild @@ -0,0 +1,621 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..13} ) + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +inherit bash-completion-r1 flag-o-matic linux-info meson-multilib ninja-utils +inherit python-single-r1 secureboot udev + +DESCRIPTION="Utilities split out from systemd for OpenRC users" +HOMEPAGE="https://systemd.io/" + +if [[ ${PV} == *.* ]]; then + MY_P="systemd-stable-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +else + MY_P="systemd-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +fi + +MUSL_PATCHSET="systemd-musl-patches-255.6" +SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" +REQUIRED_USE=" + || ( kernel-install tmpfiles sysusers udev ) + boot? ( kernel-install ) + ukify? ( boot ) + ${PYTHON_REQUIRED_USE} +" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + elibc_musl? ( >=sys-libs/musl-1.2.3 ) + selinux? ( sys-libs/libselinux:0= ) + tmpfiles? ( + acl? ( sys-apps/acl:0= ) + ) + udev? ( + >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + ) + !udev? ( + >=sys-apps/util-linux-2.30:0= + sys-libs/libcap:0= + virtual/libcrypt:= + ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-3.11 +" + +PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]' + +RDEPEND="${COMMON_DEPEND} + boot? ( !<sys-boot/systemd-boot-250 ) + ukify? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep "${PEFILE_DEPEND}") + ) + tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 ) + udev? ( + acct-group/audio + acct-group/cdrom + acct-group/dialout + acct-group/disk + acct-group/floppy + acct-group/input + acct-group/kmem + acct-group/kvm + acct-group/lp + acct-group/render + acct-group/sgx + acct-group/tape + acct-group/tty + acct-group/usb + acct-group/video + !sys-apps/gentoo-systemd-integration + !<sys-fs/udev-250 + !sys-fs/eudev + ) + !sys-apps/systemd +" +PDEPEND=" + udev? ( >=sys-fs/udev-init-scripts-34 ) +" +BDEPEND=" + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-util/gperf + dev-util/patchelf + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig + $(python_gen_cond_dep " + dev-python/jinja[\${PYTHON_USEDEP}] + dev-python/lxml[\${PYTHON_USEDEP}] + boot? ( + >=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] + test? ( ${PEFILE_DEPEND} ) + ) + ") +" + +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" + +CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX" + +pkg_setup() { + if [[ ${MERGE_TYPE} != buildonly ]] && use udev; then + linux-info_pkg_setup + fi + use boot && secureboot_pkg_setup +} + +src_prepare() { + local PATCHES=( + "${FILESDIR}/systemd-utils-255-musl-fgetxxent.patch" + ) + + if use elibc_musl; then + PATCHES+=( + "${WORKDIR}/${MUSL_PATCHSET}" + "${FILESDIR}/musl-efi-wchar.patch" + ) + fi + default +} + +src_configure() { + python_setup + meson-multilib_src_configure +} + +multilib_src_configure() { + local emesonargs=( + -Dsysvinit-path= + $(meson_native_use_bool boot bootloader) + $(meson_native_use_bool kernel-install) + $(meson_native_use_bool selinux) + $(meson_native_use_bool sysusers) + $(meson_use test tests) + $(meson_native_use_bool tmpfiles) + $(meson_use udev hwdb) + $(meson_native_use_bool ukify) + + # Disable all optional features + -Dadm-group=false + -Danalyze=false + -Dapparmor=false + -Daudit=false + -Dbacklight=false + -Dbinfmt=false + -Dbpf-framework=false + -Dbzip2=false + -Dcoredump=false + -Ddbus=false + -Delfutils=false + -Denvironment-d=false + -Dfdisk=false + -Dgcrypt=false + -Dglib=false + -Dgshadow=false + -Dgnutls=false + -Dhibernate=false + -Dhostnamed=false + -Didn=false + -Dima=false + -Dinitrd=false + -Dfirstboot=false + -Dldconfig=false + -Dlibcryptsetup=false + -Dlibcurl=false + -Dlibfido2=false + -Dlibidn=false + -Dlibidn2=false + -Dlibiptc=false + -Dlocaled=false + -Dlogind=false + -Dlz4=false + -Dmachined=false + -Dmicrohttpd=false + -Dnetworkd=false + -Dnscd=false + -Dnss-myhostname=false + -Dnss-resolve=false + -Dnss-systemd=false + -Doomd=false + -Dopenssl=false + -Dp11kit=false + -Dpam=false + -Dpcre2=false + -Dpolkit=false + -Dportabled=false + -Dpstore=false + -Dpwquality=false + -Drandomseed=false + -Dresolve=false + -Drfkill=false + -Dseccomp=false + -Dsmack=false + -Dsysext=false + -Dtimedated=false + -Dtimesyncd=false + -Dtpm=false + -Dqrencode=false + -Dquotacheck=false + -Duserdb=false + -Dutmp=false + -Dvconsole=false + -Dwheel-group=false + -Dxdg-autostart=false + -Dxkbcommon=false + -Dxz=false + -Dzlib=false + -Dzstd=false + ) + + if use tmpfiles || use udev; then + emesonargs+=( $(meson_native_use_bool acl) ) + else + emesonargs+=( -Dacl=false ) + fi + + if use udev; then + emesonargs+=( $(meson_native_use_bool kmod) ) + else + emesonargs+=( -Dkmod=false ) + fi + + if use elibc_musl; then + # Avoid redefinition of struct ethhdr. + append-cppflags -D__UAPI_DEF_ETHHDR=0 + fi + + if multilib_is_native_abi || use udev; then + meson_src_configure + fi +} + +have_dmi() { + # see dmi_arches in meson.build + case ${CHOST} in + mips64*) + return 1 ;; + aarch64*|arm*|ia64*|i?86*|loongarch64*|mips*|x86_64*) + return 0 ;; + esac + return 1 +} + +multilib_src_compile() { + local targets=() optional_targets=() + if multilib_is_native_abi; then + if use boot; then + local efi_arch= efi_arch_alt= + case ${CHOST} in + aarch64*) efi_arch=aa64 ;; + arm*) efi_arch=arm ;; + loongarch32*) efi_arch=loongarch32 ;; + loongarch64*) efi_arch=loongarch64 ;; + riscv32*) efi_arch=riscv32 ;; + riscv64*) efi_arch=riscv64 ;; + x86_64*) efi_arch=x64 efi_arch_alt=ia32;; + i?86*) efi_arch=ia32 ;; + esac + targets+=( + bootctl + man/bootctl.1 + src/boot/efi/systemd-boot${efi_arch}.efi + src/boot/efi/linux${efi_arch}.efi.stub + src/boot/efi/addon${efi_arch}.efi.stub + ) + if [[ -n ${efi_arch_alt} ]]; then + # If we have a multilib toolchain, meson.build will build the + # "alt" arch (ia32). There's no easy way to detect this, so try + # to build it and ignore failure. + optional_targets+=( + src/boot/efi/systemd-boot${efi_arch_alt}.efi + src/boot/efi/linux${efi_arch_alt}.efi.stub + src/boot/efi/addon${efi_arch_alt}.efi.stub + ) + fi + + fi + if use kernel-install; then + targets+=( + kernel-install + src/kernel-install/90-loaderentry.install + man/kernel-install.8 + ) + fi + if use sysusers; then + targets+=( + systemd-sysusers + man/sysusers.d.5 + man/systemd-sysusers.8 + ) + if use test; then + targets+=( + systemd-runtest.env + ) + fi + fi + if use tmpfiles; then + targets+=( + systemd-tmpfiles + man/tmpfiles.d.5 + man/systemd-tmpfiles.8 + tmpfiles.d/{etc,static-nodes-permissions,var}.conf + ) + if use test; then + targets+=( + test-offline-passwd + test-tmpfile-util + ) + fi + fi + if use udev; then + targets+=( + udevadm + systemd-hwdb + ata_id + cdrom_id + fido_id + iocost + mtd_probe + scsi_id + v4l_id + src/udev/udev.pc + man/udev.conf.5 + man/systemd.link.5 + man/hwdb.7 + man/udev.7 + man/systemd-hwdb.8 + man/systemd-udevd.service.8 + man/udevadm.8 + man/libudev.3 + man/udev_device_get_syspath.3 + man/udev_device_has_tag.3 + man/udev_device_new_from_syspath.3 + man/udev_enumerate_add_match_subsystem.3 + man/udev_enumerate_new.3 + man/udev_enumerate_scan_devices.3 + man/udev_list_entry.3 + man/udev_monitor_filter_update.3 + man/udev_monitor_new_from_netlink.3 + man/udev_monitor_receive_device.3 + man/udev_new.3 + hwdb.d/60-autosuspend-chromiumos.hwdb + rules.d/50-udev-default.rules + rules.d/60-persistent-storage.rules + rules.d/64-btrfs.rules + # Needed for tests + rules.d/99-systemd.rules + ) + if have_dmi; then + targets+=( dmi_memory_id ) + fi + if use test; then + targets+=( + test-fido-id-desc + test-link-config-tables + test-udev-builtin + test-udev-device-thread + test-udev-format + test-udev-manager + test-udev-node + test-udev-rule-runner + test-udev-rules + test-udev-spawn + test-udev-util + ) + fi + fi + if use ukify; then + targets+=( + ukify + src/kernel-install/60-ukify.install + man/ukify.1 + ) + fi + fi + if use udev; then + targets+=( + libudev + src/libudev/libudev.pc + ) + if use test; then + targets+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + fi + if [[ ${#targets[@]} -ne 0 ]]; then + meson_src_compile "${targets[@]}" + fi + if [[ ${#optional_targets[@]} -ne 0 ]]; then + ninja ${NINJAOPTS} "${optional_targets[@]}" + fi +} + +multilib_src_test() { + local tests=() + if multilib_is_native_abi; then + if use boot; then + tests+=( --suite boot ) + fi + if use kernel-install; then + tests+=( --suite kernel-install ) + fi + if use sysusers; then + tests+=( --suite sysusers ) + fi + if use tmpfiles; then + tests+=( --suite tmpfiles ) + fi + if use udev; then + tests+=( --suite udev ) + fi + fi + if use udev; then + tests+=( --suite libudev ) + fi + if [[ ${#tests[@]} -ne 0 ]]; then + meson_src_test --no-rebuild "${tests[@]}" + fi +} + +src_install() { + meson-multilib_src_install +} + +set_rpath() { + patchelf --set-rpath "${EPREFIX}/usr/$(get_libdir)/systemd" "$@" || die "patchelf failed" +} + +multilib_src_install() { + if multilib_is_native_abi; then + exeinto "/usr/$(get_libdir)/systemd" + doexe src/shared/libsystemd-shared-${PV%%.*}.so + if use boot; then + set_rpath bootctl + dobin bootctl + doman man/bootctl.1 + meson_install --no-rebuild --tags systemd-boot + fi + if use kernel-install; then + set_rpath kernel-install + dobin kernel-install + doman man/kernel-install.8 + exeinto /usr/lib/kernel/install.d + doexe src/kernel-install/*.install + fi + if use sysusers; then + set_rpath systemd-sysusers + dobin systemd-sysusers + doman man/{systemd-sysusers.8,sysusers.d.5} + fi + if use tmpfiles; then + set_rpath systemd-tmpfiles + dobin systemd-tmpfiles + doman man/{systemd-tmpfiles.8,tmpfiles.d.5} + insinto /usr/lib/tmpfiles.d + doins tmpfiles.d/{etc,static-nodes-permissions,var}.conf + fi + if use udev; then + set_rpath udevadm systemd-hwdb + dobin udevadm systemd-hwdb + dosym ../../bin/udevadm /usr/lib/systemd/systemd-udevd + if use split-usr; then + # elogind installs udev rules that hard-code /bin/udevadm + dosym ../usr/bin/udevadm /bin/udevadm + fi + + exeinto /usr/lib/udev + set_rpath {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + doexe {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + + if have_dmi; then + set_rpath dmi_memory_id + doexe dmi_memory_id + fi + + rm -f rules.d/99-systemd.rules + insinto /usr/lib/udev/rules.d + doins rules.d/*.rules + + insinto /usr/lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + insinto /usr/share/pkgconfig + doins src/udev/udev.pc + + doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8} + newman man/systemd-udevd.service.8 systemd-udevd.8 + doman man/libudev.3 + doman man/udev_*.3 + fi + if use ukify; then + dobin ukify + dosym ../../bin/ukify /usr/lib/systemd/ukify + doman man/ukify.1 + fi + fi + if use udev; then + meson_install --no-rebuild --tags libudev + insinto "/usr/$(get_libdir)/pkgconfig" + doins src/libudev/libudev.pc + fi +} + +multilib_src_install_all() { + einstalldocs + if use boot; then + dobashcomp shell-completion/bash/bootctl + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/{_bootctl,_kernel-install} + fi + if use kernel-install; then + exeinto /usr/lib/kernel/install.d + doexe src/kernel-install/*.install + fi + if use tmpfiles; then + doinitd "${FILESDIR}"/systemd-tmpfiles-setup + doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev + exeinto /etc/cron.daily + doexe "${FILESDIR}"/systemd-tmpfiles-clean + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_systemd-tmpfiles + insinto /usr/lib/tmpfiles.d + doins tmpfiles.d/x11.conf + doins "${FILESDIR}"/{legacy,tmp}.conf + fi + if use udev; then + doheader src/libudev/libudev.h + + insinto /etc/udev + doins src/udev/udev.conf + keepdir /etc/udev/{hwdb.d,rules.d} + + insinto /usr/lib/systemd/network + doins network/99-default.link + + # Remove to avoid conflict with elogind + # https://bugs.gentoo.org/856433 + rm rules.d/70-power-switch.rules || die + insinto /usr/lib/udev/rules.d + doins rules.d/*.rules + doins "${FILESDIR}"/40-gentoo.rules + + insinto /usr/lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + dobashcomp shell-completion/bash/udevadm + + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_udevadm + fi + + use ukify && python_fix_shebang "${ED}" + use boot && secureboot_auto_sign +} + +add_service() { + local initd=$1 + local runlevel=$2 + + ebegin "Adding '${initd}' service to the '${runlevel}' runlevel" + mkdir -p "${EROOT}/etc/runlevels/${runlevel}" && + ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}" + eend $? +} + +pkg_preinst() { + # Migrate /lib/{systemd,udev} to /usr/lib + if use split-usr; then + local d + for d in systemd udev; do + dosym ../usr/lib/${d} /lib/${d} + if [[ -e ${EROOT}/lib/${d} && ! -L ${EROOT}/lib/${d} ]]; then + einfo "Copying files from '${EROOT}/lib/${d}' to '${EROOT}/usr/lib/${d}'" + cp -rpPT "${EROOT}/lib/${d}" "${EROOT}/usr/lib/${d}" || die + einfo "Removing '${EROOT}/lib/${d}'" + rm -r "${EROOT}/lib/${d}" || die + fi + done + fi +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + add_service systemd-tmpfiles-setup-dev sysinit + add_service systemd-tmpfiles-setup boot + fi + if use udev; then + ebegin "Updating hwdb" + systemd-hwdb --root="${ROOT}" update + eend $? + udev_reload + fi +} |