public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/hardened-dev:musl commit in: mail-client/mailx-support/files/, mail-client/mailx-support/
@ 2014-05-26 23:59 Anthony G. Basile
  0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2014-05-26 23:59 UTC (permalink / raw
  To: gentoo-commits

commit:     48555b66e063e01be80c2c0941e6c46187b30e31
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue May 27 00:01:19 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> 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 <stdarg.h>
+ #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 <string.h>
+ #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 <fcntl.h>
++#include <sys/file.h>
+ 
+ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-mail</herd>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-26 23:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 23:59 [gentoo-commits] proj/hardened-dev:musl commit in: mail-client/mailx-support/files/, mail-client/mailx-support/ Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox