Sync with portage [Mon Mar 21 13:09:44 MSK 2016].

mhiretskiy 268
root 8 years ago
parent f002c60ad4
commit c8128ee917

@ -12,7 +12,7 @@ SRC_URI="https://dev.gentoo.org/~ulm/eselect/${P}.tar.xz"
LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-3.0 )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc emacs vim-syntax"
RDEPEND="sys-apps/sed

@ -12,7 +12,7 @@ SRC_URI="https://github.com/logrotate/logrotate/archive/${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
IUSE="acl +cron selinux"
CDEPEND="

@ -1,10 +1,10 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
USE_RUBY="ruby19 ruby20"
USE_RUBY="ruby20"
inherit ruby-ng

@ -1,4 +1,2 @@
DIST webmin-1.770-minimal.tar.gz 2612198 SHA256 e976091dcf0a68dfb02d5633d09da2ce9dc69d8ea2bde95c3cc57a0a25384488 SHA512 3661e37bbeb9f814862ff208d32ec4bfa15e8e826c15833e47c3a39cb0bb47d1f227c0c942f72aed4f3e9344556cc0ef8de42a5961c6795ef01986abafe9949b WHIRLPOOL 92a89623da8ba09d921ffec38c45c2c4bf04c8249178d9d13d34339ecc902d8d7184396ce29c04bfb6e9eba463c2942dc5d9d10d05af463b4dbf9337891bcc02
DIST webmin-1.770.tar.gz 28441983 SHA256 eb84f1adbb099d0a2e633fbc4ea4838d1ddbcc84135d6a897803fbd0284719ba SHA512 460d9e06379df8d950874906589938077fd0fc70ed12948a685c1386c9995538d92387e252373398319469406b8ef0daab67dabe8c71b2f1961a5d5cb6848a7f WHIRLPOOL 4556f51001d010b66c6af265904b3f634f7bccf1afeb74be6de0824fefb2a5b2a5508d751bfa4abcfd0cb8b670659474ecf4e564505e446ed36a737e4f100dc0
DIST webmin-1.780-minimal.tar.gz 2624841 SHA256 d4f51fcc448a881d568a32dce1712f4feb1d15bccb05005117179b8a6488e403 SHA512 a0fc61c202d94419f52572a95df23f4dd54c3b0552ce96df356b13b529988cb4be02e5f1165fbd5fbe30921697baac8b229d8d587860e3adabcbe2a4bfb11806 WHIRLPOOL f8b94e16b041cef115cfa7a49fbb34d432f9f96b28959e3f161df9de5805d4a38d7a019479e96ee886dd6f4c21e5884864a69b923ec3b0ac92422c530a95249c
DIST webmin-1.780.tar.gz 28578888 SHA256 eb2613a4f4525cbbd04435580a843cb2a454bcf2712301105657cc114beda40e SHA512 1d5552fc09e0a42218881d2d028b8e73deadfca36022a6212e540e8dbbd2ff5fe23883fc4d3b4d63abee0a2aee570ce9710e4e1b75c2cc28f70724502d6680d7 WHIRLPOOL 7ef76b9e3f64d01978aa281d7e57db37078bab4ec101faa115f51ebf43bc0823d8a8bfa925dff5d1a39b0b9aabdada2218d543b14d3961b1346de05c46137d4b
DIST webmin-1.791-minimal.tar.gz 2635024 SHA256 d269fcccf0034edff44654fb40b83f63e3274f722a8f0d5b14f1fa9f74f49b00 SHA512 e8e7b43865399e918ef017d4d710b21cc7ce2f6566056faa82d756be29f038e07a20055978531f8785639c78339970fbfeabd4a4aa1fa4b331f3a344a78954d2 WHIRLPOOL e8380478edf6b994e03623a9a6b84f736a6c5efd1dbe0aac3905f85457d172a783af0231d4b3606d69c63129c4c4d3d80fa10608dd47374a01f45be7fd53b281
DIST webmin-1.791.tar.gz 28800013 SHA256 e62148a2263c016a66e7c825c5cb124614268c1da1e0f0bee75cd060c3acfa9c SHA512 4ba19f057ee70bc0a283753a6c190bbae15f0e2af1650ef1656c7b94e07a6750203ef3b7190f7abd544b25988446df6b174bf06191426893bd4224e54451e771 WHIRLPOOL 2d739e1c3ba06b04086b7d20eb646f950aa8776b4fc41bc975cb160733e70a5c7a4de6f331c294bf168e3f8fd5009c72d617eab662078f6d901087b3cfc2db36

@ -94,12 +94,13 @@ if [ "$upgrading" = 1 ]; then
real_os_type=`grep "^real_os_type=" $config_dir/config | sed -e 's/real_os_type=//g'`
real_os_version=`grep "^real_os_version=" $config_dir/config | sed -e 's/real_os_version=//g'`
# Get port, ssl, no_ssl2, no_ssl3, ssl_redirect, no_sslcompression, no_tls1, no_tls1_1 and keyfile
# Get port, ssl, no_ssl2, no_ssl3, ssl_redirect, no_sslcompression, ssl_honorcipherorder, no_tls1, no_tls1_1 and keyfile
port=`grep "^port=" $config_dir/miniserv.conf | sed -e 's/port=//g'`
ssl=`grep "^ssl=" $config_dir/miniserv.conf | sed -e 's/ssl=//g'`
no_ssl2=`grep "^no_ssl2=" $config_dir/miniserv.conf | sed -e 's/no_ssl2=//g'`
no_ssl3=`grep "^no_ssl3=" $config_dir/miniserv.conf | sed -e 's/no_ssl3=//g'`
ssl_redirect=`grep "^ssl_redirect=" $config_dir/miniserv.conf | sed -e 's/ssl_redirect=//g'`
ssl_honorcipherorder=`grep "^ssl_honorcipherorder=" $config_dir/miniserv.conf | sed -e 's/ssl_honorcipherorder=//g'`
no_sslcompression=`grep "^no_sslcompression=" $config_dir/miniserv.conf | sed -e 's/no_sslcompression=//g'`
no_tls1=`grep "^no_tls1=" $config_dir/miniserv.conf | sed -e 's/no_tls1=//g'`
no_tls1_1=`grep "^no_tls1_1=" $config_dir/miniserv.conf | sed -e 's/no_tls1_1=//g'`
@ -146,6 +147,7 @@ else
echo "no_ssl2=$no_ssl2" >> $cfile
echo "no_ssl3=$no_ssl3" >> $cfile
echo "ssl_redirect=$ssl_redirect" >> $cfile
echo "ssl_honorcipherorder=$ssl_honorcipherorder" >> $cfile
echo "no_sslcompression=$no_sslcompression" >> $cfile
echo "no_tls1=$no_tls1" >> $cfile
echo "no_tls1_1=$no_tls1_1" >> $cfile
@ -307,6 +309,11 @@ if [ "$?" != "0" ]; then
echo passwd_mode=0 >> $config_dir/miniserv.conf
fi
grep ssl_honorcipherorder= $config_dir/miniserv.conf >/dev/null
if [ "$?" != "0" ]; then
echo ssl_honorcipherorder=1 >> $config_dir/miniserv.conf
fi
# Disable SSL compression to defeat BEAST attack
grep no_sslcompression= $config_dir/miniserv.conf >/dev/null
if [ "$?" != "0" ]; then

@ -1,307 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit eutils pam ssl-cert systemd
DESCRIPTION="A web-based Unix systems administration interface"
HOMEPAGE="http://www.webmin.com/"
SRC_URI="minimal? ( mirror://sourceforge/webadmin/${P}-minimal.tar.gz )
!minimal? ( mirror://sourceforge/webadmin/${P}.tar.gz )"
LICENSE="BSD GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# NOTE: The ssl flag auto added by ssl-cert eclass is not used actually
# because openssl is forced by dev-perl/Net-SSLeay
IUSE="minimal +ssl mysql postgres ldap"
# All the required perl modules can be found easily using (in Webmin's root src dir):
# find . -name cpan_modules.pl -exec grep "::" {} \;
# NOTE: If Webmin doesn't find the required perl modules, it offers(runtime) the user
# to install them using the in-built cpan module, and this will mess up perl on the system
# That's why some modules are forced without a use flag
# NOTE: pam, ssl and dnssec-tools deps are forced for security and Gentoo compliance installation reasons
DEPEND="virtual/perl-MIME-Base64
virtual/perl-Socket
virtual/perl-Sys-Syslog
virtual/perl-Time-HiRes
virtual/perl-Time-Local
dev-perl/Authen-Libwrap
dev-perl/IO-Tty
dev-perl/MD5
dev-perl/Net-SSLeay
dev-perl/Authen-PAM
dev-perl/Sys-Hostname-Long
>=net-dns/dnssec-tools-1.13
!minimal? (
mysql? ( dev-perl/DBD-mysql )
postgres? ( dev-perl/DBD-Pg )
ldap? ( dev-perl/perl-ldap )
dev-perl/XML-Generator
dev-perl/XML-Parser
)"
RDEPEND="${DEPEND}"
src_prepare() {
local perl="$( which perl )"
# Remove the unnecessary and incompatible files
rm -rf acl/Authen-SolarisRBAC-0.1*
if ! use minimal ; then
rm -rf {format,{bsd,hpux,sgi}exports,zones,rbac}
rm -f mount/{free,net,open}bsd-mounts*
rm -f mount/macos-mounts*
fi
# For security reasons remove the SSL certificate that comes with Webmin
# We will create our own later
rm -f miniserv.pem
# Remove the Webmin setup scripts to avoid Webmin in runtime to mess up config
# We will use our own later
rm -f setup.{sh,pl}
# Set the installation type/mode to Gentoo
echo "gentoo" > install-type
# Fix the permissions of the install files
chmod -R og-w "${S}"
# Since we should not modify any files after install
# we set the perl path in all cgi and pl files here using Webmin's routines
# The pl file is Prefix safe and works only on provided input, no other filesystem files
ebegin "Fixing perl path in source files"
(find "${S}" -name '*.cgi' -print ; find "${S}" -name '*.pl' -print) | $perl "${S}"/perlpath.pl $perl -
eend $?
}
src_install() {
# Create config dir and keep
diropts -m0755
dodir /etc/webmin
keepdir /etc/webmin
# Create install dir
# Third party modules installed through Webmin go here too, so keep
dodir /usr/libexec/webmin
keepdir /usr/libexec/webmin
# Copy our own setup script to installation folder
insinto /usr/libexec/webmin
newins "${FILESDIR}"/gentoo-setup gentoo-setup.sh
fperms 0744 /usr/libexec/webmin/gentoo-setup.sh
# This is here if we ever want in future ebuilds to add some specific
# config values in the /etc/webmin/miniserv.conf
# The format of this file should be the same as the one of miniserv.conf:
# var=value
#
# Uncomment it if you use such file. Before that check if upstream
# has this file in root dir too.
#newins "${FILESDIR}/miniserv-conf" miniserv-conf
# Create the log dir and keep
diropts -m0700
dodir /var/log/webmin
keepdir /var/log/webmin
# Create the init.d file and put the neccessary variables there
newinitd "${FILESDIR}"/init.d.webmin webmin
sed -i \
-e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \
-e "s:%pid%:${EROOT}var/run/webmin.pid:" \
-e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \
-e "s:%config%:${EROOT}etc/webmin/config:" \
-e "s:%perllib%:${EROOT}usr/libexec/webmin:" \
"${ED}etc/init.d/webmin" \
|| die "Failed to patch the webmin init file"
# Create the systemd service file and put the neccessary variables there
systemd_newunit "${FILESDIR}"/webmin.service webmin.service
sed -i \
-e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \
-e "s:%pid%:${EROOT}var/run/webmin.pid:" \
-e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \
-e "s:%config%:${EROOT}etc/webmin/config:" \
-e "s:%perllib%:${EROOT}usr/libexec/webmin:" \
"${ED}$(_systemd_get_systemunitdir)/webmin.service" \
|| die "Failed to patch the webmin systemd service file"
# Setup pam
pamd_mimic system-auth webmin auth account session
# Copy files to installation folder
ebegin "Copying install files to destination"
cp -pPR "${S}"/* "${ED}usr/libexec/webmin"
eend $?
}
pkg_preinst() {
# First stop service if running so Webmin to not messup our config
ebegin "Stopping any running Webmin instance prior merging"
if systemd_is_booted ; then
systemctl stop webmin.service 2>/dev/null
else
rc-service --ifexists -- webmin --ifstarted stop
fi
eend $?
}
pkg_postinst() {
# Run pkg_config phase first - non interactively
export INTERACTIVE="no"
pkg_config
# Every next time pkg_config should be interactive
INTERACTIVE="yes"
ewarn
ewarn "Bare in mind that not all Webmin modules are Gentoo tweaked and may have some issues."
ewarn "Always be careful when using modules that modify init entries, do update of webmin, install CPAN modules etc."
ewarn "To avoid problems, please before using any module, look at its configuration options first."
ewarn "(Usually there is a link at top in the right pane of Webmin for configuring the module.)"
ewarn
if systemd_is_booted ; then
elog "- To make Webmin start at boot time, run: 'systemctl enable webmin.service'"
else
elog "- To make Webmin start at boot time, run: 'rc-update add webmin default'"
fi
elog "- The default URL to connect to Webmin is: https://localhost:10000"
elog "- The default user that can login is: root"
elog "- To reconfigure Webmin in case of problems run 'emerge --config app-admin/webmin'"
}
pkg_prerm() {
# First stop service if running - we do not want Webmin to mess up config
ebegin "Stopping any running Webmin instance prior unmerging"
if systemd_is_booted ; then
systemctl stop webmin.service 2>/dev/null
else
rc-service --ifexists -- webmin --ifstarted stop
fi
eend $?
}
pkg_postrm() {
# If removing webmin completely, remind the user for the Webmin's own cron jobs.
if [[ ! ${REPLACED_BY_VERSION} ]]; then
ewarn
ewarn "You have uninstalled Webmin, so have in mind that all cron jobs scheduled"
ewarn "by Webmin for its own modules, are left active and they will fail when Webmin is missing."
ewarn "To fix this just disable them if you intend to use Webmin again,"
ewarn "OR delete them if not."
ewarn
fi
}
pkg_config(){
# First stop service if running
ebegin "Stopping any running Webmin instance"
if systemd_is_booted ; then
systemctl stop webmin.service 2>/dev/null
else
rc-service --ifexists -- webmin --ifstarted stop
fi
eend $?
# Next set the default reset variable to 'none'
# reset/_reset can be:
# 'none' - does not reset anything, just upgrades if a conf is present
# OR installs new conf if a conf is missing
# 'soft' - deletes only $config_dir/config file and thus resetting most
# conf values to their defaults. Keeps the specific Webmin cron jobs
# 'hard' - deletes all files in $config_dir (keeping the .keep_* Gentoo file)
# and thus resetting all Webmin. Deletes the specific Webmin cron jobs too.
local _reset="none"
# If in interactive mode ask user what should we do
if [[ "${INTERACTIVE}" = "yes" ]]; then
einfo
einfo "Please enter the number of the action you would like to perform?"
einfo
einfo "1. Update configuration"
einfo " (keeps old config options and adds the new ones)"
einfo "2. Soft reset configuration"
einfo " (keeps some old config options, the other options are set to default)"
ewarn " All Webmin users will be reset"
einfo "3. Hard reset configuration"
einfo " (all options including module options are set to default)"
ewarn " You will lose all Webmin configuration options you have done till now"
einfo "4. Exit this configuration utility (default)"
while [ "$correct" != "true" ] ; do
read answer
if [[ "$answer" = "1" ]] ; then
_reset="none"
correct="true"
elif [[ "$answer" = "2" ]] ; then
_reset="soft"
correct="true"
elif [[ "$answer" = "3" ]] ; then
_reset="hard"
correct="true"
elif [ "$answer" = "4" -o "$answer" = "" ] ; then
die "User aborted configuration."
else
echo "Answer not recognized. Enter a number from 1 to 4"
fi
done
if [[ "$_reset" = "hard" ]]; then
while [ "$sure" != "true" ] ; do
ewarn "You will lose all Webmin configuration options you have done till now."
ewarn "Are you sure you want to do this? (y/n)"
read answer
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
sure="true"
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
die "User aborted configuration."
else
echo "Answer not recognized. Enter 'y' or 'n'"
fi
done
fi
fi
export reset=$_reset
# Create ssl certificate for Webmin if there is not one in the proper place
if [[ ! -e "${EROOT}etc/ssl/webmin/server.pem" ]]; then
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Webmin Server}"
SSL_COMMONNAME="${SSL_COMMONNAME:-*}"
install_cert "${EROOT}/etc/ssl/webmin/server"
fi
# Ensure all paths passed to the setup script use EROOT
export wadir="${EROOT}usr/libexec/webmin"
export config_dir="${EROOT}etc/webmin"
export var_dir="${EROOT}var/log/webmin"
export tempdir="${T}"
export pidfile="${EROOT}var/run/webmin.pid"
export perl="$( which perl )"
export os_type='gentoo-linux'
export os_version='*'
export real_os_type='Gentoo Linux'
export real_os_version='Any version'
# Forcing 'ssl', 'no_ssl2', 'no_ssl3', 'ssl_redirect', 'no_sslcompression',
# 'no_tls1' and 'no_tls1_1' for tightening security
export ssl=1
export no_ssl2=1
export no_ssl3=1
export ssl_redirect=1
export no_sslcompression=1
export no_tls1=1
export no_tls1_1=1
export keyfile="${EROOT}etc/ssl/webmin/server.pem"
export port=10000
export atboot=0
einfo "Executing Webmin's configure script"
$wadir/gentoo-setup.sh
einfo "Configuration of Webmin done"
}

@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -19,6 +19,7 @@ KEYWORDS="~amd64 ~x86"
# NOTE: The ssl flag auto added by ssl-cert eclass is not used actually
# because openssl is forced by dev-perl/Net-SSLeay
IUSE="minimal +ssl mysql postgres ldap"
REQUIRED_USE="minimal? ( !mysql !postgres !ldap )"
# All the required perl modules can be found easily using (in Webmin's root src dir):
# find . -name cpan_modules.pl -exec grep "::" {} \;
@ -93,7 +94,7 @@ src_install() {
# Copy our own setup script to installation folder
insinto /usr/libexec/webmin
newins "${FILESDIR}"/gentoo-setup gentoo-setup.sh
newins "${FILESDIR}"/gentoo-setup-${PV} gentoo-setup.sh
fperms 0744 /usr/libexec/webmin/gentoo-setup.sh
# This is here if we ever want in future ebuilds to add some specific
@ -287,11 +288,12 @@ pkg_config(){
export real_os_type='Gentoo Linux'
export real_os_version='Any version'
# Forcing 'ssl', 'no_ssl2', 'no_ssl3', 'ssl_redirect', 'no_sslcompression',
# 'no_tls1' and 'no_tls1_1' for tightening security
# 'ssl_honorcipherorder', 'no_tls1' and 'no_tls1_1' for tightening security
export ssl=1
export no_ssl2=1
export no_ssl3=1
export ssl_redirect=1
export ssl_honorcipherorder=1
export no_sslcompression=1
export no_tls1=1
export no_tls1_1=1

@ -12,7 +12,7 @@ SRC_URI="mirror://gnu/cpio/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="nls"
src_prepare() {

@ -14,7 +14,7 @@ SRC_URI="http://www.rarlab.com/rar/${MY_PN}-${PV}.tar.gz"
LICENSE="unRAR"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE=""
RDEPEND="!<=app-arch/unrar-gpl-0.0.1_p20080417"

@ -17,7 +17,7 @@ if [[ ${PV} == "9999" ]] ; then
else
MY_P="${PN/-utils}-${PV/_}"
SRC_URI="http://tukaani.org/xz/${MY_P}.tar.gz"
KEYWORDS="alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
S=${WORKDIR}/${MY_P}
EXTRA_DEPEND=
fi

@ -0,0 +1 @@
DIST borgbackup-1.0.0.tar.gz 424089 SHA256 500b9e311331aa88ec07df94d9f3280a79ca207bf1a997b92dd1e6a1f1664671 SHA512 5a94f1b0dfe17d383bcc917db69ed272b9b752b96912a21ac62886972cdbd718b58fe3f9529af455ab325ba418cfc05b89985e32a23fed5e946c5f7e53e6e3b1 WHIRLPOOL c0a5c40aff70c9872e62861a0e971f659191f3a99112dfe940db2440666def3a04af284f5f31ccaef410c7028a49377df96fb38fd462917ad11cd095e33b12e9

@ -0,0 +1,38 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python3_4 )
inherit distutils-r1
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/borgbackup/borg.git"
inherit git-r3
else
SRC_URI="mirror://pypi/b/borgbackup/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
DESCRIPTION="Deduplicating backup program with compression and authenticated encryption."
HOMEPAGE="https://borgbackup.github.io/"
LICENSE="BSD"
SLOT="0"
IUSE="libressl +fuse"
RDEPEND="
app-arch/lz4
dev-python/msgpack[${PYTHON_USEDEP}]
!libressl? ( dev-libs/openssl:0 )
libressl? ( dev-libs/libressl )
fuse? ( dev-python/llfuse[${PYTHON_USEDEP}] )
"
DEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
dev-python/cython[${PYTHON_USEDEP}]
${RDEPEND}
"

@ -0,0 +1,38 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python3_4 )
inherit distutils-r1
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/borgbackup/borg.git"
inherit git-r3
else
SRC_URI="mirror://pypi/b/borgbackup/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
DESCRIPTION="Deduplicating backup program with compression and authenticated encryption."
HOMEPAGE="https://borgbackup.github.io/"
LICENSE="BSD"
SLOT="0"
IUSE="libressl +fuse"
RDEPEND="
app-arch/lz4
dev-python/msgpack[${PYTHON_USEDEP}]
!libressl? ( dev-libs/openssl:0 )
libressl? ( dev-libs/libressl )
fuse? ( dev-python/llfuse[${PYTHON_USEDEP}] )
"
DEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
dev-python/cython[${PYTHON_USEDEP}]
${RDEPEND}
"

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>
<name>Anthony G. Basile</name>
</maintainer>
<use>
<flag name="fuse">Mount archive as a FUSE filesystem.</flag>
</use>
<upstream>
<remote-id type="github">borgbackup/borg</remote-id>
</upstream>
</pkgmetadata>

@ -1,4 +1,4 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -13,7 +13,7 @@ IUSE=""
DEPEND="app-arch/tar"
RDEPEND="dev-perl/Time-modules
dev-perl/Period
dev-perl/Time-Period
>=net-misc/rsync-2.5.7"
src_compile() {

@ -10,7 +10,7 @@ SRC_URI="http://www.coker.com.au/bonnie++/experimental/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
IUSE="debug"
S="${WORKDIR}/${P}.1"

@ -1,46 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="2"
inherit eutils
DESCRIPTION="Hard drive bottleneck testing benchmark suite"
HOMEPAGE="http://www.coker.com.au/bonnie++/"
SRC_URI="http://www.coker.com.au/bonnie++/experimental/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
IUSE="debug"
DEPEND=""
RDEPEND=""
# hmm?
S="${WORKDIR}/${P}.1"
src_prepare() {
epatch "${FILESDIR}/${PN}-1.96-compile-flags.patch"
}
src_configure() {
econf \
$(use_with debug) \
--disable-stripping \
|| die
}
src_compile() {
emake || die "emake failed"
emake zcav || die "emake zcav failed" # see #9073
}
src_install() {
dosbin bonnie++ zcav || die
dobin bon_csv2html bon_csv2txt || die
doman bon_csv2html.1 bon_csv2txt.1 bonnie++.8 zcav.8
dohtml readme.html
dodoc changelog.txt credits.txt
}

@ -0,0 +1,35 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit autotools
DESCRIPTION="Filebench - A Model Based File System Workload Generator"
HOMEPAGE="http://sourceforge.net/projects/filebench/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="auto-completion"
RDEPEND="
auto-completion? ( dev-libs/libtecla )
"
DEPEND="${RDEPEND}
sys-devel/flex
sys-devel/bison
"
PATCHES=( "${FILESDIR}"/${PN}-fix-automagic-libtecla-dependency.patch )
src_prepare() {
default
eautoreconf
}
src_configure() {
econf $(use_with auto-completion libtecla)
}

@ -1,37 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit eutils autotools
DESCRIPTION="Filebench - A Model Based File System Workload Generator"
HOMEPAGE="http://sourceforge.net/projects/filebench/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="dev-libs/libaio
sys-devel/flex
sys-devel/bison"
RDEPEND=""
src_unpack() {
unpack ${A}
cd "${S}"
#epatch "${FILESDIR}/linux-port.patch"
eautoreconf
}
src_compile() {
econf
emake -j1 || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "Install failed"
dodoc README AUTHORS
}

@ -0,0 +1,22 @@
From: Göktürk Yüksek <gokturk@binghamton.edu>
Subject: [PATCH] Fix automagic dependency on libtecla
Replace the unconditional AC_CHECK_LIB logic with AC_ARG_WITH to
eliminate the automagic dependency on libtecla.
--- a/configure.ac
+++ b/configure.ac
@@ -164,8 +164,11 @@
AC_CHECK_LIB([kstat], [kstat_open])
# Use libtecla for autocompletion if it is available. If it
# is, then conditionally compile auto_comp.c (see Makefile.am)
-AC_CHECK_LIB([tecla], [cpl_add_completion])
-AM_CONDITIONAL(AUTOCOMP_LIBTECLA, test "$ac_cv_lib_tecla_cpl_add_completion" = yes)
+AC_ARG_WITH([libtecla], AS_HELP_STRING([--with-libtecla], [Build with libtecla for autocompletion support (default: test)]))
+AS_IF([test "x$with_libtecla" != "xno"], [
+ AC_CHECK_LIB([tecla], [cpl_add_completion])
+])
+AM_CONDITIONAL([AUTOCOMP_LIBTECLA], [test "x$ac_cv_lib_tecla_cpl_add_completion" = "xyes"])
# Check that librt is installed and supports async IO. First line
# allows to add librt to the linkers path, second one checks
# if aio_wait() is in it, third one checks if aio_waitn() is there (usually

@ -1,369 +0,0 @@
Index: filebench-1.2.4/filebench/flowop_library.c
===================================================================
--- filebench-1.2.4.orig/filebench/flowop_library.c
+++ filebench-1.2.4/filebench/flowop_library.c
@@ -789,6 +789,7 @@ flowoplib_aiowait(threadflow_t *threadfl
for (ncompleted = 0, inprogress = 0,
aio = flowop->fo_thread->tf_aiolist;
ncompleted < todo, aio != NULL; aio = aio->al_next) {
+ int result;
result = aio_error64(&aio->al_aiocb);
Index: filebench-1.2.4/filebench/fileset.c
===================================================================
--- filebench-1.2.4.orig/filebench/fileset.c
+++ filebench-1.2.4/filebench/fileset.c
@@ -32,8 +32,9 @@
#include <math.h>
#include <libgen.h>
#include <sys/mman.h>
-#include "fileset.h"
+
#include "filebench.h"
+#include "fileset.h"
#include "gamma_dist.h"
/*
@@ -631,9 +632,9 @@ fileset_create(fileset_t *fileset)
/* we are re-using */
reusing = 1;
filebench_log(LOG_VERBOSE,
- "Re-using %s %s on %s file system.",
+ "Re-using %s %s.",
fileset_entity_name(fileset),
- fileset_name, sb.st_fstype);
+ fileset_name);
}
}
(void) mkdir(path, 0755);
Index: filebench-1.2.4/filebench/filebench.h
===================================================================
--- filebench-1.2.4.orig/filebench/filebench.h
+++ filebench-1.2.4/filebench/filebench.h
@@ -32,6 +32,15 @@
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+
+#ifndef HAVE_BOOLEAN_T
+typedef enum { B_FALSE, B_TRUE } boolean_t;
+#endif
+
+#ifndef HAVE_U_LONGLONG_T
+typedef unsigned long long u_longlong_t;
+#endif
#include "vars.h"
#include "misc.h"
Index: filebench-1.2.4/filebench/eventgen.c
===================================================================
--- filebench-1.2.4.orig/filebench/eventgen.c
+++ filebench-1.2.4/filebench/eventgen.c
@@ -40,9 +40,10 @@
*/
#include <sys/time.h>
+
+#include "filebench.h"
#include "vars.h"
#include "eventgen.h"
-#include "filebench.h"
#include "flowop.h"
#include "ipc.h"
Index: filebench-1.2.4/filebench/procflow.c
===================================================================
--- filebench-1.2.4.orig/filebench/procflow.c
+++ filebench-1.2.4/filebench/procflow.c
@@ -30,8 +30,8 @@
#include <sys/stat.h>
#include <sys/wait.h>
-#include "procflow.h"
#include "filebench.h"
+#include "procflow.h"
#include "flowop.h"
#include "ipc.h"
@@ -162,7 +162,7 @@ procflow_createproc(procflow_t *procflow
}
#else
- if (execl(execname, procname, "-a", procname, "-i",
+ if (execlp(execname, procname, "-a", procname, "-i",
instance, "-s", shmaddr, "-m", shmpath, NULL) < 0) {
filebench_log(LOG_ERROR,
"procflow exec proc failed: %s",
Index: filebench-1.2.4/filebench/threadflow.c
===================================================================
--- filebench-1.2.4.orig/filebench/threadflow.c
+++ filebench-1.2.4/filebench/threadflow.c
@@ -31,8 +31,9 @@
#include <sys/lwp.h>
#endif
#include <signal.h>
-#include "threadflow.h"
+
#include "filebench.h"
+#include "threadflow.h"
#include "flowop.h"
#include "ipc.h"
Index: filebench-1.2.4/filebench/utils.c
===================================================================
--- filebench-1.2.4.orig/filebench/utils.c
+++ filebench-1.2.4/filebench/utils.c
@@ -34,6 +34,8 @@
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
+
+#include "filebench.h"
#include "utils.h"
#include "parsertypes.h"
Index: filebench-1.2.4/filebench/vars.c
===================================================================
--- filebench-1.2.4.orig/filebench/vars.c
+++ filebench-1.2.4/filebench/vars.c
@@ -30,12 +30,12 @@
#include <string.h>
#include <errno.h>
+#include "filebench.h"
#include "vars.h"
#include "misc.h"
#include "utils.h"
#include "stats.h"
#include "eventgen.h"
-#include "filebench.h"
#include "fb_random.h"
static var_t *var_find_dynamic(char *name);
Index: filebench-1.2.4/filebench/parser_gram.y
===================================================================
--- filebench-1.2.4.orig/filebench/parser_gram.y
+++ filebench-1.2.4/filebench/parser_gram.y
@@ -46,8 +46,9 @@
#ifdef HAVE_LIBTECLA
#include <libtecla.h>
#endif
-#include "parsertypes.h"
+
#include "filebench.h"
+#include "parsertypes.h"
#include "utils.h"
#include "stats.h"
#include "vars.h"
@@ -2642,7 +2643,7 @@ parser_help(cmd_t *cmd)
} else {
filebench_log(LOG_INFO,
"load <personality> (ls "
- "/usr/benchmarks/filebench/workloads for list)");
+ FILEBENCHDIR "/workloads for list)");
}
}
Index: filebench-1.2.4/filebench/parser_lex.l
===================================================================
--- filebench-1.2.4.orig/filebench/parser_lex.l
+++ filebench-1.2.4/filebench/parser_lex.l
@@ -38,9 +38,10 @@
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
+
+#include "filebench.h"
#include "parsertypes.h"
#include "utils.h"
-#include "filebench.h"
#include "parser_gram.h"
Index: filebench-1.2.4/filebench/Makefile.am
===================================================================
--- filebench-1.2.4.orig/filebench/Makefile.am
+++ filebench-1.2.4/filebench/Makefile.am
@@ -7,19 +7,19 @@
#
bin_PROGRAMS = go_filebench
-filebench_SOURCES = gamma_dist.c misc.c procflow.c threadflow.c \
+go_filebench_SOURCES = gamma_dist.c misc.c procflow.c threadflow.c \
utils.c flowop.c flowop_library.c ipc.c \
vars.c stats.c eventgen.c fileset.c fb_random.c \
parser_gram.y parser_lex.l
-filebenchdir = $(datadir)/filebench
-INCLUDES = -I../intl -DFILEBENCHDIR=\"$(prefix)/filebench\"
+INCLUDES = -I../intl -DFILEBENCHDIR=\"$(FILEBENCHDIR)\"
MV=@MV@
LEX=@LEX@
YACC=@YACC@
-LFLAGS = @LFLAGS@
-YFLAGS = @YFLAGS@
+AM_LFLAGS = @LFLAGS@
+AM_YFLAGS = @YFLAGS@
DEFS = -D_REENTRANT @DEFINES@
+LIBS = @LDLIBS@
BUILD = @BUILD@
parser_lex.c: parser_lex.l parser_gram.h Makefile
Index: filebench-1.2.4/configure.in
===================================================================
--- filebench-1.2.4.orig/configure.in
+++ filebench-1.2.4/configure.in
@@ -73,8 +73,8 @@ case "$host_os$host_cpu" in
YFLAGS="-d"
AC_DEFINE(HAVE_OFF64_T, 1,
[ Define if we can use 64 bit files ])
- FILEBENCHDIR=${prefix}/filebench
- FILEBENCHBIN=${prefix}/bin
+ FILEBENCHDIR=${datadir}/filebench
+ FILEBENCHBIN=${bindir}
;;
esac
@@ -324,6 +324,6 @@ AC_SUBST(SRCDIR)
AC_SUBST(FILEBENCHDIR)
AC_SUBST(FILEBENCHBIN)
-AC_CONFIG_FILES([Makefile filebench/Makefile fastsu/Makefile workloads/Makefile workloads/build/Makefile scripts/Makefile benchpoint/Makefile benchpoint/bin/Makefile benchpoint/config/Makefile benchpoint/functions/Makefile benchpoint/profiles/Makefile])
+AC_CONFIG_FILES([Makefile filebench/Makefile fastsu/Makefile workloads/Makefile workloads/build/Makefile scripts/Makefile benchpoint/Makefile benchpoint/bin/Makefile benchpoint/config/Makefile benchpoint/functions/Makefile benchpoint/profiles/Makefile bin/Makefile])
AC_OUTPUT
Index: filebench-1.2.4/fastsu/fastsu.c
===================================================================
--- filebench-1.2.4.orig/fastsu/fastsu.c
+++ filebench-1.2.4/fastsu/fastsu.c
@@ -1,23 +1,26 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
-void
+int
main(int argc, char *argv[], char *envp[])
{
char *shell;
char cmd[2048];
- *cmd = NULL;
+ *cmd = '\0';
shell=getenv("SHELL");
- *(argv++);
+ argv++;
argc--;
while(argc-- != 0) {
(void) strcat(cmd,*argv);
(void) strcat(cmd," ");
- *(argv++);
+ argv++;
}
execlp(shell, shell, "-c", cmd, (char *) 0);
+
+ /* control should not reach here */
+ return -1;
}
Index: filebench-1.2.4/benchpoint/config/Makefile.am
===================================================================
--- filebench-1.2.4.orig/benchpoint/config/Makefile.am
+++ filebench-1.2.4/benchpoint/config/Makefile.am
@@ -6,8 +6,7 @@
# See the file LICENSING in this distribution for details.
#
-filebenchdir = $(prefix)/filebench
-configdir = $(filebenchdir)/config
+configdir = ${FILEBENCHDIR}/config
config_DATA = *.conf
Index: filebench-1.2.4/benchpoint/profiles/Makefile.am
===================================================================
--- filebench-1.2.4.orig/benchpoint/profiles/Makefile.am
+++ filebench-1.2.4/benchpoint/profiles/Makefile.am
@@ -6,8 +6,7 @@
# See the file LICENSING in this distribution for details.
#
-filebenchdir = $(prefix)/filebench
-configdir = $(filebenchdir)/config
+configdir = ${FILEBENCHDIR}/config
config_DATA = *.prof
Index: filebench-1.2.4/bin/Makefile.am
===================================================================
--- filebench-1.2.4.orig/bin/Makefile.am
+++ filebench-1.2.4/bin/Makefile.am
@@ -6,8 +6,5 @@
# See the file LICENSING in this distribution for details.
#
-filebenchdir = $(prefix)/filebench
-scriptsdir = $(filebenchdir)/bin
-
-scripts_SCRIPTS = filebench
+bin_SCRIPTS = filebench
Index: filebench-1.2.4/benchpoint/functions/Makefile.am
===================================================================
--- filebench-1.2.4.orig/benchpoint/functions/Makefile.am
+++ filebench-1.2.4/benchpoint/functions/Makefile.am
@@ -6,8 +6,7 @@
# See the file LICENSING in this distribution for details.
#
-filebenchdir = $(prefix)/filebench
-configdir = $(filebenchdir)/config
+configdir = ${FILEBENCHDIR}/config
config_SCRIPTS = *.func
Index: filebench-1.2.4/scripts/Makefile.am
===================================================================
--- filebench-1.2.4.orig/scripts/Makefile.am
+++ filebench-1.2.4/scripts/Makefile.am
@@ -6,8 +6,7 @@
# See the file LICENSING in this distribution for details.
#
-filebenchdir = $(prefix)/filebench
-scriptsdir = $(filebenchdir)/scripts
+scriptsdir = ${FILEBENCHDIR}/scripts
scripts_SCRIPTS = filebench_compare filebench_summary filebench_plot fs_flush
Index: filebench-1.2.4/workloads/Makefile.am
===================================================================
--- filebench-1.2.4.orig/workloads/Makefile.am
+++ filebench-1.2.4/workloads/Makefile.am
@@ -6,8 +6,6 @@
# See the file LICENSING in this distribution for details.
#
-filebenchdir = $(datadir)/filebench
-
SUBDIRS = build
pkg: filebench
Index: filebench-1.2.4/workloads/build/Makefile.am
===================================================================
--- filebench-1.2.4.orig/workloads/build/Makefile.am
+++ filebench-1.2.4/workloads/build/Makefile.am
@@ -6,8 +6,7 @@
# See the file LICENSING in this distribution for details.
#
-filebenchdir = $(prefix)/filebench
-workloadsdir = $(filebenchdir)/workloads
+workloadsdir = ${FILEBENCHDIR}/workloads
workloads_DATA = BUILD \
bringover.f \

@ -16,6 +16,12 @@
<name>Proxy Maintainers</name>
<description>please CC on bugs</description>
</maintainer>
<use>
<flag name="auto-completion">
Enable command-line autocompletion using
<pkg>dev-libs/libtecla</pkg>.
</flag>
</use>
<upstream>
<remote-id type="sourceforge">filebench</remote-id>
</upstream>

@ -9,7 +9,7 @@ HOMEPAGE="http://www.vanhemert.co.uk/disc-cover.html"
SRC_URI="http://www.vanhemert.co.uk/files/${P}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="amd64 ppc ~sparc x86"
KEYWORDS="amd64 ppc sparc x86"
IUSE=""
SLOT="0"

@ -1,30 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
DESCRIPTION="Creates CD-Covers via LaTeX by fetching cd-info from freedb.org or local file"
HOMEPAGE="http://www.vanhemert.co.uk/disc-cover.html"
SRC_URI="http://www.vanhemert.co.uk/files/${P}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="amd64 ppc sparc x86"
IUSE="cdrom"
SLOT="0"
DEPEND="dev-lang/perl"
RDEPEND="${DEPEND}
virtual/latex-base
cdrom? ( dev-perl/Audio-CD-disc-cover )"
src_compile() {
pod2man disc-cover > disc-cover.1 || die
}
src_install() {
dobin disc-cover
dodoc AUTHORS CHANGELOG TODO
doman disc-cover.1
insinto /usr/share/${PN}/templates
doins templates/*
}

@ -8,8 +8,4 @@
bound by the fact that they come from the same source package.
That's why the web application ebuild is manually slotted to 0.
</longdescription>
<use>
<flag name="cdrom">Enable audio CD support. This is not needed to make
www-apps/disc-cover work.</flag>
</use>
</pkgmetadata>

@ -1,4 +1,2 @@
DIST eid-mw-4.0.6-1480.tar.gz 4292450 SHA256 1ff3a7740a30891df2da12fca66cb5324dc286f9490ee839d61d9f1028b9127c SHA512 4b6ba684a43183e11cf29a73bee7bc6ecda24aa15029e55593d6ad3cc9f58726d551089c3c9f95f07d03847df70f2662a0ea9e3db5dd5591cc9b8b0e839d364b WHIRLPOOL cca8b871a2780dae282f5eed12cd79df0bb9d57c3c968ca740b7063ca3c48425be492d3dfcb7bee5c0037b14571df8b76b825540f52025b14afed8f718d56c22
DIST eid-mw-4.0.6-1620.tar.gz 4335514 SHA256 1ecb30f9f318bdb61a8d774fe76b948eb5841d4de6fee106029ed78daa7efbf2 SHA512 511bf6cf7a9a4d0a2232d95f1a6ba6f4fa8ee174cf919f88e1fa0c71357b9717544a6006ad412d7a0b4090c4c56ca86f8e6f69dabc6912bfd77a2e948cae8104 WHIRLPOOL b89ae4ba659e8dedd93f70368af1e058468cfd3761bec099276fadc017dcf21d245ceb8db001c3e82f30c7e6f670e13ab6c17e221c8c8ee02a45cc5833f39867
DIST eid-mw-4.1.4-v4.1.4.tar.gz 3475913 SHA256 2996960ea92504c7cee1953ccf4520ba78979c7771645e2b2c1207f94be0a308 SHA512 efcc4dbd0fa383896df9f5a7492b18beb5259cfa368a919ae18bd996e5976a67d0570c0fbccd5ab38ea95c31f48b92c145c526aa59866217a418a80a550d502f WHIRLPOOL 11e35b3649a0c3bd40e4c901ba4d922305dc2b4098018bd018ee71b963b08898e6295e4f71cb7180b0fc8e64d1afe01ce49bcaa36a60c065c2de84b81d19e398
DIST eid-mw-4.1.9-v4.1.9.tar.gz 3475708 SHA256 0c46c73b805884dd4ae739eb6025c137c1055ad119eac1ab37cb83eb32d92953 SHA512 bc61b3f212bfedf6f47f2841bc6c9b1198be5e3c7b382e3e28635c9e6f5c4ed8ccb118b105f668969fba31e49750cb1c5b129cd5b67a2725af122a8eae491b1c WHIRLPOOL 06b1f9780e984ac6c562bacab03936cd759ea1fce45687f09ae314d4fa77edce02c7ba4db5a9bc3fd739392f8b7b182b19b2734c1d21d63f6995c3cd572695d9

@ -1,65 +0,0 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils versionator mozextension multilib
if [[ ${PV} == "9999" ]] ; then
ESVN_REPO_URI="https://eid-mw.googlecode.com/svn/trunk/"
inherit subversion autotools
SRC_URI=""
else
MY_P="${PN}-${PV/_p/-}"
SRC_URI="http://eid.belgium.be/en/binaries/${MY_P}.tar_tcm406-250016.gz -> ${MY_P}.tar.gz"
KEYWORDS="~x86 ~amd64"
S="${WORKDIR}/eid-mw-$(get_version_component_range 1-3)"
fi
SLOT="0"
LICENSE="LGPL-3"
DESCRIPTION="Belgian Electronic Identity Card middleware supplied by the Belgian Federal Government"
HOMEPAGE="http://eid.belgium.be"
IUSE="+gtk +xpi"
RDEPEND="gtk? ( x11-libs/gtk+:2 )
>=sys-apps/pcsc-lite-1.2.9
xpi? ( || ( >=www-client/firefox-bin-3.6.24
>=www-client/firefox-3.6.20 ) )
!app-misc/beid-runtime"
DEPEND="${RDEPEND}
virtual/pkgconfig"
if [[ ${PV} == "9999" ]]; then
src_prepare() {
eautoreconf
}
else
src_prepare() {
epatch "${FILESDIR}"/fix-nodialog-bug.patch
}
fi
src_configure() {
econf $(use_enable gtk dialogs) --disable-static
}
src_install() {
emake DESTDIR="${D}" install
if use xpi; then
declare MOZILLA_FIVE_HOME
if has_version '>=www-client/firefox-3.6.20'; then
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/firefox"
xpi_install "${D}/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/belgiumeid@eid.belgium.be"
fi
if has_version '>=www-client/firefox-bin-3.6.24'; then
MOZILLA_FIVE_HOME="/opt/firefox"
xpi_install "${D}/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/belgiumeid@eid.belgium.be"
fi
fi
rm -r "${D}/usr/share" "${D}"/usr/lib*/*.la
}

@ -1,62 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils versionator mozextension multilib
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://github.com/Fedict/${PN}.git
https://github.com/Fedict/${PN}.git"
inherit git-2 autotools
SRC_URI=""
else
MY_P="${PN}-${PV/_p/-}"
SRC_URI="http://eid.belgium.be/en/binaries/${MY_P}.tar_tcm406-258906.gz -> ${MY_P}.tar.gz"
KEYWORDS="~x86 ~amd64"
S="${WORKDIR}/eid-mw-$(get_version_component_range 1-3)"
fi
SLOT="0"
LICENSE="LGPL-3"
DESCRIPTION="Belgian Electronic Identity Card middleware supplied by the Belgian Federal Government"
HOMEPAGE="http://eid.belgium.be"
IUSE="+gtk +xpi"
RDEPEND="gtk? ( x11-libs/gtk+:2 )
>=sys-apps/pcsc-lite-1.2.9
xpi? ( || ( >=www-client/firefox-bin-3.6.24
>=www-client/firefox-3.6.20 ) )
!app-misc/beid-runtime"
DEPEND="${RDEPEND}
virtual/pkgconfig"
if [[ ${PV} == "9999" ]]; then
src_prepare() {
eautoreconf
}
fi
src_configure() {
econf $(use_enable gtk dialogs) --disable-static
}
src_install() {
emake DESTDIR="${D}" install
if use xpi; then
declare MOZILLA_FIVE_HOME
if has_version '>=www-client/firefox-3.6.20'; then
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/firefox"
xpi_install "${D}/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/belgiumeid@eid.belgium.be"
fi
if has_version '>=www-client/firefox-bin-3.6.24'; then
MOZILLA_FIVE_HOME="/opt/firefox"
xpi_install "${D}/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/belgiumeid@eid.belgium.be"
fi
fi
rm -r "${D}/usr/share" "${D}"/usr/lib*/*.la
}

@ -1,38 +0,0 @@
Index: eid-mw-4.0.2/common/src/socket/socket.cpp
===================================================================
--- eid-mw-4.0.2.orig/common/src/socket/socket.cpp
+++ eid-mw-4.0.2/common/src/socket/socket.cpp
@@ -21,6 +21,8 @@
#include "../eiderrors.h"
#include <iostream>
+#include <unistd.h>
+
namespace eIDMW
{
Index: eid-mw-4.0.2/common/src/socket/socketserver.cpp
===================================================================
--- eid-mw-4.0.2.orig/common/src/socket/socketserver.cpp
+++ eid-mw-4.0.2/common/src/socket/socketserver.cpp
@@ -26,6 +26,7 @@
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <errno.h>
+#include <unistd.h>
#ifndef SOCKET_ERROR
#define SOCKET_ERROR -1
#endif
Index: eid-mw-4.0.2/common/src/util.cpp
===================================================================
--- eid-mw-4.0.2.orig/common/src/util.cpp
+++ eid-mw-4.0.2/common/src/util.cpp
@@ -27,6 +27,8 @@
#include <stdlib.h>
+#include <unistd.h>
+
#ifdef WIN32
#include <windows.h>
#endif

@ -1,20 +0,0 @@
Index: cardlayer/src/pinpadlib.h
===================================================================
--- cardlayer/src/pinpadlib.h (revision 1501)
+++ cardlayer/src/pinpadlib.h (revision 1502)
@@ -43,13 +43,14 @@
#endif
#ifndef NO_DIALOGS
#include "../dialogs/src/dialogs.h"
+#endif
#ifdef __APPLE__
typedef void* BEID_DIALOGHANDLE;
#else
typedef unsigned long BEID_DIALOGHANDLE;
#endif
-#endif
+
namespace eIDMW
{
#ifdef EIDMW_PF_EXPORT

@ -1,2 +1,3 @@
DIST libu2f-host-1.0.0.tar.xz 454376 SHA256 18c56b9b5cfea2566925bba45b25a4e20b3ef8696905d8f2a06116316e164374 SHA512 ef953ffd8179e5ed4bcd1e02ccc82e671a7979b03a61ac73098be6509ab9d6badd6bb4e3e805de4ddbddbae3e8be71b091344f4230657464f6ba4ac3af171387 WHIRLPOOL cc76b778bcf20ef696900dd0ea65c0925052360a22e505a34ecb8738289d7bbaa88b31f2b25b91b6a1a22a240d01784bc6ef1cb9774c818fa0570328e9f13183
DIST libu2f-host-1.1.0.tar.xz 455424 SHA256 441bb832ee42acf3a5e5a229444c610218da381eb7daaf2aa750c004dc756d86 SHA512 3861ea748ff6ae0bae756182c6c4bd9a25dafc6e28eec3d6aad0eb700dcddc56ba61ed0c6a60395b8a296764c83b3fadb6954f9001cfb880e93758aaeecf34df WHIRLPOOL b6a91afd99a70db8c78a2a72950f210bbcbea0322780b768611aa528ad0159647bdc7446e1dffd91f8d9b6bcbd8105b8b38c9eb5d9eb2db9ef7d193c97096f3e
DIST libu2f-host-1.1.1.tar.xz 455652 SHA256 e14d06196aba1fcf80498929e6460370e58b96e8298c57e4660030c045000e3c SHA512 1f6d26d47cabd44391a780f03d88b6ab9ed996bab26e2605f1942bfff2203aa9a8e90fa80c010ccf2e575dbfca3bd03d3322381343cdf6def3829bbe45db8693 WHIRLPOOL 46fc4e087e2679bf8c07922fbd31200d702c5c88838812618c763615f24f7c0ecdc71ed4bd436fde1a9526eea23820bd6f2448040ce711f7fd87ca5c96281efd

@ -0,0 +1,64 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit autotools-utils linux-info udev user
DESCRIPTION="Yubico Universal 2nd Factor (U2F) Host C Library"
HOMEPAGE="https://developers.yubico.com/libu2f-host/"
SRC_URI="https://developers.yubico.com/${PN}/Releases/${P}.tar.xz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="kernel_linux static-libs systemd"
RDEPEND="
dev-libs/hidapi
dev-libs/json-c"
DEPEND="${RDEPEND}
virtual/pkgconfig"
RDEPEND="${RDEPEND}
systemd? ( sys-apps/systemd[acl] )"
CONFIG_CHECK="~HIDRAW"
pkg_setup() {
# The U2F device node will be owned by group 'plugdev'
# in non-systemd configurations
if ! use systemd; then
enewgroup plugdev
fi
}
src_prepare() {
autotools-utils_src_prepare
sed -e 's:TAG+="uaccess":MODE="0664", GROUP="plugdev":g' \
70-u2f.rules > 70-u2f-udev.rules || die
}
src_configure() {
autotools-utils_src_configure
}
src_install() {
autotools-utils_src_install
if use kernel_linux; then
if use systemd; then
udev_dorules 70-u2f.rules
else
udev_newrules 70-u2f-udev.rules 70-u2f.rules
fi
fi
}
pkg_postinst() {
if ! use systemd; then
elog "Users must be a member of the 'plugdev' group"
elog "to be able to access U2F devices"
fi
}

@ -15,7 +15,7 @@ SRC_URI="http://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz"
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
IUSE="doc +keyutils libressl openldap +pkinit selinux +threads test xinetd"
CDEPEND="

@ -44,7 +44,7 @@ SRC_URI="
LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
IUSE=""
src_prepare() {

@ -1,8 +1,6 @@
DIST emacs-18.59-linux22x-elf-glibc21.diff.gz 15671 SHA256 fb810d893938883d50a3a8d7c43fbeb1604d5454f760b8f1f700326c8ee659dd SHA512 c6c6ea33850dadf08d68fff56fc6aacc80ad1aa36661260715d50b95438942d56e6244094427d50356cfe716f26559feb885254c436399bff7be639637d605b6 WHIRLPOOL cafaa0fb0d06058cac8e445a7a1b5cba145d23186477a9c681efdab8ca0f18a9675dec3a93851fd7138890701f83fab83300c28a548c8fc22478a0cfff95d5da
DIST emacs-18.59-patches-8.tar.bz2 19667 SHA256 637542bf5ee07d4abac11b76e742598a60787f3869dbf377eed99ae005fbc59d SHA512 a6564bc16724bfdb22f77b0e21b6064ca5e0e1bc91f3223c1037c26f8a048f28ac7a5da6817dc940a5f00f1f39bbfcda2277645409cd7e143a55fabdc3d3fe5d WHIRLPOOL 6b81f978aef2b429262e79ab1d995cca9237dc9c9d98144d2dc3de07bc2cdcec8547adbaf5ad41d9cce3239554918c04c7b9ff783b7931582a3a7398eb2b66f1
DIST emacs-18.59-patches-9.tar.xz 21380 SHA256 69411c57b20850e8aab1e20614437f9a836c2ddf47c46a833d0262c138fa3270 SHA512 595a4a7a4052c3b3325e4d4952eed24c98d3dd62b7ce89bd149f046552e2dd67ec3e720b7559fbc086b06a667c992bccc60201ef53b263dbd0fc96cbcdceee38 WHIRLPOOL 23f803d940c35fe9519fe7169e6bca7012c2d2db2246dec121fba37e8dbf39f411a9e579a9cbd4193562da72b9ac226286ad687877ccadd7cb78ea7eb615ab3f
DIST emacs-18.59.tar.gz 2962652 SHA256 1e27e33f91984a91e9b4c1f21433f931aba03670960ecc147bb6d7b0de0f051e SHA512 03ce565e346e89b7aacb1852f4783e8907f394de7da0c543b475cb038eb89b87f980d0f7ca1841b1d2108b20f211e95113c7214e4a33e5767a1827ff43173f33 WHIRLPOOL 5e98e71518f665e2a8278afe54e0ace6d7fdd9df23ff0a3354ffc1d5cc25cd21b0dd4d82766fcb436d4f24e9291c933295e956e1ffea43cfeedf915175763be6
DIST emacs-23.4-patches-17.tar.xz 16164 SHA256 bc9d4a36239f2749e218d903b67102e211a3a62ef162f5ab2801865dab77b752 SHA512 ceccd559b4f53328d75016b64d246ecf6fca7edebd080ce3bbba5f4d000bec38be5da91f3195c972ede0710da14b3be0545891321259b0a0b2963981c8fd62de WHIRLPOOL 4b70ce4d876e92a006e3dc0a31301f604aa8fa53a198515d1cbb3517a94933b1d7a11636494c1bd28ad1049a5a233d4ec13213e74e1eaff1cf96bb1fd095c345
DIST emacs-23.4-patches-19.tar.xz 17684 SHA256 078f5e103af9b9950afefcb8575eefd7b07eb0a241ab67ddb3b8b6d31f657abb SHA512 118d58cd5c8a74b39642bf45920fed25687af2e4a076affe985bf359862950eeba4f2ca99c6482c17c311466fbfaab3f4d583466821da4917fae9bec6e95940a WHIRLPOOL f6fe96f5cb0c2de2a48e6eda2cd26c9c724cd2da661ef4d3e4e4dd14382299615aac4b95bd4e7a21caae74b7630a70d160d65e89f6ac5fa91ad8d9bedaddded4
DIST emacs-23.4.tar.bz2 38646508 SHA256 26576f9e664397c729f78f5ffcd092969251988461896fe8793062346ee988b9 SHA512 def7a95ecaefae24d8102b96b1d575a23def1b11a8f0bb17b68f7913bd118e2ea4449a8feee76c1bd649f099b70419f0d494ddd9bb32b26f92720cda842b0296 WHIRLPOOL 2384c3f63ff153c3975e373334d6021d46b23ad3cab448ed2e1180501236453a61d13bf1dfbb2e6075bb141dd8511d85f77e37c763b39769f98de48eacc56f3b
DIST emacs-24.4-patches-5.tar.xz 6000 SHA256 967dac364282a51933f90c56f368bc3f2741efe0b7ff42d3151bb4824b70fa04 SHA512 0a337ad5b7601f5e453645d1fba99717328c6bc7a5505bcb4bd8e853179cf61be43eb6f3b9370edf0f44aa6485d4847c14554c1592ccc7da87b10dabaaa9d421 WHIRLPOOL 149f3a431d055963c544d9fa6c6447a16aa093840f6bf4086f50506979356a12407af16291c46ee62a92b3ee41767452046f45a7163214be33ab7bdbcd6059dc

@ -1,151 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils toolchain-funcs flag-o-matic multilib
DESCRIPTION="The extensible self-documenting text editor"
HOMEPAGE="https://www.gnu.org/software/emacs/"
SRC_URI="ftp://ftp.gnu.org/old-gnu/emacs/${P}.tar.gz
ftp://ftp.splode.com/pub/users/friedman/emacs/${P}-linux22x-elf-glibc21.diff.gz
https://dev.gentoo.org/~ulm/emacs/${P}-patches-8.tar.bz2"
LICENSE="GPL-1+ GPL-2+ BSD" #HPND
SLOT="18"
KEYWORDS="amd64 x86"
IUSE="abi_x86_x32"
RDEPEND=">=app-eselect/eselect-emacs-1.16
sys-libs/ncurses:0
amd64? (
abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0[abi_x86_x32(-)?] )
!abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0[abi_x86_32(-)] )
)"
# X? ( x11-libs/libX11[-xcb] )
DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
epatch "${WORKDIR}/${P}-linux22x-elf-glibc21.diff"
EPATCH_SUFFIX=patch epatch
epatch_user
}
src_configure() {
# autoconf? What's autoconf? We are living in 1992. ;-)
local arch
case ${ARCH} in
amd64)
if use abi_x86_x32; then
arch=x86-x32
multilib_toolchain_setup x32
else
arch=intel386
multilib_toolchain_setup x86
fi
;;
x86) arch=intel386 ;;
*) die "Architecture ${ARCH} not yet supported" ;;
esac
local cmd="s/\"s-.*\.h\"/\"s-linux.h\"/;s/\"m-.*\.h\"/\"m-${arch}.h\"/"
#use X && cmd="${cmd};s/.*\(#define HAVE_X_WINDOWS\).*/\1/"
sed -e "${cmd}" src/config.h-dist >src/config.h || die
cat <<-END >src/paths.h
#define PATH_LOADSEARCH "/usr/share/emacs/${PV}/lisp"
#define PATH_EXEC "/usr/share/emacs/${PV}/etc"
#define PATH_LOCK "/var/lib/emacs/lock/"
#define PATH_SUPERLOCK "/var/lib/emacs/lock/!!!SuperLock!!!"
END
sed -i -e "s:/usr/lib/\([^ ]*\).o:/usr/$(get_libdir)/\1.o:g" \
-e "s:-lncurses:$("$(tc-getPKG_CONFIG)" --libs ncurses):" \
src/s-linux.h || die
# -O3 and -finline-functions cause segmentation faults at run time.
filter-flags -finline-functions
replace-flags -O[3-9] -O2
strip-flags
}
src_compile() {
# Do not use the sandbox, or the dumped Emacs will be twice as large
export SANDBOX_ON=0
emake --jobs=1 \
CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Demacs" \
LD="$(tc-getCC) -nostdlib" LDFLAGS="${LDFLAGS}"
}
src_install() {
local basedir="/usr/share/emacs/${PV}" i
dodir ${basedir}
dodir /usr/share/man/man1
emake --jobs=1 \
LIBDIR="${D}"${basedir} \
BINDIR="${D}"/usr/bin \
MANDIR="${D}"/usr/share/man/man1 \
install
rmdir "${D}"${basedir}/lock || die
find "${D}"${basedir} -type f \( -name "*.c" -o -name ChangeLog \
-o -name COPYING ! -path "*/etc/COPYING" \) -exec rm "{}" + || die
fperms -R go-w ${basedir}
# remove duplicate DOC file
rm "${D}"${basedir}/etc/DOC || die
# move executables to the correct place
mv "${D}"/usr/bin/emacs{,-${SLOT}} || die
for i in etags ctags emacsclient; do
mv "${D}"/usr/bin/${i}{,-emacs-${SLOT}} || die
rm "${D}"${basedir}/etc/${i} || die
done
dodir /usr/libexec/emacs/${PV}
for i in wakeup digest-doc sorted-doc movemail cvtmail fakemail \
yow env server
do
mv "${D}"${basedir}/etc/${i} "${D}"/usr/libexec/emacs/${PV}/${i} || die
dosym ../../../../libexec/emacs/${PV}/${i} ${basedir}/etc/${i}
done
for i in test-distrib make-docfile; do
rm "${D}"${basedir}/etc/${i} || die
done
# move man page
mv "${D}"/usr/share/man/man1/emacs{,-${SLOT}}.1 || die
# move Info files
dodir /usr/share/info
mv "${D}"${basedir}/info "${D}"/usr/share/info/emacs-${SLOT} || die
dosym ../../info/emacs-${SLOT} "${basedir}"/info
docompress -x /usr/share/info
# move Info dir to avoid collisions with the dir file generated by portage
mv "${D}"/usr/share/info/emacs-${SLOT}/dir{,.orig} || die
touch "${D}"/usr/share/info/emacs-${SLOT}/.keepinfodir
dodir /var/lib/emacs
diropts -m0777
keepdir /var/lib/emacs/lock
dodoc README PROBLEMS
}
pkg_preinst() {
# move Info dir file to correct name
if [[ -d "${D}"/usr/share/info ]]; then
mv "${D}"/usr/share/info/emacs-${SLOT}/dir{.orig,} || die
fi
}
pkg_postinst() {
eselect emacs update ifunset
}
pkg_postrm() {
eselect emacs update ifunset
}

@ -1,348 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
WANT_AUTOMAKE="none"
inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
HOMEPAGE="https://www.gnu.org/software/emacs/"
SRC_URI="mirror://gnu/emacs/${P}.tar.bz2
https://dev.gentoo.org/~ulm/emacs/${P}-patches-17.tar.xz"
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
SLOT="23"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE="alsa aqua athena dbus games gconf gif gpm gtk gzip-el hesiod jpeg kerberos livecd m17n-lib motif pax_kernel png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
REQUIRED_USE="?? ( aqua X )"
RDEPEND="sys-libs/ncurses:0
>=app-eselect/eselect-emacs-1.16
>=app-emacs/emacs-common-gentoo-1.5[games?,X?]
net-libs/liblockfile
hesiod? ( net-dns/hesiod )
kerberos? ( virtual/krb5 )
alsa? ( media-libs/alsa-lib )
gpm? ( sys-libs/gpm )
dbus? ( sys-apps/dbus )
X? (
x11-libs/libXmu
x11-libs/libXt
x11-misc/xbitmaps
gconf? ( >=gnome-base/gconf-2.26.2 )
gif? ( media-libs/giflib )
jpeg? ( virtual/jpeg:0= )
png? ( >=media-libs/libpng-1.4:0= )
svg? ( >=gnome-base/librsvg-2.0 )
tiff? ( media-libs/tiff:0 )
xpm? ( x11-libs/libXpm )
xft? (
media-libs/fontconfig
media-libs/freetype
x11-libs/libXft
m17n-lib? (
>=dev-libs/libotf-0.9.4
>=dev-libs/m17n-lib-1.5.1
)
)
gtk? ( x11-libs/gtk+:2 )
!gtk? (
motif? ( >=x11-libs/motif-2.3:0 )
!motif? (
Xaw3d? ( x11-libs/libXaw3d )
!Xaw3d? ( athena? ( x11-libs/libXaw ) )
)
)
)"
DEPEND="${RDEPEND}
alsa? ( virtual/pkgconfig )
dbus? ( virtual/pkgconfig )
X? ( virtual/pkgconfig )
gzip-el? ( app-arch/gzip )
pax_kernel? (
sys-apps/attr
sys-apps/paxctl
)"
RDEPEND="${RDEPEND}
!<app-editors/emacs-vcs-${PV}"
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
SITEFILE="20${PN}-${SLOT}-gentoo.el"
# FULL_VERSION keeps the full version number, which is needed in
# order to determine some path information correctly for copy/move
# operations later on
FULL_VERSION="${PV%%_*}"
S="${WORKDIR}/emacs-${FULL_VERSION}"
src_prepare() {
EPATCH_SUFFIX=patch epatch
epatch_user
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
|| die "unable to sed ctags.1"
if ! use alsa; then
# ALSA is detected even if not requested by its USE flag.
# Suppress it by supplying pkg-config with a wrong library name.
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
|| die "unable to sed configure.in"
fi
if ! use gzip-el; then
# Emacs' build system automatically detects the gzip binary and
# compresses el files. We don't want that so confuse it with a
# wrong binary name
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
|| die "unable to sed configure.in"
fi
eautoreconf
}
src_configure() {
strip-flags
filter-flags -fstrict-aliasing -pie
append-flags $(test-flags -fno-strict-aliasing)
if use sh; then
replace-flags "-O[1-9]" -O0 #262359
elif use ia64; then
replace-flags "-O[2-9]" -O1 #325373
else
replace-flags "-O[3-9]" -O2
fi
local myconf
if use alsa && ! use sound; then
einfo "Although sound USE flag is disabled you chose to have alsa,"
einfo "so sound is switched on anyway."
myconf+=" --with-sound"
else
myconf+=" $(use_with sound)"
fi
if use X; then
myconf+=" --with-x --without-ns"
myconf+=" $(use_with gconf)"
myconf+=" $(use_with toolkit-scroll-bars)"
myconf+=" $(use_with gif)"
myconf+=" $(use_with jpeg)"
myconf+=" $(use_with png)"
myconf+=" $(use_with svg rsvg)"
myconf+=" $(use_with tiff)"
myconf+=" $(use_with xpm)"
if use xft; then
myconf+=" --with-xft"
myconf+=" $(use_with m17n-lib libotf)"
myconf+=" $(use_with m17n-lib m17n-flt)"
else
myconf+=" --without-xft"
myconf+=" --without-libotf --without-m17n-flt"
use m17n-lib && ewarn \
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
fi
# GTK+ is the default toolkit if USE=gtk is chosen with other
# possibilities. Emacs upstream thinks this should be standard
# policy on all distributions
local f
if use gtk; then
einfo "Configuring to build with GIMP Toolkit (GTK+)"
myconf+=" --with-x-toolkit=gtk"
for f in motif Xaw3d athena; do
use ${f} && ewarn \
"USE flag \"${f}\" has no effect if \"gtk\" is set."
done
elif use motif; then
einfo "Configuring to build with Motif toolkit"
myconf+=" --with-x-toolkit=motif"
for f in Xaw3d athena; do
use ${f} && ewarn \
"USE flag \"${f}\" has no effect if \"motif\" is set."
done
elif use athena || use Xaw3d; then
einfo "Configuring to build with Athena/Lucid toolkit"
myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
else
einfo "Configuring to build with no toolkit"
myconf+=" --with-x-toolkit=no"
fi
elif use aqua; then
einfo "Configuring to build with Nextstep (Cocoa) support"
myconf+=" --with-ns --disable-ns-self-contained"
myconf+=" --without-x"
else
myconf+=" --without-x --without-ns"
fi
# Save version information in the Emacs binary. It will be available
# in variable "system-configuration-options".
myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}"
# According to configure, this option is only used for GNU/Linux
# (x86_64 and s390). For Gentoo Prefix we have to explicitly spell
# out the location because $(get_libdir) does not necessarily return
# something that matches the host OS's libdir naming (e.g. RHEL).
local crtdir=$($(tc-getCC) -print-file-name=crt1.o)
crtdir=${crtdir%/*}
econf \
--program-suffix="-${EMACS_SUFFIX}" \
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
--localstatedir="${EPREFIX}"/var \
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
--with-crt-dir="${crtdir}" \
--with-gameuser=":gamestat" \
$(use_with hesiod) \
$(use_with kerberos) $(use_with kerberos kerberos5) \
$(use_with gpm) \
$(use_with dbus) \
${myconf}
}
src_compile() {
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
emake CC="$(tc-getCC)" \
AR="$(tc-getAR) cq" \
RANLIB="$(tc-getRANLIB)"
}
src_install () {
emake DESTDIR="${D}" install
rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
|| die "removing duplicate emacs executable failed"
mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \
|| die "moving emacs executable failed"
# move man pages to the correct place
local m
mv "${ED}"/usr/share/man/man1/{emacs,${EMACS_SUFFIX}}.1 \
|| die "moving emacs man page failed"
for m in b2m ctags ebrowse emacsclient etags grep-changelog rcs-checkin; do
mv "${ED}"/usr/share/man/man1/${m}{,-${EMACS_SUFFIX}}.1 \
|| die "moving ${m} man page failed"
done
# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
|| die "moving info dir failed"
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
# avoid collision between slots, see bug #169033 e.g.
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
rm -rf "${ED}"/usr/share/{applications,icons}
rm -rf "${ED}"/var
# remove unused <version>/site-lisp dir
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
# remove COPYING file (except for etc/COPYING used by describe-copying)
rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
local cdir
if use source; then
cdir="/usr/share/emacs/${FULL_VERSION}/src"
insinto "${cdir}"
# This is not meant to install all the source -- just the
# C source you might find via find-function
doins src/*.{c,h,m}
doins -r src/{m,s}
rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/Makefile.c
rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/{m,s}/README
elif has installsources ${FEATURES}; then
cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
fi
sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF
X
;;; ${PN}-${SLOT} site-lisp configuration
X
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
Y (setq find-function-C-source-directory
Y "${EPREFIX}${cdir}")
X (let ((path (getenv "INFOPATH"))
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
X (and path
X ;; move Emacs Info dir before anything else in /usr/share/info
X (let* ((p (cons nil (split-string path ":" t))) (q p))
X (while (and (cdr q) (not (string-match re (cadr q))))
X (setq q (cdr q)))
X (setcdr q (cons dir (delete dir (cdr q))))
X (setq Info-directory-list (prune-directory-list (cdr p)))))))
EOF
elisp-site-file-install "${T}/${SITEFILE}" || die
dodoc README BUGS
if use aqua; then
dodir /Applications/Gentoo
rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app
mv nextstep/Emacs.app \
"${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die
fi
DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs
through the Emacs eselect module, which also redirects man and info
pages. Therefore, several Emacs versions can be installed at the
same time. \"man emacs.eselect\" for details.
\\n\\nIf you upgrade from a previous major version of Emacs, then
it is strongly recommended that you use app-admin/emacs-updater
to rebuild all byte-compiled elisp files of the installed Emacs
packages."
use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
Installing media-fonts/font-adobe-{75,100}dpi on the X server's
machine would satisfy basic Emacs requirements under X11.
See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
for how to enable anti-aliased fonts."
use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in
\"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
it into /Applications by yourself."
readme.gentoo_create_doc
}
pkg_preinst() {
# move Info dir file to correct name
local infodir=/usr/share/info/${EMACS_SUFFIX} f
if [[ -f ${ED}${infodir}/dir.orig ]]; then
mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
elif [[ -d "${ED}"${infodir} ]]; then
# this should not happen in EAPI 4
ewarn "Regenerating Info directory index in ${infodir} ..."
rm -f "${ED}"${infodir}/dir{,.*}
for f in "${ED}"${infodir}/*; do
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
install-info --info-dir="${ED}"${infodir} "${f}" \
|| die "install-info failed"
fi
done
fi
}
pkg_postinst() {
elisp-site-regen
readme.gentoo_print_elog
if use livecd; then
# force an update of the emacs symlink for the livecd/dvd,
# because some microemacs packages set it with USE=livecd
eselect emacs update
elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
# refresh symlinks in case any installed files have changed
eselect emacs set ${EMACS_SUFFIX}
else
eselect emacs update ifunset
fi
}
pkg_postrm() {
elisp-site-regen
eselect emacs update ifunset
}

@ -14,7 +14,7 @@ SRC_URI="mirror://gnu/emacs/${P}.tar.bz2
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
SLOT="23"
KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE="alsa aqua athena dbus games gconf gif gpm gtk gzip-el hesiod jpeg kerberos livecd m17n-lib motif pax_kernel png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
REQUIRED_USE="?? ( aqua X )"

@ -13,7 +13,7 @@ SRC_URI="mirror://gnu/emacs/${P}.tar.xz
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
SLOT="24"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="acl alsa aqua athena dbus games gconf gfile gif gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
REQUIRED_USE="?? ( aqua X )"

@ -1,3 +1,3 @@
DIST docker-compose-1.4.0.tar.gz 79532 SHA256 2748cc8dd0829b44f0f686e36683cab58e1a4bc869442a04508504d2f62d0337 SHA512 470442aa78ddb24e8b9287953031e17a96a89780edd3a85955c923ffe00f4bfe655412dc15422437121593d7e2899f0847813d3716fc9ed576f93e6455cb868b WHIRLPOOL 9dc6731dad3df6422ec1e1b66049c8e9f04068b2fc2c8180da44220c1fbedc4919dfe17475cd539c3f33a079f3d04f875baaf769a7bc0875de48cf622670dc4b
DIST docker-compose-1.5.1.tar.gz 104331 SHA256 df5e885fd758a2b5983574d6718b5a07f92c7166c5706dc6ff88687d27bfaf55 SHA512 be6678c27b73516e14bf80255e52bde72517bd65a91f1be2393a15f0f0b87ff9ddd785e22016a9a5e1a68d5e6b9be395a96d60b7bc862f24647adf81752b9baa WHIRLPOOL 0b1312cb0d99a7cf02d8a88a7b00f3105f497c1cfa0ac3b32b369cd3984f2b1eaa8ea2c9e2e5a70ada3a371fb8a774245b75eaf5a7665170398df5f703793311
DIST docker-compose-1.5.2.tar.gz 106583 SHA256 79aa7e2e6ef9ab1936f8777476ffd4bb329875ec3d3664d239896d2f2a3c4f4f SHA512 be671503bbb91fdb5fdf9ff593f28d290d1c65738d055629d8252cf4c4eea7f5931a1e1d6d7a0b27640166671ecb095b413cb694b768437be3ec207e059f4ccc WHIRLPOOL bb12df93739329b9577db41a317a22976dc97ca1d1d3dd72e2ff4b8c245caf106f1aab466d42ffa7b9e6a7bf6f628f8977d2700460591051dade074535f0175e
DIST docker-compose-1.6.2.tar.gz 128730 SHA256 264e2cbdd3fa314ba75f2681d10b0cff8d989a62979c1ba42d15a6d4c4002482 SHA512 7254a7e88b9030eeac87c1c6abfeea12e978519cc4e0236e37537c3143198d448e504107b1599b355a3c75e03e0acbd6fe552d0ff482cd3e91772d759a85544a WHIRLPOOL 3755ef9c189bd08f5bb810bf527041393ab788dcd302e6f1553989de73375ba34e062d2b21c10b144132ce9eb3997310b683b1b5b46aaf992fedfaa652deb6b2

@ -1,9 +1,9 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_COMPAT=( python2_7 python3_4 )
inherit bash-completion-r1 distutils-r1
@ -18,41 +18,40 @@ IUSE="test"
CDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/dockerpty-0.3.4[${PYTHON_USEDEP}]
<dev-python/dockerpty-0.4[${PYTHON_USEDEP}]
>=dev-python/docker-py-1.3.1[${PYTHON_USEDEP}]
<dev-python/docker-py-1.4[${PYTHON_USEDEP}]
>=dev-python/cached-property-1.2.0[${PYTHON_USEDEP}]
<dev-python/cached-property-2[${PYTHON_USEDEP}]
>=dev-python/dockerpty-0.4.1[${PYTHON_USEDEP}]
<dev-python/dockerpty-0.5[${PYTHON_USEDEP}]
>=dev-python/docker-py-1.7.0[${PYTHON_USEDEP}]
<dev-python/docker-py-2[${PYTHON_USEDEP}]
>=dev-python/docopt-0.6.1[${PYTHON_USEDEP}]
<dev-python/docopt-0.7[${PYTHON_USEDEP}]
>=dev-python/jsonschema-2.5.1[${PYTHON_USEDEP}]
<dev-python/jsonschema-3[${PYTHON_USEDEP}]
>=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
<dev-python/pyyaml-4[${PYTHON_USEDEP}]
>=dev-python/requests-2.6.1[${PYTHON_USEDEP}]
<dev-python/requests-2.8[${PYTHON_USEDEP}]
>=dev-python/six-1.3.0[${PYTHON_USEDEP}]
<dev-python/six-2[${PYTHON_USEDEP}]
>=dev-python/texttable-0.8.1[${PYTHON_USEDEP}]
<dev-python/texttable-0.9[${PYTHON_USEDEP}]
>=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]
<dev-python/websocket-client-1.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/enum34-1.0.4[${PYTHON_USEDEP}]' 'python2_7' )
$(python_gen_cond_dep '<dev-python/enum34-2[${PYTHON_USEDEP}]' 'python2_7' )
"
DEPEND="
test? (
${CDEPEND}
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]' 'python2_7' )
)
"
RDEPEND="${CDEPEND}"
python_prepare_all() {
local PATCHES=(
"${FILESDIR}"/expand-request-versions.patch
)
distutils-r1_python_prepare_all
}
python_test() {
nosetests tests/unit || die "tests failed under ${EPYTHON}"
${PYTHON} -m pytest tests/unit || die "tests failed under ${EPYTHON}"
}
python_install_all() {

@ -1 +1,2 @@
DIST spice-protocol-0.12.10.tar.bz2 103029 SHA256 788f0d7195bec5b14371732b562eb55ca82712aab12273b0e87529fb30532efb SHA512 4f6545ced78a4eedf6adca3f10d536a57205626e631d7cf380be4ea08ca2e1fbbe32566e59c2ce1900a7f057a6dab044483b8423885280cbf142b253d8e03711 WHIRLPOOL 224348a06c6116070119de7fc700dc0d3bf3be271b3043d0ebb01200958b145282bbbfee48f2a9ceb2f719bf631832b431a2af5ae6c8a09bc60640336cab5274
DIST spice-protocol-0.12.11.tar.bz2 72691 SHA256 22bae438bfb6c3245b195755c3f55e72c1f2bfae6f39c905b576fcb6c79b6330 SHA512 748217f8e3e5d13e14429d6a963737ecbe545b1fc700efb875e74a83b9a8f98d9d8a8917a65ba3c49f69b478af7a995e708689033663e6354692c50c39f108f3 WHIRLPOOL e0d6efbb9677e9f53901cca9059e355cf1d63b15917335d5c66a2101ad347447061c17e33ffa638c012d9db3c3eac2d69903527e06ce49ce219ab69deb51c7d4

@ -0,0 +1,17 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
DESCRIPTION="Headers defining the SPICE protocol"
HOMEPAGE="http://spice-space.org/"
SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE=""
DEPEND=""
RDEPEND=""

@ -0,0 +1,43 @@
Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
--- a/vmblock-only/linux/dentry.c 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/linux/dentry.c 2015-02-24 03:58:06.038605919 +0300
@@ -32,7 +32,11 @@
#include "block.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
+#else
+static int DentryOpRevalidate(struct dentry *dentry, unsigned int);
+#endif
struct dentry_operations LinkDentryOps = {
.d_revalidate = DentryOpRevalidate,
@@ -58,9 +62,12 @@
*----------------------------------------------------------------------------
*/
-static int
-DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
- struct nameidata *nd) // IN: lookup flags & intent
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd)
+#else
+static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags)
+#endif
+
{
VMBlockInodeInfo *iinfo;
struct nameidata actualNd;
@@ -101,7 +108,11 @@
if (actualDentry &&
actualDentry->d_op &&
actualDentry->d_op->d_revalidate) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+ return actualDentry->d_op->d_revalidate(actualDentry, flags);
+#else
return actualDentry->d_op->d_revalidate(actualDentry, nd);
+#endif
}
if (compat_path_lookup(iinfo->name, 0, &actualNd)) {

@ -0,0 +1,94 @@
Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
Properly initializes UID/GID with repsect to namespaces
Some changes the readlink/setlink APIs
--- a/vmblock-only/linux/inode.c 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/linux/inode.c 2015-02-24 03:58:06.039605762 +0300
@@ -35,9 +35,15 @@
/* Inode operations */
-static struct dentry *InodeOpLookup(struct inode *dir,
- struct dentry *dentry, struct nameidata *nd);
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+static struct dentry *InodeOpLookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
+#else
+static struct dentry *InodeOpLookup(struct inode *, struct dentry *, unsigned int);
+static int InodeOpReadlink(struct dentry *, char __user *, int);
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
#else
@@ -49,12 +55,15 @@
.lookup = InodeOpLookup,
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
static struct inode_operations LinkInodeOps = {
+#else
+struct inode_operations LinkInodeOps = {
+#endif
.readlink = InodeOpReadlink,
.follow_link = InodeOpFollowlink,
};
-
/*
*----------------------------------------------------------------------------
*
@@ -75,7 +84,11 @@
static struct dentry *
InodeOpLookup(struct inode *dir, // IN: parent directory's inode
struct dentry *dentry, // IN: dentry to lookup
- struct nameidata *nd) // IN: lookup intent and information
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ struct nameidata *nd) // IN: lookup intent and information
+#else
+ unsigned int flags)
+#endif
{
char *filename;
struct inode *inode;
@@ -135,7 +148,12 @@
inode->i_size = INODE_TO_IINFO(inode)->nameLen;
inode->i_version = 1;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
inode->i_uid = inode->i_gid = 0;
+#else
+ inode->i_gid = make_kgid(current_user_ns(), 0);
+ inode->i_uid = make_kuid(current_user_ns(), 0);
+#endif
inode->i_op = &LinkInodeOps;
d_add(dentry, inode);
@@ -177,7 +195,12 @@
return -EINVAL;
}
- return vfs_readlink(dentry, buffer, buflen, iinfo->name);
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
+ return vfs_readlink(dentry, buffer, buflen, iinfo->name);
+#else
+ return readlink_copy(buffer, buflen, iinfo->name);
+#endif
+
}
@@ -221,7 +244,7 @@
goto out;
}
- ret = vfs_follow_link(nd, iinfo->name);
+ nd_set_link(nd, iinfo->name);
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
@@ -230,3 +253,4 @@
return ret;
#endif
}
+

@ -0,0 +1,57 @@
The API to create proc entries now takes the file ops structure directly, instead of being set after the fact
Using new __getname/__putname API
--- a/vmblock-only/linux/control.c 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/linux/control.c 2015-02-24 03:58:06.038605919 +0300
@@ -208,9 +208,11 @@
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
- controlProcDirEntry);
+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
+ VMBLOCK_CONTROL_MODE,
+ controlProcDirEntry,
+ &ControlFileOps);
+
if (!controlProcEntry) {
Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
@@ -218,7 +220,10 @@
return -EINVAL;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
controlProcEntry->proc_fops = &ControlFileOps;
+#endif
+
return 0;
}
@@ -287,18 +287,24 @@ ExecuteBlockOp(const char __user *buf,
int i;
int retval;
- name = getname(buf);
+ name = __getname();
if (IS_ERR(name)) {
return PTR_ERR(name);
}
+ i = strncpy_from_user(name, buf, PATH_MAX);
+ if (i < 0 || i == PATH_MAX) {
+ __putname(name);
+ return -EINVAL;
+ }
+
for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
name[i] = '\0';
}
retval = i < 0 ? -EINVAL : blockOp(name, blocker);
- putname(name);
+ __putname(name);
return retval;
}

@ -0,0 +1,14 @@
Hushes a warning
--- a/vmmon-only/linux/driver.c 2015-02-07 03:54:16.000000000 +0300
+++ c/vmmon-only/linux/driver.c 2015-02-24 03:58:06.042605293 +0300
@@ -1328,7 +1328,9 @@
*-----------------------------------------------------------------------------
*/
-__attribute__((always_inline)) static Bool
+#include <linux/compiler-gcc.h>
+
+__always_inline static Bool
LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
{
TSCDelta tscDelta;

@ -0,0 +1,41 @@
replaces usage of vfs_readdir with iterate_dir. origionally found here:
https://bugs.gentoo.org/show_bug.cgi?id=508204
diff -Naur vmblock-only/linux/file.c vmblock-only/linux/file.c
--- vmblock-only/linux/file.c 2013-11-05 23:33:26.000000000 -0500
+++ vmblock-only/linux/file.c 2014-04-26 10:58:03.062635343 -0400
@@ -166,11 +166,9 @@
static int
FileOpReaddir(struct file *file, // IN
- void *dirent, // IN
- filldir_t filldir) // IN
+ struct dir_context *ctx)
{
int ret;
- FilldirInfo info;
struct file *actualFile;
if (!file) {
@@ -184,11 +182,8 @@
return -EINVAL;
}
- info.filldir = filldir;
- info.dirent = dirent;
-
actualFile->f_pos = file->f_pos;
- ret = vfs_readdir(actualFile, Filldir, &info);
+ ret = iterate_dir(actualFile, ctx);
file->f_pos = actualFile->f_pos;
return ret;
@@ -237,7 +232,7 @@
struct file_operations RootFileOps = {
- .readdir = FileOpReaddir,
+ .iterate = FileOpReaddir,
.open = FileOpOpen,
.release = FileOpRelease,
};

@ -0,0 +1,53 @@
simply remove the code for Filldir since it is no longer used with the new
iterate_dir API
diff -rupN vmblock-only/linux/file.c vmblock-only.new/linux/file.c
--- vmblock-only/linux/file.c 2014-10-07 23:22:46.832469618 -0400
+++ vmblock-only.new/linux/file.c 2014-10-07 23:24:35.276472720 -0400
@@ -38,46 +38,6 @@ typedef u64 inode_num_t;
typedef ino_t inode_num_t;
#endif
-/* Specifically for our filldir_t callback */
-typedef struct FilldirInfo {
- filldir_t filldir;
- void *dirent;
-} FilldirInfo;
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * Filldir --
- *
- * Callback function for readdir that we use in place of the one provided.
- * This allows us to specify that each dentry is a symlink, but pass through
- * everything else to the original filldir function.
- *
- * Results:
- * Original filldir's return value.
- *
- * Side effects:
- * Directory information gets copied to user's buffer.
- *
- *----------------------------------------------------------------------------
- */
-
-static int
-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
- const char *name, // IN: Dirent name
- int namelen, // IN: len of dirent's name
- loff_t offset, // IN: Offset
- inode_num_t ino, // IN: Inode number of dirent
- unsigned int d_type) // IN: Type of file
-{
- FilldirInfo *info = buf;
-
- /* Specify DT_LNK regardless */
- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
-}
-
-
/* File operations */
/*

@ -0,0 +1,46 @@
removing the no longer existing second parameter to sk_data_ready
doesn't seem it ever served a purpose.
diff -rupN vsock-only/linux/notify.c vsock-only.new/linux/notify.c
--- vsock-only/linux/notify.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notify.c 2014-10-05 23:46:47.943304728 -0400
@@ -515,8 +515,11 @@ VSockVmciHandleWrote(struct sock *sk,
vsk = vsock_sk(sk);
PKT_FIELD(vsk, sentWaitingRead) = FALSE;
#endif
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
diff -rupN vsock-only/linux/notifyQState.c vsock-only.new/linux/notifyQState.c
--- vsock-only/linux/notifyQState.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notifyQState.c 2014-10-05 23:46:33.231303931 -0400
@@ -164,7 +164,11 @@ VSockVmciHandleWrote(struct sock *sk,
struct sockaddr_vm *dst, // IN: unused
struct sockaddr_vm *src) // IN: unused
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
@@ -566,7 +570,11 @@ VSockVmciNotifyPktRecvPostDequeue(struct
}
/* See the comment in VSockVmciNotifyPktSendPostEnqueue */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
return err;

@ -0,0 +1,25 @@
Hushes some (but not all warnings) relating to redefinitions of this define
--- a/vmci-only/shared/vm_device_version.h 2015-02-07 03:11:55.000000000 +0300
+++ c/vmci-only/shared/vm_device_version.h 2015-02-24 03:58:06.041605450 +0300
@@ -53,7 +53,9 @@
* VMware HD Audio codec
* VMware HD Audio controller
*/
+#ifndef PCI_VENDOR_ID_VMWARE
#define PCI_VENDOR_ID_VMWARE 0x15AD
+#endif
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
#define PCI_DEVICE_ID_VMWARE_VGA 0x0711
--- a/vmnet-only/vm_device_version.h 2015-02-07 03:54:16.000000000 +0300
+++ c/vmnet-only/vm_device_version.h 2015-02-24 03:58:06.044604981 +0300
@@ -53,7 +53,9 @@
* VMware HD Audio codec
* VMware HD Audio controller
*/
+#ifndef PCI_VENDOR_ID_VMWARE
#define PCI_VENDOR_ID_VMWARE 0x15AD
+#endif
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
#define PCI_DEVICE_ID_VMWARE_VGA 0x0711

@ -0,0 +1,24 @@
A copy of this since it is no longer exported by the kernel headers
--- a/vmblock-only/shared/compat_namei.h 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/shared/compat_namei.h 2015-02-24 03:51:25.235286047 +0300
@@ -21,6 +21,20 @@
#include <linux/namei.h>
+/* Copy-n-paste from kernel's source/fs/namei.c */
+struct nameidata {
+ struct path path;
+ struct qstr last;
+ struct path root;
+ struct inode *inode; /* path.dentry.d_inode */
+ unsigned int flags;
+ unsigned seq, m_seq;
+ int last_type;
+ unsigned depth;
+ struct file *base;
+ char *saved_names[MAX_NESTED_LINKS + 1];
+};
+
/*
* In 2.6.25-rc2, dentry and mount objects were removed from the nameidata
* struct. They were both replaced with a struct path.

@ -0,0 +1,67 @@
Sources:
https://531682.bugs.gentoo.org/attachment.cgi?id=396484
https://531682.bugs.gentoo.org/attachment.cgi?id=396482
diff -rupN vmblock-only.orig/linux/dentry.c vmblock-only/linux/dentry.c
--- vmblock-only.orig/linux/dentry.c 2015-02-14 18:05:46.000000000 -0500
+++ vmblock-only/linux/dentry.c 2015-02-14 18:09:59.000000000 -0500
@@ -63,7 +63,7 @@ DentryOpRevalidate(struct dentry *dentry
unsigned int flags) // IN: lookup flags & intent
{
VMBlockInodeInfo *iinfo;
- struct nameidata actualNd;
+ struct path actualNd;
struct dentry *actualDentry;
int ret;
diff -rupN vmblock-only.orig/linux/filesystem.c vmblock-only/linux/filesystem.c
--- vmblock-only.orig/linux/filesystem.c 2014-11-20 19:29:15.000000000 -0500
+++ vmblock-only/linux/filesystem.c 2015-02-14 18:10:49.000000000 -0500
@@ -322,7 +322,7 @@ Iget(struct super_block *sb, // IN: f
{
VMBlockInodeInfo *iinfo;
struct inode *inode;
- struct nameidata actualNd;
+ struct path actualNd;
ASSERT(sb);
diff -rupN vmblock-only.orig/shared/compat_namei.h vmblock-only/shared/compat_namei.h
--- vmblock-only.orig/shared/compat_namei.h 2014-11-20 19:29:15.000000000 -0500
+++ vmblock-only/shared/compat_namei.h 2015-02-14 18:08:38.000000000 -0500
@@ -26,21 +26,21 @@
* struct. They were both replaced with a struct path.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
-#define compat_vmw_nd_to_dentry(nd) (nd).path.dentry
+#define compat_vmw_nd_to_dentry(nd) (nd).dentry
#else
#define compat_vmw_nd_to_dentry(nd) (nd).dentry
#endif
/* In 2.6.25-rc2, path_release(&nd) was replaced with path_put(&nd.path). */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
-#define compat_path_release(nd) path_put(&(nd)->path)
+#define compat_path_release(nd) path_put(nd)
#else
#define compat_path_release(nd) path_release(nd)
#endif
/* path_lookup was removed in 2.6.39 merge window VFS merge */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
-#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
+#define compat_path_lookup(name, flags, nd) kern_path(name, flags, nd)
#else
#define compat_path_lookup(name, flags, nd) path_lookup(name, flags, nd)
#endif
diff -u vmblock-only.orig/linux/file.c vmblock-only/linux/file.c
--- vmblock-only.orig/linux/file.c 2015-02-11 12:18:29.000000000 -0500
+++ vmblock-only/linux/file.c 2015-02-11 12:41:41.000000000 -0500
@@ -92,7 +92,7 @@
* and that would try to acquire the inode's semaphore; if the two inodes
* are the same we'll deadlock.
*/
- if (actualFile->f_dentry && inode == actualFile->f_dentry->d_inode) {
+ if (actualFile->f_path.dentry && inode == actualFile->f_path.dentry->d_inode) {
Warning("FileOpOpen: identical inode encountered, open cannot succeed.\n");
if (filp_close(actualFile, current->files) < 0) {
Warning("FileOpOpen: unable to close opened file.\n");

@ -0,0 +1,59 @@
Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
--- a/vmci-only/linux/vmciKernelIf.c 2015-02-07 03:11:55.000000000 +0300
+++ c/vmci-only/linux/vmciKernelIf.c 2015-02-24 03:58:06.041605450 +0300
@@ -40,6 +40,7 @@
#include <linux/socket.h> /* For memcpy_{to,from}iovec(). */
#include <linux/vmalloc.h>
#include <linux/wait.h>
+#include <linux/skbuff.h>
#include "compat_highmem.h"
#include "compat_interrupt.h"
@@ -1196,21 +1197,21 @@
} else {
toCopy = size - bytesCopied;
}
-
+ /* Code cloned from kernels drivers/misc/vmw_vmci/vmci_queue_pair.c */
if (isIovec) {
- struct iovec *iov = (struct iovec *)src;
- int err;
+ struct msghdr *msg = (struct msghdr *)src;
+ int err;
- /* The iovec will track bytesCopied internally. */
- err = memcpy_fromiovec((uint8 *)va + pageOffset, iov, toCopy);
- if (err != 0) {
- if (kernelIf->host) {
- kunmap(kernelIf->u.h.page[pageIndex]);
+ /* The iovec will track bytes_copied internally. */
+ err = memcpy_from_msg((u8 *)va + pageOffset, msg, toCopy);
+ if (err != 0) {
+ if (kernelIf->host)
+ kunmap(kernelIf->u.h.page[pageIndex]);
+ return VMCI_ERROR_INVALID_ARGS;
}
- return VMCI_ERROR_INVALID_ARGS;
- }
- } else {
- memcpy((uint8 *)va + pageOffset, (uint8 *)src + bytesCopied, toCopy);
+ } else {
+ memcpy((u8 *)va + pageOffset,
+ (u8 *)src + bytesCopied, toCopy);
}
bytesCopied += toCopy;
@@ -1273,11 +1274,11 @@
}
if (isIovec) {
- struct iovec *iov = (struct iovec *)dest;
+ struct msghdr *msg = (struct msghdr *)dest;
int err;
/* The iovec will track bytesCopied internally. */
- err = memcpy_toiovec(iov, (uint8 *)va + pageOffset, toCopy);
+ err = memcpy_to_msg(msg, (uint8 *)va + pageOffset, toCopy);
if (err != 0) {
if (kernelIf->host) {
kunmap(kernelIf->u.h.page[pageIndex]);

@ -0,0 +1,25 @@
Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
diff -rupN vsock-only.old/linux/af_vsock.c vsock-only/linux/af_vsock.c
--- vsock-only.old/linux/af_vsock.c 2015-05-06 20:41:47.684046762 -0400
+++ vsock-only/linux/af_vsock.c 2015-05-06 20:52:15.245080779 -0400
@@ -4629,7 +4629,7 @@ VSockVmciStreamSendmsg(struct kiocb *kio
* able to send.
*/
- written = vmci_qpair_enquev(vsk->qpair, msg->msg_iov,
+ written = vmci_qpair_enquev(vsk->qpair, &msg->msg_iter.iov,
len - totalWritten, 0);
if (written < 0) {
err = -ENOMEM;
@@ -4874,9 +4874,9 @@ VSockVmciStreamRecvmsg(struct kiocb *kio
}
if (flags & MSG_PEEK) {
- read = vmci_qpair_peekv(vsk->qpair, msg->msg_iov, len - copied, 0);
+ read = vmci_qpair_peekv(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
} else {
- read = vmci_qpair_dequev(vsk->qpair, msg->msg_iov, len - copied, 0);
+ read = vmci_qpair_dequev(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
}
if (read < 0) {

@ -0,0 +1,16 @@
Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
--- vsock-only/linux/af_vsock.c 2015-05-05 11:31:35.710099711 -0400
+++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:36:33.260115840 -0400
@@ -4727,7 +4727,11 @@ VSockVmciDgramRecvmsg(struct kiocb *kioc
}
/* Place the datagram payload in the user's iovec. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iov, payloadLen);
+#else
+ err = skb_copy_datagram_iter(skb, sizeof *dg, &msg->msg_iter, payloadLen);
+#endif
if (err) {
goto out;
}

@ -0,0 +1,13 @@
Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
--- vsock-only/linux/af_vsock.c 2015-05-05 11:26:05.145081792 -0400
+++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:30:54.304097466 -0400
@@ -4266,7 +4266,7 @@ VSockVmciDgramSendmsg(struct kiocb *kioc
goto out;
}
- memcpy_fromiovec(VMCI_DG_PAYLOAD(dg), msg->msg_iov, len);
+ memcpy_from_msg(VMCI_DG_PAYLOAD(dg), msg, len);
dg->dst = VMCI_MAKE_HANDLE(remoteAddr->svm_cid, remoteAddr->svm_port);
dg->src = VMCI_MAKE_HANDLE(vsk->localAddr.svm_cid, vsk->localAddr.svm_port);

@ -0,0 +1,61 @@
--- vsock-only/linux/af_vsock.c 2015-05-03 00:55:58.955156116 +0200
+++ vsock-only/linux/af_vsock.c.new 2015-05-03 01:01:14.305173750 +0200
@@ -233,14 +233,10 @@
static int VSockVmciStreamGetsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user * optlen);
-static int VSockVmciDgramSendmsg(struct kiocb *kiocb,
- struct socket *sock, struct msghdr *msg, size_t len);
-static int VSockVmciDgramRecvmsg(struct kiocb *kiocb, struct socket *sock,
- struct msghdr *msg, size_t len, int flags);
-static int VSockVmciStreamSendmsg(struct kiocb *kiocb,
- struct socket *sock, struct msghdr *msg, size_t len);
-static int VSockVmciStreamRecvmsg(struct kiocb *kiocb, struct socket *sock,
- struct msghdr *msg, size_t len, int flags);
+static int VSockVmciDgramSendmsg(struct socket *sock, struct msghdr *msg, size_t len);
+static int VSockVmciDgramRecvmsg(struct socket *sock, struct msghdr *msg, size_t len, int flags);
+static int VSockVmciStreamSendmsg(struct socket *sock, struct msghdr *msg, size_t len);
+static int VSockVmciStreamRecvmsg(struct socket *sock, struct msghdr *msg, size_t len, int flags);
static int VSockVmciCreate(
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
@@ -4211,8 +4207,7 @@
*/
static int
-VSockVmciDgramSendmsg(struct kiocb *kiocb, // UNUSED
- struct socket *sock, // IN: socket to send on
+VSockVmciDgramSendmsg(struct socket *sock, // IN: socket to send on
struct msghdr *msg, // IN: message to send
size_t len) // IN: length of message
{
@@ -4541,8 +4536,7 @@
*/
static int
-VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED
- struct socket *sock, // IN: socket to send on
+VSockVmciStreamSendmsg(struct socket *sock, // IN: socket to send on
struct msghdr *msg, // IN: message to send
size_t len) // IN: length of message
{
@@ -4710,8 +4704,7 @@
*/
static int
-VSockVmciDgramRecvmsg(struct kiocb *kiocb, // UNUSED
- struct socket *sock, // IN: socket to receive from
+VSockVmciDgramRecvmsg(struct socket *sock, // IN: socket to receive from
struct msghdr *msg, // IN/OUT: message to receive into
size_t len, // IN: length of receive buffer
int flags) // IN: receive flags
@@ -4803,8 +4796,7 @@
*/
static int
-VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
- struct socket *sock, // IN: socket to receive from
+VSockVmciStreamRecvmsg(struct socket *sock, // IN: socket to receive from
struct msghdr *msg, // IN/OUT: message to receive into
size_t len, // IN: length of receive buffer
int flags) // IN: receive flags

@ -0,0 +1,56 @@
--- vmci-only/linux/driver.c 2015-02-07 01:11:55.000000000 +0100
+++ vmci-only/linux/driver.c.new 2015-07-23 00:28:25.713804866 +0200
@@ -37,6 +37,7 @@
#include <linux/moduleparam.h>
#include <linux/poll.h>
#include <linux/smp.h>
+#include <linux/vmalloc.h>
#include "compat_highmem.h"
#include "compat_interrupt.h"
--- vmblock-only/linux/inode.c 2015-08-23 00:34:11.959377109 +0200
+++ vmblock-only/linux/inode.c.new 2015-08-23 00:37:49.839389292 +0200
@@ -38,7 +38,9 @@
static int InodeOpReadlink(struct dentry *, char __user *, int);
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
#else
static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
@@ -203,13 +205,19 @@
*----------------------------------------------------------------------------
*/
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+static const char *
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *
#else
static int
#endif
InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+ void **cookie) // OUT: stores opaque pointer
+#else
struct nameidata *nd) // OUT: stores result
+#endif
{
int ret;
VMBlockInodeInfo *iinfo;
@@ -226,7 +234,11 @@
goto out;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+ return *cookie = iinfo->name;
+#else
nd_set_link(nd, iinfo->name);
+#endif
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)

@ -0,0 +1,22 @@
--- vmnet-only/vmnetInt.h 2015-05-28 01:46:53.023206897 +0200
+++ vmnet-only/vmnetInt.h.new 2015-05-28 01:47:07.911207730 +0200
@@ -79,7 +79,7 @@
extern struct proto vmnet_proto;
#ifdef VMW_NETDEV_HAS_NET
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
- PF_NETLINK, _pri, &vmnet_proto)
+ PF_NETLINK, _pri, &vmnet_proto, 0)
#else
# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1)
#endif
--- vsock-only/linux/af_vsock.c 2015-05-28 01:50:03.553217551 +0200
+++ vsock-only/linux/af_vsock.c.new 2015-05-28 01:54:55.248233862 +0200
@@ -2829,7 +2829,7 @@
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
sk = sk_alloc(vsockVmciFamilyOps.family, priority, &vsockVmciProto, 1);
#else
- sk = sk_alloc(net, vsockVmciFamilyOps.family, priority, &vsockVmciProto);
+ sk = sk_alloc(net, vsockVmciFamilyOps.family, priority, &vsockVmciProto, 0);
#endif
if (!sk) {
return NULL;

@ -0,0 +1,27 @@
diff -ru work.old/vmci-only/linux/driver.c work/vmci-only/linux/driver.c
--- work.old/vmci-only/linux/driver.c 2015-09-14 21:07:49.751696932 +0200
+++ work/vmci-only/linux/driver.c 2015-09-14 22:10:48.015908198 +0200
@@ -2467,8 +2467,6 @@
static void __exit
vmci_exit(void)
{
- int retval;
-
if (guestDeviceInit) {
pci_unregister_driver(&vmci_driver);
vfree(data_buffer);
@@ -2480,12 +2478,8 @@
VMCI_HostCleanup();
- retval = misc_deregister(&linuxState.misc);
- if (retval) {
- Warning(LGPFX "Module %s: error unregistering\n", VMCI_MODULE_NAME);
- } else {
- Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);
- }
+ misc_deregister(&linuxState.misc);
+ Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);
hostDeviceInit = FALSE;
}

@ -0,0 +1,14 @@
diff -ru work.old/vmmon-only/linux/driver.c work/vmmon-only/linux/driver.c
--- work.old/vmmon-only/linux/driver.c 2015-08-14 22:39:49.000000000 +0200
+++ work/vmmon-only/linux/driver.c 2015-09-14 22:11:06.807909249 +0200
@@ -387,9 +387,7 @@
#ifdef VMX86_DEVEL
unregister_chrdev(linuxState.major, linuxState.deviceName);
#else
- if (misc_deregister(&linuxState.misc)) {
- Warning("Module %s: error unregistering\n", linuxState.deviceName);
- }
+ misc_deregister(&linuxState.misc);
#endif
Log("Module %s: unloaded\n", linuxState.deviceName);

@ -0,0 +1,56 @@
--- vmblock-only/linux/inode.c 2016-01-30 19:13:04.019947435 +0100
+++ vmblock-only/linux/inode.c.new 2016-01-30 19:13:56.226950354 +0100
@@ -44,7 +44,9 @@
static int InodeOpReadlink(struct dentry *, char __user *, int);
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
+static const char *InodeOpFollowlink(struct dentry *dentry, struct inode *inode, void **cookie);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
@@ -63,7 +65,11 @@
struct inode_operations LinkInodeOps = {
#endif
.readlink = InodeOpReadlink,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
+ .get_link = InodeOpFollowlink,
+#else
.follow_link = InodeOpFollowlink,
+#endif
};
/*
@@ -231,6 +237,9 @@
static int
#endif
InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
+ struct inode *inode,
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
void **cookie) // OUT: stores opaque pointer
#else
@@ -241,12 +250,20 @@
VMBlockInodeInfo *iinfo;
if (!dentry) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
+ ret = -ECHILD;
+#else
Warning("InodeOpReadlink: invalid args from kernel\n");
ret = -EINVAL;
+#endif
goto out;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
+ iinfo = INODE_TO_IINFO(inode);
+#else
iinfo = INODE_TO_IINFO(dentry->d_inode);
+#endif
if (!iinfo) {
ret = -EINVAL;
goto out;

@ -0,0 +1,12 @@
diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
index f1f4b10..c43242f 100644
--- a/vmmon-only/linux/hostif.c
+++ b/vmmon-only/linux/hostif.c
@@ -55,6 +55,7 @@
#include <linux/kthread.h>
#include <linux/wait.h>
+#include <asm/apic.h>
#include "vmware.h"
#include "x86apic.h"

@ -0,0 +1,89 @@
diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
index b21dd44..960c2aa 100644
--- a/vmmon-only/linux/driver.c
+++ b/vmmon-only/linux/driver.c
@@ -178,7 +178,16 @@ static struct vm_operations_struct vmuser_mops = {
#endif
};
-static struct file_operations vmuser_fops;
+static struct file_operations vmuser_fops = {
+ .owner = THIS_MODULE,
+ .poll = LinuxDriverPoll,
+ .unlocked_ioctl = LinuxDriver_Ioctl,
+ .compat_ioctl = LinuxDriver_Ioctl,
+ .open = LinuxDriver_Open,
+ .release = LinuxDriver_Close,
+ .mmap = LinuxDriverMmap
+};
+
static struct timer_list tscTimer;
static Atomic_uint32 tsckHz;
static VmTimeStart tsckHzStartTime;
@@ -357,21 +372,6 @@ init_module(void)
linuxState.fastClockPriority = -20;
linuxState.swapSize = VMMON_UNKNOWN_SWAP_SIZE;
- /*
- * Initialize the file_operations structure. Because this code is always
- * compiled as a module, this is fine to do it here and not in a static
- * initializer.
- */
-
- memset(&vmuser_fops, 0, sizeof vmuser_fops);
- vmuser_fops.owner = THIS_MODULE;
- vmuser_fops.poll = LinuxDriverPoll;
- vmuser_fops.unlocked_ioctl = LinuxDriver_Ioctl;
- vmuser_fops.compat_ioctl = LinuxDriver_Ioctl;
- vmuser_fops.open = LinuxDriver_Open;
- vmuser_fops.release = LinuxDriver_Close;
- vmuser_fops.mmap = LinuxDriverMmap;
-
#ifdef VMX86_DEVEL
devel_init_module();
linuxState.minor = 0;
diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
index b12b982..40bd4cf 100644
--- a/vmnet-only/driver.c
+++ b/vmnet-only/driver.c
@@ -165,7 +165,16 @@ static long VNetFileOpUnlockedIoctl(struct file * filp,
unsigned int iocmd, unsigned long ioarg);
#endif
-static struct file_operations vnetFileOps;
+static struct file_operations vnetFileOps = {
+ .owner = THIS_MODULE,
+ .read = VNetFileOpRead,
+ .write = VNetFileOpWrite,
+ .poll = VNetFileOpPoll,
+ .unlocked_ioctl = VNetFileOpUnlockedIoctl,
+ .compat_ioctl = VNetFileOpUnlockedIoctl,
+ .open = VNetFileOpOpen,
+ .release = VNetFileOpClose
+};
/*
* Utility functions
@@ -476,22 +491,6 @@ init_module(void)
goto err_proto;
}
- /*
- * Initialize the file_operations structure. Because this code is always
- * compiled as a module, this is fine to do it here and not in a static
- * initializer.
- */
-
- memset(&vnetFileOps, 0, sizeof vnetFileOps);
- vnetFileOps.owner = THIS_MODULE;
- vnetFileOps.read = VNetFileOpRead;
- vnetFileOps.write = VNetFileOpWrite;
- vnetFileOps.poll = VNetFileOpPoll;
- vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
- vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
- vnetFileOps.open = VNetFileOpOpen;
- vnetFileOps.release = VNetFileOpClose;
-
retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
if (retval) {
LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",

@ -0,0 +1,65 @@
diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
index ab7a727..e3ec9d2 100644
--- a/vmblock-only/Makefile.kernel
+++ b/vmblock-only/Makefile.kernel
@@ -19,7 +19,7 @@
INCLUDE += -I$(SRCROOT)/include
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel
index ba343ee..861ea83 100644
--- a/vmci-only/Makefile.kernel
+++ b/vmci-only/Makefile.kernel
@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
obj-m += $(DRIVER).o
diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
index 8770d1d..c4746c3 100644
--- a/vmmon-only/Makefile.kernel
+++ b/vmmon-only/Makefile.kernel
@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
-I$(SRCROOT)/vmcore
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
index d1e3133..665d428 100644
--- a/vmnet-only/Makefile.kernel
+++ b/vmnet-only/Makefile.kernel
@@ -19,7 +19,7 @@
INCLUDE := -I$(SRCROOT)
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel
index b4629ee..264b8cb 100644
--- a/vsock-only/Makefile.kernel
+++ b/vsock-only/Makefile.kernel
@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
INCLUDE += -I$(SRCROOT)/linux
INCLUDE += -I$(SRCROOT)/common
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, )

@ -0,0 +1,85 @@
diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
index 2b81323..746c8b8 100644
--- a/vmblock-only/Makefile
+++ b/vmblock-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmblock
PRODUCT := ws
diff --git a/vmci-only/Makefile b/vmci-only/Makefile
index 8e9c5be..6ec828b 100644
--- a/vmci-only/Makefile
+++ b/vmci-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmci
PRODUCT := ws
diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
index 5bd867b..91a83d4 100644
--- a/vmmon-only/Makefile
+++ b/vmmon-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmmon
PRODUCT := @@PRODUCT@@
diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
index d4eb73c..c7c6d38 100644
--- a/vmnet-only/Makefile
+++ b/vmnet-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmnet
PRODUCT := @@PRODUCT@@
diff --git a/vsock-only/Makefile b/vsock-only/Makefile
index 93dd61d..9765696 100644
--- a/vsock-only/Makefile
+++ b/vsock-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vsock
PRODUCT := ws

@ -0,0 +1,24 @@
diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
index 7a56304..9ff4548 100644
--- a/vmnet-only/compat_netdevice.h
+++ b/vmnet-only/compat_netdevice.h
@@ -47,6 +47,19 @@
# define net_device device
#endif
+/* it looks like these have been removed from the kernel 3.1
+ * probably because the "transition" is considered complete.
+ * so to keep this source compatible we just redefine them like they were
+ * previously
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
+ functions are available. */
+#define HAVE_FREE_NETDEV /* free_netdev() */
+#define HAVE_NETDEV_PRIV /* netdev_priv() */
+#define HAVE_NETIF_QUEUE
+#define HAVE_NET_DEVICE_OPS
+#endif
/*
* SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting

@ -0,0 +1,149 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils flag-o-matic linux-info linux-mod user versionator udev
PV_MAJOR=$(get_major_version)
PV_MINOR=$(get_version_component_range 2-3)
DESCRIPTION="VMware kernel modules"
HOMEPAGE="http://www.vmware.com/"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="pax_kernel +vmci +vsock"
REQUIRED_USE="!vsock? ( !vmci )"
RDEPEND=""
DEPEND="${RDEPEND}
|| ( =app-emulation/vmware-player-12.${PV_MINOR}*
=app-emulation/vmware-workstation-12.${PV_MINOR}* )"
S=${WORKDIR}
pkg_setup() {
CONFIG_CHECK="~HIGH_RES_TIMERS"
if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
CONFIG_CHECK="${CONFIG_CHECK} BKL"
fi
if use vmci ; then
CONFIG_CHECK="${CONFIG_CHECK} !VMWARE_VMCI"
else
CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI"
fi
if use vsock ; then
CONFIG_CHECK="${CONFIG_CHECK} !VMWARE_VMCI_VSOCKETS"
else
CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI_VSOCKETS"
fi
linux-info_pkg_setup
linux-mod_pkg_setup
VMWARE_GROUP=${VMWARE_GROUP:-vmware}
VMWARE_MODULE_LIST_ALL="vmblock vmmon vmnet vmci vsock"
VMWARE_MODULE_LIST="vmblock vmmon vmnet"
use vmci && VMWARE_MODULE_LIST="${VMWARE_MODULE_LIST} vmci"
use vsock && VMWARE_MODULE_LIST="${VMWARE_MODULE_LIST} vsock"
VMWARE_MOD_DIR="${PN}-${PVR}"
BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
enewgroup "${VMWARE_GROUP}"
filter-flags -mfpmath=sse -mavx -mpclmul -maes
append-cflags -mno-sse # Found a problem similar to bug #492964
for mod in ${VMWARE_MODULE_LIST}; do
MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
done
}
src_unpack() {
cd "${S}"
for mod in ${VMWARE_MODULE_LIST_ALL}; do
tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
done
}
src_prepare() {
epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
use pax_kernel && epatch "${FILESDIR}/${PV_MAJOR}-hardened.patch"
epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-00-dentry.patch"
kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-01-inode.patch"
kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-02-control.patch"
kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-03-inline.patch"
kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-00-readdir.patch"
kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-01-filldir.patch"
kernel_is ge 3 15 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.15-00-vsock.patch"
kernel_is ge 3 18 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.18-00-version-redefined.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-00-compat-namei.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-02-vmblock-path.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-04-iovec.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-05-vmci_qpair.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-06-vsock.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-07-vsock.patch"
kernel_is ge 4 01 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.01-00-vsock.patch"
kernel_is ge 4 02 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.02-00-nd_set_link.patch"
kernel_is ge 4 02 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.02-01-sk_alloc.patch"
kernel_is ge 4 03 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.03-00-vmci-misc_deregister.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user
}
src_install() {
linux-mod_src_install
local udevrules="${T}/60-vmware.rules"
cat > "${udevrules}" <<-EOF
KERNEL=="vmci", GROUP="vmware", MODE="660"
KERNEL=="vmw_vmci", GROUP="vmware", MODE="660"
KERNEL=="vmmon", GROUP="vmware", MODE="660"
KERNEL=="vsock", GROUP="vmware", MODE="660"
EOF
udev_dorules "${udevrules}"
if ! use vmci ; then
dodir /etc/modprobe.d/
cat > "${D}"/etc/modprobe.d/vmware.conf <<-EOF
# Support for vmware vmci in kernel module
alias vmci vmw_vmci
EOF
export installed_modprobe_conf=1
fi
if ! use vsock ; then
dodir /etc/modprobe.d/
cat >> "${D}"/etc/modprobe.d/vmware.conf <<-EOF
# Support for vmware vsock in kernel module
alias vsock vmw_vsock_vmci_transport
EOF
export installed_modprobe_conf=1
fi
}
pkg_postinst() {
linux-mod_pkg_postinst
if [ "${installed_modprobe_conf}"x == "x" ] ; then
if [ -f "${ROOT}/etc/modprobe.d/vmware.conf" ] ; then
ewarn "Please check the /etc/modprobe.d/vmware.conf file and"
ewarn "possible conflicts when using vmci and/or vsock modules built"
ewarn "out of kernel"
fi
fi
}

@ -1,3 +1,3 @@
DIST VMware-Player-6.0.6-2700073.i386.bundle.tar 230184960 SHA256 f62c97771b9f9b3d62204cb72472bd3b4cf856f5bdc3fd7ea68f786127b4f98e SHA512 91ce0861eab7a122d9bca8f8899f18ed7f59effffb20ae2b6a4d1a021aa57cc179e0f8b7aebeeea857c10a8b31deffcb1649cb79e64a927bb80905746dbaaefd WHIRLPOOL 90c51b72ecdf1b1fa9575e74d196e5d3e25cc4433fc74df283ad57e5953d7671c848d2e816cd19ca7216c2af9065c092c29a66c3d42247cb952a1890d99458bf
DIST VMware-Player-6.0.6-2700073.x86_64.bundle.tar 198164480 SHA256 090f93c404d01475b4fc55db529f14e88457bde40b20140b5133a43e391dd866 SHA512 abdb5a6e6162ec297bdea4616f40ff734967fb04838ed75103ad7051a6120e4d4510f9fc192bd874382885e48444af4b00fc2dcd5f6d05929c615e5c379ae212 WHIRLPOOL 386b3a2b928ddf4ce149c1738412c46e0292648e54537b1164197d89b5dd5d86448fbe659141c2ca8d6f55ccd709e629d60b20311c69333bd2b33162a59f3a88
DIST VMware-Player-12.1.0-3272444.x86_64.bundle.tar 138854400 SHA256 ae124888e3cef2cb8d687d0029b32ddf56dca8314d125cad66539c16501a1787 SHA512 0766ff543c4d61ff842ee8aa7b7ef7ed13c1a8adaadef2872cdd47b8029fb0b794588d9d49e4ad8cd5919793663e465439d2b7d8782f72f28461f8a008141151 WHIRLPOOL d972d76ba01295ece11cfee89a138ecea00b512de93f1a279a4ef8444333e672e094216ccaa59a4a8b78432d8b49998addb0b0a0b1abc566f8ccaa7724f7f580
DIST VMware-Player-7.1.2-2780323.x86_64.bundle.tar 211128320 SHA256 baa60996b3bed5ba89db1a0fd9a2cc263ea07ac1cf2d6f3aab68c728cc960efc SHA512 c4465a4cbf97b9fe3aa2d6a1c690047251a37929867e0b3cbddf6643b59ef8e618809973543150e6cd9a3bdba0c9c04fb55171616c2179a0ff80ee7302e07fc2 WHIRLPOOL f0bc539647a5f3838a486d62506881f752e426e2e7299b20f2828c285cb041c777f93f3d29627ff4187edfd92e43e37e70647828ce537adb67db0fe3e99fccb0
DIST vmware-systemd-gentoo-02.tgz 14064 SHA256 7ab23cb41bb8fbeca43bfd3baee35928731177620ae374ebb3b19b827d1a3210 SHA512 3a382bfd5f1eb2b218d8012588ea55c1f22786dba35a1fc0fdfdb4e40b05e0e735ed09c6961684f6442e863c3ed72024ce01f19113bbd9ca47c32e3f43c55f42 WHIRLPOOL dd7ac934584894f4a0ae86a9122080c49a4d09924011bc12dc1530ac6b5ee11fac6d55d6e5b306bb24d749a509236d3e39870b4d6b2ff5de37f6e54707ff8bb6

@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# $Header: $
depend() {
need localmount
@ -14,9 +14,14 @@ start() {
@@BINDIR@@/vmware-usbarbitrator
eend $?
ebegin Starting VMware services
modprobe -v vmci || modprobe -v vmw_vmci
# quiet for vmci because it may not be there
modprobe -vq vmci || modprobe -v vmw_vmci
eend $?
modprobe -av vmmon vmci vsock vmblock vmnet
# vmci or vmw_vmci was loaded by the previous modprobe
# no need to do it here
modprobe -av vmmon vsock vmblock vmnet
eend $?
@@BINDIR@@/vmware-networks --start
eend $?
@ -32,6 +37,8 @@ stop() {
ebegin Stopping VMware services
modprobe -rv vsock vmmon vmblock vmnet
eend $?
modprobe -rv vmci || modprobe -rv vmw_vmci
# quiet for vmci because it may not be there
modprobe -rvq vmci || modprobe -rv vmw_vmci
eend $?
}

@ -6,6 +6,7 @@
<name>Gentoo VMware Project</name>
</maintainer>
<use>
<flag name="bundled-libs">Use precompiled bundled libraries instead of the system installation</flag>
<flag name="ovftool">Install OVF tool for importing and exporting appliance files</flag>
<flag name="vmware-tools">Install VMware Tools images</flag>
</use>

@ -0,0 +1,418 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils versionator readme.gentoo-r1 fdo-mime gnome2-utils pax-utils systemd vmware-bundle
MY_PN="VMware-Player"
MY_PV=$(get_version_component_range 1-3)
PV_MODULES="308.$(get_version_component_range 2-3)"
PV_BUILD=$(get_version_component_range 4)
MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}"
SYSTEMD_UNITS_TAG="gentoo-02"
DESCRIPTION="Emulate a complete PC without the performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/player/"
BASE_URI="https://softwareupdate.vmware.com/cds/vmw-desktop/player/${MY_PV}/${PV_BUILD}/linux/core/"
SRC_URI="
${BASE_URI}${MY_P}.x86_64.bundle.tar
https://github.com/akhuettel/systemd-vmware/archive/${SYSTEMD_UNITS_TAG}.tar.gz -> vmware-systemd-${SYSTEMD_UNITS_TAG}.tgz
"
LICENSE="vmware GPL-2 GPL-3"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="bundled-libs cups doc ovftool +vmware-tools"
RESTRICT="mirror strip preserve-libs"
BUNDLED_LIBS_DIR=/opt/vmware/lib/vmware/lib
BUNDLED_LIBS="
libXau.so.6
libXcomposite.so.1
libXcursor.so.1
libXdamage.so.1
libXdmcp.so.6
libXfixes.so.3
libXft.so.2
libXinerama.so.1
libXrandr.so.2
libXrender.so.1
libaio.so.1
libatk-1.0.so.0
libatkmm-1.6.so.1
libatspi.so.0
libcairo.so.2
libcairomm-1.0.so.1
libcrypto.so.1.0.1
libcurl.so.4
libdbus-1.so.3
libfontconfig.so.1
libfreetype.so.6
libfuse.so.2
libgailutil.so.18
libgcc_s.so.1
libgcrypt.so.11
libgdk-x11-2.0.so.0
libgdk_pixbuf-2.0.so.0
libgdkmm-2.4.so.1
libgio-2.0.so.0
libgiomm-2.4.so.1
libglib-2.0.so.0
libglibmm-2.4.so.1
libglibmm_generate_extra_defs-2.4.so.1
libgmodule-2.0.so.0
libgobject-2.0.so.0
libgpg-error.so.0
libgthread-2.0.so.0
libgtk-x11-2.0.so.0
libgtkmm-2.4.so.1
libpango-1.0.so.0
libpangocairo-1.0.so.0
libpangoft2-1.0.so.0
libpangomm-1.4.so.1
libpangox-1.0.so.0
libpangoxft-1.0.so.0
libpcsclite.so.1
libpixman-1.so.0
libpng12.so.0
librsvg-2.so.2
libsigc-2.0.so.0
libssl.so.1.0.1
libstdc++.so.6
libxml2.so.2
libz.so.1
"
BUNDLED_LIB_DEPENDS="
app-accessibility/at-spi2-core
dev-cpp/atkmm
dev-cpp/cairomm
dev-cpp/glibmm:2
dev-cpp/gtkmm:2.4
dev-cpp/pangomm
dev-libs/atk
dev-libs/glib:2
dev-libs/libaio
dev-libs/libgcrypt:11/11
dev-libs/libgpg-error
dev-libs/libsigc++:2
dev-libs/libxml2
dev-libs/openssl:0
gnome-base/librsvg:2
media-libs/fontconfig
media-libs/freetype
media-libs/libpng:1.2
net-misc/curl
sys-apps/dbus
sys-apps/pcsc-lite
sys-fs/fuse
sys-libs/zlib
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:2
x11-libs/libXau
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXdmcp
x11-libs/libXfixes
x11-libs/libXft
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/pango
x11-libs/pangox-compat
x11-libs/pixman
"
# vmware should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND="
app-arch/bzip2
dev-libs/dbus-glib
dev-libs/expat
dev-libs/gmp:0
dev-libs/icu
dev-libs/json-c
dev-libs/libcroco
dev-libs/libffi
dev-libs/libgcrypt:0/20
dev-libs/libtasn1:0/6
dev-libs/nettle:0/6
gnome-base/gconf
gnome-base/libgnome-keyring
media-gfx/graphite2
media-libs/alsa-lib
media-libs/harfbuzz:0/0.9.18
media-libs/libart_lgpl
media-libs/libpng:0
media-libs/libvorbis
media-libs/mesa
net-dns/libidn
net-libs/gnutls
net-print/cups
sys-apps/tcp-wrappers
sys-apps/util-linux
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libXext
x11-libs/libXi
x11-libs/libXtst
x11-libs/libXxf86vm
x11-libs/libdrm
x11-libs/libxcb
x11-libs/libxshmfence
x11-libs/startup-notification
x11-libs/xcb-util
x11-themes/hicolor-icon-theme
bundled-libs? (
media-libs/jbigkit:0/2.1
media-libs/tiff:3
virtual/jpeg:62
)
!bundled-libs? ( ${BUNDLED_LIB_DEPENDS} )
!app-emulation/vmware-workstation
"
PDEPEND="~app-emulation/vmware-modules-${PV_MODULES}
vmware-tools? ( app-emulation/vmware-tools )"
DEPEND=">=dev-util/patchelf-0.9"
S=${WORKDIR}
VM_INSTALL_DIR="/opt/vmware"
QA_PREBUILT="/opt/*"
QA_WX_LOAD="opt/vmware/lib/vmware/tools-upgraders/vmware-tools-upgrader-32 opt/vmware/lib/vmware/bin/vmware-vmx-stats opt/vmware/lib/vmware/bin/vmware-vmx-debug opt/vmware/lib/vmware/bin/vmware-vmx"
src_unpack() {
default
local bundle=${MY_P}.x86_64.bundle
local component; for component in \
vmware-player \
vmware-player-app \
vmware-player-setup \
vmware-vmx \
vmware-network-editor \
vmware-usbarbitrator
do
vmware-bundle_extract-bundle-component "${bundle}" "${component}" "${S}"
done
if use ovftool; then
vmware-bundle_extract-bundle-component "${bundle}" vmware-ovftool
fi
}
clean_bundled_libs() {
einfo "Removing bundled libraries"
for libname in ${BUNDLED_LIBS} ; do
rm -rv "${S}"/lib/lib/${libname} || die "Failed removing bundled ${libname}"
done
rm -rv "${S}"/lib/libconf || die "Failed removing bundled gtk conf libs"
# Among the bundled libs there are libcrypto.so.1.0.1 and libssl.so.1.0.1
# (needed by libcds.so) which seem to be compiled from openssl-1.0.1h.
# Upstream real sonames are *so.1.0.0 so it's necessary to fix DT_NEEDED link
# in libcds.so to be able to use system libs.
pushd >/dev/null .
cd "${S}"/lib/lib/libcds.so
einfo "Patching libcds.so"
patchelf --replace-needed libssl.so.1.0.{1,0} \
--replace-needed libcrypto.so.1.0.{1,0} \
libcds.so
popd >/dev/null
# vmware-player seems to use a custom version of libgksu2.so, for this reason
# we leave the bundled version. The libvmware-gksu.so library declares simply DT_NEEDED
# libgksu2.so.0 but it uses at runtime the bundled version, patch the lib to avoid portage
# preserve-libs mechanism to be triggered when a system lib is available (but not required)
pushd >/dev/null .
cd "${S}"/lib/lib/libvmware-gksu.so
einfo "Patching libvmware-gksu.so"
patchelf --set-rpath "\$ORIGIN/../libgksu2.so.0" \
libvmware-gksu.so
popd >/dev/null
}
src_prepare() {
rm -f bin/vmware-modconfig
rm -rf lib/modules/binary
# Bug 459566
mv lib/libvmware-netcfg.so lib/lib/
if ! use bundled-libs ; then
clean_bundled_libs
fi
DOC_CONTENTS="
/etc/env.d is updated during ${PN} installation. Please run:\n
env-update && source /etc/profile\n
Before you can use ${PN}, you must configure a default network setup.
You can do this by running 'emerge --config ${PN}'.\n
To be able to run ${PN} your user must be in the vmware group.\n
You MUST set USE=bundled-libs if you are running gcc-5, otherwise vmware will not start.
"
}
src_install() {
local major_minor=$(get_version_component_range 1-2 "${PV}")
# revdep-rebuild entry
insinto /etc/revdep-rebuild
echo "SEARCH_DIRS_MASK=\"${VM_INSTALL_DIR}\"" >> ${T}/10${PN}
doins "${T}"/10${PN}
# install the binaries
into "${VM_INSTALL_DIR}"
dobin bin/*
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware
doins -r lib/*
# workaround for hardcoded search paths needed during shared objects loading
if ! use bundled-libs ; then
dosym /usr/$(get_libdir)/libglib-2.0.so.0 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libglib-2.0.so.0/libglib-2.0.so.0
# Bug 432918
dosym /usr/$(get_libdir)/libcrypto.so.1.0.0 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libcrypto.so.1.0.1/libcrypto.so.1.0.1
dosym /usr/$(get_libdir)/libssl.so.1.0.0 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libssl.so.1.0.1/libssl.so.1.0.1
fi
# install the ancillaries
insinto /usr
doins -r share
if use cups; then
exeinto $(cups-config --serverbin)/filter
doexe extras/thnucups
insinto /etc/cups
doins -r etc/cups/*
fi
if use doc; then
dodoc doc/*
fi
exeinto "${VM_INSTALL_DIR}"/lib/vmware/setup
doexe vmware-config
# install ovftool
if use ovftool; then
cd "${S}"
insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool
doins -r vmware-ovftool/*
chmod 0755 "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin}
dosym "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool
fi
# create symlinks for the various tools
local tool ; for tool in thnuclnt vmplayer{,-daemon} \
vmware-{acetool,modconfig{,-console},gksu,fuseUI} ; do
dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
done
dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
# fix permissions
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/wrapper-gtk24.sh
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/libgksu2.so.0/gksu-run-helper
fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
pax-mark -m "${D}${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx
# create the environment
local envd="${T}/90vmware"
cat > "${envd}" <<-EOF
PATH='${VM_INSTALL_DIR}/bin'
ROOTPATH='${VM_INSTALL_DIR}/bin'
EOF
use bundled-libs && echo 'VMWARE_USE_SHIPPED_LIBS=1' >> "${envd}"
doenvd "${envd}"
# create the configuration
dodir /etc/vmware
cat > "${D}"/etc/vmware/bootstrap <<-EOF
BINDIR='${VM_INSTALL_DIR}/bin'
LIBDIR='${VM_INSTALL_DIR}/lib'
EOF
cat > "${D}"/etc/vmware/config <<-EOF
bindir = "${VM_INSTALL_DIR}/bin"
libdir = "${VM_INSTALL_DIR}/lib/vmware"
initscriptdir = "/etc/init.d"
authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
gksu.rootMethod = "su"
VMCI_CONFED = "yes"
VMBLOCK_CONFED = "yes"
VSOCK_CONFED = "yes"
NETWORKING = "yes"
player.product.version = "${MY_PV}"
product.buildNumber = "${PV_BUILD}"
EOF
# install the init.d script
local initscript="${T}/vmware.rc"
sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
"${FILESDIR}/vmware-${major_minor}.rc" > "${initscript}" || die
newinitd "${initscript}" vmware
# fill in variable placeholders
if use bundled-libs ; then
sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
-i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}} || die
fi
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/vmware-player.desktop" || die
# install systemd unit files
systemd_dounit "${WORKDIR}/systemd-vmware-${SYSTEMD_UNITS_TAG}/"*.{service,target}
readme.gentoo_create_doc
}
pkg_config() {
"${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
readme.gentoo_print_elog
ewarn "${P} is using an old version of libgcrypt library which"
ewarn "is going to be soon removed from portage due to security reasons"
ewarn "(see https://bugs.gentoo.org/show_bug.cgi?id=541564)."
ewarn "Until vmware is fixed upstream you're exposed to security issues!"
}
pkg_prerm() {
einfo "Stopping ${PN} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

@ -1,245 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils versionator fdo-mime gnome2-utils pax-utils vmware-bundle
MY_PN="VMware-Player"
MY_PV=$(get_version_component_range 1-3)
PV_MINOR=$(get_version_component_range 3)
PV_BUILD=$(get_version_component_range 4)
MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/player/"
BASE_URI="https://softwareupdate.vmware.com/cds/vmw-desktop/player/${MY_PV}/${PV_BUILD}/linux/core/"
SRC_URI="
x86? ( ${BASE_URI}${MY_P}.i386.bundle.tar )
amd64? ( ${BASE_URI}${MY_P}.x86_64.bundle.tar )
"
LICENSE="vmware GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="cups doc +vmware-tools"
RESTRICT="strip"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND="dev-cpp/cairomm
dev-cpp/glibmm:2
dev-cpp/gtkmm:2.4
dev-cpp/libgnomecanvasmm:2.6
dev-cpp/pangomm:1.4
dev-libs/atk
dev-libs/glib:2
dev-libs/libaio
dev-libs/libsigc++
dev-libs/libxml2
=dev-libs/openssl-0.9.8*
dev-libs/xmlrpc-c
gnome-base/libgnomecanvas
gnome-base/libgtop:2
gnome-base/librsvg:2
gnome-base/orbit
media-libs/fontconfig
media-libs/freetype
media-libs/libart_lgpl
=media-libs/libpng-1.2*
net-misc/curl
cups? ( net-print/cups )
sys-devel/gcc
sys-fs/fuse
sys-libs/glibc
sys-libs/zlib
x11-libs/cairo
x11-libs/gtk+:2
x11-libs/libgksu
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libXau
x11-libs/libxcb
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXdmcp
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXft
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXtst
x11-libs/pango
x11-libs/startup-notification
!app-emulation/vmware-workstation"
PDEPEND="~app-emulation/vmware-modules-279.${PV_MINOR}
vmware-tools? ( app-emulation/vmware-tools )"
S=${WORKDIR}
VM_INSTALL_DIR="/opt/vmware"
src_unpack() {
default
local bundle=${A%.tar}
local component ; for component in \
vmware-player \
vmware-player-app \
vmware-vmx \
vmware-usbarbitrator \
vmware-network-editor \
vmware-player-setup
#vmware-ovftool
do
vmware-bundle_extract-bundle-component "${bundle}" "${component}" "${S}"
done
}
src_prepare() {
rm -f bin/vmware-modconfig
rm -rf lib/modules/binary
# Bug 459566
mv lib/libvmware-netcfg.so lib/lib/
}
clean_bundled_libs() {
ebegin 'Removing superfluous libraries'
# exclude OpenSSL from unbundling until the AES-NI patch gets into the tree
# see http://forums.gentoo.org/viewtopic-t-835867.html
# must use shipped libgcr.so.0 or else "undefined symbol: gcr_certificate_widget_new"
ldconfig -p | sed 's:^\s\+\([^(]*[^( ]\).*=> \(/.*\)$:\1 \2:g;t;d' | fgrep -v 'libcrypto.so.0.9.8
libssl.so.0.9.8
libgcr.so.0' | while read -r libname libpath ; do
dosym "${libpath}" "${VM_INSTALL_DIR}/lib/vmware/lib/${libname}/${libname}"
done
eend
}
src_install() {
# install the binaries
into "${VM_INSTALL_DIR}"
dobin bin/* || die "failed to install bin"
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware
doins -r lib/*
# Bug 432918
dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libcrypto.so.0.9.8/libcrypto.so.0.9.8 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libcrypto.so.0.9.8
dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libssl.so.0.9.8/libssl.so.0.9.8 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libssl.so.0.9.8
# install the ancillaries
insinto /usr
doins -r share
if use cups; then
exeinto $(cups-config --serverbin)/filter
doexe extras/thnucups
insinto /etc/cups
doins -r etc/cups/*
fi
# install documentation
if use doc; then
dodoc doc/*
fi
exeinto "${VM_INSTALL_DIR}"/lib/vmware/setup
doexe vmware-config
# create symlinks for the various tools
local tool ; for tool in thnuclnt vmplayer{,-daemon} \
vmware-{acetool,unity-helper,modconfig{,-console},gksu,fuseUI} ; do
dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
done
dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
# fix permissions
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/{wrapper-gtk24.sh,libgksu2.so.0/gksu-run-helper}
fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
pax-mark -m "${D}${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx
# create the environment
local envd="${T}/90vmware"
cat > "${envd}" <<-EOF
PATH='${VM_INSTALL_DIR}/bin'
ROOTPATH='${VM_INSTALL_DIR}/bin'
EOF
doenvd "${envd}" || die
# create the configuration
dodir /etc/vmware || die
cat > "${D}"/etc/vmware/bootstrap <<-EOF
BINDIR='${VM_INSTALL_DIR}/bin'
LIBDIR='${VM_INSTALL_DIR}/lib'
EOF
cat > "${D}"/etc/vmware/config <<-EOF
bindir = "${VM_INSTALL_DIR}/bin"
libdir = "${VM_INSTALL_DIR}/lib/vmware"
initscriptdir = "/etc/init.d"
authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
gksu.rootMethod = "su"
VMCI_CONFED = "yes"
VMBLOCK_CONFED = "yes"
VSOCK_CONFED = "yes"
NETWORKING = "yes"
player.product.version = "${MY_PV}"
product.buildNumber = "${PV_BUILD}"
EOF
# install the init.d script
local initscript="${T}/vmware.rc"
sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
"${FILESDIR}/vmware-10.0.rc" > "${initscript}" || die
newinitd "${initscript}" vmware || die
# fill in variable placeholders
sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
-i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}} || die
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/${PN}.desktop" || die
}
pkg_config() {
"${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
ewarn "/etc/env.d was updated. Please run:"
ewarn "env-update && source /etc/profile"
ewarn ""
ewarn "Before you can use vmware-player, you must configure a default network setup."
ewarn "You can do this by running 'emerge --config ${PN}'."
}
pkg_prerm() {
einfo "Stopping ${PN} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

@ -1,263 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils versionator fdo-mime gnome2-utils pax-utils systemd vmware-bundle
MY_PN="VMware-Player"
MY_PV=$(get_version_component_range 1-3)
PV_MINOR=$(get_version_component_range 3)
PV_BUILD=$(get_version_component_range 4)
MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}"
DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/player/"
BASE_URI="https://softwareupdate.vmware.com/cds/vmw-desktop/player/${MY_PV}/${PV_BUILD}/linux/core/"
SRC_URI="
amd64? ( ${BASE_URI}${MY_P}.x86_64.bundle.tar )
"
LICENSE="vmware GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="cups doc ovftool +vmware-tools"
RESTRICT="strip"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND="dev-cpp/cairomm
dev-cpp/glibmm:2
dev-cpp/gtkmm:2.4
dev-cpp/libgnomecanvasmm:2.6
dev-cpp/pangomm:1.4
dev-libs/atk
dev-libs/glib:2
dev-libs/libaio
dev-libs/libsigc++
dev-libs/libxml2
=dev-libs/openssl-0.9.8*
dev-libs/xmlrpc-c
gnome-base/libgnomecanvas
gnome-base/libgtop:2
gnome-base/librsvg:2
gnome-base/orbit
media-libs/fontconfig
media-libs/freetype
media-libs/libart_lgpl
=media-libs/libpng-1.2*
net-misc/curl
cups? ( net-print/cups )
sys-devel/gcc
sys-fs/fuse
sys-libs/glibc
sys-libs/zlib
x11-libs/cairo
x11-libs/gtk+:2
x11-libs/libgksu
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libXau
x11-libs/libxcb
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXdmcp
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXft
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXtst
x11-libs/pango
x11-libs/startup-notification
!app-emulation/vmware-workstation"
PDEPEND="~app-emulation/vmware-modules-304.${PV_MINOR}
vmware-tools? ( app-emulation/vmware-tools )"
S=${WORKDIR}
VM_INSTALL_DIR="/opt/vmware"
src_unpack() {
default
local bundle=${A%.tar}
local component ; for component in \
vmware-player \
vmware-player-app \
vmware-vmx \
vmware-usbarbitrator \
vmware-network-editor \
vmware-player-setup
do
vmware-bundle_extract-bundle-component "${bundle}" "${component}" "${S}"
done
use ovftool && \
vmware-bundle_extract-bundle-component "${bundle}" vmware-ovftool
}
src_prepare() {
rm -f bin/vmware-modconfig
rm -rf lib/modules/binary
# Bug 459566
mv lib/libvmware-netcfg.so lib/lib/
}
clean_bundled_libs() {
ebegin 'Removing superfluous libraries'
# exclude OpenSSL from unbundling until the AES-NI patch gets into the tree
# see http://forums.gentoo.org/viewtopic-t-835867.html
# must use shipped libgcr.so.0 or else "undefined symbol: gcr_certificate_widget_new"
ldconfig -p | sed 's:^\s\+\([^(]*[^( ]\).*=> \(/.*\)$:\1 \2:g;t;d' | fgrep -v 'libcrypto.so.0.9.8
libssl.so.0.9.8
libgcr.so.0' | while read -r libname libpath ; do
dosym "${libpath}" "${VM_INSTALL_DIR}/lib/vmware/lib/${libname}/${libname}"
done
eend
}
src_install() {
# install the binaries
into "${VM_INSTALL_DIR}"
dobin bin/* || die "failed to install bin"
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware
doins -r lib/*
# Bug 432918
dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libcrypto.so.0.9.8/libcrypto.so.0.9.8 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libcrypto.so.0.9.8
dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libssl.so.0.9.8/libssl.so.0.9.8 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libssl.so.0.9.8
# https://github.com/gentoo/vmware/issues/7
dosym "${VM_INSTALL_DIR}"/lib/vmware/ /usr/$(get_libdir)/vmware
# install the ancillaries
insinto /usr
doins -r share
if use cups; then
exeinto $(cups-config --serverbin)/filter
doexe extras/thnucups
insinto /etc/cups
doins -r etc/cups/*
fi
# install documentation
if use doc; then
dodoc doc/*
fi
exeinto "${VM_INSTALL_DIR}"/lib/vmware/setup
doexe vmware-config
# install ovftool
if use ovftool; then
cd "${S}"
insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool
doins -r vmware-ovftool/*
chmod 0755 "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin}
dosym "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool
fi
# create symlinks for the various tools
local tool ; for tool in thnuclnt vmplayer{,-daemon} \
vmware-{acetool,unity-helper,modconfig{,-console},gksu,fuseUI} ; do
dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
done
dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
# fix permissions
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/{wrapper-gtk24.sh,libgksu2.so.0/gksu-run-helper}
fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
pax-mark -m "${D}${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx
# create the environment
local envd="${T}/90vmware"
cat > "${envd}" <<-EOF
PATH='${VM_INSTALL_DIR}/bin'
ROOTPATH='${VM_INSTALL_DIR}/bin'
EOF
doenvd "${envd}" || die
# create the configuration
dodir /etc/vmware || die
cat > "${D}"/etc/vmware/bootstrap <<-EOF
BINDIR='${VM_INSTALL_DIR}/bin'
LIBDIR='${VM_INSTALL_DIR}/lib'
EOF
cat > "${D}"/etc/vmware/config <<-EOF
bindir = "${VM_INSTALL_DIR}/bin"
libdir = "${VM_INSTALL_DIR}/lib/vmware"
initscriptdir = "/etc/init.d"
authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
gksu.rootMethod = "su"
VMCI_CONFED = "yes"
VMBLOCK_CONFED = "yes"
VSOCK_CONFED = "yes"
NETWORKING = "yes"
player.product.version = "${MY_PV}"
product.buildNumber = "${PV_BUILD}"
EOF
# install the init.d script
local initscript="${T}/vmware.rc"
sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
"${FILESDIR}/vmware-11.${PV_MINOR}.rc" > "${initscript}" || die
newinitd "${initscript}" vmware || die
systemd_dounit "${FILESDIR}/vmware-usbarbitrator.service"
systemd_dounit "${FILESDIR}/vmware-network.service"
# fill in variable placeholders
sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
-i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}} || die
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/${PN}.desktop" || die
}
pkg_config() {
"${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
ewarn "/etc/env.d was updated. Please run:"
ewarn "env-update && source /etc/profile"
ewarn ""
ewarn "Before you can use vmware-player, you must configure a default network setup."
ewarn "You can do this by running 'emerge --config ${PN}'."
}
pkg_prerm() {
einfo "Stopping ${PN} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

@ -2,7 +2,9 @@ DIST VMware-Workstation-10.0.6-2700073.i386.bundle.tar 281272320 SHA256 02b6c26b
DIST VMware-Workstation-10.0.6-2700073.x86_64.bundle.tar 252610560 SHA256 e29edcb0638f32bff81d372c9eaf54e663e3376cd1d89dbd4cfe4cab533398b2 SHA512 072de1da92cbef890707a6c4e3d5223fdc60e50a5166bb72b1ebc098d28c1a75b83ed65a29fdf1311e119e590560546e376909e1384f1eab05918500ec80ede4 WHIRLPOOL 3f4252abb6c87424b88fa34adc29e1927d1e6458beca65d9b290ff0c8ad4ccaf2945e2209670f8f8d4e84548d806c18fb23dc8380ec65452841e2c0bbcce89aa
DIST VMware-Workstation-11.1.2-2780323.x86_64.bundle.tar 259133440 SHA256 085b50175b253647d8b2cb188286d3cf9265ed246cc0deb3b142b0438ef5725f SHA512 1c43ebaa4f8b228ec00f24a263eddcbbad5c0c940cd67040e6e2275c3a4aab6c9e2e5ee96996ca4f007ff786ece978c5789214ad92479720182fc3153d7edbde WHIRLPOOL 60e359a1dcfe1178652d8c6be705dda4f2f31b109bf01d5b5b16dc03e26a649e8f1af2ffa03d68e9108646c98e9cad41c10a9452ea14950883f9162e57ac20ca
DIST VMware-Workstation-11.1.3-3206955.x86_64.bundle.tar 259594240 SHA256 a8d333d6f6677eb1d70b3572e5bf8f34ebb6cb77bdee4b94d6ea8033f579ed5d SHA512 8cb4781dc388bcaeb82f19d18e0bf2608d393f18c4e255a1c89c9090954bbee5e78ebde5cec6df06d9c037ed4f0595a7a801d76b3a8e2b960f6822bbf1094d1b WHIRLPOOL 5ba631502ff4dbf0e480e932e9a21cbb06d25d68b9ac412beb41680d3d0e678c630ba692e7e52cda2399574b28698ca5deb6a6c54b4614ab752159b6036a0094
DIST VMware-Workstation-12.1.0-3272444.x86_64.bundle.tar 170639360 SHA256 b15d2ae889465e6e080b84474ca49ebd6c21a0bce701a0f74d34b6e930869043 SHA512 bd64fe19ebb96b06cd34795dab46490cb0e1fe4822dbce4678185fb2cba3e921170feac7904771c14ece3450ddb0e86f5f4d03081551367b8c70afe77df3fab7 WHIRLPOOL 7d72352e272358c25fe49b05c4cdc5653bffef9e20cc2151a2f032fecb98eb7831a922d8dca0ce509d8944abeaff951e9ece8b11dac6782facc762e3b54c2aac
DIST VMware-Workstation-9.0.3-1410761.i386.bundle.tar 264908800 SHA256 dfe9aaa75987793eac096c0fbdb364f94e354ab668213774ea3e90d5ddcecdc0 SHA512 5d0943400cb1fefca20f1a81d3989bf5cdda5e123d1a70b09ebc20a56498d36f597ed7a0730d2f6f752c3c4baad2c86d5ef7691e8d245147d944c6f7e4e708b0 WHIRLPOOL 14a950f2deb03c3b7a088d4fb50378c7109330d89903965c28ead0be1e2223dbce05a628b1ea859215d31a8978f497bd8f807652cf266667d67893eaf2d7372b
DIST VMware-Workstation-9.0.3-1410761.x86_64.bundle.tar 232724480 SHA256 2612f8a523c9f23164d7557c105520bc6e010af82b3e6d4a3ada04d8ff03cbf0 SHA512 07923231e481550cb0348e40ef341c2d0682ac0daf6c8e0ada130c03113f43a37bf322e64fb9dc73511dea0fd2851f3cb4f5e755bbad4beba9e3cc4e69566070 WHIRLPOOL d979f2d9ef8888be89d5747c16e0db7ca45609cd9d77d84baf8485b4956f9e9f99bf46c33a2690b7b1fea851c0495ed0a06b36e3e69b51abfc11604d9a62fe4d
DIST gentoo-01.tar.gz 1884 SHA256 e92c694865f1b29f4d7a39efa1dd87bc71dc5f922573f00a3d31ee8e27a8c335 SHA512 454ab93997781bd0a9accddb2ac7bb446f07ea7cddef5640369025c30e03592e14869e0f0f7b4457db2f1ada31c98051426016c86201afa8bc8e3aa4ccc2f875 WHIRLPOOL 9202583b617532ab2612b384da307218e7c93c2962f0d233e28bea066b07163c9bc51c0a599309f9d703c5575ebeb292d787716225624dc1c2fdff3c44fa3513
DIST vmware-systemd-gentoo-01.tgz 1884 SHA256 e92c694865f1b29f4d7a39efa1dd87bc71dc5f922573f00a3d31ee8e27a8c335 SHA512 454ab93997781bd0a9accddb2ac7bb446f07ea7cddef5640369025c30e03592e14869e0f0f7b4457db2f1ada31c98051426016c86201afa8bc8e3aa4ccc2f875 WHIRLPOOL 9202583b617532ab2612b384da307218e7c93c2962f0d233e28bea066b07163c9bc51c0a599309f9d703c5575ebeb292d787716225624dc1c2fdff3c44fa3513
DIST vmware-systemd-gentoo-02.tgz 14064 SHA256 7ab23cb41bb8fbeca43bfd3baee35928731177620ae374ebb3b19b827d1a3210 SHA512 3a382bfd5f1eb2b218d8012588ea55c1f22786dba35a1fc0fdfdb4e40b05e0e735ed09c6961684f6442e863c3ed72024ce01f19113bbd9ca47c32e3f43c55f42 WHIRLPOOL dd7ac934584894f4a0ae86a9122080c49a4d09924011bc12dc1530ac6b5ee11fac6d55d6e5b306bb24d749a509236d3e39870b4d6b2ff5de37f6e54707ff8bb6

@ -0,0 +1,55 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
depend() {
need localmount vmware
use net
}
checkconfig() {
# Check if certificates exist. If not, we need to generate them, ala sshd.
if [ ! -e @@ETCDIR@@/ssl/rui.key -o ! -e @@ETCDIR@@/ssl/rui.crt ]; then
mkdir -p @@ETCDIR@@/ssl
openssl req -x509 -days 365 -newkey rsa:2048 -keyout @@ETCDIR@@/ssl/rui.key -out @@ETCDIR@@/ssl/rui.crt -config @@ETCDIR@@/ssl/hostd.ssl.config
chmod -R 600 @@ETCDIR@@/ssl
fi
}
start() {
checkconfig
ebegin Starting VMware Authentication Daemon
start-stop-daemon --start \
--exec @@PREFIX@@/sbin/vmware-authdlauncher
eend $?
ebegin Starting VMware Workstation Server
start-stop-daemon --start \
--pidfile /var/run/vmware/vmware-hostd.PID \
--exec @@BINDIR@@/vmware-hostd \
-- -a -d @@ETCDIR@@/hostd/config.xml
eend $?
}
stop() {
ebegin "Shutdown VMs in the AutoStart Sequence"
local HOHO_ADMIN="$(@@BINDIR@@/vmware-wssc-adminTool "@@ETCDIR@@/hostd/authorization.xml" 2>/dev/null)"
if [ "x" != "x${HOHO_ADMIN}" ]; then
@@BINDIR@@/vmware-vim-cmd -U "${HOHO_ADMIN}" hostsvc/autostartmanager/autostop
fi
eend $?
ebegin Stopping VMware Workstation Server
start-stop-daemon --stop \
--pidfile /var/run/vmware/vmware-hostd.PID \
--exec @@BINDIR@@/vmware-hostd
eend $?
ebegin Stopping VMware Authentication Daemon
#start-stop-daemon --stop \
# --exec @@PREFIX@@/sbin/vmware-authdlauncher
killall @@PREFIX@@/sbin/vmware-authdlauncher
eend $?
}

@ -40,7 +40,7 @@ RDEPEND="dev-cpp/cairomm
dev-libs/icu
dev-libs/expat
dev-libs/libaio
=dev-libs/libgcrypt-1.5*
|| ( dev-libs/libgcrypt:0/11 dev-libs/libgcrypt:11/11 )
dev-libs/libsigc++
dev-libs/libxml2
dev-libs/openssl:0.9.8

@ -25,7 +25,7 @@ LICENSE="vmware GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="cups bundled-libs doc ovftool server vix vmware-tools"
RESTRICT="mirror strip preserve-libs"
RESTRICT="mirror strip"
BUNDLED_LIBS_DIR=/opt/vmware/lib/vmware/lib
@ -82,7 +82,7 @@ BUNDLED_LIB_DEPENDS="
media-libs/freetype
sys-fs/fuse
x11-libs/gtk+:2
=dev-libs/libgcrypt-1.5*
|| ( dev-libs/libgcrypt:0/11 dev-libs/libgcrypt:11/11 )
x11-libs/gdk-pixbuf:2
dev-cpp/gtkmm:2.4
dev-libs/glib:2

@ -0,0 +1,549 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils versionator readme.gentoo fdo-mime systemd gnome2-utils pam vmware-bundle
MY_PN="VMware-Workstation"
MY_PV=$(get_version_component_range 1-3)
PV_MINOR=$(get_version_component_range 3)
PV_BUILD=$(get_version_component_range 4)
MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}"
SYSTEMD_UNITS_TAG="gentoo-01"
DESCRIPTION="Emulate a complete PC without the performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/workstation/"
BASE_URI="https://softwareupdate.vmware.com/cds/vmw-desktop/ws/${MY_PV}/${PV_BUILD}/linux/core/"
SRC_URI="
amd64? ( ${BASE_URI}${MY_P}.x86_64.bundle.tar )
https://github.com/akhuettel/systemd-vmware/archive/${SYSTEMD_UNITS_TAG}.tar.gz -> vmware-systemd-${SYSTEMD_UNITS_TAG}.tgz
"
LICENSE="vmware GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="cups bundled-libs doc ovftool server vix vmware-tools"
RESTRICT="mirror strip"
BUNDLED_LIBS_DIR=/opt/vmware/lib/vmware/lib
BUNDLED_LIBS="
libXau.so.6
libXcomposite.so.1
libXcursor.so.1
libXdamage.so.1
libXdmcp.so.6
libXfixes.so.3
libXft.so.2
libXinerama.so.1
libXrandr.so.2
libXrender.so.1
libaio.so.1
libatk-1.0.so.0
libatkmm-1.6.so.1
libatspi.so.0
libcairo.so.2
libcairomm-1.0.so.1
libcurl.so.4
libdbus-1.so.3
libfontconfig.so.1
libfreetype.so.6
libfuse.so.2
libgailutil.so.18
libgdk-x11-2.0.so.0
libgcrypt.so.11
libgdk_pixbuf-2.0.so.0
libgdkmm-2.4.so.1
libgio-2.0.so.0
libgiomm-2.4.so.1
"
BUNDLED_LIB_DEPENDS="
x11-libs/libXau
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXdmcp
x11-libs/libXfixes
x11-libs/libXft
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libXrender
dev-libs/libaio
dev-libs/atk
dev-cpp/atkmm
app-accessibility/at-spi2-core
x11-libs/cairo
dev-cpp/cairomm
net-misc/curl
media-libs/fontconfig
media-libs/freetype
sys-fs/fuse
x11-libs/gtk+:2
|| ( dev-libs/libgcrypt:0/11 dev-libs/libgcrypt:11/11 )
x11-libs/gdk-pixbuf:2
dev-cpp/gtkmm:2.4
dev-libs/glib:2
dev-cpp/glibmm:2
"
# vmware-workstation should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND="
dev-cpp/libgnomecanvasmm
dev-cpp/pangomm
dev-libs/icu
dev-libs/expat
dev-libs/libsigc++:2
dev-libs/libxml2
dev-libs/openssl:0
dev-libs/xmlrpc-c
gnome-base/libgnomecanvas
gnome-base/libgtop:2
gnome-base/librsvg:2
gnome-base/orbit
media-libs/libart_lgpl
media-libs/libpng:1.2
media-libs/libpng
media-libs/tiff:3
cups? ( net-print/cups )
sys-devel/gcc
sys-libs/glibc
sys-libs/zlib
x11-libs/libgksu
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libxcb
x11-libs/libXext
x11-libs/libXi
x11-libs/libXtst
x11-libs/pango
x11-libs/pangox-compat
x11-libs/startup-notification
x11-themes/hicolor-icon-theme
!app-emulation/vmware-player
!bundled-libs? ( ${BUNDLED_LIB_DEPENDS} )
sys-apps/dbus
"
PDEPEND="~app-emulation/vmware-modules-304.${PV_MINOR}
vmware-tools? ( app-emulation/vmware-tools )"
S=${WORKDIR}
VM_INSTALL_DIR="/opt/vmware"
VM_DATA_STORE_DIR="/var/lib/vmware/Shared VMs"
VM_HOSTD_USER="root"
QA_PREBUILT="/opt/*"
QA_WX_LOAD="/opt/vmware/lib/vmware/tools-upgraders/vmware-tools-upgrader-32 /opt/vmware/lib/vmware/bin/vmware-vmx-stats /opt/vmware/lib/vmware/bin/vmware-vmx-debug /opt/vmware/lib/vmware/bin/vmware-vmx"
src_unpack() {
default
local bundle
use amd64 && bundle=${MY_P}.x86_64.bundle
local component; for component in \
vmware-vmx \
vmware-player-app \
vmware-player-setup \
vmware-workstation \
vmware-network-editor \
vmware-network-editor-ui \
vmware-usbarbitrator \
vmware-vprobe
do
vmware-bundle_extract-bundle-component "${bundle}" "${component}" "${S}"
done
if use server; then
vmware-bundle_extract-bundle-component "${bundle}" vmware-workstation-server #"${S}"
fi
if use vix; then
vmware-bundle_extract-bundle-component "${bundle}" vmware-vix-core vmware-vix
vmware-bundle_extract-bundle-component "${bundle}" vmware-vix-lib-Workstation1100andvSphere600 vmware-vix
fi
if use ovftool; then
vmware-bundle_extract-bundle-component "${bundle}" vmware-ovftool
fi
}
clean_bundled_libs() {
einfo Removing bundled libraries
for libname in ${BUNDLED_LIBS} ; do
rm -rv "${S}"/lib/lib/${libname} || die "Failed removing bundled ${libname}"
done
}
src_prepare() {
rm -f bin/vmware-modconfig
rm -rf lib/modules/binary
# Bug 459566
mv lib/libvmware-netcfg.so lib/lib/
if use server; then
rm -f vmware-workstation-server/bin/{openssl,configure-hostd.sh}
fi
find "${S}" -name '*.a' -delete
if ! use bundled-libs ; then
clean_bundled_libs
fi
DOC_CONTENTS="
/etc/env.d is updated during ${PN} installation. Please run:\n
env-update && source /etc/profile\n
Before you can use vmware workstation, you must configure a default network setup.
You can do this by running 'emerge --config ${PN}'.\n
To be able to run ${PN} your user must be in the vmware group.\n
You MUST set USE=bundled-libs if you are running gcc-5, otherwise vmware will not start.
"
}
src_install() {
local major_minor=$(get_version_component_range 1-2 "${PV}")
local major_minor_revision=$(get_version_component_range 1-3 "${PV}")
local build=$(get_version_component_range 4 "${PV}")
# revdep-rebuild entry
insinto /etc/revdep-rebuild
echo "SEARCH_DIRS_MASK=\"${VM_INSTALL_DIR}\"" >> ${T}/10${PN}
doins "${T}"/10${PN}
# install the binaries
into "${VM_INSTALL_DIR}"
dobin bin/*
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware
doins -r lib/*
# Bug 432918
dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libcrypto.so.1.0.1/libcrypto.so.1.0.1 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libcrypto.so.1.0.1
dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libssl.so.1.0.1/libssl.so.1.0.1 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libssl.so.1.0.1
# install the ancillaries
insinto /usr
doins -r share
if use cups; then
exeinto $(cups-config --serverbin)/filter
doexe extras/thnucups
insinto /etc/cups
doins -r etc/cups/*
fi
insinto /etc/xdg
doins -r etc/xdg/*
# install documentation
doman man/man1/vmware.1.gz
if use doc; then
dodoc doc/*
fi
insinto "${VM_INSTALL_DIR}"/lib/vmware/setup
doins vmware-config
# install vmware workstation server
if use server; then
dosbin sbin/*
cd "${S}"/vmware-workstation-server
# install binaries
into "${VM_INSTALL_DIR}"/lib/vmware
dobin bin/*
dobin "${FILESDIR}"/configure-hostd.sh
dobin "${FILESDIR}"/configure-hostd.sh
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware/lib
doins -r lib/*
into "${VM_INSTALL_DIR}"
for tool in vmware-{hostd,wssc-adminTool} ; do
cat > "${T}/${tool}" <<-EOF
#!/usr/bin/env bash
set -e
. /etc/vmware/bootstrap
exec "${VM_INSTALL_DIR}/lib/vmware/lib/wrapper-gtk24.sh" \\
"${VM_INSTALL_DIR}/lib/vmware/lib" \\
"${VM_INSTALL_DIR}/lib/vmware/bin/${tool}" \\
"${VM_INSTALL_DIR}/lib/vmware/libconf" "\$@"
EOF
dobin "${T}/${tool}"
done
insinto "${VM_INSTALL_DIR}"/lib/vmware
doins -r hostd
# create the configuration
insinto /etc/vmware/hostd
doins -r config/etc/vmware/hostd/*
doins -r etc/vmware/hostd/*
insinto /etc/vmware/ssl
doins etc/vmware/ssl/*
# pam
pamd_mimic_system vmware-authd auth account
# create directory for shared virtual machines.
keepdir "${VM_DATA_STORE_DIR}"
keepdir /var/log/vmware
fi
# install vmware-vix
if use vix; then
cd "${S}"/vmware-vix
# install the binary
into "${VM_INSTALL_DIR}"
dobin bin/*
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware-vix
doins -r lib/*
dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so
# install headers
insinto /usr/include/vmware-vix
doins include/*
if use doc; then
dohtml -r doc/*
fi
fi
# install ovftool
if use ovftool; then
cd "${S}"
insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool
doins -r vmware-ovftool/*
chmod 0755 "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin}
dosym "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool
fi
# create symlinks for the various tools
local tool ; for tool in thnuclnt vmware vmplayer{,-daemon} licenseTool vmamqpd \
vmware-{acetool,enter-serial,gksu,fuseUI,modconfig{,-console},netcfg,tray,unity-helper,zenity} ; do
dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
done
dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware "${VM_INSTALL_DIR}"/bin/vmware
dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
# fix permissions
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/{wrapper-gtk24.sh,libgksu2.so.0/gksu-run-helper}
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/setup/vmware-config
fperms 4711 "${VM_INSTALL_DIR}"/bin/vmware-mount
fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
if use server; then
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-{hostd,wssc-adminTool}
fperms 4711 "${VM_INSTALL_DIR}"/sbin/vmware-authd
fperms 1777 "${VM_DATA_STORE_DIR}"
fi
if use vix; then
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config
fi
# create the environment
local envd="${T}/90vmware"
cat > "${envd}" <<-EOF
PATH='${VM_INSTALL_DIR}/bin'
ROOTPATH='${VM_INSTALL_DIR}/bin'
EOF
use bundled-libs && echo 'VMWARE_USE_SHIPPED_LIBS=1' >> "${envd}"
doenvd "${envd}"
# create the configuration
dodir /etc/vmware
cat > "${D}"/etc/vmware/bootstrap <<-EOF
BINDIR='${VM_INSTALL_DIR}/bin'
LIBDIR='${VM_INSTALL_DIR}/lib'
EOF
cat > "${D}"/etc/vmware/config <<-EOF
bindir = "${VM_INSTALL_DIR}/bin"
libdir = "${VM_INSTALL_DIR}/lib/vmware"
initscriptdir = "/etc/init.d"
authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
gksu.rootMethod = "su"
VMCI_CONFED = "yes"
VMBLOCK_CONFED = "yes"
VSOCK_CONFED = "yes"
NETWORKING = "yes"
player.product.version = "${major_minor_revision}"
product.version = "${major_minor_revision}"
product.buildNumber = "${build}"
product.name = "VMware Workstation"
workstation.product.version = "${major_minor_revision}"
EOF
if use vix; then
cat >> "${D}"/etc/vmware/config <<-EOF
vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware"
vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix"
vix.config.version = "1"
EOF
fi
if use server; then
cat >> "${D}"/etc/vmware/config <<-EOF
authd.client.port = "902"
authd.proxy.nfc = "vmware-hostd:ha-nfc"
authd.soapserver = "TRUE"
EOF
fi
# install the init.d script
local initscript="${T}/vmware.rc"
sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
"${FILESDIR}/vmware-${major_minor}.rc" > ${initscript}
newinitd "${initscript}" vmware
if use server; then
# install the init.d script
local initscript="${T}/vmware-workstation-server.rc"
sed -e "s:@@ETCDIR@@:/etc/vmware:g" \
-e "s:@@PREFIX@@:${VM_INSTALL_DIR}:g" \
-e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
-e "s:@@LIBDIR@@:${VM_INSTALL_DIR}/lib/vmware:g" \
"${FILESDIR}/vmware-server-${major_minor}.rc" > ${initscript}
newinitd "${initscript}" vmware-workstation-server
fi
# fill in variable placeholders
sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
-i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}}
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/${PN}.desktop"
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/vmware-player.desktop"
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware-netcfg:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/vmware-netcfg.desktop"
if use server; then
# Configuration for vmware-workstation-server
local hostdUser="${VM_HOSTD_USER:-root}"
sed -e "/ACEDataUser/s:root:${hostdUser}:g" \
-i "${D}/etc/vmware/hostd/authorization.xml" || die
# Shared VMs Path: [standard].
sed -e "s:##{DS_NAME}##:standard:g" \
-e "s:##{DS_PATH}##:${VM_DATA_STORE_DIR}:g" \
-i "${D}/etc/vmware/hostd/datastores.xml" || die
sed -e "s:##{HTTP_PORT}##:-1:g" \
-e "s:##{HTTPS_PORT}##:443:g" \
-e "s:##{PIPE_PREFIX}##:/var/run/vmware/:g" \
-i "${D}/etc/vmware/hostd/proxy.xml" || die
# See vmware-workstation-server.py for more details.
sed -e "s:##{BUILD_CFGDIR}##:/etc/vmware/hostd/:g" \
-e "s:##{CFGALTDIR}##:/etc/vmware/hostd/:g" \
-e "s:##{CFGDIR}##:/etc/vmware/:g" \
-e "s:##{ENABLE_AUTH}##:true:g" \
-e "s:##{HOSTDMODE}##:ws:g" \
-e "s:##{HOSTD_CFGDIR}##:/etc/vmware/hostd/:g" \
-e "s:##{HOSTD_MOCKUP}##:false:g" \
-e "s:##{LIBDIR}##:${VM_INSTALL_DIR}/lib/vmware:g" \
-e "s:##{LIBDIR_INSTALLED}##:${VM_INSTALL_DIR}/lib/vmware/:g" \
-e "s:##{LOGDIR}##:/var/log/vmware/:g" \
-e "s:##{LOGLEVEL}##:verbose:g" \
-e "s:##{MOCKUP}##:mockup-host-config.xml:g" \
-e "s:##{PLUGINDIR}##:./:g" \
-e "s:##{SHLIB_PREFIX}##:lib:g" \
-e "s:##{SHLIB_SUFFIX}##:.so:g" \
-e "s:##{USE_BLKLISTSVC}##:false:g" \
-e "s:##{USE_CBRCSVC}##:false:g" \
-e "s:##{USE_CIMSVC}##:false:g" \
-e "s:##{USE_DIRECTORYSVC}##:false:g" \
-e "s:##{USE_DIRECTORYSVC_MOCKUP}##:false:g" \
-e "s:##{USE_DYNAMIC_PLUGIN_LOADING}##:false:g" \
-e "s:##{USE_DYNAMO}##:false:g" \
-e "s:##{USE_DYNSVC}##:false:g" \
-e "s:##{USE_GUESTSVC}##:false:g" \
-e "s:##{USE_HBRSVC}##:false:g" \
-e "s:##{USE_HBRSVC_MOCKUP}##:false:g" \
-e "s:##{USE_HOSTSVC_MOCKUP}##:false:g" \
-e "s:##{USE_HTTPNFCSVC}##:false:g" \
-e "s:##{USE_HTTPNFCSVC_MOCKUP}##:false:g" \
-e "s:##{USE_LICENSESVC_MOCKUP}##:false:g" \
-e "s:##{USE_NFCSVC}##:true:g" \
-e "s:##{USE_NFCSVC_MOCKUP}##:false:g" \
-e "s:##{USE_OVFMGRSVC}##:true:g" \
-e "s:##{USE_PARTITIONSVC}##:false:g" \
-e "s:##{USE_SECURESOAP}##:false:g" \
-e "s:##{USE_SNMPSVC}##:false:g" \
-e "s:##{USE_SOLO_MOCKUP}##:false:g" \
-e "s:##{USE_STATSSVC_MOCKUP}##:false:g" \
-e "s:##{USE_VCSVC_MOCKUP}##:false:g" \
-e "s:##{USE_VDISKSVC}##:false:g" \
-e "s:##{USE_VDISKSVC_MOCKUP}##:false:g" \
-e "s:##{USE_VMSVC_MOCKUP}##:false:g" \
-e "s:##{VM_INVENTORY}##:vmInventory.xml:g" \
-e "s:##{VM_RESOURCES}##:vmResources.xml:g" \
-e "s:##{WEBSERVER_PORT_ENTRY}##::g" \
-e "s:##{WORKINGDIR}##:./:g" \
-i "${D}/etc/vmware/hostd/config.xml" || die
sed -e "s:##{ENV_LOCATION}##:/etc/vmware/hostd/env/:g" \
-i "${D}/etc/vmware/hostd/environments.xml" || die
# @@VICLIENT_URL@@=XXX
sed -e "s:@@AUTHD_PORT@@:902:g" \
-i "${D}${VM_INSTALL_DIR}/lib/vmware/hostd/docroot/client/clients.xml" || die
fi
# install systemd unit files
systemd_dounit "${WORKDIR}/systemd-vmware-${SYSTEMD_UNITS_TAG}/"*.{service,target}
readme.gentoo_create_doc
}
pkg_config() {
"${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
readme.gentoo_pkg_postinst
}
pkg_prerm() {
einfo "Stopping ${PN} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

@ -0,0 +1,628 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils versionator readme.gentoo-r1 fdo-mime gnome2-utils pam systemd vmware-bundle
MY_PN="VMware-Workstation"
MY_PV=$(get_version_component_range 1-3)
PV_MODULES="308.$(get_version_component_range 2-3)"
PV_BUILD=$(get_version_component_range 4)
MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}"
SYSTEMD_UNITS_TAG="gentoo-02"
DESCRIPTION="Emulate a complete PC without the performance overhead of most emulators"
HOMEPAGE="http://www.vmware.com/products/workstation/"
BASE_URI="https://softwareupdate.vmware.com/cds/vmw-desktop/ws/${MY_PV}/${PV_BUILD}/linux/core/"
SRC_URI="
amd64? ( ${BASE_URI}${MY_P}.x86_64.bundle.tar )
https://github.com/akhuettel/systemd-vmware/archive/${SYSTEMD_UNITS_TAG}.tar.gz -> vmware-systemd-${SYSTEMD_UNITS_TAG}.tgz
"
LICENSE="vmware GPL-2 GPL-3"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="bundled-libs cups doc ovftool server vix +vmware-tools"
RESTRICT="mirror strip"
BUNDLED_LIBS_DIR=/opt/vmware/lib/vmware/lib
BUNDLED_LIBS="
libXau.so.6
libXcomposite.so.1
libXcursor.so.1
libXdamage.so.1
libXdmcp.so.6
libXfixes.so.3
libXft.so.2
libXinerama.so.1
libXrandr.so.2
libXrender.so.1
libaio.so.1
libatk-1.0.so.0
libatkmm-1.6.so.1
libatspi.so.0
libcairo.so.2
libcairomm-1.0.so.1
libcrypto.so.1.0.1
libcurl.so.4
libdbus-1.so.3
libfontconfig.so.1
libfreetype.so.6
libfuse.so.2
libgailutil.so.18
libgcc_s.so.1
libgcrypt.so.11
libgdk-x11-2.0.so.0
libgdk_pixbuf-2.0.so.0
libgdkmm-2.4.so.1
libgio-2.0.so.0
libgiomm-2.4.so.1
libglib-2.0.so.0
libglibmm-2.4.so.1
libglibmm_generate_extra_defs-2.4.so.1
libgmodule-2.0.so.0
libgobject-2.0.so.0
libgpg-error.so.0
libgthread-2.0.so.0
libgtk-x11-2.0.so.0
libgtkmm-2.4.so.1
libpango-1.0.so.0
libpangocairo-1.0.so.0
libpangoft2-1.0.so.0
libpangomm-1.4.so.1
libpangox-1.0.so.0
libpangoxft-1.0.so.0
libpcsclite.so.1
libpixman-1.so.0
libpng12.so.0
librsvg-2.so.2
libsigc-2.0.so.0
libssl.so.1.0.1
libstdc++.so.6
libxml2.so.2
libz.so.1
"
BUNDLED_LIB_DEPENDS="
app-accessibility/at-spi2-core
dev-cpp/atkmm
dev-cpp/cairomm
dev-cpp/glibmm:2
dev-cpp/gtkmm:2.4
dev-cpp/pangomm
dev-libs/atk
dev-libs/glib:2
dev-libs/libaio
dev-libs/libgcrypt:11/11
dev-libs/libgpg-error
dev-libs/libsigc++:2
dev-libs/libxml2
dev-libs/openssl:0
gnome-base/librsvg:2
media-libs/fontconfig
media-libs/freetype
media-libs/libpng:1.2
net-misc/curl
sys-apps/dbus
sys-apps/pcsc-lite
sys-fs/fuse
sys-libs/zlib
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:2
x11-libs/libXau
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXdmcp
x11-libs/libXfixes
x11-libs/libXft
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/pango
x11-libs/pangox-compat
x11-libs/pixman
"
# vmware should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND="
app-arch/bzip2
dev-libs/dbus-glib
dev-libs/expat
dev-libs/gmp:0
dev-libs/icu
dev-libs/json-c
dev-libs/libcroco
dev-libs/libffi
dev-libs/libgcrypt:0/20
dev-libs/libtasn1:0/6
dev-libs/nettle:0/6
gnome-base/gconf
gnome-base/libgnome-keyring
media-gfx/graphite2
media-libs/alsa-lib
media-libs/harfbuzz:0/0.9.18
media-libs/libart_lgpl
media-libs/libpng:0
media-libs/libvorbis
media-libs/mesa
net-dns/libidn
net-libs/gnutls
net-print/cups
sys-apps/tcp-wrappers
sys-apps/util-linux
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libXext
x11-libs/libXi
x11-libs/libXtst
x11-libs/libXxf86vm
x11-libs/libdrm
x11-libs/libxcb
x11-libs/libxshmfence
x11-libs/startup-notification
x11-libs/xcb-util
x11-themes/hicolor-icon-theme
bundled-libs? (
media-libs/jbigkit:0/2.1
media-libs/tiff:3
virtual/jpeg:62
)
!bundled-libs? ( ${BUNDLED_LIB_DEPENDS} )
!app-emulation/vmware-player
"
PDEPEND="~app-emulation/vmware-modules-${PV_MODULES}
vmware-tools? ( app-emulation/vmware-tools )"
DEPEND=">=dev-util/patchelf-0.9"
S=${WORKDIR}
VM_INSTALL_DIR="/opt/vmware"
VM_DATA_STORE_DIR="/var/lib/vmware/Shared VMs"
VM_HOSTD_USER="root"
QA_PREBUILT="/opt/*"
QA_WX_LOAD="opt/vmware/lib/vmware/tools-upgraders/vmware-tools-upgrader-32 opt/vmware/lib/vmware/bin/vmware-vmx-stats opt/vmware/lib/vmware/bin/vmware-vmx-debug opt/vmware/lib/vmware/bin/vmware-vmx"
src_unpack() {
default
local bundle=${MY_P}.x86_64.bundle
local component; for component in \
vmware-workstation \
vmware-player-app \
vmware-player-setup \
vmware-vmx \
vmware-network-editor \
vmware-network-editor-ui \
vmware-usbarbitrator \
vmware-vprobe
do
vmware-bundle_extract-bundle-component "${bundle}" "${component}" "${S}"
done
if use ovftool; then
vmware-bundle_extract-bundle-component "${bundle}" vmware-ovftool
fi
if use server; then
vmware-bundle_extract-bundle-component "${bundle}" vmware-workstation-server #"${S}"
fi
if use vix; then
vmware-bundle_extract-bundle-component "${bundle}" vmware-vix-core vmware-vix
vmware-bundle_extract-bundle-component "${bundle}" vmware-vix-lib-Workstation1200 vmware-vix
fi
}
clean_bundled_libs() {
einfo "Removing bundled libraries"
for libname in ${BUNDLED_LIBS} ; do
rm -rv "${S}"/lib/lib/${libname} || die "Failed removing bundled ${libname}"
done
rm -rv "${S}"/lib/libconf || die "Failed removing bundled gtk conf libs"
# Among the bundled libs there are libcrypto.so.1.0.1 and libssl.so.1.0.1
# (needed by libcds.so) which seem to be compiled from openssl-1.0.1h.
# Upstream real sonames are *so.1.0.0 so it's necessary to fix DT_NEEDED link
# in libcds.so to be able to use system libs.
pushd >/dev/null .
einfo "Patching libcds.so"
cd "${S}"/lib/lib/libcds.so || die
patchelf --replace-needed libssl.so.1.0.{1,0} \
--replace-needed libcrypto.so.1.0.{1,0} \
libcds.so || die
popd >/dev/null
# vmware-workstation seems to use a custom version of libgksu2.so, for this reason
# we leave the bundled version. The libvmware-gksu.so library declares simply DT_NEEDED
# libgksu2.so.0 but it uses at runtime the bundled version, patch the lib to avoid portage
# preserve-libs mechanism to be triggered when a system lib is available (but not required)
pushd >/dev/null .
einfo "Patching libvmware-gksu.so"
cd "${S}"/lib/lib/libvmware-gksu.so || die
patchelf --set-rpath "\$ORIGIN/../libgksu2.so.0" \
libvmware-gksu.so || die
popd >/dev/null
}
src_prepare() {
rm -f bin/vmware-modconfig
rm -rf lib/modules/binary
# Bug 459566
mv lib/libvmware-netcfg.so lib/lib/
if use server; then
rm -f vmware-workstation-server/bin/{openssl,configure-hostd.sh}
fi
if ! use bundled-libs ; then
clean_bundled_libs
fi
DOC_CONTENTS="
/etc/env.d is updated during ${PN} installation. Please run:\n
env-update && source /etc/profile\n
Before you can use ${PN}, you must configure a default network setup.
You can do this by running 'emerge --config ${PN}'.\n
To be able to run ${PN} your user must be in the vmware group.\n
You MUST set USE=bundled-libs if you are running gcc-5, otherwise vmware will not start.
"
}
src_install() {
local major_minor=$(get_version_component_range 1-2 "${PV}")
# revdep-rebuild entry
insinto /etc/revdep-rebuild
echo "SEARCH_DIRS_MASK=\"${VM_INSTALL_DIR}\"" >> ${T}/10${PN}
doins "${T}"/10${PN}
# install the binaries
into "${VM_INSTALL_DIR}"
dobin bin/*
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware
doins -r lib/*
# workaround for hardcoded search paths needed during shared objects loading
if ! use bundled-libs ; then
dosym /usr/$(get_libdir)/libglib-2.0.so.0 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libglib-2.0.so.0/libglib-2.0.so.0
# Bug 432918
dosym /usr/$(get_libdir)/libcrypto.so.1.0.0 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libcrypto.so.1.0.1/libcrypto.so.1.0.1
dosym /usr/$(get_libdir)/libssl.so.1.0.0 \
"${VM_INSTALL_DIR}"/lib/vmware/lib/libssl.so.1.0.1/libssl.so.1.0.1
fi
# install the ancillaries
insinto /usr
doins -r share
if use cups; then
exeinto $(cups-config --serverbin)/filter
doexe extras/thnucups
insinto /etc/cups
doins -r etc/cups/*
fi
if use doc; then
dodoc doc/*
fi
exeinto "${VM_INSTALL_DIR}"/lib/vmware/setup
doexe vmware-config
# install vmware workstation server
if use server; then
dosbin sbin/*
cd "${S}"/vmware-workstation-server
# install binaries
into "${VM_INSTALL_DIR}"/lib/vmware
dobin bin/*
dobin "${FILESDIR}"/configure-hostd.sh
dobin "${FILESDIR}"/configure-hostd.sh
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware/lib
doins -r lib/*
into "${VM_INSTALL_DIR}"
for tool in vmware-hostd wssc-adminTool ; do
cat > "${T}/${tool}" <<-EOF
#!/usr/bin/env bash
set -e
. /etc/vmware/bootstrap
exec "${VM_INSTALL_DIR}/lib/vmware/lib/wrapper-gtk24.sh" \\
"${VM_INSTALL_DIR}/lib/vmware/lib" \\
"${VM_INSTALL_DIR}/lib/vmware/bin/${tool}" \\
"${VM_INSTALL_DIR}/lib/vmware/libconf" "\$@"
EOF
dobin "${T}/${tool}"
done
insinto "${VM_INSTALL_DIR}"/lib/vmware
doins -r hostd
# create the configuration
insinto /etc/vmware/hostd
doins -r config/etc/vmware/hostd/*
doins -r etc/vmware/hostd/*
insinto /etc/vmware/ssl
doins etc/vmware/ssl/*
# pam
pamd_mimic_system vmware-authd auth account
# create directory for shared virtual machines.
keepdir "${VM_DATA_STORE_DIR}"
keepdir /var/log/vmware
fi
# install vmware-vix
if use vix; then
cd "${S}"/vmware-vix
# install the binary
into "${VM_INSTALL_DIR}"
dobin bin/*
# install the libraries
insinto "${VM_INSTALL_DIR}"/lib/vmware-vix
doins -r lib/*
dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so
# install headers
insinto /usr/include/vmware-vix
doins include/*
if use doc; then
dohtml -r doc/*
fi
fi
# install ovftool
if use ovftool; then
cd "${S}"
insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool
doins -r vmware-ovftool/*
chmod 0755 "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin}
dosym "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool
fi
# create symlinks for the various tools
local tool ; for tool in thnuclnt vmware vmplayer{,-daemon} licenseTool vmamqpd \
vmware-{acetool,enter-serial,gksu,fuseUI,modconfig{,-console},netcfg,tray,zenity} ; do
dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
done
dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware "${VM_INSTALL_DIR}"/bin/vmware
dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
# fix permissions
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/wrapper-gtk24.sh
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/libgksu2.so.0/gksu-run-helper
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/setup/vmware-config
fperms 4711 "${VM_INSTALL_DIR}"/bin/vmware-mount
fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
if use server; then
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{vmware-hostd,wssc-adminTool}
fperms 4711 "${VM_INSTALL_DIR}"/sbin/vmware-authd
fperms 1777 "${VM_DATA_STORE_DIR}"
fi
if use vix; then
fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config
fi
# create the environment
local envd="${T}/90vmware"
cat > "${envd}" <<-EOF
PATH='${VM_INSTALL_DIR}/bin'
ROOTPATH='${VM_INSTALL_DIR}/bin'
EOF
use bundled-libs && echo 'VMWARE_USE_SHIPPED_LIBS=1' >> "${envd}"
doenvd "${envd}"
# create the configuration
dodir /etc/vmware
cat > "${D}"/etc/vmware/bootstrap <<-EOF
BINDIR='${VM_INSTALL_DIR}/bin'
LIBDIR='${VM_INSTALL_DIR}/lib'
EOF
cat > "${D}"/etc/vmware/config <<-EOF
bindir = "${VM_INSTALL_DIR}/bin"
libdir = "${VM_INSTALL_DIR}/lib/vmware"
initscriptdir = "/etc/init.d"
authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
gksu.rootMethod = "su"
VMCI_CONFED = "yes"
VMBLOCK_CONFED = "yes"
VSOCK_CONFED = "yes"
NETWORKING = "yes"
player.product.version = "${MY_PV}"
product.buildNumber = "${PV_BUILD}"
product.version = "${MY_PV}"
product.name = "VMware Workstation"
workstation.product.version = "${MY_PV}"
EOF
if use vix; then
cat >> "${D}"/etc/vmware/config <<-EOF
vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware"
vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix"
vix.config.version = "1"
EOF
fi
if use server; then
cat >> "${D}"/etc/vmware/config <<-EOF
authd.client.port = "902"
authd.proxy.nfc = "vmware-hostd:ha-nfc"
authd.soapserver = "TRUE"
EOF
fi
# install the init.d script
local initscript="${T}/vmware.rc"
sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
"${FILESDIR}/vmware-${major_minor}.rc" > "${initscript}" || die
newinitd "${initscript}" vmware
if use server; then
# install the init.d script
local initscript="${T}/vmware-workstation-server.rc"
sed -e "s:@@ETCDIR@@:/etc/vmware:g" \
-e "s:@@PREFIX@@:${VM_INSTALL_DIR}:g" \
-e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
-e "s:@@LIBDIR@@:${VM_INSTALL_DIR}/lib/vmware:g" \
"${FILESDIR}/vmware-server-${major_minor}.rc" > ${initscript} || die
newinitd "${initscript}" vmware-workstation-server
fi
# fill in variable placeholders
if use bundled-libs ; then
sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
-i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}} || die
fi
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/vmware-player.desktop" || die
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/vmware-workstation.desktop" || die
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware-netcfg:g" \
-e "/^Encoding/d" \
-i "${D}/usr/share/applications/vmware-netcfg.desktop" || die
if use server; then
# Configuration for vmware-workstation-server
local hostdUser="${VM_HOSTD_USER:-root}"
sed -e "/ACEDataUser/s:root:${hostdUser}:g" \
-i "${D}/etc/vmware/hostd/authorization.xml" || die
# Shared VMs Path: [standard].
sed -e "s:##{DS_NAME}##:standard:g" \
-e "s:##{DS_PATH}##:${VM_DATA_STORE_DIR}:g" \
-i "${D}/etc/vmware/hostd/datastores.xml" || die
sed -e "s:##{HTTP_PORT}##:-1:g" \
-e "s:##{HTTPS_PORT}##:443:g" \
-e "s:##{PIPE_PREFIX}##:/var/run/vmware/:g" \
-i "${D}/etc/vmware/hostd/proxy.xml" || die
# See vmware-workstation-server.py for more details.
sed -e "s:##{BUILD_CFGDIR}##:/etc/vmware/hostd/:g" \
-e "s:##{CFGALTDIR}##:/etc/vmware/hostd/:g" \
-e "s:##{CFGDIR}##:/etc/vmware/:g" \
-e "s:##{ENABLE_AUTH}##:true:g" \
-e "s:##{HOSTDMODE}##:ws:g" \
-e "s:##{HOSTD_CFGDIR}##:/etc/vmware/hostd/:g" \
-e "s:##{HOSTD_MOCKUP}##:false:g" \
-e "s:##{LIBDIR}##:${VM_INSTALL_DIR}/lib/vmware:g" \
-e "s:##{LIBDIR_INSTALLED}##:${VM_INSTALL_DIR}/lib/vmware/:g" \
-e "s:##{LOGDIR}##:/var/log/vmware/:g" \
-e "s:##{LOGLEVEL}##:verbose:g" \
-e "s:##{MOCKUP}##:mockup-host-config.xml:g" \
-e "s:##{PLUGINDIR}##:./:g" \
-e "s:##{SHLIB_PREFIX}##:lib:g" \
-e "s:##{SHLIB_SUFFIX}##:.so:g" \
-e "s:##{USE_BLKLISTSVC}##:false:g" \
-e "s:##{USE_CBRCSVC}##:false:g" \
-e "s:##{USE_CIMSVC}##:false:g" \
-e "s:##{USE_DIRECTORYSVC}##:false:g" \
-e "s:##{USE_DIRECTORYSVC_MOCKUP}##:false:g" \
-e "s:##{USE_DYNAMIC_PLUGIN_LOADING}##:false:g" \
-e "s:##{USE_DYNAMO}##:false:g" \
-e "s:##{USE_DYNSVC}##:false:g" \
-e "s:##{USE_GUESTSVC}##:false:g" \
-e "s:##{USE_HBRSVC}##:false:g" \
-e "s:##{USE_HBRSVC_MOCKUP}##:false:g" \
-e "s:##{USE_HOSTSVC_MOCKUP}##:false:g" \
-e "s:##{USE_HTTPNFCSVC}##:false:g" \
-e "s:##{USE_HTTPNFCSVC_MOCKUP}##:false:g" \
-e "s:##{USE_LICENSESVC_MOCKUP}##:false:g" \
-e "s:##{USE_NFCSVC}##:true:g" \
-e "s:##{USE_NFCSVC_MOCKUP}##:false:g" \
-e "s:##{USE_OVFMGRSVC}##:true:g" \
-e "s:##{USE_PARTITIONSVC}##:false:g" \
-e "s:##{USE_SECURESOAP}##:false:g" \
-e "s:##{USE_SNMPSVC}##:false:g" \
-e "s:##{USE_SOLO_MOCKUP}##:false:g" \
-e "s:##{USE_STATSSVC_MOCKUP}##:false:g" \
-e "s:##{USE_VCSVC_MOCKUP}##:false:g" \
-e "s:##{USE_VDISKSVC}##:false:g" \
-e "s:##{USE_VDISKSVC_MOCKUP}##:false:g" \
-e "s:##{USE_VMSVC_MOCKUP}##:false:g" \
-e "s:##{VM_INVENTORY}##:vmInventory.xml:g" \
-e "s:##{VM_RESOURCES}##:vmResources.xml:g" \
-e "s:##{WEBSERVER_PORT_ENTRY}##::g" \
-e "s:##{WORKINGDIR}##:./:g" \
-i "${D}/etc/vmware/hostd/config.xml" || die
sed -e "s:##{ENV_LOCATION}##:/etc/vmware/hostd/env/:g" \
-i "${D}/etc/vmware/hostd/environments.xml" || die
# @@VICLIENT_URL@@=XXX
sed -e "s:@@AUTHD_PORT@@:902:g" \
-i "${D}${VM_INSTALL_DIR}/lib/vmware/hostd/docroot/client/clients.xml" || die
fi
# install systemd unit files
systemd_dounit "${WORKDIR}/systemd-vmware-${SYSTEMD_UNITS_TAG}/"*.{service,target}
readme.gentoo_create_doc
}
pkg_config() {
"${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
readme.gentoo_print_elog
ewarn "${P} is using an old version of libgcrypt library which"
ewarn "is going to be soon removed from portage due to security reasons"
ewarn "(see https://bugs.gentoo.org/show_bug.cgi?id=541564)."
ewarn "Until vmware is fixed upstream you're exposed to security issues!"
}
pkg_prerm() {
einfo "Stopping ${PN} for safe unmerge"
/etc/init.d/vmware stop
}
pkg_postrm() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
}

@ -15,7 +15,7 @@ SRC_URI="
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 ~arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="fpm apache2"
# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.

@ -1 +1,2 @@
DIST openssl-1.0.2g-8.tar.gz 21497 SHA256 69e153c62a9a583a097c713be78fb19a7c494b248f1f502f7d47309109a2e105 SHA512 1b8c0cf8d21f2c9f2f32b4442e02a0832ab9cf9d4ec9943b20ec8363df916bfb218da26b9cbc79783090dea01a9b04accd797c3dada893ac767565ab32047eeb WHIRLPOOL 21e4f5ca6d38b31962d55f8e85d3f9e21615aa9f701567058d5638e0422f072cde4ea4227d3a426b20b4434392d2e3cfe85420c94d7d4d8de69639adcb00065e
DIST openssl-c_rehash.sh.1.7 4167 SHA256 4999ee79892f52bd6a4a7baba9fac62262454d573bbffd72685d3aae9e48cee0 SHA512 55e8c2e827750a4f375cb83c86bfe2d166c01ffa5d7e9b16657b72b38b747c8985dd2c98f854c911dfbbee2ff3e92aff39fdf089d979b2e3534b7685ee8b80da WHIRLPOOL c88f06a3b8651f76b6289552cccceb64e13f6697c5f0ce3ff114c781ce1c218912b8ee308af9d087cd76a9600fdacda1953175bff07d7d3eb21b0c0b7f4f1ce1

@ -0,0 +1,35 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
MY_P="openssl-${PV/_p/-}"
DESCRIPTION="c_rehash script written in POSIX shell for OpenSSL"
HOMEPAGE="https://www.openssl.org/ https://github.com/pld-linux/openssl/"
SRC_URI="https://github.com/pld-linux/openssl/archive/auto/th/${MY_P}.tar.gz"
LICENSE="openssl"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="libressl"
RDEPEND="
!libressl? ( dev-libs/openssl:0 )
libressl? ( dev-libs/libressl:0 )
"
S="${WORKDIR}/openssl-auto-th-${MY_P}"
src_prepare() {
SSL_CNF_DIR="/etc/ssl"
sed -i \
-e "/^DIR=/s:=.*:=${EPREFIX}${SSL_CNF_DIR}:" \
-e '1iOPENSSL=openssl' \
openssl-c_rehash.sh || die #416717
}
src_install() {
newbin openssl-c_rehash.sh c_rehash
}

@ -1,11 +1,5 @@
DIST ca-certificates_20140927.tar.xz 288824 SHA256 e582724ebb9d5d6fe02d02db1773c9ca76d3aaab4b15375a0d72e9abf88a65c5 SHA512 3cd08559c52aeba763a8ecc0333c7c20838db0111e52d9adf65719f14f858611271d61801a60fb3aea4e74be4a7903c1b462bf889172f5afb774280bb615b98b WHIRLPOOL e32e54b21109b7c44266480a6a5d78693b5ef7ffae1df595c4edfe2cce85d1cd29664e6d916c5bfffb965e4bb01fce6a8327a2ead5bb0ca7cdd8afd04346a270
DIST ca-certificates_20141019.tar.xz 289092 SHA256 684902d3f4e9ad27829f4af0d9d2d588afed03667997579b9c2be86fcd1eb73a SHA512 5b0e8fb917f5642a5a2b4fde46a706db0c652ff3fb31a5053d9123a5b670b50c6e3cf2496915cc01c613dcbe964d6432f393c12d8a697baedfad58f9d13e568b WHIRLPOOL 6d3c0ccfbd4b1598ed529cb07390baaf741e24c8fd4762aa1786ada7188ec0c4e327513047bca2b93a488681e80b5a8fabc37b98b7f6e5e92cba62580c4cf74f
DIST ca-certificates_20150426.tar.xz 303256 SHA256 37dbaa93ed64cc4ae93ac295f9248fbc741bd51376438cfb1257f17efab5494f SHA512 920dfc512c018c5338bf07b6a6afcb664d9bfba659d4233ca9e87471d5e0ed05de054c96f3d7e6091549aa6deb46106a79f7f982696081f9b2164e18133eb34d WHIRLPOOL 6d068fa13ffdb1b232b1cdb99063e52e52ee9f4cd44917f4eca263f36b5d4fa3c261b45bbf51143fc08965937adc477afd88c9a909300b619d42ae72b4c4acd9
DIST ca-certificates_20151214.tar.xz 293672 SHA256 59286e6403f482a24c672e09b810c7d089a73153d4772ff4a66e86053a920525 SHA512 acee5565aa7d1f0cc120a6abb6503e0ac4b4e12f5fd1cb12442ec1374ae1570ec6dc3a8f3a247fad6835a29d96e856f12c664f466e92344db3aa1ae6292a27ac WHIRLPOOL c03d214fb15a791c14f235c58296fb06f1408c98bb78049f58b3ebf7bc1c1cea4662f90a031d86de2548267feacf6a9e3fef957aa44a19e29e9a6ba803aaa3fa
DIST ca-certificates_20160104.tar.xz 293632 SHA256 09eb770122e23260316120c0cbbddc8a1d33e7147210ce44e146084d5d5abcdd SHA512 4291ba58057b66d56853162b71862832135eab6f444a5e2cf3dd1089495d44624246dc0c540871851fe9aaceb42054516309402525c8f16a88911d3af9c3518a WHIRLPOOL 8a45acdf2c0673156bc546808df5160ebbfc3a85d775cefa8918c5b64ea6ba905e89017689a407a20444f3e550133c2af228f4d4a878670af50d88fc4739edeb
DIST nss-3.14.1-add_spi+cacerts_ca_certs.patch 25018 SHA256 82ca25982828fd7153ad15fc6e81408c115476eeeb4045d3a71469380b56824b SHA512 2aafbd972b073061bfd66a66a4b50060691957f2910f716f7a69d22d655c499f186f05db2101bea5248a00949f339327ba8bfffec024c61c8ee908766201ae00 WHIRLPOOL c9fe397e316dac7983b187acf7227078ebd8f8da5df53f77f2564489e85f123c4d2afb88d56e8dc14b9ebfffe8a71ade4724b3c1ea683c5c4c487cb3a64eda43
DIST nss-3.17.2.tar.gz 6927414 SHA256 134929e44e44b968a4883f4ee513a71ae45d55b486cee41ee8e26c3cc84dab8b SHA512 a3d165bb2c578e7b5d90349729e85a2fce09260d069093080c76cce3b8a996c6489232324fd6a0c69b959321bcdf5f1806054f165cd6ce851fe4ffeb2883ae7f WHIRLPOOL 01b3cc546aa2dd0974caa2267aa9874b01cf6096f307a114393ba5a98adc216e0f2b217631b89b20752be5881f70fc1a7e94e0e90618707d5f9b9d18fd55d859
DIST nss-3.17.4.tar.gz 6924699 SHA256 1d98ad1881a4237ec98cbe472fc851480f0b0e954dfe224d047811fb96ff9d79 SHA512 dfc44e28c303743a72b4553f471089bc991c3cb61d5f3071082c16400d5e4f216f84a2e44536570316fe0e798c14ca370c875dad791a873034595b9e4dd70b89 WHIRLPOOL bb6e1027c5237d12fe58b4c520536022d8d4e83183a78c3421fd46bf9c3503b1f0ca4644240e383f216ec1e5174c0ae4148372db68fb9f1c10275954559d5bbf
DIST nss-3.19.tar.gz 6951461 SHA256 989ebdf79374f24181f060d332445b1a4baf3df39d08514c4349ba8573cefa9b SHA512 e428d206a4fd30087f275a33771a1d7e753b000e8fc3e7c746972a89d1b32300d3619f430ea15e870d82b3af52785d4dd36ae89c9c496f014f9f323ea373da14 WHIRLPOOL 3a8b58a8a28e31f65f40cfa6a9bd9ca2177a17552082d8de2189da6c92ff7ba9c90be13793666558a2bff609da738cb1f4313968077e1041b8f283d36005e76c
DIST nss-3.20.tar.gz 6955552 SHA256 5e38d4b9837ca338af966b97fc91c07f67ad647fb38dc4af3cfd0d84e477d15c SHA512 50f666209cadd4e463f98643ec67e35f4d1b88381e17db9eed7c67559b19799fcc27e49d72536f546d4c45bca2afa4664e5590f868775a4397a77111d68fc366 WHIRLPOOL 84f20e6764b3621762fcfcb9223a3861e1f5ff02078b19b7df2eb58430a5f96943d962dca2d3366b18cd434acf3d3be746242c5064497167d5671c50233834de
DIST nss-3.21.tar.gz 6978112 SHA256 3f7a5b027d7cdd5c0e4ff7544da33fdc6f56c2f8c27fff02938fd4a6fbe87239 SHA512 0645465b5d1ab05d819355a3f4a2879499539a00d95bfab3ca14a7dcd901e510b5d9ae797386ff5a42f68b0b57f7bbec4ec9d3a85ebd508eb824aba1fb589d53 WHIRLPOOL 7504d83de606d61840e06cb855ea688eb022d5eef062bcb7ac4d1064db96b96e35ae4ce0aff9d389a2140a7c3b974aaa9a86ada52af1199d462fdb48b11b42e4
DIST nss-3.23.tar.gz 7467001 SHA256 94b383e31c9671e9dfcca81084a8a813817e8f05a57f54533509b318d26e11cf SHA512 f3e388a415493685faa6df932e9e968af41ea2e8e4cba3fbd539c60177443e4042e8d2e2bfe74183552e14522d49048be2f80fbe038bdbd499971e82abf2cc32 WHIRLPOOL 77e22bd7a525c5b10723e1d5fb6db1e9d2efebfcdf9828aa79296f71c441c065201ecda56291f37790333d9b1d1e38fef1391a033382a885b83da31a646d6243

@ -1,186 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# The Debian ca-certificates package merely takes the CA database as it exists
# in the nss package and repackages it for use by openssl.
#
# The issue with using the compiled debs directly is two fold:
# - they do not update frequently enough for us to rely on them
# - they pull the CA database from nss tip of tree rather than the release
#
# So we take the Debian source tools and combine them with the latest nss
# release to produce (largely) the same end result. The difference is that
# now we know our cert database is kept in sync with nss and, if need be,
# can be sync with nss tip of tree more frequently to respond to bugs.
# When triaging bugs from users, here's some handy tips:
# - To see what cert is hitting errors, use openssl:
# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME
# Focus on the errors written to stderr.
#
# - Look at the upstream log as to why certs were added/removed:
# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
#
# - If people want to add/remove certs, tell them to file w/mozilla:
# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
EAPI="4"
PYTHON_COMPAT=( python2_7 )
inherit eutils python-any-r1
if [[ ${PV} == *.* ]] ; then
# Compile from source ourselves.
PRECOMPILED=false
inherit versionator
DEB_VER=$(get_version_component_range 1)
NSS_VER=$(get_version_component_range 2-)
RTM_NAME="NSS_${NSS_VER//./_}_RTM"
else
# Debian precompiled version.
PRECOMPILED=true
inherit unpacker
fi
DESCRIPTION="Common CA Certificates PEM files"
HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
NMU_PR=""
if ${PRECOMPILED} ; then
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb"
else
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz
cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )"
fi
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE=""
${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
fi
# openssl: we run `c_rehash`
# debianutils: we run `run-parts`
RDEPEND="${DEPEND}
dev-libs/openssl
sys-apps/debianutils"
if ! ${PRECOMPILED}; then
DEPEND+=" ${PYTHON_DEPS}"
fi
S=${WORKDIR}
pkg_setup() {
# For the conversion to having it in CONFIG_PROTECT_MASK,
# we need to tell users about it once manually first.
[[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
|| ewarn "You should run update-ca-certificates manually after etc-update"
}
src_unpack() {
${PRECOMPILED} || default
mv ${PN}-*/ ${PN} || die
# Do all the work in the image subdir to avoid conflicting with source
# dirs in $WORKDIR. Need to perform everything in the offset #381937
mkdir -p "image/${EPREFIX}"
cd "image/${EPREFIX}" || die
${PRECOMPILED} && unpacker_src_unpack
}
src_prepare() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
mkdir -p usr/sbin
cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die
if use cacert ; then
pushd "${S}"/nss-${NSS_VER} >/dev/null
epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch
popd >/dev/null
fi
fi
epatch "${FILESDIR}"/${PN}-20110502-root.patch
local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g')
sed -i \
-e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \
-e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
usr/sbin/update-ca-certificates || die
}
src_compile() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
python_setup
local d="${S}/${PN}/mozilla"
# Grab the database from the nss sources.
cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die
emake -C "${d}"
# Now move the files to the same places that the precompiled would.
mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla
if use cacert ; then
mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org}
mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die
mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die
fi
mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die
else
mv usr/share/doc/{ca-certificates,${PF}} || die
fi
(
echo "# Automatically generated by ${CATEGORY}/${PF}"
echo "# $(date -u)"
echo "# Do not edit."
cd usr/share/ca-certificates
find * -name '*.crt' | LC_ALL=C sort
) > etc/ca-certificates.conf
sh usr/sbin/update-ca-certificates --root "${S}/image" || die
}
src_install() {
cp -pPR image/* "${D}"/ || die
if ! ${PRECOMPILED} ; then
cd ca-certificates
doman sbin/*.8
dodoc debian/README.* examples/ca-certificates-local/README
fi
echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
doenvd 98ca-certificates
}
pkg_postinst() {
if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
# if the user has local certs, we need to rebuild again
# to include their stuff in the db.
# However it's too overzealous when the user has custom certs in place.
# --fresh is to clean up dangling symlinks
"${EROOT}"/usr/sbin/update-ca-certificates --root "${EROOT}"
fi
local c badcerts=0
for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
ewarn "Broken symlink for a certificate at $c"
badcerts=1
done
if [ $badcerts -eq 1 ]; then
ewarn "Removing the following broken symlinks:"
ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
fi
}

@ -1,186 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# The Debian ca-certificates package merely takes the CA database as it exists
# in the nss package and repackages it for use by openssl.
#
# The issue with using the compiled debs directly is two fold:
# - they do not update frequently enough for us to rely on them
# - they pull the CA database from nss tip of tree rather than the release
#
# So we take the Debian source tools and combine them with the latest nss
# release to produce (largely) the same end result. The difference is that
# now we know our cert database is kept in sync with nss and, if need be,
# can be sync with nss tip of tree more frequently to respond to bugs.
# When triaging bugs from users, here's some handy tips:
# - To see what cert is hitting errors, use openssl:
# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME
# Focus on the errors written to stderr.
#
# - Look at the upstream log as to why certs were added/removed:
# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
#
# - If people want to add/remove certs, tell them to file w/mozilla:
# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
EAPI="4"
PYTHON_COMPAT=( python2_7 )
inherit eutils python-any-r1
if [[ ${PV} == *.* ]] ; then
# Compile from source ourselves.
PRECOMPILED=false
inherit versionator
DEB_VER=$(get_version_component_range 1)
NSS_VER=$(get_version_component_range 2-)
RTM_NAME="NSS_${NSS_VER//./_}_RTM"
else
# Debian precompiled version.
PRECOMPILED=true
inherit unpacker
fi
DESCRIPTION="Common CA Certificates PEM files"
HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
NMU_PR=""
if ${PRECOMPILED} ; then
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb"
else
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz
cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )"
fi
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE=""
${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
fi
# openssl: we run `c_rehash`; newer version for alt-cert-paths #552540
# debianutils: we run `run-parts`
RDEPEND="${DEPEND}
>=dev-libs/openssl-1.0.1o
sys-apps/debianutils"
if ! ${PRECOMPILED}; then
DEPEND+=" ${PYTHON_DEPS}"
fi
S=${WORKDIR}
pkg_setup() {
# For the conversion to having it in CONFIG_PROTECT_MASK,
# we need to tell users about it once manually first.
[[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
|| ewarn "You should run update-ca-certificates manually after etc-update"
}
src_unpack() {
${PRECOMPILED} || default
mv ${PN}-*/ ${PN} || die
# Do all the work in the image subdir to avoid conflicting with source
# dirs in $WORKDIR. Need to perform everything in the offset #381937
mkdir -p "image/${EPREFIX}"
cd "image/${EPREFIX}" || die
${PRECOMPILED} && unpacker_src_unpack
}
src_prepare() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
mkdir -p usr/sbin
cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die
if use cacert ; then
pushd "${S}"/nss-${NSS_VER} >/dev/null
epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch
popd >/dev/null
fi
fi
epatch "${FILESDIR}"/${PN}-20141019-root.patch
local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g')
sed -i \
-e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \
-e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
usr/sbin/update-ca-certificates || die
}
src_compile() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
python_setup
local d="${S}/${PN}/mozilla"
# Grab the database from the nss sources.
cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die
emake -C "${d}"
# Now move the files to the same places that the precompiled would.
mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla
if use cacert ; then
mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org}
mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die
mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die
fi
mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die
else
mv usr/share/doc/{ca-certificates,${PF}} || die
fi
(
echo "# Automatically generated by ${CATEGORY}/${PF}"
echo "# $(date -u)"
echo "# Do not edit."
cd usr/share/ca-certificates
find * -name '*.crt' | LC_ALL=C sort
) > etc/ca-certificates.conf
sh usr/sbin/update-ca-certificates --root "${S}/image" || die
}
src_install() {
cp -pPR image/* "${D}"/ || die
if ! ${PRECOMPILED} ; then
cd ca-certificates
doman sbin/*.8
dodoc debian/README.* examples/ca-certificates-local/README
fi
echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
doenvd 98ca-certificates
}
pkg_postinst() {
if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
# if the user has local certs, we need to rebuild again
# to include their stuff in the db.
# However it's too overzealous when the user has custom certs in place.
# --fresh is to clean up dangling symlinks
"${EROOT}"/usr/sbin/update-ca-certificates --root "${EROOT}"
fi
local c badcerts=0
for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
ewarn "Broken symlink for a certificate at $c"
badcerts=1
done
if [ $badcerts -eq 1 ]; then
ewarn "Removing the following broken symlinks:"
ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
fi
}

@ -1,190 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# The Debian ca-certificates package merely takes the CA database as it exists
# in the nss package and repackages it for use by openssl.
#
# The issue with using the compiled debs directly is two fold:
# - they do not update frequently enough for us to rely on them
# - they pull the CA database from nss tip of tree rather than the release
#
# So we take the Debian source tools and combine them with the latest nss
# release to produce (largely) the same end result. The difference is that
# now we know our cert database is kept in sync with nss and, if need be,
# can be sync with nss tip of tree more frequently to respond to bugs.
# When triaging bugs from users, here's some handy tips:
# - To see what cert is hitting errors, use openssl:
# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME
# Focus on the errors written to stderr.
#
# - Look at the upstream log as to why certs were added/removed:
# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
#
# - If people want to add/remove certs, tell them to file w/mozilla:
# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
EAPI="4"
PYTHON_COMPAT=( python2_7 )
inherit eutils python-any-r1
if [[ ${PV} == *.* ]] ; then
# Compile from source ourselves.
PRECOMPILED=false
inherit versionator
DEB_VER=$(get_version_component_range 1)
NSS_VER=$(get_version_component_range 2-)
RTM_NAME="NSS_${NSS_VER//./_}_RTM"
else
# Debian precompiled version.
PRECOMPILED=true
inherit unpacker
fi
DESCRIPTION="Common CA Certificates PEM files"
HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
NMU_PR=""
if ${PRECOMPILED} ; then
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb"
else
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz
cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )"
fi
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="libressl"
${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
fi
# openssl: we run `c_rehash`; newer version for alt-cert-paths #552540
# debianutils: we run `run-parts`
RDEPEND="${DEPEND}
!libressl? ( >=dev-libs/openssl-1.0.1o:0 )
libressl? (
app-misc/c_rehash
dev-libs/libressl
)
sys-apps/debianutils"
if ! ${PRECOMPILED}; then
DEPEND+=" ${PYTHON_DEPS}"
fi
S=${WORKDIR}
pkg_setup() {
# For the conversion to having it in CONFIG_PROTECT_MASK,
# we need to tell users about it once manually first.
[[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
|| ewarn "You should run update-ca-certificates manually after etc-update"
}
src_unpack() {
${PRECOMPILED} || default
mv ${PN}-*/ ${PN} || die
# Do all the work in the image subdir to avoid conflicting with source
# dirs in $WORKDIR. Need to perform everything in the offset #381937
mkdir -p "image/${EPREFIX}"
cd "image/${EPREFIX}" || die
${PRECOMPILED} && unpacker_src_unpack
}
src_prepare() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
mkdir -p usr/sbin
cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die
if use cacert ; then
pushd "${S}"/nss-${NSS_VER} >/dev/null
epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch
popd >/dev/null
fi
fi
epatch "${FILESDIR}"/${PN}-20141019-root.patch
local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g')
sed -i \
-e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \
-e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
usr/sbin/update-ca-certificates || die
}
src_compile() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
python_setup
local d="${S}/${PN}/mozilla"
# Grab the database from the nss sources.
cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die
emake -C "${d}"
# Now move the files to the same places that the precompiled would.
mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla
if use cacert ; then
mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org}
mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die
mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die
fi
mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die
else
mv usr/share/doc/{ca-certificates,${PF}} || die
fi
(
echo "# Automatically generated by ${CATEGORY}/${PF}"
echo "# $(date -u)"
echo "# Do not edit."
cd usr/share/ca-certificates
find * -name '*.crt' | LC_ALL=C sort
) > etc/ca-certificates.conf
sh usr/sbin/update-ca-certificates --root "${S}/image" || die
}
src_install() {
cp -pPR image/* "${D}"/ || die
if ! ${PRECOMPILED} ; then
cd ca-certificates
doman sbin/*.8
dodoc debian/README.* examples/ca-certificates-local/README
fi
echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
doenvd 98ca-certificates
}
pkg_postinst() {
if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
# if the user has local certs, we need to rebuild again
# to include their stuff in the db.
# However it's too overzealous when the user has custom certs in place.
# --fresh is to clean up dangling symlinks
"${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}"
fi
local c badcerts=0
for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
ewarn "Broken symlink for a certificate at $c"
badcerts=1
done
if [ $badcerts -eq 1 ]; then
ewarn "Removing the following broken symlinks:"
ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
fi
}

@ -1,186 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# The Debian ca-certificates package merely takes the CA database as it exists
# in the nss package and repackages it for use by openssl.
#
# The issue with using the compiled debs directly is two fold:
# - they do not update frequently enough for us to rely on them
# - they pull the CA database from nss tip of tree rather than the release
#
# So we take the Debian source tools and combine them with the latest nss
# release to produce (largely) the same end result. The difference is that
# now we know our cert database is kept in sync with nss and, if need be,
# can be sync with nss tip of tree more frequently to respond to bugs.
# When triaging bugs from users, here's some handy tips:
# - To see what cert is hitting errors, use openssl:
# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME
# Focus on the errors written to stderr.
#
# - Look at the upstream log as to why certs were added/removed:
# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
#
# - If people want to add/remove certs, tell them to file w/mozilla:
# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
EAPI="4"
PYTHON_COMPAT=( python2_7 )
inherit eutils python-any-r1
if [[ ${PV} == *.* ]] ; then
# Compile from source ourselves.
PRECOMPILED=false
inherit versionator
DEB_VER=$(get_version_component_range 1)
NSS_VER=$(get_version_component_range 2-)
RTM_NAME="NSS_${NSS_VER//./_}_RTM"
else
# Debian precompiled version.
PRECOMPILED=true
inherit unpacker
fi
DESCRIPTION="Common CA Certificates PEM files"
HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
NMU_PR=""
if ${PRECOMPILED} ; then
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb"
else
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz
cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )"
fi
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE=""
${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
fi
# openssl: we run `c_rehash`; newer version for alt-cert-paths #552540
# debianutils: we run `run-parts`
RDEPEND="${DEPEND}
>=dev-libs/openssl-1.0.1o
sys-apps/debianutils"
if ! ${PRECOMPILED}; then
DEPEND+=" ${PYTHON_DEPS}"
fi
S=${WORKDIR}
pkg_setup() {
# For the conversion to having it in CONFIG_PROTECT_MASK,
# we need to tell users about it once manually first.
[[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
|| ewarn "You should run update-ca-certificates manually after etc-update"
}
src_unpack() {
${PRECOMPILED} || default
mv ${PN}-*/ ${PN} || die
# Do all the work in the image subdir to avoid conflicting with source
# dirs in $WORKDIR. Need to perform everything in the offset #381937
mkdir -p "image/${EPREFIX}"
cd "image/${EPREFIX}" || die
${PRECOMPILED} && unpacker_src_unpack
}
src_prepare() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
mkdir -p usr/sbin
cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die
if use cacert ; then
pushd "${S}"/nss-${NSS_VER} >/dev/null
epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch
popd >/dev/null
fi
fi
epatch "${FILESDIR}"/${PN}-20141019-root.patch
local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g')
sed -i \
-e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \
-e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
usr/sbin/update-ca-certificates || die
}
src_compile() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
python_setup
local d="${S}/${PN}/mozilla"
# Grab the database from the nss sources.
cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die
emake -C "${d}"
# Now move the files to the same places that the precompiled would.
mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla
if use cacert ; then
mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org}
mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die
mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die
fi
mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die
else
mv usr/share/doc/{ca-certificates,${PF}} || die
fi
(
echo "# Automatically generated by ${CATEGORY}/${PF}"
echo "# $(date -u)"
echo "# Do not edit."
cd usr/share/ca-certificates
find * -name '*.crt' | LC_ALL=C sort
) > etc/ca-certificates.conf
sh usr/sbin/update-ca-certificates --root "${S}/image" || die
}
src_install() {
cp -pPR image/* "${D}"/ || die
if ! ${PRECOMPILED} ; then
cd ca-certificates
doman sbin/*.8
dodoc debian/README.* examples/ca-certificates-local/README
fi
echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
doenvd 98ca-certificates
}
pkg_postinst() {
if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
# if the user has local certs, we need to rebuild again
# to include their stuff in the db.
# However it's too overzealous when the user has custom certs in place.
# --fresh is to clean up dangling symlinks
"${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}"
fi
local c badcerts=0
for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
ewarn "Broken symlink for a certificate at $c"
badcerts=1
done
if [ $badcerts -eq 1 ]; then
ewarn "Removing the following broken symlinks:"
ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
fi
}

@ -1,193 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# The Debian ca-certificates package merely takes the CA database as it exists
# in the nss package and repackages it for use by openssl.
#
# The issue with using the compiled debs directly is two fold:
# - they do not update frequently enough for us to rely on them
# - they pull the CA database from nss tip of tree rather than the release
#
# So we take the Debian source tools and combine them with the latest nss
# release to produce (largely) the same end result. The difference is that
# now we know our cert database is kept in sync with nss and, if need be,
# can be sync with nss tip of tree more frequently to respond to bugs.
# When triaging bugs from users, here's some handy tips:
# - To see what cert is hitting errors, use openssl:
# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME
# Focus on the errors written to stderr.
#
# - Look at the upstream log as to why certs were added/removed:
# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt
#
# - If people want to add/remove certs, tell them to file w/mozilla:
# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
EAPI="4"
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
inherit eutils python-any-r1
if [[ ${PV} == *.* ]] ; then
# Compile from source ourselves.
PRECOMPILED=false
inherit versionator
DEB_VER=$(get_version_component_range 1)
NSS_VER=$(get_version_component_range 2-)
RTM_NAME="NSS_${NSS_VER//./_}_RTM"
else
# Debian precompiled version.
PRECOMPILED=true
inherit unpacker
fi
DESCRIPTION="Common CA Certificates PEM files"
HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
NMU_PR=""
if ${PRECOMPILED} ; then
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb"
else
SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz
ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz
cacert? ( https://dev.gentoo.org/~anarchy/patches/nss-3.14.1-add_spi+cacerts_ca_certs.patch )"
fi
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="libressl"
${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
fi
# openssl: we run `c_rehash`; newer version for alt-cert-paths #552540
# debianutils: we run `run-parts`
RDEPEND="${DEPEND}
!libressl? ( >=dev-libs/openssl-1.0.1o:0 )
libressl? (
app-misc/c_rehash
dev-libs/libressl
)
sys-apps/debianutils"
if ! ${PRECOMPILED}; then
DEPEND+=" ${PYTHON_DEPS}"
fi
S=${WORKDIR}
pkg_setup() {
# For the conversion to having it in CONFIG_PROTECT_MASK,
# we need to tell users about it once manually first.
[[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
|| ewarn "You should run update-ca-certificates manually after etc-update"
}
src_unpack() {
${PRECOMPILED} || default
mv ${PN}-*/ ${PN} || die
# Do all the work in the image subdir to avoid conflicting with source
# dirs in $WORKDIR. Need to perform everything in the offset #381937
mkdir -p "image/${EPREFIX}"
cd "image/${EPREFIX}" || die
${PRECOMPILED} && unpacker_src_unpack
}
src_prepare() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
mkdir -p usr/sbin
cp -p "${S}"/${PN}/sbin/update-ca-certificates usr/sbin/ || die
if use cacert ; then
pushd "${S}"/nss-${NSS_VER} >/dev/null
epatch "${DISTDIR}"/nss-3.14.1-add_spi+cacerts_ca_certs.patch
popd >/dev/null
fi
fi
epatch "${FILESDIR}"/${PN}-20150426-root.patch
local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g')
sed -i \
-e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \
-e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
usr/sbin/update-ca-certificates || die
cd "${S}"
epatch "${FILESDIR}"/${PN}-20150426-nss-certdata2pem-py3.patch #548374
}
src_compile() {
cd "image/${EPREFIX}" || die
if ! ${PRECOMPILED} ; then
python_setup
local d="${S}/${PN}/mozilla"
# Grab the database from the nss sources.
cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die
emake -C "${d}"
# Now move the files to the same places that the precompiled would.
mkdir -p etc/ssl/certs etc/ca-certificates/update.d usr/share/ca-certificates/mozilla
if use cacert ; then
mkdir -p usr/share/ca-certificates/{cacert.org,spi-inc.org}
mv "${d}"/CAcert_Inc..crt usr/share/ca-certificates/cacert.org/cacert.org_root.crt || die
mv "${d}"/SPI_Inc..crt usr/share/ca-certificates/spi-inc.org/spi-cacert-2008.crt || die
fi
mv "${d}"/*.crt usr/share/ca-certificates/mozilla/ || die
else
mv usr/share/doc/{ca-certificates,${PF}} || die
fi
(
echo "# Automatically generated by ${CATEGORY}/${PF}"
echo "# $(date -u)"
echo "# Do not edit."
cd usr/share/ca-certificates
find * -name '*.crt' | LC_ALL=C sort
) > etc/ca-certificates.conf
sh usr/sbin/update-ca-certificates --root "${S}/image" || die
}
src_install() {
cp -pPR image/* "${D}"/ || die
if ! ${PRECOMPILED} ; then
cd ca-certificates
doman sbin/*.8
dodoc debian/README.* examples/ca-certificates-local/README
fi
echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
doenvd 98ca-certificates
}
pkg_postinst() {
if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
# if the user has local certs, we need to rebuild again
# to include their stuff in the db.
# However it's too overzealous when the user has custom certs in place.
# --fresh is to clean up dangling symlinks
"${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}"
fi
local c badcerts=0
for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
ewarn "Broken symlink for a certificate at $c"
badcerts=1
done
if [ $badcerts -eq 1 ]; then
ewarn "Removing the following broken symlinks:"
ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
fi
}

@ -57,16 +57,13 @@ fi
LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE=""
${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
DEPEND+=" !<sys-apps/portage-2.1.10.41"
fi
# c_rehash: we run `c_rehash`; newer version for alt-cert-paths #552540
# debianutils: we run `run-parts`

@ -63,10 +63,7 @@ ${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
DEPEND+=" !<sys-apps/portage-2.1.10.41"
fi
# c_rehash: we run `c_rehash`; newer version for alt-cert-paths #552540
# debianutils: we run `run-parts`

@ -25,8 +25,8 @@
# - If people want to add/remove certs, tell them to file w/mozilla:
# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk
EAPI="4"
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
inherit eutils python-any-r1
@ -63,15 +63,12 @@ ${PRECOMPILED} || IUSE+=" +cacert"
DEPEND=""
if ${PRECOMPILED} ; then
# platforms like AIX don't have a good ar
DEPEND+="
kernel_AIX? ( app-arch/deb2targz )
!<sys-apps/portage-2.1.10.41"
DEPEND+=" !<sys-apps/portage-2.1.10.41"
fi
# c_rehash: we run `c_rehash`; newer version for alt-cert-paths #552540
# c_rehash: we run `c_rehash`
# debianutils: we run `run-parts`
RDEPEND="${DEPEND}
>=app-misc/c_rehash-1.7-r1
app-misc/c_rehash
sys-apps/debianutils"
if ! ${PRECOMPILED}; then
@ -90,8 +87,6 @@ pkg_setup() {
src_unpack() {
${PRECOMPILED} || default
mv ${PN}-*/ ${PN} || die
# Do all the work in the image subdir to avoid conflicting with source
# dirs in $WORKDIR. Need to perform everything in the offset #381937
mkdir -p "image/${EPREFIX}"
@ -119,9 +114,6 @@ src_prepare() {
-e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \
-e '/RELPATH="\.\./s:"$:'"${relp}"'":' \
usr/sbin/update-ca-certificates || die
cd "${S}"
epatch "${FILESDIR}"/${PN}-20150426-nss-certdata2pem-py3.patch #548374
}
src_compile() {
@ -182,7 +174,7 @@ pkg_postinst() {
ewarn "Broken symlink for a certificate at $c"
badcerts=1
done
if [ $badcerts -eq 1 ]; then
if [ ${badcerts} -eq 1 ]; then
ewarn "Removing the following broken symlinks:"
ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
fi

@ -1,110 +0,0 @@
--- a/usr/sbin/update-ca-certificates
+++ b/usr/sbin/update-ca-certificates
@@ -23,6 +23,8 @@
verbose=0
fresh=0
+ROOT=""
+RELPATH=""
while [ $# -gt 0 ];
do
case $1 in
@@ -30,6 +31,11 @@
verbose=1;;
--fresh|-f)
fresh=1;;
+ --root|-r)
+ ROOT=$(readlink -f "$2")
+ # needed as c_rehash wants to read the files directly
+ RELPATH="../../.."
+ shift;;
--help|-h|*)
- echo "$0: [--verbose] [--fresh]"
+ echo "$0: [--verbose] [--fresh] [--root <dir>]"
exit;;
@@ -37,11 +41,11 @@
shift
done
-CERTSCONF=/etc/ca-certificates.conf
-CERTSDIR=/usr/share/ca-certificates
-LOCALCERTSDIR=/usr/local/share/ca-certificates
+CERTSCONF="$ROOT/etc/ca-certificates.conf"
+CERTSDIR="$ROOT/usr/share/ca-certificates"
+LOCALCERTSDIR="$ROOT/usr/local/share/ca-certificates"
CERTBUNDLE=ca-certificates.crt
-ETCCERTSDIR=/etc/ssl/certs
+ETCCERTSDIR="$ROOT/etc/ssl/certs"
cleanup() {
rm -f "$TEMPBUNDLE"
@@ -66,7 +70,7 @@
-e 's/,/_/g').pem"
if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
then
- ln -sf "$CERT" "$PEM"
+ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM"
echo +$PEM >> "$ADDED"
fi
cat "$CERT" >> "$TEMPBUNDLE"
@@ -78,22 +82,22 @@
if test -L "$PEM"
then
rm -f "$PEM"
- echo -$PEM >> "$REMOVED"
+ echo "-$PEM" >> "$REMOVED"
fi
}
-cd $ETCCERTSDIR
+cd "$ETCCERTSDIR"
if [ "$fresh" = 1 ]; then
echo -n "Clearing symlinks in $ETCCERTSDIR..."
find . -type l -print | while read symlink
do
- case $(readlink $symlink) in
- $CERTSDIR*) rm -f $symlink;;
+ case $(readlink "$symlink") in
+ "$CERTSDIR"*) rm -f "$symlink";;
esac
done
find . -type l -print | while read symlink
do
- test -f $symlink || rm -f $symlink
+ test -f "$symlink" || rm -f "$symlink"
done
echo "done."
fi
@@ -102,12 +106,12 @@
# Handle certificates that should be removed. This is an explicit act
# by prefixing lines in the configuration files with exclamation marks (!).
-sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt
+sed -n -e '/^$/d' -e 's/^!//p' "$CERTSCONF" | while read crt
do
remove "$CERTSDIR/$crt"
done
-sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
+sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt
do
if ! test -f "$CERTSDIR/$crt"
then
@@ -146,14 +150,14 @@
echo "$ADDED_CNT added, $REMOVED_CNT removed; done."
-HOOKSDIR=/etc/ca-certificates/update.d
+HOOKSDIR="$ROOT/etc/ca-certificates/update.d"
echo -n "Running hooks in $HOOKSDIR...."
VERBOSE_ARG=
[ "$verbose" = 0 ] || VERBOSE_ARG=--verbose
-eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook
+eval run-parts $VERBOSE_ARG --test -- \""$HOOKSDIR"\" | while read hook
do
( cat $ADDED
- cat $REMOVED ) | $hook || echo E: $hook exited with code $?.
+ cat $REMOVED ) | "$hook" || echo E: "$hook" exited with code $?.
done
echo "done."

@ -1,116 +0,0 @@
add a --root option so we can generate with DESTDIR installs
--- a/usr/sbin/update-ca-certificates
+++ b/usr/sbin/update-ca-certificates
@@ -23,6 +23,8 @@
verbose=0
fresh=0
+ROOT=""
+RELPATH=""
while [ $# -gt 0 ];
do
case $1 in
@@ -30,18 +32,23 @@ do
verbose=1;;
--fresh|-f)
fresh=1;;
+ --root|-r)
+ ROOT=$(readlink -f "$2")
+ # needed as c_rehash wants to read the files directly
+ RELPATH="../../.."
+ shift;;
--help|-h|*)
- echo "$0: [--verbose] [--fresh]"
+ echo "$0: [--verbose] [--fresh] [--root <dir>]"
exit;;
esac
shift
done
-CERTSCONF=/etc/ca-certificates.conf
-CERTSDIR=/usr/share/ca-certificates
-LOCALCERTSDIR=/usr/local/share/ca-certificates
+CERTSCONF="$ROOT/etc/ca-certificates.conf"
+CERTSDIR="$ROOT/usr/share/ca-certificates"
+LOCALCERTSDIR="$ROOT/usr/local/share/ca-certificates"
CERTBUNDLE=ca-certificates.crt
-ETCCERTSDIR=/etc/ssl/certs
+ETCCERTSDIR="$ROOT/etc/ssl/certs"
cleanup() {
rm -f "$TEMPBUNDLE"
@@ -66,7 +73,7 @@ add() {
-e 's/,/_/g').pem"
if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
then
- ln -sf "$CERT" "$PEM"
+ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM"
echo +$PEM >> "$ADDED"
fi
# Add trailing newline to certificate, if it is missing (#635570)
@@ -79,36 +86,36 @@ remove() {
if test -L "$PEM"
then
rm -f "$PEM"
- echo -$PEM >> "$REMOVED"
+ echo "-$PEM" >> "$REMOVED"
fi
}
-cd $ETCCERTSDIR
+cd "$ETCCERTSDIR"
if [ "$fresh" = 1 ]; then
- echo -n "Clearing symlinks in $ETCCERTSDIR..."
+ printf "Clearing symlinks in $ETCCERTSDIR..."
find . -type l -print | while read symlink
do
- case $(readlink $symlink) in
- $CERTSDIR*) rm -f $symlink;;
+ case $(readlink "$symlink") in
+ "$CERTSDIR"*) rm -f "$symlink";;
esac
done
find . -type l -print | while read symlink
do
- test -f $symlink || rm -f $symlink
+ test -f "$symlink" || rm -f "$symlink"
done
echo "done."
fi
-echo -n "Updating certificates in $ETCCERTSDIR... "
+printf "Updating certificates in $ETCCERTSDIR... "
# Handle certificates that should be removed. This is an explicit act
# by prefixing lines in the configuration files with exclamation marks (!).
-sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt
+sed -n -e '/^$/d' -e 's/^!//p' "$CERTSCONF" | while read crt
do
remove "$CERTSDIR/$crt"
done
-sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
+sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt
do
if ! test -f "$CERTSDIR/$crt"
then
@@ -151,14 +158,14 @@ mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
echo "$ADDED_CNT added, $REMOVED_CNT removed; done."
-HOOKSDIR=/etc/ca-certificates/update.d
-echo -n "Running hooks in $HOOKSDIR...."
+HOOKSDIR="$ROOT/etc/ca-certificates/update.d"
+printf "Running hooks in $HOOKSDIR...."
VERBOSE_ARG=
[ "$verbose" = 0 ] || VERBOSE_ARG=--verbose
-eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook
+eval run-parts $VERBOSE_ARG --test -- \""$HOOKSDIR"\" | while read hook
do
( cat $ADDED
- cat $REMOVED ) | $hook || echo E: $hook exited with code $?.
+ cat $REMOVED ) | "$hook" || echo E: "$hook" exited with code $?.
done
echo "done."

@ -1,97 +0,0 @@
https://bugs.debian.org/789753
https://bugs.gentoo.org/548374
--- a/ca-certificates/mozilla/certdata2pem.py
+++ b/ca-certificates/mozilla/certdata2pem.py
@@ -31,7 +31,11 @@ objects = []
# Dirty file parser.
in_data, in_multiline, in_obj = False, False, False
field, type, value, obj = None, None, None, dict()
-for line in open('certdata.txt', 'r'):
+try:
+ f = open('certdata.txt', 'r', encoding='utf-8')
+except TypeError:
+ f = open('certdata.txt', 'r')
+for line in f:
# Ignore the file header.
if not in_data:
if line.startswith('BEGINDATA'):
@@ -53,7 +53,7 @@ for line in open('certdata.txt', 'r'):
if type == 'MULTILINE_OCTAL':
line = line.strip()
for i in re.finditer(r'\\([0-3][0-7][0-7])', line):
- value += chr(int(i.group(1), 8))
+ value.append(int(i.group(1), 8))
else:
value += line
continue
@@ -70,13 +70,13 @@ for line in open('certdata.txt', 'r'):
field, type = line_parts
value = None
else:
- raise NotImplementedError, 'line_parts < 2 not supported.'
+ raise NotImplementedError('line_parts < 2 not supported.')
if type == 'MULTILINE_OCTAL':
in_multiline = True
- value = ""
+ value = bytearray()
continue
obj[field] = value
-if len(obj.items()) > 0:
+if len(obj) > 0:
objects.append(obj)
# Read blacklist.
@@ -95,7 +95,7 @@ for obj in objects:
if obj['CKA_CLASS'] not in ('CKO_NETSCAPE_TRUST', 'CKO_NSS_TRUST'):
continue
if obj['CKA_LABEL'] in blacklist:
- print "Certificate %s blacklisted, ignoring." % obj['CKA_LABEL']
+ print("Certificate %s blacklisted, ignoring." % obj['CKA_LABEL'])
elif obj['CKA_TRUST_SERVER_AUTH'] in ('CKT_NETSCAPE_TRUSTED_DELEGATOR',
'CKT_NSS_TRUSTED_DELEGATOR'):
trust[obj['CKA_LABEL']] = True
@@ -104,13 +104,13 @@ for obj in objects:
trust[obj['CKA_LABEL']] = True
elif obj['CKA_TRUST_SERVER_AUTH'] in ('CKT_NETSCAPE_UNTRUSTED',
'CKT_NSS_NOT_TRUSTED'):
- print '!'*74
- print "UNTRUSTED BUT NOT BLACKLISTED CERTIFICATE FOUND: %s" % obj['CKA_LABEL']
- print '!'*74
+ print('!'*74)
+ print("UNTRUSTED BUT NOT BLACKLISTED CERTIFICATE FOUND: %s" % obj['CKA_LABEL'])
+ print('!'*74)
else:
- print "Ignoring certificate %s. SAUTH=%s, EPROT=%s" % \
+ print("Ignoring certificate %s. SAUTH=%s, EPROT=%s" % \
(obj['CKA_LABEL'], obj['CKA_TRUST_SERVER_AUTH'],
- obj['CKA_TRUST_EMAIL_PROTECTION'])
+ obj['CKA_TRUST_EMAIL_PROTECTION']))
for obj in objects:
if obj['CKA_CLASS'] == 'CKO_CERTIFICATE':
@@ -121,13 +121,19 @@ for obj in objects:
.replace('(', '=')\
.replace(')', '=')\
.replace(',', '_')
- bname = bname.decode('string_escape')
- fname = bname + '.crt'
+
+ # this is the only way to decode the way NSS stores multi-byte UTF-8
+ if bytes != str:
+ bname = bname.encode('utf-8')
+ bname = bname.decode('unicode_escape').encode('latin-1').decode('utf-8')
+ fname = (bname + '.crt').encode('utf-8')
+
if os.path.exists(fname):
- print "Found duplicate certificate name %s, renaming." % bname
- fname = bname + '_2.crt'
+ print("Found duplicate certificate name %s, renaming." % fname)
+ fname = (bname + '_2.crt').encode('utf-8')
f = open(fname, 'w')
f.write("-----BEGIN CERTIFICATE-----\n")
- f.write("\n".join(textwrap.wrap(base64.b64encode(obj['CKA_VALUE']), 64)))
+ encoded = base64.b64encode(obj['CKA_VALUE']).decode('utf-8')
+ f.write("\n".join(textwrap.wrap(encoded, 64)))
f.write("\n-----END CERTIFICATE-----\n")

@ -14,7 +14,7 @@ SRC_URI="http://www.midnight-commander.org/downloads/${MY_P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
IUSE="+edit gpm mclib nls samba sftp +slang spell test X +xdg"
REQUIRED_USE="spell? ( edit )"

@ -22,5 +22,6 @@
<name>Nicolas Dade</name>
</maintainer>
<remote-id type="sourceforge">pwsafe</remote-id>
<remote-id type="github">nsd20463/pwsafe</remote-id>
</upstream>
</pkgmetadata>

@ -0,0 +1,43 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
DESCRIPTION="A Password Safe compatible command-line password manager"
HOMEPAGE="http://nsd.dyndns.org/pwsafe/"
SRC_URI="http://nsd.dyndns.org/pwsafe/releases/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="X readline"
DEPEND="sys-libs/ncurses:0=
dev-libs/openssl:0=
readline? ( sys-libs/readline:0= )
X? ( x11-libs/libSM
x11-libs/libICE
x11-libs/libXmu
x11-libs/libX11 )"
RDEPEND="${DEPEND}"
src_prepare() {
eapply -p0 "${FILESDIR}/${P}-cvs-1.57.patch"
eapply -p0 "${FILESDIR}/${P}-printf.patch"
eapply -p0 "${FILESDIR}/${P}-fake-readline.patch"
eapply -p0 "${FILESDIR}/${P}-man-page-option-syntax.patch"
eapply -p0 "${FILESDIR}/${P}-XChangeProperty.patch"
eapply_user
}
src_configure() {
econf $(use_with X x) $(use_with readline)
}
src_install() {
doman pwsafe.1
dobin pwsafe
dodoc README NEWS
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save