Commit Graph

1699 Commits

Author SHA1 Message Date
Celeste 250412d18c apkbuild-pypi.in: use pypi json in get_deps
the old method of calling
`python3 ./setup.py --requires`
doesn't seem to be working anymore
2024-02-02 02:51:26 +00:00
Celeste 54550dc597 apkbuild-pypi.in: use $pkgver in source
regex taken from `apkbuild-cpan.in`
2024-02-02 02:51:26 +00:00
Celeste 11c96f25d6 apkbuild-pypi.in: add -pyc subpackage to template 2024-02-02 02:51:26 +00:00
Celeste ad9324fd52 apkbuild-pypi.in: use gpep517 in template
copied from `newapkbuild.in`, should work
even without a `pyproject.toml` due to the
`setuptools.build_meta:__legacy__` backend
2024-02-02 02:51:26 +00:00
Celeste 4a55e30881 apkbuild-pypi.in: remove depends="python3" from template
it is automatically traced since 6806a0d39b
2024-02-02 02:51:26 +00:00
Celeste 157e390ffa apkbuild-pypi.in: create pretty urls in get_source 2024-02-02 02:51:26 +00:00
Timothy Legge 60c00a4d39 apkbuild-cpan.in: Remmove unnecessary/unused code
Should have been removed in:
27c430cc64
2024-02-01 22:08:23 -04:00
Timothy Legge 99cda3db69 apkbuild-cpan.in: fix uninitialized value when running with no parameters
by applying Celeste's suggested fix
2024-02-01 22:08:23 -04:00
Timothy Legge 1dd67c1beb apkbuild-cpan.in: remove unnecessary pragmas 2024-02-01 22:08:17 -04:00
Timothy Legge 9cde1ad278 apkbuild-cpan.in: Standardize the source and patches output 2024-02-01 07:35:23 -04:00
Celeste 0ad7489969 apkbuild-cpan.in: move code that queries metacpan into its own function
this piece of code was repeated in multiple places, so factor it out
2024-01-31 19:29:56 -04:00
Timothy Legge 726e37920c apkbuild-cpan.in: fix read_assignments_from_file
remove unnecessary regex in functions

Return early if not processing an APKBUILD file

and fix undefined variable of there are no patches
2024-01-30 23:05:45 -04:00
Celeste 1c017bb5d5 apkbuild-cpan.in: add newline after inserting *depends=
Upon `apkbuild-cpan upgrade`, an aport without any
checkdepends would get a line like this inserted:
`checkdepends=""subpackages="$pkgname-doc"`

which would then be deleted by the substitution
that removes empty variables, so the net result
is an APKBUILD with the subpackages field removed.

Inserting a newline results in `checkdepends=""`
being a line all by itself, which then gets
correctly removed by the empty variables regex.
2024-01-28 02:50:25 +00:00
Timothy Legge b0f60ee85a apkbuild-cpan.in: fixes #10129 move _pkgreal and comment 2024-01-27 12:10:06 -04:00
Celeste 28edb26d5b apkbuild-cpan.in: fix empty lines in recreated depends variables
this is a preliminary attempt at fixing #10126, however, i think
the whole logic around recreating depends should be reviewed and
improved, as we may want to carry over all the depends from the
old APKBUILD, and not just the non-perl libs, as the old depends
may be compensating for something not declared in the META file.
2024-01-26 22:33:02 -04:00
Celeste b48c12ea86 apkbuild-cpan.in: do not increase number of spaces in options_comment
the regex used to match options_comment in read_assignments_from_file
starts matching immediately after the closing double quote (it does
not remove the prefixing space), so without this change, a new space
is inserted by the template upon each `recreate`.
2024-01-26 21:37:18 -04:00
Celeste 6a8a61f9d8 apkbuild-cpan.in: find Build.PL using glob() in update_functions sub
this is more consistent with the method we use to
find Build.PL / Makefile.PL in the do_depends sub
2024-01-26 21:37:18 -04:00
Celeste 1c771b0d6a apkbuild-cpan.in: keep arch of old APKBUILD
also, prevent removal of `arch=""` line,
which is sometimes used for disabled aports
2024-01-26 21:37:18 -04:00
Celeste ef6aef38b1 apkbuild-cpan.in: sort & de-duplicate dependencies 2024-01-26 21:37:18 -04:00
Celeste 41a36bca95 apkbuild-cpan.in: move .pod files to the -doc subpackage
this `doc()` function is copied from main/perl/APKBUILD
2024-01-26 21:37:18 -04:00
Celeste 3336955a4a apkbuild-cpan.in: update $package_mappings 2024-01-26 21:37:18 -04:00
Celeste fe072f9866 apkbuild-cpan.in: fix empty directories
by not installing .packlist and perllocal.pod.

The call to find -delete has been removed as
the modifications to build() have covered
almost all cases, so deleting .packlist and
perllocal.pod manually is no longer necessary.

Also, increment template version from 3
to 4 to allow easy identification of
aports that have this change applied.
2024-01-26 21:37:18 -04:00
Celeste 7101d6164a apkbuild-cpan.in: also attempt to generate MYMETA from running Build.PL 2024-01-26 21:37:18 -04:00
Celeste 1753907af0 apkbuild-cpan.in: fix use of uninitialized value $1 2024-01-26 21:37:18 -04:00
Timothy Legge c704644b3c Initial attempt to keep the options and patches 2024-01-26 21:37:18 -04:00
Celeste 37e99da359 apkbuild-cpan.in: tidy up abstract before using it as pkgdesc 2024-01-26 21:37:18 -04:00
Celeste 0bb1482c3a New way of calculating builddir & metaprefix
apkbuild-cpan.in: attempt to get a metaprefix if no metafiles exist

apkbuild-cpan.in: try harder to find a metaprefix

apkbuild-cpan.in: redefine builddir if not based on $_pkgreal
2024-01-26 21:37:18 -04:00
Timothy Legge 505a64bfa7 Improve handling of missing meta files and detection of perl-dev requirment 2024-01-26 21:37:18 -04:00
Sertonix cd32e245e2 abuild: fix subpackage setting arch to all explicitly 2024-01-12 18:28:09 +01:00
Natanael Copa 84e29d94f9 ==== release 3.12.0 ==== 2023-10-18 12:32:17 +02:00
Sören Tempel acfa7d6732 checkapk: Check how many packages depend on a previous soname
Since the changeset committed by psykose a while ago in commit
26118d4997 we now extract the
previous soname. We can pass this previous soname to `apk search -R`
to figure out how many packages are linked against this old soname.

I believe this to be useful for reviewing MRs since the checkapk
output will directly tell us if a contributor has missed rebuilds.
It will also inform us when no rebuilds are necessary, e.g. if the
SONAME was changed but no packages is linked against the library.

Example output for `main/libsodium`:

```
>>> Size difference for libsodium: 336 KiB -> 340 KiB
--- filelist-libsodium-old      2023-09-22 11:24:54.799204225 +0200
+++ filelist-libsodium-new      2023-09-22 11:24:54.799204225 +0200
@@ -1,5 +1,5 @@
 .PKGINFO
 usr/
 usr/lib/
-usr/lib/libsodium.so.23
-usr/lib/libsodium.so.23.3.0
+usr/lib/libsodium.so.26
+usr/lib/libsodium.so.26.1.0
SODIFF:
-usr/lib/libsodium.so.23.3.0:    SONAME               libsodium.so.23
+usr/lib/libsodium.so.26.1.0:    SONAME               libsodium.so.26
REBUILDS:
*** 36 packages linked against 'libsodium.so.23' need to be rebuild!
```
2023-10-18 09:39:12 +00:00
Natanael Copa fab41364f7 checkapk: dont require abuild.conf if we have default conf
also add tests
2023-10-18 11:22:47 +02:00
Natanael Copa 643637dd5d checkapk: add test, fix usage
print --help output to stdout and errors to stderr.
2023-10-18 11:07:24 +02:00
Natanael Copa 3a7fdeaaf0 tests: speed up abuild cleanoldpkg test
skip various steps when buliding the package.
2023-10-18 08:46:09 +02:00
Natanael Copa 08126de5f2 tests: add another test for abuild deps
Test that passing only `CHOST=... abuild deps` works as expected
2023-10-17 22:30:00 +02:00
Natanael Copa c73b8f4ca7 tests: test checkdepends
verify that checkdepends is pulled in when it should and not installed
when it shouldn't.
2023-10-17 22:04:56 +02:00
Natanael Copa 852bb238f3 tests: add test for abuild dep
verify that makedepends_build and makedepends_host works as expected.
2023-10-17 19:51:35 +00:00
Natanael Copa 9ed6a92107 make: run tests in parallel 2023-10-17 19:51:35 +00:00
Natanael Copa c63cae3b15 abuild-tar: fix warnings from scan-build
ref: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10102
2023-10-17 16:33:15 +00:00
Natanael Copa fcdfd871af abuild-sudo: handle errors from setuid/setgid
ref https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10102
2023-10-17 16:33:15 +00:00
Natanael Copa 1332d5b171 abuild-rmtemp: fix build with clang 2023-10-17 16:33:15 +00:00
Natanael Copa 4128fa6392 ci: build with clang and scan-build
ref: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10102
2023-10-17 16:33:15 +00:00
Natanael Copa a6a95ad633 abuild: set filetype sh for abuild.in 2023-10-17 16:33:15 +00:00
ptrcnull f688130443 abuild: simplify finding repo_template
related to #10069, this keeps the original behaviour when
running in aports and allows for using rootbld in other package repositories
2023-10-12 15:39:09 +00:00
jvoisin dd67240f01 Actually set values for libcpp hardening macros
Otherwise, it wouldn't do much…
2023-09-04 01:56:15 +02:00
sudotac 9fe0d14d7e apkbuild-pypi.in: replace given/when with if/elsif
smartmatch is deprecated in Perl 5.37.10
2023-08-30 05:50:04 +00:00
sudotac 00aa9aab12 apkbuild-pypi.in: use $() instead of backticks 2023-08-30 05:50:04 +00:00
jvoisin 65b5d578b2 Enable more hardening for libcpp
- _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS: This macro is used to enable -Wthread-safety annotations on libc++’s std::mutex and std::lock_guard.
- _LIBCPP_ENABLE_HARDENED_MODE to enable the hardened mode.
2023-08-21 13:37:35 +02:00
psykose 28b97249fa ==== release 3.11.21 ==== 2023-07-17 06:28:54 +02:00
psykose 6c20db871b checkapk: fix a mistaken grep warning
grep: warning: stray \ before -
it matches without \ anyway
2023-07-17 06:12:56 +02:00