diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-07-13 06:04:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-07-13 06:04:28 +0000 |
commit | 8b3c9d58a2812f745a1eab4f510464544dcf6d01 (patch) | |
tree | 50e8efadc356415934507b071c0aad23980e8412 /sys-libs | |
parent | Fix ARCH & OBJCOPY handling for cross-compiling #552234 by Kevin Cernekee. (diff) | |
download | historical-8b3c9d58a2812f745a1eab4f510464544dcf6d01.tar.gz historical-8b3c9d58a2812f745a1eab4f510464544dcf6d01.tar.bz2 historical-8b3c9d58a2812f745a1eab4f510464544dcf6d01.zip |
Fix errno display in setcap #551672 by Helmut Jarausch.
Package-Manager: portage-2.2.20/cvs/Linux x86_64
Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libcap/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/libcap/Manifest | 30 | ||||
-rw-r--r-- | sys-libs/libcap/files/libcap-2.24-setcap-errno.patch | 45 | ||||
-rw-r--r-- | sys-libs/libcap/libcap-2.24-r2.ebuild | 73 |
4 files changed, 141 insertions, 15 deletions
diff --git a/sys-libs/libcap/ChangeLog b/sys-libs/libcap/ChangeLog index 84e514975955..a3991c4b525e 100644 --- a/sys-libs/libcap/ChangeLog +++ b/sys-libs/libcap/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/libcap # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/ChangeLog,v 1.140 2015/05/29 17:31:28 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/ChangeLog,v 1.141 2015/07/13 06:04:27 vapier Exp $ + +*libcap-2.24-r2 (13 Jul 2015) + + 13 Jul 2015; Mike Frysinger <vapier@gentoo.org> + +files/libcap-2.24-setcap-errno.patch, +libcap-2.24-r2.ebuild: + Fix errno display in setcap #551672 by Helmut Jarausch. *libcap-2.24-r1 (29 May 2015) diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest index cb4609580f8d..0af43153983f 100644 --- a/sys-libs/libcap/Manifest +++ b/sys-libs/libcap/Manifest @@ -8,6 +8,7 @@ AUX libcap-2.21-include.patch 290 SHA256 60038e5f67928edbf7e1b43b8799d5a92cff40d AUX libcap-2.22-build-system-fixes.patch 5319 SHA256 f0c3323a5ec34e07eb397d6e1527ac3d6c519c4a91261a206019d25eb161f426 SHA512 d57181ce1dbe95c2c40cdc49cff8d7368287d512b0f05c296266071cb689b94891aca201c978d316cf2851b806b7bcb2acaef3aeef69ead6a380490aecaea0c7 WHIRLPOOL bf076c3bbba28c861cdccf1639d4fe3205fa4e3ec2c50da9a7d052d439cb7b4f8bfb4e8a770ffeaca4fa1612497a04ea151fadcb439f188f6576952933a88646 AUX libcap-2.22-no-perl.patch 2360 SHA256 4eca873685da1aec0d06e9d7681c285166f9ad7e7cb14c65da6e05cbb135e9ef SHA512 8c49d829cbae15f28ded70b96bc0715819b13183136d90b64b7b6bfbd85c262f0161d89450579e9b58961c724b34816919d111f839e3f5a7a68427ffe441881d WHIRLPOOL 1da9b5b8b54c38bf45117653122ee6dc55949c21c39152d18d2dc0c721d4b906f777a8734d184d18b2c7a25b2aa06aa68d1ccc4409b16915aeb8d9b014951759 AUX libcap-2.24-build-system-fixes.patch 4943 SHA256 c3d77ae406d13def200f520f6063b3783ae0dae46e740ad78ab189f8a6168210 SHA512 84283f0652f87a8c1f598413d03e8f3aeeb140b322519051df1873933d6d3ac738757e1c7c91ea6efc51548d224149b84d6a1fab0301a655eb609b183bc9e7ba WHIRLPOOL 1697c9223a59f10c5472b0286fa19a9a6c4b9dee16314f785164731043b4207f122b916bef7d596cb94e46eaf4eb7d376129cbedbcc7d317f1b49f17875d11d2 +AUX libcap-2.24-setcap-errno.patch 1491 SHA256 397462a3e207944a7ab2837a06794b225c29ad45e630de69e02df64225106586 SHA512 367037d6c42d07c359e9ee397cbc7431ea05c3d34deea93db1473394decb9f61a2c9de186652fc3a12fb615406ec1a2f4d76eb63c4410c6a2b5f435ece5b05ef WHIRLPOOL 07ce9f884251aad17fd9f7a3fef11e8193b66f3dcd9b58fb4aad755237cd7e4ad28e55a8d5434c65c5e56cc0a92af45f7bf677f0dc451276f46dcffe046a2ee1 DIST libcap-2.17.tar.bz2 48899 SHA256 2cab109eed9bd944408c13efed910091479d8770cf9aa1bec4f9b26d9302f5b0 SHA512 f8c79889359f92c9f714b4fe602454f0e0ae7c78bf2fa2ddf849a1cda05a8ef7d993c69f7662cbb8939e42da6a43b401e9199d5aa9de220eafcede9a06f727b5 WHIRLPOOL dc6cb019ec32c529600eb8198098b69157b2ebf279e0b003a003e906aedda07ebac355cdcbbebde222aa1ab9a2d22be34b2b216b0c1249134404a736a540bea4 DIST libcap-2.19.tar.bz2 53099 SHA256 ed1693e344054a398e68a7cc840892e3d1a880562743bdf28fd918649aa5a4ce SHA512 1453e3014fdff57c01e3dca5a4b5d1754e641ecb4011296a39d0d088ee1fe371e13f851ae2c6c29e7f0d7bfeeeb4c2a11d112da6ed4600f5d489788faaee9fb2 WHIRLPOOL 2b6ee718d91902617dda3cb7beaa3bf29e785dc635f33af635ab74245259dd0d81f8da1cc5bd38bbed8ff85752536b2596941c4da581a29d7380d039218fbd49 DIST libcap-2.20.tar.bz2 53629 SHA256 20e7c1ea4d3d5c410efb3a6ff138dc417912fae316d883460dcd58d9803a9220 SHA512 3ab62d1a563d1f380485b4cb6ba77e9a4c8806b9d6b115c0bc9bad8c1e251bb4906a8b2cc21b07c0c274811e2f6d2aa3840696babb9348dcdf25eae166214810 WHIRLPOOL eb84e9fad6056d02e482e582fc26bcbeac456da7d0daeb1ad43f54056afd814bdeef231acd3037eab44eb3a5d7a4c23c7638a73ca7ee706a1c75e739edbc36a3 @@ -22,23 +23,24 @@ EBUILD libcap-2.22-r1.ebuild 1491 SHA256 c4f6e82a96c0abc001b5c91dcd0e7bb6a33c6ad EBUILD libcap-2.22-r2.ebuild 1784 SHA256 6a3be4b46a5f53aabb5694dc5647fc791cba5da81abba430d4c24f78727dcc45 SHA512 b18bb4409379fedf07e0aa87d47d3283fadb6a61c23d0476fc38150cc31068344a1bec52e5286ce5a85185a1735fbb0515506d8b12a8502ae849c292f9697f32 WHIRLPOOL 378aee18dbe76afd7b3f9606f59864e478a8ad49fc12e50bae43157cf25446558994094e71f1531405d54dbd6ce1083c938727de234a70581ab00a13cb2ccd19 EBUILD libcap-2.22.ebuild 1378 SHA256 b12f31434c4699323601597a5dd6b6d18b87c4a2e60e82e04e58ec64c8eda83b SHA512 408d78f78d9c1174fdbaddbf61f5388bbca6aa404bc1e7e1eb891120af82e376a0e50bf0cca17ab5697ae0b007f62e80a8637e1435c1d2f82bc99f941f1d29d1 WHIRLPOOL 8640b7f1887bbf4d4f8612dd68272f685d0c08596f179bc04d6565ff61ec0621ec774bcf0f3efd60c2e5c8f77428e3b36afda467f163caee5d4bb61ea0f5f46f EBUILD libcap-2.24-r1.ebuild 1952 SHA256 e23ab190c71f9afbd93c3d978bfb3798f21606fe83ff90e210f82b7a468fa3bf SHA512 95160b7f1c594aa86d678ef2e6336a5eeb3466638a5bdffa9b6ded4ccd6b3d35f6220fe2aab3601ad3d37ed3505c6ebf64c81daa0987eb5bdaa10225c4c93fbf WHIRLPOOL b5405eb55e72091acd09202c4a7e20191797e785de6efc7ce241811dc34e822661f7c8cf7cfb51e8765360b44844bb9a26ab6226b6ca4c4bff1d0d659b29775a +EBUILD libcap-2.24-r2.ebuild 2012 SHA256 42d0ae5895f0d591a68f3623c1fd748a7fb8c20482fde46db9749f8ec0ca7d38 SHA512 370c1c92e2017f821a5d1676761745d4451c7d51d7eb025ab84845dceeaf3e9dda59b3cb031f0af8dcb39aa5d2c76b77c1415d5be48df9cd70e00ead6a2493ec WHIRLPOOL 338f3eb441c1ac586e5e9af8d4f2fc6554de9812814faab9494c5910683c8cc92d18e00603c9f0ce9452faba6f00677af1193a2453f0ef44d5033cb8844c6a59 EBUILD libcap-2.24.ebuild 1913 SHA256 21f213d033891b775b4d26f4d7aacf5426fd5621af0de55225bbbb724201cb0f SHA512 f93736ab52750aaf5aabf1f4a4230645e8f27e4035a7f495e392c849296bb3260c023b1b1ecf6964e1774010fb777caa3916c4126f220b4d32ef07723df0a03e WHIRLPOOL 54503874ff0fd10fb8f93c69468f395541ee998e7e41b905bc7b6d1498c6b2fa5a75d20df134d9d81e5cc05fe2f67519f30daad314dc1356669c382a974e7f9b -MISC ChangeLog 19457 SHA256 d4fc0e2f968fb026973067afdad1a13c9c56c826fa82b4d6413c800ebbe4b313 SHA512 8885aea19a6e64db96a7a6537b963c1e0e68bf70df0324dd23f0b2e1c3861a388e84d07e13bd706945f9d06092d21be116428661a52696722c6f108fb4d7f5b0 WHIRLPOOL 52233f299ec8bb802a6f3addbedb0bb183f49a8d7a8939dbe81054c445749c9e1e1d4a8e871c0ded18d3971cecdd1537d5aa7e46e0ffa76fdc307b3833868d07 +MISC ChangeLog 19662 SHA256 b0af676d62d97ad4f30806040c14cc2fc4a8b55cac6b4840bc05866ccaf0204e SHA512 f39e403217fe2cde0c5e67501505e142726af4c662cca86561f8d5b737e5c8c5148f3ec73f33638e7aeabc3bd4aab93663bb814ba0db8a8e2a5ed1b993fe3334 WHIRLPOOL 37c17ae1a701eec386716a6902bef89ddf2ce61ad2a2d87f674dcc83ba1e67c579950ed2c0380f571c803b41a94fd9a42d9975b5e8299d81b421c06cf879c0f3 MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQ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fwc+W1CLrRTI97io1sI66YQJ3A08E6liTJR4P6ZK8G0 +sY8Yt4p5YEaKHLCfTOuDOedQ4VephoJYHtYHlB9oVZIR4grYpVKlAKEU7OJf9Vjh +wWFbCQfQnqHeGrtKVZzurcV72hSY6cdOvCRCqqohyj3orV3pdxWOAhs6h8HNpO1I +Q3bQ0GNWIjUE2UG8OLGtwQdaXFuV3fyA8OVWg+ORBrg00Ebb5hX9Sfpr/2oGdJFi +pTuimjOkk+yEVYYzL7e/tnn/i0QwufkmtKXFKozxqI5f308jxg9HeXmpxjAFRwSH +wSfZpkrrxvJxFjAAZ0Pk/FITU4rPQMYm9j6szRYOKrr8UVlAG8ZIkcRXwNrY/KME +zEm4r/zAV0TY31ZVCaa3 +=AH3+ -----END PGP SIGNATURE----- diff --git a/sys-libs/libcap/files/libcap-2.24-setcap-errno.patch b/sys-libs/libcap/files/libcap-2.24-setcap-errno.patch new file mode 100644 index 000000000000..08513f643e65 --- /dev/null +++ b/sys-libs/libcap/files/libcap-2.24-setcap-errno.patch @@ -0,0 +1,45 @@ +From 62b190c09d5652c58679dffd7f09e4aceb4c7daa Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 13 Jul 2015 01:59:14 -0400 +Subject: [PATCH] setcap: fix errno display + +The commit 056ffb0bd25d91ffbcb83c521fc4d3d9904ec4d4 broke the display of +the final error message because it would do more operations that would +clobber errno. Example: +(libcap-2.22) sudo setcap cap_ipc_lock=ep /proc/filesystems | head -1 +Failed to set capabilities on file `/proc/filesystems' (Operation not supported) +(libcap-2.23) sudo setcap cap_ipc_lock=ep /proc/filesystems | head -1 +Failed to set capabilities on file `/proc/filesystems' (Invalid argument) + +Save the original errno value and use that for the final display instead. + +URL: https://bugs.gentoo.org/551672 +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + progs/setcap.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/progs/setcap.c b/progs/setcap.c +index 83090ae..7304343 100644 +--- a/progs/setcap.c ++++ b/progs/setcap.c +@@ -171,6 +171,7 @@ int main(int argc, char **argv) + retval = cap_set_file(*++argv, cap_d); + if (retval != 0) { + int explained = 0; ++ int oerrno = errno; + #ifdef linux + cap_value_t cap; + cap_flag_value_t per_state; +@@ -193,7 +194,7 @@ int main(int argc, char **argv) + + fprintf(stderr, + "Failed to set capabilities on file `%s' (%s)\n", +- argv[0], strerror(errno)); ++ argv[0], strerror(oerrno)); + if (!explained) { + usage(); + } +-- +2.4.4 + diff --git a/sys-libs/libcap/libcap-2.24-r2.ebuild b/sys-libs/libcap/libcap-2.24-r2.ebuild new file mode 100644 index 000000000000..c17aaf6d7daa --- /dev/null +++ b/sys-libs/libcap/libcap-2.24-r2.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/libcap-2.24-r2.ebuild,v 1.1 2015/07/13 06:04:27 vapier Exp $ + +EAPI="4" + +inherit eutils multilib multilib-minimal toolchain-funcs pam + +DESCRIPTION="POSIX 1003.1e capabilities" +HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html" +SRC_URI="mirror://kernel/linux/libs/security/linux-privs/libcap2/${P}.tar.xz" + +# it's available under either of the licenses +LICENSE="|| ( GPL-2 BSD )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux" +IUSE="pam static-libs" + +RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] + pam? ( virtual/pam )" +DEPEND="${RDEPEND} + sys-kernel/linux-headers" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.24-build-system-fixes.patch + epatch "${FILESDIR}"/${PN}-2.22-no-perl.patch + epatch "${FILESDIR}"/${PN}-2.20-ignore-RAISE_SETFCAP-install-failures.patch + epatch "${FILESDIR}"/${PN}-2.21-include.patch + epatch "${FILESDIR}"/${PN}-2.24-setcap-errno.patch #551672 + + multilib_copy_sources +} + +multilib_src_configure() { + local pam + if multilib_is_native_abi && use pam; then + pam=yes + else + pam=no + fi + + sed -i \ + -e "/^PAM_CAP/s:=.*:=${pam}:" \ + -e '/^DYNAMIC/s:=.*:=yes:' \ + -e '/^lib_prefix=/s:=.*:=$(prefix):' \ + -e "/^lib=/s:=.*:=$(get_libdir):" \ + Make.Rules +} + +multilib_src_compile() { + tc-export_build_env BUILD_CC + tc-export AR CC RANLIB + + default +} + +multilib_src_install() { + # no configure, needs explicit install line #444724#c3 + emake install DESTDIR="${ED}" + + multilib_is_native_abi && gen_usr_ldscript -a cap + use static-libs || rm "${ED}"/usr/$(get_libdir)/libcap.a + + rm -rf "${ED}"/usr/$(get_libdir)/security + if multilib_is_native_abi && use pam; then + dopammod pam_cap/pam_cap.so + dopamsecurity '' pam_cap/capability.conf + fi +} + +multilib_src_install_all() { + dodoc CHANGELOG README doc/capability.notes +} |