Commit Graph

494 Commits

Author SHA1 Message Date
Đ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 
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 
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: .
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
Andrew J. Hesford 7436cebdd5 pre-pkg/04-generate-runtime-deps.sh: avoid conflict with `broken` template var
Using a non-local `broken` variable in the hook

    common/hooks/prepkg/04-generate-runtime-deps.sh

will cause a spurious shlib error when building templates marked broken
are built with `xbps-src -b`. Declaring the variable local is
sufficient, but let's make the name a bit more distinctive anyway.
2022-11-30 11:15:57 -05:00
Michal Vasilek 0eddd66177 hooks/99-pkglint.sh: error when pkg ships gschemas.compiled
gschemas.compiled is generated by glib-compile-schemas and should not be
overriden by a package
2022-11-22 22:51:04 +01:00
Đoàn Trần Công Danh 22054be835 pkglint: forbid /usr/lib/libexec 2022-11-22 09:05:10 +07:00
classabbyamp c18090b458 common/hooks/do-extract/00-distfiles.sh: support deb files
Co-authored-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2022-11-18 23:47:23 -05:00
Đ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