Commit Graph

453 Commits

Author SHA1 Message Date
Đoàn Trần Công Danh 509f79078c hooks: do-extract: extract to temp dir then rename
Extracting to temporary directory then renaming to real $wrksrc,
will make the do-extract steps works atomicity. Either $wrksrc is there
and complete, or it's not there.

Accidentally, this change has a side effect, we can no longer care about
the name of top-level components of a tarball, since we will rename the
top level directory in question to $wrksrc. IOW, we don't need to set
$wrksrc any longer.  The side effect of above side effect: we can starting
to build multiple packages that have same top-level's name without clean
from now on.

In another hand, we only rename the inner directory if the extracted
file hierarchy has single top-level directory, we will use the
renamed-temporary directory as the $wrksrc, $create_wrksrc variable is
no longer relevant, and do-clean will always work probably instead of
leaving some trash behind like before.
2022-11-08 22:30:37 +07:00
Đoàn Trần Công Danh a67189c236 hooks: do-extract: simplify gem extraction 2022-11-08 22:30:37 +07:00
Andrew J. Hesford 6504d8e133 python3: update to 3.11.0.
Also include bluez headers at build time to allow Bluetooth sockets in
the Python stdlib.

h/t: @sgn
2022-11-05 08:21:20 -04:00
Duncaen 02fb37373b
hooks/99-pkglint.sh: error out if /usr/usr path is used 2022-11-01 15:40:29 +01:00
Duncaen ccd0dc07e0 hooks/99-pkglint.sh: error if /usr/share/man/man/ is used 2022-09-10 21:58:15 +00:00
Duncaen 3311c84251
xbps-src: try to fix multiple distfiles 2022-09-09 22:17:53 +02:00
Duncaen 500a3c8f49 xbps-src: clean up fetch hook and allow mirroring 2022-09-06 21:41:44 +07:00
Đoàn Trần Công Danh c22acb3072 99-pkglint: forbid /usr/etc
data files should go to /usr/share, config files should go to /etc
2022-09-06 17:43:20 +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
Piotr Wójcik bfda85dace common/do-patch: handle spaces in patch filename 2022-05-19 20:56:42 +02:00
classabbyamp fb9aef712b common/hooks/pre-pkg/04-generate-runtime-deps.sh: fix sorequires 2022-05-13 22:16:58 +02:00
classabbyamp 5ec2556004 common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
fixes #36641
2022-05-13 21:21:23 +02:00
Piotr Wójcik 1b3ee76ea1 hooks/99-pkglint.sh: make missing shlib entry not a warning 2022-04-22 21:54:58 +02:00
tibequadorian 15f5a8668b patch_args: allow use of --directory parameter
patch(1) has a -d/--directory parameter which allows us to specify a directory
where the patch will be applied. This is especially useful when we have
multiple distfiles and want to patch in $build_wrksrc because that's where the
patch is usually applied.

Problem is, that the -i parameter is also relative to the the -d parameter and
thus fails to find the patch, when -d is set. We solve that by using standard
input instead of -i.
2022-04-10 11:06:32 +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
q66 7b4119df5c common/hooks/do-patch/00-patches: drop -l option
The -l option causes a looser behavior of patch(1), where patches
are applied when there is a match with no regard to leading
whitespace. This means that it is possible to get false positives:
for example, in srcpkgs/glu, there is a patch that was supposed
to be long gone (since the release already includes it) but it
was overlooked since with -l it happens to apply in a different
portion of the source (where it is wrong).

Avoid these cases.
2021-11-05 01:44:16 +01:00
Quentin Rameau 7a0bd8af2d common: fix tooling section in comments 2021-10-24 21:33:13 +02: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
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