summaryrefslogtreecommitdiff
path: root/platform.in
Commit message (Collapse)AuthorAgeFilesLines
* platform: Ensure empty buildroot for %installNeal Gompa2020-02-051-0/+10
| | | | | | | | | | | | | This change ensures that any existing buildroot contents are wiped and a fresh empty one is created for usage in %install. Variations of this exist in virtually every RPM-based Linux distribution for more than a decade. At this point, it is expected behavior everywhere and it is amazing that it has not yet been put in RPM itself until now... Credit goes to Michael Schroeder from openSUSE for the original work and Tom Calloway for the variant adapted for Fedora that is the basis for this change.
* Cap number of threads on 32bit platforms, add tunables (RhBug:1729382)Panu Matilainen2019-08-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | On 32bit plaforms, address space is easily exhausted with multiple threads, causing arbitrary builds failure regressions (RhBug:1729382). Simply cap the number of threads to maximum of four on any 32bit platform to play it safe. It's still three more than we were able to use on older releases... In addition, introduce tunables for controlling the number of threads used similarly to what is available for number of CPUs: forced number and a separate ceiling. The max logic gets surprisingly tricky with the mixed OMP and rpm tunables and different semantics. Notably, OMP does not have a nice way to set a maximum from inside a program (this is only possible from an environment variable so we can't use it here), so we need to jump through a lot of hoops to figure out whether an *unlimited* setting would go above the platform limitation. I'm not entirely convinced this is 100% bulletproof, but then it's all going to change and become even more complicated when we start taking memory limitations into account...
* Drop %_lto_cflags macro afterallPanu Matilainen2019-08-141-3/+0
| | | | | | | | | | | | This was only added in commit 2bb7b0cf066c97a9d92eb0bf59618896000cb29d, but turns out that this kind of usage is bad for build reproducability because the system-specific CPU count gets recorded RPMTAG_OPTFLAGS and the resulting binaries too (depending on gcc flags). In addition, gcc upstream has decided to make -flto default to autodetected parallelism. Since -flto can be overridden with by simply appending -fno-lto for the packages that need to disable it, there's no practical need for us to provide such a macro for disabling either.
* Drop double-quotes from %_smp_mflags and %_lto_cflagsPanu Matilainen2019-01-151-2/+2
| | | | | | | The double-quotes got added in e811c7ec0b4d2685b63b61803e3952466b1a4ac6 and 2bb7b0cf066c97a9d92eb0bf59618896000cb29d but traditionally there have been no quotes around %_smp_mflags output, to avoid risking any breakage due to such a simple thing, lets go back to how it used to be.
* Use %getncpus for %_smp_mflags and %_lto_cflags to make them affinity-awarePanu Matilainen2019-01-151-1/+1
| | | | | | Making %_smp_mflags affinity-aware was requested long, long ago in https://bugzilla.redhat.com/show_bug.cgi?id=891588 but somewhere along it fell in the cracks between distro versions...
* Introduce smp-aware LTO enablement macro %_lto_cflags.marxin2019-01-151-0/+3
| | | | | | | %_lto_cflags can be used to enable LTO (link-time optimization) either on per-package basis in specs or per-distro basis via %optflags. Parallel jobs are used automatically where system and configuration (shared with %_smp_mflags) support it.
* Isolate %_smp_build_ncpus and use it for %_smp_mflags.marxin2019-01-151-2/+5
| | | | | Refactor _smp_build_ncpus and use it in %_smp_mflags. Note that now having a single CPU, %_smp_mflags is expanded to '-j1'.
* Take %_prefix into account when compressing man pages etc, take IIPanu Matilainen2018-10-011-1/+1
| | | | | | | | | brp-compress used to be all hardcoded around /usr for no good reason. Support passing prefix as an argument and only look for things to compress there. First attempt in 5e65f92b53ca07c6e30921688c1b84d0a6b41db7 had an embarrassing typo/thinko/case of missing brain in the assign syntax. Based on feedback and work of Owen Taylor and Yanko Kaneti in PR #538
* Revert "Take %_prefix into account when compressing man pages etc"Panu Matilainen2018-10-011-1/+1
| | | | This reverts the broken commit 5e65f92b53ca07c6e30921688c1b84d0a6b41db7.
* Take %_prefix into account when compressing man pages etcPanu Matilainen2018-10-011-1/+1
| | | | | | | | brp-compress used to be all hardcoded around /usr for no good reason. Support passing prefix as an argument and only look for things to compress there. Based on feedback and work of Owen Taylor and Yanko Kaneti in PR #538
* Provide a way to opt out from Python bytecompilation out side of lib dirMiro Hrončok2018-05-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | One can now unset %_python_bytecompile_extra (or set it to 0) to opt out from Python bytecompilation outside of /usr/lib(64)?/pythonX.Y. One can also set %_python_bytecompile_extra to 1 to explicitly opt in, even tough this is currently still the default. Python bytecompilation of files outside of Python's own directories (/usr/lib(64)?/pythonX.Y) with /usr/bin/python is error prone. For context, see this Fedora change [1], it describes all the problems and provides a longer explanation about why we are doing this. [1] https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation Also adds _python_bytecompile_errors_terminate_build macro which is passed to the brp-python-bytecompile script. Fixes #434
* Macroize build root policies for consistent disable/override abilityPanu Matilainen2018-01-181-4/+14
| | | | | | | | | | | | Add a separate macro for each brp we have, using standard naming convention and conditionalize the usage in %__os_install_post. Voilà, we have a standard way to disable (and also override) any brp scripts from specs that need it and a common scheme for new brps to follow. Note that this is not supposed to change the existing behavior and default build root policy invocations at all, any change in those would be a thinko/typo/copy-paste error in this commit.
* Add a %_rundir macro to the platform files.Michael Schroeder2014-05-071-0/+1
| | | | | | | The default value is /run, it can be changed with the --with-rundir configure option. Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
* Make CPU limit for building configurable through _smp_ncpus_max macroPanu Matilainen2014-01-221-1/+5
| | | | | | | - Makes the max number of cpu's used by %{_smp_mflags} configurable on spec, user or system level. - Originally reported as RhBug:669638 and included in redhat-rpm-config in RHEL/Fedora, but makes sense to have generally available.
* Push platform config out of main rpm macros filePanu Matilainen2011-03-251-0/+8
| | | | | | - canon arch & color stuff is now calculated per each known arch in installplatform, and just a single place where arch name mangling is done
* Move %_fixperms to main macro configPanu Matilainen2011-03-251-12/+0
| | | | | | | - Fixing broken permissions in sources isn't exactly platform/vendor specific in nature (at least Suse adds this this to their own "platform" separately, kinda proving the point) - Kick out the remaining unused RH-pecific platform.in section
* Yank out 2001 vintage Mandrake-specific macrosPanu Matilainen2011-03-251-61/+0
| | | | | | - Its unlikely these were ever actually used by Mandrake, but in any case they switched to different setup long ago, and since then the company + distribution has seen more than a few renames etc..
* Pass %{__strip} and %{__objdump} to brp-strip* scriptsPanu Matilainen2010-01-271-3/+3
| | | | - permits easy overriding of the used tools globally
* Eliminate unused id -u testsPanu Matilainen2010-01-041-1/+0
| | | | | - this was used by _fixowner and _fixgroup macros back in the day but they no longer exist as they're unusable without building as root
* Require lchown() and remove ancient broken chown kludgeryPanu Matilainen2010-01-041-2/+0
| | | | - lchown() is POSIX 2001, we dont care about older / nonconformant stuff
* Use grep -E and grep -F instead of egrep and fgrep.Ville Skyttä2009-12-171-1/+1
| | | | egrep and fgrep are deprecated in GNU grep and "historical" in POSIX.
* Use %{_rpmconfigdir} throughout configuration macros and suchPanu Matilainen2008-11-221-5/+5
|
* Trash unused MULTILIBNO hackery in installplatformPanu Matilainen2008-10-191-7/+0
|
* Kick out the dumb defaultdocdir logic from installplatformPanu Matilainen2008-10-171-1/+1
| | | | - defaultdocdir is simply %{_datadir}/doc
* Fix missspelling in macro name (_initddir -> _initrddir), thanks toJindrich Novy2008-06-301-1/+3
| | | | | - Ville Skyttä - old macro with typo is kept for compatiblity
* Rip useless ROOT_GROUP checking from configurePanu Matilainen2008-05-081-2/+0
| | | | | - it was only used for an ancient RH-specific %_fixgroup anyway which in turn only ever did anything when building as root - bad bad...
* First crack at adding ISA provides to packages (rhbz#235755)Panu Matilainen2008-04-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | - Horrible kludgery to get the isa names and bits into platform specific macros from installplatform script. That beast needs to die. I mean really - In build, add provides: name(isa) = evr automatically when it makes sense (similarly to name = evr provides). ISA consists of ISA name and bitness (or wordsize). This can be used to correctly express multilib dependencies without resorting to (expensive!) file dependency kludges, eg for dlopen()'ed libraries where automatic dep extraction doesn't force dependency on 32bit vs 64bit version, you can now use: Requires: foo-plugin%{?_isa} This expands to foo-plugin(x86-32) for i?86 packages, foo-plugin(x86-64) to x86_64 etc, and permits spec to be shared with older distros which don't have ISA provides. - The same could be expressed with "canon arch" just as well, but using the ISA to differentiate from %_arch and the like: eg i386 could be used instead of x86-32 but it's overloaded with meanings (the actual i386 processor vs i386 compatible cpu family etc)
* Add datarootdir.Ralf Corsépius2007-09-051-0/+1
|
* Fixing fallout from MARK64 removal..Panu Matilainen2007-07-301-1/+1
|
* macosx/opendarwin hackery, take 1.jbj2005-01-251-1/+7
| | | | | | CVS patchset: 7710 CVS date: 2005/01/25 05:24:40
* - python: put rpmmodule.so where python expects to find.jbj2003-01-081-0/+1
| | | | | | | | | - add brp-strip-static-archive build root policy helper. - add -lelf to rpm LDFLAGS, not LDADD, since there is no libelf.la now. CVS patchset: 6001 CVS date: 2003/01/08 21:37:01
* Set %_arch to RPMCANONARCH.jbj2002-09-171-1/+1
| | | | | | CVS patchset: 5716 CVS date: 2002/09/17 18:52:26
* - add a macro to create a sub-package with debugging symbols.jbj2002-08-221-4/+5
| | | | | | CVS patchset: 5662 CVS date: 2002/08/22 19:21:14
* - add --with-efence to configure, check install/upgrade with efence.jbj2002-08-191-39/+0
| | | | | | | | | | | | | | | | - beecrypt: short hex string conversion overflows target buffer. - mark "successors only" packages in transaction. - reap scriptlets with SIGCHLD handler. - rename PSM_t to rpmpsm, add methods and refcounts to manage. - remove %%configure/%%makeinstall from arch-os/macros, default is OK. - don't export MALLOC_CHECK_ to scriptlets. - squeaky clean memory leak checking. - always malloc rpmfi structure, refcounts are correct in rpmtsRun(). - skip redundant /sbin/ldconfig scripts on upgrade (if possible). CVS patchset: 5645 CVS date: 2002/08/19 22:27:44
* - make peace with gcc-3.1, remove compiler cruft.jbj2002-02-101-2/+4
| | | | | | CVS patchset: 5313 CVS date: 2002/02/10 19:00:16
* Sync with rpm-4.0.4 rollbacks.jbj2002-02-021-1/+5
| | | | | | CVS patchset: 5293 CVS date: 2002/02/02 22:45:41
* - fix: _smp_flags macro broken.jbj2001-07-171-1/+1
| | | | | | | | | | - python: bind rhnUnload differently. - fix: rescusitate --querytags. - fix: short aliases broken (#49213). CVS patchset: 4949 CVS date: 2001/07/17 03:03:14
* - fix: scope multi-mode options like --nodeps correctly (#48825).jbj2001-07-131-2/+2
| | | | | | CVS patchset: 4940 CVS date: 2001/07/13 13:44:26
* - fix: adjust arg count for --POPTdesc/--POPTargs deletion.jbj2001-07-111-0/+4
| | | | | | | | | | - add linux per-platform macro %_smp_mflags <sopwith@redhat.com>. - document more popt aliases for --help usage. - remove --tarbuild from man page(s), use -t[abpcils] instead (#48666). CVS patchset: 4936 CVS date: 2001/07/11 14:23:01
* Yet another patial harlink set fix.jbj2001-06-251-21/+62
| | | | | | CVS patchset: 4903 CVS date: 2001/06/25 20:01:42
* - 1st crack at Mandrake specific per-platform macros.jbj2001-01-171-1/+63
| | | | | | CVS patchset: 4459 CVS date: 2001/01/17 16:00:36
* - change optflags for i386.jbj2000-07-051-0/+8
| | | | | | | | - multilib patch, take 1. CVS patchset: 3920 CVS date: 2000/07/05 20:39:15
* - add RPMTAG_OPTFLAGS, configured optflags when package was built.jbj2000-06-201-1/+8
| | | | | | | | | | - add RPMTAG_DISTURL for rpmfind-like tools (content unknown yet). - teach brp-compress about /usr/info and /usr/share/info as well. - update macros.in from rpm-4.0 (w/o dbi configuration). CVS patchset: 3878 CVS date: 2000/06/20 21:45:50
* Move noLang to rpmlib.jbj2000-06-011-0/+2
| | | | | | | | Add defaultdocdir to per-platform macros. CVS patchset: 3788 CVS date: 2000/06/01 05:36:14
* Hi!jbj2000-04-191-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd like to start building sparc64 packages (eventhough the install rule details are yet to be designed - IMHO if 64bit SPARC userland is going into 7.0 we should rebuild all packages into 64bit in the next months or so to have time to chase bugs etc.), and this is about what I need. Basically I'd like to have %{_lib} to stand for the last part (normally "lib") of dirname for directories like /lib, /usr/lib, /usr/X11R6/lib because on sparc64-linux they are /lib64, /usr/lib64, /usr/X11R6/lib64 (and on Solaris /lib/sparcv9, /usr/lib/sparcv9 etc.), so that one can use things like /usr/%{_lib} in the spec files. Another thing which I need is an arch specific build root policy. This patch does a few things: 1) add installplatform into EXTRA_DIST files, so that it is actually invoked during rpm build not from CVS 2) Define %_lib lib and let target specific macros override it 3) Split __spec_install_post into __arch_install_post and __os_install_post, --buildpolicy now specifies the __os_install_post part only. spec files can still override the __arch_install_post if the want to. brp-sparc64-linux is used to move 64bit libraries to */lib64 directories from */lib directories if make install of some package left them there. 4) Change installplatform so that on sparc* it creates both sparc and sparc64 target macro dirs (/usr/lib/rpm/sparc{,64}-redhat-linux in sparc*-redhat-linux case). CVS patchset: 3685 CVS date: 2000/04/19 16:03:49
* - portability: skip bzip2 if not available.jbj2000-03-091-3/+6
| | | | | | | | | | | | | - portability: skip gzseek if not available (zlib-1.0.4). - portability: skip personality if not available (linux). - portability: always include arpa/inet.h (HP-UX). - portability: don't use id -u (Brandon Allbery). - portability: don't chown/chgrp -h w/o lchown. - portability: splats in rpm.spec to find /usr/{share,local}/locale/* CVS patchset: 3610 CVS date: 2000/03/09 18:13:02
* - fix: filter excluded paths before adding install prefixes (#8709).jbj2000-02-251-0/+46
- add i18n lookaside to PO catalogue(s) for i18n strings. - try for /etc/rpm/macros.specspo so that specspo autoconfigures rpm. - per-platform configuration factored into /usr/lib/rpm subdir. CVS patchset: 3588 CVS date: 2000/02/25 16:29:44