From c8a77dfe4d3d307c1d5dd2650b7297447d8b609d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 12 Jan 2019 16:58:08 +0000 Subject: gentoo resync : 12.01.2019 --- sys-block/Manifest.gz | Bin 11193 -> 11193 bytes sys-block/partimage/Manifest | 2 + ...partimage-0.6.9-openssl-1.1-compatibility.patch | 41 ++++++ sys-block/partimage/partimage-0.6.9-r1.ebuild | 144 +++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 sys-block/partimage/files/partimage-0.6.9-openssl-1.1-compatibility.patch create mode 100644 sys-block/partimage/partimage-0.6.9-r1.ebuild (limited to 'sys-block') diff --git a/sys-block/Manifest.gz b/sys-block/Manifest.gz index 43de783b68bc..06d8a00c752f 100644 Binary files a/sys-block/Manifest.gz and b/sys-block/Manifest.gz differ diff --git a/sys-block/partimage/Manifest b/sys-block/partimage/Manifest index 6c856cf537b5..706cdac68a94 100644 --- a/sys-block/partimage/Manifest +++ b/sys-block/partimage/Manifest @@ -1,4 +1,5 @@ AUX partimage-0.6.9-minor-typo.patch 313 BLAKE2B c0d04a86e0d4c27ce8a1b097525c029c258ef37968058a888f2fbfc55da2035134b058c8b1118a0f86a3c3b5cd63116d5435371b43f9ba4b0f3e70ec830d18e8 SHA512 7bf9de9b08afce5c3b2bfa8943561df0605066866f7ba748872c9f81e1be4033e6f88c8033af1e1b7e2adb64263e8177ba9bcad1ac2e613b27e9c219fbff6828 +AUX partimage-0.6.9-openssl-1.1-compatibility.patch 1445 BLAKE2B 086fa11a2dc3326b86cdfd43abda921fbf7a03c95adf7cba28675ed5c8334582feedd0e1adbe16e7750333fcf730d67fd02f3a9a49a8f4d08881964eff51dadb SHA512 96c398a3d536ed6dc54ef8d6012f1ecefe78fd8a27b74966ba8d6095e593cbcd33213dc485c6dc13ee45a517928de2bce639b5679e91ed2aea2adb1f5b3efba6 AUX partimage-0.6.9-zlib-1.2.5.2.patch 975 BLAKE2B 0e7e1de1ef590f74b46d94aaaa6eaf2eb62f06c3f33432d0201c820ec4e218d746ee8964e8cdfa1fc31bf31da1fb18fdfe3cb798cbb3111c17194dadbf4d6707 SHA512 8f5310a65e77822f816bedca9281be7627246f111960fc4092c2e3d44fa1bfcea786c130899970ce35da8be536491ae46b0ac1825d85ab6ccb6b1332f2f1b4e2 AUX partimaged.conf 307 BLAKE2B f1d0bc946a517f4896b55c749c0f244731d413119dfc15c22f5e0834ca87cdb37b278f8907bb18dade3a1ab48cbea3a4d7ef5b836af32260cbf1653627855a2f SHA512 1be320a8dceb3076e6aa2d8b1a8a4d01a380ad1209133997fd0d87cf1d0974fc4877c3c8b41c07fbb99249c8a00132f2c5fa7ffadf26f4e41cc2abfcd6b62116 AUX partimaged.init 644 BLAKE2B 92bfc28cb2a093bc9a0d94bb5730ff6f402f28ed48f281f0fa392950de02b498fe7d31ab8a0d96f20ced8fd41b5b912319a0d8fceb9321529237c1d48a85f046 SHA512 1e85bcd3012897cb093e87667a4c937b390967317ceaa547484d4f56c760a746faeb4290996155505978eefb4bd1e84e4b11fcc31a59f1e322c83351227c96d5 @@ -7,5 +8,6 @@ AUX partimaged.pam 266 BLAKE2B d46ffadffba0635c4fce9612e4bdd187aa5e17b823d747d8b AUX partimaged.pam.2 249 BLAKE2B e40a15c5fe4dc394cbcf9c478c3c764e67ec317f31c039738c87b90fec79577a191ae85ad0b774e8b415b79bd29460c929f094e4e3210660989a7bdb9939fe8a SHA512 ad55a61e574dc44cdda723bb5a46349d15e50353dcdb99474b9acafd56c93bc6ffdd75f5b0d9e80849d9bebf5c7b9a2f84c7cefc5f0a86f54f9477a0962794cd AUX servercert.cnf 980 BLAKE2B 0660f9b92fe422754e36d6ce1889e8b8feb40954b36b3e00e58f5e534b85171ac42e66f74020a55dd1b14d56d7764c94427b8d1d112ca1a878dff388ac3ea787 SHA512 8aa0592ce0be3f08124880b823db59aa167e7d509ea1a9b48d9f895482f96e99a6e4df330c567b9ce331eed43cb4f1a70b1b7727878972a8b074265898b1e557 DIST partimage-0.6.9.tar.bz2 666522 BLAKE2B d9a240f82a7b6ae73997df46c964fdddf8dddea9e3bd9548252d9409a526358714908316c52864b60bc9fcc1113a5e1c6cf294faff6845a183c7ffe1012475a6 SHA512 252885921b23933fdcdf0bb6efa4b82066b08ca95cc653296912d384ae875b421c1d39f347a90115315139176d4eab4a930c24919c2d38cf00ed29c764cd14d9 +EBUILD partimage-0.6.9-r1.ebuild 3554 BLAKE2B 59d0adcffc6fac18b30edaaab7b480f423eb12f700bbda72a6da49762fa13552cdac50468b03f79e1e29f79c619f2b54deb1d406c178342c4c454693a6cfa8be SHA512 88d63c8144ae2832a3b4fe1377218c2ca2211d3facbc915a6467faea887a7e0f1acea163224d17b26d722d5da787b04122c28e3e0481d191ceafee9674ed2100 EBUILD partimage-0.6.9.ebuild 3445 BLAKE2B f90a263110eba0d69d7d21a643ba6eee353d49624ceeddd50b605ad7cee19a6fbcdfb2fc67ee3e41ce67685243f215df93221157e7e53d953cd6ea1a5a813e1b SHA512 c48ec114f05b868bf525234aa7ef9011efa4e61343123e56a8012cadf548968ad805bbe8658c4e02fa36201bbe3ce462e1ab550c4b5eb09cd071b7c2112c5563 MISC metadata.xml 427 BLAKE2B 33870f2fc393bed75dcdbda1bb16d6cc947cfa4f7321e7f219338cab014be901eca6d3e2dc11c0ecd50be28922f0f1a746a8756c3d860d8f10549098c3479cad SHA512 e5e5377e9f6cf6337b93ea8609424ce4b9514b0b0d9628ef22999537af616f24e4882a915cf6249f8d0e721b5e25e0a50f5e046b8ac9991c130b4f5892298e67 diff --git a/sys-block/partimage/files/partimage-0.6.9-openssl-1.1-compatibility.patch b/sys-block/partimage/files/partimage-0.6.9-openssl-1.1-compatibility.patch new file mode 100644 index 000000000000..af4d9c153df2 --- /dev/null +++ b/sys-block/partimage/files/partimage-0.6.9-openssl-1.1-compatibility.patch @@ -0,0 +1,41 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -240,7 +240,7 @@ if test "$SSL" = "yes"; then + AC_CHECKING([ for SSL Library and Header files ... ]) + AC_SEARCH_HEADERS(rsa.h crypto.h x509.h pem.h ssl.h err.h, + $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include, +- [ AC_CHECK_LIB(crypto, CRYPTO_lock, [LIBS="$LIBS -lcrypto"], ++ [ AC_CHECK_LIB(crypto, X509_new, [LIBS="$LIBS -lcrypto"], + AC_MSG_ERROR([ Required for SSL Crypto Library not found. ]) + ) + AC_CHECK_LIB(ssl, SSL_CTX_new, +--- a/src/client/netclient.cpp ++++ b/src/client/netclient.cpp +@@ -43,7 +43,11 @@ CNetClient::CNetClient(bool bMustLogin, bool bUseSSL):CNet() + { + showDebug(3, "initializing client ssl\n"); + SSLeay_add_ssl_algorithms(); +- meth = SSLv2_client_method(); ++#if OPENSSL_VERSION_NUMBER < 0x10100000 ++ meth = TLSv1_client_method(); ++#else ++ meth = TLS_client_method(); ++#endif + SSL_load_error_strings(); + ctx = SSL_CTX_new(meth); + if (!ctx) +--- a/src/server/netserver.cpp ++++ b/src/server/netserver.cpp +@@ -39,7 +39,11 @@ CNetServer::CNetServer(unsigned short int port):CNet() + { + SSL_load_error_strings(); + SSLeay_add_ssl_algorithms(); +- meth = SSLv23_server_method(); ++#if OPENSSL_VERSION_NUMBER < 0x10100000 ++ meth = TLSv1_server_method(); ++#else ++ meth = TLS_server_method(); ++#endif + ctx = SSL_CTX_new(meth); + if (!ctx) + { diff --git a/sys-block/partimage/partimage-0.6.9-r1.ebuild b/sys-block/partimage/partimage-0.6.9-r1.ebuild new file mode 100644 index 000000000000..5828263d3810 --- /dev/null +++ b/sys-block/partimage/partimage-0.6.9-r1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools flag-o-matic pam user + +DESCRIPTION="Console-based application to efficiently save raw partition data to image file" +HOMEPAGE="http://www.partimage.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="nls nologin pam ssl static" + +LIBS_DEPEND="app-arch/bzip2 + >=dev-libs/newt-0.52 + >=sys-libs/slang-2 + sys-libs/zlib:= + ssl? ( dev-libs/openssl:0= )" +PAM_DEPEND="!static? ( pam? ( virtual/pam ) )" +RDEPEND="${PAM_DEPEND} + !static? ( ${LIBS_DEPEND} )" +DEPEND="${PAM_DEPEND} + ${LIBS_DEPEND} + nls? ( sys-devel/gettext )" + +pkg_setup() { + enewgroup partimag 91 + enewuser partimag 91 -1 /var/lib/partimage partimag +} + +src_prepare() { + eapply -p0 "${FILESDIR}"/${P}-zlib-1.2.5.2.patch #405323 + eapply "${FILESDIR}"/${P}-minor-typo.patch #580290 + eapply "${FILESDIR}"/${P}-openssl-1.1-compatibility.patch + + eapply_user + + eautoreconf +} + +src_configure() { + # XXX: Do we still need these? + filter-flags -fno-exceptions + use ppc && append-flags -fsigned-char + + local myconf + + use nologin && myconf="${myconf} --disable-login" + + if use pam && ! use static; then + myconf="${myconf} --enable-pam" + fi + + econf \ + --docdir="${EPREFIX%/}"/usr/share/doc/${PF} \ + --sysconfdir="${EPREFIX%/}"/etc \ + $(use_enable nls) \ + $(use_enable ssl) \ + --disable-pam \ + $(use_enable static all-static) \ + --with-log-dir="${EPREFIX%/}"/var/log/partimage \ + ${myconf} +} + +src_install() { + default + + keepdir /var/lib/partimage + keepdir /var/log/partimage + + newinitd "${FILESDIR}"/partimaged.init.2 partimaged + newconfd "${FILESDIR}"/partimaged.conf partimaged + + if use ssl; then + insinto /etc/partimaged + doins "${FILESDIR}"/servercert.cnf + fi + + if use pam; then + newpamd "${FILESDIR}"/partimaged.pam.2 partimaged + fi +} + +confdir=${EROOT%/}/etc/partimaged +privkey=${confdir}/partimaged.key +cnf=${confdir}/servercert.cnf +csr=${confdir}/partimaged.csr +cert=${confdir}/partimaged.cert + +pkg_config() { + if use ssl; then + ewarn "Please customize /etc/partimaged/servercert.cnf before you continue!" + ewarn "Press Ctrl-C to break now for it, or press enter to continue." + read + if [ ! -f ${privkey} ]; then + einfo "Generating unencrypted private key: ${privkey}" + openssl genrsa -out ${privkey} 1024 || die + else + einfo "Private key already exists: ${privkey}" + fi + if [ ! -f ${csr} ]; then + einfo "Generating certificate request: ${csr}" + openssl req -new -x509 -outform PEM -out ${csr} -key ${privkey} -config ${cnf} || die + else + einfo "Certificate request already exists: ${csr}" + fi + if [ ! -f ${cert} ]; then + einfo "Generating self-signed certificate: ${cert}" + openssl x509 -in ${csr} -out ${cert} -signkey ${privkey} || die + else + einfo "Self-signed certifcate already exists: ${cert}" + fi + einfo "Setting permissions" + partimagesslperms || die + einfo "Done" + else + einfo "SSL is disabled, not building certificates" + fi +} + +partimagesslperms() { + local ret=0 + chmod 600 ${privkey} 2>/dev/null + ret=$((${ret}+$?)) + chown partimag:0 ${privkey} 2>/dev/null + ret=$((${ret}+$?)) + chmod 644 ${cert} ${csr} 2>/dev/null + ret=$((${ret}+$?)) + chown root:0 ${cert} ${csr} 2>/dev/null + ret=$((${ret}+$?)) + return $ret +} + +pkg_postinst() { + if use ssl; then + einfo "To create the required SSL certificates, please do:" + einfo "emerge --config =${PF}" + partimagesslperms + return 0 + fi + chown partimag:0 "${EROOT%/}"/etc/partimaged/partimagedusers || die +} -- cgit v1.2.3