{"id":774,"date":"2018-11-07T15:31:08","date_gmt":"2018-11-07T07:31:08","guid":{"rendered":"http:\/\/cmesoft.com\/?p=774"},"modified":"2018-11-07T15:31:08","modified_gmt":"2018-11-07T07:31:08","slug":"rpm-%e5%ae%8f%e5%ae%9a%e4%b9%89%e6%96%87%e6%a1%a3","status":"publish","type":"post","link":"http:\/\/cmesoft.com\/?p=774","title":{"rendered":"rpm \u5b8f\u5b9a\u4e49\u6587\u6863"},"content":{"rendered":"<p>\u8def\u5f84\u4e3a\uff1a<br \/>\n\/usr\/lib\/rpm\/macros<\/p>\n<p>\u5185\u5bb9\u4e3a\uff1a<br \/>\n#\/*! \\page config_macros Default configuration: \/usr\/lib\/rpm\/macros<\/p>\n<h1>\\verbatim<\/h1>\n<p>#<\/p>\n<h1>This is a global RPM configuration file. All changes made here will<\/h1>\n<h1>be lost when the rpm package is upgraded. Any per-system configuration<\/h1>\n<h1>should be added to \/etc\/rpm\/macros, while per-user configuration should<\/h1>\n<h1>be added to ~\/.rpmmacros.<\/h1>\n<p>#<br \/>\n#==============================================================================<\/p>\n<h1>Macro naming conventions (preliminary):<\/h1>\n<p>#<br \/>\n#  Macros that begin with an underscore are &#8220;local&#8221; in the sense that<br \/>\n#  they (if used) will not be exported in rpm headers. Some macros<br \/>\n#  that don&#8217;t start with an underscore (but look like they should)<br \/>\n#  are compatible with macros generated by rpm-2.5.x and will be made<br \/>\n#  more consistent in a future release.<br \/>\n#<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- A macro that expands to nothing.<\/h1>\n<p>#<br \/>\n%nil            %{!?nil}<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- filesystem macros.<\/h1>\n<p>#<br \/>\n%_usr           \/usr<br \/>\n%_usrsrc        %{_usr}\/src<br \/>\n%_var           \/var<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Generally useful path macros.<\/h1>\n<p>#<br \/>\n%__7zip         \/usr\/bin\/7za<br \/>\n%__awk          gawk<br \/>\n%__bzip2        \/usr\/bin\/bzip2<br \/>\n%__cat          \/usr\/bin\/cat<br \/>\n%__chgrp        \/usr\/bin\/chgrp<br \/>\n%__chmod        \/usr\/bin\/chmod<br \/>\n%__chown        \/usr\/bin\/chown<br \/>\n%__cp           \/usr\/bin\/cp<br \/>\n%__cpio         \/usr\/bin\/cpio<br \/>\n%__file         \/usr\/bin\/file<br \/>\n%__gpg          %{_bindir}\/gpg2<br \/>\n%__grep         \/usr\/bin\/grep<br \/>\n%__gzip         \/usr\/bin\/gzip<br \/>\n%__id           \/usr\/bin\/id<br \/>\n%__id_u         %{__id} -u<br \/>\n%__install      \/usr\/bin\/install<br \/>\n%__ln_s         ln -s<br \/>\n%__lrzip        \/usr\/bin\/lrzip<br \/>\n%__lzip         \/usr\/bin\/lzip<\/p>\n<h1>Deprecated, use %__xz instead.<\/h1>\n<p>%__lzma         %__xz &#8211;format=lzma<br \/>\n%__xz           \/usr\/bin\/xz<br \/>\n%__make         \/usr\/bin\/make<br \/>\n%__mkdir        \/usr\/bin\/mkdir<br \/>\n%__mkdir_p      \/usr\/bin\/mkdir -p<br \/>\n%__mv           \/usr\/bin\/mv<br \/>\n%__patch        \/usr\/bin\/patch<br \/>\n%__perl         \/usr\/bin\/perl<br \/>\n%__python       \/usr\/bin\/python<br \/>\n%__restorecon       \/sbin\/restorecon<br \/>\n%__rm           \/usr\/bin\/rm<br \/>\n%__rsh          \/usr\/bin\/rsh<br \/>\n%__sed          \/usr\/bin\/sed<br \/>\n%__semodule     \/usr\/bin\/semodule<br \/>\n%__ssh          \/usr\/bin\/ssh<br \/>\n%__tar          \/usr\/bin\/tar<br \/>\n%__unzip        \/usr\/bin\/unzip<br \/>\n%__git          \/usr\/bin\/git<br \/>\n%__hg           \/usr\/bin\/hg<br \/>\n%__bzr          \/usr\/bin\/bzr<br \/>\n%__quilt        \/usr\/bin\/quilt<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Build system path macros.<\/h1>\n<p>#<br \/>\n%__ar           ar<br \/>\n%__as           as<br \/>\n%__cc           gcc<br \/>\n%__cpp          gcc -E<br \/>\n%__cxx          g++<br \/>\n%__ld           \/usr\/bin\/ld<br \/>\n%__nm           \/usr\/bin\/nm<br \/>\n%__objcopy      \/usr\/bin\/objcopy<br \/>\n%__objdump      \/usr\/bin\/objdump<br \/>\n%__ranlib       ranlib<br \/>\n%__remsh        %{__rsh}<br \/>\n%__strip        \/usr\/bin\/strip<\/p>\n<h1>XXX avoid failures if tools are not installed when rpm is built.<\/h1>\n<p>%__libtoolize       libtoolize<br \/>\n%__aclocal      aclocal<br \/>\n%__autoheader       autoheader<br \/>\n%__automake     automake<br \/>\n%__autoconf     autoconf<\/p>\n<p>#==============================================================================<\/p>\n<h1>Conditional build stuff.<\/h1>\n<h1>Check if symbol is defined.<\/h1>\n<h1>Example usage: %if %{defined with_foo} &amp;&amp; %{undefined with_bar} &#8230;<\/h1>\n<p>%defined()  %{expand:%%{?%{1}:1}%%{!?%{1}:0}}<br \/>\n%undefined()    %{expand:%%{?%{1}:0}%%{!?%{1}:1}}<\/p>\n<h1>Shorthand for %{defined with_&#8230;}<\/h1>\n<p>%with()     %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}<br \/>\n%without()  %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}<\/p>\n<h1>Handle conditional builds. %bcond_with is for case when feature is<\/h1>\n<h1>default off and needs to be activated with &#8211;with &#8230; command line<\/h1>\n<h1>switch. %bcond_without is for the dual case.<\/h1>\n<p>#<\/p>\n<h1>%bcond_with foo defines symbol with_foo if &#8211;with foo was specified on<\/h1>\n<h1>command line.<\/h1>\n<h1>%bcond_without foo defines symbol with_foo if &#8211;without foo was <em>not<\/em><\/h1>\n<h1>specified on command line.<\/h1>\n<p>#<\/p>\n<h1>For example (spec file):<\/h1>\n<p>#<\/p>\n<h1>(at the beginning)<\/h1>\n<h1>%bcond_with extra_fonts<\/h1>\n<h1>%bcond_without static<\/h1>\n<h1>(and later)<\/h1>\n<h1>%if %{with extra_fonts}<\/h1>\n<h1>&#8230;<\/h1>\n<h1>%else<\/h1>\n<h1>&#8230;<\/h1>\n<h1>%endif<\/h1>\n<h1>%if ! %{with static}<\/h1>\n<h1>&#8230;<\/h1>\n<h1>%endif<\/h1>\n<h1>%ifdef %{with static}<\/h1>\n<h1>&#8230;<\/h1>\n<h1>%endif<\/h1>\n<h1>%{?with_static: &#8230; }<\/h1>\n<h1>%{!?with_static: &#8230; }<\/h1>\n<h1>%{?with_extra_fonts: &#8230; }<\/h1>\n<h1>%{!?with_extra_fonts: &#8230; }<\/h1>\n<p>#<\/p>\n<h1>The bottom line: never use without_foo, _with_foo nor _without_foo, only<\/h1>\n<h1>with_foo. This way changing default set of bconds for given spec is just<\/h1>\n<h1>a matter of changing single line in it and syntax is more readable.<\/h1>\n<p>%bcond_with()       %{expand:%%{?<em>with<\/em>%{1}:%%global with_%{1} 1}}<br \/>\n%bcond_without()    %{expand:%%{!?<em>without<\/em>%{1}:%%global with_%{1} 1}}<br \/>\n#<br \/>\n#==============================================================================<\/p>\n<h1>&#8212;- Required rpmrc macros.<\/h1>\n<p>#  Macros that used to be initialized as a side effect of rpmrc parsing.<br \/>\n#  These are the default values that can be overridden by other<br \/>\n#  (e.g. per-platform, per-system, per-packager, per-package) macros.<br \/>\n#<br \/>\n#  The directory where rpm&#8217;s configuration and scripts live<br \/>\n%_rpmconfigdir      %{getconfdir}<\/p>\n<p>#  The directory where sources\/patches will be unpacked and built.<br \/>\n%_builddir      %{_topdir}\/BUILD<\/p>\n<p>#  The interpreter used for build scriptlets.<br \/>\n%_buildshell        \/bin\/sh<\/p>\n<p>#  The path to the bzip2 executable (legacy, use %{__bzip2} instead).<br \/>\n%_bzip2bin      %{__bzip2}<\/p>\n<p>#  The location of the rpm database file(s).<br \/>\n%_dbpath        %{_var}\/lib\/rpm<\/p>\n<p>#  The location of the rpm database file(s) after &#8220;rpm &#8211;rebuilddb&#8221;.<br \/>\n%_dbpath_rebuild    %{_dbpath}<\/p>\n<p>%_keyringpath       %{_dbpath}\/pubkeys\/<\/p>\n<p>#<br \/>\n#  Path to script that creates debug symbols in a \/usr\/lib\/debug<br \/>\n#  shadow tree.<br \/>\n#<br \/>\n#  A spec file can %%define _find_debuginfo_opts to pass options to<br \/>\n#  the script.  See the script for details.<br \/>\n#<br \/>\n%__debug_install_post   \\<br \/>\n   %{_rpmconfigdir}\/find-debuginfo.sh %{?_missing_build_ids_terminate_build:&#8211;strict-build-id} %{?_include_minidebuginfo:-m} %{?_find_debuginfo_dwz_opts} %{?_find_debuginfo_opts} &#8220;%{_builddir}\/%{?buildsubdir}&#8221;\\<br \/>\n%{nil}<\/p>\n<p>#  Template for debug information sub-package.<br \/>\n%debug_package \\<br \/>\n%ifnarch noarch\\<br \/>\n%global __debug_package 1\\<br \/>\n%package debuginfo\\<br \/>\nSummary: Debug information for package %{name}\\<br \/>\nGroup: Development\/Debug\\<br \/>\nAutoReqProv: 0\\<br \/>\n%description debuginfo\\<br \/>\nThis package provides debug information for package %{name}.\\<br \/>\nDebug information is useful when developing applications that use this\\<br \/>\npackage or when debugging this package.\\<br \/>\n%files debuginfo -f debugfiles.list\\<br \/>\n%defattr(-,root,root)\\<br \/>\n%endif\\<br \/>\n%{nil}<\/p>\n<p>%_defaultdocdir     %{_datadir}\/doc<br \/>\n%_defaultlicensedir %{_datadir}\/licenses<\/p>\n<p>#  The path to the gzip executable (legacy, use %{__gzip} instead).<br \/>\n%_gzipbin       %{__gzip}<\/p>\n<p>#  The Unix time of the latest kept changelog entry in binary packages.<br \/>\n#  Any older entry is not packaged in binary packages.<br \/>\n%_changelog_trimtime    0<\/p>\n<p>#  The directory where newly built binary packages will be written.<br \/>\n%_rpmdir        %{_topdir}\/RPMS<\/p>\n<p>#  A template used to generate the output binary package file name<br \/>\n#  (legacy).<br \/>\n%_rpmfilename       %{_build_name_fmt}<\/p>\n<p>#  The directory where sources\/patches from a source package will be<br \/>\n#  installed. This is also where sources\/patches are found when building.<br \/>\n%_sourcedir     %{_topdir}\/SOURCES<\/p>\n<p>#  The directory where the spec file from a source package will be<br \/>\n#  installed.<br \/>\n%_specdir       %{_topdir}\/SPECS<\/p>\n<p>#  The directory where newly built source packages will be written.<br \/>\n%_srcrpmdir     %{_topdir}\/SRPMS<\/p>\n<p>#  The directory where buildroots will be created.<br \/>\n%_buildrootdir      %{_topdir}\/BUILDROOT<\/p>\n<p>#  Build root path, where %install installs the package during build.<br \/>\n%buildroot      %{_buildrootdir}\/%{name}-%{version}-%{release}.%{_arch}<\/p>\n<p>#  Directory where temporaray files can be created.<br \/>\n%_tmppath       %{_var}\/tmp<\/p>\n<p>#  Path to top of build area.<br \/>\n%_topdir        %{getenv:HOME}\/rpmbuild<\/p>\n<p>#  The path to the unzip executable (legacy, use %{__unzip} instead).<br \/>\n%_unzipbin      %{__unzip}<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Optional rpmrc macros.<\/h1>\n<p>#  Macros that are initialized as a side effect of rpmrc and\/or spec<br \/>\n#  file parsing.<br \/>\n#<br \/>\n#  The sub-directory (relative to %{_builddir}) where sources are compiled.<br \/>\n#  This macro is set after processing %setup, either explicitly from the<br \/>\n#  value given to -n or the default name-version.<br \/>\n#<br \/>\n#%buildsubdir<\/p>\n<p>#  Configurable distribution information, same as Distribution: tag in a<br \/>\n#  specfile.<br \/>\n#<br \/>\n#%distribution<\/p>\n<p>#  Configurable distribution URL, same as DistURL: tag in a specfile.<br \/>\n#  The URL will be used to supply reliable information to tools like<br \/>\n#  rpmfind.<br \/>\n#<\/p>\n<h1>Note: You should not configure with disturl (or build packages with<\/h1>\n<h1>the DistURL: tag) unless you are willing to supply content in a<\/h1>\n<h1>yet-to-be-determined format at the URL specified.<\/h1>\n<p>#<br \/>\n#%disturl<\/p>\n<p>#  Configurable bug URL, same as BugURL: tag in a specfile.<br \/>\n#  The URL will be used to supply reliable information to where<br \/>\n#  to file bugs.<br \/>\n#<br \/>\n#%bugurl<\/p>\n<p>#  Boolean (i.e. 1 == &#8220;yes&#8221;, 0 == &#8220;no&#8221;) that controls whether files<br \/>\n#  marked as %doc should be installed.<br \/>\n#%_excludedocs<\/p>\n<p>#  The port and machine name of a FTP proxy host running TIS firewall.<br \/>\n#<br \/>\n#%_ftpport<br \/>\n#%_ftpproxy<\/p>\n<p>#  The signature to use and the location of configuration files for<br \/>\n#  signing packages with GNU gpg.<br \/>\n#<br \/>\n#%_gpg_name<br \/>\n#%_gpg_path<\/p>\n<p>#  The port and machine name of an HTTP proxy host.<br \/>\n#<br \/>\n#%_httpport<br \/>\n#%_httpproxy<\/p>\n<p>#  The PATH put into the environment before running %pre\/%post et al.<br \/>\n#<br \/>\n%_install_script_path   \/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/X11R6\/bin<\/p>\n<p>#  A colon separated list of desired locales to be installed;<br \/>\n#  &#8220;all&#8221; means install all locale specific files.<br \/>\n#<br \/>\n%_install_langs all<\/p>\n<p>#  The value of CLASSPATH in build scriptlets (iff configured).<br \/>\n#<br \/>\n#%_javaclasspath   all<\/p>\n<p>#  Import packaging conventions from jpackage.org (prefixed with _<br \/>\n#  to avoid name collisions).<br \/>\n#<br \/>\n%_javadir      %{_datadir}\/java<br \/>\n%_javadocdir   %{_datadir}\/javadoc<\/p>\n<p>#  A colon separated list of paths where files should <em>not<\/em> be installed.<br \/>\n#  Usually, these are network file system mount points.<br \/>\n#<br \/>\n#%_netsharedpath<\/p>\n<p>#  (experimental)<br \/>\n#  The type of pattern match used on rpmdb iterator selectors:<br \/>\n#  &#8220;default&#8221;   simple glob-like regex, periods will be escaped,<br \/>\n#          splats will have period prepended, full &#8220;^&#8230;$&#8221; match<br \/>\n#          required. Also, file path tags will use glob(7).<br \/>\n#  &#8220;strcmp&#8221;    compare strings<br \/>\n#  &#8220;regex&#8221;     regex(7) patterns using regcomp(3)\/regexec(3)<br \/>\n#  &#8220;glob&#8221;      glob(7) patterns using fnmatch(3)<br \/>\n#<br \/>\n%_query_selector_match  default<\/p>\n<p>#  Configurable packager information, same as Packager: in a specfile.<br \/>\n#<br \/>\n#%packager<\/p>\n<p>#  Compression type and level for source\/binary package payloads.<br \/>\n#      &#8220;w9.gzdio&#8221;  gzip level 9 (default).<br \/>\n#      &#8220;w9.bzdio&#8221;  bzip2 level 9.<br \/>\n#      &#8220;w7.xzdio&#8221;  xz level 7, xz&#8217;s default.<br \/>\n#      &#8220;w7.lzdio&#8221;  lzma-alone level 7, lzma&#8217;s default<br \/>\n#<br \/>\n#%_source_payload  w9.gzdio<br \/>\n#%_binary_payload  w9.gzdio<\/p>\n<p>#  Algorithm to use for generating file checksum digests on build.<br \/>\n#  If not specified or 0, MD5 is used.<br \/>\n#  WARNING: non-MD5 is backwards incompatible, don&#8217;t enable lightly!<br \/>\n#  The supported algorithms may depend on NSS version, as of NSS<br \/>\n#  3.11.99.5 the following are supported:<br \/>\n#  1   MD5 (default)<br \/>\n#  2   SHA1<br \/>\n#  8   SHA256<br \/>\n#  9   SHA384<br \/>\n#  10  SHA512<br \/>\n#<br \/>\n#%_source_filedigest_algorithm 1<br \/>\n#%_binary_filedigest_algorithm 1<\/p>\n<p>#  Configurable vendor information, same as Vendor: in a specfile.<br \/>\n#<br \/>\n#%vendor<\/p>\n<p>#  Default fuzz level for %patch in spec file.<br \/>\n%_default_patch_fuzz    0<\/p>\n<p>#  Default patch flags<br \/>\n#%_default_patch_flags -s<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Build configuration macros.<\/h1>\n<p>#<\/p>\n<h1>Script gets packaged file list on input and buildroot as first parameter.<\/h1>\n<h1>Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.<\/h1>\n<p>#<\/p>\n<h1>Note: Disable (by commenting out) for legacy compatibility.<\/h1>\n<p>%__check_files         %{_rpmconfigdir}\/check-files %{buildroot}<\/p>\n<p>#<\/p>\n<h1>Should unpackaged files in a build root terminate a build?<\/h1>\n<p>#<\/p>\n<h1>Note: The default value should be 0 for legacy compatibility.<\/h1>\n<p>%_unpackaged_files_terminate_build  1<\/p>\n<p>#<\/p>\n<h1>Should missing %doc files in the build directory terminate a build?<\/h1>\n<p>#<\/p>\n<h1>Note: The default value should be 0 for legacy compatibility.<\/h1>\n<p>%_missing_doc_files_terminate_build 1<\/p>\n<p>#<\/p>\n<h1>Should binaries in noarch packages terminate a build?<\/h1>\n<p>%_binaries_in_noarch_packages_terminate_build   1<\/p>\n<p>#<\/p>\n<h1>Should rpm try to download missing sources at build-time?<\/h1>\n<h1>Enabling this is dangerous as long as rpm has no means to validate<\/h1>\n<h1>the integrity of the download with a digest or signature.<\/h1>\n<p>%_disable_source_fetch 1<\/p>\n<p>#<\/p>\n<h1>Program to call for each successfully built and written binary package.<\/h1>\n<h1>The package name is passed to the program as a command-line argument.<\/h1>\n<p>#<br \/>\n#%_build_pkgcheck  %{_bindir}\/rpmlint<\/p>\n<p>#<\/p>\n<h1>Program to call for the whole binary package set after build.<\/h1>\n<h1>The package set is passed to the program via command-line arguments.<\/h1>\n<p>#<br \/>\n#%_build_pkgcheck_set  %{_bindir}\/rpmlint<\/p>\n<p>#<\/p>\n<h1>Program to call for successfully built and written SRPM.<\/h1>\n<h1>The package name is passed to the program as a command-line argument.<\/h1>\n<p>#<br \/>\n#%_build_pkgcheck_srpm %{_bindir}\/rpmlint<\/p>\n<p>#<\/p>\n<h1>Should the build of packages fail if package checker (if defined) returns<\/h1>\n<h1>non-zero exit status?<\/h1>\n<p>#<br \/>\n#%_nonzero_exit_pkgcheck_terminate_build   1<\/p>\n<p>#<\/p>\n<h1>Should an ELF file processed by find-debuginfo.sh having no build ID<\/h1>\n<h1>terminate a build?  This is left undefined to disable it and defined to<\/h1>\n<h1>enable.<\/h1>\n<p>#<br \/>\n#%_missing_build_ids_terminate_build   1<\/p>\n<p>#<\/p>\n<h1>Include minimal debug information in build binaries.<\/h1>\n<h1>Requires _enable_debug_packages.<\/h1>\n<p>#<br \/>\n#%_include_minidebuginfo   1<\/p>\n<p>#<\/p>\n<h1>Use internal dependency generator rather than external helpers?<\/h1>\n<p>%_use_internal_dependency_generator 1<\/p>\n<p>#<\/p>\n<h1>Filter GLIBC_PRIVATE Provides: and Requires:<\/h1>\n<p>%_filter_GLIBC_PRIVATE          0<\/p>\n<h1>Directories whose contents should be considered as documentation.<\/h1>\n<p>%__docdir_path %{_datadir}\/doc:%{_datadir}\/man:%{_datadir}\/info:%{_datadir}\/gtk-doc\/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:\/usr\/doc:\/usr\/man:\/usr\/info:\/usr\/X11R6\/man<\/p>\n<p>#<\/p>\n<h1>Path to scripts to autogenerate package dependencies,<\/h1>\n<p>#<\/p>\n<h1>Note: Used iff _use_internal_dependency_generator is zero.<\/h1>\n<p>#%__find_provides  %{_rpmconfigdir}\/rpmdeps &#8211;provides<br \/>\n#%__find_requires  %{_rpmconfigdir}\/rpmdeps &#8211;requires<br \/>\n%__find_provides    %{_rpmconfigdir}\/find-provides<br \/>\n%__find_requires    %{_rpmconfigdir}\/find-requires<br \/>\n#%__find_conflicts ???<br \/>\n#%__find_obsoletes ???<\/p>\n<h1> <\/h1>\n<h1>Path to file attribute classifications for automatic dependency<\/h1>\n<h1>extraction, used when _use_internal_dependency_generator<\/h1>\n<h1>is used (on by default). Files can have any number of attributes<\/h1>\n<h1>attached to them, and dependencies are separately extracted for<\/h1>\n<h1>each attribute.<\/h1>\n<h1> <\/h1>\n<h1>To define a new file attribute called &#8220;myattr&#8221;, add a file named<\/h1>\n<h1>&#8220;myattr&#8221; to this directory, defining the requires and\/or provides<\/h1>\n<h1>finder script(s) + magic and\/or path pattern regex(es).<\/h1>\n<h1>provides finder and<\/h1>\n<h1>%__myattr_requires    path + args to requires finder script for <myattr><\/h1>\n<h1>%__myattr_provides    path + args to provides finder script for <myattr><\/h1>\n<h1>%__myattr_magic   libmagic classification match regex<\/h1>\n<h1>%__myattr_path    path based classification match regex<\/h1>\n<h1>%__myattr_flags   flags to control behavior (just &#8220;exeonly&#8221; for now)<\/h1>\n<h1>%__myattr_exclude_magic   exclude by magic regex<\/h1>\n<h1>%__myattr_exclude_path    exclude by path regex<\/h1>\n<p>#<br \/>\n%_fileattrsdir      %{_rpmconfigdir}\/fileattrs<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Database configuration macros.<\/h1>\n<p>#  Macros used to configure Berkley db parameters.<br \/>\n#<\/p>\n<h1>rpmdb macro configuration values are a colon (or white space) separated<\/h1>\n<h1>list of tokens, with an optional &#8216;!&#8217; negation to explicitly disable bit<\/h1>\n<h1>values, or a &#8220;=value&#8221; if a parameter. A per-tag value is used (e.g.<\/h1>\n<h1>%_dbi_config_Packages) if defined, otherwise a per-rpmdb default<\/h1>\n<h1>(e.g. %_dbi_config).<\/h1>\n<p>#<\/p>\n<h1>Here&#8217;s a short list of the tokens, with a guess of whether the option is<\/h1>\n<h1>useful:<\/h1>\n<p>#  (nothing)   currently used in rpm, known to work.<br \/>\n#  &#8220;+++&#8221;       under development, will be supported in rpm eventually.<br \/>\n#  &#8220;???&#8221;       I have no clue, you&#8217;re mostly on your own.<br \/>\n#<\/p>\n<h1>If you do find yourself inclined to fiddle, here&#8217;s what I see (shrug):<\/h1>\n<h1>1) Only the value of mp_size has any serious impact on overall performance,<\/h1>\n<h1>and you will need ~256Kb to handle a typical machine install.<\/h1>\n<h1>2) Only the Packages hash, because of the size of the values (i.e. headers),<\/h1>\n<h1>will ever need tuning. Diddle the pagesize if you&#8217;re interested, although<\/h1>\n<h1>I believe that you will find pagesize=512 &#8220;best&#8221;.<\/h1>\n<h1>3) Adding nofsync increases speed, but risks total data loss. Fiddle shared<\/h1>\n<h1>and\/or mp_size instead.<\/h1>\n<p>#<\/p>\n<h1>token   works?  Berkeley db flag or value<\/h1>\n<p>#==================================================<br \/>\n#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- DBENV tunable values:<\/p>\n<h1>mmapsize=16Mb   DBENV->set_mp_mmapsize<\/h1>\n<h1>cachesize=1Mb   DBENV->set_cachesize, DB->set_cachesize<\/h1>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- DB->open bits:<\/p>\n<h1>nommap  ??? DB_NOMMAP<\/h1>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; rpmdb specific configuration:<\/p>\n<h1>lockdbfd        (always on for Packages) Use fcntl(2) locking ?<\/h1>\n<h1>nofsync     Disable fsync(2) call performed after db3 writes?<\/h1>\n<p>#<\/p>\n<h1>Misc BDB tuning options<\/h1>\n<p>%__dbi_other            mp_mmapsize=128Mb mp_size=1Mb<\/p>\n<p>%_dbi_config            %{?__dbi_other}<\/p>\n<h1>&#8220;Packages&#8221; should have shared\/exclusive fcntl(2) lock using &#8220;lockdbfd&#8221;.<\/h1>\n<p>%_dbi_config_Packages       %{?_dbi_config} lockdbfd<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- GPG\/PGP\/PGP5 signature macros.<\/h1>\n<p>#  Macro(s) to hold the arguments passed to GPG\/PGP for package<br \/>\n#  signing and verification.<br \/>\n#<br \/>\n%__gpg_check_password_cmd   %{__gpg} \\<br \/>\n    gpg &#8211;batch &#8211;no-verbose &#8211;passphrase-fd 3 -u &#8220;%{_gpg_name}&#8221; -so &#8211;<\/p>\n<p>%__gpg_sign_cmd         %{__gpg} \\<br \/>\n    gpg &#8211;batch &#8211;no-verbose &#8211;no-armor &#8211;passphrase-fd 3 \\<br \/>\n    %{?_gpg_digest_algo:&#8211;digest-algo %{_gpg_digest_algo}} \\<br \/>\n    &#8211;no-secmem-warning \\<br \/>\n    -u &#8220;%{_gpg_name}&#8221; -sbo %{__signature_filename} %{__plaintext_filename}<\/p>\n<h1>XXX rpm >= 4.1 verifies signatures internally<\/h1>\n<p>#%__gpg_verify_cmd     %{__gpg} \\<br \/>\n#  gpg &#8211;batch &#8211;no-verbose &#8211;verify &#8211;no-secmem-warning \\<br \/>\n#  %{__signature_filename} %{__plaintext_filename}<br \/>\n#<\/p>\n<h1>XXX rpm-4.1 verifies prelinked libraries using a prelink undo helper.<\/h1>\n<p>#  Normally this macro is defined in \/etc\/rpm\/macros.prelink, installed<br \/>\n#  with the prelink package. If the macro is undefined, then prelinked<br \/>\n#  shared libraries contents are MD5 digest verified (as usual), rather<br \/>\n#  than MD5 verifying the output of the prelink undo helper.<br \/>\n#<br \/>\n#  Note: The 2nd token is used as argv[0] and &#8220;library&#8221; is a<br \/>\n#  placeholder that will be deleted and replaced with the appropriate<br \/>\n#  library file path.<br \/>\n#%__prelink_undo_cmd     \/usr\/sbin\/prelink prelink -y library<\/p>\n<h1>Horowitz Key Protocol server configuration<\/h1>\n<p>#<br \/>\n%_hkp_keyserver         http:\/\/pgp.mit.edu<br \/>\n%_hkp_keyserver_query   %{_hkp_keyserver}:11371\/pks\/lookup?op=get&amp;search=0x<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Transaction macros.<\/h1>\n<p>#  Macro(s) used to parameterize transactions.<br \/>\n#<br \/>\n#  The output binary package file name template used when building<br \/>\n#  binary packages.<br \/>\n#<\/p>\n<h1>XXX   Note: escaped %% for use in headerSprintf()<\/h1>\n<p>%_build_name_fmt    %%{ARCH}\/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm<\/p>\n<p>#  Verify digest\/signature flags for various rpm modes:<br \/>\n#  0x30300 (_RPMVSF_NODIGESTS)    &#8211;nohdrchk      if set, don&#8217;t check digest(s)<br \/>\n#  0xc0c00 (_RPMVSF_NOSIGNATURES) &#8211;nosignature   if set, don&#8217;t check signature(s)<br \/>\n#  0xf0000 (_RPMVSF_NOPAYLOAD)    &#8211;nolegacy      if set, check header+payload (if possible)<br \/>\n#  0x00f00 (_RPMVSF_NOHEADER)     &#8211;nohdrchk      if set, don&#8217;t check rpmdb headers<br \/>\n#<br \/>\n#  For example, the value 0xf0c00 (=0xf0000+0xc0c00) disables legacy<br \/>\n#  digest\/signature checking, disables signature checking, but attempts<br \/>\n#  digest checking, also when retrieving headers from the database.<br \/>\n#<br \/>\n#  You also can do:<br \/>\n#   >>> hex(rpm._RPMVSF_NOSIGNATURES)<br \/>\n#   &#8216;0xc0c00&#8217;<br \/>\n#  or:<br \/>\n#   >>> hex(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NOPAYLOAD)<br \/>\n#   &#8216;0xf0c00&#8217;<br \/>\n#  at the python prompt for example, after &#8220;import rpm&#8221;.<br \/>\n#<br \/>\n#  The checking overhead is ~11ms per header for digests\/signatures;<br \/>\n#  each header from the database is checked only when first encountered<br \/>\n#  for each database open.<br \/>\n#<br \/>\n#  Note: the %_vsflags_erase applies to &#8211;upgrade\/&#8211;freshen modes as<br \/>\n#  well as &#8211;erase.<br \/>\n#<br \/>\n%__vsflags      0xf0000<br \/>\n%_vsflags_build     %{__vsflags}<br \/>\n%_vsflags_erase     %{__vsflags}<br \/>\n%_vsflags_install   %{__vsflags}<br \/>\n%_vsflags_query     %{__vsflags}<br \/>\n%_vsflags_rebuilddb 0xc0c00<br \/>\n%_vsflags_verify    %{__vsflags}<\/p>\n<p>#<\/p>\n<h1>Default output format string for rpm -qa<\/h1>\n<p>#<\/p>\n<h1>XXX   Note: escaped %% for use in headerFormat()<\/h1>\n<p>%_query_all_fmt     %%{nvra}<\/p>\n<p>#<\/p>\n<h1>Default path to the file used for transaction fcntl lock.<\/h1>\n<p>%_rpmlock_path  %{_dbpath}\/.rpm.lock<\/p>\n<p>#<\/p>\n<h1>ISA dependency marker, none for noarch and name-bitness for others<\/h1>\n<p>%_isa           %{?__isa:(%{__isa})}%{!?__isa:%{nil}}<\/p>\n<p>#<\/p>\n<h1>Define per-arch and per-os defaults. Normally overridden by per-target macros.<\/h1>\n<p>%__arch_install_post    %{nil}<br \/>\n%__os_install_post  %{___build_post}<\/p>\n<h1>Macro to fix broken permissions in sources<\/h1>\n<p>%_fixperms      %{__chmod} -Rf a+rX,u+w,g-w,o-w<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Scriptlet template templates.<\/h1>\n<p>#  Global defaults used for building scriptlet templates.<br \/>\n#<\/p>\n<p>%___build_shell     %{?_buildshell:%{_buildshell}}%{!?_buildshell:\/bin\/sh}<br \/>\n%___build_args      -e<br \/>\n%___build_cmd       %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}<br \/>\n%___build_pre   \\<br \/>\n  RPM_SOURCE_DIR=\\&#8221;%{u2p:%{_sourcedir}}\\&#8221;\\<br \/>\n  RPM_BUILD_DIR=\\&#8221;%{u2p:%{_builddir}}\\&#8221;\\<br \/>\n  RPM_OPT_FLAGS=\\&#8221;%{optflags}\\&#8221;\\<br \/>\n  RPM_LD_FLAGS=\\&#8221;%{?__global_ldflags}\\&#8221;\\<br \/>\n  RPM_ARCH=\\&#8221;%{_arch}\\&#8221;\\<br \/>\n  RPM_OS=\\&#8221;%{_os}\\&#8221;\\<br \/>\n  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS\\<br \/>\n  RPM_DOC_DIR=\\&#8221;%{_docdir}\\&#8221;\\<br \/>\n  export RPM_DOC_DIR\\<br \/>\n  RPM_PACKAGE_NAME=\\&#8221;%{name}\\&#8221;\\<br \/>\n  RPM_PACKAGE_VERSION=\\&#8221;%{version}\\&#8221;\\<br \/>\n  RPM_PACKAGE_RELEASE=\\&#8221;%{release}\\&#8221;\\<br \/>\n  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\\<br \/>\n  LANG=C\\<br \/>\n  export LANG\\<br \/>\n  unset CDPATH DISPLAY ||:\\<br \/>\n  %{?buildroot:RPM_BUILD_ROOT=\\&#8221;%{u2p:%{buildroot}}\\&#8221;\\<br \/>\n  export RPM_BUILD_ROOT}\\<br \/>\n  %{?_javaclasspath:CLASSPATH=\\&#8221;%{_javaclasspath}\\&#8221;\\<br \/>\n  export CLASSPATH}\\<br \/>\n  PKG_CONFIG_PATH=\\&#8221;${PKG_CONFIG_PATH}:%{_libdir}\/pkgconfig:%{_datadir}\/pkgconfig\\&#8221;\\<br \/>\n  export PKG_CONFIG_PATH\\<br \/>\n  \\<br \/>\n  %{verbose:set -x}%{!verbose:exec > \/dev\/null}\\<br \/>\n  umask 022\\<br \/>\n  cd \\&#8221;%{u2p:%{_builddir}}\\&#8221;\\<\/p>\n<p>#%___build_body        %{nil}<br \/>\n%___build_post      exit 0<\/p>\n<p>%___build_template  #!%{___build_shell}\\<br \/>\n%{___build_pre}\\<br \/>\n%{nil}<\/p>\n<p>#%{___build_body}\\<br \/>\n#%{___build_post}\\<br \/>\n#%{nil}<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- Scriptlet templates.<\/h1>\n<p>#  Macro(s) that expand to a command and script that is executed.<br \/>\n#  CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.<br \/>\n#<br \/>\n%__spec_prep_shell  %{___build_shell}<br \/>\n%__spec_prep_args   %{___build_args}<br \/>\n%__spec_prep_cmd    %{___build_cmd}<br \/>\n%__spec_prep_pre    %{___build_pre}<br \/>\n%__spec_prep_body   %{___build_body}<br \/>\n%__spec_prep_post   %{___build_post}<br \/>\n%__spec_prep_template   #!%{__spec_prep_shell}\\<br \/>\n%{__spec_prep_pre}\\<br \/>\n%{nil}<\/p>\n<p>#%{__spec_prep_body}\\<br \/>\n#%{__spec_prep_post}\\<br \/>\n#%{nil}<\/p>\n<p>%__spec_build_shell %{___build_shell}<br \/>\n%__spec_build_args  %{___build_args}<br \/>\n%__spec_build_cmd   %{___build_cmd}<br \/>\n%__spec_build_pre   %{___build_pre}<br \/>\n%__spec_build_body  %{___build_body}<br \/>\n%__spec_build_post  %{___build_post}<br \/>\n%__spec_build_template  #!%{__spec_build_shell}\\<br \/>\n%{__spec_build_pre}\\<br \/>\n%{nil}<\/p>\n<p>#%{__spec_build_body}\\<br \/>\n#%{__spec_build_post}\\<br \/>\n#%{nil}<\/p>\n<p>%__spec_install_shell   %{___build_shell}<br \/>\n%__spec_install_args    %{___build_args}<br \/>\n%__spec_install_cmd %{___build_cmd}<br \/>\n%__spec_install_pre %{___build_pre}<br \/>\n%__spec_install_body    %{___build_body}<br \/>\n%__spec_install_post\\<br \/>\n%{?__debug_package:%{__debug_install_post}}\\<br \/>\n%{__arch_install_post}\\<br \/>\n%{__os_install_post}\\<br \/>\n%{nil}<br \/>\n%__spec_install_template    #!%{__spec_install_shell}\\<br \/>\n%{__spec_install_pre}\\<br \/>\n%{nil}<\/p>\n<p>#%{__spec_install_body}\\<br \/>\n#%{__spec_install_post}\\<br \/>\n#%{nil}<\/p>\n<p>%__spec_check_shell %{___build_shell}<br \/>\n%__spec_check_args  %{___build_args}<br \/>\n%__spec_check_cmd   %{___build_cmd}<br \/>\n%__spec_check_pre   %{___build_pre}<br \/>\n%__spec_check_body  %{___build_body}<br \/>\n%__spec_check_post  %{___build_post}<br \/>\n%__spec_check_template  #!%{__spec_check_shell}\\<br \/>\n%{__spec_check_pre}\\<br \/>\n%{nil}<\/p>\n<p>#%{__spec_check_body}\\<br \/>\n#%{__spec_check_post}\\<br \/>\n#%{nil}<\/p>\n<p>#%__spec_autodep_shell %{___build_shell}<br \/>\n#%__spec_autodep_args  %{___build_args}<br \/>\n#%__spec_autodep_cmd   %{___build_cmd}<br \/>\n#%__spec_autodep_pre   %{___build_pre}<br \/>\n#%__spec_autodep_body  %{___build_body}<br \/>\n#%__spec_autodep_post  %{___build_post}<br \/>\n#%__spec_autodep_template  #!%{__spec_autodep_shell}\\<br \/>\n#%{__spec_autodep_pre}\\<br \/>\n#%{nil}<\/p>\n<p>#%{__spec_autodep_body}\\<br \/>\n#%{__spec_autodep_post}\\<br \/>\n#%{nil}<\/p>\n<p>%__spec_clean_shell %{___build_shell}<br \/>\n%__spec_clean_args  %{___build_args}<br \/>\n%__spec_clean_cmd   %{___build_cmd}<br \/>\n%__spec_clean_pre   %{___build_pre}<br \/>\n%__spec_clean_body  %{___build_body}<br \/>\n%__spec_clean_post  %{___build_post}<br \/>\n%__spec_clean_template  #!%{__spec_clean_shell}\\<br \/>\n%{__spec_clean_pre}\\<br \/>\n%{nil}<\/p>\n<p>#%{__spec_clean_body}\\<br \/>\n#%{__spec_clean_post}\\<br \/>\n#%{nil}<\/p>\n<p>%__spec_rmbuild_shell   %{___build_shell}<br \/>\n%__spec_rmbuild_args    %{___build_args}<br \/>\n%__spec_rmbuild_cmd %{___build_cmd}<br \/>\n%__spec_rmbuild_pre %{___build_pre}<br \/>\n%__spec_rmbuild_body    %{___build_body}<br \/>\n%__spec_rmbuild_post    %{___build_post}<br \/>\n%__spec_rmbuild_template    #!%{__spec_rmbuild_shell}\\<br \/>\n%{__spec_rmbuild_pre}\\<br \/>\n%{nil}<\/p>\n<p>#%{__spec_rmbuild_body}\\<br \/>\n#%{__spec_rmbuild_post}\\<br \/>\n#%{nil}<\/p>\n<h1>XXX We don&#8217;t expand pre\/post install scriptlets (yet).<\/h1>\n<p>#%__spec_pre_pre       %{nil}<br \/>\n#%__spec_pre_post      %{nil}<br \/>\n#%__spec_post_pre      %{nil}<br \/>\n#%__spec_post_post     %{nil}<br \/>\n#%__spec_preun_pre     %{nil}<br \/>\n#%__spec_preun_post        %{nil}<br \/>\n#%__spec_postun_pre        %{nil}<br \/>\n#%__spec_postun_post       %{nil}<br \/>\n#%__spec_triggerpostun_pre %{nil}<br \/>\n#%__spec_triggerpostun_post    %{nil}<br \/>\n#%__spec_triggerun_pre     %{nil}<br \/>\n#%__spec_triggerun_post        %{nil}<br \/>\n#%__spec_triggerin_pre     %{nil}<br \/>\n#%__spec_triggerin_post        %{nil}<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- configure macros.<\/h1>\n<p>#  Macro(s) slavishly copied from autoconf&#8217;s config.status.<br \/>\n#<br \/>\n%_prefix        \/usr<br \/>\n%_exec_prefix       %{_prefix}<br \/>\n%_bindir        %{_exec_prefix}\/bin<br \/>\n%_sbindir       %{_exec_prefix}\/sbin<br \/>\n%_libexecdir        %{_exec_prefix}\/libexec<br \/>\n%_datadir       %{_prefix}\/share<br \/>\n%_sysconfdir        \/etc<br \/>\n%_sharedstatedir    %{_prefix}\/com<br \/>\n%_localstatedir     %{_prefix}\/var<br \/>\n%_lib           lib<br \/>\n%_libdir        %{_exec_prefix}\/%{_lib}<br \/>\n%_includedir        %{_prefix}\/include<br \/>\n%_infodir       %{_datadir}\/info<br \/>\n%_mandir        %{_datadir}\/man<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- config.guess platform macros.<\/h1>\n<p>#  Macro(s) similar to the tokens used by configure.<br \/>\n#<br \/>\n%_build         %{_host}<br \/>\n%_build_alias       %{_host_alias}<br \/>\n%_build_cpu     %{_host_cpu}<br \/>\n%_build_vendor      %{_host_vendor}<br \/>\n%_build_os      %{_host_os}<br \/>\n%_host          x86_64-redhat-linux-gnu<br \/>\n%_host_alias        x86_64-redhat-linux-gnu%{nil}<br \/>\n%_host_cpu      x86_64<br \/>\n%_host_vendor       redhat<br \/>\n%_host_os       linux<br \/>\n%_target        %{_host}<br \/>\n%_target_alias      %{_host_alias}<br \/>\n%_target_cpu        %{_host_cpu}<br \/>\n%_target_vendor     %{_host_vendor}<br \/>\n%_target_os     %{_host_os}<\/p>\n<p>#==============================================================================<\/p>\n<h1>&#8212;- specfile macros.<\/h1>\n<p>#  Macro(s) here can be used reliably for reproducible builds.<br \/>\n#  (Note: Above is the goal, below are the macros under development)<br \/>\n#<\/p>\n<h1>The configure macro runs autoconf configure script with platform specific<\/h1>\n<h1>directory structure (&#8211;prefix, &#8211;libdir etc) and compiler flags<\/h1>\n<h1>such as CFLAGS.<\/h1>\n<p>#<\/p>\n<h1>The configure macro should be invoked as %configure (rather than %{configure})<\/h1>\n<h1>because the rest of the arguments will be expanded using %*.<\/h1>\n<p>#<br \/>\n%_configure .\/configure<br \/>\n%configure \\<br \/>\n  CFLAGS=&#8221;${CFLAGS:-%optflags}&#8221; ; export CFLAGS ; \\<br \/>\n  CXXFLAGS=&#8221;${CXXFLAGS:-%optflags}&#8221; ; export CXXFLAGS ; \\<br \/>\n  FFLAGS=&#8221;${FFLAGS:-%optflags}&#8221; ; export FFLAGS ; \\<br \/>\n  %{_configure} &#8211;host=%{_host} &#8211;build=%{_build} &#92;\\<br \/>\n    &#8211;program-prefix=%{?_program_prefix} &#92;\\<br \/>\n    &#8211;disable-dependency-tracking &#92;\\<br \/>\n    &#8211;prefix=%{_prefix} &#92;\\<br \/>\n    &#8211;exec-prefix=%{_exec_prefix} &#92;\\<br \/>\n    &#8211;bindir=%{_bindir} &#92;\\<br \/>\n    &#8211;sbindir=%{_sbindir} &#92;\\<br \/>\n    &#8211;sysconfdir=%{_sysconfdir} &#92;\\<br \/>\n    &#8211;datadir=%{_datadir} &#92;\\<br \/>\n    &#8211;includedir=%{_includedir} &#92;\\<br \/>\n    &#8211;libdir=%{_libdir} &#92;\\<br \/>\n    &#8211;libexecdir=%{_libexecdir} &#92;\\<br \/>\n    &#8211;localstatedir=%{_localstatedir} &#92;\\<br \/>\n    &#8211;sharedstatedir=%{_sharedstatedir} &#92;\\<br \/>\n    &#8211;mandir=%{_mandir} &#92;\\<br \/>\n    &#8211;infodir=%{_infodir}<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>The &#8220;make&#8221; analogue, hiding the _smp_mflags magic from specs<\/h1>\n<p>%make_build %{__make} %{?_smp_mflags}<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>The make install analogue of %configure for modern autotools:<\/h1>\n<p>%make_install %{__make} install DESTDIR=%{?buildroot}<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>Former make install analogue, kept for compatibility and for old\/broken<\/h1>\n<h1>packages that don&#8217;t support DESTDIR properly.<\/h1>\n<p>%makeinstall \\<br \/>\n  %{__make} &#92;\\<br \/>\n    prefix=%{?buildroot:%{buildroot}}%{_prefix} &#92;\\<br \/>\n    exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} &#92;\\<br \/>\n    bindir=%{?buildroot:%{buildroot}}%{_bindir} &#92;\\<br \/>\n    sbindir=%{?buildroot:%{buildroot}}%{_sbindir} &#92;\\<br \/>\n    sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} &#92;\\<br \/>\n    datadir=%{?buildroot:%{buildroot}}%{_datadir} &#92;\\<br \/>\n    includedir=%{?buildroot:%{buildroot}}%{_includedir} &#92;\\<br \/>\n    libdir=%{?buildroot:%{buildroot}}%{_libdir} &#92;\\<br \/>\n    libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} &#92;\\<br \/>\n    localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} &#92;\\<br \/>\n    sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} &#92;\\<br \/>\n    mandir=%{?buildroot:%{buildroot}}%{_mandir} &#92;\\<br \/>\n    infodir=%{?buildroot:%{buildroot}}%{_infodir} &#92;\\<br \/>\n  install<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>The GNUconfigure macro does the following:<\/h1>\n<h1>update config.guess and config.sub.<\/h1>\n<h1>regenerate all autoconf\/automake files<\/h1>\n<h1>optionally change to a directory (make the directory if requested).<\/h1>\n<h1>run configure with correct prefix, platform, and CFLAGS.<\/h1>\n<h1>optionally restore current directory.<\/h1>\n<p>#<\/p>\n<h1>Based on autogen.sh from GNOME and original GNUconfigure<\/h1>\n<dl>\n#<br \/>\n%GNUconfigure(MCs:)      \\<br \/>\n  CFLAGS=&#8221;${CFLAGS:-%optflags}&#8221; ; export CFLAGS; \\<br \/>\n  LDFLAGS=&#8221;${LDFLAGS:-%{-s:-s}}&#8221;  ; export LDFLAGS; \\<br \/>\n  %{-C:_mydir=&#8221;`pwd`&#8221;; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \\<br \/>\n  dirs=&#8221;`find ${_mydir} -name configure.in -print`&#8221;; export dirs; \\<br \/>\n    for coin in `echo ${dirs}` \\<br \/>\ndo \\<br \/>\n  dr=`dirname ${coin}`; \\<br \/>\nif test -f ${dr}\/NO-AUTO-GEN; then \\<\/p>\n<dd>\\<br \/>\nelse \\<br \/>\n macrodirs=<code>sed -n -e 's,AM_ACLOCAL_INCLUDE(\\(.*\\)),\\1,gp' &lt; ${coin}<\/code>; \\<br \/>\n( cd ${dr}; \\<br \/>\n  aclocalinclude=&#8221;${ACLOCAL_FLAGS}&#8221;; \\<br \/>\n  for k in ${macrodirs}; do \\<br \/>\n    if test -d ${k}; then \\<br \/>\n      aclocalinclude=&#8221;${aclocalinclude} -I ${k}&#8221;; \\<br \/>\n    ##else \\<br \/>\n    ##  echo &#8220;<strong>Warning<\/strong>: No such directory &#96;${k}&#8217;.  Ignored.&#8221; \\<br \/>\n    fi \\<br \/>\n  done \\<br \/>\n  if grep &#8220;^AM_GNU_GETTEXT&#8221; configure.in >\/dev\/null; then \\<br \/>\n    if grep &#8220;sed.*POTFILES&#8221; configure.in >\/dev\/null; then \\<br \/>\n      : do nothing &#8212; we still have an old unmodified configure.in \\<br \/>\n    else \\<br \/>\n      test -r ${dr}\/aclocal.m4 || touch ${dr}\/aclocal.m4; \\<br \/>\n      echo &#8220;no&#8221; | gettextize &#8211;force &#8211;copy; \\<br \/>\n      test -r ${dr}\/aclocal.m4 &amp;&amp; %{__chmod} u+w ${dr}\/aclocal.m4; \\<br \/>\n    fi \\<br \/>\n  fi \\<br \/>\n  if grep &#8220;^AM_PROG_LIBTOOL&#8221; configure.in >\/dev\/null; then \\<br \/>\n    %{__libtoolize} &#8211;force &#8211;copy; \\<br \/>\n  fi \\<br \/>\n  aclocal ${aclocalinclude}; \\<br \/>\n  if grep &#8220;^AM_CONFIG_HEADER&#8221; configure.in >\/dev\/null; then \\<br \/>\n    %{__autoheader}; \\<br \/>\n  fi \\<br \/>\n  echo &#8220;Running automake &#8211;gnu ${am_opt} &#8230;&#8221;; \\<br \/>\n  %{__automake} &#8211;add-missing &#8211;gnu ${am_opt}; \\<br \/>\n  %{__autoconf}; \\<br \/>\n); \\<br \/>\nfi \\<br \/>\ndone \\<br \/>\n%{-C:${_mydir}}%{!-C:.}\/configure &#8211;prefix=%{_prefix} &#8211;exec-prefix=%{_exec_prefix} &#8211;bindir=%{_bindir} &#8211;sbindir=%{_sbindir} &#8211;sysconfdir=%{_sysconfdir} &#8211;datadir=%{_datadir} &#8211;includedir=%{_includedir} &#8211;libdir=%{_libdir} &#8211;libexecdir=%{_libexecdir} &#8211;localstatedir=%{_localstatedir} &#8211;sharedstatedir=%{_sharedstatedir} &#8211;mandir=%{_mandir} &#8211;infodir=%{_infodir} %* ; \\<br \/>\n%{-C:cd ${_mydir}; unset _mydir}<\/dd>\n<\/dl>\n<p>%patches %{lua: for i, p in ipairs(patches) do print(p..&#8221; &#8220;) end}<br \/>\n%sources %{lua: for i, s in ipairs(sources) do print(s..&#8221; &#8220;) end}<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>Useful perl macros (from Artur Frysiak <a href=\"&#109;&#97;&#x69;l&#116;&#x6f;&#x3a;&#119;&#105;&#x67;&#x65;&#116;&#64;&#x74;1&#55;&#x2e;&#x64;&#115;&#46;&#x70;&#x77;&#114;&#46;&#x77;r&#111;&#x63;&#x2e;&#112;&#108;\">&#119;&#105;&#x67;&#x65;&#116;&#64;&#x74;1&#55;&#x2e;&#x64;&#115;&#46;&#x70;&#x77;&#114;&#46;&#x77;r&#111;&#x63;&#x2e;&#112;&#108;<\/a>)<\/h1>\n<p>#<\/p>\n<h1>For example, these can be used as (from ImageMagick.spec from PLD site)<\/h1>\n<p>#  [&#8230;]<br \/>\n#  BuildPrereq: perl<br \/>\n#  [&#8230;]<br \/>\n#  %package perl<br \/>\n#  Summary: libraries and modules for access to ImageMagick from perl<br \/>\n#  Group: Development\/Languages\/Perl<br \/>\n#  Requires: %{name} = %{version}<br \/>\n#  %requires_eq    perl<br \/>\n#  [&#8230;]<br \/>\n#  %install<br \/>\n#  rm -fr $RPM_BUILD_ROOT<br \/>\n#  install -d $RPM_BUILD_ROOT\/%{perl_sitearch}<br \/>\n#  [&#8230;]<br \/>\n#  %files perl<br \/>\n#  %defattr(644,root,root,755)<br \/>\n#  %{perl_sitearch}\/Image<br \/>\n#  %dir %{perl_sitearch}\/auto\/Image<br \/>\n#<br \/>\n%requires_eq()  %(LC_ALL=&#8221;C&#8221; echo &#8216;%*&#8217; | xargs -r rpm -q &#8211;qf &#8216;Requires: %%{name} = %%{epoch}:%%{version}&#92;n&#8217; | sed -e &#8216;s\/ (none):\/ \/&#8217; -e &#8216;s\/ 0:\/ \/&#8217; | grep -v &#8220;is not&#8221;)<br \/>\n%perl_sitearch  %(eval &#8220;<code>%{__perl} -V:installsitearch<\/code>&#8220;; echo $installsitearch)<br \/>\n%perl_sitelib   %(eval &#8220;<code>%{__perl} -V:installsitelib<\/code>&#8220;; echo $installsitelib)<br \/>\n%perl_vendorarch %(eval &#8220;<code>%{__perl} -V:installvendorarch<\/code>&#8220;; echo $installvendorarch)<br \/>\n%perl_vendorlib  %(eval &#8220;<code>%{__perl} -V:installvendorlib<\/code>&#8220;; echo $installvendorlib)<br \/>\n%perl_archlib   %(eval &#8220;<code>%{__perl} -V:installarchlib<\/code>&#8220;; echo $installarchlib)<br \/>\n%perl_privlib   %(eval &#8220;<code>%{__perl} -V:installprivlib<\/code>&#8220;; echo $installprivlib)<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>Useful python macros for determining python version and paths<\/h1>\n<p>#<br \/>\n%python_sitelib %(%{__python} -c &#8220;from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())&#8221;)<br \/>\n%python_sitearch %(%{__python} -c &#8220;from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))&#8221;)<br \/>\n%python_version %(%{__python} -c &#8220;import sys; sys.stdout.write(sys.version[:3])&#8221;)<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>arch macro for all Intel i?86 compatibile processors<\/h1>\n<h1>(Note: This macro (and it&#8217;s analogues) will probably be obsoleted when<\/h1>\n<h1>rpm can use regular expressions against target platforms in macro<\/h1>\n<h1>conditionals.<\/h1>\n<p>#<br \/>\n%ix86   i386 i486 i586 i686 pentium3 pentium4 athlon geode<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>arch macro for all supported ARM processors<\/h1>\n<p>%arm    armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l armv7hl armv7hnl<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>arch macro for all supported Sparc processors<\/h1>\n<p>%sparc sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>arch macro for all supported Alpha processors<\/h1>\n<p>%alpha  alpha alphaev56 alphaev6 alphaev67<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>arch macro for all supported PowerPC 64 processors<\/h1>\n<p>%power64    ppc64 ppc64p7 ppc64le<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>Use in %install to generate locale specific file lists. For example,<\/h1>\n<p>#<\/p>\n<h1>%install<\/h1>\n<h1>&#8230;<\/h1>\n<h1>%find_lang %{name}<\/h1>\n<h1>&#8230;<\/h1>\n<h1>%files -f %{name}.lang<\/h1>\n<p>#<br \/>\n%find_lang  %{_rpmconfigdir}\/find-lang.sh %{buildroot}<\/p>\n<h1>Commands + opts to use for retrieving remote files<\/h1>\n<h1>Proxy opts can be set through &#8211;httpproxy\/&#8211;httpport popt aliases,<\/h1>\n<h1>for any special local needs use %__urlhelper_localopts in system-wide<\/h1>\n<h1>or per-user macro configuration.<\/h1>\n<p>%__urlhelpercmd         \/usr\/bin\/curl<br \/>\n%__urlhelperopts        &#8211;silent &#8211;show-error &#8211;fail &#8211;globoff &#8211;location -o<br \/>\n%__urlhelper_proxyopts   %{?_httpproxy:&#8211;proxy %{_httpproxy}%{?_httpport::%{_httpport}}}%{!?_httpproxy:%{nil}}<br \/>\n%_urlhelper             %{__urlhelpercmd} %{?__urlhelper_localopts} %{?__urlhelper_proxyopts} %{__urlhelperopts}<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>Collection specific macros<\/h1>\n<p>%__plugindir        %{_libdir}\/rpm-plugins<\/p>\n<h1>%__collection_font    %{__plugindir}\/exec.so \/usr\/bin\/fc-cache<\/h1>\n<h1>%__collection_java    %{__plugindir}\/exec.so \/usr\/bin\/rebuild-gcj-db<\/h1>\n<h1>%__collection_sepolicy        %{__plugindir}\/sepolicy.so<\/h1>\n<h1>%__collection_sepolicy_flags  1<\/h1>\n<h1>Transaction plugin macros<\/h1>\n<p>%__transaction_systemd_inhibit  %{__plugindir}\/systemd_inhibit.so<\/p>\n<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<h1>Macros for further automated spec %setup and patch application<\/h1>\n<h1>default to plain patch<\/h1>\n<p>%__scm patch<\/p>\n<h1>meh, figure something saner<\/h1>\n<p>%__scm_username rpm-build<br \/>\n%__scm_usermail <rpm-build><br \/>\n%__scm_author %{__scm_username} %{__scm_usermail}<\/p>\n<h1>Plain patch (-m is unused)<\/h1>\n<p>%__scm_setup_patch(q) %{nil}<br \/>\n%__scm_apply_patch(qp:m:)\\<br \/>\n%{__patch} %{-p:-p%{-p*}} %{-q:-s}<\/p>\n<h1>Mercurial (aka hg)<\/h1>\n<p>%__scm_setup_hg(q)\\<br \/>\n%{__hg} init %{-q} .\\<br \/>\n%{__hg} add %{-q} .\\<br \/>\n%{__hg} commit %{-q} &#8211;user &#8220;%{__scm_author}&#8221; -m &#8220;%{name}-%{version} base&#8221;<\/p>\n<p>%__scm_apply_hg(qp:m:)\\<br \/>\n%{__hg} import &#8211; %{-p:-p%{-p<em>}} %{-q} -m %{-m<\/em>} &#8211;user &#8220;%{__scm_author}&#8221;<\/p>\n<h1>Git<\/h1>\n<p>%__scm_setup_git(q)\\<br \/>\n%{__git} init %{-q}\\<br \/>\n%{__git} config user.name &#8220;%{__scm_username}&#8221;\\<br \/>\n%{__git} config user.email &#8220;%{__scm_usermail}&#8221;\\<br \/>\n%{__git} add .\\<br \/>\n%{__git} commit %{-q} -a&#92;\\<br \/>\n    &#8211;author &#8220;%{__scm_author}&#8221; -m &#8220;%{name}-%{version} base&#8221;<\/p>\n<p>%__scm_apply_git(qp:m:)\\<br \/>\n%{__git} apply &#8211;index %{-p:-p%{-p<em>}} -\\<br \/>\n%{__git} commit %{-q} -m %{-m<\/em>} &#8211;author &#8220;%{__scm_author}&#8221;<\/p>\n<h1>Git, using &#8220;git am&#8221; (-m is unused)<\/h1>\n<p>%__scm_setup_git_am(q)\\<br \/>\n%{expand:%__scm_setup_git %{-q}}<\/p>\n<p>%__scm_apply_git_am(qp:m:)\\<br \/>\n%{__git} am %{-q} %{-p:-p%{-p*}}<\/p>\n<h1>Quilt<\/h1>\n<p>%__scm_setup_quilt(q) %{nil}<br \/>\n%__scm_apply_quilt(qp:m:)\\<br \/>\n%{__quilt} import %{-p:-p%{-p*}} %{1} &amp;&amp; %{__quilt} push<\/p>\n<h1>Bzr<\/h1>\n<p>%__scm_setup_bzr(q)\\<br \/>\n%{__bzr} init %{-q}\\<br \/>\n%{__bzr} whoami &#8211;branch &#8220;%{__scm_author}&#8221;\\<br \/>\n%{__bzr} add .\\<br \/>\n%{__bzr} commit %{-q} -m &#8220;%{name}-%{version} base&#8221;<\/p>\n<h1>bzr doesn&#8217;t seem to have its own command to apply patches?<\/h1>\n<p>%__scm_apply_bzr(qp:m:)\\<br \/>\n%{__patch} %{-p:-p%{-p<em>}} %{-q:-s}\\<br \/>\n%{__bzr} commit %{-q} -m %{-m<\/em>}<\/p>\n<h1>Single patch application<\/h1>\n<p>%apply_patch(qp:m:)\\<br \/>\n%{uncompress:%{1}} | %{expand:%__scm_apply_%{__scm} %{-q} %{-p:-p%{-p<em>}} %{-m:-m%{-m<\/em>}}}<\/p>\n<h1>Automatically apply all patches<\/h1>\n<p>%autopatch(vp:)\\<br \/>\n%{lua:\\<br \/>\nlocal options = rpm.expand(&#8220;%{!-v:-q} %{-p:-p%{-p*}} &#8220;)\\<br \/>\nfor i, p in ipairs(patches) do\\<br \/>\n    print(rpm.expand(&#8220;%apply_patch -m %{basename:&#8221;..p..&#8221;}  &#8220;..options..p..&#8221;&#92;n&#8221;))\\<br \/>\nend}<\/p>\n<h1>One macro to (optionally) do it all.<\/h1>\n<h1>-S<scm name>  Sets the used patch application style, eg &#8216;-S git&#8217; enables<\/h1>\n<h1>usage of git repository and per-patch commits.<\/h1>\n<h1>-N        Disable automatic patch application<\/h1>\n<h1>-p<num>   Use -p<num> for patch application<\/h1>\n<p>%autosetup(a:b:cDn:TvNS:p:)\\<br \/>\n%setup %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{!-v:-q}\\<br \/>\n%{-S:%global __scm %{-S<em>}}\\<br \/>\n%{-S:%{expand:%__scm_setup_%{-S<\/em>} %{!-v:-q}}}\\<br \/>\n%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}<\/p>\n<h1>\\endverbatim<\/h1>\n<p>#*\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8def\u5f84\u4e3a\uff1a \/usr\/lib\/rpm\/macros \u5185\u5bb9\u4e3a\uff1a #\/*! \\page config_macros &hellip;&nbsp;<a href=\"http:\/\/cmesoft.com\/?p=774\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">rpm \u5b8f\u5b9a\u4e49\u6587\u6863<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[34],"tags":[],"class_list":["post-774","post","type-post","status-publish","format-standard","hentry","category-devops"],"_links":{"self":[{"href":"http:\/\/cmesoft.com\/index.php?rest_route=\/wp\/v2\/posts\/774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cmesoft.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cmesoft.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cmesoft.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cmesoft.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=774"}],"version-history":[{"count":1,"href":"http:\/\/cmesoft.com\/index.php?rest_route=\/wp\/v2\/posts\/774\/revisions"}],"predecessor-version":[{"id":775,"href":"http:\/\/cmesoft.com\/index.php?rest_route=\/wp\/v2\/posts\/774\/revisions\/775"}],"wp:attachment":[{"href":"http:\/\/cmesoft.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cmesoft.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=774"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cmesoft.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}