Commit Graph

549 Commits

Author SHA1 Message Date
mhmdanas 0fa47e5979 common: use HTTPS where working. 2023-03-07 07:44:23 +07:00
Piotr Wójcik 1b9578b20c xbps-src: explicitly disallow pattern on build deps
It is not possible to use version other than currently in template.

Specifying pattern breaks build if dependency isn't in binary repo
already. That it worked when in repo was a coincidence.

Let's detect exact version requirement with regex equivalent to
`xbps-uhelper getpkgname`.

    bash-5.1$ for x in a-{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}; do [[ $x = *[\>\<]* || $x =~ -[^-_]*[0-9][^-_]*_[0-9_]+$ ]]; bash=$?; xbps-uhelper getpkgname $x > /dev/null 2> /dev/null; xbps=$?; if [ $bash != $xbps ]; then echo $x; fi; done
    bash-5.1$

Co-authored-by: Duncaen <duncaen@voidlinux.org>
2023-02-13 20:09:29 -05:00
zlice 12e6985c34 common: cleanup trailing whitespaces 2023-02-07 03:26:02 -05:00
classabbyamp 88df0eba0f common/xbps-src/shutils/: add bootstrap repo 2023-02-03 20:32:46 -06:00
Leah Neukirchen b4f4c4cbdb common/xbps-src/shutils/chroot.sh: pass arguments to xbps-shell
Some software reads the shell from /etc/passwd and expects it to
implement standard flags like -c etc.
2023-01-24 18:07:16 +01:00
Gonzalo Tornaría 1d4a9d6c71 xbps-src: keep http_proxy and other lowercase proxy variables 2023-01-04 22:24:13 +07:00
classabbyamp a13c842291 xbps-src: default XBPS_MAKEJOBS to `nproc`
previously this defaulted to 1. In some rare cases, nproc is not
desirable, but that can be easily overriden in the standard ways,
etc/conf or -jN.

For compatibility with other distros, it defaults to 1 when nproc
is not available.
2022-12-22 21:15:24 -05:00
classabbyamp 7c8f15bf1b common/xbps-src/shutils/show.sh: make show display consistent
previously, if there was a newline in some variables, it would not format
properly in `xbps-src show`. This fixes it by always splitting it by word
in some cases, like if there is a new line in the variable's value, and
removing internal commas in some cases.

This logic was split into a function for consistency.

fixes #40996

Example:
```
$ ./xbps-src show keepassxc
pkgname:	keepassxc
...
License(s):	GPL-3.0-or-later
License(s):	BSD-3-Clause
License(s):	CC0-1.0
License(s):	LGPL-2.0-only
License(s):	LGPL-2.1-only
License(s):	LGPL-3.0-or-later
License(s):	Nokia-Qt-exception-1.1
License(s):	MIT
License(s):	BSL-1.0
```
2022-12-18 19:27:01 -05:00
icp 5f0e7218eb common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht
Accommodate for tarballs in refs named after commit hash.
2022-12-04 21:37:30 -05:00
classabbyamp e409ea0c81 common/xbps-src/shutils/update_check.sh: ignore pkgs without distfiles
unless they use the update override file
2022-11-27 21:22:48 -05:00
Đoàn Trần Công Danh 8c5358f792 xbps-src: set wrksrc to $pkgname-$version unconditionally 2022-11-08 22:30:37 +07:00
Michal Vasilek fe352426bd xbps-src: don't use deprecated egrep
grep 3.8 now prints a warning that egrep is deprecated and we should use
grep -E instead
2022-10-22 15:33:42 +02:00
Heinrich Kruger 7c3f5a15b9
xbps-src: use unique names for bulk update commands
A regression introduced in 4c43245e0b is causing the 'xbps-src update-sys'
command to skip the final step of installing the updated packages.

This happens because the `cmd` variable name clashes with a loop
variable used in common/environment/setup/install.sh script (line 16).
Thus the `"$cmd" == installed` comparison
(common/xbps-src/shutils/bulk.sh line 122) fails and the installation
step is skipped.

Using unique variable names in `bulk.sh` avoids this problem.

Closes: #39969 [via git-merge-pr]
2022-10-15 15:55:37 +02:00
Duncaen 4c43245e0b xbps-src: add update-local and show-local-updates 2022-09-27 19:11:47 +02:00
Đoàn Trần Công Danh c845693ffb update-check: update all gnome case to have both ftp. and download. 2022-09-06 18:51:11 +07:00
Đoàn Trần Công Danh 875b1f9806 update-check: special case for XFCE Archive 2022-09-06 18:51:11 +07:00
Duncaen cdbac60a1c
update-check: use gitlab settings for code.videolan.org 2022-08-29 23:26:04 +02:00
icp 2760187144 common/xbps-src/shutils/update_check.sh: tweak url and rx for codeberg
Accommodate for more patterns in distfile urls.
2022-08-24 14:01:31 -04:00
tibequadorian 23e9d95be6
common/xbps-src/shutils/update_check.sh: also work for subpackages
closes #36190
2022-08-07 18:37:07 -04:00
classabbyamp 5c6ae7a463 common: add disable_parallel_check 2022-06-23 23:08:03 -05:00
Piotr Wójcik fddef76fcc xbps-src/shutils/update_check.sh: change gitlab check to handle old urls 2022-05-14 15:36:27 +02:00
John 36274904cf xbps-src/shutils/update_check.sh: change gitlab check to handle subgroups
The `/-/` sequence is always between e.g. archive and the repo path,
so this should work reliably for distfiles.
If gitlab is used only as a homepage, this still wroks if homepage
points to the base repo (which it usually does)
2022-05-14 15:33:46 +02:00
Piotr Wójcik 14d0b54a06 xbps-src: add flag to build broken packages
helps to check if build can be fixed
2022-04-26 21:29:11 +02:00
Piotr Wójcik 3ad374dbe4 xbps-src: sort and deduplicate packages at update-sys 2022-04-21 18:21:07 +02:00
Michal Vasilek 1ccc884f1c xbps-src: make -E ignore remote repositories with -N 2022-04-17 19:39:03 +02:00
classabbyamp 7548d06eca shutils: introduce XBPS_ORIG_MAKEJOBS variable
Some packages couldn't work well with XBPS_MAKEJOBS,
thus we disable parallel build for those packages.

On the other hand, some packages including but not limited to openjdk
use an internal mechanism to build themselves in parallel.

Let's invent another variable for those packages.

(message by sgn)

Co-authored-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2022-02-11 20:03:30 +01:00
Piotr Wójcik 054569c364 xbps-src: correctly change working directory for post_fetch 2022-01-05 20:32:41 +01:00
Gonzalo Tornaría 7231f47b26 etc/conf: implement XBPS_MIRROR for remote repos
Setting this variable will make xbps-src use an alternative mirror for
remote repositories.

Using this variable one can change the remote repository for all
architectures in a single setting and without the need to modify
`etc/xbps.d/repos-remote*.conf`. This is much more convenient as it
allows changing remote repos without a dirty worktree.

To use just add a line like the following to `etc/conf`:

    XBPS_MIRROR=https://repo-us.voidlinux.org/current

We also disable 00-repository-main.conf for cross so we don't use the
remote repo from the xbps package.
2021-12-22 23:12:06 +01:00
Piotr Wójcik 9cdfea60ca xbps-src: improve error message on dependencies installation
Message contained one of many packages to install,
incorrectly suggesting that this is problematic one.
Remove that. List of packages is printed on previous line.
2021-10-15 19:01:15 +02:00
Piotr Wójcik 4f03807529 xbps-src: overwrite packages in local repo 2021-09-13 23:04:48 +02:00
Đoàn Trần Công Danh d8e2056a8f xbps-src: retire XBPS_PKGDESTDIR
Historically, PKGDESTDIR was only set during pkg_install, and
XBPS_PKGDESTDIR was set to indicate that we're in subpkg's
pkg_install.

However, from 0b95cb8f5d, (Merge xbps-src code to make it usable in
a standalone mode., 2014-03-22), PKGDESTDIR is always set,
regardless of states.

Let's drop all usages of XBPS_PKGDESTDIR.

While we're at it, error out of vmove is used outside of subpkg.
2021-07-11 16:21:29 +07:00
Đoàn Trần Công Danh e5626f81c7 update_check: support pkgs.fedoraproject.org 2021-06-23 19:04:03 +07:00
Đoàn Trần Công Danh fb4838a591 base-chroot: add tzdata
Some packages require tzdata to testing, however, adding `tzdata` to
those checkdepends will break masterdir, since `tzdata` provides
`/usr/share/zoneinfo/UTC`, hence, it will be removed upon cleanup.

Let's add `tzdata` into `base-chroot` and remove the shenanigan in
`chroot.sh`.
2021-06-17 07:33:49 +07:00
Đoàn Trần Công Danh cf11f9987e update-check: fix update pattern for literal dot
The dot (.) inside [] matches literal dot. I don't know how it's
working, however the update-check for some packages is broken (i.e.
anthy-unicode).

Let's remove the backslash.
2021-05-23 12:11:03 +07:00
Érico Nogueira 47dae4b67d shutils/pkgtarget: don't spam stderr with expected rm errors
Since the first `rm -rf` command is allowed/expected to fail, hide its
output. This was missed with the initial optimization in
d7bf8e06a0.
2021-05-14 16:13:51 -03:00
Érico Nogueira d7bf8e06a0 shutils/pkgtarget: speed up build dir cleanup.
We need `chmod -R` to be able to cleanup after Go packages, but it's
unnecessary in most other cases. By only running it when the first `rm
-rf` fails, we optimize for the most common case and get a tiny speedup
for this build step.
2021-05-11 20:09:09 -03:00
Piotr Wójcik aa83569fcb xbps-src: add make_check=ci-skip 2021-04-26 18:49:15 +02:00
Piotr Wójcik 490ef8c8b2 xbps-src: update-check: print out match pattern in verbose mode 2021-04-17 21:34:10 +02:00
Michael Aldridge 4f896929b9 xbps-src: remove remove-obsoletes 2021-04-16 00:02:06 -07:00
Michael Aldridge 0c9e6e56e7 common/xbps-src: Fix remove-obsoletes 2021-04-15 01:35:17 -07:00
Michael Aldridge f5e766c248 xbps-src: Add remove-obsoletes command 2021-04-14 22:45:13 -07:00
Enno Boland 6d243d7619
common/xbps-src: update-check checks new gnome upstream sites 2021-04-09 18:52:35 +02:00
Đoàn Trần Công Danh 59c67f7d6d xbps-src/update_check: update pattern for GitHub 2021-03-19 22:48:10 +07:00
Duncaen 1f6ab168de xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
  dependencies, knowing the subpackage they are coming from does
  not matter to a build scheduler as long as xbps-src requires
  those to exist in the same way to main depends= have to exist.
* Resolve virtual? packages through existing means in xbps-src to
  avoid duplicating and possibly diverting from xbps-src's
  behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
  this matches the xbps-src behaviour and there is no need to
  have to duplicate logic for this into the scheduling tool.
* Error out on archs= restrictions as we do already on broken=
  and nocross=, there shouldn't be the need to discover archs=
  restrictions when attempting to build the package.
2021-03-12 18:33:11 -05:00
Piotr Wójcik 81e0103b38 xbps-src: make update-sys operate on host
partially reverts 75eca1b03e
2021-03-10 17:19:02 +01:00
Érico Rolim 21f5e306a5 xbps-src/shutils/show: remove outdated long_desc printing. 2021-03-02 19:58:28 -03:00
Đoàn Trần Công Danh 36a3b046fb update_check/gnome: also check for 0.* version 2021-02-21 09:28:34 +07:00
Érico Rolim 2a748e7e6d xbps-src/libexec: add make_check option.
Allows a template to define in which circumstances its do_check phase
should run, without requiring custom do_check definitions in each
template (also makes it easier to change how build styles do things
without checking as many templates).

Add to Manual and CONTRIBUTING as well.
2021-02-11 02:40:09 -03:00
sternenseemann 1384e928f7 xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
Missing $XBPS_MASTERDIR/tmp caused ca-certificates and glibc-locales to
fail in the reconfigure step of binary-bootstrap, since a call to mktemp
(which I couldn't locate in source though) assumed /tmp in the chroot
would be present already.

This issue was reproducible reliably for me on NixOS by doing something
like:

    rm -rf masterdir
    ./xbps-src binary-bootstrap

The workaround I found was:

    mkdir -p masterdir/tmp      # or alternatively ./xbps-src clean
                                # which also (re-)creates masterdir/tmp
    ./xbps-src binary-bootstrap

This workaround is now mirrored in chroot_prepare by ensuring that tmp
always exists.
2021-02-11 02:07:32 -03:00
Đoàn Trần Công Danh 2ec0338af6 update_check: update GNOME pattern for GNOME 40 2021-01-28 07:18:59 +07:00