From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9FCB41381FA for ; Mon, 26 May 2014 23:59:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 05F9FE0848; Mon, 26 May 2014 23:59:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7A724E0848 for ; Mon, 26 May 2014 23:59:09 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3DC3633FC0C for ; Mon, 26 May 2014 23:59:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id CC5AD181A9 for ; Mon, 26 May 2014 23:59:06 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1401148879.48555b66e063e01be80c2c0941e6c46187b30e31.blueness@gentoo> Subject: [gentoo-commits] proj/hardened-dev:musl commit in: mail-client/mailx-support/files/, mail-client/mailx-support/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: mail-client/mailx-support/files/mailx-support-20030215-gentoo.patch mail-client/mailx-support/files/mailx-support-20060102-add-sys_file_h.patch mail-client/mailx-support/files/mailx-support-20060102-respect-ldflags.patch mail-client/mailx-support/mailx-support-20060102-r99.ebuild mail-client/mailx-support/metadata.xml X-VCS-Directories: mail-client/mailx-support/files/ mail-client/mailx-support/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 48555b66e063e01be80c2c0941e6c46187b30e31 X-VCS-Branch: musl Date: Mon, 26 May 2014 23:59:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 46a7f122-f867-4db9-8ccf-877c23653210 X-Archives-Hash: 508b4bf7f00410c94fa48611f45b63dd commit: 48555b66e063e01be80c2c0941e6c46187b30e31 Author: Anthony G. Basile gentoo org> AuthorDate: Tue May 27 00:01:19 2014 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Tue May 27 00:01:19 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=48555b66 mail-client/mailx-support: initial Package-Manager: portage-2.2.8-r1 RepoMan-Options: --force Manifest-Sign-Key: 0xF52D4BBA --- .../files/mailx-support-20030215-gentoo.patch | 66 ++++++++++++++++++++++ .../mailx-support-20060102-add-sys_file_h.patch | 9 +++ .../mailx-support-20060102-respect-ldflags.patch | 18 ++++++ .../mailx-support-20060102-r99.ebuild | 39 +++++++++++++ mail-client/mailx-support/metadata.xml | 5 ++ 5 files changed, 137 insertions(+) diff --git a/mail-client/mailx-support/files/mailx-support-20030215-gentoo.patch b/mail-client/mailx-support/files/mailx-support-20030215-gentoo.patch new file mode 100644 index 0000000..829b858 --- /dev/null +++ b/mail-client/mailx-support/files/mailx-support-20030215-gentoo.patch @@ -0,0 +1,66 @@ +--- - 2003-02-15 23:35:46.000000000 +0800 ++++ locking.c 2003-02-15 23:19:11.000000000 +0800 +@@ -45,6 +45,7 @@ + #include + #include "pathnames.h" + #include "mail.local.h" ++#include "open_with_exlock.h" + + static char lpath[MAXPATHLEN]; + +@@ -93,7 +94,7 @@ + } + goto again; + } +- if ((lfd = open(lpath, O_CREAT|O_WRONLY|O_EXCL|O_EXLOCK, ++ if ((lfd = open_with_exlock(lpath, O_CREAT|O_WRONLY|O_EXCL, + S_IRUSR|S_IWUSR)) != -1) + break; + again: +@@ -104,7 +105,7 @@ + return(-1); + } + if (tries > 9 && +- (lfd = open(lpath, O_WRONLY|O_EXLOCK, 0)) != -1) { ++ (lfd = open_with_exlock(lpath, O_WRONLY, 0)) != -1) { + if (fstat(lfd, &fsb) != -1 && + lstat(lpath, &sb) != -1) { + if (fsb.st_dev == sb.st_dev && +@@ -169,3 +170,4 @@ + if (isfatal) + exit(1); + } ++ +--- - 2003-02-15 23:37:13.000000000 +0800 ++++ mail.local.c 2003-02-15 23:20:50.000000000 +0800 +@@ -66,6 +66,7 @@ + #include + #include "pathnames.h" + #include "mail.local.h" ++#include "open_with_exlock.h" + + int + main(int argc, char *argv[]) +@@ -218,7 +219,7 @@ + merr(NOTFATAL, "%s: %s", path, strerror(errno)); + goto bad; + } +- if ((mbfd = open(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY|O_EXLOCK, ++ if ((mbfd = open_with_exlock(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY, + S_IRUSR|S_IWUSR)) < 0) { + if (errno == EEXIST) { + /* file appeared since lstat */ +@@ -244,7 +245,7 @@ + merr(NOTFATAL, "%s: linked or special file", path); + goto bad; + } +- if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, ++ if ((mbfd = open_with_exlock(path, O_APPEND|O_WRONLY, + S_IRUSR|S_IWUSR)) < 0) { + merr(NOTFATAL, "%s: %s", path, strerror(errno)); + goto bad; +@@ -340,3 +341,4 @@ + { + merr(FATAL, "usage: mail.local [-lL] [-f from] user ..."); + } ++ diff --git a/mail-client/mailx-support/files/mailx-support-20060102-add-sys_file_h.patch b/mail-client/mailx-support/files/mailx-support-20060102-add-sys_file_h.patch new file mode 100644 index 0000000..b3b871b --- /dev/null +++ b/mail-client/mailx-support/files/mailx-support-20060102-add-sys_file_h.patch @@ -0,0 +1,9 @@ +diff -Naur mailx-support-20060102.orig/open_with_exlock.c mailx-support-20060102/open_with_exlock.c +--- mailx-support-20060102.orig/open_with_exlock.c 2003-06-09 19:01:08.000000000 +0000 ++++ mailx-support-20060102/open_with_exlock.c 2014-04-01 12:17:31.830213927 +0000 +@@ -1,4 +1,5 @@ + #include ++#include + + int open_with_exlock(const char *path, int flags, mode_t mode) + { diff --git a/mail-client/mailx-support/files/mailx-support-20060102-respect-ldflags.patch b/mail-client/mailx-support/files/mailx-support-20060102-respect-ldflags.patch new file mode 100644 index 0000000..42aa569 --- /dev/null +++ b/mail-client/mailx-support/files/mailx-support-20060102-respect-ldflags.patch @@ -0,0 +1,18 @@ +Index: mailx-support-20060102/Makefile +=================================================================== +--- mailx-support-20060102.orig/Makefile ++++ mailx-support-20060102/Makefile +@@ -17,10 +17,10 @@ clean: + ${RM} -f ${PRODUCTS} *.o + + mail.local: mail.local.o locking.o open_with_exlock.o +- ${CC} ${CFLAGS} -o $@ $^ ++ ${CC} ${LDFLAGS} ${CFLAGS} -o $@ $^ + + lockspool: lockspool.o locking.o open_with_exlock.o +- ${CC} ${CFLAGS} -o $@ $^ ++ ${CC} ${LDFLAGS} ${BINDNOW_FLAGS} ${CFLAGS} -o $@ $^ + + .c.o: + ${CC} ${CFLAGS} -c -o $@ $^ + diff --git a/mail-client/mailx-support/mailx-support-20060102-r99.ebuild b/mail-client/mailx-support/mailx-support-20060102-r99.ebuild new file mode 100644 index 0000000..3f8c342 --- /dev/null +++ b/mail-client/mailx-support/mailx-support-20060102-r99.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-client/mailx-support/mailx-support-20060102-r1.ebuild,v 1.17 2013/02/17 20:46:43 zmedico Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="Provides lockspool utility" +HOMEPAGE="http://www.openbsd.org/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm ~mips x86" +IUSE="" + +RDEPEND="" +DEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-respect-ldflags.patch + epatch "${FILESDIR}"/${P}-add-sys_file_h.patch + + # This code should only be ran with Gentoo Prefix profiles + if use prefix; then + ebegin "Allowing unprivileged install" + sed -i -e "s|-g 0 -o 0||g" Makefile + eend $? + fi +} + +src_compile() { + emake CC="$(tc-getCC)" BINDNOW_FLAGS="" || die "emake failed" +} + +src_install() { + einstall || die "einstall failed" +} diff --git a/mail-client/mailx-support/metadata.xml b/mail-client/mailx-support/metadata.xml new file mode 100644 index 0000000..51f94e3 --- /dev/null +++ b/mail-client/mailx-support/metadata.xml @@ -0,0 +1,5 @@ + + + +net-mail +