diff options
author | Jory A. Pratt <anarchy@gentoo.org> | 2013-09-12 19:07:45 -0500 |
---|---|---|
committer | Jory A. Pratt <anarchy@gentoo.org> | 2013-09-12 19:07:45 -0500 |
commit | 674605904840bfa4ce98ded3dcf13fbaa19c4788 (patch) | |
tree | bec84744cb691327e789cccf78df98c3a2244bab | |
parent | Add cp/mv xattr support until sorted upstream. Fixes breakage introduced (diff) | |
download | anarchy-674605904840bfa4ce98ded3dcf13fbaa19c4788.tar.gz anarchy-674605904840bfa4ce98ded3dcf13fbaa19c4788.tar.bz2 anarchy-674605904840bfa4ce98ded3dcf13fbaa19c4788.zip |
Fix syntax error
-rw-r--r-- | sys-libs/pam/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/pam/files/pam-1.1.7-typo.patch | 12 | ||||
-rw-r--r-- | sys-libs/pam/pam-1.1.7.ebuild | 182 |
3 files changed, 198 insertions, 0 deletions
diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest new file mode 100644 index 0000000..6785209 --- /dev/null +++ b/sys-libs/pam/Manifest @@ -0,0 +1,4 @@ +AUX pam-1.1.7-typo.patch 620 SHA256 57ee5eebf6ad33f37279fcb1d6c6261633471418906410cac627fa5927a522ba SHA512 dc30436c08f3d3bb4b08bd23b6ef4c6106c22f897b9bdd33467f32ac4c1908dde86bc3dd0f168349530d2c3f36a7666c80c6f276892e763c2818504fc5befd73 WHIRLPOOL f9043856c80af37abb2cbb2b25aca2851949a44851850430e76fe6c723b386aeb174b95f2ad3498072a55ac91dda25d787f86b191124aab77030c427a5f423f3 +DIST Linux-PAM-1.1.7-docs.tar.bz2 147833 SHA256 4b0d4824888c509214a216487caa636ee8a456268b3a51f7ba7920175e9ac24d SHA512 5085bcfbdba810baebaf98576421b221667dd595b690554ebeae5b9771b12b21c03ecb521b3b97e87fc6ab05567bf604ecae53f27a9c5340f01f9231553f51e2 WHIRLPOOL f5a1d151597f23c1c490262f6796d4df7a6533cf0f093d5f47b3ea6c37d2691caff4a78545e2d4f41a8b3db3d8a414c8e39d39e1c29813fd4fd9bb777af699a3 +DIST Linux-PAM-1.1.7.tar.bz2 1149359 SHA256 7fef52d86f16f8b39b13211dc3092b8eeb5bc2890e64e64cb7731629c6438e63 SHA512 9ef6ab41691bdd756899134347564b7dc21db620d09ac1b542657512870ba126e0a97c4e124d1afd9de21c060ffeaa2727ebcedb87a8ad2c2ad8d4c447f5093f WHIRLPOOL 43f40361deb671c276ae423dffe13cab7c0002f3d4c3396c08a3a15d02d82f53aa9bd60a46f01010fbbb2fd911be7bba7f12a6d9b463e89780845e2da0e6cdf2 +EBUILD pam-1.1.7.ebuild 5580 SHA256 3db2e68535f8d7fb29c1de66bc3de2ab913eedb772580eedf26ac2c5eb42171c SHA512 46591fff2cedddf57a527c4bf77e046ccd620dc68a8f5efef4d1b1fbe81ab7d826c86d802a8fa63f7a074e4049cd72f3bbc50d41b1f231bf00bad46270a2b371 WHIRLPOOL c9ba543d95d4106dcf542b2cab729eaf16dddf00f8a98e1ad9907b95e466c21401bcc411e2ea25cdaf9c5db2536a1e2e5712ee629bc9e5426e47881aa423efae diff --git a/sys-libs/pam/files/pam-1.1.7-typo.patch b/sys-libs/pam/files/pam-1.1.7-typo.patch new file mode 100644 index 0000000..e5c049c --- /dev/null +++ b/sys-libs/pam/files/pam-1.1.7-typo.patch @@ -0,0 +1,12 @@ +diff -urN a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c +--- a/modules/pam_unix/pam_unix_passwd.c 2013-08-29 07:09:08.000000000 -0500 ++++ b/modules/pam_unix/pam_unix_passwd.c 2013-09-12 18:45:01.873601155 -0500 +@@ -255,7 +255,7 @@ + close(fds[0]); /* close here to avoid possible SIGPIPE above */ + close(fds[1]); + /* wait for helper to complete: */ +- while ((rc=waitpid(child, &retval, 0) < 0 && errno == EINTR); ++ while (rc=waitpid(child, &retval, 0) < 0 && errno == EINTR); + if (rc<0) { + pam_syslog(pamh, LOG_ERR, "unix_update waitpid failed: %m"); + retval = PAM_AUTHTOK_ERR; diff --git a/sys-libs/pam/pam-1.1.7.ebuild b/sys-libs/pam/pam-1.1.7.ebuild new file mode 100644 index 0000000..efb8a67 --- /dev/null +++ b/sys-libs/pam/pam-1.1.7.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-1.1.7.ebuild,v 1.1 2013/09/12 08:34:08 flameeyes Exp $ + +EAPI=5 + +inherit libtool multilib eutils pam toolchain-funcs flag-o-matic db-use autotools-utils + +MY_PN="Linux-PAM" +MY_P="${MY_PN}-${PV}" + +HOMEPAGE="https://fedorahosted.org/linux-pam/" +DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)" + +SRC_URI="http://www.linux-pam.org/library/${MY_P}.tar.bz2 + http://www.linux-pam.org/documentation/${MY_P}-docs.tar.bz2" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="cracklib nls elibc_FreeBSD selinux vim-syntax audit test elibc_glibc debug berkdb nis" + +RDEPEND="nls? ( virtual/libintl ) + cracklib? ( >=sys-libs/cracklib-2.8.3 ) + audit? ( sys-process/audit ) + selinux? ( >=sys-libs/libselinux-1.28 ) + berkdb? ( sys-libs/db ) + elibc_glibc? ( + >=sys-libs/glibc-2.7 + nis? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) ) + )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2 + sys-devel/flex + nls? ( sys-devel/gettext ) + virtual/pkgconfig" +PDEPEND="sys-auth/pambase + vim-syntax? ( app-vim/pam-syntax )" +RDEPEND="${RDEPEND} + !<sys-apps/openrc-0.11.8 + !sys-auth/openpam + !sys-auth/pam_userdb" + +S="${WORKDIR}/${MY_P}" + +check_old_modules() { + local retval="0" + + if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | fgrep -q pam_stack.so; then + eerror "" + eerror "Your current setup is using the pam_stack module." + eerror "This module is deprecated and no longer supported, and since version" + eerror "0.99 is no longer installed, nor provided by any other package." + eerror "The package will be built (to allow binary package builds), but will" + eerror "not be installed." + eerror "Please replace pam_stack usage with proper include directive usage," + eerror "following the PAM Upgrade guide at the following URL" + eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml" + eerror "" + + retval=1 + fi + + if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | egrep -q 'pam_(pwdb|console)'; then + eerror "" + eerror "Your current setup is using one or more of the following modules," + eerror "that are not built or supported anymore:" + eerror "pam_pwdb, pam_console" + eerror "If you are in real need for these modules, please contact the maintainers" + eerror "of PAM through http://bugs.gentoo.org/ providing information about its" + eerror "use cases." + eerror "Please also make sure to read the PAM Upgrade guide at the following URL:" + eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml" + eerror "" + + retval=1 + fi + + return $retval +} + +pkg_pretend() { + # do not error out, this is just a warning, one could build a binpkg + # with old modules enabled. + check_old_modules +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.1.7-typo.patch + elibtoolize +} + +src_configure() { + # Disable automatic detection of libxcrypt; we _don't_ want the + # user to link libxcrypt in by default, since we won't track the + # dependency and allow to break PAM this way. + export ac_cv_header_xcrypt_h=no + + local myeconfargs=( + --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --enable-securedir="${EPREFIX}"/$(get_libdir)/security + --enable-isadir="${EPREFIX}"/$(get_libdir)/security + $(use_enable nls) + $(use_enable selinux) + $(use_enable cracklib) + $(use_enable audit) + $(use_enable debug) + $(use_enable berkdb db) + $(use_enable nis) + --with-db-uniquename=-$(db_findver sys-libs/db) + --disable-prelude + ) + + if use hppa || use elibc_FreeBSD; then + myeconfargs+=( --disable-pie ) + fi + + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile sepermitlockdir="${EPREFIX}/run/sepermit" +} + +DOCS=( CHANGELOG ChangeLog README AUTHORS Copyright NEWS ) + +src_install() { + autotools-utils_src_install sepermitlockdir="${EPREFIX}/run/sepermit" + + # Need to be suid + fperms u+s /sbin/unix_chkpwd + + gen_usr_ldscript -a pam pamc pam_misc + + # create extra symlinks just in case something depends on them... + local lib + for lib in pam pamc pam_misc; do + if ! [[ -f "${ED}"/$(get_libdir)/lib${lib}$(get_libname) ]]; then + dosym lib${lib}$(get_libname 0) /$(get_libdir)/lib${lib}$(get_libname) + fi + done + + docinto modules + for dir in modules/pam_*; do + newdoc "${dir}"/README README."$(basename "${dir}")" + done + + prune_libtool_files --all + + if use selinux; then + dodir /usr/lib/tmpfiles.d + cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF +d /run/sepermit 0755 root root +EOF + fi +} + +pkg_preinst() { + check_old_modules || die "deprecated PAM modules still used" +} + +pkg_postinst() { + ewarn "Some software with pre-loaded PAM libraries might experience" + ewarn "warnings or failures related to missing symbols and/or versions" + ewarn "after any update. While unfortunate this is a limit of the" + ewarn "implementation of PAM and the software, and it requires you to" + ewarn "restart the software manually after the update." + ewarn "" + ewarn "You can get a list of such software running a command like" + ewarn " lsof / | egrep -i 'del.*libpam\\.so'" + ewarn "" + ewarn "Alternatively, simply reboot your system." + if [ -x "${ROOT}"/var/log/tallylog ] ; then + elog "" + elog "Because of a bug present up to version 1.1.1-r2, you have" + elog "an executable /var/log/tallylog file. You can safely" + elog "correct it by running the command" + elog " chmod -x /var/log/tallylog" + elog "" + fi +} |