From e70bf5142f1e2a79740b85532b8f31e86315422b Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 23 Mar 2007 14:15:09 +0000 Subject: [PATCH] Fix aliasing QA, #171415. Package-Manager: portage-2.1.2.2 --- sys-apps/ifplugd/ChangeLog | 10 ++- sys-apps/ifplugd/Manifest | 29 ++++---- sys-apps/ifplugd/files/digest-ifplugd-0.28-r8 | 3 + .../files/ifplugd-0.28-strictalias.patch | 63 +++++++++++++++++ sys-apps/ifplugd/ifplugd-0.28-r8.ebuild | 70 +++++++++++++++++++ 5 files changed, 159 insertions(+), 16 deletions(-) create mode 100644 sys-apps/ifplugd/files/digest-ifplugd-0.28-r8 create mode 100644 sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch create mode 100644 sys-apps/ifplugd/ifplugd-0.28-r8.ebuild diff --git a/sys-apps/ifplugd/ChangeLog b/sys-apps/ifplugd/ChangeLog index c2c7c7d12865..8faa291b8656 100644 --- a/sys-apps/ifplugd/ChangeLog +++ b/sys-apps/ifplugd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/ifplugd -# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ChangeLog,v 1.43 2006/10/03 21:48:52 wolf31o2 Exp $ +# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ChangeLog,v 1.44 2007/03/23 14:15:09 uberlord Exp $ + +*ifplugd-0.28-r8 (23 Mar 2007) + + 23 Mar 2007; Roy Marples + +files/ifplugd-0.28-strictalias.patch, +ifplugd-0.28-r8.ebuild: + Fix aliasing QA, #171415. 03 Oct 2006; Chris Gianelloni ifplugd-0.28-r7.ebuild: diff --git a/sys-apps/ifplugd/Manifest b/sys-apps/ifplugd/Manifest index 72370421efe1..96fb48d4609a 100644 --- a/sys-apps/ifplugd/Manifest +++ b/sys-apps/ifplugd/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX ifplugd-0.28-interface.patch 314 RMD160 279d2241107413a3d818f7ec3658898a41300dae SHA1 5e139adab498de8b4e775f2a16673ee2a7717826 SHA256 1bdbe17f26f467be2a5f300f20f2f8aa332ffa48cbe50bfc4bbff37de8f1bc67 MD5 54eb22844b5aeed161c0b80aa9008570 files/ifplugd-0.28-interface.patch 314 RMD160 279d2241107413a3d818f7ec3658898a41300dae files/ifplugd-0.28-interface.patch 314 @@ -9,6 +6,10 @@ AUX ifplugd-0.28-nlapi.diff 639 RMD160 2fbf6329fb16118de0f1122aa41bca6a2906d0f3 MD5 d16fbcdc0a1c6f5be1aa3bf0c3a932f6 files/ifplugd-0.28-nlapi.diff 639 RMD160 2fbf6329fb16118de0f1122aa41bca6a2906d0f3 files/ifplugd-0.28-nlapi.diff 639 SHA256 f648c027fb446d0b25cc5dbca9db57dc33f5b8bff8dfbf1009847504f2229dfb files/ifplugd-0.28-nlapi.diff 639 +AUX ifplugd-0.28-strictalias.patch 1658 RMD160 2873f0375385d8a305c265bda4ea391156697086 SHA1 1b824596ca1184fcc6caac68417f03e79885c831 SHA256 733b317baa5b819b1f4191a0d5829411e41291997e0bf6cc3920cb9c834d1452 +MD5 1766a4fee9627ad85d48128443cdfbe4 files/ifplugd-0.28-strictalias.patch 1658 +RMD160 2873f0375385d8a305c265bda4ea391156697086 files/ifplugd-0.28-strictalias.patch 1658 +SHA256 733b317baa5b819b1f4191a0d5829411e41291997e0bf6cc3920cb9c834d1452 files/ifplugd-0.28-strictalias.patch 1658 AUX ifplugd.action 891 RMD160 1ee45a699b2402598cc4c6a18a3d294c4914a105 SHA1 e59bf81beb02b4ebf9c1d6538e00c473e3b78bf2 SHA256 55c88d2c773bc242e81f9fe310cd48999e69543fa8e0b2389c054e8890260015 MD5 e6174a8e4c2c6b451d78267453379a51 files/ifplugd.action 891 RMD160 1ee45a699b2402598cc4c6a18a3d294c4914a105 files/ifplugd.action 891 @@ -34,10 +35,14 @@ EBUILD ifplugd-0.28-r7.ebuild 1883 RMD160 3b255c638b118e94a53e2eb5dbc68a07c89d66 MD5 6901ce1b9eb864e0fece7e0f7e6f35ea ifplugd-0.28-r7.ebuild 1883 RMD160 3b255c638b118e94a53e2eb5dbc68a07c89d665a ifplugd-0.28-r7.ebuild 1883 SHA256 4ac56a354b00e062297bd98760d0decad9c2b60dbd23928d32ff882dc61e9b66 ifplugd-0.28-r7.ebuild 1883 -MISC ChangeLog 7600 RMD160 8020947ac73a26ece3ada5f55bd31d9b00b1b3c9 SHA1 a3f591e5c3c19768bb87cd9e638a5235c7b06e78 SHA256 e7a967e0220451a1324a699b7a6abd9da7c1a0fdee98a41f0fa985285e43b771 -MD5 cdb2dfb507549086826031b9a0d9b9f4 ChangeLog 7600 -RMD160 8020947ac73a26ece3ada5f55bd31d9b00b1b3c9 ChangeLog 7600 -SHA256 e7a967e0220451a1324a699b7a6abd9da7c1a0fdee98a41f0fa985285e43b771 ChangeLog 7600 +EBUILD ifplugd-0.28-r8.ebuild 1931 RMD160 f9908f23ecd9a1a7af8a59cc1d20991734c62a04 SHA1 82bf2777bea4966ca363014323d1836e1cfa2c39 SHA256 f2ec226c0e759530d334e89d80f38f2d169c2e28504f1e5cc4434504729acdeb +MD5 e1bbefed6266c3b40465bd2ec001aea1 ifplugd-0.28-r8.ebuild 1931 +RMD160 f9908f23ecd9a1a7af8a59cc1d20991734c62a04 ifplugd-0.28-r8.ebuild 1931 +SHA256 f2ec226c0e759530d334e89d80f38f2d169c2e28504f1e5cc4434504729acdeb ifplugd-0.28-r8.ebuild 1931 +MISC ChangeLog 7776 RMD160 ce123e3172b3d3435d1367c766353e2e4da34e8f SHA1 43bcb67317f7094e3473e11992b4c4f1971f9bee SHA256 5b2daefbff27c6e836b2197ccbb994fd623ed51f5aa8801e36a3fb42996ebb62 +MD5 e4700a287a35721f5241c0073ad47fc7 ChangeLog 7776 +RMD160 ce123e3172b3d3435d1367c766353e2e4da34e8f ChangeLog 7776 +SHA256 5b2daefbff27c6e836b2197ccbb994fd623ed51f5aa8801e36a3fb42996ebb62 ChangeLog 7776 MISC metadata.xml 359 RMD160 a6e7020e754414ebf691db22495b6adf36c080dc SHA1 bfd0c8a6a1dda10ea8b4b0feba1ba91cdf0bfc5a SHA256 c2255a7d82e88d539b6acdb44db885d353f8943602c36acbe256910d776ec955 MD5 d13433a9981e2386ff10934a71b003a6 metadata.xml 359 RMD160 a6e7020e754414ebf691db22495b6adf36c080dc metadata.xml 359 @@ -51,10 +56,6 @@ SHA256 b94ae260a7fcdbd983c2809b8df46f528f65e42a61fa3402316fb67bb17939e5 files/di MD5 83ebee09d9faecc03912ee8631d7f372 files/digest-ifplugd-0.28-r7 238 RMD160 f0dc5bf3ea7253ad7658562a12c7d2ed991069f1 files/digest-ifplugd-0.28-r7 238 SHA256 b94ae260a7fcdbd983c2809b8df46f528f65e42a61fa3402316fb67bb17939e5 files/digest-ifplugd-0.28-r7 238 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.5 (GNU/Linux) - -iD8DBQFFItrLkT4lNIS36YERAttXAKCDoeFq+67ws7y1cDbRMV1WALdMLwCgphpm -jWJ87zHSZKTvqcIL1lb4QrE= -=XoDE ------END PGP SIGNATURE----- +MD5 83ebee09d9faecc03912ee8631d7f372 files/digest-ifplugd-0.28-r8 238 +RMD160 f0dc5bf3ea7253ad7658562a12c7d2ed991069f1 files/digest-ifplugd-0.28-r8 238 +SHA256 b94ae260a7fcdbd983c2809b8df46f528f65e42a61fa3402316fb67bb17939e5 files/digest-ifplugd-0.28-r8 238 diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.28-r8 b/sys-apps/ifplugd/files/digest-ifplugd-0.28-r8 new file mode 100644 index 000000000000..d58875572dca --- /dev/null +++ b/sys-apps/ifplugd/files/digest-ifplugd-0.28-r8 @@ -0,0 +1,3 @@ +MD5 df6f4bab52f46ffd6eb1f5912d4ccee3 ifplugd-0.28.tar.gz 142677 +RMD160 09914a1914a4432822bb660d6aef194debe688f1 ifplugd-0.28.tar.gz 142677 +SHA256 474754ac4ab32d738cbf2a4a3e87ee0a2c71b9048a38bdcd7df1e4f9fd6541f0 ifplugd-0.28.tar.gz 142677 diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch b/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch new file mode 100644 index 000000000000..3c5de8a2e731 --- /dev/null +++ b/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch @@ -0,0 +1,63 @@ +--- src/interface.c.orig 2007-03-23 13:29:40.000000000 +0000 ++++ src/interface.c 2007-03-23 13:30:05.000000000 +0000 +@@ -89,6 +89,10 @@ + + interface_status_t interface_detect_beat_mii(int fd, char *iface) { + struct ifreq ifr; ++ union { ++ caddr_t *data; ++ unsigned short *usz; ++ } ifd; + + if (interface_auto_up) + interface_up(fd, iface); +@@ -103,7 +107,8 @@ + return IFSTATUS_ERR; + } + +- ((unsigned short*) &ifr.ifr_data)[1] = 1; ++ ifd.data = &ifr.ifr_data; ++ *++ifd.usz = 1; + + if (ioctl(fd, SIOCGMIIREG, &ifr) == -1) { + if (interface_do_message) +@@ -112,12 +117,17 @@ + return IFSTATUS_ERR; + } + +- return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; ++ ifd.usz += 2; ++ return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; + } + + interface_status_t interface_detect_beat_priv(int fd, char *iface) { + struct ifreq ifr; +- ++ union { ++ caddr_t *data; ++ unsigned short *usz; ++ } ifd; ++ + if (interface_auto_up) + interface_up(fd, iface); + +@@ -131,7 +141,8 @@ + return IFSTATUS_ERR; + } + +- ((unsigned short*) &ifr.ifr_data)[1] = 1; ++ ifd.data = &ifr.ifr_data; ++ *++ifd.usz = 1; + + if (ioctl(fd, SIOCDEVPRIVATE+1, &ifr) == -1) { + if (interface_do_message) +@@ -140,7 +151,8 @@ + return IFSTATUS_ERR; + } + +- return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; ++ ifd.usz += 2; ++ return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; + } + + interface_status_t interface_detect_beat_ethtool(int fd, char *iface) { diff --git a/sys-apps/ifplugd/ifplugd-0.28-r8.ebuild b/sys-apps/ifplugd/ifplugd-0.28-r8.ebuild new file mode 100644 index 000000000000..ff0b87dc4bad --- /dev/null +++ b/sys-apps/ifplugd/ifplugd-0.28-r8.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.28-r8.ebuild,v 1.1 2007/03/23 14:15:09 uberlord Exp $ + +inherit eutils + +DESCRIPTION="Brings up/down ethernet ports automatically with cable detection" +HOMEPAGE="http://0pointer.de/lennart/projects/ifplugd/" +SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="doc" + +DEPEND="dev-util/pkgconfig + doc? ( www-client/lynx ) + >=dev-libs/libdaemon-0.5" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-nlapi.diff" + epatch "${FILESDIR}/${P}-interface.patch" + epatch "${FILESDIR}/${P}-strictalias.patch" +} + +src_compile() { + econf $(use_enable doc lynx) \ + --with-initdir=/etc/init.d \ + --disable-xmltoman \ + --disable-subversion \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + # Remove init.d configuration as we no longer use it + rm -rf "${D}/etc/ifplugd" "${D}/etc/init.d/${PN}" + + dodir "/etc/${PN}" + exeinto "/etc/${PN}" + newexe "${FILESDIR}/${PN}.action" "${PN}.action" || die + + cd "${S}/doc" + dodoc README SUPPORTED_DRIVERS + use doc && dohtml *.{html,css} +} + +pkg_postinst() { + # Warn about old init script + einfo "baselayout now starts ifplugd automatically on wired interfaces" + einfo "If you do not want this behaviour then add !plug to your modules" + einfo "in /etc/conf.d/net like so" + einfo " modules=( \"!plug\" )" + + if [[ -e "${ROOT}/etc/init.d/ifplugd" \ + || -e "${ROOT}/etc/conf.d/ifplugd" ]] ; then + echo + ewarn "You should stop the ifplugd service now and remove its init" + ewarn "script and config file" + if [[ ${ROOT} == "/" ]] ; then + ewarn " /etc/init.d/ifplugd stop" + ewarn " rc-update del ifplugd" + ewarn " rm -f /etc/{conf,init}.d/ifplugd" + fi + fi +} -- 2.26.2