diff options
author | 2012-02-06 01:07:08 +0700 | |
---|---|---|
committer | 2012-02-06 01:07:08 +0700 | |
commit | 5cee2a96cad2813e8cc3d0f33e82d80908057ac3 (patch) | |
tree | b33a0faddbdf96218fa864a7a82c202d547d313c | |
parent | synfigstudio-0.63.03 (diff) | |
download | gentoo-vn-5cee2a96cad2813e8cc3d0f33e82d80908057ac3.tar.gz gentoo-vn-5cee2a96cad2813e8cc3d0f33e82d80908057ac3.tar.bz2 gentoo-vn-5cee2a96cad2813e8cc3d0f33e82d80908057ac3.zip |
many new apps: bino, openshot, umplayer, networkmanager, performous,
posterazor
19 files changed, 1102 insertions, 7 deletions
diff --git a/app-misc/posterazor/posterazor-1.5.ebuild b/app-misc/posterazor/posterazor-1.5.ebuild new file mode 100644 index 0000000..2ea01da --- /dev/null +++ b/app-misc/posterazor/posterazor-1.5.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" +inherit eutils +#Source Releases/1.5/PosteRazor-1.5-Source.zip + +MY_P=PosteRazor-${PV}-Source +SRC_URI="mirror://sourceforge/${PN}/Source Releases/${PV}/${MY_P}.zip" + +DESCRIPTION="PosteRazor cuts raster images into multipage PDF documents." +HOMEPAGE="http://posterazor.sourceforge.net/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="" + +src_compile() { +unzip ${DISTDIR}/${MY_P}.zip -d ${WORKDIR} +} +src_install() { + cd ${WORKDIR}/${MY_P}/ + cmake + rm ${WORKDIR}/${MY_P}/papagayo.ic* + insinto /usr/share/${PN} + doins -r ${WORKDIR}/${MY_P}/* + exeinto /usr/bin + doexe ${FILESDIR}/papagayo + dodoc ${WORKDIR}/${MY_P}/*.txt ${WORKDIR}/${MY_P}/rsrc/*.html + doicon ${WORKDIR}/${MY_P}/rsrc/papagayo.jpg + make_desktop_entry papagayo Papagayo +} diff --git a/dev-cpp/ETL/ETL-0.04.14.ebuild b/dev-cpp/ETL/ETL-0.04.14.ebuild new file mode 100644 index 0000000..529569b --- /dev/null +++ b/dev-cpp/ETL/ETL-0.04.14.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +DESCRIPTION="VoriaETL is a multiplatform class and template library which complements and supplements the C++ STL" + +HOMEPAGE="http://www.synfig.org" + +SRC_URI="mirror://sourceforge/synfig/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +src_install() { + emake DESTDIR="${D}" install || die "Install failed!" +} diff --git a/dev-cpp/ETL/Manifest b/dev-cpp/ETL/Manifest new file mode 100644 index 0000000..d0288e4 --- /dev/null +++ b/dev-cpp/ETL/Manifest @@ -0,0 +1,2 @@ +DIST ETL-0.04.14.tar.gz 361307 RMD160 5ed53e588e9f9daf8b05d7fd693c4bfe9607f733 SHA1 04279fd919918d99f0dab05bdfdbd56ba3385d4f SHA256 af45666e53c50566214622ba00f29be4331a5ac0a1352eb550a2c5fd1057a2e5 +EBUILD ETL-0.04.14.ebuild 452 RMD160 36c134d7b9102aed2604376f0a63579ef48ec6f4 SHA1 cb07133d314c7a00d512da9e50f34275ce106099 SHA256 1a422bd06cb034634dd10b2e9d511293f9ab3ca2b0020827ccf8a8e0044512a3 diff --git a/games-arcade/performous/Manifest b/games-arcade/performous/Manifest index c87bf08..0189ed4 100644 --- a/games-arcade/performous/Manifest +++ b/games-arcade/performous/Manifest @@ -1,12 +1,7 @@ AUX performous-gentoopaths.patch 2221 RMD160 022dad2c9b43bacdc3440d600c9a082c331a25d1 SHA1 4c80d00de213b0ab53b7fe0756527c1ce668de5c SHA256 c16f93491528774861571258463f480ec2d2f55759fd49ae2adfa2ae9af533e3 -DIST Performous-0.4.0-Source.tar.bz2 3718022 RMD160 155607c7a640196aaf537efcecd88da84b886127 SHA1 44bcc39618cb08957da3815ed9f13af6d90f93ed SHA256 4688546a70b09837311e428c233bac091ce5301c7dd4efe21137ca8867af8be0 -DIST Performous-0.5.1-Source.tar.bz2 3735453 RMD160 0fba1289770058800df1b4364fc2451a7a528a9c SHA1 bd8a76f0629e9366daa907d32ff76365f4b8b4a8 SHA256 6b7bee1301b0f2b1e0feaf4864f5d51bbe709810898dc0de5e5f9c332effa1e6 DIST Performous-0.6.0-Source.tar.bz2 3749230 RMD160 53095b64599d8a7368656b77e96cc7893b571eac SHA1 6c7a26354421fdfa3e2a87fdc0702efbec024186 SHA256 8eaefaeff64aa44628de96c9bd5de85e09c3657a62d17b32f92dbb9eba809c6c DIST ultrastar-songs-jc-1.zip 242698201 RMD160 b541ad7df65a9280d1f5eb8b9891083ffff797d9 SHA1 baf4287e50b8fc4d43d9719b113d04d006a0460e SHA256 b3a6f980926c4f1ce40bc763a406040855600ad005f4daa54e0ac324ce99a9ba DIST ultrastar-songs-libre-3.zip 5289866 RMD160 98e9c4ab2364c1c26cb0f51e61c4026f43199868 SHA1 10add8daf1767671eb8b7d10927e93ea5ab73d5f SHA256 739d1c678bb7c786499f5216faee420b9b56633142928aff60a7282dae755489 DIST ultrastar-songs-restricted-3.zip 10242651 RMD160 7eb59b4db7968097db8f850f475e32a9ecbab889 SHA1 fd4e373104df543e44e273d294c39bd7baf6923b SHA256 e05d81333f85e2c6c271a67f90beac453d64eac78cd95eec7214721182257a82 DIST ultrastar-songs-shearer-1.zip 50411551 RMD160 20ea920aa05c489903988bf31edff467012d4921 SHA1 49d64f914cfd77cc39dcaa14b00a5b4c5df3f112 SHA256 967c3dfae2da2915a66fd9dfee14da7191e13bb95e8b0820049d109c21f25628 -EBUILD performous-0.4.0.ebuild 2722 RMD160 2d03a69b4455acd1c9e8d2e8b1e0a457f05158e2 SHA1 35e94a734d9896cd5673bc14006bb68fb2945c48 SHA256 da3f86e4b42d4fc4e3ea4e0d6c64f72322ae2bd92259a47f05d7d9e3adbb98d0 -EBUILD performous-0.5.1.ebuild 2716 RMD160 38e2d8de6f3ca2a4fb072b54aee850d2cb20fb32 SHA1 90a5d6f67afef35799d955fc4444cfaf303544d7 SHA256 8cca5f71be01458e2bdcf192966ca0b32fc70e8e6338b5f02961cd388759c244 -EBUILD performous-0.6.0.ebuild 2852 RMD160 3be7345812310e921b9d5e85d1b8de82ad53fae7 SHA1 9d31f669e82b43597010a897565d20458c8e932c SHA256 5f879ea0901b784e4d4481cf3eb85006dd3f9e72050e19b31252ca73d9266ad8 -EBUILD performous-9999.ebuild 2852 RMD160 3be7345812310e921b9d5e85d1b8de82ad53fae7 SHA1 9d31f669e82b43597010a897565d20458c8e932c SHA256 5f879ea0901b784e4d4481cf3eb85006dd3f9e72050e19b31252ca73d9266ad8 +EBUILD performous-0.6.0.ebuild 2850 RMD160 b46879e399eccea501d75098a2a6e0dc2e7e8385 SHA1 394e70f937caa2bce069c19aac0b30b33bc2ad11 SHA256 ad1ab67e687bfdb633488aa42b912d85860194a0f9c61fc24d5e6e2e208674f9 diff --git a/games-arcade/performous/performous-0.6.0.ebuild b/games-arcade/performous/performous-0.6.0.ebuild index 7eb426c..336a520 100644 --- a/games-arcade/performous/performous-0.6.0.ebuild +++ b/games-arcade/performous/performous-0.6.0.ebuild @@ -34,7 +34,7 @@ LICENSE="GPL-2 CCPL-Attribution-NonCommercial-NoDerivs-2.5 )" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="debug midi songs tools webcam" diff --git a/gnome-extra/nm-applet/Manifest b/gnome-extra/nm-applet/Manifest new file mode 100644 index 0000000..0a993a6 --- /dev/null +++ b/gnome-extra/nm-applet/Manifest @@ -0,0 +1,2 @@ +DIST network-manager-applet-0.8.6.0.tar.bz2 1171199 RMD160 f637caf0f3a4b2ed7c1369cd3cbe6111c42169d8 SHA1 480806f258819264b30961a2ba55d448ba0e0a62 SHA256 753fc9790379ce86efc9fa06a838fbe9f1310e734a63d9b823477ad13690f831 +EBUILD nm-applet-0.8.6.0.ebuild 1093 RMD160 73a080e0d65e6bf9815c829c53fc14c3c0d9bffc SHA1 73bdd6258f3bdf7f227893aeca1a6a443f107cbb SHA256 484547850655f762154c62d406a006a59d84f024b6f6bedc877bdc420ed62438 diff --git a/gnome-extra/nm-applet/nm-applet-0.8.6.0.ebuild b/gnome-extra/nm-applet/nm-applet-0.8.6.0.ebuild new file mode 100644 index 0000000..2e6239a --- /dev/null +++ b/gnome-extra/nm-applet/nm-applet-0.8.6.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/nm-applet-0.8.4.ebuild,v 1.7 2011/11/20 10:11:10 xarthisius Exp $ + +EAPI="3" +GCONF_DEBUG="no" +GNOME2_LA_PUNT="yes" +GNOME_ORG_MODULE="network-manager-applet" + +inherit gnome2 + +DESCRIPTION="Gnome applet for NetworkManager." +HOMEPAGE="http://projects.gnome.org/NetworkManager/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="bluetooth" + +RDEPEND=">=dev-libs/glib-2.16:2 + >=dev-libs/dbus-glib-0.88 + >=sys-apps/dbus-1.4.1 + >=x11-libs/gtk+-2.18:2 + >=gnome-base/gconf-2.20:2 + >=x11-libs/libnotify-0.4.3 + >=gnome-base/gnome-keyring-2.20 + >=sys-auth/polkit-0.96-r1 + + >=net-misc/networkmanager-${PV} + net-misc/mobile-broadband-provider-info + + bluetooth? ( >=net-wireless/gnome-bluetooth-2.27.6 )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + >=dev-util/intltool-0.40" + +pkg_setup () { + G2CONF="${G2CONF} + --disable-more-warnings + --disable-static + --localstatedir=/var + $(use_with bluetooth)" + + DOCS="AUTHORS ChangeLog NEWS README" +} diff --git a/media-video/bino/Manifest b/media-video/bino/Manifest index 3bd4a4a..21effc9 100644 --- a/media-video/bino/Manifest +++ b/media-video/bino/Manifest @@ -1,4 +1,6 @@ DIST bino-0.9.3.tar.xz 475104 RMD160 99df0ac3db0a2ba685f8ebe0f8e7e30c3db7791b SHA1 acc2c0eb043497d5cdae4b23dbaf3a821c949617 SHA256 2e607bbed38d323a710ca9c40a55d00ce589ee3ca2736daf60a4b521cbc02f12 DIST bino-1.1.1.tar.xz 665224 RMD160 89e69ad60eddf91fd29c23da659d4e300c5d9cc5 SHA1 252afdbf6d117116c9a483a263fc75b2da99495f SHA256 dd06546eee68b62141fb23a14b14075b022245216e2ec46d6dd0723cdcf3b337 +DIST bino-1.1.2.tar.xz 668988 RMD160 01fa01af976080a8071e54fe05dbfcc104706532 SHA1 9f409ce51f1f7a194ee6d13eeea96037505d0002 SHA256 90e139a6085692dfabff937c1313399748a5f5c8a0ccb9eb82c58f695a86d157 EBUILD bino-0.9.3.ebuild 849 RMD160 0b576e28c3e1d5707ea69ae683d0d922daa29a1a SHA1 f1449e8b0131c4403c52cad21865586ad1e14900 SHA256 e66fce63a3d87cbc624c0685677753540c986b3757020809345989136444f986 EBUILD bino-1.1.1.ebuild 1020 RMD160 011673a1b326eb7d188a1c0200099bd53486372b SHA1 0cad2527ef384dbb6ccb75f53f58034879805e5e SHA256 7ed1c4b27a6ff403ddeceec65464743be2c0b04e26eedf26a9880eac1cef4b9a +EBUILD bino-1.1.2.ebuild 1017 RMD160 a17819f47d36b0218b91446bb11c540596df3805 SHA1 b5abb9ed0f3ff76a210342274b96c562d61498f9 SHA256 8da4e3b17a5d4bf99598d15ff14464549693e2dd7a1c5e4cfe7dfc924fdbf6f1 diff --git a/media-video/bino/bino-1.1.2.ebuild b/media-video/bino/bino-1.1.2.ebuild new file mode 100644 index 0000000..327d4f4 --- /dev/null +++ b/media-video/bino/bino-1.1.2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 +inherit eutils + +DESCRIPTION="Stereoscopic and multi-display media player" +HOMEPAGE="http://www.nongnu.org/bino/index.html" +SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="lirc" + +RDEPEND=">=media-libs/glew-1.5.0 + media-libs/openal + x11-libs/qt-gui:4 + x11-libs/qt-core:4 + x11-libs/qt-opengl:4 + >=media-libs/libass-0.9.9 + >=media-video/ffmpeg-0.8 + lirc? ( app-misc/lirc )" + +DEPEND="${RDEPEND}" + +src_configure() { + if use lirc; then + export liblircclient_CFLAGS="-I/usr/include/lirc" liblircclient_LIBS="-llirc_client" + fi + + econf +} + + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + # remove installed doc + rm -rf "${D}/usr/share/doc/bino" + + # documentation + dodoc AUTHORS ChangeLog INSTALL NEWS README doc/*.png doc/*.jpg + dohtml doc/bino.html + doman doc/bino.1 + doinfo doc/bino.info +} diff --git a/media-video/openshot/Manifest b/media-video/openshot/Manifest new file mode 100644 index 0000000..8ae7c71 --- /dev/null +++ b/media-video/openshot/Manifest @@ -0,0 +1,2 @@ +DIST openshot-1.4.1.tar.gz 35354993 RMD160 568b66a9f6ef90c0ec249e710b4576a2b99adf30 SHA1 3a6dba9103e67f04992677f8f0fc4f46e89aba28 SHA256 367f8b6e852c55da86cd6f76a3715f91bebc849eb5300aa256f65be5df0a0ffd +EBUILD openshot-1.4.1.ebuild 1917 RMD160 b335f82b7b60a73f8c5ea062630162026bebe278 SHA1 e66974dc044cd24aa03fe3b99a2be220c65176b3 SHA256 d858e74902bb6928635942cb0f99f24b815cfbab26f97e06fcec1f4b890bdd38 diff --git a/media-video/openshot/openshot-1.4.1.ebuild b/media-video/openshot/openshot-1.4.1.ebuild new file mode 100644 index 0000000..073fdf8 --- /dev/null +++ b/media-video/openshot/openshot-1.4.1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +PYTHON_DEPEND=2:2.5 +PYTHON_USE_WITH=xml + +inherit versionator distutils fdo-mime python + +DESCRIPTION="OpenShot Video Editor is a non-linear video editor" +HOMEPAGE="http://www.openshotvideo.com" +SRC_URI="http://launchpad.net/openshot/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +RDEPEND=" + >=x11-libs/gtk+-2.18:2 + dev-python/pygtk + dev-python/pygoocanvas + dev-python/pyxdg + dev-python/librsvg-python + dev-python/httplib2 + >=media-libs/mlt-0.4.6-r1[ffmpeg,frei0r,gtk,melt,python,sdl,xml] + media-sound/sox[encode,ffmpeg] + >=virtual/ffmpeg-0.6[encode,sdl] + dev-python/imaging + " +#>=virtual/ffmpeg-0.6[encode,faac?,ieee1394?,mp3?,sdl,theora?,vorbis?,vpx,x264?,xvid?] +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + python_convert_shebangs -q -r 2 . + distutils_src_prepare + + # Disable the installation of the mime.types file. + # The .desktop file would be used to update the mime database. + sed -ie '/launcher/,+1d' setup.py || die + + # Avoid stuff covered by fdo-mime.eclass + # (update-mime-database update-desktop-database update-mime) + # export "FAKEROOTKEY=gentoo" does not work as this variable is filtered + # by portage + sed -ie '/FAILED = /,$d' setup.py || die +} + +# TODO: check stuff installed to /usr/lib/python2.6/site-packages as there are +# some parts installed which shouldn't (locale, themes, profiles effects, +# etc...) Afaik only python stuff should go there and the rest probably to +# /usr/share/openshot +# The same goes for /usr/lib/mime/packages + +pkg_postinst() { + fdo-mime_mime_database_update + fdo-mime_desktop_database_update + distutils_pkg_postinst +} + +pkg_postrm() { + fdo-mime_mime_database_update + fdo-mime_desktop_database_update + distutils_pkg_postrm +} diff --git a/media-video/umplayer/Manifest b/media-video/umplayer/Manifest index a80a33d..a454202 100644 --- a/media-video/umplayer/Manifest +++ b/media-video/umplayer/Manifest @@ -1,2 +1,3 @@ EBUILD umplayer-0.95.ebuild 948 RMD160 949b9301adc66fc2ac87624e67effa99a997e4f7 SHA1 341a0e589e721869176839663ca3482152b10a63 SHA256 a0a82f0b93fa02ddc50855fcd02ff68297d5b5d0b74f98475a7be0d3bc0f6a16 +EBUILD umplayer-0.98.ebuild 945 RMD160 f685f75186b6d8e6cd656fbea420e26f0a54d746 SHA1 7a255984fb9c011246006a7e3813bb7a8e93a8f1 SHA256 767d9678bf203f38146a71f663d0fe7f756a182a80fdd2131b0df2da8f15fb5b MISC ChangeLog 357 RMD160 805abeefb31c914bb3ae7f17317199ad4d62663f SHA1 8ab33e80fae93ece8ca1476f7a3ca0a1629cba4c SHA256 878938ef41b23805c22eb0f3cd75797a84f9bdd0df2d94006f0a26734371f09c diff --git a/media-video/umplayer/umplayer-0.98.ebuild b/media-video/umplayer/umplayer-0.98.ebuild new file mode 100644 index 0000000..22c4677 --- /dev/null +++ b/media-video/umplayer/umplayer-0.98.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +inherit qt4-r2 subversion + +DESCRIPTION="UMPlayer is cross-platform and installer packages are available for +the Windows, Mac and GNU / Linux operating systems. It is completely free to use +and distribute so feel free to share UMPlayer with all your friends." +HOMEPAGE="http://www.umplayer.com" +SRC_URI="" + +ESVN_REPO_URI="https://${PN}.svn.sourceforge.net/svnroot/${PN}/${PN}/trunk@r181" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 86 mingw32" +IUSE="" + +RDEPEND=" +" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -i -e 's/\$(QMAKE).\$(QMAKE_OPTS).\&\&.//' Makefile || die "Sed failed!" + sed -i -e 's/PREFIX=\/usr\/local/PREFIX=\/usr/' Makefile || die "Sed failed!" +} + +src_configure() { + cd src/ + eqmake4 +} + +src_compile() { + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" install || die +} + diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest new file mode 100644 index 0000000..5be66dc --- /dev/null +++ b/net-misc/networkmanager/Manifest @@ -0,0 +1,6 @@ +AUX networkmanager-0.8.4-fix-tests.patch 2079 RMD160 8e867d51abbd0418e4eeb92d5e9d8315cafe78fe SHA1 31f9ab7e9f35798590e5c35965f9b96874055550 SHA256 33ca19856777794b558b88972a5ba15a13c53d77834eaf2339a64c6b072c31a7 +AUX networkmanager-0.8.4-ifnet-smarter-write.patch 5969 RMD160 d401c8eae69ea70f5bf08f2950a6e476a03f460b SHA1 9a1fde1c789b42ce6e3b0766125862bde962b4c8 SHA256 b4fbc482cbc22edfff0f89624d857cd35b6cb3d7fe85604c5453e7685eb4e12a +AUX networkmanager-0.8.4-shared-connection.patch 15067 RMD160 3e878a999e92fdb6baffba6f2a12caa25a2ba2c6 SHA1 e9664c505bc19964082aa319c4d524e6cf6651e2 SHA256 57f56fb45e48f80636a17d64f080aae594d6f19e51ff5467cc27a739b4b380e6 +AUX nm-system-settings.conf-ifnet 70 RMD160 c0d2be147383999b62cead86ab4333169e4ef277 SHA1 679ec8052b610969c148a2d34cd4da7a41484a76 SHA256 34f53d9ac1ad65eda6942dc3059117f60f6321059ca23f4fbfcc2f2edcae151f +DIST NetworkManager-0.8.6.0.tar.bz2 1712198 RMD160 34059e3fe6f829e367e84a24a7c01c379e5347a7 SHA1 caba9f585bdb1180f2173f51a85f43747a86f868 SHA256 e382d3c123099c701045b9e56a021eb664171ece9a7ae1f2c31ee05b7d4f3a67 +EBUILD networkmanager-0.8.6.0.ebuild 4344 RMD160 0cc4e77709f5659951aad7254419f0b5d104f795 SHA1 b46bf3af04888324f051ab55eb43fea99e838261 SHA256 07bd393cb01828f6f20f3b0a98354c230702cfb488b7e6259a9a25dd201b04a8 diff --git a/net-misc/networkmanager/files/networkmanager-0.8.4-fix-tests.patch b/net-misc/networkmanager/files/networkmanager-0.8.4-fix-tests.patch new file mode 100644 index 0000000..d8af30f --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.8.4-fix-tests.patch @@ -0,0 +1,55 @@ +From 21e7fda25507e68c13b97040b3b9e5dc3c9726bf Mon Sep 17 00:00:00 2001 +From: Mu Qiao <qiaomuf@gentoo.org> +Date: Wed, 18 May 2011 19:02:40 +0800 +Subject: [PATCH] fix-tests + +--- + configure.ac | 1 - + system-settings/plugins/ifnet/Makefile.am | 1 - + system-settings/plugins/ifnet/tests/Makefile.am | 13 ------------- + 3 files changed, 0 insertions(+), 15 deletions(-) + delete mode 100644 system-settings/plugins/ifnet/tests/Makefile.am + +diff --git a/configure.ac b/configure.ac +index d8a266e..8304aa4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -571,7 +571,6 @@ system-settings/plugins/Makefile + system-settings/plugins/ifupdown/Makefile + system-settings/plugins/ifupdown/tests/Makefile + system-settings/plugins/ifnet/Makefile +-system-settings/plugins/ifnet/tests/Makefile + system-settings/plugins/ifcfg-rh/Makefile + system-settings/plugins/ifcfg-rh/tests/Makefile + system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile +diff --git a/system-settings/plugins/ifnet/Makefile.am b/system-settings/plugins/ifnet/Makefile.am +index 86d5ea2..f61e112 100644 +--- a/system-settings/plugins/ifnet/Makefile.am ++++ b/system-settings/plugins/ifnet/Makefile.am +@@ -1,4 +1,3 @@ +-SUBDIRS = . tests + INCLUDES = \ + -I$(top_srcdir)/src/system-settings \ + -I$(top_srcdir)/include \ +diff --git a/system-settings/plugins/ifnet/tests/Makefile.am b/system-settings/plugins/ifnet/tests/Makefile.am +deleted file mode 100644 +index 17a081f..0000000 +--- a/system-settings/plugins/ifnet/tests/Makefile.am ++++ /dev/null +@@ -1,13 +0,0 @@ +-INCLUDES=-I$(top_srcdir)/system-settings/plugins/ifnet\ +- -I$(top_srcdir)/libnm-glib \ +- -I$(top_srcdir)/libnm-util \ +- -I$(top_srcdir)/include \ +- -I$(top_srcdir)/src/system-settings +-TESTS = check_ifnet +-check_PROGRAMS = check_ifnet +-check_ifnet_SOURCES = test_all.c +-check_ifnet_CPPFLAGS = $(CHECK_CFLAGS) $(GLIB_CFLAGS) +-check_ifnet_LDADD = $(top_srcdir)/libnm-util/libnm-util.la\ +- $(top_srcdir)/system-settings/plugins/ifnet/lib-ifnet-io.la\ +- $(CHECK_LIBS)\ +- $(GLIB_LIBS) +-- +1.7.3.4 + diff --git a/net-misc/networkmanager/files/networkmanager-0.8.4-ifnet-smarter-write.patch b/net-misc/networkmanager/files/networkmanager-0.8.4-ifnet-smarter-write.patch new file mode 100644 index 0000000..ff4c1f2 --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.8.4-ifnet-smarter-write.patch @@ -0,0 +1,158 @@ +From 776fafc133e18df48dc92a717c662e1b2858567e Mon Sep 17 00:00:00 2001 +From: Mu Qiao <qiaomuf@gentoo.org> +Date: Fri, 25 Feb 2011 16:25:07 +0000 +Subject: [PATCH 3/3] Won't write when nothing changed + Signed-off-by: Mu Qiao <qiaomuf@gentoo.org> + Make log less excessive, accept non-alnum ssid (bug #356337) + +Signed-off-by: Mu Qiao <qiaomuf@gentoo.org> +--- + system-settings/plugins/ifnet/connection_parser.c | 33 +++++++++----------- + system-settings/plugins/ifnet/net_parser.c | 8 ++++- + system-settings/plugins/ifnet/plugin.c | 4 -- + system-settings/plugins/ifnet/wpa_parser.c | 7 +++- + 4 files changed, 26 insertions(+), 26 deletions(-) + +diff --git a/system-settings/plugins/ifnet/connection_parser.c b/system-settings/plugins/ifnet/connection_parser.c +index 9b5ddc1..4ac2173 100644 +--- a/system-settings/plugins/ifnet/connection_parser.c ++++ b/system-settings/plugins/ifnet/connection_parser.c +@@ -55,9 +55,16 @@ update_connection_id (NMConnection * connection, gchar * conn_name) + gchar *idstr = NULL; + gchar *uuid_base = NULL; + gchar *uuid = NULL; ++ int name_len; + NMSettingConnection *setting; + +- idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name); ++ name_len = strlen (conn_name); ++ if ((name_len > 2) && (g_str_has_prefix (conn_name, "0x"))) { ++ gchar * conn_name_printable = utils_hexstr2bin (conn_name + 2, name_len - 2); ++ idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name_printable); ++ g_free (conn_name_printable); ++ } else ++ idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name); + uuid_base = idstr; + uuid = nm_utils_uuid_generate_from_string (uuid_base); + setting = +@@ -627,23 +634,13 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error) + g_object_set (ip4_setting, + NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, + TRUE, NULL); +- if (nm_setting_ip4_config_add_address +- (ip4_setting, ip4_addr)) { +- PLUGIN_PRINT (IFNET_PLUGIN_NAME, +- "new address: %d", iblock->ip); +- PLUGIN_PRINT (IFNET_PLUGIN_NAME, +- "ipv4 addresses count: %d", +- nm_setting_ip4_config_get_num_addresses +- (ip4_setting)); +- } else { +- PLUGIN_WARN (IFNET_PLUGIN_NAME, +- "ignoring duplicate IP4 address"); +- } ++ if (!nm_setting_ip4_config_add_address (ip4_setting, ip4_addr)) ++ PLUGIN_WARN (IFNET_PLUGIN_NAME, ++ "ignoring duplicate IP4 address"); + nm_ip4_address_unref (ip4_addr); + current_iblock = iblock; + iblock = iblock->next; + destroy_ip_block (current_iblock); +- + } + g_object_set (ip4_setting, + NM_SETTING_IP4_CONFIG_METHOD, +@@ -2276,11 +2273,12 @@ write_wireless_setting (NMConnection * connection, + return FALSE; + } + +- /* If the SSID contains any non-printable characters, we need to use the +- * hex notation of the SSID instead. ++ /* If the SSID contains any non-alnum characters, we need to use ++ * the hex notation of the SSID instead. (Because openrc doesn't ++ * support these characters, see bug #356337) + */ + for (i = 0; i < ssid->len; i++) { +- if (!isprint (ssid->data[i])) { ++ if (!isalnum (ssid->data[i])) { + hex_ssid = TRUE; + break; + } +@@ -2487,7 +2485,6 @@ write_ip4_setting (NMConnection * connection, gchar * conn_name, + ifnet_set_data (conn_name, "config", "dhcp"); + + /* DNS Servers */ +- ifnet_set_data (conn_name, "dns_servers", NULL); + num = nm_setting_ip4_config_get_num_dns (s_ip4); + if (num > 0) { + dns = g_string_new (NULL); +diff --git a/system-settings/plugins/ifnet/net_parser.c b/system-settings/plugins/ifnet/net_parser.c +index de2db8a..57f3688 100644 +--- a/system-settings/plugins/ifnet/net_parser.c ++++ b/system-settings/plugins/ifnet/net_parser.c +@@ -411,12 +411,16 @@ ifnet_set_data (gchar * conn_name, gchar * key, gchar * value) + } + /* Remove existing key value pair */ + if (g_hash_table_lookup_extended (conn, key, &orin_key, &orin_value)) { +- if (new_value && !strcmp (orin_value, new_value)) ++ if (new_value && !strcmp (orin_value, new_value)){ ++ g_free (new_value); + return; ++ } + g_hash_table_remove (conn, orin_key); + g_free (orin_key); + g_free (orin_value); +- } ++ /* old key/value doesn't exist but new value is NULL */ ++ } else if (!value) ++ return; + if (new_value) + g_hash_table_insert (conn, g_strdup (key), new_value); + net_parser_data_changed = TRUE; +diff --git a/system-settings/plugins/ifnet/plugin.c b/system-settings/plugins/ifnet/plugin.c +index 94f9e79..3952e91 100644 +--- a/system-settings/plugins/ifnet/plugin.c ++++ b/system-settings/plugins/ifnet/plugin.c +@@ -91,8 +91,6 @@ update_system_hostname (gpointer config) + { + SCPluginIfnetPrivate *priv = SC_PLUGIN_IFNET_GET_PRIVATE (config); + +- PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Updating hostname"); +- + if (priv->hostname) + g_free (priv->hostname); + priv->hostname = read_hostname (IFNET_SYSTEM_HOSTNAME_FILE); +@@ -184,8 +182,6 @@ monitor_file_changes (const char *filename, + info); + g_signal_connect (monitor, "changed", G_CALLBACK (file_changed), + info); +- PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Monitoring %s", filename); +- + } else + PLUGIN_WARN (IFNET_PLUGIN_NAME, + "Monitoring %s failed, error: %s", filename, +diff --git a/system-settings/plugins/ifnet/wpa_parser.c b/system-settings/plugins/ifnet/wpa_parser.c +index 42c52c3..338c338 100644 +--- a/system-settings/plugins/ifnet/wpa_parser.c ++++ b/system-settings/plugins/ifnet/wpa_parser.c +@@ -463,12 +463,15 @@ wpa_set_data (gchar * ssid, gchar * key, gchar * value) + /* Remove old key value pairs */ + if (g_hash_table_lookup_extended + (security, key, &orig_key, &orig_value)) { +- if (new_value && !strcmp(orig_value, new_value)) ++ if (new_value && !strcmp(orig_value, new_value)){ ++ g_free (new_value); + return; ++ } + g_hash_table_remove (security, orig_key); + g_free (orig_key); + g_free (orig_value); +- } ++ } else if (!value) ++ return; + + /* Add new key value */ + if (new_value) +-- +1.7.3.4 + diff --git a/net-misc/networkmanager/files/networkmanager-0.8.4-shared-connection.patch b/net-misc/networkmanager/files/networkmanager-0.8.4-shared-connection.patch new file mode 100644 index 0000000..3ce883a --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.8.4-shared-connection.patch @@ -0,0 +1,458 @@ +From d252fad6aa69aefa17b592111c2db23864f63907 Mon Sep 17 00:00:00 2001 +From: Mu Qiao <qiaomuf@gentoo.org> +Date: Tue, 25 Jan 2011 10:31:53 +0000 +Subject: [PATCH] shared-connection + +Signed-off-by: Mu Qiao <qiaomuf@gentoo.org> +--- + system-settings/plugins/ifnet/connection_parser.c | 90 ++++++++++++++------ + system-settings/plugins/ifnet/net_parser.c | 55 +++++++----- + system-settings/plugins/ifnet/net_parser.h | 4 +- + system-settings/plugins/ifnet/net_utils.c | 6 +- + .../plugins/ifnet/nm-ifnet-connection.c | 8 +- + system-settings/plugins/ifnet/wpa_parser.c | 21 +++-- + 6 files changed, 122 insertions(+), 62 deletions(-) + +diff --git a/system-settings/plugins/ifnet/connection_parser.c b/system-settings/plugins/ifnet/connection_parser.c +index f9fae51..9b5ddc1 100644 +--- a/system-settings/plugins/ifnet/connection_parser.c ++++ b/system-settings/plugins/ifnet/connection_parser.c +@@ -557,7 +557,7 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error) + + NMSettingIP4Config *ip4_setting = + NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ()); +- gchar *value; ++ gchar *value, *method = NULL; + gboolean is_static_block = is_static_ip4 (conn_name); + ip_block *iblock = NULL; + +@@ -569,13 +569,41 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error) + && strstr (value, "nogateway") ? TRUE : FALSE, NULL); + + if (!is_static_block) { +- g_object_set (ip4_setting, +- NM_SETTING_IP4_CONFIG_METHOD, +- NM_SETTING_IP4_CONFIG_METHOD_AUTO, +- NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, FALSE, NULL); +- PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Using DHCP for %s", +- conn_name); +- } else { ++ method = ifnet_get_data (conn_name, "config"); ++ if (!method){ ++ g_set_error (error, ifnet_plugin_error_quark (), 0, ++ "Unknown config for %s", conn_name); ++ g_object_unref (ip4_setting); ++ return; ++ } ++ if (!strcmp (method, "dhcp")) ++ g_object_set (ip4_setting, ++ NM_SETTING_IP4_CONFIG_METHOD, ++ NM_SETTING_IP4_CONFIG_METHOD_AUTO, ++ NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, FALSE, NULL); ++ else if (!strcmp (method, "autoip")){ ++ g_object_set (ip4_setting, ++ NM_SETTING_IP4_CONFIG_METHOD, ++ NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL, ++ NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, FALSE, NULL); ++ nm_connection_add_setting (connection, NM_SETTING (ip4_setting)); ++ return; ++ } else if (!strcmp (method, "shared")){ ++ g_object_set (ip4_setting, ++ NM_SETTING_IP4_CONFIG_METHOD, ++ NM_SETTING_IP4_CONFIG_METHOD_SHARED, ++ NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, FALSE, NULL); ++ nm_connection_add_setting (connection, NM_SETTING (ip4_setting)); ++ return; ++ } else { ++ g_set_error (error, ifnet_plugin_error_quark (), 0, ++ "Unknown config for %s", conn_name); ++ g_object_unref (ip4_setting); ++ return; ++ } ++ PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Using %s method for %s", ++ method, conn_name); ++ }else { + iblock = convert_ip4_config_block (conn_name); + if (!iblock) { + g_set_error (error, ifnet_plugin_error_quark (), 0, +@@ -625,7 +653,7 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error) + } + + /* add dhcp hostname and client id */ +- if (!is_static_block) { ++ if (method && !strcmp (method, "dhcp")) { + gchar *dhcp_hostname, *client_id; + + get_dhcp_hostname_and_client_id (&dhcp_hostname, &client_id); +@@ -712,7 +740,6 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error) + iblock = iblock->next; + destroy_ip_block (current_iblock); + } +- + /* Finally add setting to connection */ + nm_connection_add_setting (connection, NM_SETTING (ip4_setting)); + } +@@ -1243,10 +1270,10 @@ parse_wpa_psk (gchar * psk, GError ** error) + * the passphrase contains spaces. + */ + +- p = psk; +- if (p[0] == '"' && psk[strlen (psk) - 1] == '"') ++ p = g_strdup (psk); ++ if (p[0] == '"' && p[strlen (p) - 1] == '"') + quoted = TRUE; +- if (!quoted && (strlen (psk) == 64)) { ++ if (!quoted && (strlen (p) == 64)) { + /* Verify the hex PSK; 64 digits */ + if (!is_hex (p)) { + g_set_error (error, ifnet_plugin_error_quark (), +@@ -1254,7 +1281,7 @@ parse_wpa_psk (gchar * psk, GError ** error) + "Invalid WPA_PSK (contains non-hexadecimal characters)"); + goto out; + } +- hashed = g_strdup (psk); ++ hashed = g_strdup (p); + } else { + strip_string (p, '"'); + +@@ -1276,6 +1303,7 @@ parse_wpa_psk (gchar * psk, GError ** error) + } + + out: ++ g_free (p); + return hashed; + } + +@@ -2085,7 +2113,8 @@ write_wireless_security_setting (NMConnection * connection, + } else if (!strcmp (key_mgmt, "wpa-eap")) { + wpa_set_data (conn_name, "key_mgmt", "WPA-EAP"); + wpa = TRUE; +- } ++ } else ++ PLUGIN_WARN (IFNET_PLUGIN_NAME, "Unknown key_mgmt: %s", key_mgmt); + + if (auth_alg) { + if (!strcmp (auth_alg, "shared")) +@@ -2180,8 +2209,11 @@ write_wireless_security_setting (NMConnection * connection, + g_string_append (quoted, psk); + g_string_append_c (quoted, '"'); + } +- wpa_set_data (conn_name, "psk", +- quoted ? quoted->str : (gchar *) psk); ++ if (psk) ++ wpa_set_data (conn_name, "psk", ++ quoted ? quoted->str : (gchar *) psk); ++ else ++ PLUGIN_WARN (IFNET_PLUGIN_NAME, "Use WPA, but no psk received from NM"); + if (quoted) + g_string_free (quoted, TRUE); + } else +@@ -2190,15 +2222,19 @@ write_wireless_security_setting (NMConnection * connection, + return TRUE; + } + +-/* remove old ssid and add new one*/ ++/* Only remove old config when ssid is changed. ++ * See bug #350476. ++ * */ + static void + update_wireless_ssid (NMConnection * connection, gchar * conn_name, + gchar * ssid, gboolean hex) + { +- ifnet_delete_network (conn_name); +- ifnet_add_connection (ssid, "wireless"); ++ if (strcmp (conn_name, ssid)){ ++ ifnet_delete_network (conn_name); ++ wpa_delete_security (conn_name); ++ } + +- wpa_delete_security (conn_name); ++ ifnet_add_network (ssid, "wireless"); + wpa_add_security (ssid); + } + +@@ -2443,7 +2479,11 @@ write_ip4_setting (NMConnection * connection, gchar * conn_name, + } + ifnet_set_data (conn_name, "config", ips->str); + g_string_free (ips, TRUE); +- } else ++ } else if (!strcmp (value, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) ++ ifnet_set_data (conn_name, "config", "shared"); ++ else if (!strcmp (value, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)) ++ ifnet_set_data (conn_name, "config", "autoip"); ++ else + ifnet_set_data (conn_name, "config", "dhcp"); + + /* DNS Servers */ +@@ -2858,7 +2898,7 @@ get_wired_name () + for (; i < 256; i++) { + gchar *conn_name = g_strdup_printf ("eth%d", i); + +- if (!ifnet_has_connection (conn_name)) { ++ if (!ifnet_has_network (conn_name)) { + return conn_name; + } else + g_free (conn_name); +@@ -2875,7 +2915,7 @@ get_ppp_name () + for (; i < 256; i++) { + gchar *conn_name = g_strdup_printf ("ppp%d", i); + +- if (!ifnet_has_connection (conn_name)) { ++ if (!ifnet_has_network (conn_name)) { + return conn_name; + } else + g_free (conn_name); +@@ -2982,7 +3022,7 @@ ifnet_add_new_connection (NMConnection * connection, + goto out; + } + +- if (ifnet_add_connection (new_name, new_type)) ++ if (ifnet_add_network (new_name, new_type)) + success = + ifnet_update_parsers_by_connection (connection, new_name, + NULL, config_file, +diff --git a/system-settings/plugins/ifnet/net_parser.c b/system-settings/plugins/ifnet/net_parser.c +index b4a381d..de2db8a 100644 +--- a/system-settings/plugins/ifnet/net_parser.c ++++ b/system-settings/plugins/ifnet/net_parser.c +@@ -37,6 +37,9 @@ static GList *functions_list; + /* Used to decide whether to write changes to file*/ + static gboolean net_parser_data_changed = FALSE; + ++static void ++destroy_connection_config (GHashTable * conn); ++ + static GHashTable * + add_new_connection_config (const gchar * type, const gchar * name) + { +@@ -58,8 +61,10 @@ add_new_connection_config (const gchar * type, const gchar * name) + } + + gboolean +-ifnet_add_connection (gchar * name, gchar * type) ++ifnet_add_network (gchar * name, gchar * type) + { ++ if (ifnet_has_network (name)) ++ return TRUE; + if (add_new_connection_config (type, name)) { + PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Adding network for %s", name); + net_parser_data_changed = TRUE; +@@ -69,11 +74,27 @@ ifnet_add_connection (gchar * name, gchar * type) + } + + gboolean +-ifnet_has_connection (gchar * conn_name) ++ifnet_has_network (gchar * conn_name) + { + return g_hash_table_lookup (conn_table, conn_name) != NULL; + } + ++gboolean ++ifnet_delete_network (gchar * conn_name) ++{ ++ GHashTable *network = NULL; ++ ++ g_return_val_if_fail (conn_table != NULL && conn_name != NULL, FALSE); ++ PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Deleting network for %s", conn_name); ++ network = g_hash_table_lookup (conn_table, conn_name); ++ if (!network) ++ return FALSE; ++ g_hash_table_remove (conn_table, conn_name); ++ destroy_connection_config (network); ++ net_parser_data_changed = TRUE; ++ return TRUE; ++} ++ + static GHashTable * + get_connection_config (gchar * name) + { +@@ -377,21 +398,27 @@ ifnet_set_data (gchar * conn_name, gchar * key, gchar * value) + { + gpointer orin_key = NULL, orin_value = NULL; + GHashTable *conn = g_hash_table_lookup (conn_table, conn_name); ++ gchar *new_value = NULL; + + if (!conn) { + PLUGIN_WARN (IFNET_PLUGIN_NAME, + "%s does not exsit!", conn_name); + return; + } ++ if (value){ ++ new_value = g_strdup (value); ++ strip_string (new_value, '"'); ++ } + /* Remove existing key value pair */ + if (g_hash_table_lookup_extended (conn, key, &orin_key, &orin_value)) { ++ if (new_value && !strcmp (orin_value, new_value)) ++ return; + g_hash_table_remove (conn, orin_key); + g_free (orin_key); + g_free (orin_value); + } +- if (value) +- g_hash_table_insert (conn, g_strdup (key), +- strip_string (g_strdup (value), '"')); ++ if (new_value) ++ g_hash_table_insert (conn, g_strdup (key), new_value); + net_parser_data_changed = TRUE; + } + +@@ -467,7 +494,7 @@ ifnet_flush_to_file (gchar * config_file) + gboolean result = FALSE; + + if (!net_parser_data_changed) +- return FALSE; ++ return TRUE; + if (!conn_table || !global_settings_table) + return FALSE; + +@@ -583,22 +610,6 @@ ifnet_flush_to_file (gchar * config_file) + return result; + } + +-gboolean +-ifnet_delete_network (gchar * conn_name) +-{ +- GHashTable *network = NULL; +- +- g_return_val_if_fail (conn_table != NULL && conn_name != NULL, FALSE); +- PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Deleting network for %s", conn_name); +- network = g_hash_table_lookup (conn_table, conn_name); +- if (!network) +- return FALSE; +- g_hash_table_remove (conn_table, conn_name); +- destroy_connection_config (network); +- net_parser_data_changed = TRUE; +- return TRUE; +-} +- + void + ifnet_destroy (void) + { +diff --git a/system-settings/plugins/ifnet/net_parser.h b/system-settings/plugins/ifnet/net_parser.h +index 73a44c8..b71a01f 100644 +--- a/system-settings/plugins/ifnet/net_parser.h ++++ b/system-settings/plugins/ifnet/net_parser.h +@@ -36,11 +36,11 @@ GList *ifnet_get_connection_names (void); + gchar *ifnet_get_data (gchar * conn_name, const gchar * key); + gchar *ifnet_get_global_data (const gchar * key); + gchar *ifnet_get_global_setting (gchar * group, gchar * key); +-gboolean ifnet_has_connection (gchar * conn_name); ++gboolean ifnet_has_network (gchar * conn_name); + + /* Writer functions */ + gboolean ifnet_flush_to_file (gchar * config_file); + void ifnet_set_data (gchar * conn_name, gchar * key, gchar * value); +-gboolean ifnet_add_connection (gchar * name, gchar * type); ++gboolean ifnet_add_network (gchar * name, gchar * type); + gboolean ifnet_delete_network (gchar * conn_name); + #endif +diff --git a/system-settings/plugins/ifnet/net_utils.c b/system-settings/plugins/ifnet/net_utils.c +index 2dc253c..83b4325 100644 +--- a/system-settings/plugins/ifnet/net_utils.c ++++ b/system-settings/plugins/ifnet/net_utils.c +@@ -278,6 +278,10 @@ is_static_ip4 (gchar * conn_name) + + if (!data) + return FALSE; ++ if (!strcmp (data, "shared")) ++ return FALSE; ++ if (!strcmp (data, "autoip")) ++ return FALSE; + dhcp6 = strstr (data, "dhcp6"); + if (dhcp6) { + gchar *dhcp4; +@@ -942,8 +946,8 @@ get_dhcp_hostname_and_client_id (char **hostname, char **client_id) + else if ((tmp = strstr (line, "send host-name")) != NULL) { + tmp += strlen ("send host-name"); + g_strstrip (tmp); +- strip_string (tmp, '"'); + strip_string (tmp, ';'); ++ strip_string (tmp, '"'); + if (tmp[0] != '\0') + *hostname = g_strdup (tmp); + else +diff --git a/system-settings/plugins/ifnet/nm-ifnet-connection.c b/system-settings/plugins/ifnet/nm-ifnet-connection.c +index e47495c..ebe2581 100644 +--- a/system-settings/plugins/ifnet/nm-ifnet-connection.c ++++ b/system-settings/plugins/ifnet/nm-ifnet-connection.c +@@ -71,12 +71,14 @@ nm_ifnet_connection_new (gchar * conn_name) + { + NMConnection *tmp; + GObject *object; +- GError **error = NULL; ++ GError *error = NULL; + + g_return_val_if_fail (conn_name != NULL, NULL); +- tmp = ifnet_update_connection_from_config_block (conn_name, error); +- if (!tmp) ++ tmp = ifnet_update_connection_from_config_block (conn_name, &error); ++ if (!tmp){ ++ g_error_free (error); + return NULL; ++ } + object = (GObject *) g_object_new (NM_TYPE_IFNET_CONNECTION, + NM_IFNET_CONNECTION_CONN_NAME, + conn_name, NULL); +diff --git a/system-settings/plugins/ifnet/wpa_parser.c b/system-settings/plugins/ifnet/wpa_parser.c +index 5e94108..42c52c3 100644 +--- a/system-settings/plugins/ifnet/wpa_parser.c ++++ b/system-settings/plugins/ifnet/wpa_parser.c +@@ -366,7 +366,7 @@ wpa_flush_to_file (gchar * config_file) + gboolean result = FALSE; + + if (!wpa_parser_data_changed) +- return FALSE; ++ return TRUE; + if (!wsec_table || !wsec_global_table) + return FALSE; + +@@ -450,26 +450,29 @@ wpa_set_data (gchar * ssid, gchar * key, gchar * value) + { + gpointer orig_key = NULL, orig_value = NULL; + GHashTable *security = g_hash_table_lookup (wsec_table, ssid); ++ gchar *new_value = NULL; + + g_return_if_fail (security != NULL); + ++ if (value){ ++ new_value = g_strdup(value); ++ if (strcmp (key, "ssid") != 0 && strcmp (key, "psk") != 0 ++ && !g_str_has_prefix (key, "wep_key")) ++ strip_string (new_value, '"'); ++ } + /* Remove old key value pairs */ + if (g_hash_table_lookup_extended + (security, key, &orig_key, &orig_value)) { ++ if (new_value && !strcmp(orig_value, new_value)) ++ return; + g_hash_table_remove (security, orig_key); + g_free (orig_key); + g_free (orig_value); + } + + /* Add new key value */ +- if (value) { +- gchar *new_value = g_strdup (value); +- +- if (strcmp (key, "ssid") != 0 && strcmp (key, "psk") != 0 +- && !g_str_has_prefix (key, "wep_key")) +- strip_string (new_value, '"'); ++ if (new_value) + g_hash_table_insert (security, g_strdup (key), new_value); +- } + wpa_parser_data_changed = TRUE; + } + +@@ -483,7 +486,7 @@ gboolean + wpa_add_security (gchar * ssid) + { + if (wpa_has_security (ssid)) +- return FALSE; ++ return TRUE; + else { + GHashTable *security = + g_hash_table_new (g_str_hash, g_str_equal); +-- +1.7.3.4 + diff --git a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet new file mode 100644 index 0000000..4d14ee7 --- /dev/null +++ b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet @@ -0,0 +1,6 @@ +[main] +plugins=ifnet,keyfile + +[ifnet] +managed=true +auto_refresh=false diff --git a/net-misc/networkmanager/networkmanager-0.8.6.0.ebuild b/net-misc/networkmanager/networkmanager-0.8.6.0.ebuild new file mode 100644 index 0000000..d0f8038 --- /dev/null +++ b/net-misc/networkmanager/networkmanager-0.8.6.0.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.8.4.0-r2.ebuild,v 1.7 2011/11/20 10:06:51 xarthisius Exp $ + +EAPI="3" +GNOME_ORG_MODULE="NetworkManager" + +inherit autotools eutils gnome.org linux-info systemd + +DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent." +HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc ppc64 x86" +IUSE="avahi bluetooth doc nss gnutls dhclient dhcpcd kernel_linux +ppp resolvconf connection-sharing" + +RDEPEND=">=sys-apps/dbus-1.2 + >=dev-libs/dbus-glib-0.75 + >=net-wireless/wireless-tools-28_pre9 + || ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-145[extras] ) + >=dev-libs/glib-2.18 + >=sys-auth/polkit-0.92 + >=dev-libs/libnl-1.1:1.1 + ppp? ( >=net-misc/modemmanager-0.4 + >=net-dialup/ppp-2.4.5 ) + >=net-wireless/wpa_supplicant-0.5.10[dbus] + bluetooth? ( net-wireless/bluez ) + || ( sys-libs/e2fsprogs-libs <sys-fs/e2fsprogs-1.41.0 ) + avahi? ( net-dns/avahi[autoipd] ) + gnutls? ( + nss? ( >=dev-libs/nss-3.11 ) + !nss? ( dev-libs/libgcrypt + net-libs/gnutls ) ) + !gnutls? ( >=dev-libs/nss-3.11 ) + dhclient? ( + dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 ) + !dhcpcd? ( net-misc/dhcp ) ) + !dhclient? ( >=net-misc/dhcpcd-4.0.0_rc3 ) + resolvconf? ( net-dns/openresolv ) + connection-sharing? ( + net-dns/dnsmasq + net-firewall/iptables )" + +DEPEND="${RDEPEND} + dev-util/pkgconfig + dev-util/intltool + doc? ( >=dev-util/gtk-doc-1.8 )" + +sysfs_deprecated_check() { + ebegin "Checking for SYSFS_DEPRECATED support" + + if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then + eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" + eerror "or NetworkManager will not work correctly." + eerror "See http://bugs.gentoo.org/333639 for more info." + die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" + fi + eend $? +} + +pkg_setup() { + if use kernel_linux; then + get_version + if linux_config_exists; then + sysfs_deprecated_check + else + ewarn "Was unable to determine your kernel .config" + ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." + ewarn "See http://bugs.gentoo.org/333639 for more info." + fi + + fi +} + +src_prepare() { + # backported ifnet patches + #~ epatch "${FILESDIR}/${P}-shared-connection.patch" + #~ epatch "${FILESDIR}/${P}-fix-tests.patch" + #~ epatch "${FILESDIR}/${P}-ifnet-smarter-write.patch" + eautoreconf +} + +src_configure() { + ECONF="--disable-more-warnings + --disable-static + --localstatedir=/var + --with-distro=gentoo + --with-dbus-sys-dir=/etc/dbus-1/system.d + --with-udev-dir=/lib/udev + --with-iptables=/sbin/iptables + $(use_enable doc gtk-doc) + $(use_with doc docs) + $(use_enable ppp) + $(use_with resolvconf) + $(systemd_with_unitdir)" + + # default is dhcpcd (if none or both are specified), ISC dchclient otherwise + if use dhclient ; then + if use dhcpcd ; then + ECONF="${ECONF} --with-dhcpcd --without-dhclient" + else + ECONF="${ECONF} --with-dhclient --without-dhcpcd" + fi + else + ECONF="${ECONF} --with-dhcpcd --without-dhclient" + fi + + # default is NSS (if none or both are specified), GnuTLS otherwise + if use gnutls ; then + if use nss ; then + ECONF="${ECONF} --with-crypto=nss" + else + ECONF="${ECONF} --with-crypto=gnutls" + fi + else + ECONF="${ECONF} --with-crypto=nss" + fi + + econf ${ECONF} +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + # Need to keep the /var/run/NetworkManager directory + keepdir /var/run/NetworkManager + + # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts + keepdir /etc/NetworkManager/dispatcher.d + + dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed" + + # Add keyfile plugin support + keepdir /etc/NetworkManager/system-connections + insinto /etc/NetworkManager + newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf \ + || die "newins failed" + + # Remove useless .la files + find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" +} + +pkg_postinst() { + elog "You will need to reload DBus if this is your first time installing" + elog "NetworkManager, or if you're upgrading from 0.7 or older." + elog "" +} |