Commit afcb3db2 authored by Natanael Copa's avatar Natanael Copa Committed by Natanael Copa

main/ca-certificates: improve run-parts execution

Do not depend on PATH for run-parts, instead we try /usr/bin/run-parts
and /bin/run-parts directly. Exit with error if it fails.

(cherry picked from commit c2b94cc3)
parent 24450670
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ca-certificates pkgname=ca-certificates
pkgver=20160104 pkgver=20160104
pkgrel=1 pkgrel=2
pkgdesc="Common CA certificates PEM files" pkgdesc="Common CA certificates PEM files"
url="http://packages.debian.org/sid/ca-certificates" url="http://packages.debian.org/sid/ca-certificates"
arch="all" arch="all"
...@@ -78,10 +78,10 @@ EOF ...@@ -78,10 +78,10 @@ EOF
md5sums="d9665a83d0d3ef8176a38e6aa20458e9 ca-certificates_20160104.tar.xz md5sums="d9665a83d0d3ef8176a38e6aa20458e9 ca-certificates_20160104.tar.xz
0c3d9f5d795c7475b997e18498b7aec8 fix-manpage.patch 0c3d9f5d795c7475b997e18498b7aec8 fix-manpage.patch
755477aff09e1b5909e4e6ef49671992 update-ca.c" d7773c690432a56911c0fa97a67bf43e update-ca.c"
sha256sums="09eb770122e23260316120c0cbbddc8a1d33e7147210ce44e146084d5d5abcdd ca-certificates_20160104.tar.xz sha256sums="09eb770122e23260316120c0cbbddc8a1d33e7147210ce44e146084d5d5abcdd ca-certificates_20160104.tar.xz
60b36c4881bb367891df038a0736456c2d170496de8c339026671008b1caa09b fix-manpage.patch 60b36c4881bb367891df038a0736456c2d170496de8c339026671008b1caa09b fix-manpage.patch
e6b4a05a363f131f3dab1d3c41c315b61be3de91a77aef8b98ea2ef8f28cadc4 update-ca.c" b2231e7f0304d6360350f1f1aa9afad46fe4eeb0f0306a48eeb8cd74501ab26c update-ca.c"
sha512sums="4291ba58057b66d56853162b71862832135eab6f444a5e2cf3dd1089495d44624246dc0c540871851fe9aaceb42054516309402525c8f16a88911d3af9c3518a ca-certificates_20160104.tar.xz sha512sums="4291ba58057b66d56853162b71862832135eab6f444a5e2cf3dd1089495d44624246dc0c540871851fe9aaceb42054516309402525c8f16a88911d3af9c3518a ca-certificates_20160104.tar.xz
690d6bb434fb3ccce931d7ee6a167124f9c2d2e7e7a016d85f7b72a5f7f7c34db8c6133f3575e962a91981a32a88f8961776fe5fd907e57f59c03a32f2fcced3 fix-manpage.patch 690d6bb434fb3ccce931d7ee6a167124f9c2d2e7e7a016d85f7b72a5f7f7c34db8c6133f3575e962a91981a32a88f8961776fe5fd907e57f59c03a32f2fcced3 fix-manpage.patch
c8e14636b238fb5c2c50125530219425e23c7e78fca6e2de56a0057f8d86511ce2d95f6ced326d3395a574a2872ce09dea6d6b0651fd5b78e75e5f8aa404b378 update-ca.c" 403c909ea4107d944789b8aae9c911c735ac651cf882bf8468e0f91b3179700a78cabcbec16e3ae0bed730b54d1813d5d0891c1aeae583ad80c7a20b0f425b12 update-ca.c"
...@@ -318,8 +318,10 @@ int main(int a, char **v) ...@@ -318,8 +318,10 @@ int main(int a, char **v)
free(tmpfile); free(tmpfile);
/* Execute run-parts */ /* Execute run-parts */
char* run_parts_args[] = { "run-parts", RUNPARTSDIR, 0 }; static const char *run_parts_args[] = { "run-parts", RUNPARTSDIR, 0 };
execvpe(run_parts_args[0], run_parts_args, NULL); execve("/usr/bin/run-parts", run_parts_args, NULL);
execve("/bin/run-parts", run_parts_args, NULL);
perror("run-parts");
return 0; return 1;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment