Commit graph

436 commits

Author SHA1 Message Date
Đoàn Trần Công Danh
7c8ab37d36 pkglint: forbid files generated by mimedb trigger 2020-04-11 21:19:42 -04:00
Juan RP
7fe90df2b1
xbps-src: don't set a default for XBPS_PKG_COMPTYPE.
Use xbps-create(1) defaults:

 - xbps<0.59 defaults to xz
 - xbps>=0.59 defaults to zstd
2020-03-03 10:26:12 +01:00
q66
1fdd919d3b 02-script-wrapper: preserve original timestamps of wrapper scripts
At least since 0.53, the meson buildsystem checks whether the
"date" command's file is outdated and if it is, it'll trigger
regeneration of the build files.

Since the wrappers are reinstalled from scratch on every build step,
this would result in meson being re-run on each of those steps.
Which resulted in broken builds in some projects (e.g. efl) since
our meson build-style by default uses LTO and that requires the AR
environment variable being exported in a specific way, which was
only being done for the do_configure step but not build/install,
which resulted in meson being run with one env for configure and
another env for build, which broke everything.
2020-03-02 00:58:35 +01:00
Piotr Wójcik
e06efd6bbb hooks/do-extract: refrain from extracting text files outside wrksrc 2020-02-19 19:02:01 +01:00
Piotr Wójcik
9e585603d6 hooks/do-extract: treat *.sh files as text files 2020-02-19 19:02:01 +01:00
innerspacepilot
0c523c2240 add support for .xz compressed files 2020-02-12 08:36:14 +01:00
Piotr Wójcik
588e8cdb7b common: retry ftp download during CI 2020-02-11 23:05:31 +01:00
Jürgen Buchmüller
a32b6efd23 02-script-wrapper: add wrappers for ap{r,u}-1-config 2020-01-31 20:28:15 +01:00
mobinmob
d224b06d8e 00-distfiles.sh: allow bsdtar for zip and 7z archives 2020-01-24 14:53:41 +01:00
q66
2b7fb8124c 00-distfiles.sh: allow bsdtar for ruby gems 2020-01-11 18:52:20 +01:00
Jürgen Buchmüller
834a0a397f 00-distfiles.sh: fix bsdtar contents checksum (@)
Closes: #18070
2020-01-06 15:15:50 +01:00
Juan RP
d547e90018 hooks/do-extract: 00-distfiles.sh: disable trap on ERR. 2020-01-05 10:44:56 +01:00
Juan RP
d15b1f6746 hooks: 00-distfiles.sh: detect bsdtar and then tar (GNU).
This way xbps-src is able to work with any of them.
2020-01-05 10:44:56 +01:00
Juan RP
75eca1b03e xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.

- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
  xbps-src now simply populates `rootdir/etc/xbps.d` with correct
  settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
  entering to the chroot (if CHROOT_READY is set), xbps-src will
  clean up the masterdir and then perform a system update to always
  use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
  - base-chroot-musl is gone, now unified for glibc/musl.
  - deps removed: gettext, mpfr, readline, texinfo, which, xz.
  - deps changed: tar -> bsdtar.

Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.

I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-05 10:44:56 +01:00
Đoàn Trần Công Danh
f130fb058a hook: python-shebang: check for shebang in the first line only
- Grepping whole files is inefficient
- git-instaweb (in git package) has the code to generate python file in
  a here doc in the middle of its code, old hook generates false
  positive with this package
2019-12-28 18:02:39 +01:00
Juan RP
3a08e3d1b6
xbps-src: new pre-pkg hook that prints collected rdeps. 2019-12-15 18:55:58 +01:00
Cameron Nemo
23ff926700 base-files: install /usr/lib32 symlink on i686 2019-12-15 09:17:51 +01:00
Cameron Nemo
091ab0b612 base-files: ship bin and lib symlinks 2019-12-14 14:01:42 +01:00
Piotr Wójcik
0139bdb524 04-create-xbps-medatada-scripts.sh: autogenerate pycompile_modules 2019-12-06 20:23:37 +01:00
Piotr Wójcik
eb3405a5ed hooks/generate-gitrevs: update summary 2019-11-23 09:33:32 +01:00
q66
80b96a0ea0 common: better location for config.{sub,guess} + update 2019-11-18 20:36:27 +01:00
John
e351f6b462 hooks/post-install/03-remove-empty-dirs.sh: use find -delete instead of rmdir -p
rmdir -p could end up deleting even /destdir when a empty package would
not have any subpackages with a i686 masterdir.
2019-10-22 16:58:09 +02:00
John
a93c02d3cc hooks/post-install: do remove lib32 symlink before checking for empty dirs
this resulted in empty i686 packages never getting flagged as empty
since the /usr/lib32 -> lib symlink was only removed after the check
2019-10-22 16:58:09 +02:00
Juan RP
e4984d01ea xbps-src: multiple performance improvements
- use xbps-checkvers(1) to resolve dependencies.
- all dependencies are installed at once for the host and target.
- the show-build-deps target is now much faster.
- the update-bulk/show-repo-updates targets are now much faster.
- the update-sys/show-sys-updates targets are now much faster.
- the bootstrap target now works on musl hosts.
- simplified some loops.
- use cut(1) rather than awk(1) where applicable.
- multiple random changes to improve performance.

Based on work started by @Duncaen on #12433

Close #12433
Close #11282
2019-07-10 20:28:46 +02:00
Jürgen Buchmüller
17ba00b095 Revert "xbps-src: multiple performance improvements."
This reverts commit 2a4e178e35.
2019-07-05 12:08:45 +02:00
Juan RP
2a4e178e35 xbps-src: multiple performance improvements.
- use xbps-checkvers(1) to resolve dependencies.
- all dependencies are installed at once for the host and target.
- the `show-build-deps` target is now much faster.
- the `update-bulk/show-repo-updates` targets are now much faster.
- the `update-sys/show-sys-updates` targets are now much faster.
- the `bootstrap` target now works on musl hosts.
- simplified some loops.
- use cut(1) rather than awk(1) where applicable.
- multiple random changes to improve performance.

Based on work started by @Duncaen on https://github.com/void-linux/void-packages/pull/12433

Close https://github.com/void-linux/void-packages/pull/12433
Close https://github.com/void-linux/void-packages/pull/11282
2019-07-05 08:53:51 +02:00
Cameron Nemo
206a4a73f5 99-pkglint.sh: prevent installing files in /destdir
Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
2019-06-23 17:17:22 +02:00
Juan RP
248e301ff7 hooks/00-gen-pkg: use xbps-create(1) --changelog if set on template.
Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-20 19:52:52 +02:00
Juan RP
7b7d7c13a1
xbps-src: exit properly if mktemp(1) fails, not from its subshell.
Thanks @huglovefan
2019-06-17 17:38:07 +02:00
Juan RP
f59b295903 xbps-src: cleaned up usage of mktemp(1).
This one was on my TODO for a long while... fixes unportable
arguments (checked with the NetBSD's manual page).
2019-06-17 15:23:20 +02:00
Jürgen Buchmüller
998aac300a
hooks/pre-pkg/05-prepare-32bit.sh: fix symlinks
If lib32symlinks contains plain library names without a path as in
the case of glibc (lib32symlinks="ld-linux.so.2") the expression
${f%/*} is not empty, but returns the basename.
Handle that case by verifying that ${f%/*} is different from ${f}.

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-05-28 15:14:23 +02:00
John
0108c2a60e common/02-script-wrapper.sh: add generic_wrapper2 gdal-config 2019-05-12 20:21:26 +02:00
Jürgen Buchmüller
f7107d38eb cross gir: hook to fix wrong cross install path
When cross building the gir files (*.gir, *.typelib) are installed
at ${DESTDIR}/usr/${XBPS_CROROSS_TRIPLET}/usr/* while they need to
be at ${DESTDIR}/usr/*
This hook is a temporary workaround until we can fix the cross gir
install to not insert the (as it seems) host's ${DESTDIR} into the
target's destination path.

Remove the temporary hack in polkit which is now handled by the hook.
2019-04-28 14:37:40 +02:00
maxice8
3d372ddc32 02-script-wrapper.sh: avoid useless use of echo
Co-authored-by: duncaen <duncaen@voidlinux.org>
2019-04-15 12:18:00 -03:00
maxice8
23216853d6 00-patches.sh: avoid useless use of cat 2019-04-15 12:18:00 -03:00
maxice8
53c60b31ae 05-preapre-32bit.sh: avoid useless use of cat 2019-04-15 12:18:00 -03:00
maxice8
68733fc673 99-pkglint.sh: avoid useless use of cat 2019-04-15 12:18:00 -03:00
maxice8
509f522dac 06-shlib-provides.sh: avoid useless use of cat 2019-04-15 12:18:00 -03:00
maxice8
f5c0feedf6 00-distfiles: avoid useless use of cat 2019-04-15 12:18:00 -03:00
maxice8
81da3e618c 06-strip-and-debug-pkgs.sh: replace grep -q with [[ ]] 2019-04-14 12:46:51 -03:00
maxice8
cdb6bf6e94 00-compress-info-files.sh: replace echo | grep with [[ ]] 2019-04-14 09:02:28 -03:00
maxice8
49193d73d9 00-patches.sh: replace echo | grep with [[ ]] 2019-04-14 07:45:09 -03:00
maxice8
13b5d09803 04-create-xbps-metadata-scripts.sh: replace echo | grep with [[ ]] 2019-04-14 07:45:09 -03:00
maxice8
a00d546dce 06-strip-and-debug-pkgs.sh: replace echo | grep with [[ ]] 2019-04-14 07:45:09 -03:00
maxice8
26d73d5ede 05-prepare-32bit.sh: remove dirname usage 2019-04-14 06:22:09 -03:00
maxice8
5b26fde9c0 06-strip-and-debug-pkgs.sh: remove dirname usage 2019-04-14 06:22:09 -03:00
maxice8
974f2805f2 00-compress-info-files.sh: remove dirname usage 2019-04-14 06:22:09 -03:00
Juan RP
1ee6a3174f xbps-src: reduce basename(1) usage.
This saves a few exec()s.
2019-04-14 01:47:16 -03:00
maxice8
a105e6b887 hooks/pre-pkg/05-prepare-32bit: handle files with spaces 2019-04-06 11:19:52 -03:00
maxice8
8956ff14f7
meta: forcefully gunzip and bunzip2 .gz and .bz2 files.
Otherwise it gets stuck with a confirmation prompt.
2019-03-03 19:34:54 -03:00
maxice8
34fe9c410f meta: move 00-patches.sh hook to do-patch phase 2019-02-27 22:56:19 -03:00
maxice8
4dddab21e9 meta: add hook directories for patch phase 2019-02-27 22:56:19 -03:00
John
f27e41dda7 common/hooks/pre-pkg/generate-runtime-deps: fix usage of skiprdeps in subpackages 2019-02-16 17:53:37 +01:00
Enno Boland
6eb37e35b2 common: merge only_for_archs and noarch=yes into one.
* noarch=yes is replaced with archs=noarch
* only_for_archs= is renamed to archs=
* archs= allows the use of wildcards and negations; first matching rule applies:
  * archs="*-musl" will build the pkg only for musl-libcs
  * archs="~*-musl" will build the pkg only on non-musl-libc
  * archs="x86_64-musl ~*-musl" will build for x86_64-musl and any non-musl
    arch.
* archs= defaults to "*"
2019-02-15 13:19:44 +01:00
maxice8
f90418ca33
hooks/99-pkglint-subpkgs.sh: match name until end of line 2019-02-09 02:19:56 -02:00
maxice8
f638b4e04f xbps-src: add valac wrapper
Projects like zeitgeist and gtksourceview4 need it
2019-02-06 20:13:27 -02:00
maxice8
fbb17f5cda
xbps-src: make vapigen_wrapper install vapigen-0.42 2019-02-05 23:19:27 -02:00
maxice8
1c1490217a xbps-src: Add wrapper for vapigen on cross 2019-02-05 19:43:56 -02:00
maxice8
ab96ff356e
xbps-src/hooks: most 05-rename-python3-c-bindings to post-install 2019-02-02 14:40:05 -02:00
maxice8
ff196d112f
05-rename-python3-c-bindings.sh: fix 2019-01-31 15:20:03 -02:00
maxice8
1a0ce0e066 hooks/pre-pkg/05-rename-python3-c-bindings.sh: introduce 2019-01-31 15:08:13 -02:00
maxice8
f6c595619c hooks/pre-pkg/99-pkglint-subpkgs.sh: fix case where grep doesn't match 2019-01-29 23:14:59 -02:00
maxice8
c5d40ba078 hooks/pre-pkg: add pkglint-subpkgs hook 2019-01-27 10:20:32 +01:00
maxice8
07c2dc7131 hooks/do-fetch/00-distfiles.sh: use fetch_cmd instead of XBPS_FETCH_CMD 2019-01-21 16:17:02 -02:00
maxice8
75e535d257 hooks/11-pkglint-elf-in-usrshare: make use of bashisms to fix stuff.
using for-loop causes the loop to hang at filenames with -.

Use while read instead with bash process substitution so it avoids the
subshell problem.
2019-01-10 00:44:44 -02:00
maxice8
c06512eac9 hooks: Add hook to check for ELF files in /usr/share 2019-01-09 17:01:13 -02:00
Piotr Wójcik
27d9e7ffea hooks/uncompress-manpages: prevent hang
In case when file to be uncompressed existed, decompressors asked
whether to overwrite it.
As output is muted, building hung silently waiting for input.
2019-01-05 08:12:55 -02:00
maxice8
9251941c99 hooks/pre-pkg: prohibit /usr/doc, mention /usr/share/doc 2018-12-20 16:33:35 -02:00
maxice8
3f5059ae50
hooks/post-install: fix find for executable files, use GNU -executable 2018-12-13 10:14:44 -02:00
maxice8
80c5550ce4
hooks/post-install: fix message and indentation on pkglint-devel-paths. 2018-12-12 23:08:56 -02:00
maxice8
de31bf8d1f hooks/post-install: Add hook to warn when paths for -devel packages
should be added.

This hooks checks installed files of all packages that do not end
in -devel and warn when certain paths are found that should be in
the -devel package like:

- /usr/include
- /usr/lib/*.so
- /usr/lib/*.a
- /usr/[lib|share]/[pkg-config|cmake]
- /usr/share/vala
- /usr/share/gir-1.0
2018-12-12 23:07:05 -02:00
maxice8
7bd2eaea34 hooks/pre-pkg: deal with packages that install to /etc but should use
/usr/lib

some packages install stuff to places like /etc/udev/rules.d and
/etc/modprobe.d.

That is wrong, they should use their equivalents in /usr/lib.
2018-12-10 20:16:25 -02:00
maxice8
d1a14f90be hooks/pre-pkg: deal with packages using /etc/bash_completion.d
Detect when it is used and suggest
/usr/share/bash-completion/completions instead.
2018-12-07 12:30:20 +01:00
Cameron Nemo
61065bcb1f hooks/pre-pkg: safely pass arguments to printf 2018-11-18 20:30:04 +01:00
Rasmus Thomsen
a8f008f21c hook/do-extract: support extracting .crate files 2018-11-02 08:59:03 -03:00
maxice8
c6c249348d hooks/do-extract: support extracting .gem files with gem unpack. 2018-10-27 09:25:31 -03:00
Toyam Cox
1edc8846ca xbps-src: Migrate from build_style for 32bit pkgs
This allows dxpb to have a simpler test for whether or not a 32bit
package will be built.
2018-10-04 10:28:27 +02:00
Helmut Pozimski
ee4e6ad061 02-script-wrapper.sh: add wx-config-gtk3 for the generic_wrapper 2018-09-10 14:43:09 +02:00
Enno Boland
50e86ef640 common/libexec/build.sh: register all packages at once to prevent inconistent staging 2018-09-07 11:19:55 +02:00
maxice8
59b5fdf36f
04-create-xbps-metadata-scripts.sh: automatically add triggers for
appstream-cache

[ci skip]
2018-08-27 18:26:11 -03:00
maxice8
88f96346d4
hooks/post-install/04-create-xbps-medata-scripts.sh: automatically
handle gtk-pixbuf-loaders
2018-08-23 17:16:47 -03:00
newbluemoon
05fb5e4ad7 common/hooks/pre-configure: fix python3 wrapper [skip ci] (#1005) 2018-08-21 19:33:52 +02:00
maxice8
5c28f42b50
04-create-xbps-medatada-scripts.sh: fix indentation. 2018-08-20 22:25:11 -03:00
Michael Gehring
7186589618 common/hooks/pre-pkg/04-generate-runtime-deps.sh: remove unused variable 2018-08-20 12:03:31 -03:00
maxice8
2a37c4734c
hooks/post-install/04-create-xbps-medata-scripts.sh: automatically
handle gtk{,3}-immodules
2018-08-19 06:01:47 -03:00
Alessio Sergi
0c06da09e4 Revert "common/hooks: add hook to check python dependencies"
This reverts commit 3b1f5272b9.
2018-06-05 16:17:27 +02:00
Enno Boland
3b1f5272b9 common/hooks: add hook to check python dependencies 2018-06-05 09:22:30 +02:00
Duncaen
94ed33657b Revert "common/: add support for changelog field."
This reverts commit 8599efd9fd.
2018-05-04 16:46:46 +02:00
maxice8
8599efd9fd common/: add support for changelog field.
This commits allows ./xbps-src show to show the changelog field and for
changelog to be included with the -c/--changelog option via xbps-create.

Closes: #14102 [via git-merge-pr]
2018-05-03 22:58:27 -04:00
Enno Boland
3d8549991b
common/hooks: fix support for application/x-pie-executable 2018-04-16 21:37:48 +02:00
Leah Neukirchen
d30a239d41 common/hooks: support application/x-pie-executable (from file 5.33). 2018-04-16 14:37:49 +02:00
Jürgen Buchmüller
f274d7728c
04-generate-runtime-deps.sh: introduce skiprdeps
Yet another variable to permit skipping of runtime dependency checks
for a list of files, specifying their absolute path in the $DESTDIR,
allows us to handle known bad detections due to e.g. binaries or
shared libraries not meant to be run or loaded in the host.

This will be used to fix the android-studio template to skip
a number of files which would create a bogus dependency on libc.so.

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-04-10 17:54:13 +02:00
Michael Gehring
b9e321456b xbps-src: make -dbg packages depend on the pkgver they are generated from
Closes: #12161 [via git-merge-pr]
2018-03-05 19:50:05 -08:00
Jürgen Buchmüller
c1fd6c389e hooks/do-fetch/00-distfiles.sh: contents checksum
Add support for contents checksums. This is meant to be used for tarballs
like the ones coming from https://*.googlesource.com/ which on every download
change their outer checksum due to being packaged with different date/time
stamps or similar.

If such a distfile still contains the same files as the author of a template
found, then the checksum of its contents can be specified by prepending a
commercial at (@) to the corresponding checksum="..." line.

Depending on the format of the distfile its entire contents will then be
piped into sha256sum and the resulting digest is verified against what
follows after the @.
2018-03-02 23:28:36 +01:00
Jürgen Buchmüller
7c53259f00 create-xbps-metadata-scripts: indent with tabs 2018-01-15 14:32:42 +01:00
James Barnett
90b5c612ae Add hook and trigger to handle hwdb.d files
Adds a hook to check if /usr/lib/udev/hwdb.d is being modified. If so,
triggers 'udevadm hwdb --root=. --update'.

Closes: #9858 [via git-merge-pr]
2018-01-15 14:31:12 +01:00
newbluemoon
e8842e10d7 wxWidgets: fix cross compilation
xbps-src: add wx-config to 02-script-wrapper.sh
2017-12-16 01:48:46 +01:00
Andrea Brancaleoni
cb72dfc4cd wine: nopie_files 2017-11-29 19:28:02 +01:00
Enno Boland
c72e969742 add hook-directories for check phase 2017-11-18 14:32:37 +01:00
Michael Gehring
85b7e8335a hooks/post-extract/00-patches.sh: ignore files without patch/diff suffix 2017-09-26 11:02:37 +00:00