;ò
Õæ?c           @   s  d  k  Td k Z d k Z d k Z d k Z d k Z d k Z d Z d Z e i	 d ƒ Z
 e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d	 e i ƒ Z e i	 d
 ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 d ƒ Z e i	 e ƒ Z e i	 e i d e ƒ ƒ Z d Z e i	 d e d ƒ Z d „  Z  d e i f d „  ƒ  YZ! e! ƒ  Z" e i# oS e$ d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 ƒ n d S(3   (   s   *Ns   ^(gcc|glibc)s.   /lib/(modules|cpp|perl5|rpm|hotplug)($|[\s/,])s   .spec$s   ^\s*Patch(.*?)\s*:\s*([^\s]+)s.   ^\s*%patch.*-P\s*([^\s]*)|^\s*%patch([^\s]*)\ss(   ^[^#]*(\$RPM_SOURCE_DIR|%{?_sourcedir}?)s"   ^(Copyright|Serial)\s*:\s*([^\s]+)s   Buildroot\s*:\s*([^\s]+)s   ^/s   ^%cleans   ^%changelogs   \./configures'   \./configure[^#]*--libdir=([^\s]+)[^#]*s   ^%package.*\Wlibs
   %mklibnames	   %ifn?archs   %if\s+s   %endifs   HardcodedLibPathExceptionssF   (/lib|/usr/lib|/usr/X11R6/lib/(?!([^/]+/)+)[^/]*\.([oa]|la|so[0-9.]*))sI   ^[^#]*((^|\s+|\.\./\.\.|\${?RPM_BUILD_ROOT}?|%{?buildroot}?|%{?_prefix}?)s   (?=[\s;/])([^\s,;]*))c         C   s-   t  |  d ƒ } | i ƒ  } | i ƒ  | Sd  S(   Ns   r(   s   opens   files   fds	   readliness   contents   close(   s   files   contents   fd(    (    s   /usr/share/rpmlint/SpecCheck.pys   file2string2   s    
s	   SpecCheckc           B   s   t  Z d „  Z d „  Z RS(   Nc         C   s   t  i  i |  d ƒ d  S(   Ns	   SpecCheck(   s   AbstractChecks   __init__s   self(   s   self(    (    s   /usr/share/rpmlint/SpecCheck.pys   __init__:   s    c         C   så  | i ƒ  o d  Sn | i ƒ  } t } x= | i ƒ  D]/ } t i | ƒ o | i	 ƒ  d | } Pq5 q5 W| o t
 | d ƒ na| | t i d j o t
 | d | ƒ n t | ƒ } h  }	 g  } g  } t } d } d } d } d } d } d } d }
 d } d } xÌ| D]Ä} t i | ƒ } | o d } Pn t i | ƒ } | o | d } | } n t  i | ƒ } | o | d } n t! i | ƒ } | o% | | j o
 d } n | d } n t" i | ƒ } | o  | i# d	 ƒ |	 | i# d ƒ <n¡ t$ i | ƒ } | oQ | i% | i# d ƒ p | i# d	 ƒ ƒ | d j o | i% | i# d ƒ ƒ q”n: | o1 t& i | ƒ } | o d } t
 | d
 ƒ q”n t' i | ƒ } | o t( | d | i# d ƒ ƒ n | o  | d d j o | d  t) i* | ƒ } qnd } t+ i | ƒ } | o t
 | d ƒ qnt, i- t. | i# d ƒ ƒ } | o  t
 | d | i# d ƒ d ƒ qnn t/ i | ƒ } | o | o d } t) i* | ƒ } n t0 i | ƒ } | o> | o7 t1 i- | t i ƒ p t2 i t) i3 | i# d ƒ ƒ ƒ o) t
 | d d t) i3 | i# d ƒ ƒ ƒ n t4 i | ƒ } | o@ d } t5 i | i# d ƒ ƒ o t( | d | i# d ƒ ƒ q|n | o t6 i | ƒ o
 d } n t7 i | ƒ o
 d } n t8 i | ƒ o
 d }
 qqW| o t
 | d ƒ n | o t
 | d ƒ n |
 o | o t
 | d ƒ n x¶ |	 i ƒ  D]¨ } | | j o# t( | d d | d |	 | ƒ n | | j oe | d j o
 d | j o q5n | d j o
 d | j o q5n t( | d d | d |	 | ƒ q5q5Wd  S(   Ns   /s   no-spec-files   .specs   invalid-spec-namei    s    iÿÿÿÿi   i   s   use-of-RPM_SOURCE_DIRs   obsolete-tags   \s   configure-without-libdir-specs   hardcoded-library-paths   in configure optionss   ins   hardcoded-path-in-buildroot-tags   no-buildroot-tags   no-%clean-sections   lib-package-without-%mklibnames   %ifarch-applied-patchs   Patchs   :s   0s   patch-not-applied(:   s   pkgs   isSources   filess   Nones	   spec_files   keyss   fs
   spec_regexs   searchs   dirNames
   printErrors   rpms   RPMTAG_NAMEs   file2strings   specs   patchess   applied_patchess   applied_patches_ifarchs
   source_dirs	   buildroots   cleans	   changelogs	   configures   configure_cmdlines	   mklibnames   libs   if_depths   ifarch_depths   lines   changelog_regexs   ress   ifarch_regexs   if_regexs   endif_regexs   patch_regexs   groups   applied_patch_regexs   appends   source_dir_regexs   obsolete_tags_regexs   printWarnings   strings   strips   configure_libdir_spec_regexs   res   matchs   hardcoded_library_pathss   configure_start_regexs   hardcoded_library_path_regexs   biarch_package_regexs#   hardcoded_lib_path_exceptions_regexs   lstrips   buildroot_regexs	   tmp_regexs   clean_regexs   mklibname_regexs   lib_package_regexs   p(   s   selfs   pkgs	   mklibnames   applied_patches_ifarchs	   spec_files   configure_cmdlines   applied_patchess
   source_dirs	   buildroots   patchess   libs   ress   specs   ifarch_depths   filess	   configures   if_depths   lines   fs	   changelogs   ps   clean(    (    s   /usr/share/rpmlint/SpecCheck.pys   check=   sÒ     	 


 &$I)!

 #(   s   __name__s
   __module__s   __init__s   check(    (    (    s   /usr/share/rpmlint/SpecCheck.pys	   SpecCheck8   s   	s   no-spec-fileso   No spec file was specified in your RPM building. Please specify a valid
SPEC file to build a valid RPM package.s   invalid-spec-namesi   Your spec file must finish with '.spec'. If it's not the case, rename your
file and rebuild your package.s   use-of-RPM_SOURCE_DIRsr   You use RPM_SOURCE_DIR in your spec file. If you have to use a directory
for building, use RPM_BUILD_ROOT instead.s   patch-not-appliedsp   A patch is included in your package but was not applied. Refer to the patches
documentation to see what's wrong.s   obsolete-tagso   The following tags are obsolete: Copyright and Serial. They must
be replaced by License and Epoch respectively.s   no-buildroot-tagsV   The BuildRoot tag isn't used in your spec. It must be used to
allow build as non root.s   hardcoded-path-in-buildroot-tagsj   A path is hardcoded in your Buildroot tag. It should be replaced
by something like %{_tmppath}/%name-root.s   hardcoded-library-pathsŠ   A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.s   configure-without-libdir-specsƒ   A configure script is run without specifying the libdir. Configure
options must be augmented with something like libdir=%{_libdir}.s   no-%clean-sectionse   The spec file doesn't contain a %clean section to remove the files installed
by the %install section.s   lib-package-without-%mklibnamesU   The package name must be built using %mklibname to allow lib64 and lib32
coexistence.s   %ifarch-applied-patchs´   A patch is applied inside an %ifarch block. Patches must be applied
on all architectures and may contain necessary configure and/or code
patch to be effective only on a given arch.(%   s   Filters   AbstractChecks   res   syss   rpms   strings   Configs   DEFAULT_BIARCH_PACKAGESs%   DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONSs   compiles
   spec_regexs   patch_regexs   applied_patch_regexs   source_dir_regexs   obsolete_tags_regexs
   IGNORECASEs   buildroot_regexs	   tmp_regexs   clean_regexs   changelog_regexs   configure_start_regexs   configure_libdir_spec_regexs   lib_package_regexs   mklibname_regexs   ifarch_regexs   if_regexs   endif_regexs   biarch_package_regexs	   getOptions#   hardcoded_lib_path_exceptions_regexs   hardcoded_library_pathss   hardcoded_library_path_regexs   file2strings	   SpecChecks   checks   infos
   addDetails(   s   endif_regexs   ifarch_regexs   configure_start_regexs	   SpecChecks   mklibname_regexs   hardcoded_library_pathss   Configs   checks   source_dir_regexs   if_regexs   rpms   patch_regexs   res   configure_libdir_spec_regexs%   DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONSs   DEFAULT_BIARCH_PACKAGESs   strings   syss   lib_package_regexs   file2strings   obsolete_tags_regexs
   spec_regexs   clean_regexs   changelog_regexs   biarch_package_regexs#   hardcoded_lib_path_exceptions_regexs	   tmp_regexs   buildroot_regexs   hardcoded_library_path_regexs   AbstractChecks   applied_patch_regex(    (    s   /usr/share/rpmlint/SpecCheck.pys   ?
   sp   							Š	
