Commit graph

435 commits

Author SHA1 Message Date
Michal Vasilek
60e6d85b5a hooks/fix-permissions: add completion directories 2021-09-15 20:31:27 +02:00
Piotr Wójcik
4f03807529 xbps-src: overwrite packages in local repo 2021-09-13 23:04:48 +02:00
Piotr Wójcik
7b7d385f8b common/hooks: simplify setting arch for binpkg
setup_pkg always export XBPS_TARGET_MACHINE
2021-09-13 23:04:48 +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
6303c2e6ce common/hooks: speed up generate-runtime-deps.
Instead of using file(1) to check for ELF files, just read bytes
directly from the file and check if they are the ELF magic bytes.

Should probably be factored out into a common function that can be used
in other places, if necessary.

Also use awk instead of "grep|awk" for some minor speedup.
2021-07-22 11:56:26 -03:00
Piotr Wójcik
3680c424db hooks/prepare-32bit: create packages from all *-devel
All *-devel dependencies of 32bit packages are replaced
with *-devel-32bit. Missing dependencies made some
uninstallable.
2021-07-10 20:45:50 +02:00
Piotr Wójcik
7845fa8c53 hooks/prepare-32bit: correct devel packages matching
fixes cases like 'ruby-devel-doc'
2021-07-10 20:45:50 +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
Đoàn Trần Công Danh
8b25a1449b do-patch: switch default patch_args to -Np1
All templates that require -Np0 have patch_args appended.
Let's flip the switch.
2021-06-20 13:17:29 +07:00
q66
1ea593eeda base-files: fix conf files replacing each other wrong 2021-02-28 02:05:33 +01:00
q66
5949392125 base-files: make some sysctls like kexec setting user-alterable
While at it, relax the pkglint for base-files only.
2021-02-28 01:44:30 +01:00
Đoàn Trần Công Danh
8f8c5789b9 common/00-libdir: only create lib{32,64} symlink if not exists 2021-02-10 14:38:59 +01: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
Leah Neukirchen
6ecbbf767a hooks/pre-pkg/03-rewrite-python-shebang.sh: use grep -r instead of find.
This saves us one sed execution per file in the destdir, resulting
in a major speedup.

Grep will only consider text files and only look at the first line.
2021-01-30 15:20:43 +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
Đoàn Trần Công Danh
32e2827145 wrapper: valac: pass --vapidir after real arguments
Due to constant change in vala, some projects includes some old and
pre-generated vapi in their source tree and uses that version
instead of system one.

Pass system vapidir after real arguments in order to prefer its bundled
vapi.
2021-01-24 12:45:14 +07:00
q66
cb804fbf85 xbps-src: remove noarch 2021-01-20 13:09:59 +01:00
Đoàn Trần Công Danh
04825ced01 hooks: abort if l10n files found in /usr/lib 2021-01-09 13:11:27 +07:00
Đoàn Trần Công Danh
6547bbb473 freetype: clean XBPS_CROSS_TRIPLET reference in freetype-config
* $XBPS_CROSS_TRIPLET-pkg-config is our wrapper not a real executable
* In a build that have both freetype-config and pkg-config,
  $XBPS_CROSS_BASE will be prepended twice with current system,
  let's fix it.
2021-01-05 06:41:36 +07:00
Đoàn Trần Công Danh
bd62ff8580 99-pkglint-subpkgs: replace grep with case..esac
On experience with 100 subpkgs, this change reduces execution time from
284ms to 4ms

Closes: #27137 [via git-merge-pr]
2020-12-29 22:46:59 -08: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
Đoàn Trần Công Danh
3996821f07 99-pkglint-subpkgs: correct for multiline subpackages
As discussing in [1], on template with "subpackages" as multilines will
report false positive on some packages will never be built.

There're multiple problems here:

- expanded "subpackages" will have an empty line if it has a newline
  inside template
- "sed" expression couldn't work with multilines "subpackages"

Let's not quote "$subpkgs" and "$subpackages" in "printf" to let the
shell do expansion and trim the empty lines for us. And rewrite the
"sed" expression to work with multilines "subpackages"

[1]: https://github.com/void-linux/void-packages/pull/26939#issuecomment-739098547
2020-12-14 09:35:02 +07: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
Đoàn Trần Công Danh
ca8b0789b9 wrapper: bring valac and vapigen to current version
Current wrappers hard-coded them at 0.42 which is very long ago.
Hence, those wrappers insert a versioned vapidir that no longer exists.
The build still work because valac will look into host's versioned vapidir
instead.

Let's check the version we're having and wrap that instead of changing
the hard-coded number from time to time.
2020-11-26 20:57:52 +07: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
Andrew J. Hesford
e590822d93 python3: update to 3.9.0. 2020-10-10 10:21:09 -04:00
Piotr Wójcik
6efc7dd98d xbps-src: quote wrksrc to allow whitespace 2020-09-03 21:03:32 +02: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
Noah Huppert
984fa5d9cb xbps-src: fixed dangling binpkg lock on error
Co-authored-by: Noah Huppert <contact@noahh.io>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>

Closes: #24191 [via git-merge-pr]
2020-08-17 09:42:08 -04: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
Đoàn Trần Công Danh
74f0186fd9 common/wrapper: python*-config: answer --includes
We haven't run into trouble with this because most configure script
check if $PYTHON-config exist,
thus force packager uses /usr/bin/python{,3}
2020-07-04 22:22:10 +07:00
John
c677edf2b3 hooks/pkglint-elf-in-usrshare: speed up by only starting file once 2020-06-29 16:24:08 -07:00
Andrew J. Hesford
4ef9cff1d3 xbps-src: consume all shebang arguments during rewrite 2020-06-18 09:38:18 +02:00
Andrew J. Hesford
b56a3b0650 xbps-src: improve python shebang rewrites 2020-06-10 19:11:58 +02:00
Đoàn Trần Công Danh
d9c22b4d0a pre-pkg: use existing info to check empty package 2020-05-31 02:11:11 +00:00
Đoàn Trần Công Danh
91c0eaa5a7 xbps-src: pre-pkg: allow only white-listed directories. 2020-05-31 02:11:11 +00: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
John
953f4b47a9
xbps-src/common: add option to disable generic pkg-config link
closes #21728
2020-05-26 21:21:23 +02: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
Andrew Benson
de825d8a24 00-distfiles.sh: fix status phrasing 2020-05-10 10:57:40 +02: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
Andrew J. Hesford
596250e4ea xbps-src: remove default python_version
Closes: #21209 [via git-merge-pr]
2020-04-21 18:45:25 -04:00
Đoàn Trần Công Danh
7c8ab37d36 pkglint: forbid files generated by mimedb trigger 2020-04-11 21:19:42 -04:00