7559 changed files with 30127 additions and 26000 deletions
-
BINManifest.files.gz
-
BINapp-admin/Manifest.gz
-
106app-admin/rsyslog/files/rsyslog-8.2004.0-skip-librelp-openssl-specific-tests.patch
-
2app-admin/rsyslog/rsyslog-8.2004.0.ebuild
-
3app-admin/salt/Manifest
-
58app-admin/salt/files/salt-3000.1-tests.patch
-
79app-admin/salt/files/salt-3000.2-py38-abc.patch
-
460app-admin/salt/files/salt-3000.2-py38-misc.patch
-
60app-admin/salt/files/salt-3000.2-py38.patch
-
18app-admin/salt/files/salt-3000.2-tests.patch
-
2app-admin/salt/metadata.xml
-
43app-admin/salt/salt-2019.2.4.ebuild
-
183app-admin/salt/salt-3000.2-r2.ebuild
-
BINapp-editors/Manifest.gz
-
31app-editors/atom/Manifest
-
562app-editors/atom/atom-1.32.1.ebuild
-
16app-editors/atom/files/apm-python.patch
-
16app-editors/atom/files/atom-apm-path-r2.patch
-
24app-editors/atom/files/atom-fix-app-restart-r2.patch
-
41app-editors/atom/files/atom-fix-config-watcher-r1.patch
-
11app-editors/atom/files/atom-marker-layer-r1.patch
-
25app-editors/atom/files/atom-python-r1.patch
-
39app-editors/atom/files/atom-unbundle-electron-r3.patch
-
141app-editors/atom/files/gyp-unbundle.py
-
25app-editors/atom/files/transpile-coffee-script.js
-
10app-editors/atom/metadata.xml
-
1app-editors/texworks/Manifest
-
68app-editors/texworks/texworks-0.6.4.ebuild
-
2app-editors/texworks/texworks-0.6.5.ebuild
-
BINapp-eselect/Manifest.gz
-
1app-eselect/eselect-electron/Manifest
-
24app-eselect/eselect-electron/eselect-electron-2.1.ebuild
-
8app-eselect/eselect-electron/metadata.xml
-
BINapp-metrics/Manifest.gz
-
4app-metrics/collectd/Manifest
-
2app-metrics/collectd/collectd-5.10.0.ebuild
-
27app-metrics/collectd/collectd-5.11.0.ebuild
-
536app-metrics/collectd/collectd-5.8.1-r1.ebuild
-
543app-metrics/collectd/collectd-5.9.1-r2.ebuild
-
70app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch
-
81app-metrics/collectd/files/collectd-5.9.1-fixup.patch
-
BINapp-misc/Manifest.gz
-
2app-misc/tmux/Manifest
-
2app-misc/tmux/tmux-3.1a.ebuild
-
BINapp-shells/Manifest.gz
-
1app-shells/fzf/Manifest
-
120app-shells/fzf/fzf-0.21.1.ebuild
-
BINapp-text/Manifest.gz
-
0app-text/jadetex/jadetex-3.13-r9.ebuild
-
1app-text/poppler/Manifest
-
123app-text/poppler/poppler-0.88.0.ebuild
-
2app-text/poppler/poppler-9999.ebuild
-
1app-text/sigil/Manifest
-
2app-text/sigil/metadata.xml
-
82app-text/sigil/sigil-1.2.1.ebuild
-
BINdev-db/Manifest.gz
-
1dev-db/mysql-workbench/Manifest
-
109dev-db/mysql-workbench/mysql-workbench-8.0.20.ebuild
-
BINdev-java/Manifest.gz
-
2dev-java/java-config/java-config-2.2.0-r4.ebuild
-
2dev-java/openjfx/Manifest
-
220dev-java/openjfx/openjfx-11.0.6_p2.ebuild
-
221dev-java/openjfx/openjfx-11.0.7_p0.ebuild
-
5dev-java/openjfx/openjfx-11.0.7_p1.ebuild
-
BINdev-libs/Manifest.gz
-
2dev-libs/clhpp/clhpp-2.0.11-r1.ebuild
-
30dev-libs/clhpp/clhpp-2.0.11.ebuild
-
1dev-libs/efl/Manifest
-
277dev-libs/efl/efl-1.24.0.ebuild
-
1dev-libs/gjs/Manifest
-
46dev-libs/gjs/gjs-1.64.2.ebuild
-
1dev-libs/icu-layoutex/Manifest
-
109dev-libs/icu-layoutex/icu-layoutex-67.1.ebuild
-
1dev-libs/icu/Manifest
-
141dev-libs/icu/icu-67.1.ebuild
-
2dev-libs/libxml2/libxml2-2.9.9-r2.ebuild
-
2dev-libs/libxml2/libxml2-2.9.9-r3.ebuild
-
26dev-perl/Astro-FITS-Header/Astro-FITS-Header-3.70.0-r1.ebuild
-
25dev-perl/Audio-FLAC-Header/Audio-FLAC-Header-2.400.0-r2.ebuild
-
24dev-perl/Audio-FLAC-Header/files/Audio-FLAC-Header-2.4-no-dot-inc.patch
-
52dev-perl/Audio-Mixer/Audio-Mixer-0.700.0-r3.ebuild
-
25dev-perl/Audio-Musepack/Audio-Musepack-1.0.1-r1.ebuild
-
21dev-perl/Audio-Musepack/files/Audio-Musepack-1.0.1-no-dot-inc.patch
-
4dev-perl/Audio-Scan/Audio-Scan-1.10.0.ebuild
-
21dev-perl/Audio-WMA/Audio-WMA-1.300.0-r1.ebuild
-
23dev-perl/Audio-WMA/files/Audio-WMA-1.3-no-dot-inc.patch
-
21dev-perl/Audio-Wav/Audio-Wav-0.140.0-r2.ebuild
-
21dev-perl/Authen-DigestMD5/Authen-DigestMD5-0.40.0-r2.ebuild
-
29dev-perl/Authen-Htpasswd/Authen-Htpasswd-0.171.0-r2.ebuild
-
25dev-perl/Authen-NTLM/Authen-NTLM-1.90.0-r2.ebuild
-
50dev-perl/Authen-Radius/Authen-Radius-0.310.0.ebuild
-
1dev-perl/Authen-Radius/Manifest
-
BINdev-perl/Manifest.gz
-
BINdev-php/Manifest.gz
-
1dev-php/PEAR-Mail_Mime/Manifest
-
26dev-php/PEAR-Mail_Mime/PEAR-Mail_Mime-1.10.7.ebuild
-
1dev-php/pecl-amqp/Manifest
-
24dev-php/pecl-amqp/pecl-amqp-1.10.2.ebuild
-
1dev-php/pecl-lzf/Manifest
-
19dev-php/pecl-lzf/pecl-lzf-1.6.8.ebuild
@ -0,0 +1,106 @@ |
|||
From 15f5a1bda22bc4586e7ad8d24222befd1933a822 Mon Sep 17 00:00:00 2001 |
|||
From: Andre lorbach <alorbach@adiscon.com> |
|||
Date: Wed, 29 Apr 2020 09:24:10 +0200 |
|||
Subject: [PATCH] SKIP librelp tlscmd tests if librelp was build without |
|||
openssl support |
|||
|
|||
closes https://github.com/rsyslog/rsyslog/issues/4131 |
|||
---
|
|||
tests/imrelp-tls-cfgcmd.sh | 23 ++++++++++++----------- |
|||
tests/sndrcv_relp_tls-cfgcmd.sh | 25 +++++++++++++------------ |
|||
2 files changed, 25 insertions(+), 23 deletions(-) |
|||
|
|||
diff --git a/tests/imrelp-tls-cfgcmd.sh b/tests/imrelp-tls-cfgcmd.sh
|
|||
index bbd63c9cd3..bb1af4ec91 100755
|
|||
--- a/tests/imrelp-tls-cfgcmd.sh
|
|||
+++ b/tests/imrelp-tls-cfgcmd.sh
|
|||
@@ -1,6 +1,7 @@
|
|||
#!/bin/bash |
|||
# addd 2019-11-14 by alorbach, released under ASL 2.0 |
|||
. ${srcdir:=.}/diag.sh init |
|||
+require_relpEngineSetTLSLibByName
|
|||
export NUMMESSAGES=1000 |
|||
export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout" |
|||
export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog" |
|||
@@ -27,21 +28,21 @@ tcpflood --check-only -k "Protocol=-ALL,TLSv1.2" -u "openssl" -Trelp-tls -acertv
|
|||
shutdown_when_empty |
|||
wait_shutdown |
|||
|
|||
-content_check --check-only "parameter tls.tlslib ignored" ${RSYSLOG_DEBUGLOG}
|
|||
+content_check --check-only "relpTcpTLSSetPrio_gtls" ${RSYSLOG_DEBUGLOG}
|
|||
ret=$? |
|||
if [ $ret == 0 ]; then |
|||
- echo "SKIP: Parameter tls.tlslib not supported"
|
|||
+ echo "SKIP: LIBRELP was build without OPENSSL Support"
|
|||
+ skip_test
|
|||
+fi
|
|||
+
|
|||
+content_check --check-only "OpenSSL Version too old" ${RSYSLOG_DEBUGLOG}
|
|||
+ret=$?
|
|||
+if [ $ret == 0 ]; then
|
|||
+ echo "SKIP: OpenSSL Version too old"
|
|||
skip_test |
|||
else |
|||
- content_check --check-only "OpenSSL Version too old" ${RSYSLOG_DEBUGLOG}
|
|||
- ret=$?
|
|||
- if [ $ret == 0 ]; then
|
|||
- echo "SKIP: OpenSSL Version too old"
|
|||
- skip_test
|
|||
- else
|
|||
- # Kindly check for a failed session
|
|||
- content_check "relp connect failed with return 10031" ${RSYSLOG_DYNNAME}.tcpflood
|
|||
- fi
|
|||
+ # Kindly check for a failed session
|
|||
+ content_check "relp connect failed with return 10031" ${RSYSLOG_DYNNAME}.tcpflood
|
|||
fi |
|||
|
|||
exit_test |
|||
\ No newline at end of file |
|||
diff --git a/tests/sndrcv_relp_tls-cfgcmd.sh b/tests/sndrcv_relp_tls-cfgcmd.sh
|
|||
index ff7b3bb75c..57e0f720f0 100755
|
|||
--- a/tests/sndrcv_relp_tls-cfgcmd.sh
|
|||
+++ b/tests/sndrcv_relp_tls-cfgcmd.sh
|
|||
@@ -1,6 +1,7 @@
|
|||
#!/bin/bash |
|||
# added 2019-11-13 by alorbach |
|||
. ${srcdir:=.}/diag.sh init |
|||
+require_relpEngineSetTLSLibByName
|
|||
export PORT_RCVR="$(get_free_port)" |
|||
export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout" |
|||
export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog" |
|||
@@ -40,22 +41,22 @@ wait_shutdown 2
|
|||
shutdown_when_empty |
|||
wait_shutdown |
|||
|
|||
-content_check --check-only "parameter tls.tlslib ignored" ${RSYSLOG_DEBUGLOG}
|
|||
+content_check --check-only "relpTcpConnectTLSInit_gnutls" ${RSYSLOG_DEBUGLOG}
|
|||
ret=$? |
|||
if [ $ret == 0 ]; then |
|||
- echo "SKIP: Parameter tls.tlslib not supported"
|
|||
+ echo "SKIP: LIBRELP was build without OPENSSL Support"
|
|||
+ skip_test
|
|||
+fi
|
|||
+
|
|||
+content_check --check-only "OpenSSL Version too old" $RSYSLOG_DEBUGLOG
|
|||
+ret=$?
|
|||
+if [ $ret == 0 ]; then
|
|||
+ echo "SKIP: OpenSSL Version too old"
|
|||
skip_test |
|||
else |
|||
- content_check --check-only "OpenSSL Version too old" $RSYSLOG_DEBUGLOG
|
|||
- ret=$?
|
|||
- if [ $ret == 0 ]; then
|
|||
- echo "SKIP: OpenSSL Version too old"
|
|||
- skip_test
|
|||
- else
|
|||
- # Kindly check for a failed session
|
|||
- content_check "librelp error 10031" $RSYSLOG_DEBUGLOG
|
|||
- # content_check "OpenSSL Error Stack:"
|
|||
- fi
|
|||
+ # Kindly check for a failed session
|
|||
+ content_check "librelp error 10031" $RSYSLOG_DEBUGLOG
|
|||
+# content_check "OpenSSL Error Stack:"
|
|||
fi |
|||
|
|||
exit_test |
|||
\ No newline at end of file |
@ -1,2 +1,3 @@ |
|||
DIST salt-2018.3.4.tar.gz 14404085 BLAKE2B 932b30b1ba60aefd3a6874a8ebe4cb6c469d82e31f6acdbe8a5641d09e3316796b5403ef803a355cec6255c1aede8bac3b66af179bd1bbaa5418c7076229cef9 SHA512 f17e06fdbf4741f231d9e769be57de4f6079e9283881b4bafa0d23928d7626a1f9c02b9f49c654b29c3e6ee8ed3d3ddf42c21baecef158ad63a97dc87895b21b |
|||
DIST salt-2019.2.3.tar.gz 14572686 BLAKE2B 770b815f43ca8651408c1c057377b02c8037e673584c719e0a9b5c56c13c8db2db0e2c8641a17323f2b890d4a69d1508b0090624c7067869d9fa84303c2f8585 SHA512 cd694ca19696a84e3370e39c61da180e508592253713d99dd6dd5342b57c2814fee22e46bade30d7604f5730d9e1a736e59c3a512161f744d3f097f74a2836c5 |
|||
DIST salt-2019.2.4.tar.gz 14572556 BLAKE2B a1057baa5ab6c0a07f34ce658a1d5bc644f968600663d28d084eb712b55faaee93b8410d81c4b5324944e6e1f2067ffb102200088832e1b0076fed78c8542ae6 SHA512 9e621cbd78ead1060a2b0c07e7ef02e8c4590360a95c51ac29fa8c1add34f617e4407dd28b67cae3b0fd68b333782185edcf1159edd2db08e8b4e79b6b07a63f |
|||
DIST salt-3000.2.tar.gz 15231513 BLAKE2B 2090d0f52f953a42f1685ad190750e9c76ad6e862a3272444fef063a7605f69a6c542f04165a41fb9cdaa126a878cc133d4857faa70edc5eac4bf49bdde937ab SHA512 88e8876ed8cd18e942c2194686cda68f40fa49e69e317ca488bf58e095bcf6cdf8771d93eba7960038941cc5863e13a4eea4dad5256c12da7cd8288a2c61f59d |
@ -0,0 +1,58 @@ |
|||
diff --git a/tests/unit/fileserver/test_roots.py b/tests/unit/fileserver/test_roots.py
|
|||
index e0d939a086..33a9b6dc35 100644
|
|||
--- a/tests/unit/fileserver/test_roots.py
|
|||
+++ b/tests/unit/fileserver/test_roots.py
|
|||
@@ -11,7 +11,7 @@ import tempfile
|
|||
|
|||
# Import Salt Testing libs |
|||
from tests.support.mixins import AdaptedConfigurationTestCaseMixin, LoaderModuleMockMixin |
|||
-from tests.support.unit import TestCase
|
|||
+from tests.support.unit import TestCase, skipIf
|
|||
from tests.support.mock import patch |
|||
from tests.support.runtests import RUNTIME_VARS |
|||
|
|||
@@ -165,6 +165,7 @@ class RootsTest(TestCase, AdaptedConfigurationTestCaseMixin, LoaderModuleMockMix
|
|||
self.assertIn('empty_dir', ret) |
|||
self.assertIn(UNICODE_DIRNAME, ret) |
|||
|
|||
+ @skipIf(True, "doesn't like sandbox")
|
|||
def test_symlink_list(self): |
|||
orig_file_roots = self.opts['file_roots'] |
|||
try: |
|||
diff --git a/tests/unit/modules/test_dockermod.py b/tests/unit/modules/test_dockermod.py
|
|||
index 191bfc123f..1956127f0b 100644
|
|||
--- a/tests/unit/modules/test_dockermod.py
|
|||
+++ b/tests/unit/modules/test_dockermod.py
|
|||
@@ -793,6 +793,7 @@ class DockerTestCase(TestCase, LoaderModuleMockMixin):
|
|||
}, |
|||
ret) |
|||
|
|||
+ @skipIf(True, "Doesn't work with sandbox")
|
|||
def test_call_success(self): |
|||
''' |
|||
test module calling inside containers |
|||
diff --git a/tests/unit/states/test_pip_state.py b/tests/unit/states/test_pip_state.py
|
|||
index 13c158b309..27e10e6161 100644
|
|||
--- a/tests/unit/states/test_pip_state.py
|
|||
+++ b/tests/unit/states/test_pip_state.py
|
|||
@@ -384,6 +384,7 @@ class PipStateUtilsTest(TestCase):
|
|||
|
|||
|
|||
@skipIf(salt.utils.path.which_bin(KNOWN_BINARY_NAMES) is None, 'virtualenv not installed') |
|||
+@skipIf(True, "Needs network access")
|
|||
class PipStateInstallationErrorTest(TestCase): |
|||
|
|||
def test_importable_installation_error(self): |
|||
diff --git a/tests/unit/utils/test_jinja.py b/tests/unit/utils/test_jinja.py
|
|||
index f48fa9d42c..bb57929cfa 100644
|
|||
--- a/tests/unit/utils/test_jinja.py
|
|||
+++ b/tests/unit/utils/test_jinja.py
|
|||
@@ -1268,7 +1268,7 @@ class TestCustomExtensions(TestCase):
|
|||
dict(opts=self.local_opts, saltenv='test', salt=self.local_salt)) |
|||
self.assertEqual(rendered, '16777216') |
|||
|
|||
- @flaky
|
|||
+ @skipIf("True", "Needs network access")
|
|||
def test_http_query(self): |
|||
''' |
|||
Test the `http_query` Jinja filter. |
@ -0,0 +1,79 @@ |
|||
From 11c23a526ae926ca082ee7ad92246e085c51b8e6 Mon Sep 17 00:00:00 2001 |
|||
From: =?UTF-8?q?S=C3=A9bastien=20Blaisot?= <sebastien@blaisot.org> |
|||
Date: Fri, 17 Jan 2020 17:06:42 +0100 |
|||
Subject: [PATCH] Import abstract base classes from collection.abc in python |
|||
3.3+ |
|||
|
|||
---
|
|||
salt/modules/file.py | 6 +++++- |
|||
salt/modules/win_file.py | 5 ++++- |
|||
salt/states/file.py | 6 +++++- |
|||
salt/utils/dictdiffer.py | 5 ++++- |
|||
4 files changed, 18 insertions(+), 4 deletions(-) |
|||
|
|||
diff --git a/salt/modules/file.py b/salt/modules/file.py
|
|||
index 771b204d63fe..d1ec5e4c295d 100644
|
|||
--- a/salt/modules/file.py
|
|||
+++ b/salt/modules/file.py
|
|||
@@ -29,7 +29,11 @@
|
|||
import glob |
|||
import hashlib |
|||
import mmap |
|||
-from collections import Iterable, Mapping, namedtuple
|
|||
+try:
|
|||
+ from collections.abc import Iterable, Mapping
|
|||
+except ImportError:
|
|||
+ from collections import Iterable, Mapping
|
|||
+from collections import namedtuple
|
|||
from functools import reduce # pylint: disable=redefined-builtin |
|||
|
|||
# pylint: disable=import-error,no-name-in-module,redefined-builtin |
|||
diff --git a/salt/modules/win_file.py b/salt/modules/win_file.py
|
|||
index 4fd3eebcdd81..5bc983786a98 100644
|
|||
--- a/salt/modules/win_file.py
|
|||
+++ b/salt/modules/win_file.py
|
|||
@@ -17,7 +17,10 @@
|
|||
import logging |
|||
# pylint: disable=W0611 |
|||
import operator # do not remove |
|||
-from collections import Iterable, Mapping # do not remove
|
|||
+try:
|
|||
+ from collections.abc import Iterable, Mapping # do not remove
|
|||
+except ImportError:
|
|||
+ from collections import Iterable, Mapping # do not remove
|
|||
from functools import reduce # do not remove |
|||
import datetime # do not remove. |
|||
import tempfile # do not remove. Used in salt.modules.file.__clean_tmp |
|||
diff --git a/salt/states/file.py b/salt/states/file.py
|
|||
index 23c3d3c53955..36231c69cff6 100644
|
|||
--- a/salt/states/file.py
|
|||
+++ b/salt/states/file.py
|
|||
@@ -291,7 +291,11 @@ def run():
|
|||
import sys |
|||
import time |
|||
import traceback |
|||
-from collections import Iterable, Mapping, defaultdict
|
|||
+try:
|
|||
+ from collections.abc import Iterable, Mapping
|
|||
+except ImportError:
|
|||
+ from collections import Iterable, Mapping
|
|||
+from collections import defaultdict
|
|||
from datetime import datetime, date # python3 problem in the making? |
|||
|
|||
# Import salt libs |
|||
diff --git a/salt/utils/dictdiffer.py b/salt/utils/dictdiffer.py
|
|||
index 30e87e885436..da6bd5ed944c 100644
|
|||
--- a/salt/utils/dictdiffer.py
|
|||
+++ b/salt/utils/dictdiffer.py
|
|||
@@ -13,7 +13,10 @@
|
|||
''' |
|||
from __future__ import absolute_import, print_function, unicode_literals |
|||
import copy |
|||
-from collections import Mapping
|
|||
+try:
|
|||
+ from collections.abc import Mapping
|
|||
+except ImportError:
|
|||
+ from collections import Mapping
|
|||
from salt.ext import six |
|||
|
|||
|
@ -0,0 +1,460 @@ |
|||
diff --git a/salt/config/__init__.py b/salt/config/__init__.py
|
|||
index 70b34ec949..4304d99bf7 100644
|
|||
--- a/salt/config/__init__.py
|
|||
+++ b/salt/config/__init__.py
|
|||
@@ -8,6 +8,7 @@ from __future__ import absolute_import, print_function, unicode_literals, genera
|
|||
import os |
|||
import re |
|||
import sys |
|||
+import copy
|
|||
import glob |
|||
import time |
|||
import codecs |
|||
@@ -3191,7 +3192,7 @@ def apply_cloud_providers_config(overrides, defaults=None):
|
|||
# Merge provided extends |
|||
keep_looping = False |
|||
for alias, entries in six.iteritems(providers.copy()): |
|||
- for driver, details in six.iteritems(entries):
|
|||
+ for driver, details in copy.copy(entries).items():
|
|||
|
|||
if 'extends' not in details: |
|||
# Extends resolved or non existing, continue! |
|||
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
|||
index 9b244def9c..ede3a94de9 100644
|
|||
--- a/salt/grains/core.py
|
|||
+++ b/salt/grains/core.py
|
|||
@@ -1939,7 +1939,7 @@ def os_data():
|
|||
) |
|||
(osname, osrelease, oscodename) = \ |
|||
[x.strip('"').strip("'") for x in |
|||
- linux_distribution(supported_dists=_supported_dists)]
|
|||
+ linux_distribution()]
|
|||
# Try to assign these three names based on the lsb info, they tend to |
|||
# be more accurate than what python gets from /etc/DISTRO-release. |
|||
# It's worth noting that Ubuntu has patched their Python distribution |
|||
diff --git a/salt/modules/boto_route53.py b/salt/modules/boto_route53.py
|
|||
index a663ec7207..8d3d8c2105 100644
|
|||
--- a/salt/modules/boto_route53.py
|
|||
+++ b/salt/modules/boto_route53.py
|
|||
@@ -158,7 +158,7 @@ def describe_hosted_zones(zone_id=None, domain_name=None, region=None,
|
|||
else: |
|||
marker = None |
|||
ret = None |
|||
- while marker is not '':
|
|||
+ while marker != '':
|
|||
r = conn.get_all_hosted_zones(start_marker=marker, |
|||
zone_list=ret) |
|||
ret = r['ListHostedZonesResponse']['HostedZones'] |
|||
diff --git a/salt/modules/file.py b/salt/modules/file.py
|
|||
index b5b70e2d4c..41a9229eb4 100644
|
|||
--- a/salt/modules/file.py
|
|||
+++ b/salt/modules/file.py
|
|||
@@ -2744,7 +2744,7 @@ def blockreplace(path,
|
|||
|
|||
if block_found: |
|||
diff = __utils__['stringutils.get_diff'](orig_file, new_file) |
|||
- has_changes = diff is not ''
|
|||
+ has_changes = diff != ''
|
|||
if has_changes and not dry_run: |
|||
# changes detected |
|||
# backup file attrs |
|||
diff --git a/salt/modules/iptables.py b/salt/modules/iptables.py
|
|||
index e232c6931f..9708f45256 100644
|
|||
--- a/salt/modules/iptables.py
|
|||
+++ b/salt/modules/iptables.py
|
|||
@@ -905,7 +905,7 @@ def insert(table='filter', chain=None, position=None, rule=None, family='ipv4'):
|
|||
rules = get_rules(family=family) |
|||
size = len(rules[table][chain]['rules']) |
|||
position = (size + position) + 1 |
|||
- if position is 0:
|
|||
+ if position == 0:
|
|||
position = 1 |
|||
|
|||
wait = '--wait' if _has_option('--wait', family) else '' |
|||
@@ -1040,7 +1040,7 @@ def _parse_conf(conf_file=None, in_mem=False, family='ipv4'):
|
|||
ret_args = {} |
|||
chain = parsed_args['append'] |
|||
for arg in parsed_args: |
|||
- if parsed_args[arg] and arg is not 'append':
|
|||
+ if parsed_args[arg] and arg != 'append':
|
|||
ret_args[arg] = parsed_args[arg] |
|||
if parsed_args['comment'] is not None: |
|||
comment = parsed_args['comment'][0].strip('"') |
|||
diff --git a/salt/modules/lxd.py b/salt/modules/lxd.py
|
|||
index d6c2d8d4b9..d617cbb3df 100644
|
|||
--- a/salt/modules/lxd.py
|
|||
+++ b/salt/modules/lxd.py
|
|||
@@ -1824,11 +1824,11 @@ def container_file_get(name, src, dst, overwrite=False,
|
|||
|
|||
if mode: |
|||
os.chmod(dst, mode) |
|||
- if uid or uid is '0':
|
|||
+ if uid or uid == '0':
|
|||
uid = int(uid) |
|||
else: |
|||
uid = -1 |
|||
- if gid or gid is '0':
|
|||
+ if gid or gid == '0':
|
|||
gid = int(gid) |
|||
else: |
|||
gid = -1 |
|||
diff --git a/salt/modules/mongodb.py b/salt/modules/mongodb.py
|
|||
index 8cdb819102..ed3228150e 100644
|
|||
--- a/salt/modules/mongodb.py
|
|||
+++ b/salt/modules/mongodb.py
|
|||
@@ -484,7 +484,7 @@ def update_one(objects, collection, user=None, password=None, host=None, port=No
|
|||
objects = six.text_type(objects) |
|||
objs = re.split(r'}\s+{', objects) |
|||
|
|||
- if len(objs) is not 2:
|
|||
+ if len(objs) != 2:
|
|||
return "Your request does not contain a valid " + \ |
|||
"'{_\"id\": \"my_id\"} {\"my_doc\": \"my_val\"}'" |
|||
|
|||
diff --git a/salt/modules/virt.py b/salt/modules/virt.py
|
|||
index a2412bb745..91e105fe04 100644
|
|||
--- a/salt/modules/virt.py
|
|||
+++ b/salt/modules/virt.py
|
|||
@@ -4732,7 +4732,7 @@ def _parse_pools_caps(doc):
|
|||
if options: |
|||
if 'options' not in pool_caps: |
|||
pool_caps['options'] = {} |
|||
- kind = option_kind if option_kind is not 'vol' else 'volume'
|
|||
+ kind = option_kind if option_kind != 'vol' else 'volume'
|
|||
pool_caps['options'][kind] = options |
|||
return pool_caps |
|||
|
|||
diff --git a/salt/modules/win_ip.py b/salt/modules/win_ip.py
|
|||
index e69f44211e..99b9d392f6 100644
|
|||
--- a/salt/modules/win_ip.py
|
|||
+++ b/salt/modules/win_ip.py
|
|||
@@ -342,7 +342,7 @@ def set_static_dns(iface, *addrs):
|
|||
salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.1' |
|||
salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.252' '192.168.1.253' |
|||
''' |
|||
- if addrs is () or str(addrs[0]).lower() == 'none':
|
|||
+ if addrs == () or str(addrs[0]).lower() == 'none':
|
|||
return {'Interface': iface, 'DNS Server': 'No Changes'} |
|||
# Clear the list of DNS servers if [] is passed |
|||
if str(addrs[0]).lower() == '[]': |
|||
diff --git a/salt/modules/win_lgpo.py b/salt/modules/win_lgpo.py
|
|||
index efa154889f..50f0c9940f 100644
|
|||
--- a/salt/modules/win_lgpo.py
|
|||
+++ b/salt/modules/win_lgpo.py
|
|||
@@ -4692,7 +4692,7 @@ class _policy_info(object):
|
|||
return 'true' |
|||
elif val.upper() == 'Run Windows PowerShell scripts last'.upper(): |
|||
return 'false' |
|||
- elif val is 'Not Configured':
|
|||
+ elif val == 'Not Configured':
|
|||
return None |
|||
else: |
|||
return 'Invalid Value' |
|||
diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py
|
|||
index 74fa61bc51..42f0c2ca6e 100644
|
|||
--- a/salt/modules/win_system.py
|
|||
+++ b/salt/modules/win_system.py
|
|||
@@ -1149,7 +1149,7 @@ def set_system_date_time(years=None,
|
|||
system_time.wSecond = int(seconds) |
|||
system_time_ptr = ctypes.pointer(system_time) |
|||
succeeded = ctypes.windll.kernel32.SetLocalTime(system_time_ptr) |
|||
- if succeeded is not 0:
|
|||
+ if succeeded != 0:
|
|||
return True |
|||
else: |
|||
log.error('Failed to set local time') |
|||
diff --git a/salt/modules/x509.py b/salt/modules/x509.py
|
|||
index 1cdd912bfb..4069076c32 100644
|
|||
--- a/salt/modules/x509.py
|
|||
+++ b/salt/modules/x509.py
|
|||
@@ -131,7 +131,7 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1):
|
|||
to create the authoritykeyidentifier extension. |
|||
''' |
|||
if name == 'subjectKeyIdentifier' and \ |
|||
- value.strip('0123456789abcdefABCDEF:') is not '':
|
|||
+ value.strip('0123456789abcdefABCDEF:') != '':
|
|||
raise salt.exceptions.SaltInvocationError( |
|||
'value must be precomputed hash') |
|||
|
|||
diff --git a/salt/output/highstate.py b/salt/output/highstate.py
|
|||
index 1f2f9452fa..87be7656fe 100644
|
|||
--- a/salt/output/highstate.py
|
|||
+++ b/salt/output/highstate.py
|
|||
@@ -209,7 +209,7 @@ def _format_host(host, data, indent_level=1):
|
|||
# Verify that the needed data is present |
|||
data_tmp = {} |
|||
for tname, info in six.iteritems(data): |
|||
- if isinstance(info, dict) and tname is not 'changes' and info and '__run_num__' not in info:
|
|||
+ if isinstance(info, dict) and tname != 'changes' and info and '__run_num__' not in info:
|
|||
err = ('The State execution failed to record the order ' |
|||
'in which all states were executed. The state ' |
|||
'return missing data is:') |
|||
diff --git a/salt/renderers/stateconf.py b/salt/renderers/stateconf.py
|
|||
index cfce9e6926..1b116ddfb1 100644
|
|||
--- a/salt/renderers/stateconf.py
|
|||
+++ b/salt/renderers/stateconf.py
|
|||
@@ -224,7 +224,7 @@ def render(input, saltenv='base', sls='', argline='', **kws):
|
|||
tmplctx = STATE_CONF.copy() |
|||
if tmplctx: |
|||
prefix = sls + '::' |
|||
- for k in six.iterkeys(tmplctx): # iterate over a copy of keys
|
|||
+ for k in copy.copy(tmplctx).keys(): # iterate over a copy of keys
|
|||
if k.startswith(prefix): |
|||
tmplctx[k[len(prefix):]] = tmplctx[k] |
|||
del tmplctx[k] |
|||
diff --git a/salt/returners/slack_webhook_return.py b/salt/returners/slack_webhook_return.py
|
|||
index aad1cdf656..0db705df01 100644
|
|||
--- a/salt/returners/slack_webhook_return.py
|
|||
+++ b/salt/returners/slack_webhook_return.py
|
|||
@@ -322,7 +322,7 @@ def returner(ret):
|
|||
show_tasks = _options.get('show_tasks') |
|||
author_icon = _options.get('author_icon') |
|||
|
|||
- if not webhook or webhook is '':
|
|||
+ if not webhook or webhook == '':
|
|||
log.error('%s.webhook not defined in salt config', __virtualname__) |
|||
return |
|||
|
|||
diff --git a/salt/states/debconfmod.py b/salt/states/debconfmod.py
|
|||
index a0ef20b185..a7478c7ac0 100644
|
|||
--- a/salt/states/debconfmod.py
|
|||
+++ b/salt/states/debconfmod.py
|
|||
@@ -210,7 +210,7 @@ def set(name, data, **kwargs):
|
|||
args['value'] = 'true' if args['value'] else 'false' |
|||
|
|||
if current is not None and [key, args['type'], six.text_type(args['value'])] in current: |
|||
- if ret['comment'] is '':
|
|||
+ if ret['comment'] == '':
|
|||
ret['comment'] = 'Unchanged answers: ' |
|||
ret['comment'] += ('{0} ').format(key) |
|||
else: |
|||
diff --git a/salt/states/git.py b/salt/states/git.py
|
|||
index ce6455ee71..f2bf4da629 100644
|
|||
--- a/salt/states/git.py
|
|||
+++ b/salt/states/git.py
|
|||
@@ -2464,7 +2464,7 @@ def detached(name,
|
|||
password, |
|||
output_encoding=output_encoding)[0] |
|||
|
|||
- if remote_rev_type is 'hash':
|
|||
+ if remote_rev_type == 'hash':
|
|||
try: |
|||
__salt__['git.describe'](target, |
|||
rev, |
|||
@@ -2643,7 +2643,7 @@ def detached(name,
|
|||
|
|||
# get refs and checkout |
|||
checkout_commit_id = '' |
|||
- if remote_rev_type is 'hash':
|
|||
+ if remote_rev_type == 'hash':
|
|||
if __salt__['git.describe']( |
|||
target, |
|||
rev, |
|||
diff --git a/salt/states/mysql_grants.py b/salt/states/mysql_grants.py
|
|||
index d6023bbf86..638e988e13 100644
|
|||
--- a/salt/states/mysql_grants.py
|
|||
+++ b/salt/states/mysql_grants.py
|
|||
@@ -167,7 +167,7 @@ def present(name,
|
|||
db_part = database.rpartition('.') |
|||
my_db = db_part[0] |
|||
my_table = db_part[2] |
|||
- my_db = __salt__['mysql.quote_identifier'](my_db, (my_table is '*'))
|
|||
+ my_db = __salt__['mysql.quote_identifier'](my_db, (my_table == '*'))
|
|||
my_table = __salt__['mysql.quote_identifier'](my_table) |
|||
# Removing per table grants in case of database level grant !!! |
|||
if token_grants['database'] == my_db: |
|||
diff --git a/salt/utils/args.py b/salt/utils/args.py
|
|||
index 8cc0f35196..8caaae4d1f 100644
|
|||
--- a/salt/utils/args.py
|
|||
+++ b/salt/utils/args.py
|
|||
@@ -253,6 +253,9 @@ def get_function_argspec(func, is_class_method=None):
|
|||
if not callable(func): |
|||
raise TypeError('{0} is not a callable'.format(func)) |
|||
|
|||
+ if hasattr(func, "__wrapped__"):
|
|||
+ func = func.__wrapped__
|
|||
+
|
|||
if six.PY2: |
|||
if is_class_method is True: |
|||
aspec = inspect.getargspec(func) |
|||
diff --git a/salt/utils/decorators/path.py b/salt/utils/decorators/path.py
|
|||
index 4adacf0e4e..37c692355f 100644
|
|||
--- a/salt/utils/decorators/path.py
|
|||
+++ b/salt/utils/decorators/path.py
|
|||
@@ -4,10 +4,11 @@ Decorators for salt.utils.path
|
|||
''' |
|||
from __future__ import absolute_import, print_function, unicode_literals |
|||
|
|||
+import functools
|
|||
+
|
|||
# Import Salt libs |
|||
import salt.utils.path |
|||
from salt.exceptions import CommandNotFoundError |
|||
-from salt.utils.decorators.signature import identical_signature_wrapper
|
|||
|
|||
|
|||
def which(exe): |
|||
@@ -15,13 +16,14 @@ def which(exe):
|
|||
Decorator wrapper for salt.utils.path.which |
|||
''' |
|||
def wrapper(function): |
|||
+ @functools.wraps(function)
|
|||
def wrapped(*args, **kwargs): |
|||
if salt.utils.path.which(exe) is None: |
|||
raise CommandNotFoundError( |
|||
'The \'{0}\' binary was not found in $PATH.'.format(exe) |
|||
) |
|||
return function(*args, **kwargs) |
|||
- return identical_signature_wrapper(function, wrapped)
|
|||
+ return wrapped
|
|||
return wrapper |
|||
|
|||
|
|||
@@ -30,6 +32,7 @@ def which_bin(exes):
|
|||
Decorator wrapper for salt.utils.path.which_bin |
|||
''' |
|||
def wrapper(function): |
|||
+ @functools.wraps(function)
|
|||
def wrapped(*args, **kwargs): |
|||
if salt.utils.path.which_bin(exes) is None: |
|||
raise CommandNotFoundError( |
|||
@@ -39,5 +42,5 @@ def which_bin(exes):
|
|||
) |
|||
) |
|||
return function(*args, **kwargs) |
|||
- return identical_signature_wrapper(function, wrapped)
|
|||
+ return wrapped
|
|||
return wrapper |
|||
diff --git a/salt/utils/schedule.py b/salt/utils/schedule.py
|
|||
index 474af442a1..69204a53d4 100644
|
|||
--- a/salt/utils/schedule.py
|
|||
+++ b/salt/utils/schedule.py
|
|||
@@ -721,7 +721,7 @@ class Schedule(object):
|
|||
if argspec.keywords: |
|||
# this function accepts **kwargs, pack in the publish data |
|||
for key, val in six.iteritems(ret): |
|||
- if key is not 'kwargs':
|
|||
+ if key != 'kwargs':
|
|||
kwargs['__pub_{0}'.format(key)] = copy.deepcopy(val) |
|||
|
|||
# Only include these when running runner modules |
|||
diff --git a/salt/utils/win_pdh.py b/salt/utils/win_pdh.py
|
|||
index 9921ee72da..7e9e368caf 100644
|
|||
--- a/salt/utils/win_pdh.py
|
|||
+++ b/salt/utils/win_pdh.py
|
|||
@@ -164,7 +164,7 @@ class Counter(object):
|
|||
''' |
|||
path = win32pdh.MakeCounterPath( |
|||
(None, obj, instance, None, instance_index, counter), 0) |
|||
- if win32pdh.ValidatePath(path) is 0:
|
|||
+ if win32pdh.ValidatePath(path) == 0:
|
|||
return Counter(path, obj, instance, instance_index, counter) |
|||
raise CommandExecutionError('Invalid counter specified: {0}'.format(path)) |
|||
|
|||
diff --git a/tests/integration/cloud/helpers/virtualbox.py b/tests/integration/cloud/helpers/virtualbox.py
|
|||
index 668f15d82f..a6bc9dd2c3 100644
|
|||
--- a/tests/integration/cloud/helpers/virtualbox.py
|
|||
+++ b/tests/integration/cloud/helpers/virtualbox.py
|
|||
@@ -74,7 +74,7 @@ class VirtualboxCloudTestCase(ShellCase):
|
|||
output.pop(0) |
|||
else: |
|||
break |
|||
- if len(output) is 0:
|
|||
+ if len(output) == 0:
|
|||
return dict() |
|||
else: |
|||
return salt.utils.json.loads(''.join(output)) |
|||
diff --git a/tests/integration/modules/test_mysql.py b/tests/integration/modules/test_mysql.py
|
|||
index 7edb77cb94..197c4e65ae 100644
|
|||
--- a/tests/integration/modules/test_mysql.py
|
|||
+++ b/tests/integration/modules/test_mysql.py
|
|||
@@ -519,7 +519,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
) |
|||
expected = [] |
|||
for tablename, engine in sorted(six.iteritems(tablenames)): |
|||
- if engine is 'MEMORY':
|
|||
+ if engine == 'MEMORY':
|
|||
expected.append([{ |
|||
'Table': dbname+'.'+tablename, |
|||
'Msg_text': ("The storage engine for the table doesn't" |
|||
@@ -544,7 +544,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
) |
|||
expected = [] |
|||
for tablename, engine in sorted(six.iteritems(tablenames)): |
|||
- if engine is 'MYISAM':
|
|||
+ if engine == 'MYISAM':
|
|||
expected.append([{ |
|||
'Table': dbname+'.'+tablename, |
|||
'Msg_text': 'OK', |
|||
@@ -570,14 +570,14 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
|
|||
expected = [] |
|||
for tablename, engine in sorted(six.iteritems(tablenames)): |
|||
- if engine is 'MYISAM':
|
|||
+ if engine == 'MYISAM':
|
|||
expected.append([{ |
|||
'Table': dbname+'.'+tablename, |
|||
'Msg_text': 'OK', |
|||
'Msg_type': 'status', |
|||
'Op': 'optimize' |
|||
}]) |
|||
- elif engine is 'InnoDB':
|
|||
+ elif engine == 'InnoDB':
|
|||
expected.append([{ |
|||
'Table': dbname+'.'+tablename, |
|||
'Msg_text': ("Table does not support optimize, " |
|||
@@ -591,7 +591,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
'Msg_type': 'status', |
|||
'Op': 'optimize' |
|||
}]) |
|||
- elif engine is 'MEMORY':
|
|||
+ elif engine == 'MEMORY':
|
|||
expected.append([{ |
|||
'Table': dbname+'.'+tablename, |
|||
'Msg_text': ("The storage engine for the table doesn't" |
|||
diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py
|
|||
index 32f4302e5f..c49bd0bccc 100644
|
|||
--- a/tests/unit/modules/test_virt.py
|
|||
+++ b/tests/unit/modules/test_virt.py
|
|||
@@ -9,6 +9,7 @@ virt execution module unit tests
|
|||
from __future__ import absolute_import, print_function, unicode_literals |
|||
import os |
|||
import re |
|||
+import sys
|
|||
import datetime |
|||
import shutil |
|||
|
|||
@@ -1393,19 +1394,20 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
|
|||
self.assertEqual('vnc', setxml.find('devices/graphics').get('type')) |
|||
|
|||
# Update with no diff case |
|||
- self.assertEqual({
|
|||
- 'definition': False,
|
|||
- 'disk': {'attached': [], 'detached': []},
|
|||
- 'interface': {'attached': [], 'detached': []}
|
|||
- }, virt.update('my vm', cpu=1, mem=1024,
|
|||
- disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
|
|||
- nic_profile='myprofile',
|
|||
- interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
|
|||
- 'mac': '52:54:00:39:02:b1'},
|
|||
- {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
|
|||
- 'mac': '52:54:00:39:02:b2'}],
|
|||
- graphics={'type': 'spice',
|
|||
- 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
|
|||
+ if sys.hexversion < 0x03080000:
|
|||
+ self.assertEqual({
|
|||
+ 'definition': False,
|
|||
+ 'disk': {'attached': [], 'detached': []},
|
|||
+ 'interface': {'attached': [], 'detached': []}
|
|||
+ }, virt.update('my vm', cpu=1, mem=1024,
|
|||
+ disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
|
|||
+ nic_profile='myprofile',
|
|||
+ interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
|
|||
+ 'mac': '52:54:00:39:02:b1'},
|
|||
+ {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
|
|||
+ 'mac': '52:54:00:39:02:b2'}],
|
|||
+ graphics={'type': 'spice',
|
|||
+ 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
|
|||
|
|||
# Failed XML description update case |
|||
self.mock_conn.defineXML.side_effect = self.mock_libvirt.libvirtError("Test error") |
@ -0,0 +1,60 @@ |
|||
From 5259ba8ef6e5949815641edc563deab67ba68582 Mon Sep 17 00:00:00 2001 |
|||
From: Mathias Fussenegger <f.mathias@zignar.net> |
|||
Date: Fri, 22 Nov 2019 17:05:27 +0100 |
|||
Subject: [PATCH] Remove _supported_dists import for python-3.8 support |
|||
|
|||
`_supported_dists` has been removed from platform in Python 3.8: |
|||
|
|||
https://github.com/python/cpython/commit/8b94b41ab7b12f745dea744e8940631318816935#diff-47c8e5750258a08a6dd9de3e9c3774acL267-L271 |
|||
|
|||
This instead inlines all the values that have been there. |
|||
|
|||
Without this change running `salt-ssh` with Python 3.8 run into an |
|||
import error. |
|||
---
|
|||
salt/grains/core.py | 31 +++++++++++++++++++++++++++---- |
|||
1 file changed, 27 insertions(+), 4 deletions(-) |
|||
|
|||
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
|||
index 04c1ae91b5f5..77694abe84f9 100644
|
|||
--- a/salt/grains/core.py
|
|||
+++ b/salt/grains/core.py
|
|||
@@ -35,11 +35,34 @@
|
|||
__proxyenabled__ = ['*'] |
|||
__FQDN__ = None |
|||
|
|||
-# Extend the default list of supported distros. This will be used for the
|
|||
+# Default list of supported distros. This will be used for the
|
|||
# /etc/DISTRO-release checking that is part of linux_distribution() |
|||
-from platform import _supported_dists
|
|||
-_supported_dists += ('arch', 'mageia', 'meego', 'vmware', 'bluewhite64',
|
|||
- 'slamd64', 'ovs', 'system', 'mint', 'oracle', 'void')
|
|||
+_supported_dists = (
|
|||
+ 'SuSE',
|
|||
+ 'UnitedLinux',
|
|||
+ 'arch',
|
|||
+ 'bluewhite64',
|
|||
+ 'centos',
|
|||
+ 'debian',
|
|||
+ 'fedora',
|
|||
+ 'gentoo',
|
|||
+ 'mageia',
|
|||
+ 'mandrake',
|
|||
+ 'mandriva',
|
|||
+ 'meego',
|
|||
+ 'mint',
|
|||
+ 'oracle',
|
|||
+ 'ovs',
|
|||
+ 'redhat',
|
|||
+ 'rocks',
|
|||
+ 'slackware',
|
|||
+ 'slamd64',
|
|||
+ 'system',
|
|||
+ 'turbolinux',
|
|||
+ 'vmware',
|
|||
+ 'void',
|
|||
+ 'yellowdog',
|
|||
+)
|
|||
|
|||
# linux_distribution deprecated in py3.7 |
|||
try: |
@ -0,0 +1,18 @@ |
|||
--- salt-3000.2.orig/tests/unit/utils/test_verify.py 2020-04-29 16:57:02.775635698 -0700
|
|||
+++ salt-3000.2/tests/unit/utils/test_verify.py 2020-04-29 16:57:58.042282147 -0700
|
|||
@@ -324,6 +324,7 @@
|
|||
self.assertTrue(os.path.exists(path)) |
|||
|
|||
|
|||
+@skipIf(True, "breaks under sandbox")
|
|||
class TestCleanPath(TestCase): |
|||
''' |
|||
salt.utils.clean_path works as expected |
|||
@@ -366,6 +367,7 @@
|
|||
raise ctypes.WinError() |
|||
|
|||
|
|||
+@skipIf(True, "breaks under sandbox")
|
|||
@skipIf(six.PY2 and salt.utils.platform.is_windows(), 'Skipped on windows py2') |
|||
class TestCleanPathLink(TestCase): |
|||
''' |
@ -0,0 +1,183 @@ |
|||
# Copyright 1999-2020 Gentoo Authors |
|||
# Distributed under the terms of the GNU General Public License v2 |
|||
|
|||
EAPI=7 |
|||
PYTHON_COMPAT=( python3_{7,8} ) |
|||
DISTUTILS_USE_SETUPTOOLS=bdepend |
|||
inherit systemd distutils-r1 |
|||
|
|||
DESCRIPTION="Salt is a remote execution and configuration manager" |
|||
HOMEPAGE="https://www.saltstack.com/resources/community/ |
|||
https://github.com/saltstack" |
|||
|
|||
if [[ ${PV} == 9999* ]]; then |
|||
inherit git-r3 |
|||
EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git" |
|||
EGIT_BRANCH="develop" |
|||
SRC_URI="" |
|||
KEYWORDS="" |
|||
else |
|||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
|||
KEYWORDS="~amd64 ~x86" |
|||
fi |
|||
|
|||
LICENSE="Apache-2.0" |
|||
SLOT="0" |
|||
IUSE="cheetah cherrypy ldap libcloud libvirt genshi gnupg keyring mako |
|||
mongodb neutron nova openssl portage profile redis selinux test raet |
|||
+zeromq vim-syntax" |
|||
|
|||
RDEPEND=" |
|||
sys-apps/pciutils |
|||
dev-python/distro[${PYTHON_USEDEP}] |
|||
dev-python/jinja[${PYTHON_USEDEP}] |
|||
dev-python/libnacl[${PYTHON_USEDEP}] |
|||
>=dev-python/msgpack-0.5[${PYTHON_USEDEP}] |
|||
<dev-python/msgpack-1.0[${PYTHON_USEDEP}] |
|||
dev-python/pycryptodome[${PYTHON_USEDEP}] |
|||
dev-python/pyyaml[${PYTHON_USEDEP}] |
|||
dev-python/markupsafe[${PYTHON_USEDEP}] |
|||
>=dev-python/requests-1.0.0[${PYTHON_USEDEP}] |
|||
dev-python/setuptools[${PYTHON_USEDEP}] |
|||
libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] ) |
|||
mako? ( dev-python/mako[${PYTHON_USEDEP}] ) |
|||
ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) |
|||
libvirt? ( |
|||
$(python_gen_cond_dep 'dev-python/libvirt-python[${PYTHON_USEDEP}]' python3_7) |
|||
) |
|||
openssl? ( |
|||
dev-libs/openssl:0=[-bindist] |
|||
dev-python/pyopenssl[${PYTHON_USEDEP}] |
|||
) |
|||
raet? ( |
|||
>=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}] |
|||
>=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}] |
|||
>=dev-python/raet-0.6.0[${PYTHON_USEDEP}] |
|||
) |
|||
cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] ) |
|||
cheetah? ( dev-python/cheetah3[${PYTHON_USEDEP}] ) |
|||
mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] ) |
|||
portage? ( sys-apps/portage[${PYTHON_USEDEP}] ) |
|||
keyring? ( dev-python/keyring[${PYTHON_USEDEP}] ) |
|||
redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) |
|||
selinux? ( sec-policy/selinux-salt ) |
|||
nova? ( |
|||
$(python_gen_cond_dep '>=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}]' python3_7) |
|||
) |
|||
neutron? ( |
|||
$(python_gen_cond_dep '>=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]' python3_7) |
|||
) |
|||
gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] ) |
|||
profile? ( dev-python/yappi[${PYTHON_USEDEP}] ) |
|||
vim-syntax? ( app-vim/salt-vim ) |
|||
zeromq? ( >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] ) |
|||
" |
|||
BDEPEND=" |
|||
test? ( |
|||
${RDEPEND} |
|||
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}] |
|||
>=dev-python/jsonschema-3.0[${PYTHON_USEDEP}] |
|||
>=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] |
|||
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}] |
|||
>=dev-python/moto-0.3.6[${PYTHON_USEDEP}] |
|||
dev-python/pip[${PYTHON_USEDEP}] |
|||
dev-python/psutil[${PYTHON_USEDEP}] |
|||
dev-python/pytest[${PYTHON_USEDEP}] |
|||
dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}] |
|||
dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}] |
|||
>=dev-python/pytest-salt-2018.12.8[${PYTHON_USEDEP}] |
|||
dev-python/pytest-tempdir[${PYTHON_USEDEP}] |
|||
>=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}] |
|||
dev-python/virtualenv[${PYTHON_USEDEP}] |
|||
!x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] ) |
|||
)" |
|||
|
|||
DOCS=( README.rst AUTHORS ) |
|||
|
|||
REQUIRED_USE="|| ( raet zeromq ) |
|||
test? ( cheetah genshi )" |
|||
RESTRICT="!test? ( test ) x86? ( test )" |
|||
|
|||
PATCHES=( |
|||
"${FILESDIR}/salt-2017.7.0-dont-realpath-tmpdir.patch" |
|||
"${FILESDIR}/salt-2019.2.0-skip-tests-that-oom-machine.patch" |
|||
"${FILESDIR}/salt-3000.1-tests.patch" |
|||
"${FILESDIR}/salt-3000.2-tests.patch" |
|||
|
|||
# https://github.com/saltstack/salt/pull/55410 |
|||
"${FILESDIR}/salt-3000.2-py38.patch" |
|||
|
|||
"${FILESDIR}/salt-3000.2-py38-misc.patch" |
|||
|
|||
# https://github.com/saltstack/salt/pull/55900 |
|||
"${FILESDIR}/salt-3000.2-py38-abc.patch" |
|||
) |
|||
|
|||
python_prepare() { |
|||
# remove tests with external dependencies that may not be available |
|||
rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die |
|||
rm tests/unit/modules/test_{file,boto_{vpc,secgroup,elb}}.py || die |
|||
rm tests/unit/states/test_boto_vpc.py || die |
|||
|
|||
# tests that require network access |
|||
rm tests/unit/{states,modules}/test_zcbuildout.py || die |
|||
|
|||
# allow the use of the renamed msgpack |
|||
sed -i '/^msgpack/d' requirements/base.txt || die |
|||
} |
|||
|
|||
python_install_all() { |
|||
local svc |
|||
USE_SETUPTOOLS=1 distutils-r1_python_install_all |
|||
|
|||
for svc in minion master syndic api; do |
|||
newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc} |
|||
newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc} |
|||
systemd_dounit "${FILESDIR}"/salt-${svc}.service |
|||
done |
|||
|
|||
insinto /etc/${PN} |
|||
doins -r conf/* |
|||
} |
|||
|
|||
python_test() { |
|||
local tempdir |
|||
# testsuite likes lots of files |
|||
ulimit -n 3072 || die |
|||
|
|||
# ${T} is too long a path for the tests to work |
|||
tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" |
|||
mkdir "${T}/$(basename "${tempdir}")" |
|||
|
|||
( |
|||
cleanup() { rm -f "${tempdir}" || die; } |
|||
|
|||
trap cleanup EXIT |
|||
|
|||
addwrite "${tempdir}" |
|||
ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die |
|||
|
|||
USE_SETUPTOOLS=1 SHELL="/bin/bash" \ |
|||
TMPDIR="${tempdir}" \ |
|||
${EPYTHON} tests/runtests.py \ |
|||
--unit-tests --no-report --verbose \ |
|||
|| die "testing failed with ${EPYTHON}" |
|||
) |
|||
} |
|||
|
|||
pkg_postinst() { |
|||
if use python_targets_python3_8; then |
|||
if use nova; then |
|||
ewarn "Salt's nova functionality will not work with python3.8 since" |
|||
ewarn "dev-python/python-novaclient does not support it yet" |
|||
fi |
|||
if use neutron; then |
|||
ewarn "Salt's neutron functionality will not work with python3.8 since" |
|||
ewarn "dev-python/python-neutronclient does not support it yet" |
|||
fi |
|||
if use libvirt; then |
|||
ewarn "Salt's libvirt functionality will not work with python3.8 since" |
|||
ewarn "dev-python/libvirt-python does not support it yet" |
|||
fi |
|||
fi |
|||
} |
@ -1,31 +0,0 @@ |
|||
DIST asar-0.14.3.tar.gz 1516628 BLAKE2B 4f04d08c3084843bc3974e99dea2bd327843afd97575fbedcc0ae224c9511be2b2a178a0ff0e555f1c890218d768cca6616a39a0a4fb2fd119f94b074db73ef7 SHA512 8dc099d038d7c8748d20d64adb037167e43640bb923391d2d94f1e2859d41700b39d6b631ee959505cffc695b8284f7e09d43a914af7effc349a768cfaf1efb4 |
|||
DIST atom-1.32.1.tar.gz 11685572 BLAKE2B 4e2463d56d3c4c54e3661e8eeb665a86b165f317dd221d849fd6b447bf6e895ac573b019356695fce0da0c176702356cbd5ff53e0878edbd49aa95e15323cda5 SHA512 8220c7cf1bb602dbcb312e986b4c2ff560baf3e46903e770135da36d92920da4d9f2490e9a5dc6b04821dbbb033415b6008f0f483d88c841996c06a9bf36f7e3 |
|||
DIST atom-bin-1.32.1.rpm 281163511 BLAKE2B 4ff4e055d1cad690c37e6264a7e5771bf50047246950fc45a94cb5217e6cfef2abb8c067efa1ca780550db7f046a8fecc623013cab27fe56df3e22af68f018b6 SHA512 9ff621cb8bcfb185c36eb56cac698a9bd0d2a02b5cc9c7982786b0db241a625188fc6ea9079943bb2c83a122f916a387810fa30161ee9531c1c5c3e28f876f52 |
|||
DIST atomdep-atom--nsfw-1.0.18.tar.gz 20870 BLAKE2B 2e90e2cc337b2d40805db44c48a6f9da2b4e749bd5d036bdeec78790286a0d0c7e4536a8d461480b91c45552ce1f6db06e6f70f975e52b2ec90146714c4a0fb9 SHA512 61c78a57d6b75fada687843bf0dca2f1a4d16a8546769789047a202fc831535ee206112962fc4680c7d37b4da3d611f6b5a153e1b6ab919e51759906288b09ff |
|||
DIST atomdep-atom--watcher-1.0.8.tar.gz 702118 BLAKE2B 21fdb472bc1cd6cc396f686e45f1048ff5507d2126e71d92e1531601d142339a97f3ab8748b34cf8ff8c935fc4f2fa36e86a379a05f79403c7bc3949f5ae8ebb SHA512 e77ba7faf192698ec5b1bbe683c81ead8380dc84a2a4c591dea89847d8595aa49fbc5b24b1725f1ab985b1f6c18f7baa19143780f4e2eb0a717054968db59515 |
|||
DIST atomdep-cached-run-in-this-context-0.5.0.tar.gz 2697 BLAKE2B aada7cb35fa57abc4e97bc76a1a1c77f167441bf82bec4743b4e570721f67edd1c037033dcf058bf72957c7423c957343697e816e85c401e6497c43af41aa3a1 SHA512 15db433f4bbc5a37ad43de672f3f6f234e9e7c94c5ae6b66939653e85102a724ca8bd69a90d2cc1f2307db55916c66325a56e607f42546807f83595c129ca333 |
|||
DIST atomdep-ctags-3.0.0.tar.gz 12864 BLAKE2B 561a64734f67cd7943f2d6f972e4d1ec55913934357e7a0d3077c2910f938071b090f55880788ebeab5d7fcaa3009c8984a9045dc83089c46d276152653eb156 SHA512 af1d3764cc3a6bb781a9a2357eeb8503886fc14481c3dbe4a899d3c672fea9325524aed3a4c1c87965bc4cce2fbae20b56b32690849afc1fcb751cd5462adbcc |
|||
DIST atomdep-fs-admin-0.1.7.tar.gz 5465 BLAKE2B 50e2f5a2b013d3ca877ad608f62c0bb5464b32af55167d3d97b5d03530ff53cf7e84360fe8de2a7e3b29a226ee462b4735ffe5a16d9e6a6e51027f5bd34431b6 SHA512 110362a2a50782d9d7f44acc88fbaf1c2031d0cd5549af6ee28c4617e10655804bd79320e41c44cc606b4c06075100c3a1bab0d5873ee98a995b048821ef84c1 |
|||
DIST atomdep-git-utils-5.2.1.tar.gz 4142068 BLAKE2B 7a803e0bbfb8c6afc2e7c82f782d3d80482646935b94e6d878d13120dc0294818a60bfb898a82d3fdea02300bbe473640c1c8fdf2ece9a531eb4b0eb564edad5 SHA512 3eb5da5f8a9bead8bdc94e29d794567969251ddc845c210871d8db9b75f998058bd55085a65d613ddc64ed3daa70544d845ed3557ab7822a2d9c95677bed61b4 |
|||
DIST atomdep-keyboard-layout-2.0.14.tar.gz 17919 BLAKE2B 9b2a83cf0b4db13e402d6a97fd8729041a25e7296f5e5be23181bad84a314a9012dc69cc387699b3edc5d37a98fcfe8923feb457c3f80e7d0db7b1610542e49b SHA512 42e09fa440bca1a8ba17ca1a3507718b9fb5408a5a42ef4749523dcb3902d876c85de0676a1cc7143455194b70c005a2367ce33418d423f763b2b30651380ad7 |
|||
DIST atomdep-keytar-4.3.0.tar.gz 8896 BLAKE2B 56d669320ee7eeb78eb676a76de6efe4417b80b5931507009b73cf4aa70b4125fd96a7b1ec0bf05ada86d3107dbdb82028517eccccabfb1d61b1fecd08261de8 SHA512 a5dfbefeff9f4b42d02a6cd6956e91d65ce24d716a85f19e4bab182dfb9322a132da90f301b8eeb5b496f1ff6d9c974410c9fff578404254f7e1502d97d87831 |
|||
DIST atomdep-nslog-3.0.0.tar.gz 2270 BLAKE2B 3258b7e7d7f94a89b0e5a21bfedfbe71bbfe3d776871aaeb3443ce6a7759860abfef2b8af823dab009183b5378c1ed06c7b2729df9acc09d3c5ea6a5f47ff160 SHA512 6a0ce8970ae12fdefd0935916e5501bb89e366fb66b05fffade884f3adf4add4b135eb4f0f208684e28424fdb9858ee8193eb1f3db1f7eac3cb49bdb5d1a4bb1 |
|||
DIST atomdep-oniguruma-7.0.2.tar.gz 584590 BLAKE2B 2e3e622fdf7c463fa670786f0af8815ffbb1d7a85ff5759b8b13fa2b4ed8cec5959b4186b09521a3060e42abb5d83505f7b925a18f41c99e4d9dab809e39ec01 SHA512 cc2b1d3714ebac1e3254f33185c20e0c6bf5a7835506ef56bec5a720684ca6ee5d8cee0c4165eb0bb60a8edcdaf8eca846aaa0cb6ec2a9859ad61e5ed830db8a |
|||
DIST atomdep-pathwatcher-8.0.1.tar.gz 18357 BLAKE2B 8e2b86da307757c352d0cab5eff64cc31e6745bf10a982f6ef11a0fd92eeeadf5b438aaaaa00e679100600691e59ff7aa7badf33e62c33a2497b5573cf7b4711 SHA512 34df8fecf456753f1977517018e5ff78b143f2d36e1417435bfcac2f9b9f8bd045a8080e7d0ad5d2930c63fa110c539911447863c46e757a4bb8f8c4f5bda999 |
|||
DIST atomdep-scrollbar-style-3.2.0.tar.gz 3498 BLAKE2B 2d1a88f2764b5a51da92e41f5dd5424a4ffbc13ec9b2e826236097ff7ebb0babd22b4e4cd00873e786aa52d901eedce49bd102ad6398eda614734bdd78b8b4e3 SHA512 9f5fcc2bcb13cb81e95a52aa6db0c99ffd67c9cd48a9faf0223587359f4082c3e867cb384497dc6be3e8230b4cd035e910a7048d431e81a28dfded0bc572da18 |
|||
DIST atomdep-spellchecker-3.5.0.tar.gz 476758 BLAKE2B 73ca0225bedf7daa0b9f9e3ad5a549cb124443de0887ee77f1a7a7c1e31f1a1c363a5f0118ecb17e70c4ae64338eac83c24dbe4cd13a6ae182d314d22bef3dc4 SHA512 5daed79d1ba562187937f5c435e2f63bcffcef95e12c18e8b3b05e9afd2b7dc815ea88cd60c4ab5ec714654189c27897dadebb798fa535425ea6d0f56cc6ae1d |
|||
DIST atomdep-superstring-2.3.4.tar.gz 822697 BLAKE2B 0e81ab0fe8d429c80298a70034c0645412e16dcd38540f5a87433689581c741b554a82739e6bb6954d316bd9a9a6425b9770b3880fe883e27199ea1aa10bbe81 SHA512 0dc3644c2741f45dc531945d5114802ec1e2fbb0d6a85088d1c1fe120f26c0183e93142ce86781dcbac652f088e5b101e83b65bb6a31f1460dd289cf37825e65 |
|||
DIST atomdep-tree-sitter-0.13.15.tar.gz 193608 BLAKE2B adcc1cec97e0675868b4782a4dede09bbad58e3d85fb55eba9ec0867bc4bc91045db8023aff3975471748297563325359cd6a4819c4474e5aedfec3e8d7565c9 SHA512 16ebd4f9cb0eeedfeb42a2dd2f7fb0e0983ee19976d98e2e0a2e0bf57fea246e7b667ef56733f7a07b434918298889acea0dd8edc109bc5ecafeb0b0d75abdd9 |
|||
DIST atomdep-tree-sitter-bash-0.13.6.tar.gz 346883 BLAKE2B f1a7bd0391d3d21223d889deb4e38ecf5e323051977cd42095fdb2ac458803968d1c435e6f7c12b0073486eb677ab2f2748fc7dd76e9228e746ac634221ea1c5 SHA512 9761d822c2f5f608950fa4f91b237db136afd4d545b708412b993f89785eb3a931a9a29fc3a652169af20e3c8281ab28ca117bc59bb4b1f2e1dfb6298c843712 |
|||
DIST atomdep-tree-sitter-c-0.13.7.tar.gz 192058 BLAKE2B e673311a6903736d204b149a983159f7ca52ffc3e1b44f7e800f6a8fcebb49059d6fd6e341506d50d19d3781b495bf0414f8794af2f9e6a93e341fd55fdfa264 SHA512 af533977d06be796c3c1a98fbc44f60cf46a4fdc0f233edd9766c462cdad5116398231863d9cfbe4ffb49befe9bf97466c6d8b9a1535d0af835aa0242e4f5ed5 |
|||
DIST atomdep-tree-sitter-cpp-0.13.8.tar.gz 610448 BLAKE2B df5ac56a6317c39b5ac1a4d248b0c96751ebed08868977417f68daf30a1c04806874128dd75667d7b543b3062d168ba570783df291931c0a3bed990526eea727 SHA512 3d3b488f8b1e277a73c9c961bf48f3207e6720faac5731d1ed9a02bd01fad0bd844180e867f2bc7b3bc278fe5d218d6808e0e191cf20c763d9fa7e326b34de4e |
|||
DIST atomdep-tree-sitter-css-0.13.7.tar.gz 79065 BLAKE2B 5671e6395f41b3dd2f3154d335e9b581507a8a7ad90ed3f4f27bd89055c96bef82d883984055dbf1675c93fe8aa9edce5151902261300d1cedf1dc7d955b9149 SHA512 c4c85564779300081c5f8991eb7ab32eecd5e477eba7c2217430ec2c0b276bba5b4f5107859c412bba68b1531fd5089c6db9491f81aa1409d9e9f3aa5036ca5d |
|||
DIST atomdep-tree-sitter-embedded-template-0.13.0.tar.gz 6153 BLAKE2B 7da15e09def3a4088b16f691273f0e99311aea53a20577a618026fbd3f4bd78d3cb4c5a6aa694ed3122465621128d26dd084c85d492f8a6d62246a1e50f29a2f SHA512 20956331c2f6060faa17e1e26ed1174c5e0213a03aea9a464aa53c13ed9d767da90aa0ed646444848f8a7ea7ab17d369292a353ad6ef8578845cf75740034b1a |
|||
DIST atomdep-tree-sitter-go-0.13.3.tar.gz 162468 BLAKE2B a3530580f1cddd672807d1d4c6652405a0558edf7d362523d507edacb6ba2abefa58fefe50d762e9c611ab51f6a4b6e62000f2e898058ac3f892fe6e6a11940c SHA512 a579e5103330ac276761a3b37c4ce53255aa644283257106e1b3ef73d8f925277b2180d606bc31a3e5d7bab68b4a56e3d6624bda428b2033bc70a0cdc54b1c1f |
|||
DIST atomdep-tree-sitter-html-0.13.5.tar.gz 13738 BLAKE2B c33b69eeb6b1eba0c864988eafe49327eb2f9a770678b03c49548aeb2fff2a1f31a5132565ca4025c008914a410d6cd0a757e9e435efc90cba58443cc2dc88be SHA512 95ac288df0e58fff6e8c462f2e85b8f964d3876a1cad80983f60f0e4b9b0c6ebef136947aff0f845603c5b53788e9479f2d55e7f4492aa79d0c09925d6934878 |
|||
DIST atomdep-tree-sitter-javascript-0.13.8.tar.gz 1729028 BLAKE2B ea2c8de9091ae224e595b0f50d4b32797c0b87937698b074e6603cdde0ecbfd57e6da7d9d6540d0de7175c6386130de5fb3db6a537a935c121eee8c5ae46879a SHA512 a7bbba657117d6c2238063408ae48d9cae8f4a5e45894b10cc457640e018547e46375ddc52752ca1afc189a0cc590dee75da0d5f04ddc6107c530340a258b341 |
|||
DIST atomdep-tree-sitter-python-0.13.4.tar.gz 204998 BLAKE2B 54d22a4482705cf482cd13bf8786f2d4a26e709b836007a1cd2bf43a537738a2b27474bc050253462f834f7f211b4c6b5b8b82cc3a1de41faa334c93fdc02db3 SHA512 250ef9ffaf15b0f3125ad7a88ad37181d4e5030e6ca5b4c518ad97822478d6d893b6493c70e35db5f07b3dedb25928285c60cdb5cbb4fd392ae07acaad6aca7d |
|||
DIST atomdep-tree-sitter-regex-0.13.1.tar.gz 17153 BLAKE2B 44e137c5464af5e77011a9d8bb9cd6ffa7abf50bbd27a6fc3b8e53739fd6e6c664bce7c1ed348ecbb2a27e8f301caa8a783c5ba756870622fbe1bfe76ee4a8bb SHA512 03e50bb9539cdfb34e8e69a675da97311c14abc839d4509167b612ba92dd15c1e7825d5a748de70513ec902f40f1efbef6317ee5f2f2b700385fab875bfbff9a |
|||
DIST atomdep-tree-sitter-ruby-0.13.11.tar.gz 2020951 BLAKE2B 106eb35468106d971338e3387484470a61c84da8a1a2f9632eecd0e84fe13dc801da527652817633083469668f03cc9ea4241526cfe414a7c0c2c2d96d44f311 SHA512 101981059db4c9aa11a834604287fd622af6f7fde5bf9718ff2f140d40b51b345fe6961de02b185345808c827b77202ffb79fba77cbf2ceb9793224b888375c0 |
|||
DIST atomdep-tree-sitter-typescript-0.13.6.tar.gz 662334 BLAKE2B a4e7898fc115fd73c9a86578aa214cfb11ac0b57bcfe3db8226463a7613d78bec11b987311f8ee884a4aa679ff16deaee158eb36ba8a370be65daff98e41cdac SHA512 d5cb2f0ab5b981fe1de03d195c272db150ebd0cf9f3825d87d7fd3bdee8e01e1d4745bb426c23e084b12e97dd51fbba65f9ffad910d87b57306ef3a10ae2225c |
|||
DIST nodejs-nan-2.11.1.tar.gz 170929 BLAKE2B 21287b45865c578257399abddd2fb6a7234891da47bb97073b7595ace6bafc83630f44141d871b061e5d13b6c4b9e02c0d4883ef0a6d6f0d9851ff645a0ab616 SHA512 a80c2857c2f15c085c506cabd081338e25a5de2028327567a039ed9219b912d36ebdfec80f13bebab9872b981d86a2fcc2c8145739b428b8f4148d1a883e408f |
@ -1,562 +0,0 @@ |
|||
# Copyright 1999-2019 Gentoo Authors |
|||
# Distributed under the terms of the GNU General Public License v2 |
|||
|
|||
# NOTE: this ebuild has been generated by atom-ebuild-gen.py from the |
|||
# atom overlay. If you would like to make changes, please consider |
|||
# modifying the ebuild template and submitting a PR to |
|||
# https://github.com/elprans/atom-overlay. |
|||
|
|||
EAPI=7 |
|||
|
|||
PYTHON_COMPAT=( python2_7 ) |
|||
inherit multiprocessing python-single-r1 rpm xdg-utils |
|||
|
|||
DESCRIPTION="A hackable text editor for the 21st Century" |
|||
HOMEPAGE="https://atom.io" |
|||
MY_PV="${PV//_/-}" |
|||
|
|||
ELECTRON_V=2.0.9 |
|||
ELECTRON_SLOT=2.0 |
|||
|
|||
ASAR_V=0.14.3 |
|||
# All binary packages depend on this |
|||
NAN_V=2.11.1 |
|||
|
|||
ATOM__NSFW_V=1.0.18 |
|||
ATOM__WATCHER_V=1.0.8 |
|||
CACHED_RUN_IN_THIS_CONTEXT_V=0.5.0 |
|||
CTAGS_V=3.0.0 |
|||
FS_ADMIN_V=0.1.7 |
|||
GIT_UTILS_V=5.2.1 |
|||
KEYBOARD_LAYOUT_V=2.0.14 |
|||
KEYTAR_V=4.3.0 |
|||
NSLOG_V=3.0.0 |
|||
ONIGURUMA_V=7.0.2 |
|||
PATHWATCHER_V=8.0.1 |
|||
SCROLLBAR_STYLE_V=3.2.0 |
|||
SPELLCHECKER_V=3.5.0 |
|||
SUPERSTRING_V=2.3.4 |
|||
TREE_SITTER_V=0.13.15 |
|||
TREE_SITTER_BASH_V=0.13.6 |
|||
TREE_SITTER_C_V=0.13.7 |
|||
TREE_SITTER_CPP_V=0.13.8 |
|||
TREE_SITTER_CSS_V=0.13.7 |
|||
TREE_SITTER_EMBEDDED_TEMPLATE_V=0.13.0 |
|||
TREE_SITTER_GO_V=0.13.3 |
|||
TREE_SITTER_HTML_V=0.13.5 |
|||
TREE_SITTER_JAVASCRIPT_V=0.13.8 |
|||
TREE_SITTER_PYTHON_V=0.13.4 |
|||
TREE_SITTER_REGEX_V=0.13.1 |
|||
TREE_SITTER_RUBY_V=0.13.11 |
|||
TREE_SITTER_TYPESCRIPT_V=0.13.6 |
|||
|
|||
# The x86_64 arch below is irrelevant, as we will rebuild all binary packages. |
|||
SRC_URI=" |
|||
https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/atom.x86_64.rpm -> atom-bin-${MY_PV}.rpm |
|||
https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> atom-${MY_PV}.tar.gz |
|||
https://github.com/elprans/asar/releases/download/v${ASAR_V}-gentoo/asar-build.tar.gz -> asar-${ASAR_V}.tar.gz |
|||
https://github.com/nodejs/nan/archive/v${NAN_V}.tar.gz -> nodejs-nan-${NAN_V}.tar.gz |
|||
https://registry.npmjs.org/@atom/nsfw/-/nsfw-1.0.18.tgz -> atomdep-atom--nsfw-${ATOM__NSFW_V}.tar.gz |
|||
https://registry.npmjs.org/@atom/watcher/-/watcher-1.0.8.tgz -> atomdep-atom--watcher-${ATOM__WATCHER_V}.tar.gz |
|||
https://registry.npmjs.org/cached-run-in-this-context/-/cached-run-in-this-context-0.5.0.tgz -> atomdep-cached-run-in-this-context-${CACHED_RUN_IN_THIS_CONTEXT_V}.tar.gz |
|||
https://registry.npmjs.org/ctags/-/ctags-3.0.0.tgz -> atomdep-ctags-${CTAGS_V}.tar.gz |
|||
https://registry.npmjs.org/fs-admin/-/fs-admin-0.1.7.tgz -> atomdep-fs-admin-${FS_ADMIN_V}.tar.gz |
|||
https://registry.npmjs.org/git-utils/-/git-utils-5.2.1.tgz -> atomdep-git-utils-${GIT_UTILS_V}.tar.gz |
|||
https://registry.npmjs.org/keyboard-layout/-/keyboard-layout-2.0.14.tgz -> atomdep-keyboard-layout-${KEYBOARD_LAYOUT_V}.tar.gz |
|||
https://registry.npmjs.org/keytar/-/keytar-4.3.0.tgz -> atomdep-keytar-${KEYTAR_V}.tar.gz |
|||
https://registry.npmjs.org/nslog/-/nslog-3.0.0.tgz -> atomdep-nslog-${NSLOG_V}.tar.gz |
|||
https://registry.npmjs.org/oniguruma/-/oniguruma-7.0.2.tgz -> atomdep-oniguruma-${ONIGURUMA_V}.tar.gz |
|||
https://registry.npmjs.org/pathwatcher/-/pathwatcher-8.0.1.tgz -> atomdep-pathwatcher-${PATHWATCHER_V}.tar.gz |
|||
https://registry.npmjs.org/scrollbar-style/-/scrollbar-style-3.2.0.tgz -> atomdep-scrollbar-style-${SCROLLBAR_STYLE_V}.tar.gz |
|||
https://registry.npmjs.org/spellchecker/-/spellchecker-3.5.0.tgz -> atomdep-spellchecker-${SPELLCHECKER_V}.tar.gz |
|||
https://registry.npmjs.org/superstring/-/superstring-2.3.4.tgz -> atomdep-superstring-${SUPERSTRING_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.13.15.tgz -> atomdep-tree-sitter-${TREE_SITTER_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-bash/-/tree-sitter-bash-0.13.6.tgz -> atomdep-tree-sitter-bash-${TREE_SITTER_BASH_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-c/-/tree-sitter-c-0.13.7.tgz -> atomdep-tree-sitter-c-${TREE_SITTER_C_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-cpp/-/tree-sitter-cpp-0.13.8.tgz -> atomdep-tree-sitter-cpp-${TREE_SITTER_CPP_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-css/-/tree-sitter-css-0.13.7.tgz -> atomdep-tree-sitter-css-${TREE_SITTER_CSS_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-embedded-template/-/tree-sitter-embedded-template-0.13.0.tgz -> atomdep-tree-sitter-embedded-template-${TREE_SITTER_EMBEDDED_TEMPLATE_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-go/-/tree-sitter-go-0.13.3.tgz -> atomdep-tree-sitter-go-${TREE_SITTER_GO_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-html/-/tree-sitter-html-0.13.5.tgz -> atomdep-tree-sitter-html-${TREE_SITTER_HTML_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-javascript/-/tree-sitter-javascript-0.13.8.tgz -> atomdep-tree-sitter-javascript-${TREE_SITTER_JAVASCRIPT_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-python/-/tree-sitter-python-0.13.4.tgz -> atomdep-tree-sitter-python-${TREE_SITTER_PYTHON_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-regex/-/tree-sitter-regex-0.13.1.tgz -> atomdep-tree-sitter-regex-${TREE_SITTER_REGEX_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-ruby/-/tree-sitter-ruby-0.13.11.tgz -> atomdep-tree-sitter-ruby-${TREE_SITTER_RUBY_V}.tar.gz |
|||
https://registry.npmjs.org/tree-sitter-typescript/-/tree-sitter-typescript-0.13.6.tgz -> atomdep-tree-sitter-typescript-${TREE_SITTER_TYPESCRIPT_V}.tar.gz |
|||
" |
|||
|
|||
BINMODS=( |
|||
atom--nsfw |
|||
atom--watcher |
|||
cached-run-in-this-context |
|||
ctags |
|||
fs-admin |
|||
git-utils |
|||
keyboard-layout |
|||
keytar |
|||
nslog |
|||
oniguruma |
|||
pathwatcher |
|||
scrollbar-style |
|||
spellchecker |
|||
superstring |
|||
tree-sitter |
|||
tree-sitter-bash |
|||
tree-sitter-c |
|||
tree-sitter-cpp |
|||
tree-sitter-css |
|||
tree-sitter-embedded-template |
|||
tree-sitter-go |
|||
tree-sitter-html |
|||
tree-sitter-javascript |
|||
tree-sitter-python |
|||
tree-sitter-regex |
|||
tree-sitter-ruby |
|||
tree-sitter-typescript |
|||
) |
|||
|
|||
LICENSE="MIT" |
|||
SLOT="0" |
|||
KEYWORDS="~amd64" |
|||
IUSE="" |
|||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
|||
|
|||
BDEPEND=" |
|||
${PYTHON_DEPS} |
|||
>=dev-util/electron-${ELECTRON_V}:${ELECTRON_SLOT} |
|||
" |
|||
|
|||
DEPEND=" |
|||
>=app-text/hunspell-1.3.3:= |
|||
>=dev-libs/libgit2-0.23:=[ssh] |
|||
>=dev-libs/libpcre2-10.22:=[jit,pcre16] |
|||
>=dev-libs/oniguruma-6.6.0:= |
|||
>=dev-util/ctags-5.8 |
|||
>=gnome-base/libgnome-keyring-3.12:= |
|||
x11-libs/libxkbfile |
|||
" |
|||
|
|||
RDEPEND=" |
|||
${DEPEND} |
|||
>=dev-util/electron-${ELECTRON_V}:${ELECTRON_SLOT} |
|||
dev-vcs/git |
|||
!sys-apps/apmd |
|||
${PYTHON_DEPS} |
|||
" |
|||
|
|||
S="${WORKDIR}/${PN}-${MY_PV}" |
|||
BIN_S="${WORKDIR}/${PN}-bin-${MY_PV}" |
|||
BUILD_DIR="${S}/out" |
|||
|
|||
pkg_setup() { |
|||
python-single-r1_pkg_setup |
|||
} |
|||
|
|||
src_unpack() { |
|||
local a |
|||
|
|||
mkdir "${BIN_S}" || die |
|||
|
|||
for a in ${A} ; do |
|||
case "${a}" in |
|||
*.rpm) |
|||
pushd "${BIN_S}" >/dev/null || die |
|||
srcrpm_unpack "${a}" |
|||
popd >/dev/null || die |
|||
;; |
|||
|
|||
*.tar|*.tar.gz|*.tar.bz2|*.tar.xz) |
|||
# Tarballs on registry.npmjs.org are wildly inconsistent, |
|||
# and violate the convention of having ${P} as the top |
|||
# directory name, so we strip the first component and |
|||
# unpack into a correct directory explicitly. |
|||
local basename=${a%.tar.*} |
|||
local destdir=${WORKDIR}/${basename#atomdep-} |
|||
mkdir "${destdir}" || die |
|||
tar -C "${destdir}" -x -o --strip-components 1 \ |
|||
-f "${DISTDIR}/${a}" || die |
|||
;; |
|||
|
|||
*) |
|||
# Fallback to the default unpacker. |
|||
unpack "${a}" |
|||
;; |
|||
esac |
|||
done |
|||
} |
|||
|
|||
src_prepare() { |
|||
local suffix="$(get_install_suffix)" |
|||
local atom_rpmdir=$(get_atom_rpmdir) |
|||
local install_dir="${EPREFIX}$(get_install_dir)" |
|||
local electron_dir="${EPREFIX}$(get_electron_dir)" |
|||
local electron_path="${electron_dir}/electron" |
|||
local node_path="${electron_dir}/node" |
|||
local node_includes="${EPREFIX}$(get_node_includedir)" |
|||
local binmod |
|||
local pkgdir |
|||
|
|||
mkdir "${BUILD_DIR}" || die |
|||
cp -a "${BIN_S}/${atom_rpmdir}/resources/app" \ |
|||
"${BUILD_DIR}/app" || die |
|||
|
|||
# Add source files omitted from the upstream binary distribution, |
|||
# and which we want to include in ours. |
|||
cp -a "${S}/spec" "${BUILD_DIR}/app" || die |
|||
|
|||
# Unpack app.asar |
|||
easar extract "${BIN_S}/${atom_rpmdir}/resources/app.asar" \ |
|||
"${BUILD_DIR}/app" |
|||
|
|||
cd "${BUILD_DIR}/app" || die |
|||
|
|||
eapply "${FILESDIR}/apm-python.patch" |
|||
eapply "${FILESDIR}/atom-unbundle-electron-r3.patch" |
|||
eapply "${FILESDIR}/atom-python-r1.patch" |
|||
eapply "${FILESDIR}/atom-apm-path-r2.patch" |
|||
eapply "${FILESDIR}/atom-fix-app-restart-r2.patch" |
|||
eapply "${FILESDIR}/atom-marker-layer-r1.patch" |
|||
eapply "${FILESDIR}/atom-fix-config-watcher-r1.patch" |
|||
|
|||
sed -i -e "s|path.join(process.resourcesPath, 'LICENSE.md')|'/usr/share/licenses/$(get_atom_appname)/LICENSE.md'|g" \ |
|||
./src/main-process/atom-application.js \ |
|||
|| die |
|||
|
|||
sed -i -e "s|{{NPM_CONFIG_NODEDIR}}|${node_includes}|g" \ |
|||
-e "s|{{ATOM_PATH}}|${electron_path}|g" \ |
|||
-e "s|{{ATOM_RESOURCE_PATH}}|${install_dir}/app.asar|g" \ |
|||
-e "s|{{ATOM_PREFIX}}|${EPREFIX}|g" \ |
|||
-e "s|^#!/bin/bash|#!${EPREFIX}/bin/bash|g" \ |
|||
./atom.sh \ |
|||
|| die |
|||
|
|||
local env="export NPM_CONFIG_NODEDIR=${node_includes}\nexport ELECTRON_NO_ASAR=1" |
|||
sed -i -e \ |
|||
"s|\"\$binDir/\$nodeBin\"|${env}\nexec \"${node_path}\"|g" \ |
|||
apm/bin/apm || die |
|||
|
|||
sed -i -e \ |
|||
"s|^\([[:space:]]*\)node[[:space:]]\+|\1\"${node_path}\" |g" \ |
|||
apm/node_modules/npm/bin/node-gyp-bin/node-gyp || die |
|||
|
|||
sed -i -e \ |
|||
"s|atomCommand = 'atom';|atomCommand = '${EPREFIX}/usr/bin/atom${suffix}'|g" \ |
|||
apm/lib/test.js || die |
|||
|
|||
rm apm/bin/node || die |
|||
|
|||
sed -i -e "s|/${atom_rpmdir}/atom|${EPREFIX}/usr/bin/atom${suffix}|g" \ |
|||
"${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" || die |
|||
|
|||
for binmod in "${BINMODS[@]}"; do |
|||
pkgdir="${WORKDIR}/$(package_dir ${binmod})" |
|||
cd "${pkgdir}" || die |
|||
if have_patches_for "${binmod}"; then |
|||
eapply "${FILESDIR}"/${binmod}-*.patch |
|||
fi |
|||
done |
|||
|
|||
cd "${BUILD_DIR}/app" || die |
|||
|
|||
# Unbundle bundled libs from modules |
|||
|
|||
pkgdir="${WORKDIR}/$(package_dir git-utils)" |
|||
${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
|||
--inplace --unbundle "git;libgit2;git2" \ |
|||
"${pkgdir}/binding.gyp" || die |
|||
|
|||
pkgdir="${WORKDIR}/$(package_dir oniguruma)" |
|||
${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
|||
--inplace --unbundle "onig_scanner;oniguruma;onig" \ |
|||
"${pkgdir}/binding.gyp" || die |
|||
|
|||
pkgdir="${WORKDIR}/$(package_dir spellchecker)" |
|||
${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
|||
--inplace --unbundle "spellchecker;hunspell;hunspell" \ |
|||
"${pkgdir}/binding.gyp" || die |
|||
|
|||
pkgdir="${WORKDIR}/$(package_dir superstring)" |
|||
${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
|||
--inplace --unbundle \ |
|||
"superstring_core;./vendor/pcre/pcre.gyp:pcre;pcre2-16; \ |
|||
-DPCRE2_CODE_UNIT_WIDTH=16" \ |
|||
"${pkgdir}/binding.gyp" || die |
|||
|
|||
for binmod in "${BINMODS[@]}"; do |
|||
pkgdir="${WORKDIR}/$(package_dir ${binmod})" |
|||
mkdir -p "${pkgdir}/node_modules" || die |
|||
ln -s "${WORKDIR}/nodejs-nan-${NAN_V}" \ |
|||
"${pkgdir}/node_modules/nan" || die |
|||
done |
|||
|
|||
sed -i -e "s|{{ATOM_PREFIX}}|${EPREFIX}|g" \ |
|||
"${BUILD_DIR}/app/src/config-schema.js" || die |
|||
|
|||
sed -i -e "s|{{ATOM_SUFFIX}}|${suffix}|g" \ |
|||
"${BUILD_DIR}/app/src/config-schema.js" || die |
|||
|
|||
eapply_user |
|||
} |
|||
|
|||
src_configure() { |
|||
local binmod |
|||
|
|||
for binmod in "${BINMODS[@]}"; do |
|||
einfo "Configuring ${binmod}..." |
|||
cd "${WORKDIR}/$(package_dir ${binmod})" || die |
|||
enodegyp_atom configure |
|||
done |
|||
} |
|||
|
|||
src_compile() { |
|||
local binmod |
|||
local ctags_d="node_modules/symbols-view/vendor" |
|||
local jobs=$(makeopts_jobs) |
|||
local unpacked_paths |
|||
|
|||
# Transpile any yet untranspiled files. |
|||
ecoffeescript "${BUILD_DIR}"/app/spec/'*.coffee' |
|||
|
|||
mkdir -p "${BUILD_DIR}/modules/" || die |
|||
|
|||
for binmod in "${BINMODS[@]}"; do |
|||
local binmod_name=${binmod##node-} |
|||
|
|||
einfo "Building ${binmod}..." |
|||
cd "${WORKDIR}/$(package_dir ${binmod})" || die |
|||
enodegyp_atom --verbose --jobs="$(makeopts_jobs)" build |
|||
mkdir -p "${BUILD_DIR}/modules/${binmod_name}" || die |
|||
cp build/Release/*.node "${BUILD_DIR}/modules/${binmod_name}" || die |
|||
done |
|||
|
|||
# Put compiled binary modules in place |
|||
fix_binmods "${BUILD_DIR}/app" "apm" |
|||
fix_binmods "${BUILD_DIR}/app" "node_modules" |
|||
|
|||
# Remove non-Linux vendored ctags binaries |
|||
rm "${BUILD_DIR}/app/${ctags_d}/ctags-darwin" \ |
|||
"${BUILD_DIR}/app/${ctags_d}/ctags-win32.exe" || die |
|||
|
|||
# Remove bundled git |
|||
rm -r "${BUILD_DIR}/app/node_modules/dugite/git" || die |
|||
|
|||
# Re-pack app.asar |
|||
# Keep unpack rules in sync with buildAsarUnpackGlobExpression() |
|||
# in script/lib/package-application.js |
|||
unpacked_paths=( |
|||
"*.node" |
|||
"ctags-config" |
|||
"ctags-linux" |
|||
"**/spec/fixtures/**" |
|||
"**/node_modules/github/bin/**" |
|||
"**/node_modules/spellchecker/**" |
|||
"**/resources/atom.png") |
|||
|
|||
unpacked_paths=$(IFS=,; echo "${unpacked_paths[*]}") |
|||
|
|||
cd "${BUILD_DIR}" || die |
|||
easar pack --unpack="{${unpacked_paths}}" --unpack-dir=apm "app" "app.asar" |
|||
|
|||
rm -r "${BUILD_DIR}/app.asar.unpacked/apm" || die |
|||
|
|||
# Replace vendored ctags with a symlink to system ctags |
|||
rm "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die |
|||
ln -s "${EPREFIX}/usr/bin/ctags" \ |
|||
"${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die |
|||
} |
|||
|
|||
src_install() { |
|||
local install_dir="$(get_install_dir)" |
|||
local suffix="$(get_install_suffix)" |
|||
|
|||
insinto "${install_dir}" |
|||
|
|||
doins "${BUILD_DIR}/app.asar" |
|||
doins -r "${BUILD_DIR}/app.asar.unpacked" |
|||
|
|||
insinto "${install_dir}/app" |
|||
doins -r "${BUILD_DIR}/app/apm" |
|||
|
|||
insinto "/usr/share/applications/" |
|||
newins "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" \ |
|||
"atom${suffix}.desktop" |
|||
|
|||
insinto "/usr/share/icons/" |
|||
doins -r "${BIN_S}/usr/share/icons/hicolor" |
|||
|
|||
exeinto "${install_dir}" |
|||
newexe "${BUILD_DIR}/app/atom.sh" atom |
|||
insinto "/usr/share/licenses/${PN}${suffix}" |
|||
doins "${BIN_S}/$(get_atom_rpmdir)/resources/LICENSE.md" |
|||
dosym "../..${install_dir}/atom" "/usr/bin/atom${suffix}" |
|||
dosym "../..${install_dir}/app/apm/bin/apm" "/usr/bin/apm${suffix}" |
|||
|
|||
fix_executables "${install_dir}/app/apm/bin" |
|||
fix_executables "${install_dir}/app/apm/node_modules/.bin" |
|||
fix_executables "${install_dir}/app/apm/node_modules/npm/bin" |
|||
fix_executables "${install_dir}/app/apm/node_modules/npm/bin/node-gyp-bin" |
|||
fix_executables "${install_dir}/app/apm/node_modules/node-gyp/bin" |
|||
} |
|||
|
|||
pkg_postinst() { |
|||
xdg_desktop_database_update |
|||
xdg_mimeinfo_database_update |
|||
} |
|||
|
|||
pkg_postrm() { |
|||
xdg_desktop_database_update |
|||
xdg_mimeinfo_database_update |
|||
} |
|||
|
|||
# Helpers |
|||
# ------- |
|||
|
|||
# Return the installation suffix appropriate for the slot. |
|||
get_install_suffix() { |
|||
local slot=${SLOT%%/*} |
|||
local suffix |
|||
|
|||
if [[ "${slot}" == "0" ]]; then |
|||
suffix="" |
|||
else |
|||
suffix="-${slot}" |
|||
fi |
|||
|
|||
echo "${suffix}" |
|||
} |
|||
|
|||
# Return the upstream app name appropriate for $PV. |
|||
get_atom_appname() { |
|||
if [[ "${PV}" == *beta* ]]; then |
|||
echo "atom-beta" |
|||
else |
|||
echo "atom" |
|||
fi |
|||
} |
|||
|
|||
# Return the app installation path inside the upstream archive. |
|||
get_atom_rpmdir() { |
|||
echo "usr/share/$(get_atom_appname)" |
|||
} |
|||
|
|||
# Return the installation target directory. |
|||
get_install_dir() { |
|||
echo "/usr/$(get_libdir)/atom$(get_install_suffix)" |
|||
} |
|||
|
|||
# Return the Electron installation directory. |
|||
get_electron_dir() { |
|||
echo "/usr/$(get_libdir)/electron-${ELECTRON_SLOT}" |
|||
} |
|||
|
|||
# Return the directory containing appropriate Node headers |
|||
# for the required version of Electron. |
|||
get_node_includedir() { |
|||
echo "/usr/include/electron-${ELECTRON_SLOT}/node/" |
|||
} |
|||
|
|||
# Run JavaScript using Electron's version of Node. |
|||
enode_electron() { |
|||
"${BROOT}/$(get_electron_dir)"/node "${@}" |
|||
} |
|||
|
|||
# Run node-gyp using Electron's version of Node. |
|||
enodegyp_atom() { |
|||
local apmpath="$(get_atom_rpmdir)/resources/app/apm" |
|||
local nodegyp="${BIN_S}/${apmpath}/node_modules/node-gyp/bin/node-gyp.js" |
|||
|
|||
PATH="${BROOT}/$(get_electron_dir):${PATH}" \ |
|||
enode_electron "${nodegyp}" \ |
|||
--nodedir="${BROOT}/$(get_node_includedir)" "${@}" || die |
|||
} |
|||
|
|||
# Coffee Script wrapper. |
|||
ecoffeescript() { |
|||
local cscript="${FILESDIR}/transpile-coffee-script.js" |
|||
|
|||
echo "ecoffeescript" "${@}" |
|||
echo ATOM_HOME="${T}/.atom" ATOM_SRC_ROOT="${BUILD_DIR}/app" \ |
|||
NODE_PATH="${BUILD_DIR}/app/node_modules" \ |
|||
enode_electron "${cscript}" "${@}" || die |
|||
ATOM_HOME="${T}/.atom" ATOM_SRC_ROOT="${BUILD_DIR}/app" \ |
|||
NODE_PATH="${BUILD_DIR}/app/node_modules" \ |
|||
enode_electron "${cscript}" "${@}" || die |
|||
} |
|||
|
|||
# asar wrapper. |
|||
easar() { |
|||
local asar="${WORKDIR}/$(package_dir asar)/node_modules/asar/bin/asar" |
|||
echo "asar" "${@}" |
|||
enode_electron "${asar}" "${@}" || die |
|||
} |
|||
|
|||
# Return a $WORKDIR directory for a given package name. |
|||
package_dir() { |
|||
local binmod="${1//-/_}" |
|||
local binmod_v="${binmod^^}_V" |
|||
if [[ -z "${binmod_v}" ]]; then |
|||
die "${binmod_v} is not set." |
|||
fi |
|||
|
|||
echo ${1}-${!binmod_v} |
|||
} |
|||
|
|||
# Check if there are patches for a given package. |
|||
have_patches_for() { |
|||
local patches="${1}-*.patch" |
|||
local found |
|||
found=$(find "${FILESDIR}" -maxdepth 1 -name "${patches}" -print -quit) |
|||
test -n "${found}" |
|||
} |
|||
|
|||
# Replace binary node modules with the newly compiled versions thereof. |
|||
fix_binmods( |