Browse Source

Sync with portage [Wed May 12 09:02:30 MSK 2021].

tags/1962
Calculate Linux 4 months ago
parent
commit
ec317abbd6
100 changed files with 2968 additions and 3429 deletions
  1. BIN
      Manifest.files.gz
  2. BIN
      app-admin/Manifest.gz
  3. +1
    -1
      app-admin/conky/conky-1.12.1-r1.ebuild
  4. +3
    -0
      app-admin/filebeat/Manifest
  5. +1076
    -0
      app-admin/filebeat/filebeat-7.12.1.ebuild
  6. +1
    -0
      app-admin/github-backup-utils/Manifest
  7. +56
    -0
      app-admin/github-backup-utils/github-backup-utils-3.0.0.ebuild
  8. +2
    -0
      app-admin/logstash-bin/Manifest
  9. +88
    -0
      app-admin/logstash-bin/logstash-bin-7.12.1.ebuild
  10. +1
    -3
      app-admin/syslog-ng/Manifest
  11. +0
    -320
      app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch
  12. +0
    -63
      app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch
  13. +0
    -170
      app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild
  14. +0
    -171
      app-admin/syslog-ng/syslog-ng-3.28.1-r2.ebuild
  15. +2
    -1
      app-admin/syslog-ng/syslog-ng-3.31.2.ebuild
  16. BIN
      app-arch/Manifest.gz
  17. +1
    -1
      app-arch/rpm2targz/rpm2targz-2021.03.16.ebuild
  18. +1
    -1
      app-arch/unzip/unzip-6.0_p26.ebuild
  19. BIN
      app-emulation/Manifest.gz
  20. +7
    -9
      app-emulation/xen-tools/Manifest
  21. +28
    -18
      app-emulation/xen-tools/files/gentoo-patches.conf
  22. +0
    -512
      app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
  23. +0
    -512
      app-emulation/xen-tools/xen-tools-4.13.2-r3.ebuild
  24. +2
    -2
      app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild
  25. +0
    -512
      app-emulation/xen-tools/xen-tools-4.14.1-r1.ebuild
  26. +0
    -512
      app-emulation/xen-tools/xen-tools-4.14.1.ebuild
  27. +15
    -10
      app-emulation/xen-tools/xen-tools-4.14.2.ebuild
  28. +32
    -20
      app-emulation/xen-tools/xen-tools-4.15.0.ebuild
  29. +3
    -7
      app-emulation/xen/Manifest
  30. +38
    -0
      app-emulation/xen/files/xen-4.15-efi.patch
  31. +0
    -165
      app-emulation/xen/xen-4.13.2-r5.ebuild
  32. +0
    -165
      app-emulation/xen/xen-4.13.2-r6.ebuild
  33. +0
    -165
      app-emulation/xen/xen-4.14.1-r2.ebuild
  34. +6
    -2
      app-emulation/xen/xen-4.14.2.ebuild
  35. +7
    -3
      app-emulation/xen/xen-4.15.0.ebuild
  36. BIN
      app-misc/Manifest.gz
  37. +1
    -0
      app-misc/elasticsearch/Manifest
  38. +82
    -0
      app-misc/elasticsearch/elasticsearch-7.12.1.ebuild
  39. BIN
      app-portage/Manifest.gz
  40. +1
    -1
      app-portage/elt-patches/elt-patches-20201205.ebuild
  41. +1
    -1
      app-portage/gentoolkit/gentoolkit-0.5.1.ebuild
  42. BIN
      app-text/Manifest.gz
  43. +12
    -0
      app-text/pandoc/files/pandoc-2.13-trypandoc.patch
  44. +2
    -0
      app-text/pandoc/pandoc-2.13.ebuild
  45. BIN
      dev-db/Manifest.gz
  46. +1
    -1
      dev-db/myodbc/myodbc-8.0.24-r1.ebuild
  47. +1
    -1
      dev-db/mysql-connector-c++/mysql-connector-c++-8.0.24.ebuild
  48. BIN
      dev-haskell/Manifest.gz
  49. +1
    -0
      dev-haskell/semirings/Manifest
  50. +34
    -0
      dev-haskell/semirings/semirings-0.5.4.ebuild
  51. BIN
      dev-java/Manifest.gz
  52. +1
    -1
      dev-java/assertj-core/assertj-core-2.3.0.ebuild
  53. +1
    -1
      dev-java/junitparams/junitparams-1.1.1.ebuild
  54. BIN
      dev-lang/Manifest.gz
  55. +7
    -20
      dev-lang/ferite/ferite-1.1.17-r1.ebuild
  56. +62
    -0
      dev-lang/ferite/files/ferite-1.1.17-bool.patch
  57. +569
    -0
      dev-lang/ferite/files/ferite-1.1.17-slibtool.patch
  58. +4
    -0
      dev-lang/gnat-gpl/Manifest
  59. +41
    -0
      dev-lang/gnat-gpl/files/gnat-gpl-2020-gentoo.patch
  60. +140
    -0
      dev-lang/gnat-gpl/gnat-gpl-2020.ebuild
  61. +2
    -0
      dev-lang/gnat-gpl/metadata.xml
  62. +1
    -1
      dev-lang/php/php-7.3.28.ebuild
  63. +1
    -1
      dev-lang/php/php-7.4.19.ebuild
  64. BIN
      dev-libs/Manifest.gz
  65. +8
    -0
      dev-libs/apr/apr-1.6.3-r5.ebuild
  66. +8
    -0
      dev-libs/apr/apr-1.6.5-r2.ebuild
  67. +8
    -0
      dev-libs/apr/apr-1.7.0-r2.ebuild
  68. +1
    -1
      dev-libs/efl/efl-1.25.1-r11.ebuild
  69. +1
    -0
      dev-libs/elfutils/Manifest
  70. +86
    -0
      dev-libs/elfutils/elfutils-0.184.ebuild
  71. +1
    -0
      dev-libs/glib/Manifest
  72. +288
    -0
      dev-libs/glib/glib-2.68.2.ebuild
  73. +1
    -1
      dev-libs/libpcre2/libpcre2-10.36-r1.ebuild
  74. +1
    -0
      dev-libs/librdkafka/Manifest
  75. +97
    -0
      dev-libs/librdkafka/librdkafka-1.7.0.ebuild
  76. +1
    -1
      dev-libs/libusb-compat/libusb-compat-0.1.5-r3.ebuild
  77. +1
    -1
      dev-libs/libvoikko/libvoikko-4.3.1.ebuild
  78. +1
    -1
      dev-libs/voikko-fi/voikko-fi-2.4.ebuild
  79. +1
    -1
      dev-perl/B-Hooks-OP-Check/B-Hooks-OP-Check-0.220.0-r1.ebuild
  80. +1
    -1
      dev-perl/Class-Method-Modifiers/Class-Method-Modifiers-2.130.0.ebuild
  81. +1
    -1
      dev-perl/Crypt-CBC/Crypt-CBC-3.30.0.ebuild
  82. +29
    -0
      dev-perl/Crypt-OpenSSL-Guess/Crypt-OpenSSL-Guess-0.130.0.ebuild
  83. +1
    -0
      dev-perl/Crypt-OpenSSL-Guess/Manifest
  84. +1
    -1
      dev-perl/Crypt-PBKDF2/Crypt-PBKDF2-0.161.520.ebuild
  85. +2
    -2
      dev-perl/Crypt-PasswdMD5/Crypt-PasswdMD5-1.400.0-r1.ebuild
  86. +26
    -0
      dev-perl/Crypt-PasswdMD5/Crypt-PasswdMD5-1.410.0.ebuild
  87. +1
    -0
      dev-perl/Crypt-PasswdMD5/Manifest
  88. +0
    -20
      dev-perl/Crypt-Primes/Crypt-Primes-0.500.0-r1.ebuild
  89. +1
    -1
      dev-perl/Crypt-Primes/Crypt-Primes-0.500.0-r2.ebuild
  90. +0
    -17
      dev-perl/Crypt-RC4/Crypt-RC4-2.020.0-r1.ebuild
  91. +1
    -1
      dev-perl/Crypt-RC4/Crypt-RC4-2.20.0-r2.ebuild
  92. +1
    -1
      dev-perl/Crypt-RIPEMD160/Crypt-RIPEMD160-0.60.0-r1.ebuild
  93. +27
    -0
      dev-perl/Crypt-RIPEMD160/Crypt-RIPEMD160-0.80.0.ebuild
  94. +1
    -0
      dev-perl/Crypt-RIPEMD160/Manifest
  95. +2
    -2
      dev-perl/Crypt-RSA/Crypt-RSA-1.990.0-r2.ebuild
  96. +1
    -1
      dev-perl/Crypt-Rijndael/Crypt-Rijndael-1.150.0.ebuild
  97. +30
    -0
      dev-perl/Crypt-Rijndael/Crypt-Rijndael-1.160.0.ebuild
  98. +1
    -0
      dev-perl/Crypt-Rijndael/Manifest
  99. +1
    -1
      dev-perl/CryptX/CryptX-0.72.0.ebuild
  100. +1
    -1
      dev-perl/Digest-SHA3/Digest-SHA3-1.40.0.ebuild

BIN
Manifest.files.gz View File


BIN
app-admin/Manifest.gz View File


+ 1
- 1
app-admin/conky/conky-1.12.1-r1.ebuild View File

@@ -13,7 +13,7 @@ SRC_URI="https://github.com/brndnmtthws/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.

LICENSE="GPL-3 BSD LGPL-2.1 MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha ~amd64 ~arm ppc ppc64 ~sparc x86"
IUSE="apcupsd bundled-toluapp cmus curl doc hddtemp ical iconv imlib iostats
ipv6 irc lua-cairo lua-imlib lua-rsvg math moc mpd mysql nano-syntax
ncurses nvidia +portmon pulseaudio rss systemd thinkpad truetype


+ 3
- 0
app-admin/filebeat/Manifest View File

@@ -31,6 +31,7 @@ DIST code.cloudfoundry.org%2Frfc5424%2F@v%2Fv0.0.0-20180905210152-236a6d29298a.z
DIST dmitri.shuralyov.com%2Fgpu%2Fmtl%2F@v%2Fv0.0.0-20190408044501-666a987793e9.mod 36 BLAKE2B b430ef9388b0dfe932b201495a00275a6036338c99160d7362556be1e25924584b0802061d193533f23b1f76719dfd6a9484572babd25f1af0e53fd9bf07ac00 SHA512 196affe091247f94ceda4b56629bd62d4ee2b397f2c0f56c9534c02e43531b46705ad33543b58c1a4fc7a48e25e5923db087fe0485a93966a4086581c0d1d3e1
DIST filebeat-7.10.2.tar.gz 87244727 BLAKE2B 77e5967d4ee6b5390ebe19c3c9de9e5cbf6b8d5ffd1c81e2e72a8c3ae6e1aad146f0b5496816785893a51ea77b1ec3fbd050d9f2b54fd2c95ad2228d5a5b5e04 SHA512 eba0cda8521068f4d15dfb39808695a8de47a568e4d11949746a8f698aaff6825848d5e524bd16b0e555786e277512014dfe33d4daee8c3acef9a9867653c1c3
DIST filebeat-7.12.0.tar.gz 94231781 BLAKE2B 3e90888bbf204c8e96066f894ba211feb893d89915dbad9ab023dd7a12551c3f1f839b1d266170637646b1cdfbed3652abae09e5b97babb68efa429fc7b3a682 SHA512 46049bf6e98bc7f29bd312f39afa185fcaec9d11bd7349ab58b2a21095dda25c0dafabaaefe618a47e084191ed8c1a24bc7e7ead32628c15934f8aeffe2e3c81
DIST filebeat-7.12.1.tar.gz 94237879 BLAKE2B 7f7c1ed0ded8bc52b1830d3448d910bae5b2e775a9b1264271a8e3420fa95d0e4c1e7ee3545d198583af2b90b390f3f8bca0c871ca2ecdd077fcbe284648ba42 SHA512 3e2c49ddab59461f82abc5e3ea0f12941f2ed73a6f23c2f062ec88c85d577ce2b5efb234a110e62e9949490bec4f355f3118508572b93883adc7122d76d33cb1
DIST filebeat-7.9.3.tar.gz 82872010 BLAKE2B e437905a13e556e1bec9b59a8837eb4649f063e4ddb9815a3e18efdc291758e39b5abc0465295f8526f042aecdfc2b8e49ebb6980aeb8b3b13be9d4431863401 SHA512 35c2c8038f0f540e467feef341f3248eadda5e5b1a80c247bcd54c073153a7839f797be327b65c4eee255f4d656e36c57d112b7ff0e637342ccc13f4f59366d7
DIST github.com%2F!azure%2Fazure-amqp-common-go%2Fv3%2F@v%2Fv3.0.0.mod 372 BLAKE2B 80a7e0aac984acb79239b3309290cd8ef1eeca8d9f53b3c91628cbe6dd112706d2313c47e33ac52ea9e8a6417289dacae8e2e72a03e679836d3ed89cb86c0aee SHA512 6db1a52bbab1332ab7e761532cb110394afa1dd69cc5f7443c3fb733c7d95fa712cf6bf8a78fc3f51d89b2d368a248e532bab06bc93e2e663b8f836c91aef0de
DIST github.com%2F!azure%2Fazure-amqp-common-go%2Fv3%2F@v%2Fv3.0.0.zip 29788 BLAKE2B c1e493471bca24ac64c8119e624ea077a74678a492b036deb907ede12b5e93c3ef699820cb2ec9468a98d00e83d84c6bb45cf274b4812a0f319a0248610a4d2c SHA512 a412fbe597ab0c47223d733303ed2277656fe35866f52e4ed1f25cc03b691f15f5592cb07b3c5fb39d4cb98c6d73dbc8e1e7869cea17241a33dfc29db0a1d121
@@ -312,6 +313,8 @@ DIST github.com%2Felastic%2Fgosigar%2F@v%2Fv0.10.6-0.20200715000138-f115143bb233
DIST github.com%2Felastic%2Fgosigar%2F@v%2Fv0.10.6-0.20200715000138-f115143bb233.zip 111274 BLAKE2B f7d8f3c732b9349dc7c324b107764ef1aaa6fbad9668dc1d5b85edf914bfcd76795b7860436761a8a5aa9dc2d6df3a3ceb2653f33b643a02577e736e5afcac27 SHA512 cbe1480fd09a7c14eb5c977ca85f3268da634861075847ffe86bdd1338d1d3b87c3441e9ed00b02400179f2651016cc3b6d9d3396c1c980a47137752dbfa7543
DIST github.com%2Felastic%2Fgosigar%2F@v%2Fv0.14.0.mod 175 BLAKE2B c9861c8c57b45cf8f62ce5f238c6f1c56ef12a165df01af9f00d03866f52cbc0604015bf49ce2cee558f0a2c206d264e1606cc82892befbbbe0786c5dc6712c1 SHA512 a6b71a6c74d5b3b5bbd2ba0b899084bd3848d22ac31267b86a0129a98d61fbaf273a0d51b486b784960e7026912775f02fe265b46328c73a55d13bcc4800cc14
DIST github.com%2Felastic%2Fgosigar%2F@v%2Fv0.14.0.zip 115566 BLAKE2B 9f5db34d8ad7d2992cecc64b4888bf25094c1734cd5c65adcd9229ed01d452ca0482ff333242ab115ca366ef11ce8aad6d916fc481b2858012671eb31e3afde4 SHA512 1beec1202f58ba4bcd744b351173bc94d9863f4402b2185234e722a1aa5ddc8b7b357e8ea98b9962078ffd1cabd86ea12d3819cda6a932998a01eab05306c971
DIST github.com%2Felastic%2Fgosigar%2F@v%2Fv0.14.1.mod 175 BLAKE2B c9861c8c57b45cf8f62ce5f238c6f1c56ef12a165df01af9f00d03866f52cbc0604015bf49ce2cee558f0a2c206d264e1606cc82892befbbbe0786c5dc6712c1 SHA512 a6b71a6c74d5b3b5bbd2ba0b899084bd3848d22ac31267b86a0129a98d61fbaf273a0d51b486b784960e7026912775f02fe265b46328c73a55d13bcc4800cc14
DIST github.com%2Felastic%2Fgosigar%2F@v%2Fv0.14.1.zip 115821 BLAKE2B c3980759bc2fd41d2639c31163de98c85afb1c6469e0cd5edf7bfac3085b7ab13b395f411e0894f99c489cd5c28a567165d887f5838cabee6b9f9d367fcae9da SHA512 2e9688cd053157c6824e76747d8513bc9d8cab9a565580e780cf55d73b0f6b85be86f23921bd5c1691ff8aa7572475f6515b4f39e0be989277bf4c70fd77d6a2
DIST github.com%2Felastic%2Fsarama%2F@v%2Fv1.19.1-0.20200629123429-0e7b69039eec.mod 1375 BLAKE2B 2078c8e8bb7e18fc469ef77acbfefbd44e6d76c492bd18a8008adf28c5d1fae9cc60d4fc8503a7d66b16a74299e56f673ed6701b34d7a9840afa2fa61be0d2c6 SHA512 31a41e1f8a619aa9dd438be4dcc185d75984a1dd6d7efc5bfd37bf74f63be6a6fb2ca3b4d584bb66f343ca1693b59a2156745689fee29588395ab369fbe32391
DIST github.com%2Felastic%2Fsarama%2F@v%2Fv1.19.1-0.20200629123429-0e7b69039eec.zip 393905 BLAKE2B 91e13d3eaa5fbae1d48d5e02a64fcf2c12237eedb2f5a171795ddee5c1830b2e3006576d37f58468bcbae3fe65ee7a37b1ee8a4c1f78869d5d0b1f9c877e3fc5 SHA512 599747a3a5deac56741c09bd0655c7dea2a3e6e25c1c2d5a851472a6b5cec4bc599d9ed873d6f71fc27a1956ebbf9c30c84ab0d11954d3e02de7352839d2d2eb
DIST github.com%2Felastic%2Fsarama%2F@v%2Fv1.19.1-0.20210120173147-5c8cb347d877.mod 1502 BLAKE2B 4f8b3f4403e79cab17ac0de1e8514ac3854cd5b964751b8f3eb19d6fd6623d603e79d1c4e73b2f678ec9e3f3973c44b80a795bfbcea967fccf78e88b652a1653 SHA512 a38dce9a939a1545354ba356e822515c28c39a29ec6be1d3198811303a71298273856ac0898951efd088e8e6fff9371b4ac596b73238b506d753017f6a62e6c8


+ 1076
- 0
app-admin/filebeat/filebeat-7.12.1.ebuild
File diff suppressed because it is too large
View File


+ 1
- 0
app-admin/github-backup-utils/Manifest View File

@@ -1 +1,2 @@
DIST github-backup-utils-2.22.0.tar.gz 102576 BLAKE2B ce9007c8a5d2843ccc2b3d11b03c13840b89d6ae7906d63420cc0e18191766c92c91e1072723439610ae8bdfdd0174601d1e3b7211cd6a1c9a748f9f793ff760 SHA512 e77b4afc6f90b16caf61dc4313787dab0751590b4819dca2d7e21acd0ca774d19ea359171b76f2892ca0fb4f86fd4240e77b00e107de79d496fea429fb12cee8
DIST github-backup-utils-3.0.0.tar.gz 104088 BLAKE2B f01229e6b152231eb832dec8bef41bb158cc200bbdd3c59c1abab299c572902efe6d27d093491bd8b0bf8f3e834d2938eb0127d5f28700ba75dcbdbcc8a21bb8 SHA512 e86420ef9d86d44560e27e00361ff1bb8ba7c15fb116ad9981e3196bc4c7c25bcff9a9f7dc8dae9bbbb9b2f3380b434199dbbe1ef7db5b1ba04ec1233aec320d

+ 56
- 0
app-admin/github-backup-utils/github-backup-utils-3.0.0.ebuild View File

@@ -0,0 +1,56 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

# Python3 support: https://github.com/github/backup-utils/pull/627
PYTHON_COMPAT=(python3_{7,8,9})
inherit python-any-r1

DESCRIPTION="Backup and recovery utilities for GitHub Enterprise"
HOMEPAGE="https://github.com/github/backup-utils"
SRC_URI="https://github.com/github/backup-utils/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"

# moreutils parallel is now used for speedups in main code:
# https://github.com/github/backup-utils/pull/635
RDEPEND="net-misc/rsync
sys-apps/moreutils"

# tests invoke parallel & rsync
DEPEND="test? (
${RDEPEND}
dev-util/checkbashisms
${PYTHON_DEPS}
)"

MY_PN="${PN/#github-/}"
S="${WORKDIR}/${MY_PN}-${PV}"

src_compile() {
:;
}

src_install() {
dobin bin/*
insinto usr/share/${PN}
doins share/${PN}/version

exeinto usr/share/${PN}
doexe share/${PN}/bm.sh
doexe share/${PN}/ghe-*

insinto etc/${PN}
newins backup.config-example backup.config

dodoc -r docs/*
}

src_test() {
emake test
}

+ 2
- 0
app-admin/logstash-bin/Manifest View File

@@ -1,6 +1,8 @@
DIST logstash-6.8.15.tar.gz 176912362 BLAKE2B 68178b2cbf0ad3ecafc83fddf4c50ef767862fbb90ba7a0dd0527de4f8d3bddc485a99a7e774c6d0efd5b3eb4bf701be042cfc58dcb546c7436db39ff4594841 SHA512 bb42b1284f6ca8d4b10cac96b57cae0f28a33047164f9f9a352ed906a960e11fea3d9c58b23cdd607e0d76eee7aa07fbb6ce8870323e3cc6cba472578d99fb01
DIST logstash-7.10.2-linux-x86_64.tar.gz 351170815 BLAKE2B 536a33de4be4bd1b6dfccf7d4cedc064b0f0b9c0569545d195244cf14f38d9c83159439d7710a76fdc4e4394b5f7d5a1919460c1c03186b4fc7f054744a46016 SHA512 34099b34a05c6b85b1b355310bd190b606aa0bcce1cad07bf5fd98959e54f61860bdd697cca8f3cdab2d2b815bbc2a788d2e14dcac4b3d85a0d5bafd72d2b170
DIST logstash-7.12.0-linux-x86_64.tar.gz 368429061 BLAKE2B 7bf60eeeec072e99aec807c8cb64cfd5cd46270d297c717fee539531286f487ef254738a439947e40bfc039778d20fa746566aa4d0c031a8f1a22deaaab9ce74 SHA512 ba32cb97e81cc3f4369c752b860aea7a85d212921954e5829f0b63526584d01c79731dd094905d91ed35f9887ae70bfffd5324b25dc3f23e60745462493e8195
DIST logstash-7.12.1-linux-x86_64.tar.gz 368465800 BLAKE2B eea395286408de50cf61b2a69f6a673f81c4021370eab9b04fb1a9ad993a5b625145d6710e5045f9572a6a923455fe8613c2262bd488f6e76d467850b1bfa5c5 SHA512 9ef32dbeb4269d904a775a1cf5833b09cc5b8b71c03f953641fd5de5c27ba51ec878d9e74cdd98255d37fcd39d592deea72832bdce26cbb2827db4ae3b294834
DIST logstash-oss-6.8.15.tar.gz 176782145 BLAKE2B 20cdd28d9c6e43edb3cc6d60b961155880aaf2e22d100b6641246a56194ba87aef3c41e039be2ab6bca75e646b83a3f42c935472776aa87a4baa774cca74458d SHA512 c74f189af58ca936b3d3e19970f29a78b8f041f5771163c5ed28466e84cf456f4814a9f4c5a9def2706c39daaebaca948c14e683a6aa82b2e1c1e7ee57592dc2
DIST logstash-oss-7.10.2-linux-x86_64.tar.gz 350992238 BLAKE2B f31207af62b6ff36af4be6fae9c6ede18a481317d28ba2ee6469cd095acba9b41ad4d7598756a51a078bf3d4269ae2f11750e4117842e496811a79825f284aef SHA512 5425483a7d3ec5ba186574940031a529efa683f452f5e3e38ffd9bd07771beabdd5c54a8147ed42fe761b700ea5c294018f1efb22fa6fdcf23189f2aea314b5b
DIST logstash-oss-7.12.0-linux-x86_64.tar.gz 368251521 BLAKE2B 0959b29335dba2728d2e7a76ee482fb713f9d504a52bea1dcde99f042cfd52d9e18067cb3fffe6ca28b2eddddfd4ded1a19de616f4ddd3b6889e373a908706a0 SHA512 5d7bd5ec3ea5907771bb7590277e54be3407cebe6bc89dd7f5d73b02e9e8907855d19500787b21c8ffcff9cdbbb68a4bbb286131d03ce5585ec89e5c2a76dc60
DIST logstash-oss-7.12.1-linux-x86_64.tar.gz 368287628 BLAKE2B 72e758e6962cc5a24c2a5f6ea4c268be1bc0b5a0ae1d73cb056d0d321b20495df346233e58661f11a37fc5e6c0750f28501af24511a7a29c2e698ce933c7380f SHA512 cefdfdaf2f1d0190d35bc5da2244a5bc09659e9f225cfd05acbdacd0f5f89cc13b928704491d18ac0d54c3500f8c15dc7ca64341bf0d7ed56a49c10eb82a55d4

+ 88
- 0
app-admin/logstash-bin/logstash-bin-7.12.1.ebuild View File

@@ -0,0 +1,88 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit java-pkg-2

MY_PN="${PN%-bin}"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="Tool for managing events and logs"
HOMEPAGE="https://www.elastic.co/products/logstash"
SRC_URI="x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}-linux-x86_64.tar.gz )
!x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_PN}-oss-${PV}-linux-x86_64.tar.gz )"

# source: LICENSE.txt and NOTICE.txt
LICENSE="Apache-2.0 MIT x-pack? ( Elastic )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="x-pack"

RESTRICT="strip"
QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"

RDEPEND="acct-group/logstash
acct-user/logstash
virtual/jre"

S="${WORKDIR}/${MY_P}"

src_prepare() {
default

local d
for d in aarch64-Linux arm-Linux Darwin i386-Linux i386-SunOS \
i386-Windows mips64el-Linux ppc64-AIX ppc64le-Linux ppc64-Linux \
ppc-AIX sparcv9-Linux sparcv9-SunOS x86_64-DragonFlyBSD \
x86_64-FreeBSD x86_64-OpenBSD x86_64-SunOS x86_64-Windows; do
rm -r vendor/jruby/lib/jni/$d || die
done

# remove bundled java
rm -r jdk || die
}

src_install() {
keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
keepdir "/var/log/${MY_PN}"

insinto "/usr/share/${MY_PN}"
newins "${FILESDIR}/agent.conf.sample" agent.conf

rm -v config/{pipelines.yml,startup.options} || die
insinto /etc/${MY_PN}
doins -r config/.
doins "${FILESDIR}/pipelines.yml"
rm -rv config data || die

insinto "/opt/${MY_PN}"
doins -r .
fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby" "/opt/${MY_PN}/bin/logstash-plugin"

newconfd "${FILESDIR}/${MY_PN}.confd-r2" "${MY_PN}"
newinitd "${FILESDIR}/${MY_PN}.initd-r2" "${MY_PN}"

insinto /usr/share/eselect/modules
doins "${FILESDIR}"/logstash-plugin.eselect
}

pkg_postinst() {
ewarn "Self installed plugins are removed during Logstash upgrades (Bug #622602)"
ewarn "Install the plugins via eselect module that will automatically re-install"
ewarn "all self installed plugins after Logstash upgrades."
elog
elog "Installing plugins:"
elog "eselect logstash-plugin install logstash-output-gelf"
elog

elog "Reinstalling self installed plugins (installed via eselect module):"
eselect logstash-plugin reinstall

elog
elog "Sample configuration:"
elog "${EROOT}/usr/share/${MY_PN}"
elog
elog "The default pipeline configuration expects the configuration(s) to be found in:"
elog "${EROOT}/etc/logstash/conf.d/*.conf"
}

+ 1
- 3
app-admin/syslog-ng/Manifest View File

@@ -1,4 +1,2 @@
DIST syslog-ng-3.26.1.tar.gz 5040993 BLAKE2B 235971547c8febe61191014d971b9e5d71560f51ebc3a74fbae1c95b86653f1de8d0b99788f5b00cc75926dc67e7a80f650e9d2d12f191a4400c5b8edbbd01b7 SHA512 2cf6a8bd70addec3bef0888539f4a4686c30655698835d0c211ea929a0cae91a6f3dc9903f29fe717fd9d48b5cdc9918796f196ca84af6f5733bedff09ffab5a
DIST syslog-ng-3.28.1.tar.gz 5149671 BLAKE2B bfc33f2a595cb4fbcc5a69b60d283673922873434b21ca8ce9685a0f54b355f162b11242704419349a561f412573c84df30a49a4dc0cc95699e98720e3e65247 SHA512 d70b435a6c9d1d0d22ecebc051dc294b6e7f841159edabf229c772c40342a28014ea1599b2277f0514236f545bac63c9879988fd85d634e9ab4fe4f079c984cb
DIST syslog-ng-3.29.1.tar.gz 5111614 BLAKE2B 1dba62290d6354d0cda7d43783327a19f69e05963c6d2e75f42c61c30984d49d28f1c6474e68ccdd806f38022bf6799e69e12f2444da391b2bccb736ca597c72 SHA512 c8ec6527cab9e46effe23aaa1306b5bde1e13c3e62a092a62af630a744cc41e81d861e6e2ebfbaad8a9199d3b75ba4ac5fb4b4215d03f80a41f57a2e7a074a49
DIST syslog-ng-3.30.1.tar.gz 5707042 BLAKE2B 3e6ee58b3732ae4863de43c7d22799a74074e94dbbf735368c09c11382b641a5554a4a25ad836b4ac25c8a4f64781dbfb1d9ddd6961ba3aa70c4213cfec81bfd SHA512 ac7ed4978c6db9464add30aa7aeb71a646f841593b02884c8d4ad34c0508c8d3243bcbe6ee98e81c04698895305334eadd9e624ba71e510c14d79155723efb52
DIST syslog-ng-3.31.2.tar.gz 5727835 BLAKE2B a71190fe1580702a4d904c8a4d31a123d2aa0d01bb5a6e21f32f8502ec99f6109b45537c1a5022b0baeae89456b4b919bb8c88077d00aa9724398b7588254d89 SHA512 22a647c37f87fb1a45c8c69c2b0a022d1886cde5b0d585c3384b606d967c3f320a18e34810655174e82c797c0dc23c481732ecefd5be16da8fba4983b2ed0385

+ 0
- 320
app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch View File

@@ -1,320 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9b4183fc..1f8f16c13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -331,8 +331,7 @@ endif()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -j $$(nproc) --output-on-failure)
set(IMPORTANT_WARNINGS
- -Wshadow
- -fcommon)
+ -Wshadow)
set(ACCEPTABLE_WARNINGS
-Wno-stack-protector
diff --git a/Makefile.am b/Makefile.am
index 8b24eeaed..86c090638 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,8 +54,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/modules -I$(top_builddir)/lib
# Important warnings
AM_CFLAGS = \
- -Wshadow \
- -fcommon
+ -Wshadow
# Acceptable warnings
AM_CFLAGS += \
diff --git a/lib/logmsg/tests/test_log_message.c b/lib/logmsg/tests/test_log_message.c
index 245568ce5..e51d78b94 100644
--- a/lib/logmsg/tests/test_log_message.c
+++ b/lib/logmsg/tests/test_log_message.c
@@ -32,6 +32,8 @@
#include <stdlib.h>
#include <glib/gprintf.h>
+MsgFormatOptions parse_options;
+
typedef struct _LogMessageTestParams
{
LogMessage *message;
@@ -151,7 +153,7 @@ void
setup(void)
{
app_startup();
- init_and_load_syslogformat_module();
+ init_parse_options_and_load_syslogformat(&parse_options);
}
void
diff --git a/libtest/cr_template.c b/libtest/cr_template.c
index 35e47aa3f..4f0913368 100644
--- a/libtest/cr_template.c
+++ b/libtest/cr_template.c
@@ -34,10 +34,12 @@
#include "msg_parse_lib.h"
+static MsgFormatOptions parse_options;
+
void
init_template_tests(void)
{
- init_and_load_syslogformat_module();
+ init_parse_options_and_load_syslogformat(&parse_options);
}
void
diff --git a/libtest/msg_parse_lib.c b/libtest/msg_parse_lib.c
index ae0d1654b..b3c7cb652 100644
--- a/libtest/msg_parse_lib.c
+++ b/libtest/msg_parse_lib.c
@@ -27,15 +27,13 @@
#include <criterion/criterion.h>
-MsgFormatOptions parse_options;
-
void
-init_and_load_syslogformat_module(void)
+init_parse_options_and_load_syslogformat(MsgFormatOptions *parse_options)
{
configuration = cfg_new_snippet();
cfg_load_module(configuration, "syslogformat");
- msg_format_options_defaults(&parse_options);
- msg_format_options_init(&parse_options, configuration);
+ msg_format_options_defaults(parse_options);
+ msg_format_options_init(parse_options, configuration);
}
void
diff --git a/libtest/msg_parse_lib.h b/libtest/msg_parse_lib.h
index d86f178c2..5a9b4277b 100644
--- a/libtest/msg_parse_lib.h
+++ b/libtest/msg_parse_lib.h
@@ -30,9 +30,7 @@
#include "cfg.h"
#include "logmsg/logmsg.h"
-extern MsgFormatOptions parse_options;
-
-void init_and_load_syslogformat_module(void);
+void init_parse_options_and_load_syslogformat(MsgFormatOptions *parse_options);
void deinit_syslogformat_module(void);
void assert_log_messages_equal(LogMessage *log_message_a, LogMessage *log_message_b);
diff --git a/libtest/proto_lib.c b/libtest/proto_lib.c
index b69195865..105e390b9 100644
--- a/libtest/proto_lib.c
+++ b/libtest/proto_lib.c
@@ -23,7 +23,7 @@
*/
#include "proto_lib.h"
-#include "msg_parse_lib.h"
+#include "cfg.h"
#include <string.h>
#include <criterion/criterion.h>
@@ -164,7 +164,8 @@ assert_proto_server_fetch_ignored_eof(LogProtoServer *proto)
void
init_proto_tests(void)
{
- init_and_load_syslogformat_module();
+ configuration = cfg_new_snippet();
+ cfg_load_module(configuration, "syslogformat");
log_proto_server_options_defaults(&proto_server_options);
}
@@ -172,5 +173,7 @@ void
deinit_proto_tests(void)
{
log_proto_server_options_destroy(&proto_server_options);
- deinit_syslogformat_module();
+
+ if (configuration)
+ cfg_free(configuration);
}
diff --git a/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c b/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
index 79a4b97ad..d4d0d45a9 100644
--- a/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
+++ b/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
@@ -31,6 +31,8 @@
#include <criterion/criterion.h>
+MsgFormatOptions parse_options;
+
static LogMessage *
kmsg_parse_message(const gchar *raw_message_str)
{
diff --git a/modules/python/tests/test_python_logmsg.c b/modules/python/tests/test_python_logmsg.c
index 9a0343b07..51651ee9d 100644
--- a/modules/python/tests/test_python_logmsg.c
+++ b/modules/python/tests/test_python_logmsg.c
@@ -30,6 +30,8 @@
static PyObject *_python_main;
static PyObject *_python_main_dict;
+MsgFormatOptions parse_options;
+
static void
_py_init_interpreter(void)
{
@@ -95,7 +97,7 @@ void setup(void)
{
app_startup();
- init_and_load_syslogformat_module();
+ init_parse_options_and_load_syslogformat(&parse_options);
_py_init_interpreter();
_init_python_main();
diff --git a/modules/stardate/tests/test_stardate.c b/modules/stardate/tests/test_stardate.c
index e48cfb6cd..7d55fc1d0 100644
--- a/modules/stardate/tests/test_stardate.c
+++ b/modules/stardate/tests/test_stardate.c
@@ -33,6 +33,8 @@
#include "msg_parse_lib.h"
+MsgFormatOptions parse_options;
+
void
stardate_assert(const gchar *msg_str, const int precision, const gchar *expected)
{
@@ -58,6 +60,7 @@ void
setup(void)
{
app_startup();
+ init_parse_options_and_load_syslogformat(&parse_options);
init_template_tests();
cfg_load_module(configuration, "stardate");
}
@@ -66,6 +69,7 @@ void
teardown(void)
{
deinit_template_tests();
+ deinit_syslogformat_module();
app_shutdown();
}
diff --git a/persist-tool/add.h b/persist-tool/add.h
index 981e0cc61..2d3524cb0 100644
--- a/persist-tool/add.h
+++ b/persist-tool/add.h
@@ -32,8 +32,8 @@
#include "cfg.h"
#include "persist-tool.h"
-gchar *persist_state_dir;
-gchar *persist_state_name;
+extern gchar *persist_state_dir;
+extern gchar *persist_state_name;
gint add_main(int argc, char *argv[]);
diff --git a/persist-tool/generate.h b/persist-tool/generate.h
index 237a8ae24..34f7dfec9 100644
--- a/persist-tool/generate.h
+++ b/persist-tool/generate.h
@@ -32,8 +32,8 @@
#include "persist-state.h"
#include "cfg.h"
-gboolean force_generate;
-gchar *generate_output_dir;
+extern gboolean force_generate;
+extern gchar *generate_output_dir;
gint generate_main(int argc, char *argv[]);
diff --git a/persist-tool/persist-tool.c b/persist-tool/persist-tool.c
index fd96c856d..4e4adc88f 100644
--- a/persist-tool/persist-tool.c
+++ b/persist-tool/persist-tool.c
@@ -135,11 +135,17 @@ void persist_tool_free(PersistTool *self)
g_free(self);
}
+gchar *persist_state_dir;
+gchar *persist_state_name;
+gboolean force_generate;
+gchar *generate_output_dir;
+
static GOptionEntry dump_options[] =
{
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL }
};
+
static GOptionEntry add_options[] =
{
{ "output-dir", 'o', 0, G_OPTION_ARG_STRING, &persist_state_dir, "The directory where persist file is located.", "<directory>" },
diff --git a/tests/unit/test_clone_logmsg.c b/tests/unit/test_clone_logmsg.c
index 57c0b181f..7b738b1e5 100644
--- a/tests/unit/test_clone_logmsg.c
+++ b/tests/unit/test_clone_logmsg.c
@@ -38,6 +38,8 @@
#include <stdlib.h>
#include <stdio.h>
+MsgFormatOptions parse_options;
+
void
assert_new_log_message_attributes(LogMessage *log_message)
{
@@ -69,7 +71,7 @@ void
setup(void)
{
app_startup();
- init_and_load_syslogformat_module();
+ init_parse_options_and_load_syslogformat(&parse_options);
}
void
diff --git a/tests/unit/test_matcher.c b/tests/unit/test_matcher.c
index a92c8e458..d43755bea 100644
--- a/tests/unit/test_matcher.c
+++ b/tests/unit/test_matcher.c
@@ -31,6 +31,8 @@
#include <stdlib.h>
#include <string.h>
+MsgFormatOptions parse_options;
+
static LogMessage *
_create_log_message(const gchar *log)
{
@@ -128,7 +130,7 @@ void
setup(void)
{
app_startup();
- init_and_load_syslogformat_module();
+ init_parse_options_and_load_syslogformat(&parse_options);
}
void
diff --git a/tests/unit/test_msgparse.c b/tests/unit/test_msgparse.c
index 6b9e1045f..0ed91f638 100644
--- a/tests/unit/test_msgparse.c
+++ b/tests/unit/test_msgparse.c
@@ -49,6 +49,8 @@ struct sdata_pair
struct sdata_pair ignore_sdata_pairs[] = { { NULL, NULL } };
struct sdata_pair empty_sdata_pairs[] = { { NULL, NULL } };
+MsgFormatOptions parse_options;
+
static unsigned long
_absolute_value(signed long diff)
{
@@ -130,7 +132,7 @@ setup(void)
app_startup();
setenv("TZ", "MET-1METDST", TRUE);
tzset();
- init_and_load_syslogformat_module();
+ init_parse_options_and_load_syslogformat(&parse_options);
/* Fri Feb 8 09:37:49 CET 2019 */
fake_time(1549615069);
}

+ 0
- 63
app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch View File

@@ -1,63 +0,0 @@
diff --git a/lib/compat/glib.c b/lib/compat/glib.c
index 8b6e52447..5b8ed8891 100644
--- a/lib/compat/glib.c
+++ b/lib/compat/glib.c
@@ -315,3 +315,18 @@ slng_g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
return exists;
}
#endif
+
+
+#if !GLIB_CHECK_VERSION(2, 64, 0)
+gunichar
+g_utf8_get_char_validated_fixed(const gchar *p, gssize max_len)
+{
+ // https://github.com/GNOME/glib/commit/1963821a57584b4674c20895e8a5adccd2d9effd
+
+#undef g_utf8_get_char_validated
+ if (*p == '\0' && max_len > 0)
+ return (gunichar)-2;
+
+ return g_utf8_get_char_validated(p, max_len);
+}
+#endif
diff --git a/lib/compat/glib.h b/lib/compat/glib.h
index a9782ed2d..0fbdbd12d 100644
--- a/lib/compat/glib.h
+++ b/lib/compat/glib.h
@@ -109,4 +109,9 @@ gchar *g_base64_encode_fixed(const guchar *data, gsize len);
gboolean slng_g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value);
#endif
+#if !GLIB_CHECK_VERSION(2, 64, 0)
+#define g_utf8_get_char_validated g_utf8_get_char_validated_fixed
+gunichar g_utf8_get_char_validated_fixed (const gchar *p, gssize max_len);
+#endif
+
#endif
diff --git a/modules/cef/tests/test-format-cef-extension.c b/modules/cef/tests/test-format-cef-extension.c
index d7f6ee3c1..f4233f96f 100644
--- a/modules/cef/tests/test-format-cef-extension.c
+++ b/modules/cef/tests/test-format-cef-extension.c
@@ -104,7 +104,7 @@ Test(format_cef, test_null_in_value)
configuration->template_options.on_error = ON_ERROR_DROP_MESSAGE | ON_ERROR_SILENT;
log_msg_set_value_by_name(msg, ".cef.k", "a\0b", 3);
- assert_template_format_msg("$(format-cef-extension --subkeys .cef.)", "k=a\\u0000b", msg);
+ assert_template_format_msg("$(format-cef-extension --subkeys .cef.)", "k=a\\x00b", msg);
log_msg_unref(msg);
}
diff --git a/modules/json/tests/test_format_json.c b/modules/json/tests/test_format_json.c
index 92c61e9f1..1224ddb33 100644
--- a/modules/json/tests/test_format_json.c
+++ b/modules/json/tests/test_format_json.c
@@ -55,7 +55,7 @@ Test(format_json, test_format_json)
assert_template_format("$(format-json MSG=$escaping)",
"{\"MSG\":\"binary stuff follows \\\"\\\\xad árvíztűrőtükörfúrógép\"}");
assert_template_format("$(format-json MSG=$escaping2)", "{\"MSG\":\"\\\\xc3\"}");
- assert_template_format("$(format-json MSG=$null)", "{\"MSG\":\"binary\\u0000stuff\"}");
+ assert_template_format("$(format-json MSG=$null)", "{\"MSG\":\"binary\\\\x00stuff\"}");
assert_template_format_with_context("$(format-json MSG=$MSG)",
"{\"MSG\":\"árvíztűrőtükörfúrógép\"}{\"MSG\":\"árvíztűrőtükörfúrógép\"}");
assert_template_format("$(format-json --scope rfc3164)",

+ 0
- 170
app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild View File

@@ -1,170 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7,8} )
inherit autotools python-single-r1 systemd

MY_PV_MM=$(ver_cut 1-2)
DESCRIPTION="syslog replacement with advanced filtering features"
HOMEPAGE="https://syslog-ng.com/open-source-log-management"
SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"

LICENSE="GPL-2+ LGPL-2.1+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="amqp caps dbi geoip2 http ipv6 json kafka mongodb pacct python redis smtp snmp test spoof-source systemd tcpd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"

RDEPEND="
>=dev-libs/glib-2.10.1:2
>=dev-libs/ivykis-0.42.4
>=dev-libs/libpcre-6.1:=
!dev-libs/eventlog
amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] )
caps? ( sys-libs/libcap )
dbi? ( >=dev-db/libdbi-0.9.0 )
geoip2? ( dev-libs/libmaxminddb:= )
http? ( net-misc/curl )
json? ( >=dev-libs/json-c-0.9:= )
kafka? ( >=dev-libs/librdkafka-1.0.0:= )
mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
python? ( ${PYTHON_DEPS} )
redis? ( >=dev-libs/hiredis-0.11.0:= )
smtp? ( net-libs/libesmtp )
snmp? ( net-analyzer/net-snmp )
spoof-source? ( net-libs/libnet:1.1= )
systemd? ( sys-apps/systemd:= )
tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
dev-libs/openssl:0="
DEPEND="${RDEPEND}
test? ( dev-libs/criterion )"
BDEPEND="
sys-devel/flex
virtual/pkgconfig"

DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc}
contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )

PATCHES=( "${FILESDIR}/patches/syslog-ng-glib-2.64-support.patch" )

pkg_setup() {
use python && python-single-r1_pkg_setup
}

src_prepare() {
local f

use python && python_fix_shebang .

# remove bundled libs
rm -r lib/ivykis || die

# drop scl modules requiring json
if use !json; then
sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die
fi

# drop scl modules requiring http
if use !http; then
sed -i -r '/slack|telegram/d' scl/Makefile.am || die
fi

# use gentoo default path
if use systemd; then
sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \
-i contrib/systemd/syslog-ng@default || die
fi

for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do
sed \
-e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \
"/etc/init.d/syslog-ng reload")#g" \
"${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
done

for f in syslog-ng.conf.gentoo.hardened.in \
syslog-ng.conf.gentoo.in; do
sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
done

default
eautoreconf
}

src_configure() {
local myconf=(
--disable-docs
--disable-java
--disable-java-modules
--disable-riemann
--enable-manpages
--localstatedir=/var/lib/syslog-ng
--sysconfdir=/etc/syslog-ng
--with-embedded-crypto
--with-ivykis=system
--with-module-dir=/usr/$(get_libdir)/syslog-ng
--with-pidfile-dir=/var/run
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
$(use_enable amqp)
$(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client)
$(use_enable caps linux-caps)
$(use_enable dbi sql)
$(use_enable geoip2)
$(use_enable http)
$(use_enable ipv6)
$(use_enable json)
$(use_enable kafka)
$(use_enable mongodb)
$(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options")
$(use_enable pacct)
$(use_enable python)
$(use_enable redis)
$(use_enable smtp)
$(use_enable snmp snmp-dest)
$(use_enable spoof-source)
$(use_enable systemd)
$(use_enable tcpd tcp-wrapper)
)

econf "${myconf[@]}"
}

src_install() {
default

# Install default configuration
insinto /etc/default
doins contrib/systemd/syslog-ng@default

insinto /etc/syslog-ng
newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf

insinto /etc/logrotate.d
newins "${T}/syslog-ng.logrotate" syslog-ng

newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng
newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng
keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
find "${D}" -name '*.la' -delete || die

use python && python_optimize
}

pkg_postinst() {
# bug #355257
if ! has_version app-admin/logrotate ; then
elog "It is highly recommended that app-admin/logrotate be emerged to"
elog "manage the log files. ${PN} installs a file in /etc/logrotate.d"
elog "for logrotate to use."
fi

if use systemd; then
ewarn "The service file for systemd has changed to support multiple instances."
ewarn "To start the default instance issue:"
ewarn "# systemctl start syslog-ng@default"
fi
}

+ 0
- 171
app-admin/syslog-ng/syslog-ng-3.28.1-r2.ebuild View File

@@ -1,171 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..9} )
inherit autotools python-single-r1 systemd

MY_PV_MM=$(ver_cut 1-2)
DESCRIPTION="syslog replacement with advanced filtering features"
HOMEPAGE="https://syslog-ng.com/open-source-log-management"
SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"

LICENSE="GPL-2+ LGPL-2.1+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="amqp caps dbi geoip2 http ipv6 json kafka mongodb pacct python redis smtp snmp test spoof-source systemd tcpd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"

RDEPEND="
>=dev-libs/glib-2.10.1:2
>=dev-libs/ivykis-0.42.4
>=dev-libs/libpcre-6.1:=
!dev-libs/eventlog
amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] )
caps? ( sys-libs/libcap )
dbi? ( >=dev-db/libdbi-0.9.0 )
geoip2? ( dev-libs/libmaxminddb:= )
http? ( net-misc/curl )
json? ( >=dev-libs/json-c-0.9:= )
kafka? ( >=dev-libs/librdkafka-1.0.0:= )
mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
python? ( ${PYTHON_DEPS} )
redis? ( >=dev-libs/hiredis-0.11.0:= )
smtp? ( net-libs/libesmtp )
snmp? ( net-analyzer/net-snmp:0= )
spoof-source? ( net-libs/libnet:1.1= )
systemd? ( sys-apps/systemd:= )
tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
dev-libs/openssl:0="
DEPEND="${RDEPEND}
test? ( dev-libs/criterion )"
BDEPEND="
sys-devel/flex
virtual/pkgconfig"

DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc}
contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
PATCHES=(
"${FILESDIR}"/${PN}-3.28.1-net-snmp.patch
)

pkg_setup() {
use python && python-single-r1_pkg_setup
}

src_prepare() {
local f

use python && python_fix_shebang .

# remove bundled libs
rm -r lib/ivykis || die

# drop scl modules requiring json
if use !json; then
sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die
fi

# drop scl modules requiring http
if use !http; then
sed -i -r '/slack|telegram/d' scl/Makefile.am || die
fi

# use gentoo default path
if use systemd; then
sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \
-i contrib/systemd/syslog-ng@default || die
fi

for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do
sed \
-e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \
"/etc/init.d/syslog-ng reload")#g" \
"${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
done

for f in syslog-ng.conf.gentoo.hardened.in \
syslog-ng.conf.gentoo.in; do
sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
done

default
eautoreconf
}

src_configure() {
local myconf=(
--disable-docs
--disable-java
--disable-java-modules
--disable-riemann
--enable-manpages
--localstatedir=/var/lib/syslog-ng
--sysconfdir=/etc/syslog-ng
--with-embedded-crypto
--with-ivykis=system
--with-module-dir=/usr/$(get_libdir)/syslog-ng
--with-pidfile-dir=/var/run
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
$(use_enable amqp)
$(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client)
$(use_enable caps linux-caps)
$(use_enable dbi sql)
$(use_enable geoip2)
$(use_enable http)
$(use_enable ipv6)
$(use_enable json)
$(use_enable kafka)
$(use_enable mongodb)
$(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options")
$(use_enable pacct)
$(use_enable python)
$(use_enable redis)
$(use_enable smtp)
$(use_enable snmp afsnmp)
$(use_enable spoof-source)
$(use_enable systemd)
$(use_enable tcpd tcp-wrapper)
)

econf "${myconf[@]}"
}

src_install() {
default

# Install default configuration
insinto /etc/default
doins contrib/systemd/syslog-ng@default

insinto /etc/syslog-ng
newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf

insinto /etc/logrotate.d
newins "${T}/syslog-ng.logrotate" syslog-ng

newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng
newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng
keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
find "${D}" -name '*.la' -delete || die

use python && python_optimize
}

pkg_postinst() {
# bug #355257
if ! has_version app-admin/logrotate ; then
elog "It is highly recommended that app-admin/logrotate be emerged to"
elog "manage the log files. ${PN} installs a file in /etc/logrotate.d"
elog "for logrotate to use."
fi

if use systemd; then
ewarn "The service file for systemd has changed to support multiple instances."
ewarn "To start the default instance issue:"
ewarn "# systemctl start syslog-ng@default"
fi
}

app-admin/syslog-ng/syslog-ng-3.29.1.ebuild → app-admin/syslog-ng/syslog-ng-3.31.2.ebuild View File

@@ -33,7 +33,7 @@ RDEPEND="
mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
python? ( ${PYTHON_DEPS} )
redis? ( >=dev-libs/hiredis-0.11.0:= )
smtp? ( net-libs/libesmtp )
smtp? ( >=net-libs/libesmtp-1.0.6_p20200824:= )
snmp? ( net-analyzer/net-snmp:0= )
spoof-source? ( net-libs/libnet:1.1= )
systemd? ( sys-apps/systemd:= )
@@ -50,6 +50,7 @@ DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunO
"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
PATCHES=(
"${FILESDIR}"/${PN}-3.28.1-net-snmp.patch
"${FILESDIR}"/${PN}-3.30.1-esmtp-pkgconfig.patch
)

pkg_setup() {

BIN
app-arch/Manifest.gz View File


+ 1
- 1
app-arch/rpm2targz/rpm2targz-2021.03.16.ebuild View File

@@ -12,7 +12,7 @@ SRC_URI="mirror://gentoo/${P}.tar.xz

LICENSE="BSD-1"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE=""

DEPEND=""


+ 1
- 1
app-arch/unzip/unzip-6.0_p26.ebuild View File

@@ -16,7 +16,7 @@ SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz

LICENSE="Info-ZIP"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bzip2 natspec unicode"

DEPEND="bzip2? ( app-arch/bzip2 )


BIN
app-emulation/Manifest.gz View File


+ 7
- 9
app-emulation/xen-tools/Manifest View File

@@ -3,14 +3,12 @@ DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 B
DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 7406ec5b29ac66afbcd7c1376bb3208f298d19b6592b2869c52173aa64947d58bd443f9a61c67deaf046be910a0e31c0b843e5508e97e0e1f5e7bce100d86904 SHA512 df8e90562c4fd7f0e787949df6bc4f5a165b39bd333f442d27874fe65640fbba268f9350d7113e6761a5acceb66d78e75f1a296e5a89b94574edf28109cdc812
DIST edk2-06dc822d045c2bb42e497487935485302486e151.tar.gz 13192042 BLAKE2B 81afa7fd5f6f14fff35baa3c6c64583fa21c7b793ed847a3362fd05a926bb4402db911f9f78f4ffd76a6de9b815171dfa245ae41afac3b022cd108597e8c1ac3 SHA512 a032a1496db7ddc32a7d6d1a7d5fe4122ab43b13547ec019855166d785f162268ad82ceb3c41efafe1687e73fc72599ee6852741652451e1cb329fd655c69b6c
DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b95266ec7fcee5c27065ba999b023ded9eb42a3690555e626911493f1dc995927fa67071bdc6432b3995df82134f8c49ea0d72eaf407f455dd1e2675d5b8d844 SHA512 8120696ba6d79fd9189664deed9b0489825d8d1edf7b931023b3979b7b9f82248e5b808c4517036cd40a85442ddf51a8dcad3b05d7f3c3cc6650654d53da4050
DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c68b0b895799667dd1378bb84125712330c2f6945112709d42cfb7b01196c7fff99051e44b6211d47d19531cfae SHA512 7f158badf7deecc2998eab2a08f3615dfe5a7c0a51323f7b4568a4d1280935bc32bb466c8226d87d2ca7e13f9f117ff0092befcc0699bc31c5018e84754e8393
DIST xen-4.13.2-upstream-patches-2.tar.xz 58992 BLAKE2B 535d67ae6a30e23feb975172a9e4abd6d7feb6c8c969aa243fdf672ed6580fe46bf57ea5530eab70457e22af9163f95061fdf97d10faa3be9f4c92033187c950 SHA512 6b6cdf72d13c0e595be65e3107c0f68299e932b74d4a1c4d59bfe3be8b76840c47f6adeaddd0efac71d5158cee8d778a0be863eea8f032cb9acf4191f629d8ae
DIST xen-4.13.2-upstream-patches-6.tar.xz 80980 BLAKE2B a20643c4f89f197e4001c0181249bc1a22b60874bc077ba2abee716b8e64bbbea0885a64632f3120960425a741328ceba1b44dc10a7a24039b328e1ded28f752 SHA512 0b097dfb04404ec6c609d35d924b3d2306c5f2de0501aa0b8e007e0af9a4ef394fae2d736435401bf8bd1fd661171c71ba712585bdb195649e3350ef9f953115
DIST xen-4.13.2.tar.gz 39037826 BLAKE2B ad2b7c3003ca29e5e60a85c581f706ef87d99eadf939ed36ebe8f6698582f7a29dbdaf502039b60a0afe7ad4ae6ce89713e69dc8b8a7d5abe65063da7f1baa5b SHA512 cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3
DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf0b5d9ea1d44803bc5c4aa0bf9188636e292b226ab759f32e3c2bfa3f80dd3f546526b9a11c1f67193793ede5309bfa67bdce80aba62ccca54597dc6e7e4ba4 SHA512 0a63f83c9135d05c6bfe7c4d12da3ff76271e35305a4d5654bd5aefa9ee59f5363546c65820c42133deb0fb5a0a0bcaa9b1c48396f9f996acea0d492a5f03f33
DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
DIST xen-4.13.3.tar.gz 39044539 BLAKE2B 5d0e57c76e12e1b86b78bbf561e947d70b9569a24412617a640346d2358b141a2741e7a3be454df52d198ad63e58b1519288de62330417c70e72445703f3fac2 SHA512 622127d824b9c49b57282a887fb404e0bad05ff60bccade82e4e0e9b5ad975ff9aa1fba83392e6d8379e9a15340e8ae9785c0913eb11027816e4600432eea6b6
DIST xen-4.14.1-upstream-patches-3.tar.xz 27864 BLAKE2B 69a67e863a30c0079f7955dd5306f69890a4f6db91d4cf2d1806a2bbd8afad88db7789c7eda8da0ff2a945da04916ff4ab5eaa9e529a417112ae01e31151d0dc SHA512 19e5ef39616fffbff20b2f658d61e50e21741fe3c5c4ca89f67e72a1606b3a593f93e9090fb0b5c76c1c801f931c237d2be6329bd174fa911d66b81ad4a332dd
DIST xen-4.14.1.tar.gz 39970115 BLAKE2B 21e5838b2b4d78420dcaaae2b8fc98ac876230217e6a3764aa643920150b8cef96025663e6a2fc423ab15f7f470b62547e91ce1be0337fc78f00c148c7ff40ab SHA512 c75cbec82793435f5a7026626ffdb2e9a2166b42d2be4b2f1194240e0312458124f0ebd53eeb02ce7330c22afe402a28a96b32f8af66e41e9416fe94535724c9
DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
DIST xen-4.15.0-upstream-patches-0.tar.xz 15744 BLAKE2B e2abb68524a7c190db8d91beb79731aea5290e82f54fb21218739dab666f6f5ea85c203575ec248b46830f1862408d50d3ceea1104fcd9325babfccf3574c515 SHA512 f1a2800d15a61f08eda4d6bafaead95a9d72cc9e4d90a19278d89c696b7e2d5d6353b28dba7ed0eb0c9aeb8604d3697db6a8f4ac38047e2510279d88181752f9
DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7
DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d
DIST xen-gentoo-patches-22.tar.xz 18764 BLAKE2B e0da49b39fbc6b689db47e40a4fbb4f6568644fe192b114cce01b0406cba4bf23339ad1bf39b972f895df004916827b6e774f97fc079aeb8ac436763efda5fc3 SHA512 5b7959af4ed30edd2526698ab60a86353e35d9dc48dc941b6df7659a7c4904260461e0decbd8d788542bd69384736f2175861d4943c3738618d20788b19ea9b1
DIST xen-security-patches-29.tar.xz 1536 BLAKE2B 7723e9d971a2385f7a4a85dd63412afc41ba20991d15732423f03d0c5455c504ecccec08102edbec0db47ed019c88cc86f4146e080075d829aff03ccded362bc SHA512 eff572fed812c38bc3c014d47b951d3614bfb1255d41a2d35ddcbe9228cf9550aaf867adde0f2365f49d0d4e5229c19a78aa538eb64de7cd3d1ef5f7f0c4a079
DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49

+ 28
- 18
app-emulation/xen-tools/files/gentoo-patches.conf View File

@@ -51,16 +51,6 @@ _gx056=" xen-tools-4.12.2-libxenstat-makefile.patch"
# Fix building with gcc 10, bug #722930
_gx060=" xen-tools-4.13.0-gcc10.patch"

# xen-tools-4.13.2 patches set (v1)
_gpv_xen_tools_4132_1="
${_gx038}
${_gx027}
${_gx028} ${_gx029}
${_gx037}
${_gx053} ${_gx050} ${_gx051}
${_gx054} ${_gx056}
"

# xen-tools-4.13.3 patches set
_gpv_xen_tools_4133_0="
${_gx038}
@@ -71,12 +61,32 @@ ${_gx053} ${_gx050} ${_gx051}
${_gx054} ${_gx056}
"

# xen-tools-4.14.1 patches set
_gpv_xen_tools_4141_0="
${_gx039}
${_gx027}
${_gx028} ${_gx029}
${_gx037}
${_gx053} ${_gx050} ${_gx052}
${_gx054} ${_gx056}
# xen-tools-4.14.2 patches set
_gpv_xen_tools_4142_0="
xen-tools-4.12.0-gcc8.patch
xen-tools-4.12.0-shim.patch
xen-tools-4.12.0-unbundle-ipxe.patch
xen-tools-4.12.2-libxenstat-makefile.patch
xen-tools-4.14-ar-cc.patch
xen-tools-4.14-qemu-bridge.patch
xen-tools-4.15.0-disable-werror.patch
xen-tools-4.15.0-gcc11.patch
xen-tools-4.4.1-tinfo.patch
xen-tools-4.6-increase-stack-size.patch
xen-tools-4-anti-ovmf-download.patch
xen-tools-4-qemu-fix-po-collision.patch
"

# xen-tools-4.15.0 patches set
_gpv_xen_tools_4150_0="
xen-tools-4.14-ar-cc.patch
xen-tools-4.15.0-disable-werror.patch
xen-tools-4.15.0-gcc11.patch
xen-tools-4.15.0-libxenstat-makefile.patch
xen-tools-4.15.0-no-ld-no-pie.patch
xen-tools-4.15.0-qemu-bridge.patch
xen-tools-4.15.0-unbundle-ipxe.patch
xen-tools-4.4.1-tinfo.patch
xen-tools-4-anti-ovmf-download.patch
xen-tools-4-qemu-fix-po-collision.patch
"

+ 0
- 512
app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild View File

@@ -1,512 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..9} )
PYTHON_REQ_USE='ncurses,xml,threads(+)'

inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs

MY_PV=${PV/_/-}

if [[ ${PV} == *9999 ]]; then
inherit git-r3
REPO="xen.git"
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="amd64 ~arm ~arm64 x86"
UPSTREAM_VER=2
SECURITY_VER=29
# xen-tools's gentoo patches tarball
GENTOO_VER=21
# xen-tools's gentoo patches version which apply to this specific ebuild
GENTOO_GPV=1
# xen-tools ovmf's patches
OVMF_VER=

SEABIOS_VER="1.12.1"
EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
EDK2_OPENSSL_VERSION="1_1_1g"
EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"

[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
[[ -n ${OVMF_VER} ]] && \
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"

SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
${OVMF_PATCHSET_URI} )
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"

S="${WORKDIR}/xen-${MY_PV}"
fi

DESCRIPTION="Xen tools including QEMU and xl"
HOMEPAGE="https://www.xenproject.org"
DOCS=( README )

LICENSE="GPL-2"
SLOT="0/$(ver_cut 1-2)"
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
# >=dev-lang/ocaml-4 stable
# Masked in profiles/eapi-5-files instead
IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"

REQUIRED_USE="
${PYTHON_REQUIRED_USE}
ipxe? ( rombios )
ovmf? ( hvm )
pygrub? ( python )
rombios? ( hvm )
system-ipxe? ( rombios )
?? ( ipxe system-ipxe )
?? ( qemu system-qemu )"

COMMON_DEPEND="
sys-apps/pciutils
dev-libs/lzo:2
dev-libs/glib:2
dev-libs/yajl
dev-libs/libaio
dev-libs/libgcrypt:0
sys-libs/zlib
${PYTHON_DEPS}
"

DEPEND="${COMMON_DEPEND}
>=sys-kernel/linux-headers-4.11
$(python_gen_cond_dep '
dev-python/lxml[${PYTHON_MULTI_USEDEP}]
pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
')
x86? ( sys-devel/dev86
system-ipxe? ( sys-firmware/ipxe[qemu] )
sys-power/iasl )
api? ( dev-libs/libxml2
net-misc/curl )

ovmf? (
!arm? ( !arm64? ( dev-lang/nasm ) )
$(python_gen_impl_dep sqlite)
)
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-power/iasl
system-seabios? ( sys-firmware/seabios )
system-ipxe? ( sys-firmware/ipxe[qemu] )
rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
dev-lang/perl
app-misc/pax-utils
doc? (
app-text/ghostscript-gpl
app-text/pandoc
$(python_gen_cond_dep '
dev-python/markdown[${PYTHON_MULTI_USEDEP}]
')
dev-texlive/texlive-latexextra
media-gfx/transfig
)
hvm? ( x11-base/xorg-proto )
qemu? (
app-arch/snappy:=
x11-libs/pixman
sdl? (
media-libs/libsdl[X]
media-libs/libsdl2[X]
)
)
system-qemu? ( app-emulation/qemu[xen] )
ocaml? ( dev-ml/findlib
>=dev-lang/ocaml-4 )
python? ( >=dev-lang/swig-4.0.0 )"

RDEPEND="${COMMON_DEPEND}
sys-apps/iproute2[-minimal]
net-misc/bridge-utils
screen? (
app-misc/screen
app-admin/logrotate
)"

# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="
usr/libexec/xen/boot/hvmloader
usr/share/qemu-xen/qemu/hppa-firmware.img
usr/share/qemu-xen/qemu/s390-ccw.img
usr/share/qemu-xen/qemu/u-boot.e500
"

QA_PREBUILT="
usr/libexec/xen/bin/elf2dmp
usr/libexec/xen/bin/ivshmem-client
usr/libexec/xen/bin/ivshmem-server
usr/libexec/xen/bin/qemu-edid
usr/libexec/xen/bin/qemu-img
usr/libexec/xen/bin/qemu-io
usr/libexec/xen/bin/qemu-keymap
usr/libexec/xen/bin/qemu-nbd
usr/libexec/xen/bin/qemu-pr-helper
usr/libexec/xen/bin/qemu-system-i386
usr/libexec/xen/bin/virtfs-proxy-helper
usr/libexec/xen/libexec/xen-bridge-helper
usr/share/qemu-xen/qemu/s390-ccw.img
usr/share/qemu-xen/qemu/s390-netboot.img
usr/share/qemu-xen/qemu/u-boot.e500
"

RESTRICT="test"

pkg_setup() {
python_setup
export "CONFIG_LOMOUNT=y"

#bug 522642, disable compile tools/tests
export "CONFIG_TESTS=n"

if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif use x86; then
export XEN_TARGET_ARCH="x86_32"
elif use amd64 ; then
export XEN_TARGET_ARCH="x86_64"
elif use arm; then
export XEN_TARGET_ARCH="arm32"
elif use arm64; then
export XEN_TARGET_ARCH="arm64"
else
die "Unsupported architecture!"
fi
fi
}

src_prepare() {
local i

# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
einfo "Try to apply Xen Upstream patch set"
eapply "${WORKDIR}"/patches-upstream
fi

# Security patchset
if [[ -n ${SECURITY_VER} ]]; then
einfo "Try to apply Xen Security patch set"
# apply main xen patches
# Two parallel systems, both work side by side
# Over time they may concdense into one. This will suffice for now
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"

source "${WORKDIR}"/patches-security/${PV}.conf || die

for i in ${XEN_SECURITY_MAIN}; do
eapply "${WORKDIR}"/patches-security/xen/$i
done

# apply qemu-xen/upstream patches
pushd "${S}"/tools/qemu-xen/ > /dev/null
for i in ${XEN_SECURITY_QEMUU}; do
eapply "${WORKDIR}"/patches-security/qemuu/$i
done
popd > /dev/null

# apply qemu-traditional patches
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
for i in ${XEN_SECURITY_QEMUT}; do
eapply "${WORKDIR}"/patches-security/qemut/$i
done
popd > /dev/null
fi

# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
pushd tools/firmware/ > /dev/null
ln -s seabios-dir-remote seabios-dir || die
popd > /dev/null

# Gentoo's patchset
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
einfo "Try to apply Gentoo specific patch set"
source "${FILESDIR}"/gentoo-patches.conf || die
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
for i in ${!_gpv}; do
eapply "${WORKDIR}"/patches-gentoo/$i
done
fi

# Ovmf's patchset
if use ovmf; then
if [[ -n ${OVMF_VER} ]];then
einfo "Try to apply Ovmf patch set"
pushd "${WORKDIR}"/edk2-*/ > /dev/null
eapply "${WORKDIR}"/patches-ovmf
popd > /dev/null
fi
mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
fi

# ipxe
if use ipxe; then
cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die

# gcc 10
cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
fi

mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die

# Fix texi2html build error with new texi2html, qemu.doc.html
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die

use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-i tools/firmware/Makefile || die

# Drop .config, fixes to gcc-4.6
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"

# drop flags
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
unset CPPFLAGS

if ! use pygrub; then
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
fi

if ! use python; then
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
fi

if ! use hvm; then
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
# Bug 351648
elif ! use x86 && ! has x86 $(get_all_abis); then
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
export CPATH="${WORKDIR}"/extra-headers
fi

if use qemu; then
if use sdl; then
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
tools/Makefile || die
else
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
tools/qemu-xen-traditional/xen-setup || die
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
tools/Makefile || die
fi
else
# Don't bother with qemu, only needed for fully virtualised guests
sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
fi

# Reset bash completion dir; Bug 472438
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-i Config.mk || die
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die

# xencommons, Bug #492332, sed lighter weight than patching
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-i tools/hotplug/Linux/init.d/xencommons.in || die

# fix bashishm
sed -e '/Usage/s/\$//g' \
-i tools/hotplug/Linux/init.d/xendriverdomain.in || die

# respect multilib, usr/lib/libcacard.so.0.0.0
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-i tools/qemu-xen/configure || die

#bug 518136, don't build 32bit exactuable for nomultilib profile
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
fi

# uncomment lines in xl.conf
sed -e 's:^#autoballoon=:autoballoon=:' \
-e 's:^#lockfile=:lockfile=:' \
-e 's:^#vif.default.script=:vif.default.script=:' \
-i tools/examples/xl.conf || die

# disable capstone (Bug #673474)
sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-i tools/Makefile || die

# disable glusterfs
sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-i tools/Makefile || die

default
}

src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--localstatedir=${EPREFIX}/var \
--disable-werror \
--disable-xen \
--enable-tools \
--enable-docs \
$(use_enable api xenapi) \
$(use_enable ipxe) \
$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
$(use_enable ocaml ocamltools) \
$(use_enable ovmf) \
$(use_enable pam) \
$(use_enable rombios) \
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
"

use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
use amd64 && myconf+=" $(use_enable qemu-traditional)"
tc-ld-disable-gold # Bug 669570
econf ${myconf}
}

src_compile() {
local myopt
use debug && myopt="${myopt} debug=y"
use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"

if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi

emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}

if use doc; then
emake -C docs build
else
emake -C docs man-pages
fi
}

src_install() {
# Override auto-detection in the build system, bug #382573
export INITD_DIR=/tmp/init.d
export CONFIG_LEAF_DIR=../tmp/default

# Let the build system compile installed Python modules.
local PYTHONDONTWRITEBYTECODE
export PYTHONDONTWRITEBYTECODE

emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
XEN_PYTHON_NATIVE_INSTALL=y install-tools

# Created at runtime
rm -rv "${ED}/var/run" || die

# Fix the remaining Python shebangs.
python_fix_shebang "${D}"

# Remove RedHat-specific stuff
rm -rf "${D}"/tmp || die

if use doc; then
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
dodoc -r docs/{pdf,txt}
else
emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
fi
dodoc ${DOCS[@]}

newconfd "${FILESDIR}"/xendomains.confd xendomains
newconfd "${FILESDIR}"/xenstored.confd xenstored
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
newinitd "${FILESDIR}"/xencommons.initd xencommons
newconfd "${FILESDIR}"/xencommons.confd xencommons
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog

if use screen; then
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
keepdir /var/log/xen-consoles
fi

# For -static-libs wrt Bug 384355
if ! use static-libs; then
rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
fi

# for xendomains
keepdir /etc/xen/auto

# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die

keepdir /var/lib/xen/dump
keepdir /var/lib/xen/xenpaging
keepdir /var/lib/xenstored
keepdir /var/log/xen

if use python; then
python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
fi

python_optimize
}

pkg_postinst() {
elog "Official Xen Guide and the offical wiki page:"
elog "https://wiki.gentoo.org/wiki/Xen"
elog "https://wiki.xen.org/wiki/Main_Page"
elog ""
elog "Recommended to utilise the xencommons script to config system at boot"
elog "Add by use of rc-update on completion of the install"

if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 system is required to build HVM support."
fi

if use qemu; then
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
fi
}

+ 0
- 512
app-emulation/xen-tools/xen-tools-4.13.2-r3.ebuild View File

@@ -1,512 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..9} )
PYTHON_REQ_USE='ncurses,xml,threads(+)'

inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs

MY_PV=${PV/_/-}

if [[ ${PV} == *9999 ]]; then
inherit git-r3
REPO="xen.git"
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
UPSTREAM_VER=6
SECURITY_VER=29
# xen-tools's gentoo patches tarball
GENTOO_VER=21
# xen-tools's gentoo patches version which apply to this specific ebuild
GENTOO_GPV=1
# xen-tools ovmf's patches
OVMF_VER=

SEABIOS_VER="1.12.1"
EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
EDK2_OPENSSL_VERSION="1_1_1g"
EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"

[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
[[ -n ${OVMF_VER} ]] && \
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"

SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
${OVMF_PATCHSET_URI} )
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"

S="${WORKDIR}/xen-${MY_PV}"
fi

DESCRIPTION="Xen tools including QEMU and xl"
HOMEPAGE="https://www.xenproject.org"
DOCS=( README )

LICENSE="GPL-2"
SLOT="0/$(ver_cut 1-2)"
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
# >=dev-lang/ocaml-4 stable
# Masked in profiles/eapi-5-files instead
IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"

REQUIRED_USE="
${PYTHON_REQUIRED_USE}
ipxe? ( rombios )
ovmf? ( hvm )
pygrub? ( python )
rombios? ( hvm )
system-ipxe? ( rombios )
?? ( ipxe system-ipxe )
?? ( qemu system-qemu )"

COMMON_DEPEND="
sys-apps/pciutils
dev-libs/lzo:2
dev-libs/glib:2
dev-libs/yajl
dev-libs/libaio
dev-libs/libgcrypt:0
sys-libs/zlib
${PYTHON_DEPS}
"

DEPEND="${COMMON_DEPEND}
>=sys-kernel/linux-headers-4.11
$(python_gen_cond_dep '
dev-python/lxml[${PYTHON_MULTI_USEDEP}]
pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
')
x86? ( sys-devel/dev86
system-ipxe? ( sys-firmware/ipxe[qemu] )
sys-power/iasl )
api? ( dev-libs/libxml2
net-misc/curl )

ovmf? (
!arm? ( !arm64? ( dev-lang/nasm ) )
$(python_gen_impl_dep sqlite)
)
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-power/iasl
system-seabios? ( sys-firmware/seabios )
system-ipxe? ( sys-firmware/ipxe[qemu] )
rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
dev-lang/perl
app-misc/pax-utils
doc? (
app-text/ghostscript-gpl
app-text/pandoc
$(python_gen_cond_dep '
dev-python/markdown[${PYTHON_MULTI_USEDEP}]
')
dev-texlive/texlive-latexextra
media-gfx/transfig
)
hvm? ( x11-base/xorg-proto )
qemu? (
app-arch/snappy:=
x11-libs/pixman
sdl? (
media-libs/libsdl[X]
media-libs/libsdl2[X]
)
)
system-qemu? ( app-emulation/qemu[xen] )
ocaml? ( dev-ml/findlib
>=dev-lang/ocaml-4 )
python? ( >=dev-lang/swig-4.0.0 )"

RDEPEND="${COMMON_DEPEND}
sys-apps/iproute2[-minimal]
net-misc/bridge-utils
screen? (
app-misc/screen
app-admin/logrotate
)"

# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="
usr/libexec/xen/boot/hvmloader
usr/share/qemu-xen/qemu/hppa-firmware.img
usr/share/qemu-xen/qemu/s390-ccw.img
usr/share/qemu-xen/qemu/u-boot.e500
"

QA_PREBUILT="
usr/libexec/xen/bin/elf2dmp
usr/libexec/xen/bin/ivshmem-client
usr/libexec/xen/bin/ivshmem-server
usr/libexec/xen/bin/qemu-edid
usr/libexec/xen/bin/qemu-img
usr/libexec/xen/bin/qemu-io
usr/libexec/xen/bin/qemu-keymap
usr/libexec/xen/bin/qemu-nbd
usr/libexec/xen/bin/qemu-pr-helper
usr/libexec/xen/bin/qemu-system-i386
usr/libexec/xen/bin/virtfs-proxy-helper
usr/libexec/xen/libexec/xen-bridge-helper
usr/share/qemu-xen/qemu/s390-ccw.img
usr/share/qemu-xen/qemu/s390-netboot.img
usr/share/qemu-xen/qemu/u-boot.e500
"

RESTRICT="test"

pkg_setup() {
python_setup
export "CONFIG_LOMOUNT=y"

#bug 522642, disable compile tools/tests
export "CONFIG_TESTS=n"

if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif use x86; then
export XEN_TARGET_ARCH="x86_32"
elif use amd64 ; then
export XEN_TARGET_ARCH="x86_64"
elif use arm; then
export XEN_TARGET_ARCH="arm32"
elif use arm64; then
export XEN_TARGET_ARCH="arm64"
else
die "Unsupported architecture!"
fi
fi
}

src_prepare() {
local i

# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
einfo "Try to apply Xen Upstream patch set"
eapply "${WORKDIR}"/patches-upstream
fi

# Security patchset
if [[ -n ${SECURITY_VER} ]]; then
einfo "Try to apply Xen Security patch set"
# apply main xen patches
# Two parallel systems, both work side by side
# Over time they may concdense into one. This will suffice for now
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"

source "${WORKDIR}"/patches-security/${PV}.conf || die

for i in ${XEN_SECURITY_MAIN}; do
eapply "${WORKDIR}"/patches-security/xen/$i
done

# apply qemu-xen/upstream patches
pushd "${S}"/tools/qemu-xen/ > /dev/null
for i in ${XEN_SECURITY_QEMUU}; do
eapply "${WORKDIR}"/patches-security/qemuu/$i
done
popd > /dev/null

# apply qemu-traditional patches
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
for i in ${XEN_SECURITY_QEMUT}; do
eapply "${WORKDIR}"/patches-security/qemut/$i
done
popd > /dev/null
fi

# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
pushd tools/firmware/ > /dev/null
ln -s seabios-dir-remote seabios-dir || die
popd > /dev/null

# Gentoo's patchset
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
einfo "Try to apply Gentoo specific patch set"
source "${FILESDIR}"/gentoo-patches.conf || die
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
for i in ${!_gpv}; do
eapply "${WORKDIR}"/patches-gentoo/$i
done
fi

# Ovmf's patchset
if use ovmf; then
if [[ -n ${OVMF_VER} ]];then
einfo "Try to apply Ovmf patch set"
pushd "${WORKDIR}"/edk2-*/ > /dev/null
eapply "${WORKDIR}"/patches-ovmf
popd > /dev/null
fi
mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
fi

# ipxe
if use ipxe; then
cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die

# gcc 10
cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
fi

mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die

# Fix texi2html build error with new texi2html, qemu.doc.html
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die

use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-i tools/firmware/Makefile || die

# Drop .config, fixes to gcc-4.6
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"

# drop flags
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
unset CPPFLAGS

if ! use pygrub; then
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
fi

if ! use python; then
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
fi

if ! use hvm; then
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
# Bug 351648
elif ! use x86 && ! has x86 $(get_all_abis); then
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
export CPATH="${WORKDIR}"/extra-headers
fi

if use qemu; then
if use sdl; then
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
tools/Makefile || die
else
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
tools/qemu-xen-traditional/xen-setup || die
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
tools/Makefile || die
fi
else
# Don't bother with qemu, only needed for fully virtualised guests
sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
fi

# Reset bash completion dir; Bug 472438
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-i Config.mk || die
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die

# xencommons, Bug #492332, sed lighter weight than patching
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-i tools/hotplug/Linux/init.d/xencommons.in || die

# fix bashishm
sed -e '/Usage/s/\$//g' \
-i tools/hotplug/Linux/init.d/xendriverdomain.in || die

# respect multilib, usr/lib/libcacard.so.0.0.0
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-i tools/qemu-xen/configure || die

#bug 518136, don't build 32bit exactuable for nomultilib profile
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
fi

# uncomment lines in xl.conf
sed -e 's:^#autoballoon=:autoballoon=:' \
-e 's:^#lockfile=:lockfile=:' \
-e 's:^#vif.default.script=:vif.default.script=:' \
-i tools/examples/xl.conf || die

# disable capstone (Bug #673474)
sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-i tools/Makefile || die

# disable glusterfs
sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-i tools/Makefile || die

default
}

src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--localstatedir=${EPREFIX}/var \
--disable-werror \
--disable-xen \
--enable-tools \
--enable-docs \
$(use_enable api xenapi) \
$(use_enable ipxe) \
$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
$(use_enable ocaml ocamltools) \
$(use_enable ovmf) \
$(use_enable pam) \
$(use_enable rombios) \
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
"

use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
use amd64 && myconf+=" $(use_enable qemu-traditional)"
tc-ld-disable-gold # Bug 669570
econf ${myconf}
}

src_compile() {