Commit Graph

481 Commits

Author SHA1 Message Date
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
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
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