fixed missing requirement for /usr/sbin/install-info and specfile fixes [release 3.3.12-2mamba;Sat Feb 15 2025]

This commit is contained in:
Silvan Calarco 2025-02-16 12:04:49 +01:00
parent 7e95940f00
commit 6262cc7fc7
9 changed files with 15 additions and 397 deletions

View File

@ -1,32 +0,0 @@
diff -Nru libmikmod-3.1.11.orig/configure libmikmod-3.1.11/configure
--- libmikmod-3.1.11.orig/configure 2005-08-03 18:36:45.000000000 +0200
+++ libmikmod-3.1.11/configure 2005-08-03 18:36:50.000000000 +0200
@@ -6207,8 +6207,8 @@
# -----------------
if test "`uname`" = "Linux" && test $libmikmod_driver_alsa = yes
then
- libmikmod_driver_alsa=no
- for ac_hdr in sys/asoundlib.h
+ libmikmod_driver_alsa=yes
+ for ac_hdr in alsa/asoundlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -6248,7 +6248,7 @@
fi
done
- if test $ac_cv_header_sys_asoundlib_h = yes
+ if test $ac_cv_header_alsa_asoundlib_h = yes
then
echo $ac_n "checking for snd_cards in -lasound""... $ac_c" 1>&6
echo "configure:6255: checking for snd_cards in -lasound" >&5
@@ -8651,7 +8651,7 @@
# Print configuration.
# ====================
-libmikmod_driverlist=`echo $libmikmod_driverlist raw wav pipe stdout nosound|sed -e 's, , ,g'`
+libmikmod_driverlist=`echo $libmikmod_driverlist wav pipe stdout nosound|sed -e 's, , ,g'`
if test $libmikmod_dynload != no
then
libmikmod_dynload="yes, ${libmikmod_dynload} style"

View File

@ -1,12 +0,0 @@
diff -pur libmikmod-3.1.11/drivers/drv_oss.c libmikmod-3.1.11-fix/drivers/drv_oss.c
--- libmikmod-3.1.11/drivers/drv_oss.c 2005-08-04 10:41:29.000000000 +0200
+++ libmikmod-3.1.11-fix/drivers/drv_oss.c 2005-08-04 10:50:24.000000000 +0200
@@ -160,7 +160,7 @@ static BOOL OSS_IsThere(void)
in the kernel or sound hardware */
int fd;
- if((fd=open(OSS_GetDeviceName(),O_WRONLY))>=0) {
+ if((fd=open(OSS_GetDeviceName(),O_WRONLY|O_NONBLOCK))>=0) {
close(fd);
return 1;
}

View File

@ -1,14 +0,0 @@
diff -pur libmikmod-3.1.11/drivers/drv_esd.c libmikmod-3.1.11-fix/drivers/drv_esd.c
--- libmikmod-3.1.11/drivers/drv_esd.c 2005-08-04 11:06:31.000000000 +0200
+++ libmikmod-3.1.11-fix/drivers/drv_esd.c 2005-08-04 11:07:43.000000000 +0200
@@ -99,8 +99,8 @@ static BOOL ESD_Link(void)
{
if (libesd) return 0;
- /* load libesd.so */
- libesd=dlopen("libesd.so",RTLD_LAZY|RTLD_GLOBAL);
+ /* load libesd.so.0 */
+ libesd=dlopen("libesd.so.0",RTLD_LAZY|RTLD_GLOBAL);
if (!libesd) return 1;
/* resolve function references */

View File

@ -1,12 +0,0 @@
diff -ru libmikmod-3.1.11/libmikmod/Makefile.in libmikmod-3.1.11-fix/libmikmod/Makefile.in
--- libmikmod-3.1.11/libmikmod/Makefile.in 2004-01-21 18:43:52.000000000 +0100
+++ libmikmod-3.1.11-fix/libmikmod/Makefile.in 2005-08-04 10:34:18.000000000 +0200
@@ -51,7 +51,7 @@
install: $(LIB)
$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
- $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(LIB) $(DESTDIR)$(libdir)
+ $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(LIB) $(DESTDIR)$(libdir)
uninstall: $(LIB)
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIB)

View File

@ -1,80 +0,0 @@
diff -pur libmikmod-3.1.11/drivers/drv_raw.c libmikmod-3.1.11-fix/drivers/drv_raw.c
--- libmikmod-3.1.11/drivers/drv_raw.c 2005-08-04 11:49:52.000000000 +0200
+++ libmikmod-3.1.11-fix/drivers/drv_raw.c 2005-08-04 17:25:37.000000000 +0200
@@ -42,10 +42,11 @@
#include <sys/stat.h>
#endif
+#include <stdlib.h>
+
#include "mikmod_internals.h"
#define BUFFERSIZE 32768
-#define FILENAME "music.raw"
#ifndef O_BINARY
#define O_BINARY 0
@@ -58,6 +59,7 @@
static int rawout=-1;
static SBYTE *audiobuffer=NULL;
static CHAR *filename=NULL;
+static CHAR tmpf_pattern[]="/tmp/music_raw.XXXXXX";
static void RAW_CommandLine(CHAR *cmdline)
{
@@ -76,14 +78,28 @@ static BOOL RAW_IsThere(void)
static BOOL RAW_Init(void)
{
+ int temp_fd;
+ mode_t old_mode;
+
+ if (!filename) {
+ temp_fd = mkstemp(tmpf_pattern);
+ old_mode = umask(077);
+ (void) umask(old_mode);
+ if (temp_fd == -1) {
+ _mm_errno=MMERR_OPENING_FILE;
+ return 1;
+ }
+ filename=tmpf_pattern;
+ }
+
#if defined unix || (defined __APPLE__ && defined __MACH__)
- if(!MD_Access(filename?filename:FILENAME)) {
+ if(!MD_Access(filename)) {
_mm_errno=MMERR_OPENING_FILE;
return 1;
}
#endif
- if((rawout=open(filename?filename:FILENAME,O_RDWR|O_TRUNC|O_CREAT|O_BINARY
+ if((rawout=open(filename,O_RDWR|O_TRUNC|O_CREAT|O_BINARY
#if !defined(macintosh) && !defined(__MWERKS__)
,S_IREAD|S_IWRITE
#endif
@@ -94,13 +110,13 @@ static BOOL RAW_Init(void)
md_mode|=DMODE_SOFT_MUSIC|DMODE_SOFT_SNDFX;
if (!(audiobuffer=(SBYTE*)_mm_malloc(BUFFERSIZE))) {
- close(rawout);unlink(filename?filename:FILENAME);
+ close(rawout);unlink(filename);
rawout=-1;
return 1;
}
if ((VC_Init())) {
- close(rawout);unlink(filename?filename:FILENAME);
+ close(rawout);unlink(filename);
rawout=-1;
return 1;
}
@@ -125,7 +141,7 @@ static void RAW_Update(void)
static BOOL RAW_Reset(void)
{
close(rawout);
- if((rawout=open(filename?filename:FILENAME,O_RDWR|O_TRUNC|O_CREAT|O_BINARY
+ if((rawout=open(filename,O_RDWR|O_TRUNC|O_CREAT|O_BINARY
#if !defined(macintosh) && !defined(__MWERKS__)
,S_IREAD|S_IWRITE
#endif

View File

@ -1,112 +0,0 @@
This patch fixes "buffer overflow due to md_numchn - ID: 1630158"
diff -ru libmikmod-3.1.12.orig/playercode/mplayer.c libmikmod-3.1.12/playercode/mplayer.c
--- libmikmod-3.1.12.orig/playercode/mplayer.c 2007-12-15 01:26:28.000000000 -0800
+++ libmikmod-3.1.12/playercode/mplayer.c 2009-10-04 23:48:36.000000000 -0700
@@ -52,6 +52,8 @@
will wait */
/*static*/ MODULE *pf = NULL;
+#define NUMVOICES(mod) (md_sngchn < (mod)->numvoices ? md_sngchn : (mod)->numvoices)
+
#define HIGH_OCTAVE 2 /* number of above-range octaves */
static UWORD oldperiods[OCTAVE*2]={
@@ -248,14 +250,14 @@
MP_VOICE *a;
ULONG t,k,tvol,pp;
- for (t=0;t<md_sngchn;t++)
+ for (t=0;t<NUMVOICES(mod);t++)
if (((mod->voice[t].main.kick==KICK_ABSENT)||
(mod->voice[t].main.kick==KICK_ENV))&&
Voice_Stopped_internal(t))
return t;
tvol=0xffffffUL;t=-1;a=mod->voice;
- for (k=0;k<md_sngchn;k++,a++) {
+ for (k=0;k<NUMVOICES(mod);k++,a++) {
/* allow us to take over a nonexisting sample */
if (!a->main.s)
return k;
@@ -2249,12 +2251,12 @@
switch (dat) {
case 0x0: /* past note cut */
- for (t=0;t<md_sngchn;t++)
+ for (t=0;t<NUMVOICES(mod);t++)
if (mod->voice[t].master==a)
mod->voice[t].main.fadevol=0;
break;
case 0x1: /* past note off */
- for (t=0;t<md_sngchn;t++)
+ for (t=0;t<NUMVOICES(mod);t++)
if (mod->voice[t].master==a) {
mod->voice[t].main.keyoff|=KEY_OFF;
if ((!(mod->voice[t].venv.flg & EF_ON))||
@@ -2263,7 +2265,7 @@
}
break;
case 0x2: /* past note fade */
- for (t=0;t<md_sngchn;t++)
+ for (t=0;t<NUMVOICES(mod);t++)
if (mod->voice[t].master==a)
mod->voice[t].main.keyoff|=KEY_FADE;
break;
@@ -2318,7 +2320,7 @@
SAMPLE *s;
mod->totalchn=mod->realchn=0;
- for (channel=0;channel<md_sngchn;channel++) {
+ for (channel=0;channel<NUMVOICES(mod);channel++) {
aout=&mod->voice[channel];
i=aout->main.i;
s=aout->main.s;
@@ -2736,7 +2738,7 @@
if (a->dct!=DCT_OFF) {
int t;
- for (t=0;t<md_sngchn;t++)
+ for (t=0;t<NUMVOICES(mod);t++)
if ((!Voice_Stopped_internal(t))&&
(mod->voice[t].masterchn==channel)&&
(a->main.sample==mod->voice[t].main.sample)) {
@@ -2978,6 +2980,11 @@
if (!(mod->voice=(MP_VOICE*)_mm_calloc(md_sngchn,sizeof(MP_VOICE))))
return 1;
+ /* mod->numvoices was used during loading to clamp md_sngchn.
+ After loading it's used to remember how big mod->voice is.
+ */
+ mod->numvoices = md_sngchn;
+
Player_Init_internal(mod);
return 0;
}
@@ -3086,7 +3093,7 @@
pf->patbrk=0;
pf->vbtick=pf->sngspd;
- for (t=0;t<md_sngchn;t++) {
+ for (t=0;t<NUMVOICES(pf);t++) {
Voice_Stop_internal(t);
pf->voice[t].main.i=NULL;
pf->voice[t].main.s=NULL;
@@ -3111,7 +3118,7 @@
pf->patbrk=0;
pf->vbtick=pf->sngspd;
- for (t=0;t<md_sngchn;t++) {
+ for (t=0;t<NUMVOICES(pf);t++) {
Voice_Stop_internal(t);
pf->voice[t].main.i=NULL;
pf->voice[t].main.s=NULL;
@@ -3138,7 +3145,7 @@
pf->sngpos=pos;
pf->vbtick=pf->sngspd;
- for (t=0;t<md_sngchn;t++) {
+ for (t=0;t<NUMVOICES(pf);t++) {
Voice_Stop_internal(t);
pf->voice[t].main.i=NULL;
pf->voice[t].main.s=NULL;

View File

@ -1,33 +0,0 @@
diff -ur libmikmod-3.1.11.orig/loaders/load_xm.c libmikmod-3.1.11/loaders/load_xm.c
--- libmikmod-3.1.11.orig/loaders/load_xm.c 2004-01-21 18:43:53.000000000 +0100
+++ libmikmod-3.1.11/loaders/load_xm.c 2008-04-16 04:30:45.000000000 +0200
@@ -622,7 +622,8 @@
/* read the remainder of the header */
for(u=headend-_mm_ftell(modreader);u;u--) _mm_read_UBYTE(modreader);
- if(_mm_eof(modreader)) {
+ /* last instrument is at the end of file in version 0x0104 */
+ if(_mm_eof(modreader) && (mh->version<0x0104 || t<of.numins-1)) {
free(nextwav);free(wh);
nextwav=NULL;wh=NULL;
_mm_errno = MMERR_LOADING_SAMPLEINFO;
diff -ur libmikmod-3.1.11.orig/playercode/mloader.c libmikmod-3.1.11/playercode/mloader.c
--- libmikmod-3.1.11.orig/playercode/mloader.c 2004-01-21 18:43:53.000000000 +0100
+++ libmikmod-3.1.11/playercode/mloader.c 2008-04-16 04:30:45.000000000 +0200
@@ -450,10 +450,12 @@
if (!l->Init || l->Init()) {
_mm_rewind(modreader);
ok = l->Load(curious);
- /* propagate inflags=flags for in-module samples */
- for (t = 0; t < of.numsmp; t++)
- if (of.samples[t].inflags == 0)
- of.samples[t].inflags = of.samples[t].flags;
+ if (ok) {
+ /* propagate inflags=flags for in-module samples */
+ for (t = 0; t < of.numsmp; t++)
+ if (of.samples[t].inflags == 0)
+ of.samples[t].inflags = of.samples[t].flags;
+ }
} else
ok = 0;

View File

@ -1,66 +0,0 @@
--- libmikmod-3.3.3/docs/mikmod.texi.orig 2013-10-15 11:50:02.000000000 +0200
+++ libmikmod-3.3.3/docs/mikmod.texi 2013-11-17 16:28:07.209526343 +0100
@@ -1803,6 +1803,7 @@
@item Result
@itemx 0
Sound mixing is ready.
+@item Result
@itemx nonzero
An error occurred during the operation.
@item Notes
@@ -1890,6 +1891,7 @@
@item Result
@itemx 0
Initialization was successful.
+@item Result
@itemx nonzero
An error occurred during initialization.
@item Notes
@@ -1910,6 +1912,7 @@
@item Result
@itemx 0
The library is not thread-safe.
+@item Result
@itemx 1
The library is thread-safe.
@item Notes
@@ -2096,6 +2099,7 @@
@item Result
@itemx 0
Reinitialization was successful.
+@item Result
@itemx nonzero
An error occurred during reinitialization.
@item Notes
@@ -2124,6 +2128,7 @@
@item Result
@itemx 0
Initialization was successful.
+@item Result
@itemx nonzero
An error occurred during initialization.
@item Notes
@@ -2211,6 +2216,7 @@
@item Result
@itemx 0
No module is playing.
+@item Result
@itemx nonzero
A module is currently playing.
@item Notes
@@ -2424,6 +2430,7 @@
@item Result
@itemx 0
The channel is not muted.
+@item Result
@itemx 1
The channel is muted.
@item See also
@@ -2941,6 +2948,7 @@
@item Result
@itemx 0
The voice is stopped or has no sample assigned.
+@item Result
@itemx nonzero
The voice is playing a sample.
@item Notes

View File

@ -1,36 +1,23 @@
### AUTOUPDATE-OFF: 9 ### AUTOUPDATE-OFF: 9
Name: libmikmod Name: libmikmod
Version: 3.3.11.1 Version: 3.3.12
Release: 1mamba Release: 2mamba
Summary: Library supporting many sound formats Summary: Library supporting many sound formats
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Tiziana Ferro <tiziana.ferro@email.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://mikmod.raphnet.net URL: https://mikmod.sourceforge.net/
Source: http://downloads.sourceforge.net/project/mikmod/libmikmod/%{version}/libmikmod-%{version}.tar.gz Source: http://downloads.sourceforge.net/project/mikmod/libmikmod/%{version}/libmikmod-%{version}.tar.gz
Patch1: %{name}-3.1.11-configure.patch
Patch2: %{name}-3.1.11-exec_lib.patch
Patch3: %{name}-3.1.11-dspbusy.patch
Patch4: %{name}-3.1.11-esd_dlopen.patch
Patch5: %{name}-3.1.11-musicraw_creation.patch
Patch6: %{name}-3.1.12-CVE_2007_6720.patch
Patch7: %{name}-3.1.12-CVE_2009_0179.patch
Patch8: libmikmod-3.3.3-texinfo-5.patch
License: LGPL License: LGPL
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires(post):%{__install_info}
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libaudiofile-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libalsa-devel BuildRequires: libalsa-devel
BuildRequires: libesound-devel BuildRequires: libesound-devel
BuildRequires: automake BuildRequires: automake
BuildRequires: autoconf BuildRequires: autoconf
Requires(post):%{__install_info}
#checking for AF/AFlib.h... no
#checking for libgus.h... no
%description %description
Libmikmod is a sound library capable of playing audio samples as well as tracker modules. Libmikmod is a sound library capable of playing audio samples as well as tracker modules.
@ -39,23 +26,15 @@ Supported module formats include MOD, S3M, XM, IT, MED, MTM and 669.
%package devel %package devel
Group: Development/Libraries Group: Development/Libraries
Summary: Static libraries and headers for %{name} Summary: Static libraries and headers for %{name}
Requires: %{name} = %{version} Requires: %{name} = %{version}-%{release}
%description devel %description devel
Libmikmod is a sound library capable of playing audio samples as well as tracker modules. Libmikmod is a sound library capable of playing audio samples as well as tracker modules.
Supported module formats include MOD, S3M, XM, IT, MED, MTM and 669. Supported module formats include MOD, S3M, XM, IT, MED, MTM and 669.
This package contains static libraries and header files need for development. This package contains static libraries and header files needed for development.
%prep %prep
%setup -q %setup -q
#%patch1 -p1 -b .configure
#%patch2 -p1 -b .exec_lib
#%patch3 -p1 -b .dspbusy
#%patch4 -p1 -b .esd_dlopen
#%patch5 -p1 -b .musicraw_creation
#%patch6 -p1
#%patch7 -p1
#%patch8 -p1
%build %build
%cmake -d build %cmake -d build
@ -68,15 +47,13 @@ This package contains static libraries and header files need for development.
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post devel %post devel
%install_info mikmod.info %install_info mikmod.info
:
%preun devel %preun devel
%uninstall_info mikmod.info %uninstall_info mikmod.info
exit 0 :
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -86,17 +63,19 @@ exit 0
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/libmikmod-config %{_bindir}/libmikmod-config
#%{_datadir}/aclocal/libmikmod.m4
%{_includedir}/mikmod.h %{_includedir}/mikmod.h
%{_libdir}/libmikmod.a %{_libdir}/libmikmod.a
#%{_libdir}/libmikmod.la
%{_libdir}/libmikmod.so %{_libdir}/libmikmod.so
#%{_infodir}/mikmod.*
#%{_mandir}/man1/libmikmod-config.*
%{_libdir}/pkgconfig/libmikmod.pc %{_libdir}/pkgconfig/libmikmod.pc
%doc NEWS README TODO %doc NEWS README TODO
%changelog %changelog
* Sat Feb 15 2025 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.12-2mamba
- fixed missing requirement for /usr/sbin/install-info and specfile fixes
* Tue Dec 31 2024 Automatic Build System <autodist@openmamba.org> 3.3.12-1mamba
- automatic version update by autodist
* Sun Aug 06 2017 Automatic Build System <autodist@mambasoft.it> 3.3.11.1-1mamba * Sun Aug 06 2017 Automatic Build System <autodist@mambasoft.it> 3.3.11.1-1mamba
- automatic version update by autodist - automatic version update by autodist