Commit Graph

321 Commits

Author SHA1 Message Date
Kaarle Ritvanen 18b09f9d91 abuild: set umask
consistent result regardless of current setting
2016-03-17 15:20:34 +02:00
Sören Tempel d8dabed4aa abuild: allow passing custom flags to patch(1) in prepare
To do so you need to set the patch_args variable to your desired
command line flags.
2016-03-14 15:09:10 +01:00
Timo Teräs 289400213c abuild: fix getfattr match
it's a regular expression, not shell pattern. empty match will
match everything (default is ^user\\.)
2016-02-22 14:16:13 +02:00
Timo Teräs 5c05446d07 abuild: use gnu find supported way to find suid binaries 2016-02-22 14:07:16 +02:00
Michael Zuo 251dce53e1 abuild: use standard-issue prepare by default
A majority of APKBUILDs currently use exactly the prepare() provided by
newapkbuild verbatim, even for packages where no patches exist, which
has created the expectation that patches listed as sources are applied
by default.

This rev simply adds that default prepare() to abuild (and exposes it as
default_prepare), with no configurability. If needed, default behaviour
can be overridden by providing explicitly prepare().
2016-02-22 14:04:52 +02:00
Sören Tempel 578ab740ad abuild: Respect $reporev variable when fetching git repositories
For git repositories the $reporev variable is not really used since the
$_rev variable is passed to git and $_rev was only set when $reporev was
empty.
2016-02-11 14:26:08 +01:00
Michael Zuo 8d272af174 abuild: Fix indention of the snapshot() function
The snapshot function was indented with spaces while the rest of the
code is indented with tabs.
2016-02-11 14:21:12 +01:00
Natanael Copa a2c0a6897e abuild: minor speed improvement in symlink compression
instead of forking stat once force every file with one file argument,
we fork it once with all the files as arg. This reduces number of forks.
2016-02-03 19:33:35 +00:00
Natanael Copa eee56356ab abuild: fix finding already compressed manpages 2016-02-03 19:32:30 +00:00
Natanael Copa b628bb4305 abuild: avoid compress man pages double
we should not compress man pages that are already compressed.
2016-02-03 18:42:47 +00:00
Sören Tempel 2b8ffc9876 abuild: update symlinks before updating hardlinks
This should be a minimal performance improvement since hardlinks are
replaced with symlinks and should thus already point to the correct
file.
2016-02-03 18:21:02 +00:00
Sören Tempel e8e0b9e90a abuild: rewrite hardlink handling when compressing man pages
The problem is that gzip refuses to run if it detects that a file has
more than 1 link. Our existing solution (removing hardlinks, compressing
the man page and recreating the hardlinks) made certain assumptions
about inode order that are only given on Unix v7 like filesystems
meaning it didn't work properly on 'tree-based' filesystems like BTRFS
or ZFS.

This patch has a different more bulletproof approach: It simply replaces
all hardlinks with symlinks. This is way easier because symlinks (unlike
hardlinks) can point to a file that doesn't exist, therefore we can
update all links before compressing the file in an easy way.
2016-02-03 18:21:02 +00:00
Sören Tempel 042921b798 abuild: there is no man page section 9 2016-02-03 18:21:02 +00:00
Sören Tempel eb0ffe7a8a abuild: use id instead of whoami
Furthermore compare the UID instead of the username.
2016-02-03 18:21:02 +00:00
Natanael Copa d537a005c6 abuild: avoid dupes in provides so:*
similar as commit b3174ba76 ("abuild: make sure we don't add dupes of
provides", Fri Jun 5 12:56:44 2015 +0000)
2016-01-27 10:50:50 +00:00
Kaarle Ritvanen f37a174836 abuild: exclude non-dangling symlinks from dependency resolution
This commit also fixes incorrect behavior in case where an absolute
symlink points to a file installed on the build host but which is
missing from the package.
2015-11-30 07:26:56 +00:00
Timo Teräs 55041a1e10 abuild: fix conflict checking 2015-11-12 14:10:19 +02:00
Natanael Copa ef647cce73 abuild: do not install itself as a makedepend
we might need add $pkgname as a dependency for $pkgname-dev and then we
should not install ourselves in case makedepends="$depends_dev"

This is needed foor bootstraping.
2015-10-29 18:06:42 +00:00
Christian Kampka b67dec210a abuild: avoid division by zero when input is zero for calculating human size for packages
This occurs when building meta packages that do not have any package content.
2015-10-28 14:26:59 +00:00
Natanael Copa 62853e7145 abuild: fix check_depends_dev 2015-10-12 07:01:06 +00:00
Carlo Landmeter ea8ab0c920 abuild: check if depends_dev is set unnecessarily
depends_dev are dependencies of the of the developement subpackage
it does not need to be set when there is no developement subpackage
2015-09-28 13:08:16 +02:00
Carlo Landmeter ac8b0e55cb abuild: fix issue in maintainer check
seems the maintainer variable is not set anymore when building .PKGINFO
2015-09-16 22:58:27 +02:00
Carlo Landmeter aa32ec14e6 abuild: try to validate maintainer address
abuild will error when the maintainer is set but is not a RFC822 address
2015-09-16 11:00:10 +02:00
Natanael Copa 4bc9e3dd6e abuild: add -K for keeping tempdirs and deps 2015-09-08 09:04:45 +02:00
Natanael Copa 92186b70ca abuild: fix fetch lock file on nfs
flock(2) on an NFS mount will on the server side convert the lock to a
POSIX lock (fcntl(F_SETLK)). This means that abuild running on NFS
server and client will create different locks and they will both try
download same file at same time.

We fix this by creating a small abuild-fetch application that will
create a POSIX lock which works with NFS.
2015-08-26 16:44:23 +02:00
Natanael Copa fe2332d186 abuild: fix man pages compression
fix handling of hardlinks and symlinks.
also compress n man pages and localized man pages
2015-08-19 10:59:00 +02:00
Natanael Copa 72fefe0f1d abuild: add support for sonameprefix
This is a feature to prefix all so:* provides with a tag. This was done
so that the openjdk8 so depends would only be satisfied by openjdk8
provides and not openjdk7, which might provide same so:lib*.so file.

To use it do: sonameprefix="openjdk8:"
2015-08-18 16:56:26 +02:00
Natanael Copa a2c4d5b00d abuild: check correct name for -doc 2015-08-18 13:46:15 +02:00
Natanael Copa 784f75ee94 abuild: always check for uncompressed man pages 2015-08-17 13:10:14 +02:00
Sören Tempel cf65c9b41b abuild: check for /usr/share/{doc,man}
Output a warning if those directories exist on a non-doc package.
Furthermore, check if uncompressed man pages where installed to
/usr/share/man.
2015-08-17 11:41:19 +02:00
Natanael Copa b8b4929245 abuild: fix dep-scanning when sub and main pkg's arch differs
Force dependency scanning when main pkg has noarch but subpackage
overrides it. We need to save the arch setting set in split func for
later if it differs from main pkg's arch in a temp file because the
splitfunc runs in a subprocess.

fixes #4491
2015-08-10 07:58:21 +00:00
Natanael Copa 3020891009 abuild: add install_if for -doc packages
This lets users 'apk add docs' to always pull in -doc packages.
2015-07-20 14:10:36 +00:00
Natanael Copa 3f3281c87e abuild: fix circular dependency for symlink deps
The package should not have itself as dependency.
2015-06-23 11:20:29 +00:00
Natanael Copa ec0a5ee93e abuild: fix deps for versioned pkg-config deps
Fix version stripping when filtering out needed pkg-configs that are
provided from same (sub)package.
2015-06-12 07:12:47 +00:00
Natanael Copa 09427f9c7c abuild: fix finding pkg-config deps in subpackages
We strip version from pkg-config dependency when scanning the
subpackages.
2015-06-12 07:09:30 +00:00
Natanael Copa 0e58eeff80 abuild: fix provides and install_if in subpackages
we need to clear provides set in global scope before splitting the
subpackages so the subpackage does not inherit main packages' provides.

But at the same time, we must not clear the provides/install_if set in
the splitfunction itself.
2015-06-11 11:56:04 +00:00
Natanael Copa 563409ed82 abuild: clear inherit provides and install_if for subpackages
Unexpected result will happen if subpackages inherits the provides or
install_if from main package. So we clear them.
2015-06-08 07:27:23 +00:00
Natanael Copa b3174ba768 abuild: make sure we don't add dupes of provides 2015-06-05 12:56:44 +00:00
Natanael Copa fede6d1161 abuild: remove "added pkgconfig (found /usr/lib/pkgconfig)" message 2015-06-05 12:16:39 +00:00
Natanael Copa b4c8ef7dad abuild: normalize path when finding symlink targets
some paths like usr/lib/../../lib/libudev.so.0.13.0 will fail to resolve
if usr/lib is does not exist, even if lib/libudev.so.0.13.0 does.

To solve thise we normalize out the ../ in path string before we try to
resolve it.
2015-06-05 12:11:47 +00:00
Natanael Copa 9e91755369 abuild: add warning when depends_dev needs cleanup 2015-06-05 07:27:44 +00:00
Natanael Copa f5dce44bf9 abuild: add warning when pc:* provider is missing
and indicate which package that should provide it and needs a rebuild.
2015-06-05 07:18:09 +00:00
Natanael Copa e59de7c8a2 abuild: fix detection of symlink dependencies
- add as dep when the target is also a symlink
- fix handling of absolute path in target
2015-06-04 11:50:41 +00:00
Natanael Copa fddc01bbbb abuild: fix detection of pkg-config module version
pkg-config will not print version unless dependencies are met so we can
not exclude the system modules.
2015-06-04 07:51:44 +00:00
Natanael Copa 2f5ef7e2fa abuild: autodetect pkg-config dependencies
we create provides for pc:<module>=<version> for pkg-config files and
whenever possible we add depends=pc:<module>.

We also handle version requirements whenever those are specified.
2015-06-03 12:16:35 +00:00
Natanael Copa f8a2871a9c abuild: fix regression in scanning shared objects
fix regression introduced with commit c70dbf8 (abuild: automatically
detect symlink targets in other subpackages)
2015-06-03 11:12:28 +00:00
Natanael Copa 0263b66cc1 abuild: do not exclude depends_dev
fixes regression introduced with commit 6582be1d (abuild: pull only in
needed dependencies for -dev packages)
2015-06-03 09:39:36 +00:00
Natanael Copa 6582be1d0b abuild: pull only in needed dependencies for -dev packages
ref #4109
2015-06-03 06:45:04 +00:00
Natanael Copa c70dbf8495 abuild: automatically detect symlink targets in other subpackages
Automatically pull in dependencies for symlink targets provided by other
subpackages.

This is mainly for pulling in target of .so symlinks.
2015-06-03 06:28:34 +00:00
Natanael Copa 5e268f8d70 abuild: cleanup. use better function names
no change in code logic
2015-06-03 06:27:15 +00:00