From 0fb71e0215ed52863e462cccef73c01aff44d43d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 18 Dec 2017 15:11:02 +0000 Subject: gentoo resync : 18.12.2017 --- sys-apps/util-linux/Manifest | 10 +- .../util-linux-2.31-too_generic_symbols_pt1.patch | 207 ++++++++++++ .../util-linux-2.31-too_generic_symbols_pt2.patch | 355 +++++++++++++++++++++ .../util-linux-2.31-too_generic_symbols_pt3.patch | 43 +++ sys-apps/util-linux/util-linux-2.28.2.ebuild | 182 ----------- sys-apps/util-linux/util-linux-2.29.2-r1.ebuild | 200 ------------ sys-apps/util-linux/util-linux-2.30.1.ebuild | 201 ------------ sys-apps/util-linux/util-linux-2.31-r1.ebuild | 206 ++++++++++++ 8 files changed, 815 insertions(+), 589 deletions(-) create mode 100644 sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt1.patch create mode 100644 sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt2.patch create mode 100644 sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt3.patch delete mode 100644 sys-apps/util-linux/util-linux-2.28.2.ebuild delete mode 100644 sys-apps/util-linux/util-linux-2.29.2-r1.ebuild delete mode 100644 sys-apps/util-linux/util-linux-2.30.1.ebuild create mode 100644 sys-apps/util-linux/util-linux-2.31-r1.ebuild (limited to 'sys-apps/util-linux') diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest index a0de22fd103d..e7a8eb58d078 100644 --- a/sys-apps/util-linux/Manifest +++ b/sys-apps/util-linux/Manifest @@ -1,14 +1,12 @@ AUX runuser-l.pamd 188 BLAKE2B 4fbd934c05386732b32281fdfac19153f01e0610868f3168026fbc4eb828ed1fe177677939958322fb074a95c8f64bdbaea42a4e9c039ac86dee0154ac96242e SHA512 86538adbd3d01c4b9e46fee00c38d298d2857fb1224461206425532404c212f03331308b74347c9af2e00583a3b50802085bdc6cb2bd393cf5e9d032e7290301 AUX runuser.pamd 278 BLAKE2B 61afa98e02a4ee030176dad97b7aa7d7075b07584c0e9f2c254f90bf22f6bad7ad8d87cb6d7c95efb789dcbec01e266c3192e135a3a36d817ab47c6bc05e7a01 SHA512 a4c4d41078acdc7c7f1d1f1894d20d052d3d5a3c66d5680d7f76665e251c614fd76ca9678a27ea376147f49250c716a1b3b0c0afa9595bd74d26d2190d1680fd -DIST util-linux-2.28.2.tar.xz 4149700 BLAKE2B da38a047b4a7dc867ba72aea149d515665375089d880d43c40f6d19a09ee33023d64b95c15073d6a83a36ee58ff6d47ef08671ab841b533bb747a337c5da6c02 SHA512 ac1c2d4c92bbc4eabed464cb0334c1d9b21e58df0f07f0b26e7adcfa188879de8632d195b65a4358c5e11e14ac6e09a1c6206265bbf1fab4ce122414bee7e940 -DIST util-linux-2.29.2.tar.xz 4277668 BLAKE2B 176830ad80031ca78fc274ab27f1cb4ccdef7f310101c7e81e1e32b070c9dd11581240b5480c2e8e09bae9a96d5287a0a03fc19281d480f9a6d70aa0b9817404 SHA512 0a87e6758531f74276f3de7607ef545f324b9b36b444aa5d163140c5fb0f4f7602655d7ec9939f92550dcb320d922cd69521a2183199d463795e67d3c27fce79 -DIST util-linux-2.30.1.tar.xz 4459284 BLAKE2B f7308e644bb4aa5a063b285d3a73ed459f4c94e1b7414fe23d862d3791772ab51e55eed8c931cda2a3fa462178a5f2945720fe787c20a45662308fcb331422aa SHA512 bcf1807198660c133c380e13d6ba5dcdb7470c47bcaeea03ccc5a78a0d834e3df3d13ae5ffc35fd7f8fff7ba062629d4b1f5cde78452b846c9315c51c9e108f5 +AUX util-linux-2.31-too_generic_symbols_pt1.patch 5422 BLAKE2B 8274cdcdbfa56917a97c357a9e49b3eb0f6ca0d4cc9b66ad594ef8baa774808aba6e0e4bfe681c762d28e13611bc0d7bfc253a9f3cfb29c897c129af729ccfc8 SHA512 8ceb03b5e1b1d80c64035ce4bb350679b7e49e491ba2217a69f89644e5e1f431ba3efb3813885c60656d7b022abb41838a6149efc604244a7593a3a80456accd +AUX util-linux-2.31-too_generic_symbols_pt2.patch 11096 BLAKE2B 2f1f278352c7fb2c47b0f094969e9b15860da7ca03cc10522d23f95a05721c9df1f3228cccdbe77a2a6fcf5a998556013d4776e86ab6661fac6b5ba1e00969a3 SHA512 e1b7610db8febf3d693ebafd405d46ed4d07555677ba0a77570292996069e30d663448de0e3a3b68d6624f36eba448c2249fe7431669a9a0193a3acaa8e01014 +AUX util-linux-2.31-too_generic_symbols_pt3.patch 1118 BLAKE2B e2f098346f7359945c26e49012798d910e8f46c099df9421f4ef3fc8801be5f8d31621f660137f171175dee984ea7e53f7614876d142a2cdedc94b7d4011eb98 SHA512 7e63b0f98fd5dace2c904800124e94f9734fffdf04386bbc03a84b2975f9100851f902c46fc923c9c31210359b4e3675ba04d7a844cfcc1fb494bcc7b776bef8 DIST util-linux-2.30.2.tar.xz 4442624 BLAKE2B 7b76e255c9ee4d8b8f65f037a735808233edcdb8dce951038ae8983a3f4a6e493458622f6c7f6ce68d38672ac6dc5258b45b787c196dabede41cb19afc76e545 SHA512 b92ec16d5e8a405ad9ebbac8673bb49c5bf0a7f630118477f12c7a3c6b3b3ee5d56868632dd71fffd5c0434821207c2769f6859b9d398c2df770ec6487d7c32d DIST util-linux-2.31.tar.xz 4503892 BLAKE2B 8a9e2fc674cacbfabfc76cc0ab671f3fdb35d49de9f4ae8660b49df9e196878c2459d8fc57f6c9b6d2ad73cc56d970656ffcbc22deed97bb7a0cc28490a1fbb0 SHA512 48b668526e96a132736b882090d0e33c20b4b3a0e1760502d83118ed98ccc9423d310848a2bb73f82f85e9c19f6191075ae2c5269b007e76be1fbd7b6b88fbf5 -EBUILD util-linux-2.28.2.ebuild 5508 BLAKE2B 0b7a776910d21ce8071958b9b03c2d15969d59a1285d7f82dd24e540cfce717da716edc9d5f35968c2b5a967dff26036178f60d82794347b75cbb24bc4081f22 SHA512 7ce97d8d0325171d047508c3081fa3adadc79837f0821a4c5d63683e52353186328501d09bb0b884f3715ac443757a557c1c205f79c451a93f20c65035fe9516 -EBUILD util-linux-2.29.2-r1.ebuild 6022 BLAKE2B 11be8b43b1bfd2930759299c4a62a6bbb36ba151ff48e90cf1dca03efd633e07aa88b01a8e31c922397ae075ed06d7d5e017d3cf6a10f76eabefb7f4f0ac7ee4 SHA512 ede52a77a6cba1f06f6ae18ae64d2f836e6f5babc2d407409878867e7ef46614ffbd6f8267ceffb51d374d1ab87955d5ebfb3e92863078845aea06488dee6fe5 -EBUILD util-linux-2.30.1.ebuild 6073 BLAKE2B 1254f66e82ad293d9003442d9d8c182ddb57f1fe186b3de08d2a588a27d71388ad80c10b5e8343957492cc6050359f8025fd11df9f9118dd6898789a29b2edde SHA512 f6f247c6119337f79e3ab559de54b35ff8c892633323606e687c957c8b2db540487c9b8b5b37554ae59e29946ad0cdac563cbc2ca7a99cb723c69398aac52366 EBUILD util-linux-2.30.2.ebuild 6077 BLAKE2B abd7234f5e2622b7a7d1489bd9f57fb3d33dce6556621cb8239ad8eb1260aafc4816cf878cbc5936893d50df263ff75073b79a49370ca9ef1b1dd9a8164c5332 SHA512 fdd4e1fdeef39a5cfdbe747a1e7bb2c35d4386efc8ed1264171156d85e00bc0465e9ec8b88a07e6cb7582659554ad98990f8bb728b581bfc41a3850121f1ce49 +EBUILD util-linux-2.31-r1.ebuild 6185 BLAKE2B 8aae4e20de31ab9161b78af51d8038a98f8ea4909277aa9a499b1aa47fe7c6821a965241a218d4ce166a462889c2e6375cda43e580922ac90ee805f196142ce6 SHA512 4bc749571b57a6720c7bbae2ca8b63d79ae8e2f46de686ff1978b35531d4945e1cab3afd61ec6b76718c31151e3838f06044e15b8bd7143c161a5f7860c74bca EBUILD util-linux-2.31.ebuild 6108 BLAKE2B 92ce3d425be12339dac8fb7296dc2e51dc2acff2d7d3382f4103b6c971a72c346564a2be31dcea835b58d5c88292cae7b2b8944408ab96d5d39d3db872e43ec7 SHA512 206118f5ff5fa5d4b21c734965c967d5eaf5934d57aef26199196b9800b89f252d17d676d4c288846062a0ff3d5304edeeda005f7dd62a427b3f6e19bc049da1 EBUILD util-linux-9999.ebuild 6108 BLAKE2B 92ce3d425be12339dac8fb7296dc2e51dc2acff2d7d3382f4103b6c971a72c346564a2be31dcea835b58d5c88292cae7b2b8944408ab96d5d39d3db872e43ec7 SHA512 206118f5ff5fa5d4b21c734965c967d5eaf5934d57aef26199196b9800b89f252d17d676d4c288846062a0ff3d5304edeeda005f7dd62a427b3f6e19bc049da1 MISC metadata.xml 947 BLAKE2B aeb1eef359b4be20e0df592245a2d432d92adf29336ecb1519bb4a97deed47c75bd14ca6c132f2e2ffe5c2d2ddcd7638ee38d03c7f8bcf8c8accb36a916663b5 SHA512 3822f7f3ccd120bbc788c64db0b79d55ad892bed99d01f8e0988c57ca7277a1936e03dbffd2898e68a2b6da25c301bc2cafb1da9658cdbbdfee1c9fb65e1699c diff --git a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt1.patch b/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt1.patch new file mode 100644 index 000000000000..aa296d2bf2f3 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt1.patch @@ -0,0 +1,207 @@ +From ff5feb96ec70e8a3fde41bd591b28c9855dab3fc Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 12 Dec 2017 11:29:02 +0100 +Subject: [PATCH] lib/sha1: use ul_/UL_prefix for symbols + +Unfortunately, the symbols are visible in statically compiled libuuid +and the names are too generic. + +Addresses: https://github.com/karelzak/util-linux/issues/548 +Signed-off-by: Karel Zak +--- + include/sha1.h | 49 +++++++++++++++---------------------------------- + lib/sha1.c | 34 +++++++++++++++++----------------- + libuuid/src/gen_uuid.c | 12 ++++++------ + 3 files changed, 38 insertions(+), 57 deletions(-) + +diff --git a/include/sha1.h b/include/sha1.h +index 5c28bce92..62af1da6f 100644 +--- a/include/sha1.h ++++ b/include/sha1.h +@@ -1,5 +1,5 @@ +-#ifndef SHA1_H +-#define SHA1_H ++#ifndef UTIL_LINUX_SHA1_H ++#define UTIL_LINUX_SHA1_H + + /* + SHA-1 in C +@@ -9,38 +9,19 @@ + + #include "stdint.h" + +-#define SHA1LENGTH 20 ++#define UL_SHA1LENGTH 20 + + typedef struct + { +- uint32_t state[5]; +- uint32_t count[2]; +- unsigned char buffer[64]; +-} SHA1_CTX; +- +-void SHA1Transform( +- uint32_t state[5], +- const unsigned char buffer[64] +- ); +- +-void SHA1Init( +- SHA1_CTX * context +- ); +- +-void SHA1Update( +- SHA1_CTX * context, +- const unsigned char *data, +- uint32_t len +- ); +- +-void SHA1Final( +- unsigned char digest[SHA1LENGTH], +- SHA1_CTX * context +- ); +- +-void SHA1( +- char *hash_out, +- const char *str, +- unsigned len); +- +-#endif /* SHA1_H */ ++ uint32_t state[5]; ++ uint32_t count[2]; ++ unsigned char buffer[64]; ++} UL_SHA1_CTX; ++ ++void ul_SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); ++void ul_SHA1Init(UL_SHA1_CTX *context); ++void ul_SHA1Update(UL_SHA1_CTX *context, const unsigned char *data, uint32_t len); ++void ul_SHA1Final(unsigned char digest[UL_SHA1LENGTH], UL_SHA1_CTX *context); ++void ul_SHA1(char *hash_out, const char *str, unsigned len); ++ ++#endif /* UTIL_LINUX_SHA1_H */ +diff --git a/lib/sha1.c b/lib/sha1.c +index a2ac7f8ef..62c036774 100644 +--- a/lib/sha1.c ++++ b/lib/sha1.c +@@ -51,7 +51,7 @@ A million repetitions of "a" + + /* Hash a single 512-bit block. This is the core of the algorithm. */ + +-void SHA1Transform( ++void ul_SHA1Transform( + uint32_t state[5], + const unsigned char buffer[64] + ) +@@ -179,8 +179,8 @@ void SHA1Transform( + + /* SHA1Init - Initialize new context */ + +-void SHA1Init( +- SHA1_CTX * context ++void ul_SHA1Init( ++ UL_SHA1_CTX * context + ) + { + /* SHA1 initialization constants */ +@@ -195,8 +195,8 @@ void SHA1Init( + + /* Run your data through this. */ + +-void SHA1Update( +- SHA1_CTX * context, ++void ul_SHA1Update( ++ UL_SHA1_CTX * context, + const unsigned char *data, + uint32_t len + ) +@@ -213,10 +213,10 @@ void SHA1Update( + if ((j + len) > 63) + { + memcpy(&context->buffer[j], data, (i = 64 - j)); +- SHA1Transform(context->state, context->buffer); ++ ul_SHA1Transform(context->state, context->buffer); + for (; i + 63 < len; i += 64) + { +- SHA1Transform(context->state, &data[i]); ++ ul_SHA1Transform(context->state, &data[i]); + } + j = 0; + } +@@ -228,9 +228,9 @@ void SHA1Update( + + /* Add padding and return the message digest. */ + +-void SHA1Final( ++void ul_SHA1Final( + unsigned char digest[20], +- SHA1_CTX * context ++ UL_SHA1_CTX * context + ) + { + unsigned i; +@@ -262,13 +262,13 @@ void SHA1Final( + } + #endif + c = 0200; +- SHA1Update(context, &c, 1); ++ ul_SHA1Update(context, &c, 1); + while ((context->count[0] & 504) != 448) + { + c = 0000; +- SHA1Update(context, &c, 1); ++ ul_SHA1Update(context, &c, 1); + } +- SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ ++ ul_SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ + for (i = 0; i < 20; i++) + { + digest[i] = (unsigned char) +@@ -279,18 +279,18 @@ void SHA1Final( + memset(&finalcount, '\0', sizeof(finalcount)); + } + +-void SHA1( ++void ul_SHA1( + char *hash_out, + const char *str, + unsigned len) + { +- SHA1_CTX ctx; ++ UL_SHA1_CTX ctx; + unsigned int ii; + +- SHA1Init(&ctx); ++ ul_SHA1Init(&ctx); + for (ii=0; ii +Date: Tue, 12 Dec 2017 11:54:08 +0100 +Subject: [PATCH] lib/md5: use ul_/UL_ prefix + +The symbols names are too generic. + +Addresses: https://github.com/karelzak/util-linux/issues/548 +Signed-off-by: Karel Zak +--- + disk-utils/mkfs.cramfs.c | 13 +++++++------ + include/md5.h | 25 ++++++++++--------------- + lib/md5.c | 26 +++++++++++++------------- + libblkid/src/superblocks/hfs.c | 16 +++++++++------- + libuuid/src/gen_uuid.c | 12 ++++++------ + misc-utils/mcookie.c | 14 +++++++------- + tests/helpers/test_md5.c | 12 ++++++------ + 7 files changed, 58 insertions(+), 60 deletions(-) + +diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c +index a3e9aa48c..729765078 100644 +--- a/disk-utils/mkfs.cramfs.c ++++ b/disk-utils/mkfs.cramfs.c +@@ -98,7 +98,7 @@ struct entry { + /* stats */ + unsigned char *name; + unsigned int mode, size, uid, gid; +- unsigned char md5sum[MD5LENGTH]; ++ unsigned char md5sum[UL_MD5LENGTH]; + unsigned char flags; /* CRAMFS_EFLAG_* */ + + /* FS data */ +@@ -194,16 +194,17 @@ do_munmap(char *start, unsigned int size, unsigned int mode){ + /* compute md5sums, so that we do not have to compare every pair of files */ + static void + mdfile(struct entry *e) { +- MD5_CTX ctx; + char *start; + + start = do_mmap(e->path, e->size, e->mode); + if (start == NULL) { + e->flags |= CRAMFS_EFLAG_INVALID; + } else { +- MD5Init(&ctx); +- MD5Update(&ctx, (unsigned char *) start, e->size); +- MD5Final(e->md5sum, &ctx); ++ UL_MD5_CTX ctx; ++ ++ ul_MD5Init(&ctx); ++ ul_MD5Update(&ctx, (unsigned char *) start, e->size); ++ ul_MD5Final(e->md5sum, &ctx); + + do_munmap(start, e->size, e->mode); + +@@ -255,7 +256,7 @@ static int find_identical_file(struct entry *orig, struct entry *new, loff_t *fs + + if ((orig->flags & CRAMFS_EFLAG_MD5) && + (new->flags & CRAMFS_EFLAG_MD5) && +- !memcmp(orig->md5sum, new->md5sum, MD5LENGTH) && ++ !memcmp(orig->md5sum, new->md5sum, UL_MD5LENGTH) && + identical_file(orig, new)) { + new->same = orig; + *fslen_ub -= new->size; +diff --git a/include/md5.h b/include/md5.h +index d997e379d..d6991e1fd 100644 +--- a/include/md5.h ++++ b/include/md5.h +@@ -1,29 +1,24 @@ +-#ifndef MD5_H +-#define MD5_H ++#ifndef UTIL_LINUX_MD5_H ++#define UTIL_LINUX_MD5_H + +-#ifdef HAVE_STDINT_H + #include +-#else +-typedef unsigned int uint32_t; +-#endif + +-#define MD5LENGTH 16 ++#define UL_MD5LENGTH 16 + +-struct MD5Context { ++struct UL_MD5Context { + uint32_t buf[4]; + uint32_t bits[2]; + unsigned char in[64]; + }; + +-void MD5Init(struct MD5Context *context); +-void MD5Update(struct MD5Context *context, unsigned char const *buf, +- unsigned len); +-void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *context); +-void MD5Transform(uint32_t buf[4], uint32_t const in[16]); ++void ul_MD5Init(struct UL_MD5Context *context); ++void ul_MD5Update(struct UL_MD5Context *context, unsigned char const *buf, unsigned len); ++void ul_MD5Final(unsigned char digest[UL_MD5LENGTH], struct UL_MD5Context *context); ++void ul_MD5Transform(uint32_t buf[4], uint32_t const in[16]); + + /* + * This is needed to make RSAREF happy on some MS-DOS compilers. + */ +-typedef struct MD5Context MD5_CTX; ++typedef struct UL_MD5Context UL_MD5_CTX; + +-#endif /* !MD5_H */ ++#endif /* !UTIL_LINUX_MD5_H */ +diff --git a/lib/md5.c b/lib/md5.c +index 282e2d22a..3765ab93e 100644 +--- a/lib/md5.c ++++ b/lib/md5.c +@@ -19,7 +19,7 @@ + #include "md5.h" + + #if !defined(WORDS_BIGENDIAN) +-#define byteReverse(buf, len) /* Nothing */ ++# define byteReverse(buf, len) /* Nothing */ + #else + static void byteReverse(unsigned char *buf, unsigned longs); + +@@ -37,14 +37,14 @@ static void byteReverse(unsigned char *buf, unsigned longs) + buf += 4; + } while (--longs); + } +-#endif +-#endif ++#endif /* !ASM_MD5 */ ++#endif /* !WORDS_BIGENDIAN */ + + /* + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. + */ +-void MD5Init(struct MD5Context *ctx) ++void ul_MD5Init(struct UL_MD5Context *ctx) + { + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; +@@ -59,7 +59,7 @@ void MD5Init(struct MD5Context *ctx) + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +-void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) ++void ul_MD5Update(struct UL_MD5Context *ctx, unsigned char const *buf, unsigned len) + { + uint32_t t; + +@@ -84,7 +84,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) + } + memcpy(p, buf, t); + byteReverse(ctx->in, 16); +- MD5Transform(ctx->buf, (uint32_t *) ctx->in); ++ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in); + buf += t; + len -= t; + } +@@ -93,7 +93,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) + while (len >= 64) { + memcpy(ctx->in, buf, 64); + byteReverse(ctx->in, 16); +- MD5Transform(ctx->buf, (uint32_t *) ctx->in); ++ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in); + buf += 64; + len -= 64; + } +@@ -104,10 +104,10 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) + } + + /* +- * Final wrapup - pad to 64-byte boundary with the bit pattern ++ * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +-void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx) ++void ul_MD5Final(unsigned char digest[UL_MD5LENGTH], struct UL_MD5Context *ctx) + { + unsigned count; + unsigned char *p; +@@ -128,7 +128,7 @@ void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx) + /* Two lots of padding: Pad the first block to 64 bytes */ + memset(p, 0, count); + byteReverse(ctx->in, 16); +- MD5Transform(ctx->buf, (uint32_t *) ctx->in); ++ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in); + + /* Now fill the next block with 56 bytes */ + memset(ctx->in, 0, 56); +@@ -145,9 +145,9 @@ void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx) + memcpy(&ctx->in[14 * sizeof(uint32_t)], &ctx->bits[0], 4); + memcpy(&ctx->in[15 * sizeof(uint32_t)], &ctx->bits[1], 4); + +- MD5Transform(ctx->buf, (uint32_t *) ctx->in); ++ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); +- memcpy(digest, ctx->buf, MD5LENGTH); ++ memcpy(digest, ctx->buf, UL_MD5LENGTH); + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ + } + +@@ -170,7 +170,7 @@ void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx) + * reflect the addition of 16 longwords of new data. MD5Update blocks + * the data and converts bytes into longwords for this routine. + */ +-void MD5Transform(uint32_t buf[4], uint32_t const in[16]) ++void ul_MD5Transform(uint32_t buf[4], uint32_t const in[16]) + { + register uint32_t a, b, c, d; + +diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c +index c2344114a..19f14ed0d 100644 +--- a/libblkid/src/superblocks/hfs.c ++++ b/libblkid/src/superblocks/hfs.c +@@ -130,19 +130,21 @@ struct hfsplus_vol_header { + + static int hfs_set_uuid(blkid_probe pr, unsigned char const *hfs_info, size_t len) + { +- static unsigned char const hash_init[MD5LENGTH] = { ++ static unsigned char const hash_init[UL_MD5LENGTH] = { + 0xb3, 0xe2, 0x0f, 0x39, 0xf2, 0x92, 0x11, 0xd6, + 0x97, 0xa4, 0x00, 0x30, 0x65, 0x43, 0xec, 0xac + }; +- unsigned char uuid[MD5LENGTH]; +- struct MD5Context md5c; ++ unsigned char uuid[UL_MD5LENGTH]; ++ struct UL_MD5Context md5c; + + if (memcmp(hfs_info, "\0\0\0\0\0\0\0\0", len) == 0) + return -1; +- MD5Init(&md5c); +- MD5Update(&md5c, hash_init, MD5LENGTH); +- MD5Update(&md5c, hfs_info, len); +- MD5Final(uuid, &md5c); ++ ++ ul_MD5Init(&md5c); ++ ul_MD5Update(&md5c, hash_init, UL_MD5LENGTH); ++ ul_MD5Update(&md5c, hfs_info, len); ++ ul_MD5Final(uuid, &md5c); ++ + uuid[6] = 0x30 | (uuid[6] & 0x0f); + uuid[8] = 0x80 | (uuid[8] & 0x3f); + return blkid_probe_set_uuid(pr, uuid); +diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c +index 431bf2064..a374e75c9 100644 +--- a/libuuid/src/gen_uuid.c ++++ b/libuuid/src/gen_uuid.c +@@ -564,15 +564,15 @@ void uuid_generate(uuid_t out) + */ + void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len) + { +- MD5_CTX ctx; +- char hash[MD5LENGTH]; ++ UL_MD5_CTX ctx; ++ char hash[UL_MD5LENGTH]; + +- MD5Init(&ctx); ++ ul_MD5Init(&ctx); + /* hash concatenation of well-known UUID with name */ +- MD5Update(&ctx, ns, sizeof(uuid_t)); +- MD5Update(&ctx, (const unsigned char *)name, len); ++ ul_MD5Update(&ctx, ns, sizeof(uuid_t)); ++ ul_MD5Update(&ctx, (const unsigned char *)name, len); + +- MD5Final((unsigned char *)hash, &ctx); ++ ul_MD5Final((unsigned char *)hash, &ctx); + + memcpy(out, hash, sizeof(uuid_t)); + +diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c +index e6c799d24..fd4227a09 100644 +--- a/misc-utils/mcookie.c ++++ b/misc-utils/mcookie.c +@@ -41,7 +41,7 @@ enum { + }; + + struct mcookie_control { +- struct MD5Context ctx; ++ struct UL_MD5Context ctx; + char **files; + size_t nfiles; + uint64_t maxsz; +@@ -67,12 +67,12 @@ static uint64_t hash_file(struct mcookie_control *ctl, int fd) + r = read_all(fd, (char *) buf, rdsz); + if (r < 0) + break; +- MD5Update(&ctl->ctx, buf, r); ++ ul_MD5Update(&ctl->ctx, buf, r); + count += r; + } + /* Separate files with a null byte */ + buf[0] = '\0'; +- MD5Update(&ctl->ctx, buf, 1); ++ ul_MD5Update(&ctl->ctx, buf, 1); + return count; + } + +@@ -131,7 +131,7 @@ int main(int argc, char **argv) + { + struct mcookie_control ctl = { .verbose = 0 }; + size_t i; +- unsigned char digest[MD5LENGTH]; ++ unsigned char digest[UL_MD5LENGTH]; + unsigned char buf[RAND_BYTES]; + int c; + +@@ -180,14 +180,14 @@ int main(int argc, char **argv) + free(ctl.files); + + random_get_bytes(&buf, RAND_BYTES); +- MD5Update(&ctl.ctx, buf, RAND_BYTES); ++ ul_MD5Update(&ctl.ctx, buf, RAND_BYTES); + if (ctl.verbose) + fprintf(stderr, P_("Got %d byte from %s\n", + "Got %d bytes from %s\n", RAND_BYTES), + RAND_BYTES, random_tell_source()); + +- MD5Final(digest, &ctl.ctx); +- for (i = 0; i < MD5LENGTH; i++) ++ ul_MD5Final(digest, &ctl.ctx); ++ for (i = 0; i < UL_MD5LENGTH; i++) + printf("%02x", digest[i]); + putchar('\n'); + +diff --git a/tests/helpers/test_md5.c b/tests/helpers/test_md5.c +index 471580e12..6f8dec4aa 100644 +--- a/tests/helpers/test_md5.c ++++ b/tests/helpers/test_md5.c +@@ -7,22 +7,22 @@ + int main(void) + { + int i, ret; +- struct MD5Context ctx; +- unsigned char digest[MD5LENGTH]; ++ struct UL_MD5Context ctx; ++ unsigned char digest[UL_MD5LENGTH]; + unsigned char buf[BUFSIZ]; + +- MD5Init( &ctx ); ++ ul_MD5Init( &ctx ); + + while(!feof(stdin) && !ferror(stdin)) { + ret = fread(buf, 1, sizeof(buf), stdin); + if (ret) +- MD5Update( &ctx, buf, ret ); ++ ul_MD5Update( &ctx, buf, ret ); + } + + fclose(stdin); +- MD5Final( digest, &ctx ); ++ ul_MD5Final( digest, &ctx ); + +- for (i = 0; i < MD5LENGTH; i++) ++ for (i = 0; i < UL_MD5LENGTH; i++) + printf( "%02x", digest[i] ); + printf("\n"); + return 0; diff --git a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt3.patch b/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt3.patch new file mode 100644 index 000000000000..2306a210e0be --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt3.patch @@ -0,0 +1,43 @@ +From b4db227582f1d0a14c7b63de8d57e6052b753d57 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 12 Dec 2017 11:38:17 +0100 +Subject: [PATCH] test_sha1: update helper + +Signed-off-by: Karel Zak +--- + tests/helpers/test_sha1.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/helpers/test_sha1.c b/tests/helpers/test_sha1.c +index 5a1972935..ad96da4f0 100644 +--- a/tests/helpers/test_sha1.c ++++ b/tests/helpers/test_sha1.c +@@ -7,22 +7,22 @@ + int main(void) + { + int i, ret; +- SHA1_CTX ctx; +- unsigned char digest[SHA1LENGTH]; ++ UL_SHA1_CTX ctx; ++ unsigned char digest[UL_SHA1LENGTH]; + unsigned char buf[BUFSIZ]; + +- SHA1Init( &ctx ); ++ ul_SHA1Init( &ctx ); + + while(!feof(stdin) && !ferror(stdin)) { + ret = fread(buf, 1, sizeof(buf), stdin); + if (ret) +- SHA1Update( &ctx, buf, ret ); ++ ul_SHA1Update( &ctx, buf, ret ); + } + + fclose(stdin); +- SHA1Final( digest, &ctx ); ++ ul_SHA1Final( digest, &ctx ); + +- for (i = 0; i < SHA1LENGTH; i++) ++ for (i = 0; i < UL_SHA1LENGTH; i++) + printf( "%02x", digest[i] ); + printf("\n"); + return 0; diff --git a/sys-apps/util-linux/util-linux-2.28.2.ebuild b/sys-apps/util-linux/util-linux-2.28.2.ebuild deleted file mode 100644 index ff8f436432d5..000000000000 --- a/sys-apps/util-linux/util-linux-2.28.2.ebuild +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \ - python-single-r1 multilib-minimal systemd - -MY_PV=${PV/_/-} -MY_P=${PN}-${MY_PV} - -if [[ ${PV} == 9999 ]] ; then - inherit git-2 autotools - EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" -else - KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux" - SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" -fi - -DESCRIPTION="Various useful Linux utilities" -HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/" - -LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain" -SLOT="0" -IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode" - -# Most lib deps here are related to programs rather than our libs, -# so we rarely need to specify ${MULTILIB_USEDEP}. -RDEPEND="caps? ( sys-libs/libcap-ng ) - cramfs? ( sys-libs/zlib ) - ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) - slang? ( sys-libs/slang ) - !build? ( systemd? ( sys-apps/systemd ) ) - udev? ( virtual/libudev:= )" -DEPEND="${RDEPEND} - virtual/pkgconfig - nls? ( sys-devel/gettext ) - test? ( sys-devel/bc ) - virtual/os-headers" -RDEPEND+=" - kill? ( - !sys-apps/coreutils[kill] - !sys-process/procps[kill] - ) - !sys-process/schedutils - !sys-apps/setarch - ! "${T}"/fallocate.${ABI}.c - #define _GNU_SOURCE - #include - main() { return fallocate(0, 0, 0, 0); } - EOF - append-lfs-flags - $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \ - || export ac_cv_func_fallocate=no - rm -f "${T}"/fallocate.${ABI}.c -} - -multilib_src_configure() { - lfs_fallocate_test - # The scanf test in a run-time test which fails while cross-compiling. - # Blindly assume a POSIX setup since we require libmount, and libmount - # itself fails when the scanf test fails. #531856 - tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms - export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486 - export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042 - ECONF_SOURCE=${S} \ - econf \ - --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \ - --docdir='${datarootdir}'/doc/${PF} \ - $(multilib_native_use_enable nls) \ - --enable-agetty \ - --with-bashcompletiondir="$(get_bashcompdir)" \ - --enable-bash-completion \ - $(multilib_native_use_enable caps setpriv) \ - --disable-chfn-chsh \ - $(multilib_native_use_enable cramfs) \ - $(multilib_native_use_enable fdformat) \ - --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \ - $(use_enable kill) \ - --disable-login \ - $(multilib_native_use_enable tty-helpers mesg) \ - --disable-nologin \ - --enable-partx \ - $(multilib_native_use_with python) \ - --enable-raw \ - $(multilib_native_use_with readline) \ - --enable-rename \ - --disable-reset \ - --enable-schedutils \ - --disable-su \ - $(multilib_native_use_enable tty-helpers wall) \ - $(multilib_native_use_enable tty-helpers write) \ - $(multilib_native_use_enable suid makeinstall-chown) \ - $(multilib_native_use_enable suid makeinstall-setuid) \ - $(use_with selinux) \ - $(multilib_native_use_with slang) \ - $(use_enable static-libs static) \ - $(multilib_native_use_with systemd) \ - --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \ - $(multilib_native_use_with udev) \ - $(tc-has-tls || echo --disable-tls) -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - # build libraries only - emake -f Makefile -f - mylibs \ - <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)' - fi -} - -multilib_src_test() { - multilib_is_native_abi && emake check -} - -multilib_src_install() { - if multilib_is_native_abi; then - default - else - emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \ - install-pkgconfigDATA install-uuidincHEADERS \ - install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \ - install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS - fi - - if multilib_is_native_abi; then - # need the libs in / - gen_usr_ldscript -a blkid mount smartcols uuid - - use python && python_optimize - fi -} - -multilib_src_install_all() { - dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} - - # e2fsprogs-libs didnt install .la files, and .pc work fine - prune_libtool_files -} - -pkg_postinst() { - if ! use tty-helpers; then - elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." - fi - - if [[ -z ${REPLACING_VERSIONS} ]]; then - elog "The agetty util now clears the terminal by default. You" - elog "might want to add --noclear to your /etc/inittab lines." - fi -} diff --git a/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild deleted file mode 100644 index 3fc8a7465b9d..000000000000 --- a/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \ - pam python-single-r1 multilib-minimal systemd - -MY_PV=${PV/_/-} -MY_P=${PN}-${MY_PV} - -if [[ ${PV} == 9999 ]] ; then - inherit git-2 autotools - EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" -else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux" - SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" -fi - -DESCRIPTION="Various useful Linux utilities" -HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/" - -LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain" -SLOT="0" -IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode" - -# Most lib deps here are related to programs rather than our libs, -# so we rarely need to specify ${MULTILIB_USEDEP}. -RDEPEND="caps? ( sys-libs/libcap-ng ) - cramfs? ( sys-libs/zlib ) - ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) - slang? ( sys-libs/slang ) - !build? ( systemd? ( sys-apps/systemd ) ) - udev? ( virtual/libudev:= )" -DEPEND="${RDEPEND} - virtual/pkgconfig - nls? ( sys-devel/gettext ) - test? ( sys-devel/bc ) - virtual/os-headers" -RDEPEND+=" - kill? ( - !sys-apps/coreutils[kill] - !sys-process/procps[kill] - ) - !sys-process/schedutils - !sys-apps/setarch - ! "${T}"/fallocate.${ABI}.c - #define _GNU_SOURCE - #include - main() { return fallocate(0, 0, 0, 0); } - EOF - append-lfs-flags - $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \ - || export ac_cv_func_fallocate=no - rm -f "${T}"/fallocate.${ABI}.c -} - -multilib_src_configure() { - lfs_fallocate_test - # The scanf test in a run-time test which fails while cross-compiling. - # Blindly assume a POSIX setup since we require libmount, and libmount - # itself fails when the scanf test fails. #531856 - tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms - export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486 - export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042 - - local myeconfargs=( - --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" - --docdir='${datarootdir}'/doc/${PF} - $(multilib_native_use_enable nls) - --enable-agetty - --with-bashcompletiondir="$(get_bashcompdir)" - --enable-bash-completion - $(multilib_native_use_enable caps setpriv) - --disable-chfn-chsh - $(multilib_native_use_enable cramfs) - $(multilib_native_use_enable fdformat) - $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') - $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') - $(usex ncurses '' '--without-tinfo') - $(use_enable unicode widechar) - $(use_enable kill) - --disable-login - $(multilib_native_use_enable tty-helpers mesg) - --disable-nologin - --enable-partx - $(multilib_native_use_with python) - --enable-raw - $(multilib_native_use_with readline) - --enable-rename - --disable-reset - --enable-schedutils - --disable-su - $(multilib_native_use_enable tty-helpers wall) - $(multilib_native_use_enable tty-helpers write) - $(multilib_native_use_enable suid makeinstall-chown) - $(multilib_native_use_enable suid makeinstall-setuid) - $(use_with selinux) - $(multilib_native_use_with slang) - $(use_enable static-libs static) - $(multilib_native_use_with systemd) - --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") - $(multilib_native_use_with udev) - $(tc-has-tls || echo --disable-tls) - ) - ECONF_SOURCE=${S} \ - econf "${myeconfargs[@]}" -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - # build libraries only - emake -f Makefile -f - mylibs \ - <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)' - fi -} - -multilib_src_test() { - multilib_is_native_abi && emake check -} - -multilib_src_install() { - if multilib_is_native_abi; then - default - else - emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \ - install-pkgconfigDATA install-uuidincHEADERS \ - install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \ - install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS - fi - - if multilib_is_native_abi; then - # need the libs in / - gen_usr_ldscript -a blkid mount smartcols uuid - - use python && python_optimize - fi -} - -multilib_src_install_all() { - dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} - - # e2fsprogs-libs didnt install .la files, and .pc work fine - prune_libtool_files - - if use pam; then - newpamd "${FILESDIR}/runuser.pamd" runuser - newpamd "${FILESDIR}/runuser-l.pamd" runuser-l - fi -} - -pkg_postinst() { - if ! use tty-helpers; then - elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." - fi - - if [[ -z ${REPLACING_VERSIONS} ]]; then - elog "The agetty util now clears the terminal by default. You" - elog "might want to add --noclear to your /etc/inittab lines." - fi -} diff --git a/sys-apps/util-linux/util-linux-2.30.1.ebuild b/sys-apps/util-linux/util-linux-2.30.1.ebuild deleted file mode 100644 index c8d83a120f7f..000000000000 --- a/sys-apps/util-linux/util-linux-2.30.1.ebuild +++ /dev/null @@ -1,201 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) - -inherit ltprune toolchain-funcs libtool flag-o-matic bash-completion-r1 \ - pam python-single-r1 multilib-minimal systemd - -MY_PV="${PV/_/-}" -MY_P="${PN}-${MY_PV}" - -if [[ ${PV} == 9999 ]] ; then - inherit git-r3 autotools - EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" -else - [[ "${PV}" = *_rc* ]] || \ - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux" - SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" -fi - -DESCRIPTION="Various useful Linux utilities" -HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/" - -LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain" -SLOT="0" -IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode" - -# Most lib deps here are related to programs rather than our libs, -# so we rarely need to specify ${MULTILIB_USEDEP}. -RDEPEND="caps? ( sys-libs/libcap-ng ) - cramfs? ( sys-libs/zlib ) - ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) - slang? ( sys-libs/slang ) - !build? ( systemd? ( sys-apps/systemd ) ) - udev? ( virtual/libudev:= )" -DEPEND="${RDEPEND} - virtual/pkgconfig - nls? ( sys-devel/gettext ) - test? ( sys-devel/bc ) - virtual/os-headers" -RDEPEND+=" - kill? ( - !sys-apps/coreutils[kill] - !sys-process/procps[kill] - ) - !sys-process/schedutils - !sys-apps/setarch - ! "${T}"/fallocate.${ABI}.c - #define _GNU_SOURCE - #include - main() { return fallocate(0, 0, 0, 0); } - EOF - append-lfs-flags - $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \ - || export ac_cv_func_fallocate=no - rm -f "${T}"/fallocate.${ABI}.c -} - -multilib_src_configure() { - lfs_fallocate_test - # The scanf test in a run-time test which fails while cross-compiling. - # Blindly assume a POSIX setup since we require libmount, and libmount - # itself fails when the scanf test fails. #531856 - tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms - export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486 - export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042 - - local myeconfargs=( - --disable-chfn-chsh - --disable-login - --disable-nologin - --disable-reset - --disable-su - --docdir='${datarootdir}'/doc/${PF} - --enable-agetty - --enable-bash-completion - --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" - --enable-line - --enable-partx - --enable-raw - --enable-rename - --enable-schedutils - --with-bashcompletiondir="$(get_bashcompdir)" - --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no") - $(multilib_native_use_enable caps setpriv) - $(multilib_native_use_enable cramfs) - $(multilib_native_use_enable fdformat) - $(multilib_native_use_enable nls) - $(multilib_native_use_enable suid makeinstall-chown) - $(multilib_native_use_enable suid makeinstall-setuid) - $(multilib_native_use_enable tty-helpers mesg) - $(multilib_native_use_enable tty-helpers wall) - $(multilib_native_use_enable tty-helpers write) - $(multilib_native_use_with python) - $(multilib_native_use_with readline) - $(multilib_native_use_with slang) - $(multilib_native_use_with systemd) - $(multilib_native_use_with udev) - $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') - $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') - $(tc-has-tls || echo --disable-tls) - $(use_enable unicode widechar) - $(use_enable kill) - $(use_enable static-libs static) - $(use_with selinux) - $(usex ncurses '' '--without-tinfo') - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - # build libraries only - emake -f Makefile -f - mylibs \ - <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)' - fi -} - -multilib_src_test() { - multilib_is_native_abi && emake check -} - -multilib_src_install() { - if multilib_is_native_abi; then - default - else - emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \ - install-pkgconfigDATA install-uuidincHEADERS \ - install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \ - install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS - fi - - if multilib_is_native_abi; then - # need the libs in / - gen_usr_ldscript -a blkid mount smartcols uuid - - use python && python_optimize - fi -} - -multilib_src_install_all() { - dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} - - # e2fsprogs-libs didnt install .la files, and .pc work fine - prune_libtool_files - - if use pam; then - newpamd "${FILESDIR}/runuser.pamd" runuser - newpamd "${FILESDIR}/runuser-l.pamd" runuser-l - fi -} - -pkg_postinst() { - if ! use tty-helpers; then - elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." - fi - - if [[ -z ${REPLACING_VERSIONS} ]]; then - elog "The agetty util now clears the terminal by default. You" - elog "might want to add --noclear to your /etc/inittab lines." - fi -} diff --git a/sys-apps/util-linux/util-linux-2.31-r1.ebuild b/sys-apps/util-linux/util-linux-2.31-r1.ebuild new file mode 100644 index 000000000000..8b029289f46e --- /dev/null +++ b/sys-apps/util-linux/util-linux-2.31-r1.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \ + pam python-single-r1 multilib-minimal systemd + +MY_PV="${PV/_/-}" +MY_P="${PN}-${MY_PV}" + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 autotools + EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" +else + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux" + SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" +fi + +DESCRIPTION="Various useful Linux utilities" +HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/" + +LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain" +SLOT="0" +IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode" + +# Most lib deps here are related to programs rather than our libs, +# so we rarely need to specify ${MULTILIB_USEDEP}. +RDEPEND="caps? ( sys-libs/libcap-ng ) + cramfs? ( sys-libs/zlib ) + ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] ) + pam? ( sys-libs/pam ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) + slang? ( sys-libs/slang ) + !build? ( systemd? ( sys-apps/systemd ) ) + udev? ( virtual/libudev:= )" +DEPEND="${RDEPEND} + virtual/pkgconfig + nls? ( sys-devel/gettext ) + test? ( sys-devel/bc ) + virtual/os-headers" +RDEPEND+=" + kill? ( + !sys-apps/coreutils[kill] + !sys-process/procps[kill] + ) + !net-wireless/rfkill + !sys-process/schedutils + !sys-apps/setarch + ! "${T}"/fallocate.${ABI}.c + #define _GNU_SOURCE + #include + main() { return fallocate(0, 0, 0, 0); } + EOF + append-lfs-flags + $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \ + || export ac_cv_func_fallocate=no + rm -f "${T}"/fallocate.${ABI}.c +} + +multilib_src_configure() { + lfs_fallocate_test + # The scanf test in a run-time test which fails while cross-compiling. + # Blindly assume a POSIX setup since we require libmount, and libmount + # itself fails when the scanf test fails. #531856 + tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms + export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486 + export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042 + + local myeconfargs=( + --disable-chfn-chsh + --disable-login + --disable-nologin + --disable-su + --docdir='${datarootdir}'/doc/${PF} + --enable-agetty + --enable-bash-completion + --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" + --enable-line + --enable-partx + --enable-raw + --enable-rename + --enable-rfkill + --enable-schedutils + --with-bashcompletiondir="$(get_bashcompdir)" + --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no") + $(multilib_native_use_enable caps setpriv) + $(multilib_native_use_enable cramfs) + $(multilib_native_use_enable fdformat) + $(multilib_native_use_enable nls) + $(multilib_native_use_enable suid makeinstall-chown) + $(multilib_native_use_enable suid makeinstall-setuid) + $(multilib_native_use_enable tty-helpers mesg) + $(multilib_native_use_enable tty-helpers wall) + $(multilib_native_use_enable tty-helpers write) + $(multilib_native_use_with python) + $(multilib_native_use_with readline) + $(multilib_native_use_with slang) + $(multilib_native_use_with systemd) + $(multilib_native_use_with udev) + $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') + $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') + $(tc-has-tls || echo --disable-tls) + $(use_enable unicode widechar) + $(use_enable kill) + $(use_enable static-libs static) + $(use_with selinux) + $(usex ncurses '' '--without-tinfo') + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + # build libraries only + emake -f Makefile -f - mylibs \ + <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)' + fi +} + +multilib_src_test() { + multilib_is_native_abi && emake check +} + +multilib_src_install() { + if multilib_is_native_abi; then + default + else + emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \ + install-pkgconfigDATA install-uuidincHEADERS \ + install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \ + install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS + fi + + if multilib_is_native_abi; then + # need the libs in / + gen_usr_ldscript -a blkid mount smartcols uuid + + use python && python_optimize + fi +} + +multilib_src_install_all() { + dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} + + # e2fsprogs-libs didnt install .la files, and .pc work fine + find "${ED}" -name "*.la" -delete || die + + if use pam; then + newpamd "${FILESDIR}/runuser.pamd" runuser + newpamd "${FILESDIR}/runuser-l.pamd" runuser-l + fi +} + +pkg_postinst() { + if ! use tty-helpers; then + elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." + fi + + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "The agetty util now clears the terminal by default. You" + elog "might want to add --noclear to your /etc/inittab lines." + fi +} -- cgit v1.2.3