aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* misc-functions.sh: restore canonicalize func (bug 675284)Zac Medico2019-01-131-0/+34
| | | | | | | | The canonicalize function is required by install-qa-check.d/05prefix. Fixes: aa0a94198794 ("ecompress: Replace with implementation from portage[mgorny]") Bug: https://bugs.gentoo.org/670484 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Support disabling stripping for binary packagesMichał Górny2018-11-051-8/+26
| | | | | | | | | | | | | | | Similarly to FEATURES=binpkg-docompress, implement FEATURES=binpkg-dostrip that controls whether stripping occurs before or after building the binary package. This makes it possible to build binary packages with some debug information that is stripped upon installing. Afterwards, the binary packages can be reinstalled with debug info (either via nostrip or splitdebug). Real usability of this feature will be limited by optimization levels applied but still, it's better than nothing. Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Support disabling docompress for binary package buildsMichał Górny2018-11-051-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add FEATURES=binpkg-docompress that can be used whether docompress compression is performed before or after creating binary packages. With the feature enabled (the default), the current behavior of storing compressed files in binpkg is preserved. With it disabled, uncompressed files are stored inside binary package and are compressed when installing. Storing uncompressed files in binary packages has two advantages: 1. Avoids the double-compression penalty, effectively improving binary package compression speed and compression ratio. 2. Allows the same packages to be reused on systems with different docompress configurations. The option is roughly backwards compatible. Old Portage versions will install packages created with FEATURES=-binpkg-docompress correctly, albeit without compression. Portage with FEATURES=binpkg-docompress should install old binpackages semi-correctly, potentially recompressing them (and throwing already-compressed warnings on format mismatch). The new behavior is left off by default to avoid those problems. Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
* misc-functions.sh: Inline and reflow __prepallMichał Górny2018-11-051-26/+22
| | | | | | | | | Inline the __prepall function into install_qa_check(), and reflow it to cover the code more correctly. The arbitrary split between these functions has resulted in mismatches, with e.g. prepstrip being covered by mtree flag saving but dostrip being accidentally omitted. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* *-qa-check.d: fix entering EROOT in EAPI 7Michał Górny2018-10-251-1/+1
| | | | | | | | | | Fix running QA checks from EROOT in EAPI 7 if the value is empty. Previously, this wrongly caused 'cd' to be run with empty value implying home directory. Bug: https://bugs.gentoo.org/668638 Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
* ecompress: Replace with implementation from portage[mgorny]Michał Górny2018-09-201-122/+5
| | | | | | | | | | | | | | | | | | | | | | | | Replace the old ecompress/ecompressdir implementation with the one used in portage[mgorny]. This is a squashed version of a long series of commits that gutted off parts of old logic, introduced the new code, fixed ongoing bugs and finally restored the missing features. Given the scale of changes, it is easier to review it as completely new code. The duplicate model of ecompress/ecompressdir (both not exactly par on features) has been replaced by a single helper that compresses everything uniformly. Instead of complex path-wise processing, a mark-file logic is used -- the same as in estrip. Additionally, the functions are moved out of ebuild path to clearly indicate they are internal API (they were not used in any ebuilds). The new implementation is par on features with the old one. It supports exclusion suffix lists, automatic decompression of already-compressed files (with eqawarn-ing about its unreliability), lower bound for compressed file size, hardlink breaking and symlink fixing. In other words, there should be no regression upon replacing it. Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Replace implicit doc compression with dir compression in old EAPIsMichał Górny2018-09-201-7/+1
| | | | | | | | | | | Unify the documentation compression methods in all EAPIs to compress per-directory rather than implicitly compress files installed by dodoc, doinfo and doman. Old EAPIs don't provide docompress to control which directories are compressed but they don't say anything about dodoc etc. compressing anything either. Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Ban prepall in ebuild scopeMichał Górny2018-09-171-1/+26
| | | | Reviewed-by: Zac Medico <zmedico@gentoo.org>
* scanelf: fix %p format string for EAPI 7 (bug 659228)Zac Medico2018-06-261-1/+1
| | | | | | | | | For all scanelf path arguments that are used in processing of the %p format string, normalize the argument to have a trailing slash, so that the leading slash is consistently stripped in the expansion of the %p format string. Bug: https://bugs.gentoo.org/659228
* misc-functions: fix selinux labelling on muslJason Zaman2018-05-181-1/+1
| | | | | | | | | musl's implementation of getopt is different from glibc's in that it does not accept flags after non-flag arguments, moving the flags earlier makes SELinux labelling work on musl also. Bug: https://bugs.gentoo.org/655996 Signed-off-by: Jason Zaman <perfinion@gentoo.org>
* misc-functions: /selinux is gone in favour of /sys/fs/selinuxJason Zaman2018-05-181-3/+1
| | | | | | | It was moved to /sys/fs/selinux/ long ago and not supported anymore Bug: https://bugs.gentoo.org/655996 Signed-off-by: Jason Zaman <perfinion@gentoo.org>
* BINPKG_COMPRESS: allow empty setting to disable compression (bug 654456)Zac Medico2018-05-011-1/+1
| | | | | | | | In some cases it might make sense to disable compression, so allow an empty setting to disable compression (consistent with PORTAGE_COMPRESS). Bug: https://bugs.gentoo.org/654456
* INSTALL_MASK: honor install time config for binary packages (bug 651952)Zac Medico2018-03-291-0/+23
| | | | | | | | | For binary packages, honor the INSTALL_MASK configuration that exists at install time, since it might differ from the build time setting. Fixes: 3416876c0ee7 ("{,PKG_}INSTALL_MASK: python implementation") Bug: https://bugs.gentoo.org/651952
* {,PKG_}INSTALL_MASK: python implementationZac Medico2018-03-271-73/+0
| | | | | | | The InstallMask.match code comes from the dblink _is_install_masked method from portage-mgorny: https://github.com/mgorny/portage/commit/f5ac3af3216d209618a2f232b4bf720bc8b520ad
* EbuildPhase: add PackagePhase class for PKG_INSTALL_MASKZac Medico2018-03-271-17/+6
| | | | | The PackagePhase class will be a convient place to invoke a python implementation of PKG_INSTALL_MASK.
* {,PKG_}INSTALL_MASK: record value in vardbZac Medico2018-03-271-8/+0
| | | | Also, skip preinst_mask phase when INSTALL_MASK is empty.
* Add dostrip for EAPI 7Zac Medico2018-03-271-0/+6
| | | | | | | | | | | | | | This patch includes the essential parts of the dostrip implementation from portage-mgorny. All of the prepstrip code has moved to bin/estrip, without any changes except the addition of argument parsing for estrip --ignore, --queue, and --deque modes which are equivalent to the corresponding ecompressdir modes. Due to overlap, also ban the non-standard prepstrip and prepallstrip helpers in EAPI 7, with a die message suggesting to use 'dostrip' instead. Also ignore the non-standard STRIP_MASK variable for EAPI 7. Bug: https://bugs.gentoo.org/203891
* Fix uses of D/ED to account for no trailing slashMichał Górny2018-03-121-12/+12
| | | | | | | Fix all uses of D/ED to account for trailing slash not being present in EAPI 7. While at it, also remove some duplicate slashes. Reviewed-by: Zac Medico <zmedico@gentoo.org>
* postinst_qa_check: initialize preinst state (bug 635474)Zac Medico2017-10-271-7/+11
| | | | | | | | In order to prevent false-positives during postinst_qa_check, use a preinst_qa_check function to initialize a baseline state for the postinst checks. Bug: https://bugs.gentoo.org/635474
* misc-functions.sh: Fix 'within' typo in commentR0b0t12017-09-181-1/+1
| | | | Closes: https://github.com/gentoo/portage/pull/206
* Support post-postinst QA checksMichał Górny2017-08-261-0/+57
| | | | | | | | | Extend the QA check mechanics in Portage to support post-postinst QA checks. They are like post-install QA checks, except they are run after pkg_postinst(), and so they can be used to verify that necessary postinst actions were performed (e.g. regenerating caches). Reviewed-by: Zac Medico <zmedico@gentoo.org>
* Support different compressors for binary packagesManuel Rüger2017-07-301-2/+4
| | | | | | | | This patch allows to set the compressor for binary packages via a BINPKG_COMPRESSION variable. BINPKG_COMPRESSION_ARGS allows to specify command-line arguments for the chosen compressor. Reviewed-By: Zac Medico <zmedico@gentoo.org>
* bin/*-functions.sh: remove unnecessary sleep loopsZac Medico2016-02-241-1/+1
| | | | Fixes: 46cafb3996d8 ("Remove all \a (alert/bell/beep) tokens (bug 336024)")
* INSTALL_MASK: enable matching of broken symlinks (bug 570530)Zac Medico2016-01-011-1/+2
| | | | | | | | | Since commit 5a1b870fe54ac06f864a648c3ea5cc118f6ce911, INSTALL_MASK does not match broken symlinks. Fix it to do so. Fixes: 5a1b870fe54a ("MEDIUM: misc-functions: Be more quiet when removing non existing INSTALL_MASK") X-Gentoo-Bug: 570530 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=570530
* bin/misc-functions.sh: Elaborate on some comments in install_mask().Michael Orlitzky2015-07-201-3/+13
|
* require PORTAGE_{BIN,PYM}_PATH not be clearedMike Frysinger2015-06-101-1/+1
| | | | | | | | | Rather than hardcode a full path everywhere as a fallback, assume the value is always set to the right location. The current path isn't the right place anymore already. If it turns out we want to support this scenario, we can do it via a bunch of bootstrapping (and symlinked) files.
* MEDIUM: misc-functions: Be more verbose when removing INSTALL_MASK globBertrand Jacquin2015-04-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When glob are defined in INSTALL_MASK, no output is given on what file has been deleted. The following patch provide more information to user about what is actually removed. Example: # INSTALL_MASK='*.h' emerge -va1t x11-proto/xproto .. >>> Installing (1 of 2) x11-proto/xproto-7.0.27::gentoo * Removing /usr/include/X11/DECkeysym.h * Removing /usr/include/X11/HPkeysym.h * Removing /usr/include/X11/Sunkeysym.h * Removing /usr/include/X11/X.h * Removing /usr/include/X11/XF86keysym.h * Removing /usr/include/X11/XWDFile.h * Removing /usr/include/X11/Xalloca.h * Removing /usr/include/X11/Xarch.h * Removing /usr/include/X11/Xatom.h * Removing /usr/include/X11/Xdefs.h * Removing /usr/include/X11/Xfuncproto.h * Removing /usr/include/X11/Xfuncs.h * Removing /usr/include/X11/Xmd.h * Removing /usr/include/X11/Xos.h * Removing /usr/include/X11/Xos_r.h * Removing /usr/include/X11/Xosdefs.h * Removing /usr/include/X11/Xpoll.h * Removing /usr/include/X11/Xproto.h * Removing /usr/include/X11/Xprotostr.h * Removing /usr/include/X11/Xthreads.h * Removing /usr/include/X11/Xw32defs.h * Removing /usr/include/X11/Xwindows.h * Removing /usr/include/X11/Xwinsock.h * Removing /usr/include/X11/ap_keysym.h * Removing /usr/include/X11/keysym.h * Removing /usr/include/X11/keysymdef.h * checking 1 files for package collisions >>> Merging x11-proto/xproto-7.0.27 to / Signed-off-by: Bertrand Jacquin <bertrand@jacquin.bzh> Acked-by: Brian Dolbec <dolsen@gentoo.org>
* MEDIUM: misc-functions: Be more quiet when removing non existing INSTALL_MASKBertrand Jacquin2015-04-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | When FEATURES="nodoc noinfo noman" is used, you will get the following output for every packages, even virtual that contain no file: # FEATURES="nodoc noinfo noman" emerge -va1t virtual/cron .. >>> Installing (1 of 1) virtual/cron-0::gentoo * Removing /usr/share/man * Removing /usr/share/info * Removing /usr/share/doc * checking 0 files for package collisions >>> Merging virtual/cron-0 to / The following patch makes the output as: # FEATURES="nodoc noinfo noman" emerge -va1t virtual/cron .. >>> Installing (1 of 1) virtual/cron-0::gentoo * checking 0 files for package collisions >>> Merging virtual/cron-0 to / Signed-off-by: Bertrand Jacquin <bertrand@jacquin.bzh> Acked-by: Brian Dolbec <dolsen@gentoo.org>
* Support all install-qa-check.d locations and overridesMichał Górny2014-11-291-22/+43
| | | | | | | Update the install-qa-check.d handling code to conform to GLEP 65. Collect files from all defined locations, order them lexically by name and run each uniquely named script once. Make scripts in higher priority locations override lower priority locations properly.
* Force the SELinux user during relabel operation (530192)Sven Vermeulen2014-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | When Portage relabels the files of the package, it currently calls setfiles (which is correct) but does not use the -F option (force). As a result, the files only get assigned the right SELinux type, but not the right SELinux user and SELinux role. By using "setfiles -F", the SELinux user (and role, but role almost always remains "object_r") is set to the right one (system_u mostly). Without this, a multi-user system with different SELinux users and with User Based Access Control (UBAC) enabled (the local "ubac" USE flag) might find that some software fails to work for different SELinux users than the one used to install the software, until a full forced relabel operation is done. X-Gentoo-Bug: 530192 X-Gentoo-Url: https://bugs.gentoo.org/show_bug.cgi?id=530192 Acked-by: Zac Medico <zmedico@gentoo.org>
* Introduce eqatag to output proper machine-readable QA logsMichał Górny2014-11-201-0/+4
| | | | | | The eqatag command syntax conforms to pre-GLEP describing install-qa-check.d. The qa.log file format strictly conforms to YAML for easy machine parsing.
* Allow inheriting utility eclasses in QA checksMichał Górny2014-09-251-0/+2
| | | | | | Allow inheriting utility eclasses for use in QA checks. The eclasses can be used e.g. to obtain paths or other data needed for the check. However, the eclasses must not export phases or set ebuild metadata.
* Run install-qa-check.d scripts from repositoriesMichał Górny2014-09-251-0/+13
| | | | | --- (following the remaster of install_qa_check())
* Split install_qa_check() into install-qa-check.d scriptsMichał Górny2014-09-251-928/+11
| | | | | Convert the horrendous install_qa_check() function into a plug-in system that calls separate QA checking scripts from install-qa-check.d.
* QA: Add a set of checks for bash-completion filesMichał Górny2014-09-031-0/+124
| | | | | | | | Add checks for common mistakes when installing bash completion files: legacy directory, incorrect naming, missing aliases, deprecated 'have' function. Acked-by: Brian Dolbec <dolsen@gentoo.org>
* bin/misc-functions.sh: Empty flag variable 'error' before (re-)useeroen2014-08-261-1/+1
| | | | | | | | Prevent subsequent .png files from inheriting error status from earlier file. Reviewed-By: Michał Górny <mgorny@gentoo.org> Acked-By: Brian Dolbec <dolsen@gentoo.org>
* QA: Warn when systemd units use /etc/conf.dMichał Górny2014-08-111-0/+15
| | | | | | Acked-by: Alexander Berntsen <bernalex@gentoo.org> Acked-by: Brian Dolbec <dolsen@gentoo.org> Reviewed-by: Anthony G. Basile <blueness@gentoo.org>
* QA: Use pngfix to find broken PNG filesMichał Górny2014-08-111-1/+28
| | | | | | | Acked-by: Alexander Berntsen <bernalex@gentoo.org> Acked-by: Brian Dolbec <dolsen@gentoo.org> Reviewed-by: Justin Lecher <jlec@gentoo.org> Reviewed-by: Sergei Trofimovich <slyfox@gentoo.org>
* Bug #496134: Preserve extended attributes in binary packages.Arfrever Frehtes Taifersar Arahesis2013-12-271-0/+1
|
* QA warning for files in /var/{cache,lock,run}/ or /run/Sebastian Luther2013-12-111-1/+18
| | | | | | | No warning will be issued if the directories are created, but are left empty. URL: https://bugs.gentoo.org/493154
* docompress: add --limit support with newer EAPIsMike Frysinger2013-12-011-1/+1
| | | | | | | | | | We added support for not compressing files below a certain size (since the speed/size/etc... tradeoffs didn't make sense), but it was only for man pages and old EAPI's. Add the logic to the newer EAPIs and apply to all compressed paths. URL: http://bugs.gentoo.org/169260
* Flag -Waggressive-loop-optimizations warnings.Ryan Hill2013-09-141-0/+1
| | | | This will fix bug #484840.
* Sanitize PYTHONPATH for helpers, bug #477764Zac Medico2013-07-221-1/+1
|
* rpmbuild: use --nodeps optionZac Medico2013-07-211-1/+1
|
* Flag -Wsizeof-pointer-memaccess warnings.Ryan Hill2013-05-181-0/+1
| | | | This will fix bug #470224.
* check-implicit-pointer-usage: safe cwd bug 469338Zac Medico2013-05-121-2/+3
|
* bin/misc-functions.sh: use pipe for find ${D}${D}Zac Medico2013-04-291-4/+3
|
* bin/misc-functions.sh: normalize ${D%/}${D} slashZac Medico2013-04-291-4/+4
| | | | This will fix bug #467886.
* Revert "Add a QA check for systemd unit file install."Zac Medico2013-04-111-10/+0
| | | | | | This reverts commit dd2d661078771a41d4fd554c2bc3b1188ce7b53e. Forcing use of a specific eclass is too restrictive. It would be better to use a variable to control a warning like this. See bug #465562.
* install_qa_check_prefix: drop removal of etc/{init,conf}.d filesFabian Groffen2013-03-081-10/+0
| | | | | | This allows to use OpenRC on Prefix systems. Signed-off-by: XU Benda <heroxbd@gmail.com>