Initial commit

This commit is contained in:
2025-10-31 18:26:19 +02:00
commit 383765d301
11 changed files with 174 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Exclude bpm archives
*.bpm
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
# Ignore this package
echo "ignore"
+18
View File
@@ -0,0 +1,18 @@
name: mailx
description: Mail user agent for Unix systems
version: "12.5"
revision: 1
url: http://heirloom.sourceforge.net/mailx.html
license: BSD-4-Clause
architecture: any
type: source
make_depends:
- openssl
- krb5
keep:
- etc/mailx.rc
downloads:
- url: https://pkgs.fedoraproject.org/repo/pkgs/mailx/mailx-${BPM_PKG_VERSION}.tar.xz/836bf1da322d2d1f78b7056c2b3b2304/mailx-${BPM_PKG_VERSION}.tar.xz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: 1b8136fb2466adeaf71a5e3c65db9fa1a967f1f6469ff689c2cf06e21f638823
+39
View File
@@ -0,0 +1,39 @@
--- a/openssl.c.orig 2014-07-22 20:59:16.024655378 +0200
+++ b/openssl.c 2014-07-22 21:00:45.754482770 +0200
@@ -137,11 +137,13 @@ ssl_rand_init(void)
if ((cp = value("ssl-rand-egd")) != NULL) {
cp = expand(cp);
+#ifdef HAVE_OPENSSL_RAND_EGD
if (RAND_egd(cp) == -1) {
fprintf(stderr, catgets(catd, CATSET, 245,
"entropy daemon at \"%s\" not available\n"),
cp);
} else
+#endif
state = 1;
} else if ((cp = value("ssl-rand-file")) != NULL) {
cp = expand(cp);
@@ -216,9 +218,7 @@ ssl_select_method(const char *uhp)
cp = ssl_method_string(uhp);
if (cp != NULL) {
- if (equal(cp, "ssl2"))
- method = SSLv2_client_method();
- else if (equal(cp, "ssl3"))
+ if (equal(cp, "ssl3"))
method = SSLv3_client_method();
else if (equal(cp, "tls1"))
method = TLSv1_client_method();
--- a/openssl.c.orig 2016-03-30 17:03:49.491514269 +0200
+++ b/openssl.c 2016-03-30 17:04:03.026491689 +0200
@@ -219,7 +219,7 @@ ssl_select_method(const char *uhp)
cp = ssl_method_string(uhp);
if (cp != NULL) {
if (equal(cp, "ssl3"))
- method = SSLv3_client_method();
+ method = SSLv23_client_method();
else if (equal(cp, "tls1"))
method = TLSv1_client_method();
else {
+12
View File
@@ -0,0 +1,12 @@
diff -Nrbu mailx-12.3/cmd1.c mailx-12.3-OK/cmd1.c
--- mailx-12.3/cmd1.c 2007-06-16 16:48:39.000000000 +0400
+++ mailx-12.3-OK/cmd1.c 2008-06-26 19:57:38.000000000 +0400
@@ -78,7 +78,7 @@
cp = value("PAGER");
if (cp == NULL || *cp == '\0')
- cp = value("bsdcompat") ? "more" : "pg";
+ cp = value("bsdcompat") ? "more" : "less";
return cp;
}
+13
View File
@@ -0,0 +1,13 @@
--- mailx-12.4.orig/collect.c 2012-09-12 16:07:53.653103796 -0400
+++ mailx-12.4/collect.c 2012-09-12 21:27:05.092259236 -0400
@@ -905,7 +905,9 @@ err:
if (collf != NULL) {
Fclose(collf);
collf = NULL;
- }
+ } else {
+ exit(1);
+ }
out:
if (collf != NULL) {
if ((cp = value("MAILX_TAIL")) != NULL) {
+12
View File
@@ -0,0 +1,12 @@
diff -upr mailx-12.5.orig/names.c mailx-12.5/names.c
--- mailx-12.5.orig/names.c 2006-03-04 01:32:16.000000000 +0100
+++ mailx-12.5/names.c 2012-11-01 15:28:43.883573793 +0100
@@ -357,7 +357,7 @@ outof(struct name *names, FILE *fo, stru
free_child(pid);
} else {
int f;
- if ((fout = Zopen(fname, "a", NULL)) == NULL) {
+ if ((fname == NULL) || ((fout = Zopen(fname, "a", NULL)) == NULL)) {
perror(fname);
senderr++;
goto cant;
+12
View File
@@ -0,0 +1,12 @@
diff -Nrbu mailx-12.5/lzw.c mailx-12.5-OK/lzw.c
--- mailx-12.5/lzw.c 2006-03-04 03:32:16.000000000 +0300
+++ mailx-12.5-OK/lzw.c 2011-08-17 16:30:01.000000000 +0400
@@ -516,6 +516,8 @@
/* Generate output characters in reverse order. */
while (code >= 256) {
+ if (stackp - de_stack >= HSIZE - 1)
+ return -1;
*stackp++ = tab_suffixof(code);
code = tab_prefixof(code);
}
+12
View File
@@ -0,0 +1,12 @@
diff -upr mailx-12.5.orig/main.c mailx-12.5/main.c
--- mailx-12.5.orig/main.c 2007-10-02 14:15:50.000000000 +0200
+++ mailx-12.5/main.c 2013-07-22 16:06:56.960765683 +0200
@@ -353,7 +353,7 @@ main(int argc, char *argv[])
case '?':
usage:
fprintf(stderr, catgets(catd, CATSET, 135,
-"Usage: %s -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname);
+"Usage: %s -eiIUdEFntBDNHRVv~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname);
exit(2);
}
}
+11
View File
@@ -0,0 +1,11 @@
diff -Nrbu nail-11.25/nail.rc nail-11.25-OK/nail.rc
--- nail-11.25/nail.rc 2005-01-15 17:33:16.000000000 +0300
+++ nail-11.25-OK/nail.rc 2005-08-19 16:55:09.000000000 +0400
@@ -60,3 +60,7 @@
# Only include selected header fields when forwarding messages.
fwdretain subject date from to
+
+# For Linux and BSD, this should be set.
+set bsdcompat
+
+39
View File
@@ -0,0 +1,39 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
cd "$BPM_SOURCE"
for p in "$BPM_WORKDIR"/*.patch; do
patch -Np1 -i "$p"
done
local OPTS=(
PREFIX=/usr
BINDIR=/usr/bin
MANDIR=/usr/share/man
SYSCONFDIR=/etc
MAILRC=/etc/mailx.rc
MAILSPOOL=/var/mail
UCBINSTALL=/usr/bin/install
SENDMAIL=/usr/sbin/sendmail
)
echo "${OPTS[@]}" > makeflags
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
make $(cat makeflags) IPv6=-DHAVE_IPv6_FUNCS CFLAGS="${CFLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make $(cat makeflags) DESTDIR="$BPM_OUTPUT" install
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/mailx/COPYING
}