Commit graph

507 commits

Author SHA1 Message Date
classabbyamp
5da08192f2 common/hooks/do-pkg/00-gen-pkg: add new sourcepkg property to packages
added in xbps 0.60
2025-06-22 07:02:20 -04:00
classabbyamp
479bef3b2f common: define meta-packages with metapackage=yes
Overloading `build_style` for meta-packages has always felt very hacky,
and it prevents having the main package be a meta-package (with non-meta
subpackages) and using a `build_style` at the same time (example of
trying to hack around that: 62c0c08e18).
It also can create confusion about how subpackages work if you can
define a `build_style` there (but only `meta`).

This makes using `build_style=meta` an error at the package and subpackage
level, and replaces it with a new variable (`metapackage=yes`).

A pkglint for non-empty meta-packages is also added.
2025-06-12 20:15:05 -04:00
Đoàn Trần Công Danh
3cbe04c9bf xbps-src: avoid double slash on DESTDIR 2025-06-09 13:35:13 +07:00
classabbyamp
3344a31c41 common/hooks/pre-pkg/04-generate-runtime-deps: use 3rd shlibs field
to skip shlibs that should be different on different archs
for this to work, the specially-handled arch must be before the generic
one, for example:

    libc.so musl1.1-1.1.24_1 armv7l-musl
    libc.so musl-1.2.5_1
2025-05-25 12:16:28 -04:00
Đoàn Trần Công Danh
b4ab931668 hooks/pkglint: forbid Debianised zsh path
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934926
2025-05-14 15:05:35 +07:00
classabbyamp
e2b6a24357 common/hooks/pre-pkg/04-generate-provides: make cmd: alt provides a pkgver 2025-05-08 14:14:01 -04:00
classabbyamp
8a5d2272b1 common/hooks/pre-pkg/04-generate-provides: simplify cmd: provides generation 2025-05-08 14:14:01 -04:00
classabbyamp
5e44650ebd common/hooks/pre-pkg/04-generate-provides: use xbps version instead of pc version
this might be a little wrong sometimes, but xbps will choke if it's not
a proper pkgver and the pc version isn't always useful
2025-05-08 14:14:01 -04:00
Daniel Martinez
c5a5aac026 xbps-src: add option to use distfiles mirror as a fallback
This adds an optional configuration to add a fallback distfiles mirror

The idea is that normally, distfiles should be fetched from the urls in
the template. However, occasionally the urls have rotted, or are simply
down temporairily, in which case the fetch will fail. A workaround to
this has been to use the $XBPS_DISTFILES_MIRROR option, however the
downside to this is that it is always tried first, and 99% of the time isn't
needed.

This adds the $XBPS_DISTFILES_FALLBACK option, which can be set to an
addiontional list of mirrors which will be attempted after both
$XBPS_DISTFILES_MIRROR, and the urls in the template have failed to
fetch the distfiles

Co-authored-by: oreo639 <oreo6391@gmail.com>
2025-04-14 19:37:52 -07:00
oreo639
59d2b25087 hooks/pre-pkg/03-rewrite-python-shebang.sh: rewrite plain python shebang
Shebangs containing #!python are ignored currently, which causes a problem
since newer versions of python3-setuptools generate this, so replace them with
the proper shebang when encountered.

https://github.com/pypa/setuptools/issues/4863
2025-04-01 09:49:29 -07:00
classabbyamp
a870a1c95d common/hooks/pre-pkg/04-generate-provides: generate cmd: provides
for executables in /usr/bin and alternatives
2025-02-17 15:27:35 -05:00
classabbyamp
3e3880d7de common/hooks/pre-pkg/04-generate-provides: add pc: provides for pkgconfig 2025-02-17 15:27:35 -05:00
classabbyamp
c1122b219a common/hooks/pre-pkg/04-generate-provides: reorganise
use only one mapfile to make things neater
2025-02-17 15:27:35 -05:00
Đoàn Trần Công Danh
ee2368a0e5 hooks/gen-provides: Correctly uses builtin provides and mapfile
- `read -r -a' somehow doesn't work with newline, but we don't need to
  invoke a builtin for that, we can just simply assign to the variable
- In `mapfile', `-t' is used for removing newline, not for target. The
  targeting array need to be specified last in the array.

Close #53532
2024-12-19 21:28:47 +07:00
John
b9289ef4d6 common/hooks/pre-pkg/06-verify-python-deps: check for noverifypydeps 2024-12-17 09:47:29 -05:00
classabbyamp
ada7d18ca5 common/hooks/pre-pkg/06-verify-python-deps: add hook
compares rdeps and Python module metadata to find missing dependencies
for python packages. this uses virtual packages to map python canonical
package names to void packages.
2024-12-14 07:44:02 -05:00
classabbyamp
232221efaf common/hooks: use file for managing provides
python packages use this to automatically generate provides for each
module installed by the package.
2024-12-14 07:44:02 -05:00
classabbyamp
e0db3343fe common/hooks/post-install/04-create-xbps-metadata-scripts: handle ...
python bootstrap

several bootstrap python3 modules put packages in ${py3_sitelib}-bootstrap to
prevent conflicts and keep them out of the normal PYTHONPATH. this allows the
pycompile_module hook to work for those modules
2024-12-14 07:44:02 -05:00
Andrew J. Hesford
53d581e2a4 python3: update to 3.13.1. 2024-12-14 07:41:09 -05:00
classabbyamp
46306a0f73
common/hooks: fix pkg generation for 32bit and dbg pkgs
17efb6163a had a couple mistakes that were causing issues with the
generated dependencies for -32bit and -dbg packages because they are
~extra special~
2024-12-12 22:12:48 -05:00
classabbyamp
17efb6163a common: move handling of rdeps, shlib-provides, shlib-requires files
to XBPS_STATEDIR. There's no need for them to pollute PKGDESTDIR. Keep
INSTALL.msg/REMOVE.msg handling as-is for now because it's a little more
complex. Keep the pkglints for these files because xbps still ignores
them.
2024-12-10 08:31:36 -05:00
Daniel Martinez
c71768affd xbps-src: llvm-config wrapper 2024-11-23 14:35:23 -05:00
Đoàn Trần Công Danh
01be5f0666 hooks/qt-private-api: fix for qt6-3d 2024-11-21 06:00:11 +07:00
Đoàn Trần Công Danh
4fb1dd4a21 hooks/post-install: check for -private-devel if PRIVATE_API is used 2024-07-06 05:25:23 +07:00
classabbyamp
f368375437 common/hooks/post-install: support new binfmts hook style 2024-06-17 16:13:32 -04:00
classabbyamp
afea603940 common/hooks/pre-pkg/04-generate-runtime-deps: support SONAME as path
neovim looks for a SONAME that is a whole path

find: warning: ‘-name’ matches against basenames only, but the given pattern
  contains a directory separator (‘/’), thus the expression will evaluate to
  false all the time.  Did you mean ‘-wholename’?
    SONAME: /usr/lib/lua/5.1/lpeg.so <-> lua51-lpeg>=1.1.0_2
2024-05-21 18:23:18 -04:00
classabbyamp
58705ffcbf common: support disabling python shebang rewriting
useful if there are special python-containing shebangs that should not
be rewritten, for example with Ghidra's embedded jython.
2024-04-23 23:51:01 -04:00
Đoàn Trần Công Danh
3571de8a06 apr: update to 1.7.4. 2024-03-31 06:21:20 +07:00
Andrew J. Hesford
de0e1f9846 common/hooks/pre-pkg/99-pkglint.sh: allow C.utf8 locale in glibc package 2024-03-13 06:46:09 -04:00
classabbyamp
5e9fb8708c common/hooks/pre-pkg/04-generate-runtime-deps: partially revert sorting
only sort shlib-deps, as those are automatically found.
regular dependencies should not be sorted as that can mess with the
order for things like virtual packages or alternatives groups, notably
for gawk (needs to be before anything that depends on the awk virtual
package) and dash (needs to be before bash to select the correct sh
alternatives group).

partial revert of 5ec2556004
2024-03-12 16:03:59 -04:00
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
a3c8698631 python3, python3-tkinter: update to 3.12.0
Also mark this installation as "externally managed" to prevent users
from installing system-wide packages using pip.

Closes: #43735.
2023-10-06 12:12:20 -04: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
q66
937272e967 xbps-src: abstract away non-portable stat(1)
This implements semi-portable abstractions for both GNU and BSD
flavors of stat.
2023-09-14 08:48:59 +07: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
9ee583c661 hooks/gen-rt-deps: Look for rt-deps by subpkg first, common/shlibs later 2023-08-30 13:24:12 +07: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
Đoàn Trần Công Danh
2deec738e1 do-extract: move main logic into helper function 2023-08-21 11:27:32 +07:00
Đoàn Trần Công Danh
d2d4654894 common: wrap gphoto2 config 2023-05-10 20:18:09 +07:00
OpenSauce04
f3888e3b54 xbps-src: Replace non-standard English "unexistent" with "nonexistent" 2023-04-17 12:44:48 -05:00
classabbyamp
b452017c3c common/hooks/do-extract/00-distfiles.sh: support .tar.zst and .zst
.tar.zst: bsdtar is built with support for it, so this shouldn't cause issues
.zst: zstd isn't in base-chroot, so it will need to be specified explicitly
2023-03-06 23:45:51 -05:00
Đoàn Trần Công Danh
e64f6c2c46 hooks/do-extract: fix for extract distfiles to single file
We missed the case that distfiles was extracted to a single file.
Instead of changing the second leg, we can simply remove the third leg
because renaming the empty $extractdir to $wrksrc is the same of create
new empty $wrksrc
2023-02-27 13:45:29 +07:00
Đoàn Trần Công Danh
9371fe8339 do-extract: don't add layer for Macintosh and php metadata
Some softwares insisted on have some manifest in top-level directory,
like package.xml for php packages. Some other packages was zipped on
macOS, which will insert some macOS metadata files into zoom.

See-also: dc73556cf3 and its parents.
See-also: 94fe74e506

Those files doesn't justify the need of adding a layer automatically
in extraction step.

Let's move them up.
2023-02-25 10:48:06 +07:00
Đoàn Trần Công Danh
c57c2b8a90 do-extract: change cwd to $extractdir to check number of files
In order to simplify the next change, to simplify the processing steps
for PHP and/or Macintosh metadata.
2023-02-25 10:48:06 +07:00
Đoàn Trần Công Danh
90860e279e do-fetch: remove support for rpm contents checksum
It doesn't make sense to support contents checksum here.
2023-01-25 07:43:44 +07:00
Đoàn Trần Công Danh
2111dfa815 gen-runtime-deps: verify rdeps for shlib_requires too
While we're at it, mark one more variables as local
2022-11-30 23:22:16 +07:00
Đoàn Trần Công Danh
1b2519f765 do-extract: extract rpm with bsdtar, too 2022-11-30 23:20:04 +07:00