Mailing List Archive

Building exim 4.97 without File::FcntlLock
Hi all

When trying to build exim 4.97, it fails because the perl modules
File::FcntlLock is missing. That is quite unfortunate, as it introduces
a new dependency.

I got around it by patching exim_id_update.src, commenting out

use File::FcntlLock;

and twice

$fs->l_whence( SEEK_CUR );


After that, exim builds fine, however I'm not sure if this totally
breaks something.

Can somebody tell me if this is ok, or leaves me with a bad exim?


Below is the patch.

Bye
Tim














--- exim-4.97/src/exim_id_update.src 2023-11-04 13:55:49.000000000 +0100
+++ exim-4.97-no_lock/src/exim_id_update.src 2023-11-17
00:07:32.086560372 +0100
@@ -15,7 +15,7 @@
use Getopt::Std;
use File::Find;
use Fcntl;
-use File::FcntlLock;
+#use File::FcntlLock;
use IO::Handle;


@@ -199,7 +199,7 @@
my $fs = new File::FcntlLock;

$fs->l_type( F_WRLCK );
- $fs->l_whence( SEEK_CUR );
+# $fs->l_whence( SEEK_CUR );
$fs->l_start( 0 );
$fs->l_len( $nbytes );

@@ -213,7 +213,7 @@
my $fs = new File::FcntlLock;

$fs->l_type( F_UNLCK );
- $fs->l_whence( SEEK_CUR );
+# $fs->l_whence( SEEK_CUR );
$fs->l_start( 0 );
$fs->l_len( $nbytes );
$fs->lock( $fh, F_SETLK )

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Building exim 4.97 without File::FcntlLock [ In reply to ]
On 16/11/2023 23:17, Tim Tassonis via Exim-users wrote:
> Can somebody tell me if this is ok, or leaves me with a bad exim?

Your update script is now unsafe versus the main exim binary,
plus any other utility we might introduce in the future.
Corrupt mails in the spool are the result.

It would be better to install that perl module.
--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Building exim 4.97 without File::FcntlLock [ In reply to ]
On 11/17/23 00:57, Jeremy Harris via Exim-users wrote:
> On 16/11/2023 23:17, Tim Tassonis via Exim-users wrote:
>> Can somebody tell me if this is ok, or leaves me with a bad exim?
>
> Your update script is now unsafe versus the main exim binary,
> plus any other utility we might introduce in the future.
> Corrupt mails in the spool are the result.
>
> It would be better to install that perl module.

Ok, I'll do that then. Thanks for the answer.


Bye
Tim


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/