public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <filiperosset@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/alpine] rawhide: spec cleanup + patches to build with OpenSSL4
Date: Wed, 24 Jun 2026 18:39:11 GMT	[thread overview]
Message-ID: <178232635152.1.7106090028166616276.rpms-alpine-431f723c449c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/alpine
            Branch : rawhide
            Commit : 431f723c449c5dde5cda34dbbca9f7caffe31dbd
            Author : Filipe Rosset <filiperosset@fedoraproject.org>
            Date   : 2026-06-21T20:46:04-03:00
            Stats  : +65/-15 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/alpine/c/431f723c449c5dde5cda34dbbca9f7caffe31dbd?branch=rawhide

            Log:
            spec cleanup + patches to build with OpenSSL4

Signed-off-by: Filipe Rosset <filiperosset@fedoraproject.org>

---
diff --git a/alpine-c-client-openssl.patch b/alpine-c-client-openssl.patch
new file mode 100644
index 0000000..6cd64a4
--- /dev/null
+++ b/alpine-c-client-openssl.patch
@@ -0,0 +1,20 @@
+--- a/imap/src/osdep/unix/ssl_unix.c
++++ b/imap/src/osdep/unix/ssl_unix.c
+@@ -546,7 +546,7 @@
+        /* older versions of OpenSSL use "ia5" instead of dNSName */
+        for (i = 0; ret && (i < n); i++)
+ 	 if ((name = sk_GENERAL_NAME_value (ext,i)) &&
+-	    (name->type = GEN_DNS) && (s = name->d.ia5->data) &&
++	    (name->type = GEN_DNS) && (s = (char *) ASN1_STRING_get0_data (name->d.ia5)) &&
+ 	    ssl_compare_hostnames (host,s)) ret = NIL;
+      if(ext) GENERAL_NAMES_free(ext);
+   }
+@@ -571,7 +571,7 @@
+ 	           /* older versions of OpenSSL use "ia5" instead of dNSName */
+ 	      for (i = 0; ret && (i < n); i++)
+ 		  if ((name = sk_GENERAL_NAME_value (ext,i)) &&
+-		     (name->type = GEN_DNS) && (s = name->d.ia5->data) &&
++		     (name->type = GEN_DNS) && (s = (char *) ASN1_STRING_get0_data (name->d.ia5)) &&
+ 		     ssl_compare_hostnames (host,s)) ret = NIL;
+ 	  if(ext) GENERAL_NAMES_free(ext);
+         }

diff --git a/alpine-smime-openssl.patch b/alpine-smime-openssl.patch
new file mode 100644
index 0000000..8b7b683
--- /dev/null
+++ b/alpine-smime-openssl.patch
@@ -0,0 +1,29 @@
+--- a/alpine/smime.c
++++ b/alpine/smime.c
+@@ -395,9 +395,9 @@
+ 	int i;
+ 
+ 	bs = X509_get_serialNumber(cert);
+-	if (bs->length <= (int)sizeof(long)){
++	if (ASN1_STRING_length(bs) <= (int)sizeof(long)){
+ 	   l = ASN1_INTEGER_get(bs);
+-           if (bs->type == V_ASN1_NEG_INTEGER){
++           if (ASN1_STRING_type(bs) == V_ASN1_NEG_INTEGER){
+ 	      l = -l;
+ 	      neg="-";
+ 	   }
+@@ -405,10 +405,10 @@
+               neg="";
+ 	   snprintf(buf, sizeof(buf), " %s%lu (%s0x%lx)", neg, l, neg, l);
+ 	} else {
+-	    snprintf(buf, sizeof(buf), "%s", bs->type == V_ASN1_NEG_INTEGER ? "(Negative)" : "");
+-	    for (i = 0; i < bs->length; i++)
+-		 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%02x%s", bs->data[i],
+-			i+1 == bs->length ? "" : ":");
++	    snprintf(buf, sizeof(buf), "%s", ASN1_STRING_type(bs) == V_ASN1_NEG_INTEGER ? "(Negative)" : "");
++	    for (i = 0; i < ASN1_STRING_length(bs); i++)
++		 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%02x%s", ASN1_STRING_get0_data(bs)[i],
++			i+1 == ASN1_STRING_length(bs) ? "" : ":");
+ 	}
+     }
+     gf_puts(buf, spc);

diff --git a/alpine.spec b/alpine.spec
index 61e189b..ff4af57 100644
--- a/alpine.spec
+++ b/alpine.spec
@@ -3,7 +3,7 @@
 # crasher workaround, http://bugzilla.redhat.com/1282092
 %undefine _hardened_build
 
-Summary: powerful, easy to use console email client
+Summary: Powerful, easy to use console email client
 Name: alpine
 Version: 2.26
 Release: %autorelease
@@ -18,12 +18,15 @@ URL:     https://alpineapp.email/
 # what is at the new upstream. The old location no longer exists
 # Clearly this shuffle should be removed as soon as a new release appears.
 # Source0: https://alpineapp.email/alpine/patches/alpine-2.26/alpine-2.26.tar.xz
-Source0: alpine-2.26_patched.tar.xz
+Source0: https://src.fedoraproject.org/repo/pkgs/alpine/alpine-2.26_patched.tar.xz/sha512/e6c14f76bfa78d8d9295a80c6c98d0f6dc8c4d2fd70eac6c8cbd4454055d7a36911c0daf038dd4ff845adedaeff04cad80d3d150a0bd5c2902dca5ad5f563add/alpine-2.26_patched.tar.xz
 Source1: README.fedora
 
 Patch1: alpine-2.24-useragent.patch
 Patch2: alpine-2.23-gcc10.patch
 Patch3: alpine-configure-c99.patch
+Patch4: alpine-c-client-openssl.patch
+Patch5: alpine-smime-openssl.patch
+
 
 # Using "Conflicts" instead of Obsoletes because while alpine is substantially
 # compatible with pine the change to Unicode breaks important user
@@ -77,15 +80,11 @@ Changes and enhancements over pine:
   * Ground-up reorganization of source code around new "pith/" core 
 routine library.
   * Ground-up reorganization of build and install procedure based on 
-GNU Build System's autotools.
+the GNU Build System.
 
 
 %prep
-%setup -q -n alpine-%{version}
-%patch -P1 -p1
-%patch -P2 -p1
-%patch -P3 -p1
-
+%autosetup -p1
 install -m644 -p %{SOURCE1} .
 
 
@@ -94,7 +93,7 @@ touch imap/ip6
 
 # Add -std=gnu17 for now.
 # https://bugzilla.redhat.com/show_bug.cgi?id=2336274
-CFLAGS="%{optflags} -std=gnu17"
+export CFLAGS="%{optflags} -std=gnu17"
 
 # --without-tcl disables the TCL-based CGI "Web Alpine"
 %configure \
@@ -112,17 +111,19 @@ CFLAGS="%{optflags} -std=gnu17"
 
 
 # Build single threaded, make is not creating directories in time.
-export RPM_BUILD_NCPUS=1
-%make_build
+%make_build -j1
 
 
 %install
 %make_install
 
-# create/touch %ghost'd files
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
-touch $RPM_BUILD_ROOT%{_sysconfdir}/pine.conf
-touch $RPM_BUILD_ROOT%{_sysconfdir}/pine.conf.fixed
+# create/touch ghosted files
+mkdir -p %{buildroot}%{_sysconfdir}
+touch %{buildroot}%{_sysconfdir}/pine.conf
+touch %{buildroot}%{_sysconfdir}/pine.conf.fixed
+
+%check
+# No upstream test suite exists
 
 
 %files

                 reply	other threads:[~2026-06-24 18:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178232635152.1.7106090028166616276.rpms-alpine-431f723c449c@fedoraproject.org \
    --to=filiperosset@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox