Commit Graph

467 Commits

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