1 #/*! \page config_macros Default configuration: @RPMCONFIGDIR@/macros
4 # $Id: macros.in,v 1.154.2.6 2005/07/21 01:45:44 jbj Exp $
6 # This is a global RPM configuration file. All changes made here will
7 # be lost when the rpm package is upgraded. Any per-system configuration
8 # should be added to /etc/rpm/macros, while per-user configuration should
9 # be added to ~/.rpmmacros.
11 #==============================================================================
12 # Macro naming conventions (preliminary):
14 # Macros that begin with an underscore are "local" in the sense that
15 # they (if used) will not be exported in rpm headers. Some macros
16 # that don't start with an underscore (but look like they should)
17 # are compatible with macros generated by rpm-2.5.x and will be made
18 # more consistent in a future release.
21 #==============================================================================
22 # ---- A macro that expands to nothing.
26 #==============================================================================
27 # ---- filesystem macros.
33 #==============================================================================
34 # ---- Generally useful path macros.
49 %__install @__INSTALL@
66 #==============================================================================
67 # ---- Build system path macros.
76 %__objcopy @__OBJCOPY@
77 %__objdump @__OBJDUMP@
82 # XXX avoid failures if tools are not installed when rpm is built.
83 %__libtoolize libtoolize
85 %__autoheader autoheader
89 #==============================================================================
90 # Conditional build stuff.
92 # Check if symbol is defined.
93 # Example usage: %if %{defined with_foo} && %{undefined with_bar} ...
94 %defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
95 %undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
97 # Shorthand for %{defined with_...}
98 %with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
99 %without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
101 # Handle conditional builds. %bcond_with is for case when feature is
102 # default off and needs to be activated with --with ... command line
103 # switch. %bcond_without is for the dual case.
105 # %bcond_with foo defines symbol with_foo if --with foo was specified on
107 # %bcond_without foo defines symbol with_foo if --without foo was *not*
108 # specified on command line.
110 # For example (spec file):
113 # %bcond_with extra_fonts
114 # %bcond_without static
116 # %if %{with extra_fonts}
121 # %if ! %{with static}
124 # %ifdef %{with static}
127 # %{?with_static: ... }
128 # %{!?with_static: ... }
129 # %{?with_extra_fonts: ... }
130 # %{!?with_extra_fonts: ... }
133 # The bottom line: never use without_foo, _with_foo nor _without_foo, only
134 # with_foo. This way changing default set of bconds for given spec is just
135 # a matter of changing single line in it and syntax is more readable.
136 %bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
137 %bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
139 #==============================================================================
140 # ---- Required rpmrc macros.
141 # Macros that used to be initialized as a side effect of rpmrc parsing.
142 # These are the default values that can be overridden by other
143 # (e.g. per-platform, per-system, per-packager, per-package) macros.
145 # The directory where sources/patches will be unpacked and built.
146 %_builddir %{_topdir}/BUILD
148 # The interpreter used for build scriptlets.
151 # The path to the bzip2 executable (legacy, use %{__bzip2} instead).
152 %_bzip2bin %{__bzip2}
154 # The location of the rpm database file(s).
155 %_dbpath %{_var}/lib/rpm
157 # The location of the rpm database file(s) after "rpm --rebuilddb".
158 %_dbpath_rebuild %{_dbpath}
161 # Path to script that creates debug symbols in a /usr/lib/debug
163 %__debug_install_post \
164 @RPMCONFIGDIR@/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
167 # Template for debug information sub-package.
170 %global __debug_package 1\
172 Summary: Debug information for package %{name}\
173 Group: Development/Debug\
176 This package provides debug information for package %{name}.\
177 Debug information is useful when developing applications that use this\
178 package or when debugging this package.\
179 %files debug -f debugfiles.list\
180 %defattr(-,root,root)\
184 %_defaultdocdir %{_usr}/doc
186 # The path to the gzip executable (legacy, use %{__gzip} instead).
189 # The number of changelog entries kept when installing (legacy, unused in
190 # rpm-4.0.1 and later).
193 # The path to the pgp executable (legacy, use %{__pgp} instead).
196 # The directory where newly built binary packages will be written.
197 %_rpmdir %{_topdir}/RPMS
199 # A template used to generate the output binary package file name
201 %_rpmfilename %{_build_name_fmt}
203 # The default signature type.
206 # The directory where sources/patches from a source package will be
207 # installed. This is also where sources/patches are found when building.
208 %_sourcedir %{_topdir}/SOURCES
210 # The directory where the spec file from a source package will be
212 %_specdir %{_topdir}/SPECS
214 # The directory where newly built source packages will be written.
215 %_srcrpmdir %{_topdir}/SRPMS
217 # Directory where temporaray files can be created.
218 %_tmppath %{_var}/tmp
220 # Path to top of build area.
221 %_topdir %{_usrsrc}/redhat
223 # The path to the unzip executable (legacy, use %{__unzip} instead).
224 %_unzipbin %{__unzip}
226 #==============================================================================
227 # ---- Optional rpmrc macros.
228 # Macros that are initialized as a side effect of rpmrc and/or spec
231 # Configurable build root path, same as BuildRoot: in a specfile.
232 # (Note: the configured macro value will override the spec file value).
236 # The sub-directory (relative to %{_builddir}) where sources are compiled.
237 # This macro is set after processing %setup, either explicitly from the
238 # value given to -n or the default name-version.
242 # Configurable distribution information, same as Distribution: tag in a
247 # Configurable distribution URL, same as DistURL: tag in a specfile.
248 # The URL will be used to supply reliable information to tools like
251 # Note: You should not configure with disturl (or build packages with
252 # the DistURL: tag) unless you are willing to supply content in a
253 # yet-to-be-determined format at the URL specified.
257 # Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
258 # marked as %doc should be installed.
261 # The port and machine name of a FTP proxy host running TIS firewall.
266 # The signature to use and the location of configuration files for
267 # signing packages with GNU gpg.
272 # The port and machine name of an HTTP proxy host.
277 # The PATH put into the environment before running %pre/%post et al.
279 %_install_script_path /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
281 # A colon separated list of desired locales to be installed;
282 # "all" means install all locale specific files.
286 # The value of CLASSPATH in build scriptlets (iff configured).
290 # Import packaging conventions from jpackage.org (prefixed with _
291 # to avoid name collisions).
293 %_javadir %{_datadir}/java
294 %_javadocdir %{_datadir}/javadoc
301 # A colon separated list of paths where files should *not* be installed.
302 # Usually, these are network file system mount points.
307 # The type of pattern match used on rpmdb iterator selectors:
308 # "default" simple glob-like regex, periods will be escaped,
309 # splats will have period prepended, full "^...$" match
310 # required. Also, file path tags will use glob(7).
311 # "strcmp" compare strings
312 # "regex" regex(7) patterns using regcomp(3)/regexec(3)
313 # "glob" glob(7) patterns using fnmatch(3)
315 %_query_selector_match default
317 # Configurable packager information, same as Packager: in a specfile.
321 # Compression type and level for source/binary package payloads.
322 # "w9.gzdio" gzip level 9 (default).
323 # "w9.bzdio" bzip2 level 9.
325 #%_source_payload w9.gzdio
326 #%_binary_payload w9.gzdio
328 # The signature to use and the location of configuration files for
329 # signing packages with PGP.
334 # Configurable vendor information, same as Vendor: in a specfile.
338 #==============================================================================
339 # ---- Build configuration macros.
341 # Package version macro.
342 # The type of package to produce, for compatibility with legacy
345 # This is an rpm version, e.g. 30005 means to produce packaging compatible
346 # with rpm-3.0.5. At the moment, values < 30005 (i.e. compatibility with
347 # version before rpm-3.0.5) are not supported. The only incompatible change
348 # in rpm packaging since rpm-3.0.5 has been to replace a 3 with a 4 in the
349 # rpmlead, so there's little need to use any value greater than 30005.
351 %_package_version 30005
354 # Script gets packaged file list on input and buildroot as first parameter.
355 # Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.
357 # Note: Disable (by commenting out) for legacy compatibility.
358 %__check_files @RPMCONFIGDIR@/check-files %{buildroot}
361 # Should unpackaged files in a build root terminate a build?
363 # Note: The default value should be 0 for legacy compatibility.
364 %_unpackaged_files_terminate_build 1
367 # Should missing %doc files in the build directory terminate a build?
369 # Note: The default value should be 0 for legacy compatibility.
370 %_missing_doc_files_terminate_build 1
373 # Use internal dependency generator rather than external helpers?
374 %_use_internal_dependency_generator 1
377 # Filter GLIBC_PRIVATE Provides: and Requires:
378 %_filter_GLIBC_PRIVATE 0
380 # Desired selinux policy tree
381 %__policy_tree %{expand:%%global __policy_tree %{lua:\
383 f = io.open("/etc/selinux/config")\
385 for l in f:lines() do\
386 if "SELINUXTYPE=" == string.sub(l,0,12) then t=string.sub(l,13); end\
393 # Path to selinux file context patterns.
394 %__file_context_path /etc/selinux/%{__policy_tree}/contexts/files/file_contexts
397 # Path to selinux file context patterns used to add
398 # RPMTAG_FILECONTEXTS to packages when building.
400 # Undefined, missing or %{nil} will disable.
401 %_build_file_context_path %{nil}
404 # Path to selinux file context patterns used to set
405 # (or override package content) file contexts when installing.
407 # Undefined, missing or %{nil} will use package content (if available).
408 %_install_file_context_path %{__file_context_path}
411 # Path to selinux file context patterns used to verify
412 # file contexts on file system.
414 # Undefined, missing or %{nil} will use package content (if available).
415 %_verify_file_context_path %{__file_context_path}
418 # Path to scripts to autogenerate package dependencies,
420 # Note: Used iff _use_internal_dependency_generator is zero.
421 #%__find_provides @RPMCONFIGDIR@/rpmdeps --provides
422 #%__find_requires @RPMCONFIGDIR@/rpmdeps --requires
423 %__find_provides @RPMCONFIGDIR@/find-provides
424 %__find_requires @RPMCONFIGDIR@/find-requires
425 #%__find_conflicts ???
426 #%__find_obsoletes ???
429 # Path to scripts to autogenerate per-interpreter package dependencies,
431 # Note: Used iff _use_internal_dependency_generator is non-zero. The
432 # helpers are also used by @RPMCONFIGDIR@/rpmdeps {--provides|--requires}.
433 #%__perl_provides @RPMCONFIGDIR@/perldeps.pl --provides
434 #%__perl_requires @RPMCONFIGDIR@/perldeps.pl --requires
435 %__perl_provides @RPMCONFIGDIR@/perl.prov
436 %__perl_requires @RPMCONFIGDIR@/perl.req
438 %__python_provides @RPMCONFIGDIR@/pythondeps.sh --provides
439 %__python_requires @RPMCONFIGDIR@/pythondeps.sh --requires
441 %__mono_provides @RPMCONFIGDIR@/mono-find-provides %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir}
442 %__mono_requires @RPMCONFIGDIR@/mono-find-requires %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir}
445 # fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
446 # These macros are necessary only for legacy compatibility, and have moved
447 # to per-platform macro configuration (i.e. @RPMCONFIGDIR@/<arch>-<os>/macros)
449 # Note: These are no longer enabled by default.
451 #%__chown_Rhf @__CHOWN_RHF@
452 #%__chgrp_Rhf @__CHGRP_RHF@
453 #%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
454 #%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
455 #%_fixperms %{__chmod} -Rf @FIXPERMS@
458 #==============================================================================
459 # ---- Database configuration macros.
460 # Macros used to configure Berkley db parameters.
462 # rpmdb macro configuration values are a colon (or white space) separated
463 # list of tokens, with an optional '!' negation to explicitly disable bit
464 # values, or a "=value" if a parameter. A per-tag value is used (e.g.
465 # %_dbi_config_Packages) if defined, otherwise a per-rpmdb default
466 # (e.g. %_dbi_config). The configuration is also conditioned on the
467 # existence of an internal %{_rpmdb_rebuild} switch to permit changing
468 # the configuration while rebuilding an rpmdb database.
470 # The rpmdb configuration tokens are in a popt table in rpmdb/dbconfig.c,
471 # see that for the latest gory details. Note carefully that, unless you
472 # are writing an rpm installer, you shouldn't have to touch *any* of these
475 # Here's a short list of the tokens, with a guess of whether the option is
477 # (nothing) currently used in rpm, known to work.
478 # "+++" under development, will be supported in rpm eventually.
479 # "???" I have no clue, you're mostly on your own.
481 # If you do find yourself inclined to fiddle, here's what I see (shrug):
482 # 1) Only the value of mp_size has any serious impact on overall performance,
483 # and you will need ~256Kb to handle a typical machine install.
484 # 2) Only the Packages hash, because of the size of the values (i.e. headers),
485 # will ever need tuning. Diddle the pagesize if you're interested, although
486 # I believe that you will find pagesize=512 "best".
487 # 3) Adding nofsync increases speed, but risks total data loss. Fiddle shared
488 # and/or mp_size instead.
489 # 4) btree is faster than hash, but would require some painful rpm release
490 # engineering to convert everbody's databases to btree, not gonna happen
493 # See the db3-devel package, or http://www.sleepycat.com for Berkeley db-3.x
496 # token works? Berkeley db flag or value
497 #==================================================
498 #---------------------- DBENV->open parameters and tunable values:
499 # mmapsize=16Mb DBENV->set_mp_mmapsize
500 # cachesize=1Mb DBENV->set_cachesize, DB->set_cachesize
501 #---------------------- DBENV->open and DB->open common bits:
503 # thread ??? DB_THREAD (useless w/o posix mutexes on linux)
504 #---------------------- DBENV->open bits:
505 # joinenv DB_JOIN_ENV
506 # mpool DB_INIT_MPOOL
507 # cdb +++ DB_INIT_CDB
508 # txn ??? DB_INIT_TXN
509 # log ??? DB_INIT_LOG
510 # lock ??? DB_INIT_LOCK
511 # recover ??? DB_RECOVER
512 # recover_fatal ??? DB_RECOVER_FATAL
513 # use_environ ??? DB_USE_ENVIRON
514 # use_environ_root ??? DB_USE_ENVIRON_ROOT
515 # private +++ DB_PRIVATE
516 # lockdown ??? DB_LOCKDOWN
517 # shared +++ DB_SYSTEM_MEM
518 #---------------------- DB->open parameters and tunable values:
519 # pagesize=512 +++ DB->set_pagesize
520 #---------------------- DB->open bits:
522 # nommap ??? DB_NOMMAP
524 #---------------------- DB->open types:
529 # unknown +++ DB_UNKNOWN
530 #---------------------- DB->set_flags bits:
531 # bt_dup +++ (btree only) DB_DUP
532 # bt_dupsort +++ (btree only) DB_DUPSORT
533 # ht_dup +++ (hash only) DB_DUP
534 # ht_dupsort +++ (hash only) DB_DUPSORT
535 #----------------------- rpmdb specific configuration:
536 # usedbenv (always on) Use db3 environment?
537 # verify (db3 only) Verify Packages db after RW close?
538 # lockdbfd (always on for Packages) Use fcntl(2) locking ?
539 # nofsync Disable fsync(2) call performed after db3 writes?
540 # temporary Unlink file when closing.
543 # XXX Use transactions and logs for rpmdb durability (no clue yet):
544 #%__dbi_other create joinenv mpool txn log \
545 # mp_mmapsize=8Mb mp_size=512Kb
547 # Use a CDB database model for concurrent access.
548 # XXX Add "private" here for legacy interoperation transiting to glibc+nptl.
549 %__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb
551 %__dbi_other %{?_tmppath:tmpdir=%{_tmppath}} %{?__dbi_cdb}
553 # Note: adding nofsync here speeds up --rebuilddb a lot.
554 %__dbi_rebuild nofsync !log !txn !cdb
555 %__dbi_transient %{__dbi_rebuild} temporary private
556 %__dbi_perms perms=0644
559 #--- Hash database configuration
566 %__dbi_htconfig_current %{__dbi_htconfig}
567 %__dbi_htconfig_rebuild %{__dbi_htconfig} %{__dbi_rebuild}
570 %{?_rpmdb_rebuild:%{__dbi_htconfig_rebuild}}\
571 %{!?_rpmdb_rebuild:%{__dbi_htconfig_current}}\
575 #--- Btree database configuration
582 %__dbi_btconfig_current %{__dbi_btconfig}
583 %__dbi_btconfig_rebuild %{__dbi_btconfig} %{__dbi_rebuild}
586 %{?_rpmdb_rebuild:%{__dbi_btconfig_rebuild}}\
587 %{!?_rpmdb_rebuild:%{__dbi_btconfig_current}}\
590 # The list of tags for which indices will be built.
591 %_dbi_tags Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Triggername:Dirnames:Requireversion:Provideversion:Installtid:Sigmd5:Sha1header:Filemd5s:Depends:Pubkeys
593 # "Packages" should have shared/exclusive fcntl(2) lock using "lockdbfd".
594 %_dbi_config_Packages %{_dbi_htconfig} lockdbfd
596 # "Depends" is a per-transaction cache of known dependency resolutions.
597 %_dbi_config_Depends %{_dbi_htconfig} temporary private
599 %_dbi_config_Dirnames %{_dbi_btconfig}
600 %_dbi_config_Requireversion %{_dbi_btconfig}
601 %_dbi_config_Provideversion %{_dbi_btconfig}
602 %_dbi_config_Installtid %{_dbi_btconfig}
603 %_dbi_config_Removetid %{_dbi_btconfig}
605 %_dbi_config %{_dbi_htconfig}
607 # XXX legacy configuration.
608 # Choose db interface:
609 # 3 native db3 interface.
611 # There are two macros so that --rebuilddb can convert db1 -> db3.
616 #==============================================================================
617 # ---- GPG/PGP/PGP5 signature macros.
618 # Macro(s) to hold the arguments passed to GPG/PGP for package
619 # signing and verification.
621 %__gpg_check_password_cmd %{__gpg} \
622 gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
623 %__pgp_check_password_cmd %{__pgp} \
624 pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
625 %__pgp5_check_password_cmd %{__pgp} \
626 pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f
628 %__gpg_sign_cmd %{__gpg} \
629 gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \
630 -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
631 %__pgp_sign_cmd %{__pgp} \
632 pgp +batchmode=on +verbose=0 +armor=off \
633 "+myname=%{_pgp_name}" -sb %{__plaintext_filename} %{__signature_filename}
634 %__pgp5_sign_cmd %{__pgp} \
635 pgps +batchmode=on +verbose=0 +armor=off \
636 "+myname=%{_pgp_name}" -b %{__plaintext_filename} -o %{__signature_filename}
638 # XXX rpm-4.1 verifies signatures using beecrypt.
639 #%__gpg_verify_cmd %{__gpg} \
640 # gpg --batch --no-verbose --verify --no-secmem-warning \
641 # %{__signature_filename} %{__plaintext_filename}
642 #%__pgp_verify_cmd %{__pgp} \
643 # pgp +batchmode=on +verbose=0 \
644 # %{__signature_filename} %{__plaintext_filename}
645 #%__pgp5_verify_cmd %{__pgp} \
646 # pgpv +batchmode=on +verbose=0 \
647 # +OutputInformationFD=1 +OutputWarningFD=1 \
648 # -o %{__signature_filename} %{__plaintext_filename}
651 # XXX rpm-4.1 verifies prelinked libraries using a prelink undo helper.
652 # Normally this macro is defined in /etc/rpm/macros.prelink, installed
653 # with the prelink package. If the macro is undefined, then prelinked
654 # shared libraries contents are MD5 digest verified (as usual), rather
655 # than MD5 verifying the output of the prelink undo helper.
657 # Note: The 2nd token is used as argv[0] and "library" is a
658 # placeholder that will be deleted and replaced with the appropriate
660 #%__prelink_undo_cmd /usr/sbin/prelink prelink -y library
662 # Horowitz Key Protocol server configuration
664 #_hkp_keyserver hkp://pgp.mit.edu
665 #_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x
667 #==============================================================================
668 # ---- Transaction macros.
669 # Macro(s) used to parameterize transactions.
671 # The output binary package file name template used when building
674 # XXX Note: escaped %% for use in headerSprintf()
675 %_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
677 # The default transaction color. This value is a set of bits to
678 # determine file and dependency affinity for this arch.
679 # 0 uncolored (i.e. use only arch as install hint)
682 %_transaction_color @RPMCANONCOLOR@
684 # A default autorelocation path prefixed to file paths of packages
685 # that have an incompatible arch. This is used on ia64 to prefix
686 # /emul/ia32 to i386 file paths, and nowhere else (yet).
688 # XXX Note: escaped %% for use in headerSprintf()
689 %_autorelocate_path @autorelocate_path@
691 # A default directory color to choose when directories are
693 %_autorelocate_dcolor @autorelocate_dcolor@
695 # The path to the dependency universe database. The default value
696 # is the rpmdb-redhat location. The macro is usually defined in
697 # /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
698 #%_solve_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat
700 # The path to the dependency universe packages. This should
701 # be a path to the packages contained in the solve database.
702 #%_solve_pkgsdir /mnt/redhat/test/latest-i386/RedHat/RPMS/
704 # The output binary package file name template used when suggesting
705 # binary packages that solve a dependency. The macro is usually defined
706 # in /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
708 # XXX Note: escaped %% for use in headerSprintf()
709 #%_solve_name_fmt %{?_solve_pkgsdir}%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
711 # The output binary package file name template used when repackaging
714 # XXX Note: escaped %% for use in headerSprintf()
715 %_repackage_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
717 # The directory in which erased packages will be saved when using
718 # the --repackage option.
719 %_repackage_dir /var/spool/repackage
721 # A path (i.e. URL) prefix that is pre-pended to %{_repackage_dir}.
722 %_repackage_root %{nil}
724 # If non-zero, all erasures will be automagically repackaged.
725 %_repackage_all_erasures 0
727 # If non-zero, a failed transaction will be automagically rolled
728 # back (sans, the failing transaction element).
729 %_rollback_transaction_on_failure 0
731 # Verify digest/signature flags for various rpm modes:
732 # 0x30300 (_RPMVSF_NODIGESTS) --nohdrchk if set, don't check digest(s)
733 # 0xc0c00 (_RPMVSF_NOSIGNATURES) --nosignature if set, don't check signature(s)
734 # 0xf0000 (_RPMVSF_NOPAYLOAD) --nolegacy if set, check header+payload (if possible)
735 # 0x00f00 (_RPMVSF_NOHEADER) --nohdrchk if set, don't check rpmdb headers
737 # For example, the value 0xf0c00 (=0xf0000+0xc0c00) disables legacy
738 # digest/signature checking, disables signature checking, but attempts
739 # digest checking, also when retrieving headers from the database.
742 # >>> hex(rpm._RPMVSF_NOSIGNATURES)
745 # >>> hex(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NOPAYLOAD)
747 # at the python prompt for example, after "import rpm".
749 # The checking overhead is ~11ms per header for digests/signatures;
750 # each header from the database is checked only when first encountered
751 # for each database open.
753 # Note: the %_vsflags_erase applies to --upgrade/--freshen modes as
757 %_vsflags_build %{__vsflags}
758 %_vsflags_erase %{__vsflags}
759 %_vsflags_install %{__vsflags}
760 %_vsflags_query %{__vsflags}
761 %_vsflags_rebuilddb %{__vsflags}
762 %_vsflags_up2date %{__vsflags}
763 %_vsflags_verify %{__vsflags}
765 # Relations between package names that cause dependency loops
766 # with legacy packages that cannot be fixed. Relations are
769 # where package p has a Requires: on something that package q Provides:
771 # XXX Note: that there cannot be any whitespace within the string "p>q",
772 # and that both p and q are package names (i.e. no version/release).
774 #%_dependency_whiteout_5_2 \
776 #%_dependency_whiteout_6_1 \
777 # pilot-link-devel>pilot-link
778 #%_dependency_whiteout_6_2 \
780 %_dependency_whiteout_7_0 \
781 pango-gtkbeta-devel>pango-gtkbeta\
787 %_dependency_whiteout_7_1 \
789 %_dependency_whiteout_7_2 \
790 libgnomeprint15>gnome-print \
791 nautilus>nautilus-mozilla \
793 #%_dependency_whiteout_8_0 \
794 # perl>perl-Parse-RecDescent \
795 # XFree86-libs>XFree86-Mesa-libGL \
799 # mysql>perl-DBD-MySQL \
800 # ghostscript>gimp-print \
802 # perl-Date-Calc>perl-Bit-Vector \
803 # glibc-debug>glibc-devel
805 %_dependency_whiteout_8_0 \
806 mysql>perl-DBD-MySQL \
810 perl-Date-Calc>perl-Bit-Vector \
812 %_dependency_whiteout_fc3 \
814 nautilus>nautilus-cd-burner \
817 kernel-smp>initscripts \
818 xorg-x11-libs>xorg-x11-Mesa-libGL \
819 openldap>cyrus-sasl-md5 \
820 openldap>cyrus-sasl \
821 openjade>docbook-dtds \
824 gnome-python2>gnome-python2-bonobo \
826 xemacs-sumo>apel-xemacs \
828 openoffice.org-libs>openoffice.org
830 %_dependency_whiteout \
832 modutils>vixie-cron \
834 ghostscript-fonts>ghostscript \
835 %{?_dependency_whiteout_fc3} \
836 %{?_dependency_whiteout_fc2} \
837 %{?_dependency_whiteout_fc1} \
838 %{?_dependency_whiteout_9} \
839 %{?_dependency_whiteout_8_0} \
840 %{?_dependency_whiteout_7_2} \
841 %{?_dependency_whiteout_7_1} \
842 %{?_dependency_whiteout_7_0} \
843 %{?_dependency_whiteout_6_2} \
844 %{?_dependency_whiteout_6_1} \
845 %{?_dependency_whiteout_5_2} \
849 # Default headerSprintf() output format string for rpm -qa
851 # XXX Note: escaped %% for use in headerSprintf()
852 %_query_all_fmt %%{name}-%%{version}-%%{release}
855 # Default path to the file used for transaction fcmtl lock.
857 # The previous, FHS clompliant, name was /var/lock/run/transaction,
858 # but the transaction lock needs to be per-database, not global, for
859 # some rpmdb operations.
861 # XXX Note: the file name is chosesn as __db.000 to expedite
862 # support issues, many users are doing "rm -f /var/lib/rpm/__db*"
864 %_rpmlock_path %{_dbpath}/__db.000
866 #==============================================================================
867 # ---- Cache configuration macros.
868 # Macro(s) used to configure the universe of headers used to
869 # solve dependencies using rpmcache(8).
871 # Note: These values are specific to my machine, and most certainly
872 # are incorrect for any non-redhat.com machine. The macros are
873 # included here only to document the macro names and usage.
874 %_bhpath file://localhost/mnt/dist
875 %_bhcoll @(7.3|7.2|7.1|7.1sbe|7.1k|7.0|7.01j|7.0j|7.0sbe|7.0tc|6.2|6.2ha|6.2ee|6.1|6.0|5.2|5.1|5.0)
876 %_bhN @(SRPMS|i386|alpha|sparc|s390|ia64)
880 # The cache database directory.
881 %_cache_dbpath /var/spool/up2date/cache
883 #==============================================================================
884 # ---- per-platform macros.
885 # Macros that are specific to an individual platform. The values here
886 # will be used if the per-platform macro file does not exist..
888 %_arch @RPMCANONARCH@
889 %_build_arch @RPMCANONARCH@
890 %_vendor @RPMCANONVENDOR@
893 %_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
896 # Define a generic value for optflags. Normally overridden by per-target macros.
900 # Define per-arch and per-os defaults. Normally overridden by per-target macros.
901 %__arch_install_post %{nil}
902 %__os_install_post %{___build_post}
904 #==============================================================================
905 # ---- Scriptlet template templates.
906 # Global defaults used for building scriptlet templates.
909 %___build_shell %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
911 %___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
913 RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
914 RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
915 RPM_OPT_FLAGS=\"%{optflags}\"\
916 RPM_ARCH=\"%{_arch}\"\
918 export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
919 RPM_DOC_DIR=\"%{_docdir}\"\
921 RPM_PACKAGE_NAME=\"%{name}\"\
922 RPM_PACKAGE_VERSION=\"%{version}\"\
923 RPM_PACKAGE_RELEASE=\"%{release}\"\
924 export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
925 %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
926 export RPM_BUILD_ROOT}\
927 %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
930 %{verbose:set -x}%{!verbose:exec > /dev/null}\
932 cd %{u2p:%{_builddir}}\
935 #%___build_body %{nil}
936 %___build_post exit 0
938 %___build_template #!%{___build_shell}\
946 #==============================================================================
947 # ---- Scriptlet templates.
948 # Macro(s) that expand to a command and script that is executed.
949 # CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
951 %__spec_prep_shell %{___build_shell}
952 %__spec_prep_args %{___build_args}
953 %__spec_prep_cmd %{___build_cmd}
954 %__spec_prep_pre %{___build_pre}
955 %__spec_prep_body %{___build_body}
956 %__spec_prep_post %{___build_post}
957 %__spec_prep_template #!%{__spec_prep_shell}\
961 #%{__spec_prep_body}\
962 #%{__spec_prep_post}\
965 %__spec_build_shell %{___build_shell}
966 %__spec_build_args %{___build_args}
967 %__spec_build_cmd %{___build_cmd}
968 %__spec_build_pre %{___build_pre}
969 %__spec_build_body %{___build_body}
970 %__spec_build_post %{___build_post}
971 %__spec_build_template #!%{__spec_build_shell}\
975 #%{__spec_build_body}\
976 #%{__spec_build_post}\
979 %__spec_install_shell %{___build_shell}
980 %__spec_install_args %{___build_args}
981 %__spec_install_cmd %{___build_cmd}
982 %__spec_install_pre %{___build_pre}
983 %__spec_install_body %{___build_body}
984 %__spec_install_post\
985 %{?__debug_package:%{__debug_install_post}}\
986 %{__arch_install_post}\
987 %{__os_install_post}\
989 %__spec_install_template #!%{__spec_install_shell}\
990 %{__spec_install_pre}\
993 #%{__spec_install_body}\
994 #%{__spec_install_post}\
997 %__spec_check_shell %{___build_shell}
998 %__spec_check_args %{___build_args}
999 %__spec_check_cmd %{___build_cmd}
1000 %__spec_check_pre %{___build_pre}
1001 %__spec_check_body %{___build_body}
1002 %__spec_check_post %{___build_post}
1003 %__spec_check_template #!%{__spec_check_shell}\
1004 %{__spec_check_pre}\
1007 #%{__spec_check_body}\
1008 #%{__spec_check_post}\
1011 #%__spec_autodep_shell %{___build_shell}
1012 #%__spec_autodep_args %{___build_args}
1013 #%__spec_autodep_cmd %{___build_cmd}
1014 #%__spec_autodep_pre %{___build_pre}
1015 #%__spec_autodep_body %{___build_body}
1016 #%__spec_autodep_post %{___build_post}
1017 #%__spec_autodep_template #!%{__spec_autodep_shell}\
1018 #%{__spec_autodep_pre}\
1021 #%{__spec_autodep_body}\
1022 #%{__spec_autodep_post}\
1025 %__spec_clean_shell %{___build_shell}
1026 %__spec_clean_args %{___build_args}
1027 %__spec_clean_cmd %{___build_cmd}
1028 %__spec_clean_pre %{___build_pre}
1029 %__spec_clean_body %{___build_body}
1030 %__spec_clean_post %{___build_post}
1031 %__spec_clean_template #!%{__spec_clean_shell}\
1032 %{__spec_clean_pre}\
1035 #%{__spec_clean_body}\
1036 #%{__spec_clean_post}\
1039 %__spec_rmbuild_shell %{___build_shell}
1040 %__spec_rmbuild_args %{___build_args}
1041 %__spec_rmbuild_cmd %{___build_cmd}
1042 %__spec_rmbuild_pre %{___build_pre}
1043 %__spec_rmbuild_body %{___build_body}
1044 %__spec_rmbuild_post %{___build_post}
1045 %__spec_rmbuild_template #!%{__spec_rmbuild_shell}\
1046 %{__spec_rmbuild_pre}\
1049 #%{__spec_rmbuild_body}\
1050 #%{__spec_rmbuild_post}\
1053 # XXX We don't expand pre/post install scriptlets (yet).
1054 #%__spec_pre_pre %{nil}
1055 #%__spec_pre_post %{nil}
1056 #%__spec_post_pre %{nil}
1057 #%__spec_post_post %{nil}
1058 #%__spec_preun_pre %{nil}
1059 #%__spec_preun_post %{nil}
1060 #%__spec_postun_pre %{nil}
1061 #%__spec_postun_post %{nil}
1062 #%__spec_triggerpostun_pre %{nil}
1063 #%__spec_triggerpostun_post %{nil}
1064 #%__spec_triggerun_pre %{nil}
1065 #%__spec_triggerun_post %{nil}
1066 #%__spec_triggerin_pre %{nil}
1067 #%__spec_triggerin_post %{nil}
1069 #==============================================================================
1070 # ---- configure macros.
1071 # Macro(s) slavishly copied from autoconf's config.status.
1074 %_exec_prefix %{_prefix}
1075 %_bindir %{_exec_prefix}/bin
1076 %_sbindir %{_exec_prefix}/sbin
1077 %_libexecdir %{_exec_prefix}/libexec
1078 %_datadir %{_prefix}/share
1079 %_sysconfdir %{_prefix}/etc
1080 %_sharedstatedir %{_prefix}/com
1081 %_localstatedir %{_prefix}/var
1083 %_libdir %{_exec_prefix}/%{_lib}
1084 %_includedir %{_prefix}/include
1085 %_oldincludedir /usr/include
1086 %_infodir %{_prefix}/info
1087 %_mandir %{_prefix}/man
1089 #==============================================================================
1090 # ---- config.guess platform macros.
1091 # Macro(s) similar to the tokens used by configure.
1094 %_build_alias %{_host_alias}
1095 %_build_cpu %{_host_cpu}
1096 %_build_vendor %{_host_vendor}
1097 %_build_os %{_host_os}
1099 %_host_alias @host_alias@%{nil}
1100 %_host_cpu @host_cpu@
1101 %_host_vendor @host_vendor@
1104 %_target_alias %{_host_alias}
1105 %_target_cpu %{_host_cpu}
1106 %_target_vendor %{_host_vendor}
1107 %_target_os %{_host_os}
1109 #==============================================================================
1110 # ---- specfile macros.
1111 # Macro(s) here can be used reliably for reproducible builds.
1112 # (Note: Above is the goal, below are the macros under development)
1114 # The configure macro does the following:
1115 # optionally change to a subdirectory (not implemented).
1116 # attempt to update config.guess and config.sub.
1117 # run configure with correct prefix, platform, and CFLAGS.
1118 # optionally restore current directory (not implemented).
1119 # The configure macro should be invoked as %configure (rather than %{configure})
1120 # because the rest of the arguments will be expanded using %*.
1122 # This is the version of %configure used through rpm-3.0.4.
1124 # %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
1125 # CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}
1127 #------------------------------------------------------------------------------
1128 # This is an improved version of %configure (from PLD team).
1130 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
1131 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
1132 FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
1133 ./configure --host=%{_host} --build=%{_build} \\\
1134 --target=%{_target_platform} \\\
1135 --program-prefix=%{?_program_prefix} \\\
1136 --prefix=%{_prefix} \\\
1137 --exec-prefix=%{_exec_prefix} \\\
1138 --bindir=%{_bindir} \\\
1139 --sbindir=%{_sbindir} \\\
1140 --sysconfdir=%{_sysconfdir} \\\
1141 --datadir=%{_datadir} \\\
1142 --includedir=%{_includedir} \\\
1143 --libdir=%{_libdir} \\\
1144 --libexecdir=%{_libexecdir} \\\
1145 --localstatedir=%{_localstatedir} \\\
1146 --sharedstatedir=%{_sharedstatedir} \\\
1147 --mandir=%{_mandir} \\\
1148 --infodir=%{_infodir}
1150 #------------------------------------------------------------------------------
1151 # The make install analogue of %configure:
1154 prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
1155 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
1156 bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
1157 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
1158 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
1159 datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
1160 includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
1161 libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
1162 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
1163 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
1164 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
1165 mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
1166 infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
1169 #------------------------------------------------------------------------------
1170 # The GNUconfigure macro does the following:
1171 # update config.guess and config.sub.
1172 # regenerate all autoconf/automake files
1173 # optionally change to a directory (make the directory if requested).
1174 # run configure with correct prefix, platform, and CFLAGS.
1175 # optionally restore current directory.
1177 # Based on autogen.sh from GNOME and orginal GNUconfigure
1179 %GNUconfigure(MCs:) \
1180 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
1181 LDFLAGS="${LDFLAGS:-%{-s:-s}}" ; export LDFLAGS; \
1182 %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
1183 dirs="`find ${_mydir} -name configure.in -print`"; export dirs; \
1184 for coin in `echo ${dirs}` \
1186 dr=`dirname ${coin}`; \
1187 if test -f ${dr}/NO-AUTO-GEN; then \
1190 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
1192 aclocalinclude="${ACLOCAL_FLAGS}"; \
1193 for k in ${macrodirs}; do \
1194 if test -d ${k}; then \
1195 aclocalinclude="${aclocalinclude} -I ${k}"; \
1197 ## echo "**Warning**: No such directory \`${k}'. Ignored." \
1200 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
1201 if grep "sed.*POTFILES" configure.in >/dev/null; then \
1202 : do nothing -- we still have an old unmodified configure.in \
1204 test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
1205 echo "no" | gettextize --force --copy; \
1206 test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
1209 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
1210 %{__libtoolize} --force --copy; \
1212 aclocal ${aclocalinclude}; \
1213 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
1216 echo "Running automake --gnu ${am_opt} ..."; \
1217 %{__automake} --add-missing --gnu ${am_opt}; \
1222 %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} %* ; \
1223 %{-C:cd ${_mydir}; unset _mydir}
1225 #------------------------------------------------------------------------------
1226 # Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
1228 # For example, these can be used as (from ImageMagick.spec from PLD site)
1233 # Summary: libraries and modules for access to ImageMagick from perl
1234 # Group: Development/Languages/Perl
1235 # Requires: %{name} = %{version}
1239 # rm -fr $RPM_BUILD_ROOT
1240 # install -d $RPM_BUILD_ROOT/%{perl_sitearch}
1243 # %defattr(644,root,root,755)
1244 # %{perl_sitearch}/Image
1245 # %dir %{perl_sitearch}/auto/Image
1247 %requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
1248 %perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
1249 %perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
1250 %perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
1251 %perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
1252 %perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
1253 %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
1255 #------------------------------------------------------------------------------
1256 # arch macro for all Intel i?86 compatibile processors
1257 # (Note: This macro (and it's analogues) will probably be obsoleted when
1258 # rpm can use regular expressions against target platforms in macro
1261 %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
1263 #------------------------------------------------------------------------
1264 # Use in %install to generate locale specific file lists. For example,
1268 # %find_lang %{name}
1270 # %files -f %{name}.lang
1272 %find_lang @RPMCONFIGDIR@/find-lang.sh %{buildroot}