From 5cfef3c94cd7e82136c69a0322f5ba21f7e64632 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 19 Apr 2018 14:14:48 +0100 Subject: gentoo resync : 19.04.2018 --- sys-apps/rng-tools/Manifest | 3 +- ...ools-6.1-fix-nistbeacon-validation-on-x86.patch | 45 ++++++++++++++++ sys-apps/rng-tools/rng-tools-6.1-r1.ebuild | 60 --------------------- sys-apps/rng-tools/rng-tools-6.1-r2.ebuild | 61 ++++++++++++++++++++++ 4 files changed, 108 insertions(+), 61 deletions(-) create mode 100644 sys-apps/rng-tools/files/rng-tools-6.1-fix-nistbeacon-validation-on-x86.patch delete mode 100644 sys-apps/rng-tools/rng-tools-6.1-r1.ebuild create mode 100644 sys-apps/rng-tools/rng-tools-6.1-r2.ebuild (limited to 'sys-apps/rng-tools') diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest index 6f8d62b26e7b..f55fe769c773 100644 --- a/sys-apps/rng-tools/Manifest +++ b/sys-apps/rng-tools/Manifest @@ -3,6 +3,7 @@ AUX rng-tools-5-fix-textrels-on-PIC-x86.patch 2677 BLAKE2B af3911de5a8d7c91bc8a3 AUX rng-tools-5-man-fill-watermark.patch 765 BLAKE2B 1e99d4961ba0e132fac5fbc7d5794ff638497662c0f9b16810d42428eb7fbdaa5dfe657ac961115587db2acf0672e67387077a317fe2afdc7eabdd4d1eb83e92 SHA512 8bc7a9903f9f77da2d55321605a2421bef27d8cedd3ea67e5547f4e59b85b3139b3cf269efe4c3abd767d87666e3e28b03e4fbf6984122febf45ea14af3332a0 AUX rng-tools-5-man-rng-device.patch 398 BLAKE2B 6781f201e9c87143aa56dbb35702e95441cdfc304233be40d9f28c929c18f955d710b32128eede20bee71bab789bc72318cd71af294c2e6bc6d721882c3d030c SHA512 cd4c0cbcc32f6ace0f05c0dca82461c2a676a986c000850a422c3b509d79f22ddb98732749e63a1d9ec6d90db1745b7a163a590ada61f0ebcdde07b160647d3f AUX rng-tools-6-fix-noctty.patch 2188 BLAKE2B 73eebe43b950e0ef261208c073f5b6c0fee6b4cabd216373c0973de61604c936200943a4b0574533ec3cacee8701253de55f5d6a730765fcadc9a6e099eed3b6 SHA512 dff3d3ef81e847d378ca45531e4eaa81f4028b2b08adc17c68bba108cb4604f3bf13daa8b0e46ccb8aec2626ff8fd983038544508f3117828cecfbb282762116 +AUX rng-tools-6.1-fix-nistbeacon-validation-on-x86.patch 1615 BLAKE2B 63b8e975bcff85d0990d8ffe172b394167083fb95c0a9425425dd0b9aeb84a5c7265cc3181451b299cbbc7b965b957f472e18d7f1c109c38a564819581d863da SHA512 44a23471ba5dec1da76d4ff9ff77caa83a26fdebabcfbf561bc87ab838885a55a6fac7e31b64798e5ed0f67c4a47da03961a150efa7bb5ec4eebfc4889a21784 AUX rngd-confd-4.1 562 BLAKE2B 8fe0147a1f9e67541c709f793ed1f34ed173204739973abbb1df629fb79ebf47d78c7d2e0f1aa9a867aff1f77133271325e2dbb2bfe5440921f5c16c2f0e8e5b SHA512 45e0e9cbe0180162f659bf05c15ee99fb8c1b80274cd8744384ba7f791b1c9a46a63e81eea665b4f492c13b7d5cc1fdb6e524a49a25af77f3791f527b31f688b AUX rngd-initd-6 481 BLAKE2B 0642727e7dfb7cafcca269ce2b559880743f85402c5df26f28dd144766c8f5c0661d5a4d563d121550bec31c1ae103a4b6169ec5143ab895a7e1b7cf5bc77f0d SHA512 d15b462aa333bd0d64fa827626fa953d30cadce861dfc070598218104f072ffad26d88531d48bd22b5d627dc4fe8560a2808cc9e2e27310dcd74a6efad8a9baf AUX rngd-initd-r1-4.1 494 BLAKE2B 1f11526717fcc9b88125e89474e1f06fc11621435811f4997e9e6197f634794df681ef698ab08d3f7c610dfb47c156231a157cfda05c804a6293a27dc276322f SHA512 8bf9a0bd25bcc9c1cc4eacdf875077208ba0899c626a55e57f055cc93b62e23a427e0622859c5b4a31c3aebe550b180777528b43942a3efb2e2c0b4243c3c9c6 @@ -13,5 +14,5 @@ DIST rng-tools-6.1.tar.gz 29814 BLAKE2B 4102c03ced36b33f9db6f7e5f77e8f918c4b9286 DIST rng-tools-6.tar.gz 26024 BLAKE2B a523328fcce56997e2847940cdc096abd5a539135f857f0a4cd3d782a1659f4d2978870149caac47b839c80788df6a3d891adcd39371d5968149dd29bc46bc62 SHA512 2aea947c4dba5e8c4df33396957f7224b62200be0e3d10aac08c84155fa473a67df5f49e07a07b2cbea4dfd772d90c1b194e8fce3d8eea762463a7f4a16d6ce4 EBUILD rng-tools-5-r2.ebuild 1098 BLAKE2B b9cd42d86a00f766dcf81fb4e3e5f1346c2ffcc3722a97d4508b89a3ee60be4fe6112ef0b624b270c9be12af50fd0b9c838725740f1c89cff9513d2c476797f3 SHA512 b4a612e14a4e556c57c182a5e709bf497eb11c2b9ca850ca1dd32f94c313157d3273b02715eef907b570d5aaaa06e9786ce33f9085f83423d61fb5af4bbe1b52 EBUILD rng-tools-6-r1.ebuild 1109 BLAKE2B f3411983c54dd734685ed56d41cfc2b36b1cd1ca00716b3e8b0de30227cabc59e18d3cf7cfcf8cb18bf3f8398b18a5907d0bf7669828ae7666f0b20f7c191eaf SHA512 dd9cecec2238e7fd8d1ea332e11f10dcd0fc8e4aa545fda6a4f3eae0807b273529ef40b5ebc76426b1feb5d9253ef37f2626d93a8a7e5380290d9944b0143e20 -EBUILD rng-tools-6.1-r1.ebuild 1222 BLAKE2B 1788cac0312cdc1508cd225b4c440d5965dc2f817ad4991eed0ef99a432b3655253a4ce98567a1fab6327bba7221fc6f447a034d0d47ea437753db3015dc7ba1 SHA512 c7f14868478183f9617bdada2c5b92bdbf87daf81c453cfc6cada445dd9ea437beaac8ddedd50452a6b802a63955eae3eb8516b14f680149ee69d6ddea9af3b3 +EBUILD rng-tools-6.1-r2.ebuild 1286 BLAKE2B 651e7ad6ccc1b47abf9829eff864e0a41711402b454bf33c7002bf93f322de14dd0b7b5b57ca9eba4afdb3a0fc501a7d79d2b494cf6e0d14b6a62bcc1f38ce73 SHA512 af5f213c593432a351bd7f07e5d7816151d812c3679fb523c92ce5941e942e6e410e2088eb287c11a5076ddd24dcb183ffaa248b716c2c91d81b876909576c95 MISC metadata.xml 576 BLAKE2B 3a93712adab793447235d55c03b6d3a652bb728ddbbc1dd118f8143ed194e7597828a830bf0612e17a43e82d4433b9a0240de85116b1ba4626e54ac572264be9 SHA512 306d4b47230443cf82abd2c7e934b8fab73e695305a8981d3c011cbc2bbb193a87ae7a9c265a56c0454f4c0103f136211a4aabc2e35e030107b5ab2ac457c6e3 diff --git a/sys-apps/rng-tools/files/rng-tools-6.1-fix-nistbeacon-validation-on-x86.patch b/sys-apps/rng-tools/files/rng-tools-6.1-fix-nistbeacon-validation-on-x86.patch new file mode 100644 index 000000000000..1872444bc4a8 --- /dev/null +++ b/sys-apps/rng-tools/files/rng-tools-6.1-fix-nistbeacon-validation-on-x86.patch @@ -0,0 +1,45 @@ +From e8d7ea04e39f1209a79c003f3b62c9f1761dec0e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=B6kt=C3=BCrk=20Y=C3=BCksek?= +Date: Thu, 19 Apr 2018 05:29:01 -0400 +Subject: [PATCH] rngd_nistbeacon: fix the size of frequency and timestamp on + x86_32 + +The members "frequency" and "timestamp" of struct nist_data_block are +defined as int and long, respectively. On x86_64, their sizes +correctly correspond to 4 and 8 bytes. However, on 32-bit x86 +architectures, both int and long are defined as 4 bytes, causing the +digest verification to fail. Fix it by using uint32_t and uint64_t +explicitly. +--- + rngd_nistbeacon.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/rngd_nistbeacon.c b/rngd_nistbeacon.c +index fbebc53..eadde39 100644 +--- a/rngd_nistbeacon.c ++++ b/rngd_nistbeacon.c +@@ -97,8 +97,8 @@ BIO *bfp; + + struct nist_data_block { + char *version; +- int frequency; +- long timestamp; ++ uint32_t frequency; ++ uint64_t timestamp; + char *seedvalue; + size_t seedvaluelen; + char *previoushash; +@@ -355,8 +355,8 @@ static int validate_nist_block() + + + EVP_VerifyUpdate(mdctx, block.version, strlen(block.version)); +- EVP_VerifyUpdate(mdctx, &block.frequency, sizeof(int)); +- EVP_VerifyUpdate(mdctx, &block.timestamp, sizeof(long)); ++ EVP_VerifyUpdate(mdctx, &block.frequency, sizeof(uint32_t)); ++ EVP_VerifyUpdate(mdctx, &block.timestamp, sizeof(uint64_t)); + EVP_VerifyUpdate(mdctx, block.seedvalue, block.seedvaluelen); + EVP_VerifyUpdate(mdctx, block.previoushash, block.previoushashlen); + EVP_VerifyUpdate(mdctx, &block.errorcode, block.errorcodelen); +-- +2.13.6 + diff --git a/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild b/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild deleted file mode 100644 index 2c149789b757..000000000000 --- a/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools systemd toolchain-funcs - -DESCRIPTION="Daemon to use hardware random number generators" -HOMEPAGE="https://github.com/nhorman/rng-tools" -SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86" -IUSE="nistbeacon selinux" - -DEPEND="dev-libs/libgcrypt:0 - dev-libs/libgpg-error - nistbeacon? ( - net-misc/curl[ssl] - dev-libs/libxml2:2= - dev-libs/openssl:0= - ) -" -RDEPEND="${DEPEND} - sys-fs/sysfsutils - selinux? ( sec-policy/selinux-rngd )" -DEPEND="${DEPEND} - nistbeacon? ( - virtual/pkgconfig - ) -" - -PATCHES=( - "${FILESDIR}"/test-for-argp.patch - "${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962 -) - -src_prepare() { - echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die - default - - mv README.md README || die - - eautoreconf - - sed -i '/^AR /d' Makefile.in || die - tc-export AR -} - -src_configure() { - econf $(use_with nistbeacon) -} - -src_install() { - default - newinitd "${FILESDIR}"/rngd-initd-6 rngd - newconfd "${FILESDIR}"/rngd-confd-4.1 rngd - systemd_dounit "${FILESDIR}"/rngd.service -} diff --git a/sys-apps/rng-tools/rng-tools-6.1-r2.ebuild b/sys-apps/rng-tools/rng-tools-6.1-r2.ebuild new file mode 100644 index 000000000000..607a19b11e2b --- /dev/null +++ b/sys-apps/rng-tools/rng-tools-6.1-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd toolchain-funcs + +DESCRIPTION="Daemon to use hardware random number generators" +HOMEPAGE="https://github.com/nhorman/rng-tools" +SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86" +IUSE="nistbeacon selinux" + +DEPEND="dev-libs/libgcrypt:0 + dev-libs/libgpg-error + nistbeacon? ( + net-misc/curl[ssl] + dev-libs/libxml2:2= + dev-libs/openssl:0= + ) +" +RDEPEND="${DEPEND} + sys-fs/sysfsutils + selinux? ( sec-policy/selinux-rngd )" +DEPEND="${DEPEND} + nistbeacon? ( + virtual/pkgconfig + ) +" + +PATCHES=( + "${FILESDIR}"/test-for-argp.patch + "${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962 + "${FILESDIR}"/${PN}-6.1-fix-nistbeacon-validation-on-x86.patch +) + +src_prepare() { + echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die + default + + mv README.md README || die + + eautoreconf + + sed -i '/^AR /d' Makefile.in || die + tc-export AR +} + +src_configure() { + econf $(use_with nistbeacon) +} + +src_install() { + default + newinitd "${FILESDIR}"/rngd-initd-6 rngd + newconfd "${FILESDIR}"/rngd-confd-4.1 rngd + systemd_dounit "${FILESDIR}"/rngd.service +} -- cgit v1.2.3