Commit Graph

186 Commits

Author SHA1 Message Date
John 38eb546f46 common/hooks/post-install/80-prepare-32bit.sh: use dot to reference directory content instead of wildcard
fixes #46612
2023-10-12 19:49:38 +07:00
Andrew J. Hesford dc44dff8d5 xbps-src: follow symlinks when fixing up pkg-config files
Packages (e.g., python3-pybind11) that symlink to *.pc files in
/usr/{lib,share}/pkgconfig will have those links overwritten with actual
copies of the files after the hook

    common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh

attempts to remove $XBPS_CROSS_BASE from paths. This will result in the
new copy containing corrected paths, but the original file remaining
uncorrected.

This was stolen fro @tornaria.
2023-10-03 09:00:28 -04:00
Đoàn Trần Công Danh 3879823578 98-shlib-provides: handle special 32bit packages
If the packages has -32bit suffix and there's another subpackages with
same name. It's definitely not a normal package.
2023-09-08 19:59:07 +07:00
Duncaen 773e2e375f
xbps-src: split 32bit hook into two steps
This should fix issues where -32bit packages are missing the runtime
dependencies, since the common/hooks/post-install/98-shlib-provides.sh
hook depends on the 32bit files being copied and the runtime and the
rdep part of the common/hooks/post-install/80-prepare-32bit.sh depends
on the common/hooks/post-install/98-shlib-provides.sh.
2023-09-07 23:15:43 +02:00
Duncaen 65c9ade5e4
xbps-src: consistently use read -r when reading file paths 2023-08-31 14:18:14 +02:00
Đoàn Trần Công Danh 6d6cf11a2b hooks/shlib-provides: record shared libraries without SONAME
In a later change, we would like to generate runtime-deps between
sub-packages.

In order to do that, we can add everything into etc/shlibs or we can
look into other subpackages directly.  The former is cumbersome if such
package has lot of shared-objects.  The latter requires traversing and
checking a lot of files.  Furtunately, we can speed up the latter one by
storing all shared-objects' information in a centralised place.
2023-08-30 13:24:12 +07:00
Đoàn Trần Công Danh 337d270447 hooks: move prepare-32bit and shlib-provides to post-install
In a later change, we will generate shlib-depends cross subpkgs during
pre-pkg stage.  Thus we need shlib-provides information of all subpkgs
ready before pre-pkg is run.

Those information can only be read in post-install stage at the
eariliest.

Let's move the shlib-provides to post-install.  This hook requires
prepare-32bit, so, let's move that hook, too.
2023-08-30 13:24:12 +07:00
Duncaen d36120c73d
11-pkglint-elf-in-usrshare: use file --no-pad so we don't have to strip it 2022-09-03 15:30:51 +02:00
Gonzalo Tornaría 17e9801568 nostrip_files: allow full path
The option `nostrip_files` takes a filename without path, in contrast to
option `nopie_files` which takes only full path.

This commit makes it so that `nostrip_files` can take either the
filename or the full path.
2022-01-08 17:51:54 +01:00
Andrew J. Hesford 9b61ec59f9 python3: update to 3.10.0. 2021-10-09 08:00:19 -04:00
Michal Vasilek 60e6d85b5a hooks/fix-permissions: add completion directories 2021-09-15 20:31:27 +02:00
Quentin Rameau fbc36bd439 hooks/fix-permissions: reword error message
The proper way of describing the culprit bit is “other”
and not “all” users.
2021-09-08 23:16:27 +02:00
Michal Vasilek b30ea3cffe hooks/post-install: add fix permissions hook 2021-08-26 21:46:44 +02:00
Érico Nogueira 3d62ba684f common/hooks/post-install: show error in $STRIPCMD in 06-strip-and-debug.
Currently fails with a hard to understand error message:

    2021-04-16T11:51:36.1074291Z => ERROR: rust-std-1.51.0_1: post-install_06-strip-and-debug-pkgs: '$STRIPCMD --strip-unneeded "$f"' exited with 1
2021-07-04 22:29:17 +02:00
Leah Neukirchen 210b461028 hooks/post-install/06-strip-and-debug-pkgs.sh: speed up.
Only run file once for each file in the destdir, only double-check
when we are about to strip the ELF files.
2021-01-30 15:20:53 +01:00
Érico Rolim 4a41da0426 hooks/{pre,post}-install: fix 98-fixup-gir-path.
The libdir changes to use /usr/lib{32,64} instead of /usr/lib broke
cross builds for some packages that use gir, due to issues with copying
over symlinks. Since we haven't managed to track down the root cause for
the installation path, a symlink is a clean enough temporary fix. This
follows the style of the 00-libdir hooks.

Since pre-install runs for the main package and then each subpackage, it
should use PKGDESTDIR (not DESTDIR), which also enables a subpackage
that installs files during pkg_install to work cleanly.

As far as I can see, the previous hook was quite flawed. Since it was a
pre-install hook, the check for a directory would happen *before*
package installation (so nothing would happen). The only reason it did
anything was because it also ran as a step before a subpackage's
pkg_install (most GIR packages have a -devel subpackage), but used
DESTDIR instead of PKGDESTDIR, so it checked and affected the contents
of the main package. Then when the subpackage's pkg_install ran, the
files would have already been copied to the correct folders.

Closes #27437
2021-01-24 18:08:27 -03:00
q66 cb804fbf85 xbps-src: remove noarch 2021-01-20 13:09:59 +01:00
q66 6283b0d209 common/hooks/{pre,post}-install: generalized libdir hook
this makes sure we don't have to worry about packages installing
stuff in lib32/lib64, it will be automagically symlinked

if something is still left over for whatever reason, or if the
opposite wordsize directory exists, that will be caught by pkglint
2020-12-21 21:03:06 -03:00
Érico Rolim a6c6bcc651 common/hooks: remove remove-localized-manpages hook.
Allow packages to include localized man pages. Needed for manpages-l10n.
2020-12-12 03:58:57 -03:00
Érico Rolim c804437d04 common/hooks/post-install/04-create-xbps-metadata-scripts.sh:
use correct section for chroot(2) in comment.
2020-11-13 23:06:14 -03:00
Piotr Wójcik dcdbcbf30a 11-pkglint-elf-in-usrshare: disallow x-executable
Can be allowed per-package now
2020-08-25 21:18:59 +02:00
Helmut Pozimski e0979275b4 11-pkglint-elf-in-usrshare: allow explicit setting of exceptions
Co-authored-by: Piotr Wójcik <chocimier@tlen.pl>
2020-08-25 21:18:59 +02:00
fosslinux 102841754a xbps-triggers: add texmf-dist regeneration trigger 2020-07-14 02:38:24 +02:00
John 9ff9323c0f hooks/pkglint-devel-paths: do move static find calls out of the loop
Right now they got executed every iteration, but weren't dependent
on the loop. Which resulted in getting the output x times more often
than neccessary
2020-07-12 04:20:48 -07:00
John c677edf2b3 hooks/pkglint-elf-in-usrshare: speed up by only starting file once 2020-06-29 16:24:08 -07:00
Đoàn Trần Công Danh d7f942b709 post-install: warn if cross wrapper not cleared 2020-05-31 02:10:51 +00:00
Đoàn Trần Công Danh eef02a2b84 post-install: clean reference to $XBPS_CROSS_BASE in pkgconfig 2020-05-31 02:10:51 +00:00
Đoàn Trần Công Danh 2af30cdd78 setup: compute gitrev from outside of chroot
Together with previous commit, `xbps-src` is able to support
git-worktree and shared repository by now.
2020-05-23 06:59:24 +00:00
Đoàn Trần Công Danh 20f9bedefb xbps-src: use $XBPS_GIT_CMD for git 2020-05-23 06:59:24 +00:00
Piotr Wójcik 5028523d43 common/hooks: fix pycompile_module with explicit python_version=2 2020-04-25 02:10:01 +02:00
a 3c135fddb7 06-strip-and-debug-pkgs.sh: ignore binaries for unknown machines
Because most likely these files are not executables, but some kind of
bytecode. And strip doesn't know how to strip them anyway.
2020-04-23 23:01:01 -04:00
Piotr Wójcik 8a09d89eac common/hooks: remove pycompile_version, use python_version instead 2020-04-22 20:11:26 +02:00
Cameron Nemo 23ff926700 base-files: install /usr/lib32 symlink on i686 2019-12-15 09:17:51 +01:00
Piotr Wójcik 0139bdb524 04-create-xbps-medatada-scripts.sh: autogenerate pycompile_modules 2019-12-06 20:23:37 +01:00
Piotr Wójcik eb3405a5ed hooks/generate-gitrevs: update summary 2019-11-23 09:33:32 +01:00
John e351f6b462 hooks/post-install/03-remove-empty-dirs.sh: use find -delete instead of rmdir -p
rmdir -p could end up deleting even /destdir when a empty package would
not have any subpackages with a i686 masterdir.
2019-10-22 16:58:09 +02:00
John a93c02d3cc hooks/post-install: do remove lib32 symlink before checking for empty dirs
this resulted in empty i686 packages never getting flagged as empty
since the /usr/lib32 -> lib symlink was only removed after the check
2019-10-22 16:58:09 +02:00
Juan RP 7b7d7c13a1
xbps-src: exit properly if mktemp(1) fails, not from its subshell.
Thanks @huglovefan
2019-06-17 17:38:07 +02:00
Juan RP f59b295903 xbps-src: cleaned up usage of mktemp(1).
This one was on my TODO for a long while... fixes unportable
arguments (checked with the NetBSD's manual page).
2019-06-17 15:23:20 +02:00
maxice8 81da3e618c 06-strip-and-debug-pkgs.sh: replace grep -q with [[ ]] 2019-04-14 12:46:51 -03:00
maxice8 cdb6bf6e94 00-compress-info-files.sh: replace echo | grep with [[ ]] 2019-04-14 09:02:28 -03:00
maxice8 13b5d09803 04-create-xbps-metadata-scripts.sh: replace echo | grep with [[ ]] 2019-04-14 07:45:09 -03:00
maxice8 a00d546dce 06-strip-and-debug-pkgs.sh: replace echo | grep with [[ ]] 2019-04-14 07:45:09 -03:00
maxice8 5b26fde9c0 06-strip-and-debug-pkgs.sh: remove dirname usage 2019-04-14 06:22:09 -03:00
maxice8 974f2805f2 00-compress-info-files.sh: remove dirname usage 2019-04-14 06:22:09 -03:00
Enno Boland 6eb37e35b2 common: merge only_for_archs and noarch=yes into one.
* noarch=yes is replaced with archs=noarch
* only_for_archs= is renamed to archs=
* archs= allows the use of wildcards and negations; first matching rule applies:
  * archs="*-musl" will build the pkg only for musl-libcs
  * archs="~*-musl" will build the pkg only on non-musl-libc
  * archs="x86_64-musl ~*-musl" will build for x86_64-musl and any non-musl
    arch.
* archs= defaults to "*"
2019-02-15 13:19:44 +01:00
maxice8 ab96ff356e
xbps-src/hooks: most 05-rename-python3-c-bindings to post-install 2019-02-02 14:40:05 -02:00
maxice8 75e535d257 hooks/11-pkglint-elf-in-usrshare: make use of bashisms to fix stuff.
using for-loop causes the loop to hang at filenames with -.

Use while read instead with bash process substitution so it avoids the
subshell problem.
2019-01-10 00:44:44 -02:00
maxice8 c06512eac9 hooks: Add hook to check for ELF files in /usr/share 2019-01-09 17:01:13 -02:00
Piotr Wójcik 27d9e7ffea hooks/uncompress-manpages: prevent hang
In case when file to be uncompressed existed, decompressors asked
whether to overwrite it.
As output is muted, building hung silently waiting for input.
2019-01-05 08:12:55 -02:00