I am uploading a NMU to DELAYED/10 to fix this. The debdiff is attached.
diff -Nru coolmail-1.3/audio.c coolmail-1.3/audio.c
--- coolmail-1.3/audio.c 2023-08-17 02:12:46.000000000 +0200
+++ coolmail-1.3/audio.c 1995-09-22 07:21:06.000000000 +0200
@@ -63,13 +63,8 @@
u_32 channels; /* number of interleaved channels */
} Audio_filehdr;
-#if defined(linux) || defined(__FreeBSD_kernel__)
-
-#if defined(linux)
+#ifdef linux
#include <linux/soundcard.h>
-#else
-#include <sys/soundcard.h>
-#endif
#define DEV_MIXER "/dev/mixer"
#define MAX_VOLUME 100
@@ -106,7 +101,7 @@
#define CLOSE_FD(afd) { if (afd > -1) close(afd); afd = -1; }
-#if defined(linux) || defined(__FreeBSD_kernel__)
+#ifdef linux
#define INIT_FD { audiofd = filefd = mixer_fd = -1; }
#define END_FD { CLOSE_FD(audiofd); CLOSE_FD(filefd); CLOSE_FD(mixer_fd);
return; }
#else
@@ -122,7 +117,7 @@
unsigned char buf[256];
Audio_filehdr *au_hdr;
-#if defined(linux) || defined(__FreeBSD_kernel__)
+#ifdef linux
StereoVolume origVol, volume;
int mixer_fd;
#else
@@ -130,18 +125,14 @@
int origVol;
#endif
- /* NOP if requested volume is zero. */
- if (cool_vol <= 0) return;
-
INIT_FD;
audiofd = open( "/dev/audio", O_WRONLY | O_NDELAY );
if (audiofd < 0) {
- perror("/dev/audio");
fprintf(stderr, "%s: Problem opening /dev/audio.\n",
"Coolmail");
END_FD;
}
-#if defined(linux) || defined(__FreeBSD_kernel__)
+#ifdef linux
if ( (mixer_fd=open(DEV_MIXER, O_RDWR, 0)) < 0 ) {
fprintf(stderr, "Can't open %s: ", DEV_MIXER);
END_FD;
@@ -194,7 +185,7 @@
/* Strip the header */
au_hdr = (Audio_filehdr *)buf;
-#if defined(linux) || defined(__FreeBSD_kernel__)
+#ifdef linux
rn = ntohl(au_hdr->hdr_size) - sizeof(Audio_filehdr);
#else
rn = au_hdr->hdr_size - sizeof(Audio_filehdr);
@@ -226,7 +217,7 @@
usleep(1000);
}
}
-#if defined(linux) || defined(__FreeBSD_kernel__)
+#ifdef linux
CLOSE_FD(audiofd);
if ( ioctl(mixer_fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &origVol) < 0 ) {
diff -Nru coolmail-1.3/coolmail.c coolmail-1.3/coolmail.c
--- coolmail-1.3/coolmail.c 2023-08-17 02:12:46.000000000 +0200
+++ coolmail-1.3/coolmail.c 1995-09-22 07:15:50.000000000 +0200
@@ -26,7 +26,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <pwd.h>
#ifdef AUDIO
#include <string.h>
@@ -97,7 +96,7 @@
int main(int argc, char *argv[])
{
int reason;
- struct passwd *uid;
+ char username[L_cuserid];
/* Quickly scan for the -h option -- if it is present don't do anything
* but print out some help and exit. */
@@ -105,11 +104,7 @@
return(0);
/* Get the username and use it to create a default mailfile name */
- if (!(uid = getpwuid(geteuid()))) {
- printf("Couldn't determine your username. Exiting.\n");
- return 1;
- }
- strcat(mailfile_str, uid->pw_name);
+ strcat(mailfile_str, cuserid(username));
/* Initialize the renderer */
rend_init(&argc, argv, (float)150.0);
diff -Nru coolmail-1.3/debian/changelog coolmail-1.3/debian/changelog
--- coolmail-1.3/debian/changelog 2023-08-17 02:12:46.000000000 +0200
+++ coolmail-1.3/debian/changelog 2023-08-17 01:28:49.000000000 +0200
@@ -1,3 +1,10 @@
+coolmail (1.3-12.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Convert to source format 3.0 (closes: #1007594)
+
+ -- Bastian Germann <b...@debian.org> Wed, 16 Aug 2023 23:28:49 +0000
+
coolmail (1.3-12) unstable; urgency=low
* Raised debhelper compat version to 9 (closes: #817408)
diff -Nru coolmail-1.3/debian/patches/debian.patch
coolmail-1.3/debian/patches/debian.patch
--- coolmail-1.3/debian/patches/debian.patch 1970-01-01 01:00:00.000000000
+0100
+++ coolmail-1.3/debian/patches/debian.patch 2023-08-17 01:28:49.000000000
+0200
@@ -0,0 +1,162 @@
+--- coolmail-1.3.orig/Makefile
++++ coolmail-1.3/Makefile
+@@ -22,9 +22,9 @@
+ # your linker where to find the libraries it will need, and BINDIR and
+ # MANDIR specify the places to install the binary executable and manpage
+ # files for coolmail when you type `make install'.
+-CFLAGS =
++#CFLAGS =
+ LINK = $(CC)
+-INCLUDES = -I/usr/X11R5/include
++INCLUDES = -I/usr/X11R6/include
+ LIB_DIRS = -L/usr/X11R6/lib
+ BINDIR = /usr/local/bin
+ MANDIR = /usr/local/man/man1
+@@ -34,10 +34,17 @@ MANDIR = /usr/local/man/man1
+ AUDIO = -DAUDIO
+ AUDIO_MODULE = audio.o
+
++# Comment these out if you don't want Maildir support
++MAILDIR = -DSUPPORT_MAILDIR
++# for debugging:
++#MAILDIR = $(MAILDIR) -DSUPPORT_MAILDIR_DEBUG
++# normally ignores non-regular files in the Maildir; uncomment to change
++#MAILDIR = $(MAILDIR) -DSUPPORT_MAILDIR_STRICTER
++
+ #### You really don't need to read past this point. ####
+
+-LIBS = $(LIB_DIRS) -lXt -lX11 -lm -lXext
+-COPTS = $(CFLAGS) $(AUDIO)
++LIBS = $(LIB_DIRS) -lXt -lX11 -lm
++COPTS = $(CFLAGS) $(AUDIO) $(MAILDIR)
+
+ all: coolmail
+ # Done.
+@@ -74,7 +81,7 @@ install:
+ fi;
+
+ coolmail: coolmail.o display_list.o render1.o colors.o $(AUDIO_MODULE)
+- $(LINK) coolmail.o display_list.o render1.o colors.o $(AUDIO_MODULE)\
++ $(LINK) $(LDFLAGS) coolmail.o display_list.o render1.o colors.o
$(AUDIO_MODULE)\
+ $(LIBS) -o coolmail
+
+ display_list.o: system/X11/display_list.c display_list.h render1.h \
+--- coolmail-1.3.orig/audio.c
++++ coolmail-1.3/audio.c
+@@ -63,8 +63,13 @@ typedef struct {
+ u_32 channels; /* number of interleaved channels */
+ } Audio_filehdr;
+
+-#ifdef linux
++#if defined(linux) || defined(__FreeBSD_kernel__)
++
++#if defined(linux)
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+
+ #define DEV_MIXER "/dev/mixer"
+ #define MAX_VOLUME 100
+@@ -101,7 +106,7 @@ void setvolume(int which, unsigned char
+
+ #define CLOSE_FD(afd) { if (afd > -1) close(afd); afd = -1; }
+
+-#ifdef linux
++#if defined(linux) || defined(__FreeBSD_kernel__)
+ #define INIT_FD { audiofd = filefd = mixer_fd = -1; }
+ #define END_FD { CLOSE_FD(audiofd); CLOSE_FD(filefd);
CLOSE_FD(mixer_fd); return; }
+ #else
+@@ -117,7 +122,7 @@ void audio_beep (void)
+ unsigned char buf[256];
+ Audio_filehdr *au_hdr;
+
+-#ifdef linux
++#if defined(linux) || defined(__FreeBSD_kernel__)
+ StereoVolume origVol, volume;
+ int mixer_fd;
+ #else
+@@ -125,14 +130,18 @@ void audio_beep (void)
+ int origVol;
+ #endif
+
++ /* NOP if requested volume is zero. */
++ if (cool_vol <= 0) return;
++
+ INIT_FD;
+ audiofd = open( "/dev/audio", O_WRONLY | O_NDELAY );
+ if (audiofd < 0) {
++ perror("/dev/audio");
+ fprintf(stderr, "%s: Problem opening /dev/audio.\n",
+ "Coolmail");
+ END_FD;
+ }
+-#ifdef linux
++#if defined(linux) || defined(__FreeBSD_kernel__)
+ if ( (mixer_fd=open(DEV_MIXER, O_RDWR, 0)) < 0 ) {
+ fprintf(stderr, "Can't open %s: ", DEV_MIXER);
+ END_FD;
+@@ -185,7 +194,7 @@ void audio_beep (void)
+
+ /* Strip the header */
+ au_hdr = (Audio_filehdr *)buf;
+-#ifdef linux
++#if defined(linux) || defined(__FreeBSD_kernel__)
+ rn = ntohl(au_hdr->hdr_size) - sizeof(Audio_filehdr);
+ #else
+ rn = au_hdr->hdr_size - sizeof(Audio_filehdr);
+@@ -217,7 +226,7 @@ void audio_beep (void)
+ usleep(1000);
+ }
+ }
+-#ifdef linux
++#if defined(linux) || defined(__FreeBSD_kernel__)
+ CLOSE_FD(audiofd);
+
+ if ( ioctl(mixer_fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &origVol) < 0 ) {
+--- coolmail-1.3.orig/coolmail.c
++++ coolmail-1.3/coolmail.c
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <pwd.h>
+
+ #ifdef AUDIO
+ #include <string.h>
+@@ -96,7 +97,7 @@ void cool_usage(void);
+ int main(int argc, char *argv[])
+ {
+ int reason;
+- char username[L_cuserid];
++ struct passwd *uid;
+
+ /* Quickly scan for the -h option -- if it is present don't do anything
+ * but print out some help and exit. */
+@@ -104,7 +105,11 @@ int main(int argc, char *argv[])
+ return(0);
+
+ /* Get the username and use it to create a default mailfile name */
+- strcat(mailfile_str, cuserid(username));
++ if (!(uid = getpwuid(geteuid()))) {
++ printf("Couldn't determine your username. Exiting.\n");
++ return 1;
++ }
++ strcat(mailfile_str, uid->pw_name);
+
+ /* Initialize the renderer */
+ rend_init(&argc, argv, (float)150.0);
+--- coolmail-1.3.orig/system/X11/display_list.c
++++ coolmail-1.3/system/X11/display_list.c
+@@ -306,9 +306,9 @@ void disp_bell(void)
+ /* play the soundfile */
+ audio_beep();
+ else /* no sound file chosen then use system bell */
+- XBell(XtDisplay(main_gfx_w), cool_vol);
++ XBell(XtDisplay(main_gfx_w), (2*cool_vol)-100);
+ #else
+- XBell(XtDisplay(main_gfx_w), 50);
++ XBell(XtDisplay(main_gfx_w), 0);
+ #endif
+ }
+
diff -Nru coolmail-1.3/debian/patches/series coolmail-1.3/debian/patches/series
--- coolmail-1.3/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ coolmail-1.3/debian/patches/series 2023-08-17 01:28:49.000000000 +0200
@@ -0,0 +1 @@
+debian.patch
diff -Nru coolmail-1.3/debian/source/format coolmail-1.3/debian/source/format
--- coolmail-1.3/debian/source/format 1970-01-01 01:00:00.000000000 +0100
+++ coolmail-1.3/debian/source/format 2023-08-17 01:28:49.000000000 +0200
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru coolmail-1.3/Makefile coolmail-1.3/Makefile
--- coolmail-1.3/Makefile 2023-08-17 02:12:46.000000000 +0200
+++ coolmail-1.3/Makefile 1995-10-16 08:10:12.000000000 +0100
@@ -22,9 +22,9 @@
# your linker where to find the libraries it will need, and BINDIR and
# MANDIR specify the places to install the binary executable and manpage
# files for coolmail when you type `make install'.
-#CFLAGS =
+CFLAGS =
LINK = $(CC)
-INCLUDES = -I/usr/X11R6/include
+INCLUDES = -I/usr/X11R5/include
LIB_DIRS = -L/usr/X11R6/lib
BINDIR = /usr/local/bin
MANDIR = /usr/local/man/man1
@@ -34,17 +34,10 @@
AUDIO = -DAUDIO
AUDIO_MODULE = audio.o
-# Comment these out if you don't want Maildir support
-MAILDIR = -DSUPPORT_MAILDIR
-# for debugging:
-#MAILDIR = $(MAILDIR) -DSUPPORT_MAILDIR_DEBUG
-# normally ignores non-regular files in the Maildir; uncomment to change
-#MAILDIR = $(MAILDIR) -DSUPPORT_MAILDIR_STRICTER
-
#### You really don't need to read past this point. ####
-LIBS = $(LIB_DIRS) -lXt -lX11 -lm
-COPTS = $(CFLAGS) $(AUDIO) $(MAILDIR)
+LIBS = $(LIB_DIRS) -lXt -lX11 -lm -lXext
+COPTS = $(CFLAGS) $(AUDIO)
all: coolmail
# Done.
@@ -81,7 +74,7 @@
fi;
coolmail: coolmail.o display_list.o render1.o colors.o $(AUDIO_MODULE)
- $(LINK) $(LDFLAGS) coolmail.o display_list.o render1.o colors.o
$(AUDIO_MODULE)\
+ $(LINK) coolmail.o display_list.o render1.o colors.o $(AUDIO_MODULE)\
$(LIBS) -o coolmail
display_list.o: system/X11/display_list.c display_list.h render1.h \
diff -Nru coolmail-1.3/system/X11/display_list.c
coolmail-1.3/system/X11/display_list.c
--- coolmail-1.3/system/X11/display_list.c 2023-08-17 02:12:46.000000000
+0200
+++ coolmail-1.3/system/X11/display_list.c 1995-09-22 07:22:27.000000000
+0200
@@ -306,9 +306,9 @@
/* play the soundfile */
audio_beep();
else /* no sound file chosen then use system bell */
- XBell(XtDisplay(main_gfx_w), (2*cool_vol)-100);
+ XBell(XtDisplay(main_gfx_w), cool_vol);
#else
- XBell(XtDisplay(main_gfx_w), 0);
+ XBell(XtDisplay(main_gfx_w), 50);
#endif
}