ALT Linux Bugzilla
– Attachment 7215 Details for
Bug 33922
Модуль selinux не загружается после пересборки с новым swig
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Разница __init__.py от swig между версиями 3.0.8 и 3.0.12 (коммит из 3.0.9)
__init__.py.diff (text/plain), 15.05 KB, created by
Evgeny Sinelnikov
on 2017-09-26 15:26:25 MSK
(
hide
)
Description:
Разница __init__.py от swig между версиями 3.0.8 и 3.0.12 (коммит из 3.0.9)
Filename:
MIME Type:
Creator:
Evgeny Sinelnikov
Created:
2017-09-26 15:26:25 MSK
Size:
15.05 KB
patch
obsolete
>--- /usr/lib64/python2.7/site-packages/selinux/x__init__.py-2 2017-09-26 12:28:42.838000000 +0300 >+++ /usr/lib64/python2.7/site-packages/selinux/x__init__.py-2.1 2017-09-26 11:32:52.000000000 +0300 >@@ -1,15 +1,22 @@ > # This file was automatically generated by SWIG (http://www.swig.org). >-# Version 3.0.8 >+# Version 3.0.12 > # > # Do not make changes to this file unless you know what you are doing--modify > # the SWIG interface file instead. > >- >- >- >- >-from sys import version_info >-if version_info >= (2, 6, 0): >+from sys import version_info as _swig_python_version_info >+if _swig_python_version_info >= (2, 7, 0): >+ def swig_import_helper(): >+ import importlib >+ pkg = __name__.rpartition('.')[0] >+ mname = '.'.join((pkg, '_selinux')).lstrip('.') >+ try: >+ return importlib.import_module(mname) >+ except ImportError: >+ return importlib.import_module('_selinux') >+ _selinux = swig_import_helper() >+ del swig_import_helper >+elif _swig_python_version_info >= (2, 6, 0): > def swig_import_helper(): > from os.path import dirname > import imp >@@ -19,22 +26,27 @@ > except ImportError: > import _selinux > return _selinux >- if fp is not None: >- try: >- _mod = imp.load_module('_selinux', fp, pathname, description) >- finally: >+ try: >+ _mod = imp.load_module('_selinux', fp, pathname, description) >+ finally: >+ if fp is not None: > fp.close() >- return _mod >+ return _mod > _selinux = swig_import_helper() > del swig_import_helper > else: > import _selinux >-del version_info >+del _swig_python_version_info >+ > try: > _swig_property = property > except NameError: > pass # Python < 2.2 doesn't have 'property'. > >+try: >+ import builtins as __builtin__ >+except ImportError: >+ import __builtin__ > > def _swig_setattr_nondynamic(self, class_type, name, value, static=1): > if (name == "thisown"): >@@ -59,39 +71,32 @@ > return _swig_setattr_nondynamic(self, class_type, name, value, 0) > > >-def _swig_getattr_nondynamic(self, class_type, name, static=1): >+def _swig_getattr(self, class_type, name): > if (name == "thisown"): > return self.this.own() > method = class_type.__swig_getmethods__.get(name, None) > if method: > return method(self) >- if (not static): >- return object.__getattr__(self, name) >- else: >- raise AttributeError(name) >- >-def _swig_getattr(self, class_type, name): >- return _swig_getattr_nondynamic(self, class_type, name, 0) >+ raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) > > > def _swig_repr(self): > try: > strthis = "proxy of " + self.this.__repr__() >- except Exception: >+ except __builtin__.Exception: > strthis = "" > return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) > > try: > _object = object > _newclass = 1 >-except AttributeError: >+except __builtin__.Exception: > class _object: > pass > _newclass = 0 > > > >- > import shutil, os, errno, stat > > DISABLED = -1 >@@ -161,7 +166,7 @@ > this = _selinux.new_security_id() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_security_id > __del__ = lambda self: None >@@ -211,7 +216,7 @@ > this = _selinux.new_avc_entry_ref() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_avc_entry_ref > __del__ = lambda self: None >@@ -237,7 +242,7 @@ > this = _selinux.new_avc_memory_callback() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_avc_memory_callback > __del__ = lambda self: None >@@ -263,7 +268,7 @@ > this = _selinux.new_avc_log_callback() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_avc_log_callback > __del__ = lambda self: None >@@ -289,7 +294,7 @@ > this = _selinux.new_avc_thread_callback() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_avc_thread_callback > __del__ = lambda self: None >@@ -323,18 +328,14 @@ > this = _selinux.new_avc_lock_callback() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_avc_lock_callback > __del__ = lambda self: None > avc_lock_callback_swigregister = _selinux.avc_lock_callback_swigregister > avc_lock_callback_swigregister(avc_lock_callback) > >- >-_selinux.AVC_OPT_UNUSED_swigconstant(_selinux) > AVC_OPT_UNUSED = _selinux.AVC_OPT_UNUSED >- >-_selinux.AVC_OPT_SETENFORCE_swigconstant(_selinux) > AVC_OPT_SETENFORCE = _selinux.AVC_OPT_SETENFORCE > > def avc_init(msgprefix, mem_callbacks, log_callbacks, thread_callbacks, lock_callbacks): >@@ -376,32 +377,14 @@ > def avc_compute_member(ssid, tsid, tclass): > return _selinux.avc_compute_member(ssid, tsid, tclass) > avc_compute_member = _selinux.avc_compute_member >- >-_selinux.AVC_CALLBACK_GRANT_swigconstant(_selinux) > AVC_CALLBACK_GRANT = _selinux.AVC_CALLBACK_GRANT >- >-_selinux.AVC_CALLBACK_TRY_REVOKE_swigconstant(_selinux) > AVC_CALLBACK_TRY_REVOKE = _selinux.AVC_CALLBACK_TRY_REVOKE >- >-_selinux.AVC_CALLBACK_REVOKE_swigconstant(_selinux) > AVC_CALLBACK_REVOKE = _selinux.AVC_CALLBACK_REVOKE >- >-_selinux.AVC_CALLBACK_RESET_swigconstant(_selinux) > AVC_CALLBACK_RESET = _selinux.AVC_CALLBACK_RESET >- >-_selinux.AVC_CALLBACK_AUDITALLOW_ENABLE_swigconstant(_selinux) > AVC_CALLBACK_AUDITALLOW_ENABLE = _selinux.AVC_CALLBACK_AUDITALLOW_ENABLE >- >-_selinux.AVC_CALLBACK_AUDITALLOW_DISABLE_swigconstant(_selinux) > AVC_CALLBACK_AUDITALLOW_DISABLE = _selinux.AVC_CALLBACK_AUDITALLOW_DISABLE >- >-_selinux.AVC_CALLBACK_AUDITDENY_ENABLE_swigconstant(_selinux) > AVC_CALLBACK_AUDITDENY_ENABLE = _selinux.AVC_CALLBACK_AUDITDENY_ENABLE >- >-_selinux.AVC_CALLBACK_AUDITDENY_DISABLE_swigconstant(_selinux) > AVC_CALLBACK_AUDITDENY_DISABLE = _selinux.AVC_CALLBACK_AUDITDENY_DISABLE >- >-_selinux.AVC_CACHE_STATS_swigconstant(_selinux) > AVC_CACHE_STATS = _selinux.AVC_CACHE_STATS > class avc_cache_stats(_object): > __swig_setmethods__ = {} >@@ -446,7 +429,7 @@ > this = _selinux.new_avc_cache_stats() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_avc_cache_stats > __del__ = lambda self: None >@@ -512,7 +495,7 @@ > this = _selinux.new_context_s_t() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_context_s_t > __del__ = lambda self: None >@@ -563,8 +546,6 @@ > def context_user_set(arg1, arg2): > return _selinux.context_user_set(arg1, arg2) > context_user_set = _selinux.context_user_set >- >-_selinux.SELINUX_DEFAULTUSER_swigconstant(_selinux) > SELINUX_DEFAULTUSER = _selinux.SELINUX_DEFAULTUSER > > def get_ordered_context_list(user, fromcon): >@@ -606,41 +587,17 @@ > def get_default_type(role): > return _selinux.get_default_type(role) > get_default_type = _selinux.get_default_type >- >-_selinux.SELABEL_CTX_FILE_swigconstant(_selinux) > SELABEL_CTX_FILE = _selinux.SELABEL_CTX_FILE >- >-_selinux.SELABEL_CTX_MEDIA_swigconstant(_selinux) > SELABEL_CTX_MEDIA = _selinux.SELABEL_CTX_MEDIA >- >-_selinux.SELABEL_CTX_X_swigconstant(_selinux) > SELABEL_CTX_X = _selinux.SELABEL_CTX_X >- >-_selinux.SELABEL_CTX_DB_swigconstant(_selinux) > SELABEL_CTX_DB = _selinux.SELABEL_CTX_DB >- >-_selinux.SELABEL_CTX_ANDROID_PROP_swigconstant(_selinux) > SELABEL_CTX_ANDROID_PROP = _selinux.SELABEL_CTX_ANDROID_PROP >- >-_selinux.SELABEL_OPT_UNUSED_swigconstant(_selinux) > SELABEL_OPT_UNUSED = _selinux.SELABEL_OPT_UNUSED >- >-_selinux.SELABEL_OPT_VALIDATE_swigconstant(_selinux) > SELABEL_OPT_VALIDATE = _selinux.SELABEL_OPT_VALIDATE >- >-_selinux.SELABEL_OPT_BASEONLY_swigconstant(_selinux) > SELABEL_OPT_BASEONLY = _selinux.SELABEL_OPT_BASEONLY >- >-_selinux.SELABEL_OPT_PATH_swigconstant(_selinux) > SELABEL_OPT_PATH = _selinux.SELABEL_OPT_PATH >- >-_selinux.SELABEL_OPT_SUBSET_swigconstant(_selinux) > SELABEL_OPT_SUBSET = _selinux.SELABEL_OPT_SUBSET >- >-_selinux.SELABEL_OPT_DIGEST_swigconstant(_selinux) > SELABEL_OPT_DIGEST = _selinux.SELABEL_OPT_DIGEST >- >-_selinux.SELABEL_NOPT_swigconstant(_selinux) > SELABEL_NOPT = _selinux.SELABEL_NOPT > > def selabel_open(backend, opts, nopts): >@@ -674,17 +631,9 @@ > def selabel_digest(rec, digest): > return _selinux.selabel_digest(rec, digest) > selabel_digest = _selinux.selabel_digest >- >-_selinux.SELABEL_SUBSET_swigconstant(_selinux) > SELABEL_SUBSET = _selinux.SELABEL_SUBSET >- >-_selinux.SELABEL_EQUAL_swigconstant(_selinux) > SELABEL_EQUAL = _selinux.SELABEL_EQUAL >- >-_selinux.SELABEL_SUPERSET_swigconstant(_selinux) > SELABEL_SUPERSET = _selinux.SELABEL_SUPERSET >- >-_selinux.SELABEL_INCOMPARABLE_swigconstant(_selinux) > SELABEL_INCOMPARABLE = _selinux.SELABEL_INCOMPARABLE > > def selabel_cmp(h1, h2): >@@ -694,62 +643,24 @@ > def selabel_stats(handle): > return _selinux.selabel_stats(handle) > selabel_stats = _selinux.selabel_stats >- >-_selinux.SELABEL_X_PROP_swigconstant(_selinux) > SELABEL_X_PROP = _selinux.SELABEL_X_PROP >- >-_selinux.SELABEL_X_EXT_swigconstant(_selinux) > SELABEL_X_EXT = _selinux.SELABEL_X_EXT >- >-_selinux.SELABEL_X_CLIENT_swigconstant(_selinux) > SELABEL_X_CLIENT = _selinux.SELABEL_X_CLIENT >- >-_selinux.SELABEL_X_EVENT_swigconstant(_selinux) > SELABEL_X_EVENT = _selinux.SELABEL_X_EVENT >- >-_selinux.SELABEL_X_SELN_swigconstant(_selinux) > SELABEL_X_SELN = _selinux.SELABEL_X_SELN >- >-_selinux.SELABEL_X_POLYPROP_swigconstant(_selinux) > SELABEL_X_POLYPROP = _selinux.SELABEL_X_POLYPROP >- >-_selinux.SELABEL_X_POLYSELN_swigconstant(_selinux) > SELABEL_X_POLYSELN = _selinux.SELABEL_X_POLYSELN >- >-_selinux.SELABEL_DB_DATABASE_swigconstant(_selinux) > SELABEL_DB_DATABASE = _selinux.SELABEL_DB_DATABASE >- >-_selinux.SELABEL_DB_SCHEMA_swigconstant(_selinux) > SELABEL_DB_SCHEMA = _selinux.SELABEL_DB_SCHEMA >- >-_selinux.SELABEL_DB_TABLE_swigconstant(_selinux) > SELABEL_DB_TABLE = _selinux.SELABEL_DB_TABLE >- >-_selinux.SELABEL_DB_COLUMN_swigconstant(_selinux) > SELABEL_DB_COLUMN = _selinux.SELABEL_DB_COLUMN >- >-_selinux.SELABEL_DB_SEQUENCE_swigconstant(_selinux) > SELABEL_DB_SEQUENCE = _selinux.SELABEL_DB_SEQUENCE >- >-_selinux.SELABEL_DB_VIEW_swigconstant(_selinux) > SELABEL_DB_VIEW = _selinux.SELABEL_DB_VIEW >- >-_selinux.SELABEL_DB_PROCEDURE_swigconstant(_selinux) > SELABEL_DB_PROCEDURE = _selinux.SELABEL_DB_PROCEDURE >- >-_selinux.SELABEL_DB_BLOB_swigconstant(_selinux) > SELABEL_DB_BLOB = _selinux.SELABEL_DB_BLOB >- >-_selinux.SELABEL_DB_TUPLE_swigconstant(_selinux) > SELABEL_DB_TUPLE = _selinux.SELABEL_DB_TUPLE >- >-_selinux.SELABEL_DB_LANGUAGE_swigconstant(_selinux) > SELABEL_DB_LANGUAGE = _selinux.SELABEL_DB_LANGUAGE >- >-_selinux.SELABEL_DB_EXCEPTION_swigconstant(_selinux) > SELABEL_DB_EXCEPTION = _selinux.SELABEL_DB_EXCEPTION >- >-_selinux.SELABEL_DB_DATATYPE_swigconstant(_selinux) > SELABEL_DB_DATATYPE = _selinux.SELABEL_DB_DATATYPE > > def is_selinux_enabled(): >@@ -946,15 +857,13 @@ > this = _selinux.new_av_decision() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_av_decision > __del__ = lambda self: None > av_decision_swigregister = _selinux.av_decision_swigregister > av_decision_swigregister(av_decision) > >- >-_selinux.SELINUX_AVD_FLAGS_PERMISSIVE_swigconstant(_selinux) > SELINUX_AVD_FLAGS_PERMISSIVE = _selinux.SELINUX_AVD_FLAGS_PERMISSIVE > class selinux_opt(_object): > __swig_setmethods__ = {} >@@ -975,7 +884,7 @@ > this = _selinux.new_selinux_opt() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_selinux_opt > __del__ = lambda self: None >@@ -1013,27 +922,17 @@ > this = _selinux.new_selinux_callback() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_selinux_callback > __del__ = lambda self: None > selinux_callback_swigregister = _selinux.selinux_callback_swigregister > selinux_callback_swigregister(selinux_callback) > >- >-_selinux.SELINUX_CB_LOG_swigconstant(_selinux) > SELINUX_CB_LOG = _selinux.SELINUX_CB_LOG >- >-_selinux.SELINUX_CB_AUDIT_swigconstant(_selinux) > SELINUX_CB_AUDIT = _selinux.SELINUX_CB_AUDIT >- >-_selinux.SELINUX_CB_VALIDATE_swigconstant(_selinux) > SELINUX_CB_VALIDATE = _selinux.SELINUX_CB_VALIDATE >- >-_selinux.SELINUX_CB_SETENFORCE_swigconstant(_selinux) > SELINUX_CB_SETENFORCE = _selinux.SELINUX_CB_SETENFORCE >- >-_selinux.SELINUX_CB_POLICYLOAD_swigconstant(_selinux) > SELINUX_CB_POLICYLOAD = _selinux.SELINUX_CB_POLICYLOAD > > def selinux_get_callback(type): >@@ -1043,20 +942,10 @@ > def selinux_set_callback(type, cb): > return _selinux.selinux_set_callback(type, cb) > selinux_set_callback = _selinux.selinux_set_callback >- >-_selinux.SELINUX_ERROR_swigconstant(_selinux) > SELINUX_ERROR = _selinux.SELINUX_ERROR >- >-_selinux.SELINUX_WARNING_swigconstant(_selinux) > SELINUX_WARNING = _selinux.SELINUX_WARNING >- >-_selinux.SELINUX_INFO_swigconstant(_selinux) > SELINUX_INFO = _selinux.SELINUX_INFO >- >-_selinux.SELINUX_AVC_swigconstant(_selinux) > SELINUX_AVC = _selinux.SELINUX_AVC >- >-_selinux.SELINUX_TRANS_DIR_swigconstant(_selinux) > SELINUX_TRANS_DIR = _selinux.SELINUX_TRANS_DIR > > def security_compute_av(scon, tcon, tclass, requested, avd): >@@ -1153,7 +1042,7 @@ > this = _selinux.new_SELboolean() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_SELboolean > __del__ = lambda self: None >@@ -1243,7 +1132,7 @@ > this = _selinux.new_security_class_mapping() > try: > self.this.append(this) >- except Exception: >+ except __builtin__.Exception: > self.this = this > __swig_destroy__ = _selinux.delete_security_class_mapping > __del__ = lambda self: None >@@ -1282,14 +1171,8 @@ > def print_access_vector(tclass, av): > return _selinux.print_access_vector(tclass, av) > print_access_vector = _selinux.print_access_vector >- >-_selinux.MATCHPATHCON_BASEONLY_swigconstant(_selinux) > MATCHPATHCON_BASEONLY = _selinux.MATCHPATHCON_BASEONLY >- >-_selinux.MATCHPATHCON_NOTRANS_swigconstant(_selinux) > MATCHPATHCON_NOTRANS = _selinux.MATCHPATHCON_NOTRANS >- >-_selinux.MATCHPATHCON_VALIDATE_swigconstant(_selinux) > MATCHPATHCON_VALIDATE = _selinux.MATCHPATHCON_VALIDATE > > def set_matchpathcon_flags(flags):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 33922
: 7215