diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2012-12-21 14:59:22 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2012-12-21 14:59:22 +0000 |
commit | 2d9ce19f7b729ed632d07a4cb674f6bef87d588e (patch) | |
tree | f8ac9a0b3f719aa34fd755408d6d96879e5b6781 /sys-auth | |
parent | Version bump, drop old (diff) | |
download | historical-2d9ce19f7b729ed632d07a4cb674f6bef87d588e.tar.gz historical-2d9ce19f7b729ed632d07a4cb674f6bef87d588e.tar.bz2 historical-2d9ce19f7b729ed632d07a4cb674f6bef87d588e.zip |
Backport XAUTHORITY fallback support from upstream git.
Package-Manager: portage-2.2.0_alpha149/cvs/Linux x86_64
Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/polkit/ChangeLog | 8 | ||||
-rw-r--r-- | sys-auth/polkit/Manifest | 18 | ||||
-rw-r--r-- | sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch | 58 | ||||
-rw-r--r-- | sys-auth/polkit/polkit-0.109-r1.ebuild | 120 |
4 files changed, 202 insertions, 2 deletions
diff --git a/sys-auth/polkit/ChangeLog b/sys-auth/polkit/ChangeLog index 38b60e53c053..2fe45cc3d31c 100644 --- a/sys-auth/polkit/ChangeLog +++ b/sys-auth/polkit/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-auth/polkit # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-auth/polkit/ChangeLog,v 1.119 2012/12/19 17:11:05 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-auth/polkit/ChangeLog,v 1.120 2012/12/21 14:59:13 ssuominen Exp $ + +*polkit-0.109-r1 (21 Dec 2012) + + 21 Dec 2012; Samuli Suominen <ssuominen@gentoo.org> +polkit-0.109-r1.ebuild, + +files/polkit-0.109-XAUTHORITY-fallback.patch: + Backport XAUTHORITY fallback support from upstream git. 19 Dec 2012; Agostino Sarubbo <ago@gentoo.org> polkit-0.108.ebuild: Add ~ia64, wrt bug #436668 diff --git a/sys-auth/polkit/Manifest b/sys-auth/polkit/Manifest index 5b30efe4c0fb..581dcccb03d2 100644 --- a/sys-auth/polkit/Manifest +++ b/sys-auth/polkit/Manifest @@ -1,4 +1,8 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX polkit-0.107-fallback.patch 1849 SHA256 ec59771ea95ac45656bc80bd94ab695990068eded68a340b386f6296f40d2c28 SHA512 bfdb551fd670911d40da6dee227c276e1f4da85cf5ca2f9e230d84b876c6185840ce1a4e8e1165d4da67839b27c97d7af27c18dcd08a29f75937b3556e730d9b WHIRLPOOL b5f08a4512eb0ecc2f420255b666b65c2ca64e14103b8afccfc1735cbdf8bea5d2b7a7a22c8933cf978027bc9f115bb7cc700645001c08c14bef5ad9a842279d +AUX polkit-0.109-XAUTHORITY-fallback.patch 2121 SHA256 d25e0ed70940207187c6013de396f4d1ac3f6c8f04c8478fb0b1aa7a17cd3cca SHA512 ac07c517e55f70690a71dba5f15459cb33b232e48fcece76f6fed6c504a189443c9bf17a2abe13662e1250752cba137bb8ab2455a624b8a86aab4d6e42243ab5 WHIRLPOOL b5cf7719d0222957df7045d77f6bae5aeec94e13eb25bb0b3cc1fd70a82557d8a8e545d49cefab3436c1a2c9645e964a251b35dec4ea99db7988e6f12993907b DIST polkit-0.104.tar.gz 1416583 SHA256 6b0a13d8381e4a7b7e37c18a54595191b50757e0fcd186cd9918e9ad0f18c7f9 SHA512 c6e74b4601eed0208d400dcf1ddbfc65a61583f32bef22d71afc5a415eb59d6a97f4ba62e8d0c9f38a082dea2b8c5401ac0889a00adcf9e0545e4847cf437cce WHIRLPOOL 94fe0f7545762465794c5efeed80cdf6be44918bc454b3e2189f9dd4cdcfdaba0c25e9ec7e6daf6419d72071bbbe24d468b1d1ece2f0998b9a63476c73fcd45a DIST polkit-0.107.tar.gz 1383089 SHA256 c826973db2b226dc8f807af5143f7b8be5d0270f46c0c1241a83b067db9d8311 SHA512 87cf7dddf76a092d7f63e72e6a5eb57b9c137699be46d849b5ea64add30a400cc7be87d0962933e48784576cee350a736b560b2856e7758d7767b06984909559 WHIRLPOOL 985287ff599ff03787f5c53ddf629dc7aafc5f4fbc238d3e47e07b0a5b4c0766045dbdd30d9fb433608be113b7ca2240d9908e02847e293cdbba2191efe7ae37 DIST polkit-0.108.tar.gz 1389367 SHA256 2877c15f56abe43609f6ece54ee0bfea169ca6d7b271b17296b14d751eab23a6 SHA512 e28c83347dd3da55ad5018b318a333e57f2bfdc232289f7e351969809be7cac476a9b960b654ca585d077b8c1b9fa1b01f8f6050b29e0c5db720d6dd604dff58 WHIRLPOOL 814bc8b670814737899f3f1cd3e644bdb13b3b3d4fc755360a30da96c17218faf8646171cbe1866014c998959aab1a0189719204ca853061aed2ea21f7c952ca @@ -6,6 +10,18 @@ DIST polkit-0.109.tar.gz 1390339 SHA256 805d5c75e2adf18fd6622f0b1ea733759fb29d9d EBUILD polkit-0.104-r1.ebuild 3584 SHA256 767fdc3ad4feab305086d16e8d0ddd0bbbd6eb8542e4b5c203b4a189c080092c SHA512 067cf0577781df122afdd47b2e1d70333c34f5a74a14dc6a70360b0ac6197724706e8b51bf9bf45ea6213fe580291d9b8fc6c7e686c3f660ef8b53b302ab2f6d WHIRLPOOL 080cab5a6584d71919a19e740b366bc9838adffda8383af0a50bc80b9f19fe9b0cec844a2cf8438694357e1f7170a842e42ebabdf784cda85c40161ec41bf317 EBUILD polkit-0.107-r1.ebuild 3271 SHA256 c094f136411f2285af0332452ad36bf2e09f2cab0eaf4da5dcec880b26815083 SHA512 cb265968f6d84067b07a49f5217aacdde32d26aa328f2a71416dcaa50e6c7d3fe9f816b6e78a472f7da68b423c6499707ceb59925b6ece71eb3144913c22c12d WHIRLPOOL 9ff054396500a636007ad6f2d4d80373b272f51f37df5dbb1b84428b2d986e249f15eb87be97da6da3025f9f3eb503cd697fde70d208f2dd9dc41dcac99ece87 EBUILD polkit-0.108.ebuild 3093 SHA256 956c2cb14dfbb582ff9c80b113f130d6f764aac15659819f256350b4ff66239f SHA512 5a7857058c020248304f10086690e9d5c19aa07e2087aad8dafdb72adc5d12fec336699be9aefaf01b9abb6f2d4d734788740557eeedb8f5d0602f44cd28322d WHIRLPOOL 1fb1212bee8219440124014df94ba63870a41e6b920dfd49e578d680eeecce6855b2fc2adcc8ed385030c5c48ca7bcd03389197bb53353f8b7dc68775a60f377 +EBUILD polkit-0.109-r1.ebuild 3136 SHA256 eb0842783ca9010e38df53f603175fbf43156ddaf61cc360df411c737592e7b2 SHA512 d84b54960052328bd344510d16900fac726cc5434cd2b9fcd4a2a35296a1e6e024f95f5887d0c64e4a70be3838341e598409f0abbb743fe7f1fb25cdbadd3b62 WHIRLPOOL 3bb20ff93fb5b63a9f4f5e517c3fe88ea6b0208ee98b01cec0796be90b6f622f71920ad8374d56a29f917a2f0741d0e3216d57bb8005320e2cd918d3832090f7 EBUILD polkit-0.109.ebuild 3079 SHA256 081600862a7da78d7fec6fd0a245cf6a36087efc76554b1c7fb01b73b37a9e72 SHA512 7478086fc95c1145ae2e3cb0a475c1ed763f9c1ede75bd354d2c9a07c3b9fa8dfc83d07fd3191bbff9af180b89f54af06f6e66f55e09a7c2dabfc40b8af6621c WHIRLPOOL dd9a706c77882a799daae0494fe8f00ad510e62ac298d1692af6882016090c3bcae0d9be41b40a6f48fbf968c19785131075890c379462c66605fcb3d73dfa44 -MISC ChangeLog 16709 SHA256 c792cfe882237b41100842bf3ff2162d1fb22a4ea60211c6925c58a1a14f5816 SHA512 65ae2f091eb351b55ec9cf347e2ccb22f4b295ab3e20e8e14f2ec4471d8b88b1cf454bced6ced1f14f661bf9e523eef35167eb4aeeb2ce97c0a8482033a3f999 WHIRLPOOL f04a1aab9df865c9f582ab004cf910e4ab7ad62e614141622de8976ffddc45fd3c8b2271f4a373be17c914a295a6c455e099af4f51d3b4eaf07ab00c8b9bb3ec +MISC ChangeLog 16934 SHA256 6ca05b3118af10e06ccd51ae366d53f8083377118118766ac8e7ea7f4a0990c0 SHA512 983394a625bc7228adae477122c9bb4bbd5f33464c4e152f1e25e01b074ed6fe597cbf982729aa0d7205bf1eb01eb91fdb8eb53d02112f7f89086e39f66f959c WHIRLPOOL 1a085f25de838db2db342369ce9931ebc92ed76c3fd5aa5829bb454e6381fd7feba3a3cd59c1a1f5a59b6278fd569dcced4327b973afb83994af6b4e8b2ece5d MISC metadata.xml 516 SHA256 be8c8239fecd14fd1a9c1dee11ccb98b1188aceacf6ea58233a0f958ab648aba SHA512 293585c3b4c95b76af687f398645982d84d583e3cbf039a181c67c9710a899dad34cba9ff43f7be03a00d7552f42f0ac0a2a997c3ce7c9b80097a43f501001d4 WHIRLPOOL 4caf1316226570bec927b20957e420217a490c91013154b84f56fddf50cd5b525ccd0fd736a305ef5bc772cca734aadd8fec757238021b3e05046b503468e1a5 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iQEcBAEBCAAGBQJQ1HksAAoJEEdUh39IaPFNhdwH/RK2JXAczZU/BYt5ejVQszLQ +84fSSlFDea5WHCr1SwZcUXVQ0/W0uNcyxdiCHKTj/t2xax6d085xhKJM2U/2jsCR +NANjzyTO5Kc7R6/V1J/W/zbqNlSny+J9mEaGS3+W8MGtCfMPLbt1v4WbRGv67dmD +vnBs5tAecca7rRlvzulWkb1GA/xh008Sf6h0fz8x7v0b4lYF6MMf8eHdIs6peT+c +4kZdbdbAB65RoT1Meas4NeDWoBxhBudlyzll8s3yHzEpbG95/dMHVaUcXqUg3r9y ++q+uTSEdrbHYfRdNTdm2BTLkSRfU+COqlc0O+2hLfzK6IgdvT+DUzC29sYvXHNA= +=bNSS +-----END PGP SIGNATURE----- diff --git a/sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch b/sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch new file mode 100644 index 000000000000..cf00b929c021 --- /dev/null +++ b/sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch @@ -0,0 +1,58 @@ +From d6acecdd0ebb42e28ff28e04e0207cb01fa20910 Mon Sep 17 00:00:00 2001 +From: David Zeuthen <zeuthen@gmail.com> +Date: Wed, 19 Dec 2012 19:28:29 +0000 +Subject: Set XAUTHORITY environment variable if is unset + +The way it works is that if XAUTHORITY is unset, then its default +value is $HOME/.Xauthority. But since we're changing user identity +this will not work since $HOME will now change. Therefore, if +XAUTHORITY is unset, just set its default value before changing +identity. This bug only affected login managers using X Window +Authorization but not explicitly setting the XAUTHORITY variable. + +You can argue that XAUTHORITY is broken since it forces uid-changing +apps like pkexec(1) to do more work - and get involved in intimate +details of how X works and so on - but that doesn't change how things +work. + +Based on a patch from Peter Wu <lekensteyn@gmail.com>. + +https://bugs.freedesktop.org/show_bug.cgi?id=51623 + +Signed-off-by: David Zeuthen <zeuthen@gmail.com> +--- +diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c +index 840eb3c..da9784a 100644 +--- a/src/programs/pkexec.c ++++ b/src/programs/pkexec.c +@@ -608,6 +608,28 @@ main (int argc, char *argv[]) + g_ptr_array_add (saved_env, g_strdup (value)); + } + ++ /* $XAUTHORITY is "special" - if unset, we need to set it to ~/.Xauthority. Yes, ++ * this is broken but it's unfortunately how things work (see fdo #51623 for ++ * details) ++ */ ++ if (g_getenv ("XAUTHORITY") == NULL) ++ { ++ const gchar *home; ++ ++ /* pre-2.36 GLib does not examine $HOME (it always looks in /etc/passwd) and ++ * this is not what we want ++ */ ++ home = g_getenv ("HOME"); ++ if (home == NULL) ++ home = g_get_home_dir (); ++ ++ if (home != NULL) ++ { ++ g_ptr_array_add (saved_env, g_strdup ("XAUTHORITY")); ++ g_ptr_array_add (saved_env, g_build_filename (home, ".Xauthority", NULL)); ++ } ++ } ++ + /* Nuke the environment to get a well-known and sanitized environment to avoid attacks + * via e.g. the DBUS_SYSTEM_BUS_ADDRESS environment variable and similar. + */ +-- +cgit v0.9.0.2-2-gbebe diff --git a/sys-auth/polkit/polkit-0.109-r1.ebuild b/sys-auth/polkit/polkit-0.109-r1.ebuild new file mode 100644 index 000000000000..ff1646e9cbba --- /dev/null +++ b/sys-auth/polkit/polkit-0.109-r1.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-auth/polkit/polkit-0.109-r1.ebuild,v 1.1 2012/12/21 14:59:13 ssuominen Exp $ + +EAPI=5 +inherit eutils multilib pam pax-utils systemd user + +DESCRIPTION="Policy framework for controlling privileges for system-wide services" +HOMEPAGE="http://www.freedesktop.org/wiki/Software/polkit" +SRC_URI="http://www.freedesktop.org/software/${PN}/releases/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="examples gtk +introspection kde nls pam selinux systemd" + +RDEPEND=">=dev-lang/spidermonkey-1.8.5-r2 + >=dev-libs/glib-2.32 + >=dev-libs/expat-2 + introspection? ( >=dev-libs/gobject-introspection-1 ) + pam? ( + sys-auth/pambase + virtual/pam + ) + selinux? ( sec-policy/selinux-policykit ) + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND} + app-text/docbook-xml-dtd:4.1.2 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-util/intltool + virtual/pkgconfig" +PDEPEND=" + gtk? ( || ( + >=gnome-extra/polkit-gnome-0.105 + lxde-base/lxpolkit + ) ) + kde? ( sys-auth/polkit-kde-agent ) + pam? ( + systemd? ( sys-auth/pambase[systemd] ) + !systemd? ( sys-auth/pambase[consolekit] ) + ) + !systemd? ( >=sys-auth/consolekit-0.4.5_p2012[policykit] )" + +QA_MULTILIB_PATHS=" + usr/lib/polkit-1/polkit-agent-helper-1 + usr/lib/polkit-1/polkitd" + +pkg_setup() { + local u=polkitd + local g=polkitd + local h=/var/lib/polkit-1 + + enewgroup ${g} + enewuser ${u} -1 -1 ${h} ${g} + esethome ${u} ${h} +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-XAUTHORITY-fallback.patch + + sed -i -e 's|unix-group:wheel|unix-user:0|' src/polkitbackend/*-default.rules || die #401513 + + if has_version '>=dev-lang/spidermonkey-1.8.7'; then + sed -i \ + -e '/mozjs/s:185:187:g' \ + configure src/polkitbackend/polkitbackendjsauthority.c || die + fi +} + +src_configure() { + econf \ + --localstatedir="${EPREFIX}"/var \ + --disable-static \ + --enable-man-pages \ + --disable-gtk-doc \ + $(use_enable systemd libsystemd-login) \ + $(use_enable introspection) \ + --disable-examples \ + $(use_enable nls) \ + "$(systemd_with_unitdir)" \ + --with-authfw=$(usex pam pam shadow) \ + $(use pam && echo --with-pam-module-dir="$(getpam_mod_dir)") \ + --with-os-type=gentoo +} + +src_compile() { + default + + # Required for polkitd on hardened/PaX due to spidermonkey's JIT + local f='src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest' + if has_version '>=dev-lang/spidermonkey-1.8.7[jit]'; then + pax-mark m ${f} + elif has_version '<dev-lang/spidermonkey-1.8.7'; then + pax-mark mr ${f} + fi +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc docs/TODO HACKING NEWS README + + fowners -R polkitd:root /{etc,usr/share}/polkit-1/rules.d + + diropts -m0700 -o polkitd -g polkitd + keepdir /var/lib/polkit-1 + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins src/examples/{*.c,*.policy*} + fi + + prune_libtool_files +} + +pkg_postinst() { + chown -R polkitd:root "${EROOT}"/{etc,usr/share}/polkit-1/rules.d + chown -R polkitd:polkitd "${EROOT}"/var/lib/polkit-1 +} |