parent
3f32686232
commit
e322ac5d3b
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
DIST ansible-2.9.10.tar.gz 14237929 BLAKE2B 52230b18efa94dbcbd6e4fba3d0915e2375fc8de7412944eaeefc054f50ea888a1aeb86b688a7ae97184b1a8a10180e67a7004d48906235ce4e1b83976d10e9a SHA512 c0d5e26491f52d1eb8d1c3755903bb6a8d50634df5fb50a970076d49d99cfda424fa60c258a6a5821e01c435a8ef077d46ced4b2f8c4f4a8d381737e6f14afb4
|
||||
DIST ansible-2.9.11.tar.gz 14243995 BLAKE2B afd60d69f53c79c778f122db902ba149030fd995650566f6edcfa41178e92d56cf200089b76de3c6999a824725c793e57c222733ed5b9d9c401bccea942cde5b SHA512 b157a5cfb5ba7cb651c7afc0dc92cfe3b8f9eebd06de6d7a1e4917ffca3c542c5207c8e1820acc5be840190c8754f111e2501304ad7e64867247e5b973aec81e
|
||||
DIST ansible-2.9.12.tar.gz 14260349 BLAKE2B 6d7fdc82489df755196b890b39c166e9639c94e4238b4bf33686a3ab17fcc92c6b3a05f80e1276795b966aaa318ec7d9003099950102c014adb1a5d730928633 SHA512 6c05c49e363d4d68516dfea448cead3e2c281d1288c9467a0b6dd083504f303df694ed1c5957ae6582b28acc937d12d13333254328e13bac430b9b7fa4354f23
|
||||
DIST ansible-2.9.9.tar.gz 14222889 BLAKE2B bcacd9271aa0275cff8090819ee5c2832c7b59a287d976ced7e4dad52b5af85350baa1de30f56fdbb92e237c1dd3a9f6ff86cd1af5cb20167331b3f846649d4a SHA512 327c5ece277096f71f10fec2b33a8d2c94ee59b0e22b15bb5ca449da2331b8158239bdbc8e3afd093af358a787f410c7c2e0942010de65a8d9c8719cf83e4abd
|
||||
|
@ -0,0 +1,68 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="Model-driven deployment, config management, and command execution framework"
|
||||
HOMEPAGE="https://ansible.com/"
|
||||
SRC_URI="https://releases.ansible.com/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x64-macos"
|
||||
IUSE="doc test"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/paramiko[${PYTHON_USEDEP}]
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||
dev-python/httplib2[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/netaddr[${PYTHON_USEDEP}]
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
net-misc/sshpass
|
||||
virtual/ssh
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-16.6[${PYTHON_USEDEP}]
|
||||
doc? (
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx-notfound-page[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
dev-python/coverage[${PYTHON_USEDEP}]
|
||||
dev-python/unittest2[${PYTHON_USEDEP}]
|
||||
dev-vcs/git
|
||||
)"
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
cd docs/docsite || die
|
||||
export CPUS=4
|
||||
emake -f Makefile.sphinx html
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests -d -w test/units -v --with-coverage --cover-package=ansible --cover-branches || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/docsite/_build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
|
||||
dodoc -r examples
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ago@gentoo.org</email>
|
||||
<name>Agostino Sarubbo</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>ago@gentoo.org</email>
|
||||
<name>Agostino Sarubbo</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">exoscale/cli</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -1 +1,2 @@
|
||||
DIST hcloud-1.17.0.tar.xz 687880 BLAKE2B c83530946dd04afc59d45a2bbb12b6a4034dfe5b8c3826e4e78f29e88891672c21e896fd9d24394ce943f9b6574928ae144a564abde3fec8a243cc5fc87e8bdb SHA512 5025357392e9b7661876f059a416e6d6f9eea89e16a9abaacaeb72506aaa5d4d6a193e266d23f01cd0f5d32048f66a3f6e22a1c9c042c2e3183a1e164da2ccc6
|
||||
DIST hcloud-1.18.0.tar.xz 691988 BLAKE2B 1d0d6cac56cefa9023796f259fce238952766e038568d843259845d8ebeb040b75dab9dc18908003fba1a10fc76fd45936e46db50536e26dd90a47354feba34a SHA512 39b09b5b79f1e8715fbc17c8576e51955b7729032385fd1aed3f171c56d041d0576dc99662fc9e222f5fe1837a4fddbd57cd406d98fd38a5b9eb116d2a83af3a
|
||||
|
@ -0,0 +1,34 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="A command-line interface for Hetzner Cloud"
|
||||
HOMEPAGE="https://github.com/hetznercloud/cli"
|
||||
SRC_URI="https://dev.gentoo.org/~ago/distfiles/${P}.tar.xz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE=""
|
||||
DEPEND="dev-lang/go:="
|
||||
RESTRICT="strip"
|
||||
QA_FLAGS_IGNORED=".*"
|
||||
|
||||
src_compile() {
|
||||
go build -mod vendor -o ${PN} -ldflags "-w -X github.com/hetznercloud/cli/cli.Version=${PV}-gentoo" ./cmd/${PN} || die "build failed"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# For upstream a simple test is run 'hcloud version'
|
||||
./hcloud version
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
die "Test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ago@gentoo.org</email>
|
||||
<name>Agostino Sarubbo</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>ago@gentoo.org</email>
|
||||
<name>Agostino Sarubbo</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">hetznercloud/cli</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,411 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools elisp-common flag-o-matic readme.gentoo-r1
|
||||
|
||||
if [[ ${PV##*.} = 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
|
||||
EGIT_BRANCH="emacs-27"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
|
||||
S="${EGIT_CHECKOUT_DIR}"
|
||||
else
|
||||
SRC_URI="mirror://gnu-alpha/emacs/pretest/emacs-${PV/_/-}.tar.xz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
# 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}"
|
||||
[[ ${PV} == *_pre* ]] && S="${WORKDIR}/emacs"
|
||||
fi
|
||||
|
||||
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
|
||||
HOMEPAGE="https://www.gnu.org/software/emacs/"
|
||||
|
||||
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
|
||||
SLOT="27-vcs"
|
||||
IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib"
|
||||
REQUIRED_USE="?? ( aqua X )"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?]
|
||||
sys-libs/ncurses:0=
|
||||
acl? ( virtual/acl )
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
dbus? ( sys-apps/dbus )
|
||||
games? ( acct-group/gamestat )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
gpm? ( sys-libs/gpm )
|
||||
!inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
|
||||
json? ( dev-libs/jansson )
|
||||
kerberos? ( virtual/krb5 )
|
||||
lcms? ( media-libs/lcms:2 )
|
||||
libxml2? ( >=dev-libs/libxml2-2.2.0 )
|
||||
mailutils? ( net-mail/mailutils[clients] )
|
||||
!mailutils? ( net-libs/liblockfile )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
ssl? ( net-libs/gnutls:0= )
|
||||
systemd? ( sys-apps/systemd )
|
||||
zlib? ( sys-libs/zlib )
|
||||
X? (
|
||||
x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libxcb
|
||||
x11-misc/xbitmaps
|
||||
gconf? ( >=gnome-base/gconf-2.26.2 )
|
||||
gsettings? ( >=dev-libs/glib-2.28.6 )
|
||||
gif? ( media-libs/giflib:0= )
|
||||
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 )
|
||||
imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= )
|
||||
xft? (
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
x11-libs/libXft
|
||||
x11-libs/libXrender
|
||||
cairo? ( >=x11-libs/cairo-1.12.18 )
|
||||
harfbuzz? ( media-libs/harfbuzz:0= )
|
||||
m17n-lib? (
|
||||
>=dev-libs/libotf-0.9.4
|
||||
>=dev-libs/m17n-lib-1.5.1
|
||||
)
|
||||
)
|
||||
gtk? (
|
||||
gtk2? ( x11-libs/gtk+:2 )
|
||||
!gtk2? (
|
||||
x11-libs/gtk+:3
|
||||
xwidgets? (
|
||||
net-libs/webkit-gtk:4=
|
||||
x11-libs/libXcomposite
|
||||
)
|
||||
)
|
||||
)
|
||||
!gtk? (
|
||||
motif? (
|
||||
>=x11-libs/motif-2.3:0
|
||||
x11-libs/libXpm
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
!motif? (
|
||||
Xaw3d? (
|
||||
x11-libs/libXaw3d
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
!Xaw3d? ( athena? (
|
||||
x11-libs/libXaw
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
) )
|
||||
)
|
||||
)
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
X? ( x11-base/xorg-proto )"
|
||||
|
||||
BDEPEND="app-eselect/eselect-emacs
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
gzip-el? ( app-arch/gzip )"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
!app-editors/emacs-vcs:27
|
||||
app-eselect/eselect-emacs"
|
||||
|
||||
EMACS_SUFFIX="emacs-${SLOT}"
|
||||
SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV##*.} = 9999 ]]; then
|
||||
FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
|
||||
configure.ac)
|
||||
[[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
|
||||
einfo "Emacs branch: ${EGIT_BRANCH}"
|
||||
einfo "Commit: ${EGIT_VERSION}"
|
||||
einfo "Emacs version number: ${FULL_VERSION}"
|
||||
[[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
|
||||
|| die "Upstream version number changed to ${FULL_VERSION}"
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
# Fix filename reference in redirected man page
|
||||
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die
|
||||
|
||||
#AT_M4DIR=m4 eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
strip-flags
|
||||
filter-flags -pie #526948
|
||||
|
||||
if use ia64; then
|
||||
replace-flags "-O[2-9]" -O1 #325373
|
||||
else
|
||||
replace-flags "-O[3-9]" -O2
|
||||
fi
|
||||
|
||||
local myconf
|
||||
|
||||
if use alsa; then
|
||||
use sound || ewarn \
|
||||
"USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
|
||||
myconf+=" --with-sound=alsa"
|
||||
else
|
||||
myconf+=" --with-sound=$(usex sound oss)"
|
||||
fi
|
||||
|
||||
if use X; then
|
||||
myconf+=" --with-x --without-ns"
|
||||
myconf+=" $(use_with gconf)"
|
||||
myconf+=" $(use_with gsettings)"
|
||||
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)"
|
||||
myconf+=" $(use_with imagemagick)"
|
||||
|
||||
if use xft; then
|
||||
myconf+=" --with-xft"
|
||||
myconf+=" $(use_with cairo)"
|
||||
myconf+=" $(use_with harfbuzz)"
|
||||
myconf+=" $(use_with m17n-lib libotf)"
|
||||
myconf+=" $(use_with m17n-lib m17n-flt)"
|
||||
else
|
||||
myconf+=" --without-xft"
|
||||
myconf+=" --without-cairo"
|
||||
myconf+=" --without-libotf --without-m17n-flt"
|
||||
use cairo && ewarn \
|
||||
"USE flag \"cairo\" has no effect if \"xft\" is not set."
|
||||
use m17n-lib && ewarn \
|
||||
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
|
||||
fi
|
||||
|
||||
local f line
|
||||
if use gtk; then
|
||||
einfo "Configuring to build with GIMP Toolkit (GTK+)"
|
||||
while read line; do ewarn "${line}"; done <<-EOF
|
||||
Your version of GTK+ will have problems with closing open
|
||||
displays. This is no problem if you just use one display, but
|
||||
if you use more than one and close one of them Emacs may crash.
|
||||
See <https://bugzilla.gnome.org/show_bug.cgi?id=85715>.
|
||||
If you intend to use more than one display, then it is strongly
|
||||
recommended that you compile Emacs with the Athena/Lucid or the
|
||||
Motif toolkit instead.
|
||||
EOF
|
||||
if use gtk2; then
|
||||
myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
|
||||
use xwidgets && ewarn \
|
||||
"USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
|
||||
else
|
||||
myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
|
||||
fi
|
||||
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
|
||||
if ! use gtk; then
|
||||
use gtk2 && ewarn \
|
||||
"USE flag \"gtk2\" has no effect if \"gtk\" is not set."
|
||||
use xwidgets && ewarn \
|
||||
"USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
|
||||
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
|
||||
|
||||
econf \
|
||||
--program-suffix="-${EMACS_SUFFIX}" \
|
||||
--includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
|
||||
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
|
||||
--localstatedir="${EPREFIX}"/var \
|
||||
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
|
||||
--without-compress-install \
|
||||
--without-hesiod \
|
||||
--without-pop \
|
||||
--with-dumping=pdumper \
|
||||
--with-file-notification=$(usev inotify || usev gfile || echo no) \
|
||||
$(use_enable acl) \
|
||||
$(use_with dbus) \
|
||||
$(use_with dynamic-loading modules) \
|
||||
$(use_with games gameuser ":gamestat") \
|
||||
$(use_with gmp libgmp) \
|
||||
$(use_with gpm) \
|
||||
$(use_with json) \
|
||||
$(use_with kerberos) $(use_with kerberos kerberos5) \
|
||||
$(use_with lcms lcms2) \
|
||||
$(use_with libxml2 xml2) \
|
||||
$(use_with mailutils) \
|
||||
$(use_with selinux) \
|
||||
$(use_with ssl gnutls) \
|
||||
$(use_with systemd libsystemd) \
|
||||
$(use_with threads) \
|
||||
$(use_with wide-int) \
|
||||
$(use_with zlib) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
#src_compile() {
|
||||
# # Disable sandbox when dumping. For the unbelievers, see bug #131505
|
||||
# emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
|
||||
#}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" NO_BIN_LINK=t install
|
||||
|
||||
mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die
|
||||
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
|
||||
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die
|
||||
|
||||
# move info dir to avoid collisions with the dir file generated by portage
|
||||
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
|
||||
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/{appdata,applications,icons}
|
||||
rm -rf "${ED}/usr/$(get_libdir)"
|
||||
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
|
||||
|
||||
if use systemd; then
|
||||
insinto /usr/lib/systemd/user
|
||||
sed -e "/^##/d" \
|
||||
-e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
|
||||
-e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
|
||||
etc/emacs.service | newins - ${EMACS_SUFFIX}.service
|
||||
assert
|
||||
fi
|
||||
|
||||
if use gzip-el; then
|
||||
# compress .el files when a corresponding .elc exists
|
||||
find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
|
||||
-name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
|
||||
assert "gzip .el failed"
|
||||
fi
|
||||
|
||||
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}
|
||||
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 || die
|
||||
X
|
||||
;;; ${EMACS_SUFFIX} 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\\\\>"))
|
||||
X (and path
|
||||
X ;; move Emacs Info dir before anything else in /usr/share
|
||||
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 CONTRIBUTE
|
||||
|
||||
if use aqua; then
|
||||
dodir /Applications/Gentoo
|
||||
rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app
|
||||
mv nextstep/Emacs.app \
|
||||
"${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die
|
||||
fi
|
||||
|
||||
local 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 Emacs version 24.2 or earlier, 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\\n${EMACS_SUFFIX^}.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
|
||||
if [[ -d ${ED}/usr/share/info ]]; then
|
||||
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
|
||||
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
|
||||
}
|
Binary file not shown.
@ -0,0 +1,73 @@
|
||||
# Copyright 2018-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
MY_PV=${PV/_/-}
|
||||
DESCRIPTION="Multi-container orchestration for Docker"
|
||||
HOMEPAGE="https://github.com/docker/compose"
|
||||
SRC_URI="https://github.com/docker/compose/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=dev-python/cached-property-1.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/distro-1.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/docker-py-4.2.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/dockerpty-0.4.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/docopt-0.6.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dotenv-0.13.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/jsonschema-2.5.1[${PYTHON_USEDEP}]
|
||||
dev-python/paramiko[${PYTHON_USEDEP}]
|
||||
>=dev-python/PySocks-1.6.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.20.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/six-1.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/texttable-0.9.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-python/pytest-5[${PYTHON_USEDEP}]
|
||||
>=dev-python/ddt-1.2.2[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/compose-${MY_PV}"
|
||||
|
||||
PATCHES=(
|
||||
# Bug #679968 -- https://bugs.gentoo.org/679968
|
||||
# Bug #681002 -- https://bugs.gentoo.org/681002
|
||||
"${FILESDIR}"/${PN}-1.27.0_rc1-setup-py.patch
|
||||
)
|
||||
|
||||
DOCS=( CHANGELOG.md README.md )
|
||||
|
||||
src_prepare() {
|
||||
# Address QA issue "docker-compose.exe: missing alias (symlink) for completed command."
|
||||
sed 's,^\(complete.*\) docker-compose\.exe\(.*\),\1\2,' -i contrib/completion/bash/docker-compose || die
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
${PYTHON} -m pytest tests/unit/ || die "tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp contrib/completion/bash/docker-compose ${PN}
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins contrib/completion/zsh/*
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
From df01ecc472ebc09754c159fd9f63966cd96985cf Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Tue, 11 Aug 2020 21:58:25 +0200
|
||||
Subject: [PATCH] setup.py: Drop generic upper version boundaries
|
||||
|
||||
---
|
||||
setup.py | 34 +++++++++++++++++-----------------
|
||||
1 file changed, 17 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 590e0eb..87501b1 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -25,33 +25,33 @@ def find_version(*file_paths):
|
||||
|
||||
|
||||
install_requires = [
|
||||
- 'cached-property >= 1.2.0, < 2',
|
||||
- 'docopt >= 0.6.1, < 1',
|
||||
- 'PyYAML >= 3.10, < 6',
|
||||
- 'requests >= 2.20.0, < 3',
|
||||
- 'texttable >= 0.9.0, < 2',
|
||||
- 'websocket-client >= 0.32.0, < 1',
|
||||
- 'distro >= 1.5.0, < 2',
|
||||
- 'docker[ssh] >= 4.2.2, < 5',
|
||||
- 'dockerpty >= 0.4.1, < 1',
|
||||
- 'jsonschema >= 2.5.1, < 4',
|
||||
- 'python-dotenv >= 0.13.0, < 1',
|
||||
+ 'cached-property >= 1.2.0',
|
||||
+ 'docopt >= 0.6.1',
|
||||
+ 'PyYAML >= 3.10',
|
||||
+ 'requests >= 2.20.0',
|
||||
+ 'texttable >= 0.9.0',
|
||||
+ 'websocket-client >= 0.32.0',
|
||||
+ 'distro >= 1.5.0',
|
||||
+ 'docker[ssh] >= 4.2.2',
|
||||
+ 'dockerpty >= 0.4.1',
|
||||
+ 'jsonschema >= 2.5.1',
|
||||
+ 'python-dotenv >= 0.13.0',
|
||||
]
|
||||
|
||||
|
||||
tests_require = [
|
||||
- 'ddt >= 1.2.2, < 2',
|
||||
- 'pytest < 6',
|
||||
+ 'ddt >= 1.2.2',
|
||||
+ 'pytest',
|
||||
]
|
||||
|
||||
|
||||
if sys.version_info[:2] < (3, 4):
|
||||
- tests_require.append('mock >= 1.0.1, < 4')
|
||||
+ tests_require.append('mock >= 1.0.1')
|
||||
|
||||
extras_require = {
|
||||
- ':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5, < 4'],
|
||||
- ':sys_platform == "win32"': ['colorama >= 0.4, < 1'],
|
||||
- 'socks': ['PySocks >= 1.5.6, != 1.5.7, < 2'],
|
||||
+ ':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5'],
|
||||
+ ':sys_platform == "win32"': ['colorama >= 0.4'],
|
||||
+ 'socks': ['PySocks >= 1.5.6, != 1.5.7'],
|
||||
'tests': tests_require,
|
||||
}
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,11 +12,11 @@ clean:
|
||||
|
||||
# pdf support using mupdf
|
||||
fbpdf: fbpdf.o mupdf.o draw.o
|
||||
- $(CC) -o $@ $^ $(LDFLAGS) $(shell $(PKG_CONFIG) --libs mupdf) -lm
|
||||
+ $(CC) -o $@ $^ $(LDFLAGS) $(shell $(PKG_CONFIG) --libs mupdf)
|
||||
|
||||
# djvu support
|
||||
fbdjvu: fbpdf.o djvulibre.o draw.o
|
||||
- $(CXX) -o $@ $^ $(LDFLAGS) $(shell $(PKG_CONFIG) --libs ddjvuapi) -ljpeg -lm -lpthread
|
||||
+ $(CXX) -o $@ $^ $(LDFLAGS) $(shell $(PKG_CONFIG) --libs ddjvuapi)
|
||||
|
||||
# pdf support using poppler
|
||||
poppler.o: poppler.c
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST yesod-1.4.3.tar.gz 9023 BLAKE2B ef7db3731a4f2c828dcba4cb6f5982141897de553ce096460a9514a97ba1ba2074270e25c6519c6ade14a597c50d4bfaf475f16d5308c936cab328285db416c1 SHA512 2964e290307fde99ea0b3ad27af61a5c2d4577fcf24eeb18d7ddd2d7210db8801d4d3a824ae6331e4d79a23155f9943b7b0f705c347bcec4a947fbe7c83b9278
|
||||
DIST yesod-1.4.4.tar.gz 9146 BLAKE2B b49d699ac0f5fec33b194f71dba35eb913e6d9b5b50113ccf9602c3bc14adaf7c66d8fb64ef5a1fd268c20196099204d20af75649f965deb2475c07db5279254 SHA512 ff58454e31efa47a50f04905c555a684d2a7415c726f60a206332f96ecb152eb566e285679d97cc1233baae9cc5cd42702365358ec2a55559a8b898540803f7c
|
||||
DIST yesod-1.6.0.2.tar.gz 9639 BLAKE2B 67386bd4660401fa98b1c2b2e38fa8847bf9366561ceaf37b14e75afcaee252e72d5b3993268c3f5f471baa72989f564ce4a0192e63e3ca483346ef8abf8a1a2 SHA512 8274e51e48c6cda936b1b1024634ed1235cdeca5e5478fec7f9ca1ff9c995263235d2152290e902151d1c21415140846e0c4a336546b9e1617fae677dfac2cfb
|
||||
DIST yesod-1.6.1.0.tar.gz 9794 BLAKE2B b0306995ca93646d4ed1eb58356c706b1a4fb773cbcf3dd7649405484af1f077f7f22c9d1792d9fb34aca11dc357dd7d527bbc5e5d6f60d24baa0b3797f60255 SHA512 712eed39b64f515cb949186ddb950133cc2daccde6d4a9b0115809e5f4726a957b2809ee785b348971c617b3d173bcd40776b065f5bf1d68b79af12905ada77a
|
||||
|
Binary file not shown.
@ -0,0 +1,188 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
export CBUILD=${CBUILD:-${CHOST}}
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
case ${PV} in
|
||||
*9999*)
|
||||
EGIT_REPO_URI="https://github.com/golang/go.git"
|
||||
inherit git-r3
|
||||
;;
|
||||
*)
|
||||
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
|
||||
S="${WORKDIR}"/go
|
||||
case ${PV} in
|
||||
*_beta*|*_rc*) ;;
|
||||
*)
|
||||
KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="https://golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
|
||||
BDEPEND="|| (
|
||||
dev-lang/go
|
||||
dev-lang/go-bootstrap )"
|
||||
RDEPEND="!<dev-go/go-tools-0_pre20150902"
|
||||
|
||||
# Do not complain about CFLAGS, etc, since Go doesn't use them.
|
||||
QA_FLAGS_IGNORED='.*'
|
||||
|
||||
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
|
||||
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
|
||||
|
||||
# Do not strip this package. Stripping is unsupported upstream and may
|
||||
# fail.
|
||||
RESTRICT+=" strip"
|
||||
|
||||
DOCS=(
|
||||
AUTHORS
|
||||
CONTRIBUTING.md
|
||||
CONTRIBUTORS
|
||||
PATENTS
|
||||
README.md
|
||||
)
|
||||
|
||||
go_arch()
|
||||
{
|
||||
# By chance most portage arch names match Go
|
||||
local portage_arch=$(tc-arch $@)
|
||||
case "${portage_arch}" in
|
||||
x86) echo 386;;
|
||||
x64-*) echo amd64;;
|
||||
ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
|
||||
s390) echo s390x ;;
|
||||
*) echo "${portage_arch}";;
|
||||
esac
|
||||
}
|
||||
|
||||
go_arm()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
armv5*) echo 5;;
|
||||
armv6*) echo 6;;
|
||||
armv7*) echo 7;;
|
||||
*)
|
||||
die "unknown GOARM for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_os()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
*-linux*) echo linux;;
|
||||
*-darwin*) echo darwin;;
|
||||
*-freebsd*) echo freebsd;;
|
||||
*-netbsd*) echo netbsd;;
|
||||
*-openbsd*) echo openbsd;;
|
||||
*-solaris*) echo solaris;;
|
||||
*-cygwin*|*-interix*|*-winnt*)
|
||||
echo windows
|
||||
;;
|
||||
*)
|
||||
die "unknown GOOS for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_tuple()
|
||||
{
|
||||
echo "$(go_os $@)_$(go_arch $@)"
|
||||
}
|
||||
|
||||
go_cross_compile()
|
||||
{
|
||||
[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
if has_version -b dev-lang/go; then
|
||||
export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
|
||||
elif has_version -b dev-lang/go-bootstrap; then
|
||||
export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
|
||||
else
|
||||
eerror "Go cannot be built without go or go-bootstrap installed"
|
||||
die "Should not be here, please report a bug"
|
||||
fi
|
||||
|
||||
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
|
||||
# Go's build script does not use BUILD/HOST/TARGET consistently. :(
|
||||
export GOHOSTARCH=$(go_arch ${CBUILD})
|
||||
export GOHOSTOS=$(go_os ${CBUILD})
|
||||
export CC=$(tc-getBUILD_CC)
|
||||
|
||||
export GOARCH=$(go_arch)
|
||||
export GOOS=$(go_os)
|
||||
export CC_FOR_TARGET=$(tc-getCC)
|
||||
export CXX_FOR_TARGET=$(tc-getCXX)
|
||||
if [[ ${ARCH} == arm ]]; then
|
||||
export GOARM=$(go_arm)
|
||||
fi
|
||||
|
||||
cd src
|
||||
bash -x ./make.bash || die "build failed"
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
go_cross_compile && return 0
|
||||
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash -no-rebuild || die "tests failed"
|
||||
cd ..
|
||||
rm -fr pkg/*_race || die
|
||||
rm -fr pkg/obj/go-build || die
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
local bin_path f x
|
||||
|
||||
dodir /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] https://golang.org/issue/2775
|
||||
#
|
||||
# deliberately use cp to retain permissions
|
||||
cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
|
||||
# testdata directories are not needed on the installed system
|
||||
rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
|
||||
if go_cross_compile; then
|
||||
bin_path="bin/$(go_tuple)"
|
||||
else
|
||||
bin_path=bin
|
||||
fi
|
||||
for x in ${bin_path}/*; do
|
||||
f=${x##*/}
|
||||
dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
|
||||
done
|
||||
einstalldocs
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# fix install_name for test object (binutils_test) on Darwin, it
|
||||
# is never used in real circumstances
|
||||
local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
|
||||
libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
|
||||
install_name_tool -id "${libmac64}" "${D}${libmac64}"
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
--- a/input-pad/Makefile.am
|
||||
+++ b/input-pad/Makefile.am
|
||||
@@ -226,19 +226,15 @@
|
||||
endif
|
||||
|
||||
man_one_in_files = input-pad.1.in
|
||||
-man_one_files = $(man_one_in_files:.1.in=.1)
|
||||
-man_one_DATA =$(man_one_files:.1=.1.gz)
|
||||
+man_one_DATA = $(man_one_in_files:.1.in=.1)
|
||||
man_onedir = $(mandir)/man1
|
||||
%.1: %.1.in
|
||||
$(AM_V_GEN) sed \
|
||||
-e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
-%.1.gz: %.1
|
||||
- $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
CLEANFILES += \
|
||||
$(BUILT_SOURCES) \
|
||||
- $(man_one_files) \
|
||||
$(man_one_DATA) \
|
||||
$(NULL)
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 7d01859ef16e6b65bc023ad8bebfedecb088bf81 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Zverovich <viz@fb.com>
|
||||
Date: Wed, 8 Apr 2020 12:32:34 -0700
|
||||
Subject: [PATCH] Fix handling of unsigned char strings in printf
|
||||
|
||||
---
|
||||
include/fmt/core.h | 8 ++++++++
|
||||
test/printf-test.cc | 6 ++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/include/fmt/core.h b/include/fmt/core.h
|
||||
index 6df2875ac..dc10722bf 100644
|
||||
--- a/include/fmt/core.h
|
||||
+++ b/include/fmt/core.h
|
||||
@@ -972,6 +972,14 @@ template <typename Context> struct arg_mapper {
|
||||
static_assert(std::is_same<char_type, char>::value, "invalid string type");
|
||||
return reinterpret_cast<const char*>(val);
|
||||
}
|
||||
+ FMT_CONSTEXPR const char* map(signed char* val) {
|
||||
+ const auto* const_val = val;
|
||||
+ return map(const_val);
|
||||
+ }
|
||||
+ FMT_CONSTEXPR const char* map(unsigned char* val) {
|
||||
+ const auto* const_val = val;
|
||||
+ return map(const_val);
|
||||
+ }
|
||||
|
||||
FMT_CONSTEXPR const void* map(void* val) { return val; }
|
||||
FMT_CONSTEXPR const void* map(const void* val) { return val; }
|
||||
diff --git a/test/printf-test.cc b/test/printf-test.cc
|
||||
index 5aaa27b13..545e02aab 100644
|
||||
--- a/test/printf-test.cc
|
||||
+++ b/test/printf-test.cc
|
||||
@@ -447,6 +447,12 @@ TEST(PrintfTest, String) {
|
||||
EXPECT_PRINTF(L" (null)", L"%10s", null_wstr);
|
||||
}
|
||||
|
||||
+TEST(PrintfTest, UCharString) {
|
||||
+ unsigned char str[] = "test";
|
||||
+ unsigned char* pstr = str;
|
||||
+ EXPECT_EQ("test", fmt::sprintf("%s", pstr));
|
||||
+}
|
||||
+
|
||||
TEST(PrintfTest, Pointer) {
|
||||
int n;
|
||||
void* p = &n;
|
@ -1,55 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby24 ruby25 ruby26 ruby27"
|
||||
inherit autotools flag-o-matic multilib-minimal ruby-single
|
||||
|
||||
DESCRIPTION="Alternative to vendor specific OpenCL ICD loaders"
|
||||
HOMEPAGE="https://github.com/OCL-dev/ocl-icd"
|
||||
SRC_URI="https://github.com/OCL-dev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="+khronos-headers"
|
||||
|
||||
BDEPEND="${RUBY_DEPS}"
|
||||
RDEPEND="app-eselect/eselect-opencl
|
||||
!dev-libs/opencl-icd-loader"
|
||||
|
||||
PATCHES=("${FILESDIR}"/${P}-gcc-10.patch)
|
||||
|
||||
src_prepare() {
|
||||
replace-flags -Os -O2 # bug 646122
|
||||
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE="${S}" econf --enable-pthread-once
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
default
|
||||
|
||||
# Drop .la files
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
|
||||
OCL_DIR="/usr/$(get_libdir)/OpenCL/vendors/ocl-icd"
|
||||
dodir ${OCL_DIR}/{,include}
|
||||
|
||||
# Install vendor library
|
||||
mv -f "${ED}/usr/$(get_libdir)"/libOpenCL* "${ED}${OCL_DIR}" || die "Can't install vendor library"
|
||||
|
||||
# Install vendor headers
|
||||
if use khronos-headers; then
|
||||
cp -r "${S}/khronos-headers/CL" "${ED}${OCL_DIR}/include" || die "Can't install vendor headers"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect opencl set --use-old ${PN}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
inherit autotools flag-o-matic multilib-minimal ruby-single
|
||||
|
||||
DESCRIPTION="Alternative to vendor specific OpenCL ICD loaders"
|
||||
HOMEPAGE="https://github.com/OCL-dev/ocl-icd"
|
||||
SRC_URI="https://github.com/OCL-dev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
IUSE="+khronos-headers"
|
||||
|
||||
DEPEND="${RUBY_DEPS}"
|
||||
RDEPEND="app-eselect/eselect-opencl"
|
||||
|
||||
src_prepare() {
|
||||
replace-flags -Os -O2 # bug 646122
|
||||
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE="${S}" econf --enable-pthread-once
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
default
|
||||
|
||||
# Drop .la files
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
|
||||
OCL_DIR="/usr/$(get_libdir)/OpenCL/vendors/ocl-icd"
|
||||
dodir ${OCL_DIR}/{,include}
|
||||
|
||||
# Install vendor library
|
||||
mv -f "${ED}/usr/$(get_libdir)"/libOpenCL* "${ED}${OCL_DIR}" || die "Can't install vendor library"
|
||||
|
||||
# Install vendor headers
|
||||
if use khronos-headers; then
|
||||
cp -r "${S}/khronos-headers/CL" "${ED}${OCL_DIR}/include" || die "Can't install vendor headers"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect opencl set --use-old ${PN}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST awscli-1.18.117.tar.gz 1846974 BLAKE2B 7da993763f9e3082cf66a39c474e857885b33a6fe4ad136faaa1589e2c7ffc59daf6628f01dff867e8f2e92b0feb2881fab0ec45128b6ebed327454f3884679b SHA512 96e8ef0b217e1fcfb2e6995aecea81501c35ce8d050e82f77d58c5d68e4bd4ed0b0aff9dd91f7b69aac2c6d455d85188e1f855e685b05fc60c9f79630eb7c87d
|
||||
DIST awscli-1.18.70.tar.gz 1758807 BLAKE2B 493bb9193ebf3f01e8088c4928036ef806d2a2802b3de6bfc7ca7c2f17d655a367601876be939e89fa7c28b4a7f5a5b6c9286707d3ddd1f7339cfcc35e2f85de SHA512 f81f7077299291a80a2965da91f2f09ca40918bc12faa3312030f5783df73503d61da9765bef4b17b71b318a71f8808dda9ede0aa276c4f055b2d5a69e299c1a
|
||||
|
@ -0,0 +1,56 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="https://pypi.org/project/awscli/"
|
||||
#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="test"
|
||||
|
||||
# requires network access
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-1.16.20[${PYTHON_USEDEP}]
|
||||
<dev-python/colorama-0.4.4[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.3.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pyyaml-5.4.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
S="${WORKDIR}/aws-cli-${PV}"
|
||||
|
||||
python_test() {
|
||||
nosetests -vv || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp bin/aws_bash_completer aws
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins bin/aws_zsh_completer.sh _aws
|
||||
|
||||
distutils-r1_python_install_all
|
||||
|
||||
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{6..9} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Low-level, data-driven core of boto 3"
|
||||
HOMEPAGE="https://github.com/boto/botocore"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
if [[ "${PV}" == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/boto/botocore"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
|
||||
fi
|
||||
|
||||
RDEPEND="
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/jmespath[${PYTHON_USEDEP}]
|
||||
dev-python/python-dateutil[${PYTHON_USEDEP}]
|
||||
dev-python/urllib3[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/jsonschema[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch"
|
||||
"${FILESDIR}/botocore-1.16.7-unlock-deps.patch"
|
||||
)
|
||||
|
||||
distutils_enable_sphinx docs/source \
|
||||
'dev-python/guzzle_sphinx_theme'
|
||||
distutils_enable_tests nose
|
||||
|
||||
src_prepare() {
|
||||
# py3.9
|
||||
find -name '*.py' -exec \
|
||||
sed -i -e 's:cElementTree:ElementTree:' {} + || die
|
||||
# very unstable
|
||||
sed -i -e 's:test_stress_test_token_bucket:_&:' \
|
||||
tests/functional/retries/test_bucket.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# note: suites need to be run separately as one of the unit tests
|
||||
# seems to be leaking mocks and breaking a few functional tests
|
||||
nosetests -v tests/unit ||
|
||||
die "unit tests failed under ${EPYTHON}"
|
||||
nosetests -v tests/functional ||
|
||||
die "functional tests failed under ${EPYTHON}"
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{6..9} )
|
||||
|
||||
inherit distutils-r1 virtualx
|
||||
|
||||
DESCRIPTION="Extra features for standard library's cmd module"
|
||||
HOMEPAGE="https://github.com/python-cmd2/cmd2"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/attrs[${PYTHON_USEDEP}]
|
||||
>=dev-python/colorama-0.3.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyperclip-1.6[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/wcwidth[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/importlib_metadata-1.6.0[${PYTHON_USEDEP}]
|
||||
' python3_{6,7})
|
||||
"
|
||||
BDEPEND="
|
||||
dev-python/setuptools_scm[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/pytest-mock[${PYTHON_USEDEP}] )
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's:test_which_editor_good:_&:' tests/test_cmd2.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# tests rely on very specific text wrapping...
|
||||
local -x COLUMNS=80
|
||||
virtx distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
pytest -vv || die "Tests failed with ${EPYTHON}"
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST docker-py-4.2.1.tar.gz 234562 BLAKE2B 4b554199f3675340602be27395e0194e827ad81dab48500bca0d4858c699e79ac5108f46eae09c3ac6ae1b580498fd5c78f026ecfd8549b938bb5c6e6cccbd94 SHA512 46ab02d4c247d41efa0ca75d3e13f8aef2d3fe4e6d8624c5a98a728f16c58d0dd8de742be710dc2b2f616dc2cc14a7a8796899e94a4b71a00554baeab105330f
|
||||
DIST docker-py-4.2.2.tar.gz 234729 BLAKE2B 06ebe27582ab6a8a61fdf655d01b01495724e03178c2b8291d38425f2678a3d1f826a836a5926ccf65b07c232fba38251cf8f0b1c644334d1b7611adb9d49e84 SHA512 d81f5a6d1cc15dd6d65e65c9e4f24fcae172ce41c8244e13c99adaad8627c9f0eece923d66108951b5e9aaa134e668f317481684b3c2bd51802321d1c4adbab1
|
||||
DIST docker-py-4.3.0.tar.gz 236399 BLAKE2B fd9cb6426697a105f58c1199809adb009943761fc17a9b1c0a0c091d0950faf15d6e097aeddc7012b4d39770a66fcdcde73de6874a081e2a2172acd6b5c6e816 SHA512 c790563c6a3a5042f5a0d602c22b2b2838ad6f54df3bc1691e32da06336d6b651d7560ca77677ae1cb3f4d4aab721f98984e0479f7fed25deafceb1dc1c24a7c
|
||||
|
@ -0,0 +1,45 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{6..9} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python client for Docker"
|
||||
HOMEPAGE="https://github.com/docker/docker-py"
|
||||
SRC_URI="https://github.com/docker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
!~dev-python/requests-2.18.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.14.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/six-1.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="
|
||||
test? (
|
||||
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/paramiko-2.4.2[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_sphinx docs \
|
||||
'dev-python/recommonmark' \
|
||||
'>=dev-python/sphinx-1.4.6'
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# localhost has a better chance of being in /etc/hosts
|
||||
sed -e 's:socket[.]gethostname():"localhost":' \
|
||||
-i tests/unit/api_test.py || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
pytest -vv tests/unit/ || die "tests failed under ${EPYTHON}"
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST hcloud-python-1.8.1.tar.gz 87532 BLAKE2B d5e2b5d2aef96508042189d650ef0c6793ca8747a99f20c591c63dbeed497576ef6cf268f75cdc5551b9b3469f1087d5d2ad167af77a93ab321cc9c70d1bb65b SHA512 e26976abe77149db53ea8a35e53de85e0acc3b2021ecbfb1a3a634230d2324e2fb212f54cfcb7a96993b4776d305a247b29aa883053958db881a794f431858bd
|
||||
DIST hcloud-python-1.8.2.tar.gz 87560 BLAKE2B 836b0422364e50567cfa31e1a77e0b4a28da4419a0991f1635d6d0366368315ae914d238fab974fb1ba2c5e09172e3edfc625d40c6c099d757fa1c7913dba68b SHA512 8436b57e9a0e5b8fb44f9242c9862835a5e027ee2d774e3dd1b55834f5a574c4f21a543ac9c7d0a105048bd184e7278a3bb4f94a7ee5e18bfb419f0ca59183eb
|
||||
DIST hcloud-python-1.9.0.tar.gz 88885 BLAKE2B 455f955caddd8e72d02df57da2e08f395b9845f9658b73dd9f96b1fd73d7793fa13319d8365903599c000a803c9374dee7b50c5ad2a9ba449027d3dc602601fe SHA512 6da2a3eb7e4a4d7f13137167199f01f370210e6c139f0cd8a8e447ea3f14101d4b37b104ed387b1713ad62351ae72c8add7970e878571caa4242e6e347ef8833
|
||||
|
@ -0,0 +1,55 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Official Hetzner Cloud python library"
|
||||
HOMEPAGE="https://github.com/hetznercloud/hcloud-python"
|
||||
SRC_URI="https://github.com/hetznercloud/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="doc examples"
|
||||
|
||||
COMMON_DEPEND=">=dev-python/python-dateutil-2.7.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.20[${PYTHON_USEDEP}]"
|
||||
|
||||
BDEPEND="${COMMON_DEPEND}
|
||||
doc? (
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx_rtd_theme
|
||||
)
|
||||
test? (
|
||||
dev-python/flake8[${PYTHON_USEDEP}]
|
||||
dev-python/isort[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/tox[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
>=dev-python/future-0.17.1[${PYTHON_USEDEP}]"
|
||||
|
||||
python_compile_all() {
|
||||
use doc && emake -C docs html
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use examples && dodoc -r examples
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_test() {
|
||||
# Integration tests need docker:
|
||||
# https://github.com/hetznercloud/hcloud-python/blob/master/.travis.yml#L16
|
||||
rm -fr tests/integration
|
||||
default
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ago@gentoo.org</email>
|
||||
<name>Agostino Sarubbo</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>ago@gentoo.org</email>
|
||||
<name>Agostino Sarubbo</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">hetznercloud/hcloud-python</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -0,0 +1,56 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
|
||||
PYTHON_REQ_USE="threads(+),sqlite"
|
||||
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="A library for property based testing"
|
||||
HOMEPAGE="https://github.com/HypothesisWorks/hypothesis https://pypi.org/project/hypothesis/"
|
||||
SRC_URI="https://github.com/HypothesisWorks/${PN}/archive/${PN}-python-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${PN}-python-${PV}/${PN}-python"
|
||||
|
||||
LICENSE="MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/attrs-19.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/sortedcontainers-2.1.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-5.3.5[${PYTHON_USEDEP}]
|
||||
!!<dev-python/typing-3.7.4.1
|
||||
)
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
# avoid pytest-xdist dep for one test
|
||||
sed -i -e 's:test_prints_statistics_given_option_under_xdist:_&:' \
|
||||
tests/pytest/test_statistics.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_test() {
|
||||
pytest -vv tests/cover tests/pytest tests/quality ||
|
||||
die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "datetime support" dev-python/pytz
|
||||
optfeature "dateutil support" dev-python/python-dateutil
|
||||
optfeature "numpy support" dev-python/numpy
|
||||
optfeature "django support" dev-python/django dev-python/pytz
|
||||
optfeature "pandas support" dev-python/pandas
|
||||
optfeature "pytest support" dev-python/pytest
|
||||
}
|
@ -0,0 +1 @@
|
||||
DIST osrf_pycommon-0.1.10.tar.gz 46303 BLAKE2B 3f18b8683a6363e1f15addfe75b8dee31f64fff7c286379d18355dc1f3467063c2cf1a9eb7978c5f9de5d64cb23d18a3922a416fe24fafa618f50f0ba89cddfe SHA512 5d53ea0c3c410a99964330dc22dcbcb3cd8892a359fee2061acc15ddb46e334ff757e8aa5b776fef381246c58e9834003ac818624da4b8e95552f214f3d9e6bb
|
@ -0,0 +1,23 @@
|
||||
From 515fd938513b8e458ce5fb3c937c100a3bc87745 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Lalancette <clalancette@openrobotics.org>
|
||||
Date: Fri, 19 Jun 2020 17:48:05 -0400
|
||||
Subject: [PATCH] Fix the __str__ method for windows terminal_color. (#65)
|
||||
|
||||
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
|
||||
---
|
||||
osrf_pycommon/terminal_color/windows.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/osrf_pycommon/terminal_color/windows.py b/osrf_pycommon/terminal_color/windows.py
|
||||
index f0f6120..21f5e8f 100644
|
||||
--- a/osrf_pycommon/terminal_color/windows.py
|
||||
+++ b/osrf_pycommon/terminal_color/windows.py
|
||||
@@ -224,7 +224,7 @@ class CONSOLE_SCREEN_BUFFER_INFO(ctypes.Structure):
|
||||
|
||||
def __str__(self):
|
||||
return (
|
||||
- '({0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0})'
|
||||
+ '({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10})'
|
||||
.format(
|
||||
self.dwSize.Y, self.dwSize.X,
|
||||
self.dwCursorPosition.Y, self.dwCursorPosition.X,
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>ros@gentoo.org</email>
|
||||
<name>Gentoo ROS Project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">osrf/osrf_pycommon</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -0,0 +1,24 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python{3_7,3_8} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Commonly needed Python modules used by Python software developed at OSRF"
|
||||
HOMEPAGE="https://github.com/osrf/osrf_pycommon"
|
||||
SRC_URI="https://github.com/osrf/osrf_pycommon/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
RESTRICT=""
|
||||
|
||||
DEPEND="dev-python/mock[${PYTHON_USEDEP}]"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
PATCHES=( "${FILESDIR}/str.patch" )
|
||||
|
||||
distutils_enable_tests pytest
|
@ -1,2 +1,3 @@
|
||||
DIST prompt_toolkit-2.0.10.tar.gz 347981 BLAKE2B b95cf000d5249da3710f9b51f72d41c3d552f1d3a35dea5493f565f0f62998d890bf2b81b3376140a4d16a19f2c5fd60eb0cb5f2f58180c176ef1543c6fc4ec2 SHA512 b91292cf43607b3a7018ca29827f0aa9bc90efc064c68faffe02ad28e4bb60f45fc2d25bbfd9a40a383a815cb08596975f08237a498f94a5c088d56d3a0a9803
|
||||
DIST prompt_toolkit-3.0.5.tar.gz 2999763 BLAKE2B 6c4c32583a363daf562d4fa29f697c3d38db1b84130f26167cae52ae90f5b34111a9785ed569d3bdb4c185271ef1a075144d1c53b46184c136e5f1af4713ecce SHA512 fe6cfc7223529b77bdfa34dbebc8f5690ac6a1d0082cbf3f03f49598408bcff082697df1bd7ee427c796fe0c8d73126a965269e77ed0e6f1519b338b464995a7
|
||||
DIST prompt_toolkit-3.0.6.tar.gz 369730 BLAKE2B 84f5f578a6ae5b8dbbf0ca244a2d3dcb9ecc858ffce3ca5e657f85705c9090d32abbdddcadbb8e139d980d87f279d998db874551be93c47b4a740cc3d2e99c5b SHA512 44c47f8f331b7fca3fb9449cbb9ad6b2703fa83bff30274cabfd888c1d149b1f2305f3a08cf53143c86d9889096775e776272ee56aeb1f3664a8399a4eecae08
|
||||
|
@ -0,0 +1,22 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{6..9} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Building powerful interactive command lines in Python"
|
||||
HOMEPAGE="https://pypi.org/project/prompt_toolkit/ https://github.com/prompt-toolkit/python-prompt-toolkit"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/six-1.9.0[${PYTHON_USEDEP}]
|
||||
dev-python/wcwidth[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
@ -1 +1,2 @@
|
||||
DIST pymysql-0.10.0.tar.gz 86137 BLAKE2B bcd4746d3e3947c2598b875d46678984beedfa0d9161a1aefb1f7f4b5314e084f5292206435b0a2621fb100744194fd1e2963228e37b41c289c5c4021f475371 SHA512 7d322c526634380cf4d3216f666a7d1f38e120390aab525cb8806bcea3f2fd7eab82e744a0be7270eae47ab1f79be5b5f7409e7e5dc9aaabf1e3c0c8853f578f
|
||||
DIST pymysql-0.9.3.tar.gz 86715 BLAKE2B 0ed09f7f5c47bd1fae52dd9d0ff0790367962d8e4b89d3933704b8b8d838e1f48b68455a9a3916318bf3c1c1f102fa11b4e1e3401d021f8a2d6137612a4affb9 SHA512 d906b7a6612d91db7d4f7f2d85a9375477e6655c568e0d1e7281ad0263d4a78f0ac4e80263605723f99e12db04c80f51c5c8ed79ed6f209a7afeb4b45bf40648
|
||||
|
@ -0,0 +1,22 @@
|
||||
From 3e71dd32e8ce868b090c282759eebdeabc960f58 Mon Sep 17 00:00:00 2001
|
||||
From: Inada Naoki <songofacandy@gmail.com>
|
||||
Date: Tue, 28 Jul 2020 13:06:07 +0900
|
||||
Subject: [PATCH] Add missing import (#879)
|
||||
|
||||
Fixes #878
|
||||
---
|
||||
pymysql/converters.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/pymysql/converters.py b/pymysql/converters.py
|
||||
index b084ed2f..1b582904 100644
|
||||
--- a/pymysql/converters.py
|
||||
+++ b/pymysql/converters.py
|
||||
@@ -5,6 +5,7 @@
|
||||
import re
|
||||
import time
|
||||
|
||||
+from .err import ProgrammingError
|
||||
from .constants import FIELD_TYPE
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
--- a/pymysql/tests/test_connection.py
|
||||
+++ b/pymysql/tests/test_connection.py
|
||||
@@ -70,6 +70,9 @@ class TestAuthentication(base.PyMySQLTestCase):
|
||||
for r in cur:
|
||||
if (r[1], r[2]) != (u'ACTIVE', u'AUTHENTICATION'):
|
||||
continue
|
||||
+ if r[0] == u'unix_socket':
|
||||
+ socket_plugin_name = r[0]
|
||||
+ socket_found = True
|
||||
if r[3] == u'auth_socket.so':
|
||||
socket_plugin_name = r[0]
|
||||
socket_found = True
|
||||
@@ -188,7 +191,7 @@ class TestAuthentication(base.PyMySQLTestCase):
|
||||
cur.execute("install plugin two_questions soname 'dialog_examples.so'")
|
||||
TestAuthentication.two_questions_found = True
|
||||
self.realTestDialogAuthTwoQuestions()
|
||||
- except pymysql.err.InternalError:
|
||||
+ except pymysql.err.OperationalError:
|
||||
pytest.skip('we couldn\'t install the two_questions plugin')
|
||||
finally:
|
||||
if TestAuthentication.two_questions_found:
|
||||
@@ -218,7 +221,7 @@ class TestAuthentication(base.PyMySQLTestCase):
|
||||
cur.execute("install plugin three_attempts soname 'dialog_examples.so'")
|
||||
TestAuthentication.three_attempts_found = True
|
||||
self.realTestDialogAuthThreeAttempts()
|
||||
- except pymysql.err.InternalError:
|
||||
+ except pymysql.err.OperationalError:
|
||||
pytest.skip('we couldn\'t install the three_attempts plugin')
|
||||
finally:
|
||||
if TestAuthentication.three_attempts_found:
|
@ -0,0 +1,139 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6..9} pypy3 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PN="PyMySQL"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="Pure-Python MySQL Driver"
|
||||
HOMEPAGE="https://github.com/PyMySQL/PyMySQL"
|
||||
SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# TODO: support other mysql variants
|
||||
BDEPEND="
|
||||
test? ( dev-db/mariadb[server] )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.10.0-fix-tests.patch
|
||||
"${FILESDIR}"/${PN}-0.10.0-add-missing-import.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
find -name '*.py' -exec sed -i -e 's:unittest2:unittest:' {} + || die
|
||||
|
||||
# Auth tests don't support socket auth
|
||||
find tests/ -name '*_auth.py' -delete || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -z "${USER}" ]] ; then
|
||||
# Tests require system user
|
||||
local -x USER="$(whoami)"
|
||||
einfo "USER set to '${USER}'"
|
||||
fi
|
||||
|
||||
local PIDFILE="${T}/mysqld.pid"
|
||||
if pkill -0 -F "${PIDFILE}" &>/dev/null ; then
|
||||
einfo "Killing already running mysqld process ..."
|
||||
pkill -F "${PIDFILE}"
|
||||
fi
|
||||
|
||||
if [[ -d "${T}/mysql" ]] ; then
|
||||
einfo "Removing already existing mysqld data dir ..."
|
||||
rm -rf "${T}/mysql" || die
|
||||
fi
|
||||
|
||||
einfo "Creating mysql test instance ..."
|
||||
mkdir -p "${T}"/mysql || die
|
||||
"${BROOT}"/usr/share/mariadb/scripts/mysql_install_db \
|
||||
--no-defaults \
|
||||
--auth-root-authentication-method=normal \
|
||||
--basedir="${BROOT}/usr" \
|
||||
--datadir="${T}"/mysql 1>"${T}"/mysqld_install.log \
|
||||
|| die
|
||||
|
||||
einfo "Starting mysql test instance ..."
|
||||
# TODO: random port
|
||||
mysqld \
|
||||
--no-defaults \
|
||||
--character-set-server=utf8 \
|
||||
--bind-address=127.0.0.1 \
|
||||
--port=43306 \
|
||||
--pid-file="${T}"/mysqld.pid \
|
||||
--socket="${T}"/mysqld.sock \
|
||||
--datadir="${T}"/mysql 1>"${T}"/mysqld.log 2>&1 &
|
||||
|
||||
# wait for it to start
|
||||
local i
|
||||
for (( i = 0; i < 10; i++)); do
|
||||
[[ -S ${T}/mysqld.sock ]] && break
|
||||
sleep 1
|
||||
done
|
||||
[[ -S ${T}/mysqld.sock ]] || die "mysqld failed to start"
|
||||
|
||||
einfo "Preparing test mysql instance ..."
|
||||
|
||||
# create test user for auth tests
|
||||
mysql -uroot --socket="${T}"/mysqld.sock -s -e '
|
||||
INSTALL SONAME "auth_ed25519";
|
||||
CREATE FUNCTION ed25519_password RETURNS STRING SONAME "auth_ed25519.so";
|
||||
' || die "Failed to set up auth_ed25519"
|
||||
|
||||
mysql -uroot --socket="${T}"/mysqld.sock -s -e "
|
||||
SELECT CONCAT('CREATE USER nopass_ed25519 IDENTIFIED VIA ed25519 USING \"',ed25519_password(\"\"),'\";');
|
||||
SELECT CONCAT('CREATE USER user_ed25519 IDENTIFIED VIA ed25519 USING \"',ed25519_password(\"pass_ed25519\"),'\";');
|
||||
" || die "Failed to create ed25519 test users"
|
||||
|
||||
# create test databases
|
||||
mysql -uroot --socket="${T}"/mysqld.sock -s -e '
|
||||
create database test1 DEFAULT CHARACTER SET utf8mb4;
|
||||
create database test2 DEFAULT CHARACTER SET utf8mb4;
|
||||
|
||||
create user test2 identified by "some password";
|
||||
grant all on test2.* to test2;
|
||||
|
||||
create user test2@localhost identified by "some password";
|
||||
grant all on test2.* to test2@localhost;
|
||||
' || die "Failed to create test databases"
|
||||
|
||||
cat > pymysql/tests/databases.json <<-EOF || die
|
||||
[{
|
||||
"host": "localhost",
|
||||
"user": "root",
|
||||
"passwd": "",
|
||||
"db": "test1",
|
||||
"use_unicode": true,
|
||||
"local_infile": true,
|
||||
"unix_socket": "${T}/mysqld.sock"
|
||||
}, {
|
||||
"host": "localhost",
|
||||
"user": "root",
|
||||
"passwd": "",
|
||||
"db": "test2",
|
||||
"unix_socket": "${T}/mysqld.sock"
|
||||
}]
|
||||
EOF
|
||||
|
||||
distutils-r1_src_test
|
||||
|
||||
if pkill -0 -F "${PIDFILE}" &>/dev/null ; then
|
||||
einfo "Stopping mysql test instance ..."
|
||||
pkill -F "${PIDFILE}"
|
||||
fi
|
||||
}
|
||||
|
||||
distutils_enable_tests pytest
|
@ -1 +1,2 @@
|
||||
DIST responses-0.10.15.tar.gz 25350 BLAKE2B 6d9dff99e2dc18b7361cb2b75f0438c62ab771364b1a572823cf1fb0cdb6175fee8c4cd372ac5d1b27ef31b88e66dd7d1410429213af240f6f743f0c85e36d1b SHA512 513df58b40968e271cfb429ee09ab2ca7c3cf2f6ebe3607276ed1b949670871f8d6993449cfd5871bfd119cda0c0628dce6ebe8ed40595696e550541413f12b0
|
||||
DIST responses-0.10.16.tar.gz 25420 BLAKE2B a71402d30a30be18a445f2377498760fb00c5ed1fe0f61503675b4d0730bfd305711a0d56dd972a7c1cb439c3202819570eee81b6214fa723725d584f96905db SHA512 ec6738d3f7a33f7e3fbc95b1aaa5a10aa038dcbd8c9fdc4dc0ffc263e0cd613e6f2ce8e2fc2b59c91a30dec9677219fbb2630ec4d5d8d4340526fe72e24bd89f
|
||||
|
@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{6..9} pypy3 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Utility for mocking out the Python Requests library"
|
||||
HOMEPAGE="https://github.com/getsentry/responses"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/requests-2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/urllib3-1.25.10[${PYTHON_USEDEP}]
|
||||
dev-python/cookies[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
dev-python/pytest-localserver[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
@ -0,0 +1,95 @@
|
||||
diff -Nur rsa-3.4.2.orig/rsa/pkcs1.py rsa-3.4.2/rsa/pkcs1.py
|
||||
--- rsa-3.4.2.orig/rsa/pkcs1.py 2020-07-05 10:28:57.622204136 +0200
|
||||
+++ rsa-3.4.2/rsa/pkcs1.py 2020-07-05 10:30:28.103672033 +0200
|
||||
@@ -232,6 +232,12 @@
|
||||
decrypted = priv_key.blinded_decrypt(encrypted)
|
||||
cleartext = transform.int2bytes(decrypted, blocksize)
|
||||
|
||||
+ # Detect leading zeroes in the crypto. These are not reflected in the
|
||||
+ # encrypted value (as leading zeroes do not influence the value of an
|
||||
+ # integer). This fixes CVE-2020-13757.
|
||||
+ if len(crypto) > blocksize:
|
||||
+ raise DecryptionError('Decryption failed')
|
||||
+
|
||||
# If we can't find the cleartext marker, decryption failed.
|
||||
if cleartext[0:2] != b('\x00\x02'):
|
||||
raise DecryptionError('Decryption failed')
|
||||
@@ -310,6 +316,9 @@
|
||||
cleartext = HASH_ASN1[method_name] + message_hash
|
||||
expected = _pad_for_signing(cleartext, keylength)
|
||||
|
||||
+ if len(signature) != keylength:
|
||||
+ raise VerificationError('Verification failed')
|
||||
+
|
||||
# Compare with the signed one
|
||||
if expected != clearsig:
|
||||
raise VerificationError('Verification failed')
|
||||
diff -Nur rsa-3.4.2.orig/tests/test_pkcs1.py rsa-3.4.2/tests/test_pkcs1.py
|
||||
--- rsa-3.4.2.orig/tests/test_pkcs1.py 2020-07-05 10:28:57.621204131 +0200
|
||||
+++ rsa-3.4.2/tests/test_pkcs1.py 2020-07-05 10:32:26.858286153 +0200
|
||||
@@ -17,6 +17,7 @@
|
||||
"""Tests string operations."""
|
||||
|
||||
import struct
|
||||
+import sys
|
||||
import unittest
|
||||
|
||||
import rsa
|
||||
@@ -64,6 +65,35 @@
|
||||
|
||||
self.assertNotEqual(encrypted1, encrypted2)
|
||||
|
||||
+class ExtraZeroesTest(unittest.TestCase):
|
||||
+ def setUp(self):
|
||||
+ # Key, cyphertext, and plaintext taken from https://github.com/sybrenstuvel/python-rsa/issues/146
|
||||
+ self.private_key = rsa.PrivateKey.load_pkcs1(
|
||||
+ "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAs1EKK81M5kTFtZSuUFnhKy8FS2WNXaWVmi/fGHG4CLw98+Yo\n0nkuUarVwSS0O9pFPcpc3kvPKOe9Tv+6DLS3Qru21aATy2PRqjqJ4CYn71OYtSwM\n/ZfSCKvrjXybzgu+sBmobdtYm+sppbdL+GEHXGd8gdQw8DDCZSR6+dPJFAzLZTCd\nB+Ctwe/RXPF+ewVdfaOGjkZIzDoYDw7n+OHnsYCYozkbTOcWHpjVevipR+IBpGPi\n1rvKgFnlcG6d/tj0hWRl/6cS7RqhjoiNEtxqoJzpXs/Kg8xbCxXbCchkf11STA8u\ndiCjQWuWI8rcDwl69XMmHJjIQAqhKvOOQ8rYTQIDAQABAoIBABpQLQ7qbHtp4h1Y\nORAfcFRW7Q74UvtH/iEHH1TF8zyM6wZsYtcn4y0mxYE3Mp+J0xlTJbeVJkwZXYVH\nL3UH29CWHSlR+TWiazTwrCTRVJDhEoqbcTiRW8fb+o/jljVxMcVDrpyYUHNo2c6w\njBxhmKPtp66hhaDpds1Cwi0A8APZ8Z2W6kya/L/hRBzMgCz7Bon1nYBMak5PQEwV\nF0dF7Wy4vIjvCzO6DSqA415DvJDzUAUucgFudbANNXo4HJwNRnBpymYIh8mHdmNJ\n/MQ0YLSqUWvOB57dh7oWQwe3UsJ37ZUorTugvxh3NJ7Tt5ZqbCQBEECb9ND63gxo\n/a3YR/0CgYEA7BJc834xCi/0YmO5suBinWOQAF7IiRPU+3G9TdhWEkSYquupg9e6\nK9lC5k0iP+t6I69NYF7+6mvXDTmv6Z01o6oV50oXaHeAk74O3UqNCbLe9tybZ/+F\ndkYlwuGSNttMQBzjCiVy0+y0+Wm3rRnFIsAtd0RlZ24aN3bFTWJINIsCgYEAwnQq\nvNmJe9SwtnH5c/yCqPhKv1cF/4jdQZSGI6/p3KYNxlQzkHZ/6uvrU5V27ov6YbX8\nvKlKfO91oJFQxUD6lpTdgAStI3GMiJBJIZNpyZ9EWNSvwUj28H34cySpbZz3s4Xd\nhiJBShgy+fKURvBQwtWmQHZJ3EGrcOI7PcwiyYcCgYEAlql5jSUCY0ALtidzQogW\nJ+B87N+RGHsBuJ/0cxQYinwg+ySAAVbSyF1WZujfbO/5+YBN362A/1dn3lbswCnH\nK/bHF9+fZNqvwprPnceQj5oK1n4g6JSZNsy6GNAhosT+uwQ0misgR8SQE4W25dDG\nkdEYsz+BgCsyrCcu8J5C+tUCgYAFVPQbC4f2ikVyKzvgz0qx4WUDTBqRACq48p6e\n+eLatv7nskVbr7QgN+nS9+Uz80ihR0Ev1yCAvnwmM/XYAskcOea87OPmdeWZlQM8\nVXNwINrZ6LMNBLgorfuTBK1UoRo1pPUHCYdqxbEYI2unak18mikd2WB7Fp3h0YI4\nVpGZnwKBgBxkAYnZv+jGI4MyEKdsQgxvROXXYOJZkWzsKuKxVkVpYP2V4nR2YMOJ\nViJQ8FUEnPq35cMDlUk4SnoqrrHIJNOvcJSCqM+bWHAioAsfByLbUPM8sm3CDdIk\nXVJl32HuKYPJOMIWfc7hIfxLRHnCN+coz2M6tgqMDs0E/OfjuqVZ\n-----END RSA PRIVATE KEY-----",
|
||||
+ format='PEM')
|
||||
+ cyphertext = "4501b4d669e01b9ef2dc800aa1b06d49196f5a09fe8fbcd037323c60eaf027bfb98432be4e4a26c567ffec718bcbea977dd26812fa071c33808b4d5ebb742d9879806094b6fbeea63d25ea3141733b60e31c6912106e1b758a7fe0014f075193faa8b4622bfd5d3013f0a32190a95de61a3604711bc62945f95a6522bd4dfed0a994ef185b28c281f7b5e4c8ed41176d12d9fc1b837e6a0111d0132d08a6d6f0580de0c9eed8ed105531799482d1e466c68c23b0c222af7fc12ac279bc4ff57e7b4586d209371b38c4c1035edd418dc5f960441cb21ea2bedbfea86de0d7861e81021b650a1de51002c315f1e7c12debe4dcebf790caaa54a2f26b149cf9e77d"
|
||||
+ plaintext = "54657374"
|
||||
+
|
||||
+ if sys.version_info < (3, 0):
|
||||
+ self.cyphertext = cyphertext.decode("hex")
|
||||
+ self.plaintext = plaintext.decode('hex')
|
||||
+ else:
|
||||
+ self.cyphertext = bytes.fromhex(cyphertext)
|
||||
+ self.plaintext = bytes.fromhex(plaintext)
|
||||
+
|
||||
+ def test_unmodified(self):
|
||||
+ message = rsa.decrypt(self.cyphertext, self.private_key)
|
||||
+ self.assertEqual(message, self.plaintext)
|
||||
+
|
||||
+ def test_prepend_zeroes(self):
|
||||
+ cyphertext = b'\00\00' + self.cyphertext
|
||||
+ with self.assertRaises(rsa.DecryptionError):
|
||||
+ rsa.decrypt(cyphertext, self.private_key)
|
||||
+
|
||||
+ def test_append_zeroes(self):
|
||||
+ cyphertext = self.cyphertext + b'\00\00'
|
||||
+ with self.assertRaises(rsa.DecryptionError):
|
||||
+ rsa.decrypt(cyphertext, self.private_key)
|
||||
|
||||
class SignatureTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
@@ -105,3 +135,21 @@
|
||||
signature2 = pkcs1.sign(message, self.priv, 'SHA-1')
|
||||
|
||||
self.assertEqual(signature1, signature2)
|
||||
+
|
||||
+ def test_prepend_zeroes(self):
|
||||
+ """Prepending the signature with zeroes should be detected."""
|
||||
+
|
||||
+ message = b'je moeder'
|
||||
+ signature = pkcs1.sign(message, self.priv, 'SHA-256')
|
||||
+ signature = b'\00\00' + signature
|
||||
+ with self.assertRaises(rsa.VerificationError):
|
||||
+ pkcs1.verify(message, signature, self.pub)
|
||||
+
|
||||
+ def test_apppend_zeroes(self):
|
||||
+ """Apppending the signature with zeroes should be detected."""
|
||||
+
|
||||
+ message = b'je moeder'
|
||||
+ signature = pkcs1.sign(message, self.priv, 'SHA-256')
|
||||
+ signature = signature + b'\00\00'
|
||||
+ with self.assertRaises(rsa.VerificationError):
|
||||
+ pkcs1.verify(message, signature, self.pub)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue