summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/Manifest.gzbin3366 -> 3365 bytes
-rw-r--r--net-fs/openafs/Manifest16
-rw-r--r--net-fs/openafs/files/0014-upstream-struct-init.patch354
-rw-r--r--net-fs/openafs/files/0015-upstream-struct-desiginated-init.patch215
-rw-r--r--net-fs/openafs/openafs-1.8.13-r2.ebuild (renamed from net-fs/openafs/openafs-1.8.8.1-r2.ebuild)134
-rw-r--r--net-fs/openafs/openafs-1.8.13.1-r1.ebuild348
-rw-r--r--net-fs/openafs/openafs-1.8.13.2-r1.ebuild348
-rw-r--r--net-fs/openafs/openafs-1.8.13.2.ebuild (renamed from net-fs/openafs/openafs-1.8.7-r1.ebuild)146
8 files changed, 1419 insertions, 142 deletions
diff --git a/net-fs/Manifest.gz b/net-fs/Manifest.gz
index f5d1b80e1fcc..548a1dea693c 100644
--- a/net-fs/Manifest.gz
+++ b/net-fs/Manifest.gz
Binary files differ
diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest
index cc0dd008f62e..bf9e32041fdb 100644
--- a/net-fs/openafs/Manifest
+++ b/net-fs/openafs/Manifest
@@ -11,6 +11,8 @@ AUX 0010-libperl.patch 1088 BLAKE2B c1ffa67ab9038798cad60f8892147a045169e971841d
AUX 0011-xbsa.patch 985 BLAKE2B 7669f0e6b8370dafca6eeac8d2bb0b1f133f24f4d9166c87cd55843a88cd93cc121eac9365cf04a9b47881544746ab5a7f98864bae5e38443f4275f20a9bfcc8 SHA512 18fbbc5c32d17a31b0955adc161b924c87ae3ad218bb54f590852282a84dceb1e1fc77c68b6e985dd27f96112b6719ad7b241fd20bb7f7f4db452e713bcb32d0
AUX 0012-xml-dtd.patch 2789 BLAKE2B 8b5807822d27bb91eff23e8565e98c77c7e4598d007009a9580fc29436c7f845db2f23440573731fdb98c6049e0a81a1839d118447495dac9d25400374906ff1 SHA512 9a291751c4ac4ba98a9eacccc056093a06f1abdf8f1d25ae85917b7f1055f216fe98f06066e695d05349503d137d534a0530169a6c672d4dade7b4bc32c75ac6
AUX 0013-kernel-cc-ld.patch 2489 BLAKE2B dc85da09afbbbbb3cf20c20eeff26e77fc7b4aef6d1d8b3fed07b61bbab337a0fdf580590f7c485cf67a41243d497bb0ce4ab29945d5cb3f0f2d83ba6fd82d06 SHA512 dca05d0c57248f49b38a7e4c074189dcfe9db81ca3d1133549a9a7ce6b9840f0d61875b05eb4e1f4eb373cd4229edd78bb8b7adda350485065f5a2f050853d7d
+AUX 0014-upstream-struct-init.patch 13092 BLAKE2B cea2df83f3fd3ed79e77d575447ee8e8922f101667e8b2a1dc189584fe1f4ad1f68fd52993a06f2bff794008ec18f0a7c35e39ccaccd75e7fdcb69c8cf0a0acd SHA512 42f5372ba1a1eabb4e02ccd5b724843d12b4a063fcdd8f04de6dfd61283452f1b845cd2aa9ffb4a7078611df1378b9ce6370cccc623c19fb5dcacb11b250b2bd
+AUX 0015-upstream-struct-desiginated-init.patch 8430 BLAKE2B e0daa2b440aaca085d4e3aa44d53d1d24bc8f47c4c48d3056aba2b64ee98ee7dd1c589fa276fba7105dcdebc824a10cc56c1156711fcb11bfb1d22ad3291bffa SHA512 3c5b857dde9303a31e1cadf3c0ddb8ee2e30e5fe38873ccd53478fdab6b510da22f731b256adbb04b11520f47d3daa68a0d54acf15b346e069a2baee9b7c91b0
AUX README.Gentoo 13526 BLAKE2B 5cec095471ebf674d5d51677ea5605f0d1913528196c9402bdab2bd30c94ea0e64b12fe6f7572072fc92c7279ace82cc712728e784551d119a29729627737721 SHA512 1bb9f7a55be65a55420aed12df76a6f60fb7f7d2bf5015fbb8c09e0b691c8a1d8afc53bd0a325b6fd8ff5e244348df79ef618aa6699f3fd68547898b5a4c06e2
AUX ThisCell.default 11 BLAKE2B e52dcb3991b2c15618a69fd58a57bce8dad1f9145ed4b680975ebc18ad2ad587e36c8f672042bde36cbb5652c9d94235429d948338d8b6a54ed4056bcb421cca SHA512 82011bb6c39abec73a5dd7ca06c97dab391e78ae682a6d0befe790be59499e162620dedc1f69fa753efb636d18d813bd100ea2d19c3f8f80bdeddc9e63bbca5d
AUX cacheinfo.default 30 BLAKE2B 09f010b7e10e89818edb3bbf3d4283b2f5c709d27de73590435e3fee023991983c2a18add9fb8ea563c22258f6f4b53ebbe6aa349ebf6991bbc323a0014fc045 SHA512 1299075743225150f693ad8408c26be15dfaedba378bc62662285d8f477561b8c6dfe641335b854979d71aff928e4c27d3e2f4de6ed0f623b8400beed0f86f7e
@@ -27,14 +29,12 @@ DIST openafs-1.8.13-doc.tar.bz2 3779824 BLAKE2B aab4d57df918061982614ea83b1b5de0
DIST openafs-1.8.13-src.tar.bz2 15053864 BLAKE2B 83c62197b7825e46f733a593e096494a234607b0fa17ee30717b42740e1ebb13f43e11986cf39e950e79f867ed3ab40d1c80ab7aa79a153ffd9d8f3b1cde307a SHA512 f2b60b3942ba21a4f0fd837dfda1a9659ebe4d2f96edfbe7162e97faa8c5887fbea8fdef958af396356b78793f06e6744566a1aa6b70df2164c9ab37c06e2cd9
DIST openafs-1.8.13.1-doc.tar.bz2 3781663 BLAKE2B f7bc8750456cd61cf1d2b5737fa4f0b3b319bfb79d0517ed82f551e31118313ea64baff738b8ad380a64d4f02bb8df1425af4ca8cfb690d7be31ec29c68d8866 SHA512 f297fa2e6d8dbff1566f11e54ba88b171e56e2fdfba373b0852f3036411c99c4e1e2cfd83705512fa1ff64ac2e6e008df15fd291208c9d15c53d393fac21c96f
DIST openafs-1.8.13.1-src.tar.bz2 15046870 BLAKE2B aeed6e0a8caab9614e0980b362f806856bb3f3340865e9197986314f8219b14b78c38f0ff05d71169716de7614b10e318561377982969945a420bca4679ebd32 SHA512 705978208e69f43a87153c6c343722a0fc3d9aacbedfaca161f260dd0a8806b9dd23f81686dbd13b62ce9b787dbf860e60e035bed7e2d26ea21576b495764c41
-DIST openafs-1.8.7-doc.tar.bz2 3808045 BLAKE2B 8ded75239dd59633297ee4208a0f3f018486b5b5b71fda91229583fd2d6a7743bbbeba280e61ff91d602617fc47944105b06a5c0610b0c89c808ecba38af7f9c SHA512 6d087320ab6681686b6afb78621b21eaec26b91dbd03a13df447ad9f0ce897332ac378b38bf1abc590575d82d8cb22757249e60a2407e4ad498d46c083632e0d
-DIST openafs-1.8.7-src.tar.bz2 15059909 BLAKE2B 89aacc48100d3eabbec45acca3911fbd823c029a30e79ad16564dcc3646b9bbadb60a528f142fc907de0d4eb2831d922d8146cdba72c02f4e8db9ab806c84d86 SHA512 12d5aa9177dde10e504f71b4b1ae19be0b0c52e8031e0f5afacce4a2c3f2321970af65591edab6145f7400f6276acd7e8624aa66e816d2394324e2ef5c403c01
-DIST openafs-1.8.8.1-doc.tar.bz2 3770278 BLAKE2B 4d10c96f05190a71b8d7aa89557946d0b95774ca77f40d8e9ca81f5d5bacff1966e637f3bd066181f2dcf182dbfffdf93521981745fe4dbfea142e6b17fcf574 SHA512 c229636ca4c7245d37fa25b02805982e3f667163ae312e14678117c60320ccce50230bf09e081167e789a76bad8fa39a88638cb439ab87954c93b6108004efa8
-DIST openafs-1.8.8.1-src.tar.bz2 14866119 BLAKE2B ae58a1d30fc8d72b4487700203c03e62fc15d0034a03516d4ea5b52c33970e8d9954e6b3c812a4633910c512d283c11431abbcb3868569d8d5ced1a69585263e SHA512 fb181e0989e9bae714af26de916a96946eea20f98b47154f2de7b5e296cb4f42af5df037ef7b603073e97eafe52d7c401666f03130c1e0c9a6ae1a6c2707c384
-DIST openafs-patches-20210116.tar.xz 67300 BLAKE2B aaafa197d1be1e9d89685fe5193a4682ea9e5e5c1c3227963a97ca7a98e6ab5e855ee65d615a31162559b30ae5867fde6ceeec1055af1a375e73b9fa25654de5 SHA512 06e9e1b65fceda34a197556aba1a05eabb630723fc17c5060d5e2a054e60ab8c5195d5c80eff3d3444bcdca40b7115da9143f5b8100659061446038ad4a79007
-DIST openafs-patches-20211212.tar.xz 13892 BLAKE2B 64582135ff3b81725cf0510d1157785b112f76197b8f50a947d22a82b8b55bebd163f2288b19d68a994f22c78bd90b6bfdad5f75383df1cac06d40feb72e8de8 SHA512 40a1a0d126ae194609da8a264c26b278b6081d95020bcbdb3a809952a70535fa551d1983e811e4ab9deaec06f061075906c2bbaf91e4354bff3520584e3fd336
+DIST openafs-1.8.13.2-doc.tar.bz2 3782680 BLAKE2B 10c3cc49ba6ec3515e952c2b7b712a107f04bea20f6904a0f594542e7a59d42b154a16b66d0fd85ea16d9485d01c7a25838e1caa88b55e0ca1278edc71dc3c51 SHA512 07e167fa3d90f9a2798c295a176d74eb99d39194f1ffaa33fb0bdc829bd24a689aa89ab397cb66425b4472059ab748f42e9ea54750ad725cf291469f5c9684c6
+DIST openafs-1.8.13.2-src.tar.bz2 15048865 BLAKE2B 57e077cce2abc5837f8ac4896aec3dd946669b8d9440b587cfb3bfd53e7b14b2c65502deabb5fe7149e80df495a4292c747eaa9ccecf38736a1e4e2257c673cf SHA512 c4cf202090f9222ab4b71a5d5d7875210cc25c67534dbc28c6fe8b942b28a8ef953f2090493e2fb95c551a4b4cbb6d5ede88675607161a5459d8693c8a0802ad
EBUILD openafs-1.8.13-r1.ebuild 10795 BLAKE2B 3e784d72661abec3e260542a890002dd3ccd51f6334da4a0505da2d3fdeadc6c8463eb759d18cfe1c2a5a90341059a541f94d526d012a4ea95001b915ce4c856 SHA512 f48242cc8bfe4761b999f072b60d6535b3cf64ea4516e3d8a550fc64a7a2749e559e235cc8e5cec5d1880aae4f368193012ba760c4e692b452e6b5948c735a6b
+EBUILD openafs-1.8.13-r2.ebuild 10903 BLAKE2B bf8adc66f4d3b8efdedf2eb15d48be59515c56af7cc8ec94f9af19b7f815a10c0bdb9dd1ce5f87b7c77de189574d106d0cd67cd80fc61486303df5356c9b72bc SHA512 90746aed0f1072ea6cabb7188eb325418e62e390e03fa3a6641dd89c7e9e79d65b11db2785fefc7ea27ce0210508cc96dc1478bf7123ef54f5d85c83b9bdf0f0
+EBUILD openafs-1.8.13.1-r1.ebuild 11208 BLAKE2B 405ec706072ec1a16daaaf0140b89e32a7bdec5f743a6a76106f639828b2f5331260278d0ccffde3325897984ff5056d76694ebda1fbcc82956fb99052633dd0 SHA512 5e52a022306966861344e12b566e0bcce6706d43e9743e45b8a86e00110f30c23478b2af89c7a01f10cd4365e9801296147125f597caccf6735c1ad8a5897e58
EBUILD openafs-1.8.13.1.ebuild 11102 BLAKE2B 33cc87bfeb441fb2f9e289211d176e675dcf254285ed6f4b88d4020de93ea46c4ece4c5a496aaddddd8656787836123c98e2d6a74d32b80b579bde30adfedad9 SHA512 b8f4b87433202668dfc5a062ca80c87b2a89de002abdb8defbaf042b07700c305dd395da3f63020902fb5bd93ae3cc0c5a8896b9895c43812d759982d4bcc4d7
-EBUILD openafs-1.8.7-r1.ebuild 10625 BLAKE2B 0b7dcd22683f5738d8325c948d96b502b865b893bde490b4b60a3f961ddde91a8f0cafbd3e0be7f91763ebe46676da7546faba9e5ef704274f942a585b92115b SHA512 c38318db3dc7ffd63065de47ed2c340fc1d29d70f4f367e1d62bc9c346ee54ad6de5a608078ce6ecf55079fcb467097ecbca06fe5156819cf27a5839d6f2ee3d
-EBUILD openafs-1.8.8.1-r2.ebuild 10519 BLAKE2B 4f0450b95ea50cf0572b5b5d4f0daf1d75ffbebbb2ef2509c6352a28bdb1cec1574acc631c0f05b9aea8365c91e7e5d1006b4f42f18c192afbae740c048ee3dc SHA512 26807f3d614dcf22d93756fa8374d72a1bbefb84dcd6e3c43a4b5dca9a888e62e06794485fdb60059b1c3ef0543b9473a30747845dc1be1b04246df821c369bc
+EBUILD openafs-1.8.13.2-r1.ebuild 11559 BLAKE2B 16c091c376f1bd701accfaefb91d0fab1ffb1d3757480108a4871993d4af5ecbb85b56ee7b9672678256c8407daae0a976863376a7b1ea101f08daee56aa9a21 SHA512 f9a62a1650f1aeeb07a8e1358b99f2f76f9ed1600bc0f7495a745c38cfd2d0da66c7aa8650f384f519c6521723cbec29ea9e7b1a644c18814b688622a348dd22
+EBUILD openafs-1.8.13.2.ebuild 11102 BLAKE2B fe0eed8d96b59d813233ffbd6f82107802a8863058fb973f08a3e16e978a4c33c302ab643500f09b4b63bce713ee4d23a5786466a6e1b29576df8a4030d8c834 SHA512 9161acd3ab15a460eb30f2e9feed3e7606b573336d708cb5387200b5ba1fe038c1aa0ae399f3300e1a374ece45a21b3486f2e6b0bed9de69af082961afb042ec
MISC metadata.xml 1519 BLAKE2B 94d953893d8287474f12680ba3b448c258e847a8c47605ea511ff220a99734c70633866fe226d02fa543a3ed70f8e38dc367d806f798229e53b40aba5dd157b3 SHA512 e1e0a04b01395696bb254a80f79b7fcd574c0a53352fd79e747c45f0d4298310613c3d2ed07b84fdb2f9a2d0d38a1e54942a2dcb694ab63869d6be1e3865d356
diff --git a/net-fs/openafs/files/0014-upstream-struct-init.patch b/net-fs/openafs/files/0014-upstream-struct-init.patch
new file mode 100644
index 000000000000..e25e4898f570
--- /dev/null
+++ b/net-fs/openafs/files/0014-upstream-struct-init.patch
@@ -0,0 +1,354 @@
+From 9e612ba7bf1ccea8158ae38b5d687d8d78e1630e Mon Sep 17 00:00:00 2001
+From: Cheyenne Wills <cwills@sinenomine.net>
+Date: Wed, 26 Feb 2025 08:03:18 -0700
+Subject: [PATCH 1/2] Convert HAVE_STRUCT_LABEL_SUPPORT to AFS_STRUCT_INIT
+
+The OpenAFS coding style allows the use of designated initializers for
+structs, however not all supported platforms have compilers that support
+it.
+
+The preprocessor define HAVE_STRUCT_LABEL_SUPPORT has been available for
+use so structure initialization can be set up to support compilers that
+do have designated initializers support.
+
+The typical use is:
+
+ struct foo x = {
+ #ifndef HAVE_STRUCT_LABEL_SUPPORT
+ val1,
+ val2,
+ ...
+ #else
+ .mem1 = val1,
+ .mem2 = val2,
+ ...
+ #endif
+ };
+
+This results in extra lines of code where errors can easily be
+introduced.
+
+Create a macro, AFS_STRUCT_INIT, that uses designated initializers when
+available, so the above example would be:
+
+ struct foo x = {
+ AFS_STRUCT_INIT(.mem1, val1),
+ AFS_STRUCT_INIT(.mem2, val2),
+ ...
+ };
+
+Convert the initialization of structures that are using the
+HAVE_STRUCT_LABEL_SUPPORT define to use AFS_STRUCT_INIT.
+
+Note, there is still a requirement that the order of initializers match
+the order of the elements within the structure, but it should be easier
+to verify that the initializers are in the proper order.
+
+Use a consistent alignment, and add trailing comma on the last
+element.
+
+There are no functional changes made by this commit.
+
+Reviewed-on: https://gerrit.openafs.org/16289
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Reviewed-by: Andrew Deason <adeason@sinenomine.net>
+(cherry picked from commit 7c28b99490b75475ed9130526c536ae0e354e064)
+
+Change-Id: I8faa4b497f2962bdd0a4ecb559e8b9288fd5c796
+---
+ src/afs/afs_dcache.c | 66 ++++++++++++----------------------------
+ src/afs/afs_fetchstore.c | 54 ++++++++++----------------------
+ src/config/stds.h | 6 ++++
+ src/rx/xdr_len.c | 28 +++++------------
+ src/rx/xdr_mem.c | 28 +++++------------
+ src/rx/xdr_rx.c | 28 +++++------------
+ 6 files changed, 66 insertions(+), 144 deletions(-)
+
+diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c
+index 35fd5947325d..e41ba8ff3a8e 100644
+--- a/src/afs/afs_dcache.c
++++ b/src/afs/afs_dcache.c
+@@ -104,55 +104,29 @@ afs_int32 afs_dcentries; /*!< In-memory dcache entries */
+ int dcacheDisabled = 0;
+
+ struct afs_cacheOps afs_UfsCacheOps = {
+-#ifndef HAVE_STRUCT_LABEL_SUPPORT
+- osi_UFSOpen,
+- osi_UFSTruncate,
+- afs_osi_Read,
+- afs_osi_Write,
+- osi_UFSClose,
+- afs_UFSReadUIO,
+- afs_UFSWriteUIO,
+- afs_UFSGetDSlot,
+- afs_UFSGetVolSlot,
+- afs_UFSHandleLink,
+-#else
+- .open = osi_UFSOpen,
+- .truncate = osi_UFSTruncate,
+- .fread = afs_osi_Read,
+- .fwrite = afs_osi_Write,
+- .close = osi_UFSClose,
+- .vreadUIO = afs_UFSReadUIO,
+- .vwriteUIO = afs_UFSWriteUIO,
+- .GetDSlot = afs_UFSGetDSlot,
+- .GetVolSlot = afs_UFSGetVolSlot,
+- .HandleLink = afs_UFSHandleLink,
+-#endif
++ AFS_STRUCT_INIT(.open, osi_UFSOpen),
++ AFS_STRUCT_INIT(.truncate, osi_UFSTruncate),
++ AFS_STRUCT_INIT(.fread, afs_osi_Read),
++ AFS_STRUCT_INIT(.fwrite, afs_osi_Write),
++ AFS_STRUCT_INIT(.close, osi_UFSClose),
++ AFS_STRUCT_INIT(.vreadUIO, afs_UFSReadUIO),
++ AFS_STRUCT_INIT(.vwriteUIO, afs_UFSWriteUIO),
++ AFS_STRUCT_INIT(.GetDSlot, afs_UFSGetDSlot),
++ AFS_STRUCT_INIT(.GetVolSlot, afs_UFSGetVolSlot),
++ AFS_STRUCT_INIT(.HandleLink, afs_UFSHandleLink),
+ };
+
+ struct afs_cacheOps afs_MemCacheOps = {
+-#ifndef HAVE_STRUCT_LABEL_SUPPORT
+- afs_MemCacheOpen,
+- afs_MemCacheTruncate,
+- afs_MemReadBlk,
+- afs_MemWriteBlk,
+- afs_MemCacheClose,
+- afs_MemReadUIO,
+- afs_MemWriteUIO,
+- afs_MemGetDSlot,
+- afs_MemGetVolSlot,
+- afs_MemHandleLink,
+-#else
+- .open = afs_MemCacheOpen,
+- .truncate = afs_MemCacheTruncate,
+- .fread = afs_MemReadBlk,
+- .fwrite = afs_MemWriteBlk,
+- .close = afs_MemCacheClose,
+- .vreadUIO = afs_MemReadUIO,
+- .vwriteUIO = afs_MemWriteUIO,
+- .GetDSlot = afs_MemGetDSlot,
+- .GetVolSlot = afs_MemGetVolSlot,
+- .HandleLink = afs_MemHandleLink,
+-#endif
++ AFS_STRUCT_INIT(.open, afs_MemCacheOpen),
++ AFS_STRUCT_INIT(.truncate, afs_MemCacheTruncate),
++ AFS_STRUCT_INIT(.fread, afs_MemReadBlk),
++ AFS_STRUCT_INIT(.fwrite, afs_MemWriteBlk),
++ AFS_STRUCT_INIT(.close, afs_MemCacheClose),
++ AFS_STRUCT_INIT(.vreadUIO, afs_MemReadUIO),
++ AFS_STRUCT_INIT(.vwriteUIO, afs_MemWriteUIO),
++ AFS_STRUCT_INIT(.GetDSlot, afs_MemGetDSlot),
++ AFS_STRUCT_INIT(.GetVolSlot, afs_MemGetVolSlot),
++ AFS_STRUCT_INIT(.HandleLink, afs_MemHandleLink),
+ };
+
+ int cacheDiskType; /*Type of backing disk for cache */
+diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c
+index 97d0671811dc..5baf371a2c6a 100644
+--- a/src/afs/afs_fetchstore.c
++++ b/src/afs/afs_fetchstore.c
+@@ -309,48 +309,26 @@ afs_GenericStoreProc(struct storeOps *ops, void *rock,
+
+ static
+ struct storeOps rxfs_storeUfsOps = {
+-#ifndef HAVE_STRUCT_LABEL_SUPPORT
+- rxfs_storeUfsPrepare,
+- rxfs_storeUfsRead,
+- rxfs_storeUfsWrite,
+- rxfs_storeStatus,
+- rxfs_storePadd,
+- rxfs_storeClose,
+- rxfs_storeDestroy,
+- afs_GenericStoreProc
+-#else
+- .prepare = rxfs_storeUfsPrepare,
+- .read = rxfs_storeUfsRead,
+- .write = rxfs_storeUfsWrite,
+- .status = rxfs_storeStatus,
+- .padd = rxfs_storePadd,
+- .close = rxfs_storeClose,
+- .destroy = rxfs_storeDestroy,
+- .storeproc = afs_GenericStoreProc
+-#endif
++ AFS_STRUCT_INIT(.prepare, rxfs_storeUfsPrepare),
++ AFS_STRUCT_INIT(.read, rxfs_storeUfsRead),
++ AFS_STRUCT_INIT(.write, rxfs_storeUfsWrite),
++ AFS_STRUCT_INIT(.status, rxfs_storeStatus),
++ AFS_STRUCT_INIT(.padd, rxfs_storePadd),
++ AFS_STRUCT_INIT(.close, rxfs_storeClose),
++ AFS_STRUCT_INIT(.destroy, rxfs_storeDestroy),
++ AFS_STRUCT_INIT(.storeproc, afs_GenericStoreProc),
+ };
+
+ static
+ struct storeOps rxfs_storeMemOps = {
+-#ifndef HAVE_STRUCT_LABEL_SUPPORT
+- rxfs_storeMemPrepare,
+- rxfs_storeMemRead,
+- rxfs_storeMemWrite,
+- rxfs_storeStatus,
+- rxfs_storePadd,
+- rxfs_storeClose,
+- rxfs_storeDestroy,
+- afs_GenericStoreProc
+-#else
+- .prepare = rxfs_storeMemPrepare,
+- .read = rxfs_storeMemRead,
+- .write = rxfs_storeMemWrite,
+- .status = rxfs_storeStatus,
+- .padd = rxfs_storePadd,
+- .close = rxfs_storeClose,
+- .destroy = rxfs_storeDestroy,
+- .storeproc = afs_GenericStoreProc
+-#endif
++ AFS_STRUCT_INIT(.prepare, rxfs_storeMemPrepare),
++ AFS_STRUCT_INIT(.read, rxfs_storeMemRead),
++ AFS_STRUCT_INIT(.write, rxfs_storeMemWrite),
++ AFS_STRUCT_INIT(.status, rxfs_storeStatus),
++ AFS_STRUCT_INIT(.padd, rxfs_storePadd),
++ AFS_STRUCT_INIT(.close, rxfs_storeClose),
++ AFS_STRUCT_INIT(.destroy, rxfs_storeDestroy),
++ AFS_STRUCT_INIT(.storeproc, afs_GenericStoreProc),
+ };
+
+ static afs_int32
+diff --git a/src/config/stds.h b/src/config/stds.h
+index 8ae68343458b..ae030149f6d2 100644
+--- a/src/config/stds.h
++++ b/src/config/stds.h
+@@ -305,6 +305,12 @@ hdr_static_inline(unsigned long long) afs_printable_uint64_lu(afs_uint64 d) { re
+ # define AFS_FALLTHROUGH do {} while(0)
+ #endif
+
++#if defined(HAVE_STRUCT_LABEL_SUPPORT)
++# define AFS_STRUCT_INIT(member, value) member = (value)
++#else
++# define AFS_STRUCT_INIT(member, value) (value)
++#endif
++
+ /*
+ * Conditionally remove unreached statements under Solaris Studio.
+ */
+diff --git a/src/rx/xdr_len.c b/src/rx/xdr_len.c
+index 5de15d010d62..9f9fe1ca92ac 100644
+--- a/src/rx/xdr_len.c
++++ b/src/rx/xdr_len.c
+@@ -84,26 +84,14 @@ xdrlen_inline(XDR *xdrs, u_int len)
+ }
+
+ static struct xdr_ops xdrlen_ops = {
+-#ifndef HAVE_STRUCT_LABEL_SUPPORT
+- /* Windows does not support labeled assigments */
+- xdrlen_getint32, /* not supported */
+- xdrlen_putint32, /* serialize an afs_int32 */
+- xdrlen_getbytes, /* not supported */
+- xdrlen_putbytes, /* serialize counted bytes */
+- xdrlen_getpos, /* get offset in the stream */
+- xdrlen_setpos, /* set offset in the stream */
+- xdrlen_inline, /* not supported */
+- xdrlen_destroy, /* destroy stream */
+-#else
+- .x_getint32 = xdrlen_getint32,
+- .x_putint32 = xdrlen_putint32,
+- .x_getbytes = xdrlen_getbytes,
+- .x_putbytes = xdrlen_putbytes,
+- .x_getpostn = xdrlen_getpos,
+- .x_setpostn = xdrlen_setpos,
+- .x_inline = xdrlen_inline,
+- .x_destroy = xdrlen_destroy
+-#endif
++ AFS_STRUCT_INIT(.x_getint32, xdrlen_getint32), /* not supported */
++ AFS_STRUCT_INIT(.x_putint32, xdrlen_putint32), /* serialize an afs_int32 */
++ AFS_STRUCT_INIT(.x_getbytes, xdrlen_getbytes), /* not supported */
++ AFS_STRUCT_INIT(.x_putbytes, xdrlen_putbytes), /* serialize counted bytes */
++ AFS_STRUCT_INIT(.x_getpostn, xdrlen_getpos), /* get offset in the stream */
++ AFS_STRUCT_INIT(.x_setpostn, xdrlen_setpos), /* set offset in the stream */
++ AFS_STRUCT_INIT(.x_inline, xdrlen_inline), /* not supported */
++ AFS_STRUCT_INIT(.x_destroy, xdrlen_destroy), /* destroy stream */
+ };
+
+ /**
+diff --git a/src/rx/xdr_mem.c b/src/rx/xdr_mem.c
+index ae849f521bf6..bd6720505edb 100644
+--- a/src/rx/xdr_mem.c
++++ b/src/rx/xdr_mem.c
+@@ -59,26 +59,14 @@ static afs_int32 *xdrmem_inline(XDR *, u_int);
+ static void xdrmem_destroy(XDR *);
+
+ static struct xdr_ops xdrmem_ops = {
+-#ifndef HAVE_STRUCT_LABEL_SUPPORT
+- /* Windows does not support labeled assigments */
+- xdrmem_getint32, /* deserialize an afs_int32 */
+- xdrmem_putint32, /* serialize an afs_int32 */
+- xdrmem_getbytes, /* deserialize counted bytes */
+- xdrmem_putbytes, /* serialize counted bytes */
+- xdrmem_getpos, /* get offset in the stream: not supported. */
+- xdrmem_setpos, /* set offset in the stream: not supported. */
+- xdrmem_inline, /* prime stream for inline macros */
+- xdrmem_destroy, /* destroy stream */
+-#else
+- .x_getint32 = xdrmem_getint32,
+- .x_putint32 = xdrmem_putint32,
+- .x_getbytes = xdrmem_getbytes,
+- .x_putbytes = xdrmem_putbytes,
+- .x_getpostn = xdrmem_getpos,
+- .x_setpostn = xdrmem_setpos,
+- .x_inline = xdrmem_inline,
+- .x_destroy = xdrmem_destroy
+-#endif
++ AFS_STRUCT_INIT(.x_getint32, xdrmem_getint32), /* deserialize an afs_int32 */
++ AFS_STRUCT_INIT(.x_putint32, xdrmem_putint32), /* serialize an afs_int32 */
++ AFS_STRUCT_INIT(.x_getbytes, xdrmem_getbytes), /* deserialize counted bytes */
++ AFS_STRUCT_INIT(.x_putbytes, xdrmem_putbytes), /* serialize counted bytes */
++ AFS_STRUCT_INIT(.x_getpostn, xdrmem_getpos), /* get offset in the stream: not supported. */
++ AFS_STRUCT_INIT(.x_setpostn, xdrmem_setpos), /* set offset in the stream: not supported. */
++ AFS_STRUCT_INIT(.x_inline, xdrmem_inline), /* prime stream for inline macros */
++ AFS_STRUCT_INIT(.x_destroy, xdrmem_destroy), /* destroy stream */
+ };
+
+ /*
+diff --git a/src/rx/xdr_rx.c b/src/rx/xdr_rx.c
+index 62fbed331b02..34e2b4d75efe 100644
+--- a/src/rx/xdr_rx.c
++++ b/src/rx/xdr_rx.c
+@@ -49,26 +49,14 @@ static afs_int32 *xdrrx_inline(XDR *axdrs, u_int len);
+ * Ops vector for stdio type XDR
+ */
+ static struct xdr_ops xdrrx_ops = {
+-#ifndef HAVE_STRUCT_LABEL_SUPPORT
+- /* Windows does not support labeled assigments */
+- xdrrx_getint32, /* deserialize an afs_int32 */
+- xdrrx_putint32, /* serialize an afs_int32 */
+- xdrrx_getbytes, /* deserialize counted bytes */
+- xdrrx_putbytes, /* serialize counted bytes */
+- NULL, /* get offset in the stream: not supported. */
+- NULL, /* set offset in the stream: not supported. */
+- xdrrx_inline, /* prime stream for inline macros */
+- NULL, /* destroy stream */
+-#else
+- .x_getint32 = xdrrx_getint32, /* deserialize an afs_int32 */
+- .x_putint32 = xdrrx_putint32, /* serialize an afs_int32 */
+- .x_getbytes = xdrrx_getbytes, /* deserialize counted bytes */
+- .x_putbytes = xdrrx_putbytes, /* serialize counted bytes */
+- .x_getpostn = NULL, /* get offset in the stream: not supported. */
+- .x_setpostn = NULL, /* set offset in the stream: not supported. */
+- .x_inline = xdrrx_inline, /* prime stream for inline macros */
+- .x_destroy = NULL, /* destroy stream */
+-#endif
++ AFS_STRUCT_INIT(.x_getint32, xdrrx_getint32), /* deserialize an afs_int32 */
++ AFS_STRUCT_INIT(.x_putint32, xdrrx_putint32), /* serialize an afs_int32 */
++ AFS_STRUCT_INIT(.x_getbytes, xdrrx_getbytes), /* deserialize counted bytes */
++ AFS_STRUCT_INIT(.x_putbytes, xdrrx_putbytes), /* serialize counted bytes */
++ AFS_STRUCT_INIT(.x_getpostn, NULL), /* get offset in the stream: not supported. */
++ AFS_STRUCT_INIT(.x_setpostn, NULL), /* set offset in the stream: not supported. */
++ AFS_STRUCT_INIT(.x_inline, xdrrx_inline), /* prime stream for inline macros */
++ AFS_STRUCT_INIT(.x_destroy, NULL), /* destroy stream */
+ };
+
+ /*
+--
+2.45.3
+
diff --git a/net-fs/openafs/files/0015-upstream-struct-desiginated-init.patch b/net-fs/openafs/files/0015-upstream-struct-desiginated-init.patch
new file mode 100644
index 000000000000..ed44ef94aaa5
--- /dev/null
+++ b/net-fs/openafs/files/0015-upstream-struct-desiginated-init.patch
@@ -0,0 +1,215 @@
+From ed1e72e2a3aecd894ca1a029996ef70846e30781 Mon Sep 17 00:00:00 2001
+From: Cheyenne Wills <cwills@sinenomine.net>
+Date: Tue, 25 Feb 2025 20:09:12 -0700
+Subject: [PATCH 2/2] afs: Init structures via designated initializers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When the Linux kernel is configured with CONFIG_RANDSTRUCT=y, the
+following error occurs when building the openafs kernel module:
+
+ src/libafs/MODLOAD-6.12.0-SP/rand-timer-kernel.c:46:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
+ 46 | timer_seed,
+ | ^~~~~~~~~~
+
+When the Linux kernel is configured with CONFIG_RANDSTRUCT=y, the Linux
+build uses a Linux kernel-specific GCC plugin
+(scripts/gcc-plugins/randomize_layout_plugin.c) that analyzes structures
+and will add the designated_init attribute to any structure that is
+determined to be a "pure operations struct" (i.e. contains only function
+pointers or nested pure ops structs/unions). This is done so the plugin
+can then randomize the layout. This causes some of our structures to be
+flagged with the designated_init attribute, which triggers
+-Werror=designated-init when we don't use designated initializers.
+
+Within the Linux specific directory, src/afs/LINUX, the code already
+uses designated initializers, however some of the shared code within
+src/afs or that is included in the build for the kernel module still use
+positional initialization when initializing pure operations structures.
+
+Update the shared code that is used when building the Linux kernel
+module to use designated initializers via the AFS_STRUCT_INIT macro.
+
+Use a consistent alignment, and add trailing comma on the last
+element, change 0 to NULL where applicable.
+
+There are no functional changes within this commit.
+
+Note: For consistency, all the initializers for rx_securityOps are being
+updated even though not all of the files are part of the Linux kernel
+module (e.g. rxkad_server.c).
+
+Note: This error was discovered by an automated process that is used
+by the Gentoo organization to test building packages with a hardened
+Linux kernel.
+
+Reviewed-on: https://gerrit.openafs.org/16290
+Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
+Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
+Reviewed-by: Andrew Deason <adeason@sinenomine.net>
+Tested-by: Andrew Deason <adeason@sinenomine.net>
+(cherry picked from commit e94c183faef42e5ffe85c157ede008f2817bdefd)
+
+[cwills@sinenomine.net changes to rxgk not applicable to 1.8.x]
+
+Change-Id: I56ebb7d34718eef6c5bfbba98e3fb4e350a5129f
+---
+ src/afs/afs_fetchstore.c | 20 ++++++++---------
+ src/crypto/hcrypto/kernel/rand-timer.c | 14 ++++++------
+ src/rxkad/rxkad_client.c | 30 +++++++++++++-------------
+ src/rxkad/rxkad_server.c | 30 +++++++++++++-------------
+ 4 files changed, 47 insertions(+), 47 deletions(-)
+
+diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c
+index 5baf371a2c6a..5b9e08c3fdec 100644
+--- a/src/afs/afs_fetchstore.c
++++ b/src/afs/afs_fetchstore.c
+@@ -844,20 +844,20 @@ rxfs_fetchMore(void *r, afs_int32 *length, afs_uint32 *moredata)
+
+ static
+ struct fetchOps rxfs_fetchUfsOps = {
+- rxfs_fetchMore,
+- rxfs_fetchUfsRead,
+- rxfs_fetchUfsWrite,
+- rxfs_fetchClose,
+- rxfs_fetchDestroy
++ AFS_STRUCT_INIT(.more, rxfs_fetchMore),
++ AFS_STRUCT_INIT(.read, rxfs_fetchUfsRead),
++ AFS_STRUCT_INIT(.write, rxfs_fetchUfsWrite),
++ AFS_STRUCT_INIT(.close, rxfs_fetchClose),
++ AFS_STRUCT_INIT(.destroy, rxfs_fetchDestroy),
+ };
+
+ static
+ struct fetchOps rxfs_fetchMemOps = {
+- rxfs_fetchMore,
+- rxfs_fetchMemRead,
+- rxfs_fetchMemWrite,
+- rxfs_fetchClose,
+- rxfs_fetchDestroy
++ AFS_STRUCT_INIT(.more, rxfs_fetchMore),
++ AFS_STRUCT_INIT(.read, rxfs_fetchMemRead),
++ AFS_STRUCT_INIT(.write, rxfs_fetchMemWrite),
++ AFS_STRUCT_INIT(.close, rxfs_fetchClose),
++ AFS_STRUCT_INIT(.destroy, rxfs_fetchDestroy),
+ };
+
+ static afs_int32
+diff --git a/src/crypto/hcrypto/kernel/rand-timer.c b/src/crypto/hcrypto/kernel/rand-timer.c
+index 3a7023555b67..6ef71737cdeb 100644
+--- a/src/crypto/hcrypto/kernel/rand-timer.c
++++ b/src/crypto/hcrypto/kernel/rand-timer.c
+@@ -5,7 +5,7 @@
+ * Contains no copyrightable content.
+ */
+ #include <config.h>
+-
++#include <stds.h>
+ #include <rand.h>
+ #include "randi.h"
+
+@@ -43,12 +43,12 @@ timer_status(void)
+ }
+
+ const RAND_METHOD hc_rand_timer_method = {
+- timer_seed,
+- timer_bytes,
+- timer_cleanup,
+- timer_add,
+- timer_pseudorand,
+- timer_status
++ AFS_STRUCT_INIT(.seed, timer_seed),
++ AFS_STRUCT_INIT(.bytes, timer_bytes),
++ AFS_STRUCT_INIT(.cleanup, timer_cleanup),
++ AFS_STRUCT_INIT(.add, timer_add),
++ AFS_STRUCT_INIT(.pseudorand, timer_pseudorand),
++ AFS_STRUCT_INIT(.status, timer_status),
+ };
+
+ const RAND_METHOD *
+diff --git a/src/rxkad/rxkad_client.c b/src/rxkad/rxkad_client.c
+index 1f760b8c0e66..79ea0cf586b3 100644
+--- a/src/rxkad/rxkad_client.c
++++ b/src/rxkad/rxkad_client.c
+@@ -50,21 +50,21 @@
+ #endif /* max */
+
+ static struct rx_securityOps rxkad_client_ops = {
+- rxkad_Close,
+- rxkad_NewConnection, /* every new connection */
+- rxkad_PreparePacket, /* once per packet creation */
+- 0, /* send packet (once per retrans.) */
+- 0,
+- 0,
+- 0,
+- rxkad_GetResponse, /* respond to challenge packet */
+- 0,
+- rxkad_CheckPacket, /* check data packet */
+- rxkad_DestroyConnection,
+- rxkad_GetStats,
+- 0,
+- 0,
+- 0,
++ AFS_STRUCT_INIT(.op_Close, rxkad_Close),
++ AFS_STRUCT_INIT(.op_NewConnection, rxkad_NewConnection), /* every new connection */
++ AFS_STRUCT_INIT(.op_PreparePacket, rxkad_PreparePacket), /* once per packet creation */
++ AFS_STRUCT_INIT(.op_SendPacket, NULL), /* send packet (once per retrans.) */
++ AFS_STRUCT_INIT(.op_CheckAuthentication, NULL),
++ AFS_STRUCT_INIT(.op_CreateChallenge, NULL),
++ AFS_STRUCT_INIT(.op_GetChallenge, NULL),
++ AFS_STRUCT_INIT(.op_GetResponse, rxkad_GetResponse), /* respond to challenge packet */
++ AFS_STRUCT_INIT(.op_CheckResponse, NULL),
++ AFS_STRUCT_INIT(.op_CheckPacket, rxkad_CheckPacket), /* check data packet */
++ AFS_STRUCT_INIT(.op_DestroyConnection, rxkad_DestroyConnection),
++ AFS_STRUCT_INIT(.op_GetStats, rxkad_GetStats),
++ AFS_STRUCT_INIT(.op_SetConfiguration, NULL),
++ AFS_STRUCT_INIT(.op_Spare2, NULL),
++ AFS_STRUCT_INIT(.op_Spare3, NULL),
+ };
+
+ /* Allocate a new client security object. Called with the encryption level,
+diff --git a/src/rxkad/rxkad_server.c b/src/rxkad/rxkad_server.c
+index 07e806bcdf36..766904cea562 100644
+--- a/src/rxkad/rxkad_server.c
++++ b/src/rxkad/rxkad_server.c
+@@ -43,21 +43,21 @@ afs_int32(*rxkad_AlternateTicketDecoder) (afs_int32, char *, afs_int32,
+ afs_uint32 *);
+
+ static struct rx_securityOps rxkad_server_ops = {
+- rxkad_Close,
+- rxkad_NewConnection,
+- rxkad_PreparePacket, /* once per packet creation */
+- 0, /* send packet (once per retrans) */
+- rxkad_CheckAuthentication,
+- rxkad_CreateChallenge,
+- rxkad_GetChallenge,
+- 0,
+- rxkad_CheckResponse,
+- rxkad_CheckPacket, /* check data packet */
+- rxkad_DestroyConnection,
+- rxkad_GetStats,
+- rxkad_SetConfiguration,
+- 0, /* spare 2 */
+- 0, /* spare 3 */
++ AFS_STRUCT_INIT(.op_Close, rxkad_Close),
++ AFS_STRUCT_INIT(.op_NewConnection, rxkad_NewConnection),
++ AFS_STRUCT_INIT(.op_PreparePacket, rxkad_PreparePacket), /* once per packet creation */
++ AFS_STRUCT_INIT(.op_SendPacket, NULL), /* send packet (once per retrans) */
++ AFS_STRUCT_INIT(.op_CheckAuthentication, rxkad_CheckAuthentication),
++ AFS_STRUCT_INIT(.op_CreateChallenge, rxkad_CreateChallenge),
++ AFS_STRUCT_INIT(.op_GetChallenge, rxkad_GetChallenge),
++ AFS_STRUCT_INIT(.op_GetResponse, NULL),
++ AFS_STRUCT_INIT(.op_CheckResponse, rxkad_CheckResponse),
++ AFS_STRUCT_INIT(.op_CheckPacket, rxkad_CheckPacket), /* check data packet */
++ AFS_STRUCT_INIT(.op_DestroyConnection, rxkad_DestroyConnection),
++ AFS_STRUCT_INIT(.op_GetStats, rxkad_GetStats),
++ AFS_STRUCT_INIT(.op_SetConfiguration, rxkad_SetConfiguration),
++ AFS_STRUCT_INIT(.op_Spare2, NULL), /* spare 2 */
++ AFS_STRUCT_INIT(.op_Spare3, NULL), /* spare 3 */
+ };
+ extern afs_uint32 rx_MyMaxSendSize;
+
+--
+2.45.3
+
diff --git a/net-fs/openafs/openafs-1.8.8.1-r2.ebuild b/net-fs/openafs/openafs-1.8.13-r2.ebuild
index e6033dd205cd..1a2667ea60db 100644
--- a/net-fs/openafs/openafs-1.8.8.1-r2.ebuild
+++ b/net-fs/openafs/openafs-1.8.13-r2.ebuild
@@ -1,15 +1,14 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-MODULES_OPTIONAL_USE="modules"
-inherit autotools linux-mod flag-o-matic pam systemd tmpfiles toolchain-funcs
+MODULES_OPTIONAL_IUSE="modules"
+inherit autotools linux-mod-r1 flag-o-matic pam systemd tmpfiles toolchain-funcs
MY_PV=${PV/_/}
MY_P="${PN}-${MY_PV}"
-PVER=20211212
-KERNEL_LIMIT=5.17
+KERNEL_LIMIT=6.11
DESCRIPTION="The OpenAFS distributed file system"
HOMEPAGE="https://www.openafs.org/"
@@ -18,9 +17,10 @@ HOMEPAGE="https://www.openafs.org/"
SRC_URI="
https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
"
+S="${WORKDIR}/${MY_P}"
+
LICENSE="IBM BSD openafs-krb5-a APSL-2"
SLOT="0"
KEYWORDS="~amd64 -riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
@@ -46,7 +46,6 @@ BDEPEND="
)
perl? ( dev-lang/swig )"
DEPEND="
- !net-fs/openafs-kernel
virtual/libcrypt:=
virtual/libintl
amd64? ( tsm? ( app-backup/tsm ) )
@@ -62,10 +61,23 @@ RDEPEND="
${DEPEND}
selinux? ( sec-policy/selinux-afs )"
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=( "${WORKDIR}/gentoo/patches" )
-
+PATCHES=(
+ "${FILESDIR}"/0001-autoconf-use-AC_CHECK_TOOL-for-as-and-ld.patch
+ "${FILESDIR}"/0002-pam-paths.patch
+ "${FILESDIR}"/0003-fbsd.patch
+ "${FILESDIR}"/0004-sparc.patch
+ "${FILESDIR}"/0005-uname.patch
+ "${FILESDIR}"/0006-resolv.patch
+ "${FILESDIR}"/0007-afsauthent-symbols.patch
+ "${FILESDIR}"/0008-flags.patch
+ "${FILESDIR}"/0009-docbook2pdf.patch
+ "${FILESDIR}"/0010-libperl.patch
+ "${FILESDIR}"/0011-xbsa.patch
+ "${FILESDIR}"/0012-xml-dtd.patch
+ "${FILESDIR}"/0013-kernel-cc-ld.patch
+ "${FILESDIR}"/0014-upstream-struct-init.patch
+ "${FILESDIR}"/0015-upstream-struct-desiginated-init.patch
+)
CONFIG_CHECK="~!AFS_FS KEYS"
ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
@@ -89,7 +101,7 @@ pkg_pretend() {
}
pkg_setup() {
- use kernel_linux && linux-mod_pkg_setup
+ use kernel_linux && linux-mod-r1_pkg_setup
}
src_prepare() {
@@ -102,7 +114,7 @@ src_prepare() {
# build system is very delicate, so we can't run eautoreconf
# run autotools commands based on what is listed in regen.sh
_elibtoolize -c -f -i
- eaclocal -I src/cf -I src/external/rra-c-util/m4
+ eaclocal -I src/cf -I src/external/rra-c-util/m4 -I src/external/autoconf-archive/m4
eautoconf
eautoconf -o configure-libafs configure-libafs.ac
eautoheader
@@ -111,7 +123,28 @@ src_prepare() {
}
src_configure() {
- local -a myconf
+ # requires the --enable-static to avoid build errors. This is
+ # currently an upstream limitation.
+ local myconf=(
+ --enable-static
+ --disable-strip-binaries
+ $(use_enable bitmap-later)
+ $(use_enable debug)
+ $(use_enable debug debug-locks)
+ $(use_enable debug debug-lwp)
+ $(use_enable fuse fuse-client)
+ $(use_enable kauth)
+ $(use_enable modules kernel-module)
+ $(use_enable namei namei-fileserver)
+ $(use_enable ncurses gtx)
+ $(use_enable pthreaded-ubik)
+ $(use_enable supergroups)
+ $(use_enable ubik-read-while-write)
+ $(use_with apidoc dot)
+ $(use_with doc docbook-stylesheets /usr/share/sgml/docbook/xsl-stylesheets)
+ $(use_with kerberos krb5)
+ $(use_with perl swig)
+ )
# bug #861368
filter-lto
@@ -138,26 +171,8 @@ src_configure() {
local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
AFS_SYSKVERS=26 \
- econf \
- --disable-strip-binaries \
- $(use_enable bitmap-later) \
- $(use_enable debug) \
- $(use_enable debug debug-locks) \
- $(use_enable debug debug-lwp) \
- $(use_enable fuse fuse-client) \
- $(use_enable kauth) \
- $(use_enable modules kernel-module) \
- $(use_enable namei namei-fileserver) \
- $(use_enable ncurses gtx) \
- $(use_enable pthreaded-ubik) \
- $(use_enable supergroups) \
- $(use_enable ubik-read-while-write) \
- $(use_with apidoc dot) \
- $(use_with doc docbook-stylesheets /usr/share/sgml/docbook/xsl-stylesheets) \
- $(use_with kerberos krb5) \
- $(use_with kerberos gssapi) \
- $(use_with perl swig) \
- "${myconf[@]}"
+ econf "${myconf[@]}"
+
}
src_compile() {
@@ -169,30 +184,30 @@ src_compile() {
emake -C doc/xml/QuickStartUnix auqbg000.pdf
emake -C doc/xml/UserGuide auusg000.pdf
fi
- use apidoc && doxygen doc/doxygen/Doxyfile
+ if use apidoc; then
+ doxygen doc/doxygen/Doxyfile || die "Failed to build doxygen files"
+ fi
}
src_install() {
- local OPENRCDIR="${WORKDIR}/gentoo/openrc"
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+ local OPENRCDIR="${FILESDIR}/openrc"
+ local SYSTEMDDIR="${FILESDIR}/systemd"
emake DESTDIR="${ED}" install_nolibafs
if use modules; then
if use kernel_linux; then
local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
- [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
-
- MODULE_NAMES="libafs(fs/openafs:${srcdir})"
-
- linux-mod_src_install
+ [[ -f ${srcdir}/libafs.ko ]] || die "Couldn't find compiled kernel module"
+ linux_domodule ${srcdir}/libafs.ko
+ modules_post_process
fi
fi
insinto /etc/openafs
doins src/afsd/CellServDB
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+ newins "${FILESDIR}/ThisCell.default" ThisCell
+ newins "${FILESDIR}/cacheinfo.default" cacheinfo
# pam_afs and pam_afs.krb have been installed in irregular locations, fix
if use kauth; then
@@ -227,8 +242,7 @@ src_install() {
# minimal documentation
use kauth && doman src/pam/pam_afs.5
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo"
- src/afsd/CellServDB NEWS README )
+ DOCS=( "${FILESDIR}/README.Gentoo" src/afsd/CellServDB NEWS README )
# documentation package
rm -rf doc/txt/winnotes || die # unneeded docs
@@ -273,17 +287,14 @@ pkg_preinst() {
## (when they are not present)
local x
for x in cacheinfo CellServDB ThisCell ; do
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ if [[ -e "${EROOT}"/etc/openafs/${x} ]] ; then
cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
fi
done
}
pkg_postinst() {
- if use modules; then
- # Update linker.hints file
- use kernel_linux && linux-mod_pkg_postinst
- fi
+ use kernel_linux && linux-mod-r1_pkg_postinst
tmpfiles_process openafs-client.conf
@@ -301,29 +312,22 @@ pkg_postinst() {
elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
}
-pkg_postrm() {
- if use modules; then
- # Update linker.hints file
- use kernel_linux && linux-mod_pkg_postrm
- fi
-}
-
pkg_config() {
elog "Setting cache options for systemd."
SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found."
+ [[ ! -e "${SERVICED_FILE}" ]] && die "Systemd service.d file ${SERVICED_FILE} not found."
CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+ [[ -z ${CACHESIZE} ]] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
- if [ ${CACHESIZE} -lt 131070 ]; then
+ if [[ ${CACHESIZE} -lt 131070 ]]; then
AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
- elif [ ${CACHESIZE} -lt 524288 ]; then
+ elif [[ ${CACHESIZE} -lt 524288 ]]; then
AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
- elif [ ${CACHESIZE} -lt 1048576 ]; then
+ elif [[ ${CACHESIZE} -lt 1048576 ]]; then
AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
- elif [ ${CACHESIZE} -lt 2209715 ]; then
+ elif [[ ${CACHESIZE} -lt 2209715 ]]; then
AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
else
AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
diff --git a/net-fs/openafs/openafs-1.8.13.1-r1.ebuild b/net-fs/openafs/openafs-1.8.13.1-r1.ebuild
new file mode 100644
index 000000000000..97687454c3d9
--- /dev/null
+++ b/net-fs/openafs/openafs-1.8.13.1-r1.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_OPTIONAL_IUSE="modules"
+inherit autotools linux-mod-r1 flag-o-matic pam systemd tmpfiles toolchain-funcs
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+KERNEL_LIMIT=6.12
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
+"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 -riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei
+ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write"
+
+BDEPEND="
+ dev-lang/perl
+ app-alternatives/lex
+ app-alternatives/yacc
+ apidoc? (
+ app-text/doxygen[dot]
+ media-gfx/graphviz
+ )
+ doc? (
+ dev-libs/libxslt
+ || (
+ >=dev-java/fop-2.10-r1:0
+ app-text/dblatex
+ app-text/docbook-sgml-utils[jadetex]
+ )
+ )
+ perl? ( dev-lang/swig )"
+DEPEND="
+ virtual/libcrypt:=
+ virtual/libintl
+ amd64? ( tsm? ( app-backup/tsm ) )
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd:4.3
+ )
+ fuse? ( sys-fs/fuse:0= )
+ kauth? ( sys-libs/pam )
+ kerberos? ( virtual/krb5 )
+ ncurses? ( sys-libs/ncurses:0= )"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-afs )"
+
+PATCHES=(
+ "${FILESDIR}"/0001-autoconf-use-AC_CHECK_TOOL-for-as-and-ld.patch
+ "${FILESDIR}"/0002-pam-paths.patch
+ "${FILESDIR}"/0003-fbsd.patch
+ "${FILESDIR}"/0004-sparc.patch
+ "${FILESDIR}"/0005-uname.patch
+ "${FILESDIR}"/0006-resolv.patch
+ "${FILESDIR}"/0007-afsauthent-symbols.patch
+ "${FILESDIR}"/0008-flags.patch
+ "${FILESDIR}"/0009-docbook2pdf.patch
+ "${FILESDIR}"/0010-libperl.patch
+ "${FILESDIR}"/0011-xbsa.patch
+ "${FILESDIR}"/0012-xml-dtd.patch
+ "${FILESDIR}"/0013-kernel-cc-ld.patch
+ "${FILESDIR}"/0014-upstream-struct-init.patch
+ "${FILESDIR}"/0015-upstream-struct-desiginated-init.patch
+)
+# see https://bugs.gentoo.org/943641
+# Upstream performs uses customized autoconf routines to check for
+# the availability of various functions and the warnings/errors in
+# the config log for implicit function declarations are expected
+# and therefore are false positives.
+QA_CONFIG_IMPL_DECL_SKIP=("*")
+
+CONFIG_CHECK="~!AFS_FS KEYS"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+pkg_pretend() {
+ if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}"
+ ewarn ""
+ ewarn "You are free to utilize eapply_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ ewarn ""
+ ewarn "Alternatively, you may:"
+ ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it."
+ ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS."
+ ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited."
+ fi
+}
+
+pkg_setup() {
+ use kernel_linux && linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # build system is very delicate, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ _elibtoolize -c -f -i
+ eaclocal -I src/cf -I src/external/rra-c-util/m4 -I src/external/autoconf-archive/m4
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache || die
+}
+
+src_configure() {
+ # requires the --enable-static to avoid build errors. This is
+ # currently an upstream limitation.
+ local myconf=(
+ --enable-static
+ --disable-strip-binaries
+ $(use_enable bitmap-later)
+ $(use_enable debug)
+ $(use_enable debug debug-locks)
+ $(use_enable debug debug-lwp)
+ $(use_enable fuse fuse-client)
+ $(use_enable kauth)
+ $(use_enable modules kernel-module)
+ $(use_enable namei namei-fileserver)
+ $(use_enable ncurses gtx)
+ $(use_enable pthreaded-ubik)
+ $(use_enable supergroups)
+ $(use_enable ubik-read-while-write)
+ $(use_with apidoc dot)
+ $(use_with doc docbook-stylesheets /usr/share/sgml/docbook/xsl-stylesheets)
+ $(use_with kerberos krb5)
+ $(use_with perl swig)
+ )
+
+ # bug #861368
+ filter-lto
+
+ if use debug; then
+ use kauth && myconf+=( --enable-debug-pam )
+ use modules && myconf+=( --enable-debug-kernel )
+ fi
+
+ if use modules; then
+ if use kernel_linux; then
+ if kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf+=( --enable-linux-d_splice_alias-extra-iput )
+ fi
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}" )
+ fi
+ fi
+
+ use amd64 && use tsm && myconf+=( --enable-tivoli-tsm )
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ AFS_SYSKVERS=26 \
+ econf "${myconf[@]}"
+
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1
+ local d
+ if use doc; then
+ emake -C doc/xml/AdminGuide auagd000.pdf
+ emake -C doc/xml/AdminRef auarf000.pdf
+ emake -C doc/xml/QuickStartUnix auqbg000.pdf
+ emake -C doc/xml/UserGuide auusg000.pdf
+ fi
+ if use apidoc; then
+ doxygen doc/doxygen/Doxyfile || die "Failed to build doxygen files"
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${FILESDIR}/openrc"
+ local SYSTEMDDIR="${FILESDIR}/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ if use modules; then
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.ko ]] || die "Couldn't find compiled kernel module"
+ linux_domodule ${srcdir}/libafs.ko
+ modules_post_process
+ fi
+ fi
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ newins "${FILESDIR}/ThisCell.default" ThisCell
+ newins "${FILESDIR}/cacheinfo.default" cacheinfo
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use kauth; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump* || die
+
+ # avoid collision with mit_krb5's version of kpasswd
+ if use kauth; then
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+ fi
+
+ # avoid collision with heimdal's pagsh
+ if has_version app-crypt/heimdal; then
+ mv "${ED}"/usr/bin/pagsh{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/pagsh{,_afs}.1 || die
+ fi
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use kauth && doman src/pam/pam_afs.5
+ DOCS=( "${FILESDIR}/README.Gentoo" src/afsd/CellServDB NEWS README )
+
+ # documentation package
+ rm -rf doc/txt/winnotes || die # unneeded docs
+ if use doc; then
+ DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING )
+ newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf
+ newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf
+ newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf
+ newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf
+ fi
+ use apidoc && DOCS+=( doc/doxygen/output/html )
+ einstalldocs
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ dotmpfiles "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf
+
+ # used directories: client
+ keepdir /etc/openafs
+
+ # used directories: server
+ keepdir /etc/openafs/server
+ diropts -m0700
+ keepdir /var/lib/openafs
+ keepdir /var/lib/openafs/db
+ diropts -m0755
+ keepdir /var/lib/openafs/logs
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [[ -e "${EROOT}"/etc/openafs/${x} ]] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod-r1_pkg_postinst
+
+ tmpfiles_process openafs-client.conf
+
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+ elog
+ elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before"
+ elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
+}
+
+pkg_config() {
+ elog "Setting cache options for systemd."
+
+ SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
+ [[ ! -e "${SERVICED_FILE}" ]] && die "Systemd service.d file ${SERVICED_FILE} not found."
+
+ CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
+ [[ -z ${CACHESIZE} ]] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+
+ if [[ ${CACHESIZE} -lt 131070 ]]; then
+ AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+ elif [[ ${CACHESIZE} -lt 524288 ]]; then
+ AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
+ elif [[ ${CACHESIZE} -lt 1048576 ]]; then
+ AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+ elif [[ ${CACHESIZE} -lt 2209715 ]]; then
+ AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+ else
+ AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+ fi
+
+ # Replace existing env var if exists, else append line
+ grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \
+ sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \
+ sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \
+ die "Updating ${SERVICED_FILE} failed."
+}
diff --git a/net-fs/openafs/openafs-1.8.13.2-r1.ebuild b/net-fs/openafs/openafs-1.8.13.2-r1.ebuild
new file mode 100644
index 000000000000..56803cbd6eee
--- /dev/null
+++ b/net-fs/openafs/openafs-1.8.13.2-r1.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_OPTIONAL_IUSE="modules"
+inherit autotools linux-mod-r1 flag-o-matic pam systemd tmpfiles toolchain-funcs
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+KERNEL_LIMIT=6.13
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
+"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 -riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei
+ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write"
+
+BDEPEND="
+ dev-lang/perl
+ app-alternatives/lex
+ app-alternatives/yacc
+ apidoc? (
+ app-text/doxygen[dot]
+ media-gfx/graphviz
+ )
+ doc? (
+ dev-libs/libxslt
+ || (
+ >=dev-java/fop-2.10-r1:0
+ app-text/dblatex
+ app-text/docbook-sgml-utils[jadetex]
+ )
+ )
+ perl? ( dev-lang/swig )"
+DEPEND="
+ virtual/libcrypt:=
+ virtual/libintl
+ amd64? ( tsm? ( app-backup/tsm ) )
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd:4.3
+ )
+ fuse? ( sys-fs/fuse:0= )
+ kauth? ( sys-libs/pam )
+ kerberos? ( virtual/krb5 )
+ ncurses? ( sys-libs/ncurses:0= )"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-afs )"
+
+PATCHES=(
+ "${FILESDIR}"/0001-autoconf-use-AC_CHECK_TOOL-for-as-and-ld.patch
+ "${FILESDIR}"/0002-pam-paths.patch
+ "${FILESDIR}"/0003-fbsd.patch
+ "${FILESDIR}"/0004-sparc.patch
+ "${FILESDIR}"/0005-uname.patch
+ "${FILESDIR}"/0006-resolv.patch
+ "${FILESDIR}"/0007-afsauthent-symbols.patch
+ "${FILESDIR}"/0008-flags.patch
+ "${FILESDIR}"/0009-docbook2pdf.patch
+ "${FILESDIR}"/0010-libperl.patch
+ "${FILESDIR}"/0011-xbsa.patch
+ "${FILESDIR}"/0012-xml-dtd.patch
+ "${FILESDIR}"/0013-kernel-cc-ld.patch
+ "${FILESDIR}"/0014-upstream-struct-init.patch
+ "${FILESDIR}"/0015-upstream-struct-desiginated-init.patch
+)
+# see https://bugs.gentoo.org/943641
+# Upstream performs uses customized autoconf routines to check for
+# the availability of various functions and the warnings/errors in
+# the config log for implicit function declarations are expected
+# and therefore are false positives.
+QA_CONFIG_IMPL_DECL_SKIP=("*")
+
+CONFIG_CHECK="~!AFS_FS KEYS"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+pkg_pretend() {
+ if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}"
+ ewarn ""
+ ewarn "You are free to utilize eapply_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ ewarn ""
+ ewarn "Alternatively, you may:"
+ ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it."
+ ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS."
+ ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited."
+ fi
+}
+
+pkg_setup() {
+ use kernel_linux && linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # build system is very delicate, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ _elibtoolize -c -f -i
+ eaclocal -I src/cf -I src/external/rra-c-util/m4 -I src/external/autoconf-archive/m4
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache || die
+}
+
+src_configure() {
+ # requires the --enable-static to avoid build errors. This is
+ # currently an upstream limitation.
+ local myconf=(
+ --enable-static
+ --disable-strip-binaries
+ $(use_enable bitmap-later)
+ $(use_enable debug)
+ $(use_enable debug debug-locks)
+ $(use_enable debug debug-lwp)
+ $(use_enable fuse fuse-client)
+ $(use_enable kauth)
+ $(use_enable modules kernel-module)
+ $(use_enable namei namei-fileserver)
+ $(use_enable ncurses gtx)
+ $(use_enable pthreaded-ubik)
+ $(use_enable supergroups)
+ $(use_enable ubik-read-while-write)
+ $(use_with apidoc dot)
+ $(use_with doc docbook-stylesheets /usr/share/sgml/docbook/xsl-stylesheets)
+ $(use_with kerberos krb5)
+ $(use_with perl swig)
+ )
+
+ # bug #861368
+ filter-lto
+
+ if use debug; then
+ use kauth && myconf+=( --enable-debug-pam )
+ use modules && myconf+=( --enable-debug-kernel )
+ fi
+
+ if use modules; then
+ if use kernel_linux; then
+ if kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf+=( --enable-linux-d_splice_alias-extra-iput )
+ fi
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}" )
+ fi
+ fi
+
+ use amd64 && use tsm && myconf+=( --enable-tivoli-tsm )
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ AFS_SYSKVERS=26 \
+ econf "${myconf[@]}"
+
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1
+ local d
+ if use doc; then
+ emake -C doc/xml/AdminGuide auagd000.pdf
+ emake -C doc/xml/AdminRef auarf000.pdf
+ emake -C doc/xml/QuickStartUnix auqbg000.pdf
+ emake -C doc/xml/UserGuide auusg000.pdf
+ fi
+ if use apidoc; then
+ doxygen doc/doxygen/Doxyfile || die "Failed to build doxygen files"
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${FILESDIR}/openrc"
+ local SYSTEMDDIR="${FILESDIR}/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ if use modules; then
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.ko ]] || die "Couldn't find compiled kernel module"
+ linux_domodule ${srcdir}/libafs.ko
+ modules_post_process
+ fi
+ fi
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ newins "${FILESDIR}/ThisCell.default" ThisCell
+ newins "${FILESDIR}/cacheinfo.default" cacheinfo
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use kauth; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump* || die
+
+ # avoid collision with mit_krb5's version of kpasswd
+ if use kauth; then
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+ fi
+
+ # avoid collision with heimdal's pagsh
+ if has_version app-crypt/heimdal; then
+ mv "${ED}"/usr/bin/pagsh{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/pagsh{,_afs}.1 || die
+ fi
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use kauth && doman src/pam/pam_afs.5
+ DOCS=( "${FILESDIR}/README.Gentoo" src/afsd/CellServDB NEWS README )
+
+ # documentation package
+ rm -rf doc/txt/winnotes || die # unneeded docs
+ if use doc; then
+ DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING )
+ newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf
+ newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf
+ newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf
+ newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf
+ fi
+ use apidoc && DOCS+=( doc/doxygen/output/html )
+ einstalldocs
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ dotmpfiles "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf
+
+ # used directories: client
+ keepdir /etc/openafs
+
+ # used directories: server
+ keepdir /etc/openafs/server
+ diropts -m0700
+ keepdir /var/lib/openafs
+ keepdir /var/lib/openafs/db
+ diropts -m0755
+ keepdir /var/lib/openafs/logs
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [[ -e "${EROOT}"/etc/openafs/${x} ]] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod-r1_pkg_postinst
+
+ tmpfiles_process openafs-client.conf
+
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+ elog
+ elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before"
+ elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
+}
+
+pkg_config() {
+ elog "Setting cache options for systemd."
+
+ SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
+ [[ ! -e "${SERVICED_FILE}" ]] && die "Systemd service.d file ${SERVICED_FILE} not found."
+
+ CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
+ [[ -z ${CACHESIZE} ]] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+
+ if [[ ${CACHESIZE} -lt 131070 ]]; then
+ AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+ elif [[ ${CACHESIZE} -lt 524288 ]]; then
+ AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
+ elif [[ ${CACHESIZE} -lt 1048576 ]]; then
+ AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+ elif [[ ${CACHESIZE} -lt 2209715 ]]; then
+ AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+ else
+ AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+ fi
+
+ # Replace existing env var if exists, else append line
+ grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \
+ sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \
+ sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \
+ die "Updating ${SERVICED_FILE} failed."
+}
diff --git a/net-fs/openafs/openafs-1.8.7-r1.ebuild b/net-fs/openafs/openafs-1.8.13.2.ebuild
index 4ece01979b10..12abde88956f 100644
--- a/net-fs/openafs/openafs-1.8.7-r1.ebuild
+++ b/net-fs/openafs/openafs-1.8.13.2.ebuild
@@ -1,15 +1,14 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-MODULES_OPTIONAL_USE="modules"
-inherit autotools linux-mod flag-o-matic pam systemd tmpfiles toolchain-funcs
+MODULES_OPTIONAL_IUSE="modules"
+inherit autotools linux-mod-r1 flag-o-matic pam systemd tmpfiles toolchain-funcs
MY_PV=${PV/_/}
MY_P="${PN}-${MY_PV}"
-PVER=20210116
-KERNEL_LIMIT=5.11
+KERNEL_LIMIT=6.13
DESCRIPTION="The OpenAFS distributed file system"
HOMEPAGE="https://www.openafs.org/"
@@ -18,12 +17,13 @@ HOMEPAGE="https://www.openafs.org/"
SRC_URI="
https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
"
+S="${WORKDIR}/${MY_P}"
+
LICENSE="IBM BSD openafs-krb5-a APSL-2"
SLOT="0"
-KEYWORDS="amd64 -riscv ~sparc x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 -riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei
ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write"
@@ -46,7 +46,7 @@ BDEPEND="
)
perl? ( dev-lang/swig )"
DEPEND="
- !net-fs/openafs-kernel
+ virtual/libcrypt:=
virtual/libintl
amd64? ( tsm? ( app-backup/tsm ) )
doc? (
@@ -61,9 +61,27 @@ RDEPEND="
${DEPEND}
selinux? ( sec-policy/selinux-afs )"
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=( "${WORKDIR}/gentoo/patches" )
+PATCHES=(
+ "${FILESDIR}"/0001-autoconf-use-AC_CHECK_TOOL-for-as-and-ld.patch
+ "${FILESDIR}"/0002-pam-paths.patch
+ "${FILESDIR}"/0003-fbsd.patch
+ "${FILESDIR}"/0004-sparc.patch
+ "${FILESDIR}"/0005-uname.patch
+ "${FILESDIR}"/0006-resolv.patch
+ "${FILESDIR}"/0007-afsauthent-symbols.patch
+ "${FILESDIR}"/0008-flags.patch
+ "${FILESDIR}"/0009-docbook2pdf.patch
+ "${FILESDIR}"/0010-libperl.patch
+ "${FILESDIR}"/0011-xbsa.patch
+ "${FILESDIR}"/0012-xml-dtd.patch
+ "${FILESDIR}"/0013-kernel-cc-ld.patch
+)
+# see https://bugs.gentoo.org/943641
+# Upstream performs uses customized autoconf routines to check for
+# the availability of various functions and the warnings/errors in
+# the config log for implicit function declarations are expected
+# and therefore are false positives.
+QA_CONFIG_IMPL_DECL_SKIP=("*")
CONFIG_CHECK="~!AFS_FS KEYS"
ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
@@ -88,7 +106,7 @@ pkg_pretend() {
}
pkg_setup() {
- use kernel_linux && linux-mod_pkg_setup
+ use kernel_linux && linux-mod-r1_pkg_setup
}
src_prepare() {
@@ -97,13 +115,11 @@ src_prepare() {
# fixing 2-nd level makefiles to honor flags
sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
src/*/Makefile.in || die '*/Makefile.in sed failed'
- # fix xml docs to use local dtd files
- sed -i 's|http://www.oasis-open.org/docbook/xml/4.3|/usr/share/sgml/docbook/xml-dtd-4.3|' \
- doc/xml/*/*000.xml || die
- # packaging is f-ed up, so we can't run eautoreconf
+ # build system is very delicate, so we can't run eautoreconf
# run autotools commands based on what is listed in regen.sh
- eaclocal -I src/cf -I src/external/rra-c-util/m4
+ _elibtoolize -c -f -i
+ eaclocal -I src/cf -I src/external/rra-c-util/m4 -I src/external/autoconf-archive/m4
eautoconf
eautoconf -o configure-libafs configure-libafs.ac
eautoheader
@@ -112,7 +128,28 @@ src_prepare() {
}
src_configure() {
- local -a myconf
+ # requires the --enable-static to avoid build errors. This is
+ # currently an upstream limitation.
+ local myconf=(
+ --enable-static
+ --disable-strip-binaries
+ $(use_enable bitmap-later)
+ $(use_enable debug)
+ $(use_enable debug debug-locks)
+ $(use_enable debug debug-lwp)
+ $(use_enable fuse fuse-client)
+ $(use_enable kauth)
+ $(use_enable modules kernel-module)
+ $(use_enable namei namei-fileserver)
+ $(use_enable ncurses gtx)
+ $(use_enable pthreaded-ubik)
+ $(use_enable supergroups)
+ $(use_enable ubik-read-while-write)
+ $(use_with apidoc dot)
+ $(use_with doc docbook-stylesheets /usr/share/sgml/docbook/xsl-stylesheets)
+ $(use_with kerberos krb5)
+ $(use_with perl swig)
+ )
# bug #861368
filter-lto
@@ -139,26 +176,8 @@ src_configure() {
local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
AFS_SYSKVERS=26 \
- econf \
- --disable-strip-binaries \
- $(use_enable bitmap-later) \
- $(use_enable debug) \
- $(use_enable debug debug-locks) \
- $(use_enable debug debug-lwp) \
- $(use_enable fuse fuse-client) \
- $(use_enable kauth) \
- $(use_enable modules kernel-module) \
- $(use_enable namei namei-fileserver) \
- $(use_enable ncurses gtx) \
- $(use_enable pthreaded-ubik) \
- $(use_enable supergroups) \
- $(use_enable ubik-read-while-write) \
- $(use_with apidoc dot) \
- $(use_with doc docbook-stylesheets /usr/share/sgml/docbook/xsl-stylesheets) \
- $(use_with kerberos krb5) \
- $(use_with kerberos gssapi) \
- $(use_with perl swig) \
- "${myconf[@]}"
+ econf "${myconf[@]}"
+
}
src_compile() {
@@ -170,30 +189,30 @@ src_compile() {
emake -C doc/xml/QuickStartUnix auqbg000.pdf
emake -C doc/xml/UserGuide auusg000.pdf
fi
- use apidoc && doxygen doc/doxygen/Doxyfile
+ if use apidoc; then
+ doxygen doc/doxygen/Doxyfile || die "Failed to build doxygen files"
+ fi
}
src_install() {
- local OPENRCDIR="${WORKDIR}/gentoo/openrc"
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+ local OPENRCDIR="${FILESDIR}/openrc"
+ local SYSTEMDDIR="${FILESDIR}/systemd"
emake DESTDIR="${ED}" install_nolibafs
if use modules; then
if use kernel_linux; then
local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
- [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
-
- MODULE_NAMES="libafs(fs/openafs:${srcdir})"
-
- linux-mod_src_install
+ [[ -f ${srcdir}/libafs.ko ]] || die "Couldn't find compiled kernel module"
+ linux_domodule ${srcdir}/libafs.ko
+ modules_post_process
fi
fi
insinto /etc/openafs
doins src/afsd/CellServDB
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+ newins "${FILESDIR}/ThisCell.default" ThisCell
+ newins "${FILESDIR}/cacheinfo.default" cacheinfo
# pam_afs and pam_afs.krb have been installed in irregular locations, fix
if use kauth; then
@@ -228,8 +247,7 @@ src_install() {
# minimal documentation
use kauth && doman src/pam/pam_afs.5
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo"
- src/afsd/CellServDB NEWS README )
+ DOCS=( "${FILESDIR}/README.Gentoo" src/afsd/CellServDB NEWS README )
# documentation package
rm -rf doc/txt/winnotes || die # unneeded docs
@@ -274,17 +292,14 @@ pkg_preinst() {
## (when they are not present)
local x
for x in cacheinfo CellServDB ThisCell ; do
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ if [[ -e "${EROOT}"/etc/openafs/${x} ]] ; then
cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
fi
done
}
pkg_postinst() {
- if use modules; then
- # Update linker.hints file
- use kernel_linux && linux-mod_pkg_postinst
- fi
+ use kernel_linux && linux-mod-r1_pkg_postinst
tmpfiles_process openafs-client.conf
@@ -302,29 +317,22 @@ pkg_postinst() {
elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
}
-pkg_postrm() {
- if use modules; then
- # Update linker.hints file
- use kernel_linux && linux-mod_pkg_postrm
- fi
-}
-
pkg_config() {
elog "Setting cache options for systemd."
SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found."
+ [[ ! -e "${SERVICED_FILE}" ]] && die "Systemd service.d file ${SERVICED_FILE} not found."
CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+ [[ -z ${CACHESIZE} ]] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
- if [ ${CACHESIZE} -lt 131070 ]; then
+ if [[ ${CACHESIZE} -lt 131070 ]]; then
AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
- elif [ ${CACHESIZE} -lt 524288 ]; then
+ elif [[ ${CACHESIZE} -lt 524288 ]]; then
AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
- elif [ ${CACHESIZE} -lt 1048576 ]; then
+ elif [[ ${CACHESIZE} -lt 1048576 ]]; then
AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
- elif [ ${CACHESIZE} -lt 2209715 ]; then
+ elif [[ ${CACHESIZE} -lt 2209715 ]]; then
AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
else
AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"