diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2014-05-27 16:41:46 +0000 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2014-05-27 16:41:46 +0000 |
commit | 51d789403607824838ca17be93e4c2b11b4c453f (patch) | |
tree | f70bae73c4082144d3640cb7169421610478396d /app-laptop | |
parent | install mans (diff) | |
download | historical-51d789403607824838ca17be93e4c2b11b4c453f.tar.gz historical-51d789403607824838ca17be93e4c2b11b4c453f.tar.bz2 historical-51d789403607824838ca17be93e4c2b11b4c453f.zip |
Fix newer kernel compatibility, bug#511110, thanks to Stefan Huber
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64
Manifest-Sign-Key: 0xBF20DC51
Diffstat (limited to 'app-laptop')
4 files changed, 205 insertions, 9 deletions
diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog index cdfeff7a8269..c0cd0d01a1f0 100644 --- a/app-laptop/laptop-mode-tools/ChangeLog +++ b/app-laptop/laptop-mode-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-laptop/laptop-mode-tools # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.86 2014/05/11 07:22:10 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.87 2014/05/27 16:41:38 alonbl Exp $ + +*laptop-mode-tools-1.64-r1 (27 May 2014) + + 27 May 2014; Alon Bar-Lev <alonbl@gentoo.org> + +files/laptop-mode-tools-1.64-ethernet-power.patch, + +laptop-mode-tools-1.64-r1.ebuild: + Fix newer kernel compatibility, bug#511110, thanks to Stefan Huber 11 May 2014; Samuli Suominen <ssuominen@gentoo.org> laptop-mode-tools-1.64.ebuild: diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest index b8d2f1bab02f..d376c5e78b26 100644 --- a/app-laptop/laptop-mode-tools/Manifest +++ b/app-laptop/laptop-mode-tools/Manifest @@ -5,22 +5,20 @@ AUX laptop-mode-tools-1.63-conf.patch 897 SHA256 14015701ccb746cce4f58ba65b91991 AUX laptop-mode-tools-1.63-killall.patch 1306 SHA256 5d72130167c5d2156e86ba34e5faa2ac6f686d27406faa620175c5949ee092fb SHA512 4b2cf85d083e0afdf67221ef3d18f1e084456add387c4e3bdefc88ee26ec1b7fb648c52668798dc3765494c423809c2b421af5a966579bd722fc65a897ae63d8 WHIRLPOOL 3611c604c594d20611b8fac96f7907613101877dcb23e6e16b59b6864138b1b307970a1805b20486fccfea53fda869ff743bf9743ebb57e21b03d04562d3e27a AUX laptop-mode-tools-1.63-pcie-aspm-silencing-stderr.patch 1604 SHA256 a9d14760c0ee0bde93f04fb369da00c35ac61e04393f1697a9fb7bf7030dc818 SHA512 c1d6fefb486d9ceb47f19f1b173d76c2a7244f4ed6da2c3752b3a4cbd4064964c34365aa62f114efd21d572986551cb4f74c7990cf78bbb70d845f8e0c59a94c WHIRLPOOL d739756d45cac564237a544df19491df2cce4cc121e50407f703a8dc3c3845c96abdd41cd080edf23b9f988fc148297e2afcee7eaa5e42967afbb17e97995617 AUX laptop-mode-tools-1.63-udevadm.patch 982 SHA256 1064eb82ca18cc5af894c95e93da9b26576d47c741b0c40b7c94de6c1f305566 SHA512 9864cefb6b56f1f08084e65925aa6932e3af0157de9013b812cbbea22715399089de7863e0a716500f7eb146e18452c81534de247836d2a366dee8a7418868ee WHIRLPOOL 357872197e92a0e5e62114ba0000dfc5a07e523401531d7bb311121fd6b667e27f37687bce250ab30951ffeb3f7275cd6baa632e6551c0562c7afec35c1b3bfe +AUX laptop-mode-tools-1.64-ethernet-power.patch 3767 SHA256 7341a4e10d9aeb6e9c6e6120c8bdb9e8e0c050254ca7ae6c3d8e82c0f33bfb7f SHA512 a829026181c44646df3c6472fb5aa86117b1ab8226696d70a95fca1e10834477a9cff1798bfb3d7fa36232944d3bba556a7062ea5ac964751df15a52564de7f3 WHIRLPOOL e9aa7a5747b8eaac5347390f36f965c158ad6ead4642142fc651ecd328799be0ff9ab09235f31cf37ec63a4d448be09ce9168d20e3c6f484d8df0e91fea39a45 AUX laptop_mode.init-1.4 1190 SHA256 90a18e5c7e4d0b264bb51deb7b92ff25b508a3ddd75dd6c849fdc48c07ce4fda SHA512 47e67d54ed8005a864c017f4ef063c8a17286c6f8a260984fda96392e6461a3f0c5e4f17f8cf2272b072c1545b8f8e99fe45579a81b4d08a99e1eeb46f400fe5 WHIRLPOOL 7a87608d947be301400f2f1a0294a60f21e2cd1b6bed961788f7fc018bf4ac32d69a50e11e735db3cb6c000174ebd78e59f7ac0cd474bef3b803872b6a6665e5 DIST laptop-mode-tools_1.63.tar.gz 107339 SHA256 04b9bf8cce4172a810ce4026e75e0e7bfd0e05e456bbf3f13b8e9b4178d2c65b SHA512 41e48483883556541e3c5882cff2b029395d1814902d979b36e3db66385dcb22821d99ab2d0720b24b48c23afe02c94692d6222afd268a38063a1bb2bfe4c87a WHIRLPOOL 4d2b26fbe66cfa706ad660800936f2d795e493234b9154e3267db81bd476e5cb0b2f9c528d0df895238ea1ce618e2a3d87739ec5ae5dec367a787feb9dcedf79 DIST laptop-mode-tools_1.64.tar.gz 110165 SHA256 68b2016f51759285755a79a187a35466a4e46a7cfe4ef05bb1fcac7036c29605 SHA512 539388f5a86fc73a171aadafe8d3a04385cadedb41d3cb53822d4ad55b77262a82e717bfa910ec64c1ebba4d14cc02c9e1fab575c752ef8a77c2f67a023c8188 WHIRLPOOL 7201b1a69ea4265a1be9c659286a720cbfd66d840c43706a7f8099959b481fb1c018a2cb5f76c4bf7fdecbdcd3974da207e7af2b4439321b1961c87123a8900a EBUILD laptop-mode-tools-1.63-r2.ebuild 2790 SHA256 4ca62dc6a2ba4da239e1aba6d291f4cd5a8be301bba9dee6a75b7882f55b04e8 SHA512 55bd56508326541bacf149f393b7d415950dc95b37433474d00bd6f11f5cb27ac5a12fa09e02b91b455e5293e48e2d27b1fad8bac1088a605e75499b02111da6 WHIRLPOOL 572aba24e85060fbd365acd1e29547b7b5c9823eb48ef2808d77c86bd7d18f4ee0b25410c14aa60fb7a855e3cb51413f495fd18dd5b15220c03df83658a1a85a EBUILD laptop-mode-tools-1.63-r3.ebuild 2875 SHA256 8f193e8b62a07991711027a58056b675043e68ec3892e28f6046371f78428c22 SHA512 6fc004db648a92adcca876bfe887c8e4e7f796f2838f412f2126583719897d2fa4db7ab6a3089b718b865d2aa8117859b53d5013fc623f44cfdcbaec808778d2 WHIRLPOOL e9008fb7a3acbfb94000be27f2d70af80eeeb61b477c824426e0f67d70fee91c47d81b433e7636efe73ac7360427b26e1f3cd24398ba3429ff5a83e1a771b9e0 +EBUILD laptop-mode-tools-1.64-r1.ebuild 2762 SHA256 5c0706d251c162d496e1248427cdf8e72b10c9ea706299f2d1833126f8d495d3 SHA512 9421dcda1dfd0f5e9b41862d66cf42705438413240aa455cc3444e7ff7d77b0c2dc3ed22f29924a31905e8a30bf311135b01aef1178a5dceac8fd5a7588eba0b WHIRLPOOL 33d70b8d41399fb174827ddeea0166b3b3593930d50d163746415f25c5e11296fd76bfbe5c9d349d5d1718564668dc14e781acb4a5238153143bd225e6490aba EBUILD laptop-mode-tools-1.64.ebuild 2711 SHA256 a451ec6bc012a3749a303fde487cd8383bcf376a5b56e7cb0422df7f76d2cf2c SHA512 2b7e2ee02be5a8683a9fcd69cc4ff8fb64cb31915526a91c2f0df735002813549bdbbf1a9d407764fd2724bd8353ca5124caaf5590235f8d7c2d26d0b4c0d26e WHIRLPOOL c4669867b9579ea95566b28eb282e9b330aae0fcef8003cdd5f418604d1a0dabb59e7605893b307bb01e6cc3ac9ee3707757005c1d2ac0d0d01216b42562b961 -MISC ChangeLog 17266 SHA256 2dbe689edc984a07a79e4bedc7300d22c786f49e2be35103e567c1510e250834 SHA512 ea41eeea1d0af0d93871dbd75d3804ce7c6159dd593d5b62c0955ea24d749ec84321fdb23cd0f8107a18d56ed5289aa5804be8f85104ccdf72412410eaa60087 WHIRLPOOL a57c57adfb1e32b3f5ab234d0da914c9d1949699b5a1c1c3b97bd1341d28d863b8222e6190037296d2bbabf47261d92a176917795ddf00462fb188cc893e5a6d +MISC ChangeLog 17514 SHA256 49700896bf2dc732de2e80645a8b71fead3ed7d2013428e61aabfe8068645607 SHA512 c8d7ec563285dcb2ea0c3c2833349926883a8a71f94c7ec9988a55a56e859ce284bce7d3a9384ae84518618ef9c9043215729ee79502f8aec93c2707e54f830f WHIRLPOOL b24e934c0e835b34a05e2dac30ea3d3f425104a19477d6b5c9f12a4edfa937b21bd41987f660bf2d8e18c450ae3a8d658501ff384a6042e9b86f210dfcd26091 MISC metadata.xml 420 SHA256 2008caffae78c8d0c6a04f0b4b4768d2a9d2b9f62d96409141cd2e579f622749 SHA512 5bd05a4b5ce71343b10a46b57cd73b071c399062bb9813bcb9d9e329e1a4804a6b1f5489e6004626a9daa84e9b0ca399b0209d844dd0adb0c185a18adc535946 WHIRLPOOL ea091eb7cc936602de9e1179231f9fd8bb78ab447abd72b505be870b79acf50056a4610a56c4ab7c1585957ee44d2f85d47248eeee47f10cf860b8ac6b8535b4 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQEcBAEBCAAGBQJTbyTdAAoJEEdUh39IaPFN1O4H/1nsyuLwQEOAc0ELWpC2FGqp -AbSMx6ed9QZr+dIdR1tq62WQwzdSCnLeikvr4ernfsHURRRhLaUaaQtIkN3famV7 -lvtIUQZ/KL2s2jjLzwMTvZdUyrG2KuRhZgsJ6VSInbysrlr90U0fdhAeW8z69emK -HHRPSdy6IElS66XD6ICOhuEng+JzB6/3Lr0KJPupLYYpGvwYC1EFw4GGdSGmzXgp -z1/aRlIV0/XocssOd9xzhprmWIhIq2otCWC7/FrZVrw61SAAlvNZETiFt5Cwr97l -u3kchy24cKKDQ6Oqu7bhXdndVThq8NbTi2VmN2d2rg+kx01W6Nb4uhaVVNV7zPk= -=rcHe +iF4EAREIAAYFAlOEwEcACgkQXYk9GL8g3FGg3wD8DUXQ6cITDwJ0WxVCTE59dFit +o6PzJhs+DdyD39RUwJ4A/i5nYXkMr7SNXF8W3fCSjCms2ofrcNA53YeSZidjyYwX +=LgQP -----END PGP SIGNATURE----- diff --git a/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.64-ethernet-power.patch b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.64-ethernet-power.patch new file mode 100644 index 000000000000..315f10982f88 --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.64-ethernet-power.patch @@ -0,0 +1,97 @@ +From c55b44f656c88aa1ef7307664f7040407d23e0de Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Tue, 27 May 2014 19:35:11 +0300 +Subject: [PATCH] ethernet: replace sysfs/enabled by 'ip link down' + +backport of 8fff5eb2bfdde0 +--- + usr/share/laptop-mode-tools/modules/ethernet | 59 +++++++++++----------------- + 1 file changed, 22 insertions(+), 37 deletions(-) + +diff --git a/usr/share/laptop-mode-tools/modules/ethernet b/usr/share/laptop-mode-tools/modules/ethernet +index 6fd06e2..0c922e2 100755 +--- a/usr/share/laptop-mode-tools/modules/ethernet ++++ b/usr/share/laptop-mode-tools/modules/ethernet +@@ -24,6 +24,13 @@ if [ x$CONTROL_ETHERNET = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_ETHE + MIITOOL=/bin/false + fi + ++ if [ -x /bin/ip ]; then ++ IPTOOL=/bin/ip ++ else ++ log "VERBOSE" "ip is not installed" ++ IPTOOL=/bin/false ++ fi ++ + + if [ $ON_AC -eq 1 ]; then + if [ "$ACTIVATE" -eq 1 ]; then +@@ -52,43 +59,7 @@ if [ x$CONTROL_ETHERNET = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_ETHE + fi + + for DEVICE in $ETHERNET_DEVICES ; do +- DISABLED=0 +- path=`readlink -f /sys/class/net/$DEVICE` +- dev_path="" +- log "VERBOSE" "ethernet: $path" +- if ! [ -z $path ]; then +- if [ -d $path/device ]; then +- dev_path=`readlink -f $path/device` +- log "VERBOSE" "ethernet: $dev_path" +- fi +- fi +- +- if ! [ -z $dev_path ] && [ -f $dev_path/enable ]; then +- if [ x$DISABLE_ETHERNET = x1 ]; then +- if [ -f $dev_path/enable ]; then +- echo 0 > $dev_path/enable +- log "VERBOSE" "ethernet: Disabling ethernet device $DEVICE" +- DISABLED=1 +- fi +- elif [ x$DISABLE_ETHERNET = x0 ]; then +- if [ -f $dev_path/enable ]; then +- echo 1 > $dev_path/enable +- log "VERBOSE" "ethernet: Re-enabling ethernet device $DEVICE" +- DISABLED=0 +- fi +- elif [ x$DISABLE_ETHERNET = x2 ]; then +- DISABLED=0 # Be safe. :-) +- else +- DISABLED=0 # Same here. Be safe. :-) +- # For all other cases also, just disable it. +- fi +- else +- log "VERBOSE" "$DEVICE does not seem to be supporting enable/disable" +- fi +- +- if [ x$DISABLED = x1 ]; then +- continue +- fi ++ log "VERBOSE" "ethernet: $DEVICE" + + # Wakeup-on-LAN handling + if [ x$DISABLE_WAKEUP_ON_LAN = x1 ] ; then +@@ -152,6 +123,20 @@ if [ x$CONTROL_ETHERNET = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_ETHE + log "VERBOSE" "Could not restore speed for $DEVICE" + fi + fi ++ ++ # Shut down interface ++ if [ x$DISABLE_ETHERNET = x1 ]; then ++ if $IPTOOL link show $DEVICE | grep -q NO-CARRIER; then ++ log "VERBOSE" "ethernet: Disabling ethernet device $DEVICE" ++ $IPTOOL link set dev $DEVICE down ++ else ++ log "VERBOSE" "ethernet: Not disabling ethernet device $DEVICE with active carrier." ++ fi ++ elif [ x$DISABLE_ETHERNET = x0 ]; then ++ $IPTOOL link set dev $DEVICE up ++ log "VERBOSE" "ethernet: Re-enabling ethernet device $DEVICE" ++ fi ++ + done + else + log "VERBOSE" "Ethernet module is disabled." +-- +1.8.5.5 + diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.64-r1.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.64-r1.ebuild new file mode 100644 index 000000000000..a95e22804015 --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.64-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.64-r1.ebuild,v 1.1 2014/05/27 16:41:38 alonbl Exp $ + +EAPI=5 +inherit eutils multilib systemd udev + +MY_P=${PN}_${PV} + +DESCRIPTION="Linux kernel laptop_mode user-space utilities" +HOMEPAGE="http://www.samwel.tk/laptop_mode/" +SRC_URI="http://www.samwel.tk/laptop_mode/tools/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+acpi apm bluetooth scsi" + +RDEPEND="net-wireless/wireless-tools + sys-apps/ethtool + sys-apps/hdparm + sys-apps/which + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd ) + bluetooth? ( net-wireless/bluez:= ) + scsi? ( sys-apps/sdparm )" +DEPEND="" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}/${P}-ethernet-power.patch" + + # This should avoid conflict with pm-powersave wrt #327443 and #396703 + cat <<-EOF > "${T}"/${PN} + HOOK_BLACKLIST="00powersave" + EOF +} + +src_compile() { :; } + +src_install() { + DESTDIR="${D}" \ + INIT_D="none" \ + MAN_D="/usr/share/man" \ + LIB_D="/usr/$(get_libdir)" \ + UDEV_D="$(udev_get_udevdir)" \ + SYSTEMD_UNIT_D="$(systemd_get_unitdir)" \ + TMPFILES_D="/usr/$(get_libdir)/tmpfiles.d" \ + ACPI="$(use acpi && echo force || echo disabled)" \ + PMU="$(false && echo force || echo disabled)" \ + APM="$(use apm && echo force || echo disabled)" \ + SYSTEMD=yes \ + sh ./install.sh || die + + dodoc Documentation/*.txt README.md + newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode + + # See src_prepare() + insinto /etc/pm/config.d + doins "${T}"/${PN} +} + +pkg_postinst() { + if use acpi || use apm; then + if use acpi; then + daemon_name="acpid" + elif use apm; then + deamon_name="apmd" + fi + if [ "$(rc-config list default | grep laptop_mode)" = "" ] || [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "To enable automatic power state event handling," + ewarn "e.g. enabling laptop_mode after unplugging the battery," + ewarn "both laptop_mode and the ${daemon_name} daemon must be" + ewarn "added to default runlevel:" + if [ "$(rc-config list default | grep laptop_mode)" = "" ]; then + ewarn "# rc-update add laptop_mode default" + fi + if [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "# rc-update add ${daemon_name} default" + fi + fi + else + ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not" + ewarn "automatically disable laptop_mode on low battery." + ewarn + ewarn "This means you can lose up to 10 minutes of work if running" + ewarn "out of battery while laptop_mode is enabled." + ewarn + ewarn "Please see laptop-mode.txt in /usr/share/doc/${PF} for further" + ewarn "information." + ewarn + fi +} |