diff options
author | Alin Năstac <mrness@gentoo.org> | 2007-09-26 08:14:22 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2007-09-26 08:14:22 +0000 |
commit | 50c949a9af6ea44ab785d3edd76c8e76b8d78701 (patch) | |
tree | ab375e44e1242d2aacf5bfe706929ccaaa3ae00c /net-misc/openswan | |
parent | cleanup quotes and use emake (diff) | |
download | gentoo-2-50c949a9af6ea44ab785d3edd76c8e76b8d78701.tar.gz gentoo-2-50c949a9af6ea44ab785d3edd76c8e76b8d78701.tar.bz2 gentoo-2-50c949a9af6ea44ab785d3edd76c8e76b8d78701.zip |
Fix erroneous creation of rundir and subsysdir (#193824). Sanitize the ebuild code.
(Portage version: 2.1.2.12)
Diffstat (limited to 'net-misc/openswan')
-rw-r--r-- | net-misc/openswan/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/openswan/files/digest-openswan-2.4.9-r1 (renamed from net-misc/openswan/files/digest-openswan-2.4.9) | 0 | ||||
-rw-r--r-- | net-misc/openswan/files/openswan-2.4.9-mkdir.patch | 14 | ||||
-rw-r--r-- | net-misc/openswan/openswan-2.4.9-r1.ebuild (renamed from net-misc/openswan/openswan-2.4.9.ebuild) | 33 |
4 files changed, 48 insertions, 9 deletions
diff --git a/net-misc/openswan/ChangeLog b/net-misc/openswan/ChangeLog index 3a5620f8c05d..12be20d3e4cf 100644 --- a/net-misc/openswan/ChangeLog +++ b/net-misc/openswan/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/openswan # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v 1.41 2007/09/23 07:32:08 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v 1.42 2007/09/26 08:14:22 mrness Exp $ + +*openswan-2.4.9-r1 (26 Sep 2007) + + 26 Sep 2007; Alin Năstac <mrness@gentoo.org> + +files/openswan-2.4.9-mkdir.patch, -openswan-2.4.9.ebuild, + +openswan-2.4.9-r1.ebuild: + Fix erroneous creation of rundir and subsysdir (#193824). + Sanitize the ebuild code. 23 Sep 2007; Alin Năstac <mrness@gentoo.org> openswan-2.4.9.ebuild: Stable on amd64 (#192964). diff --git a/net-misc/openswan/files/digest-openswan-2.4.9 b/net-misc/openswan/files/digest-openswan-2.4.9-r1 index 497ea9928593..497ea9928593 100644 --- a/net-misc/openswan/files/digest-openswan-2.4.9 +++ b/net-misc/openswan/files/digest-openswan-2.4.9-r1 diff --git a/net-misc/openswan/files/openswan-2.4.9-mkdir.patch b/net-misc/openswan/files/openswan-2.4.9-mkdir.patch new file mode 100644 index 000000000000..387b4797c5ff --- /dev/null +++ b/net-misc/openswan/files/openswan-2.4.9-mkdir.patch @@ -0,0 +1,14 @@ +diff -Nru openswan-2.4.9.orig/programs/_realsetup/_realsetup.in openswan-2.4.9/programs/_realsetup/_realsetup.in +--- openswan-2.4.9.orig/programs/_realsetup/_realsetup.in 2007-06-19 18:18:52.000000000 +0300 ++++ openswan-2.4.9/programs/_realsetup/_realsetup.in 2007-09-26 10:27:37.000000000 +0300 +@@ -193,8 +193,8 @@ + + # preliminaries + perform rm -f $lock +- mkdir -p rundir > /dev/null 2>/dev/null +- mkdir -p subsysdir > /dev/null 2>/dev/null ++ mkdir -p $rundir > /dev/null 2>/dev/null ++ mkdir -p $subsysdir > /dev/null 2>/dev/null + + # the meaning of $$ at a different runtime is questionable! + perform echo '$$' ">" $lock diff --git a/net-misc/openswan/openswan-2.4.9.ebuild b/net-misc/openswan/openswan-2.4.9-r1.ebuild index c260c66f4a5a..c76bd6646c51 100644 --- a/net-misc/openswan/openswan-2.4.9.ebuild +++ b/net-misc/openswan/openswan-2.4.9-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/openswan-2.4.9.ebuild,v 1.3 2007/09/23 07:32:08 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/openswan-2.4.9-r1.ebuild,v 1.1 2007/09/26 08:14:22 mrness Exp $ inherit eutils linux-info @@ -51,6 +51,7 @@ src_unpack() { cd "${S}" epatch "${FILESDIR}"/${P}-gentoo.patch + epatch "${FILESDIR}"/${P}-mkdir.patch } get_make_options() { @@ -73,26 +74,42 @@ get_make_options() { } src_compile() { - make \ + emake \ DESTDIR="${D}" \ USERCOMPILE="${CFLAGS}" \ $(get_make_options) \ - ${MYMAKE} || die "make failed" + ${MYMAKE} || die "emake failed" } src_install() { - make \ + emake \ DESTDIR="${D}" \ USERCOMPILE="${CFLAGS}" \ $(get_make_options) \ - install || die "make install failed" + install || die "emake install failed" dosym /etc/ipsec/ipsec.d /etc/ipsec.d - doinitd "${FILESDIR}"/ipsec + doinitd "${FILESDIR}"/ipsec || die "failed to install init script" - fperms -R a-X /etc/ipsec /usr/share - keepdir /var/run/pluto + dodir /var/run/pluto || die "failed to create /var/run/pluto" +} + +pkg_preinst() { + # Try to fix previous openswan-2.4.9 blooper (#193824) + if [[ "${ROOT}" == / ]] && has_version "=net-misc/openswan-2.4.9" ; then + elog "Trying to remove empty {rundir,subsysdir} erroneously created by openswan-2.4.9" + local base dir + for base in / /root/ /etc/ ; do + for dir in rundir subsysdir ; do + if [[ -d "${base}${dir}" ]]; then + rmdir "${base}${dir}" \ + && elog "Empty directory ${base}${dir} has been removed" \ + || ewarn "Failed to remove ${base}${dir} (perhaps some other package owns it?)" + fi + done + done + fi } pkg_postinst() { |