Commit graph

91 commits

Author SHA1 Message Date
Đ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
091ab0b612 base-files: ship bin and lib symlinks 2019-12-14 14:01:42 +01: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
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
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
26d73d5ede 05-prepare-32bit.sh: remove dirname usage 2019-04-14 06:22:09 -03:00
maxice8
a105e6b887 hooks/pre-pkg/05-prepare-32bit: handle files with spaces 2019-04-06 11:19:52 -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
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
9251941c99 hooks/pre-pkg: prohibit /usr/doc, mention /usr/share/doc 2018-12-20 16:33:35 -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
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
Michael Gehring
7186589618 common/hooks/pre-pkg/04-generate-runtime-deps.sh: remove unused variable 2018-08-20 12:03:31 -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
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
Enno Boland
571e42ffce 03-rewrite-python-shebang.sh: don't rewrite versioned python scripts (#6155)
fixes #6151.
2017-04-17 08:49:06 +02:00
Alessio Sergi
29c37543cf xbps-src: introduce python_version 2016-11-17 17:42:54 +01:00
Alessio Sergi
8cb79d7a30 python-setuptools: update to 28.8.0 2016-11-10 10:06:26 +01:00
Alessio Sergi
d77d6cde40 xbps-src: limit the search to the /usr/lib/pythonX.Y directory 2016-10-27 15:22:54 +02:00
Alessio Sergi
b6bc28251b hooks/rewrite-python-shebang: s/pycompile_version/pyver/ 2016-10-24 10:18:49 +02:00
Alessio Sergi
5a231f8c13 hooks/rewrite-python-shebang: bin-only scripts support 2016-10-24 08:09:54 +02:00
Alessio Sergi
4e6576e7a4 xbps-src: add support for python3 pkgs
- python_module build style now builds modules for python2/3 by default
- new python2_module and python3_module build styles for building
  python2-only and python3-only packages respectively
- no more python_versions
- no need to define pycompile_version for Python modules anymore
  (still needed for non-Python modules though)
- Python version and paths are now guessed automatically and a set of
  useful variables can now be used in templates
- #!/usr/bin/python2 and #!/usr/bin/python3 are now the default shebangs
- /usr/bin/foo2 and /usr/bin/foo3 are now the default names for bin
  scripts (for use with alternatives)
2016-10-16 16:59:31 +02:00
Juan RP
d2bac19750 xbps-src: re-introduce etc/virtual.
The `etc/virtual` file declares the default package to be built for
virtual dependencies declared as "virtual?foo" in $depends.

Before this change, the run-time dependency was added as is to the final
binary package but no pkg providing this virtual pkg was built.

With this file we declare the *default* pkg to be built.

NOTE: "virtual?foo" is only applicable to *run* time dependencies, i.e
only those declared in $depends.
2016-04-27 20:16:59 +02:00
Juan RP
054a73caf2 hooks/rewrite-python-shebang: simplify and check for unset $off correctly. 2016-04-17 17:13:06 +02:00
Enno Boland
c07e381f94 hooks/pre-pkg: fix "integer expression expected" error. 2016-04-01 08:08:52 +02:00
Enno Boland
05b15f6f4f common/hooks: look for pycompile_version to identify python version.
Also prepary python 3.5
2016-03-27 15:14:02 +02:00
Enno Boland
6606995831 common/hooks: fix python shebang rewrite for multi-versioned packages 2016-03-27 12:25:27 +02:00
Christian Neukirchen
a3a0303673 common/hooks/pre-pkg/05-prepare-32bit.sh: create needed subdirectories for lib32symlinks. 2016-03-07 18:42:34 +01:00
Enno Boland
b5e49c48e7 common: replace XBPS_COMMIT_TIMESTAMP by SOURCE_DATE_EPOCH
This way we are compatible to the Debians proposal. See [1].

[1] https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02210.html
2016-03-01 18:27:49 +01:00
Enno Boland
3c04642877 environment/build: overwrite __DATE__, __TIME__, and __TIMESTAMP__ macros.
This commit overwrites timestamps that depend on timestamps with the
commit date of a package.
2016-03-01 15:33:09 +01:00
Enno Boland
3b8c53d702 hooks/pre-pkg: do not dereference symbolic links while rewriting mtimes. 2016-02-23 08:25:29 +01:00