From f66b8764bb23bc081698a37bd1abff613cfe5e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Wed, 25 Sep 2024 22:52:41 +0200 Subject: RPM: add support for Fedora 41 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Andriot --- redhat/Makefile | 6 +- redhat/applications/multimedia/amarok/amarok.spec | 2 +- redhat/build/gather_rpm_sources.sh | 7 +- redhat/core/tdebase/pamd.kcheckpass-trinity.fc41 | 1 + redhat/core/tdebase/pamd.kdm-trinity-np.fc41 | 1 + redhat/core/tdebase/pamd.kdm-trinity.fc41 | 1 + redhat/core/tdebase/pamd.kscreensaver-trinity.fc41 | 1 + redhat/core/tdebase/tdebase.spec | 8 +- redhat/core/tdebase/tdm.fc41.te | 1 + redhat/docker/f41/Dockerfile.x86_64 | 42 +++ redhat/docker/f41/packages | 238 +++++++++++++ redhat/docker/f41/rpmbuild.repo | 11 + redhat/docker/f41/rpmmacros | 10 + redhat/extras/htdig/htdig.spec | 24 +- redhat/extras/htdig/patches/fix-ftbfs-gcc14 | 11 + redhat/extras/htdig/patches/gcc-11 | 370 --------------------- redhat/extras/htdig/patches/gcc-11.patch | 370 +++++++++++++++++++++ redhat/extras/htdig/patches/series | 3 +- 18 files changed, 715 insertions(+), 392 deletions(-) create mode 120000 redhat/core/tdebase/pamd.kcheckpass-trinity.fc41 create mode 120000 redhat/core/tdebase/pamd.kdm-trinity-np.fc41 create mode 120000 redhat/core/tdebase/pamd.kdm-trinity.fc41 create mode 120000 redhat/core/tdebase/pamd.kscreensaver-trinity.fc41 create mode 120000 redhat/core/tdebase/tdm.fc41.te create mode 100644 redhat/docker/f41/Dockerfile.x86_64 create mode 100644 redhat/docker/f41/packages create mode 100644 redhat/docker/f41/rpmbuild.repo create mode 100644 redhat/docker/f41/rpmmacros create mode 100644 redhat/extras/htdig/patches/fix-ftbfs-gcc14 delete mode 100644 redhat/extras/htdig/patches/gcc-11 create mode 100644 redhat/extras/htdig/patches/gcc-11.patch diff --git a/redhat/Makefile b/redhat/Makefile index 278311d8b..63c0656a7 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -144,7 +144,7 @@ ifneq (,$(filter $(DIST), .oss151 .oss152 .oss153 .oss154 .oss155 .oss156 .osstw endif htdig: -ifneq (,$(filter $(DIST), .el7 .el8 .el9 .fc38 .fc39 .fc40 .mga6 .mga7 .mga8 .mga9 .omv2490 .omv5000 )) +ifneq (,$(filter $(DIST), .el7 .el8 .el9 .fc38 .fc39 .fc40 .fc41 .mga6 .mga7 .mga8 .mga9 .omv2490 .omv5000 )) $(call buildpkg,extras/htdig) endif @@ -181,7 +181,7 @@ ifneq (,$(filter $(DIST),.oss150 .oss151)) endif wv2: -ifneq (,$(filter $(DIST), .el5 .el6 .el7 .el8 .el9 .fc30 .fc31 .fc32 .fc33 .fc34 .fc35 .fc36 .fc37 .fc38 .fc39 .fc40)) +ifneq (,$(filter $(DIST), .el5 .el6 .el7 .el8 .el9 .fc30 .fc31 .fc32 .fc33 .fc34 .fc35 .fc36 .fc37 .fc38 .fc39 .fc40 .fc41)) $(call buildpkg,3rdparty/wv2) endif @@ -603,7 +603,7 @@ tdesvn: tdebase $(call buildpkg,applications/development/tdesvn) tde-systemsettings: tdebase - $(call buildpkg,applications/settings/tde-systemsettings) +# $(call buildpkg,applications/settings/tde-systemsettings) tdmtheme: tdebase $(call buildpkg,applications/tdmtheme) diff --git a/redhat/applications/multimedia/amarok/amarok.spec b/redhat/applications/multimedia/amarok/amarok.spec index 2f5b51151..e26f7d276 100644 --- a/redhat/applications/multimedia/amarok/amarok.spec +++ b/redhat/applications/multimedia/amarok/amarok.spec @@ -171,7 +171,7 @@ BuildRequires: trinity-dbus-tqt-devel >= 1:0.63 # IFP support # IFP package is broken under PCLinuxOS. %if 0%{?pclinuxos} == 0 -%if 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion} +%if ( 0%{?fedora} && 0%{?fedora} <= 40 ) || 0%{?mgaversion} || 0%{?mdkversion} %define with_ifp 1 BuildRequires: %{_lib}ifp-devel %endif diff --git a/redhat/build/gather_rpm_sources.sh b/redhat/build/gather_rpm_sources.sh index d1ecdb3b0..f9db9354a 100755 --- a/redhat/build/gather_rpm_sources.sh +++ b/redhat/build/gather_rpm_sources.sh @@ -41,4 +41,9 @@ if [ -d "${PATCHDIR}" ]; then fi fi -exit $RET +if [ "${DIST}" = ".fc41" ]; then + sed -i "${TARGETDIR}/"*".spec" \ + -e "s|%patch|%patch -P |g" +fi + +exit 0 diff --git a/redhat/core/tdebase/pamd.kcheckpass-trinity.fc41 b/redhat/core/tdebase/pamd.kcheckpass-trinity.fc41 new file mode 120000 index 000000000..bcd188214 --- /dev/null +++ b/redhat/core/tdebase/pamd.kcheckpass-trinity.fc41 @@ -0,0 +1 @@ +pamd.kcheckpass-trinity.fc39 \ No newline at end of file diff --git a/redhat/core/tdebase/pamd.kdm-trinity-np.fc41 b/redhat/core/tdebase/pamd.kdm-trinity-np.fc41 new file mode 120000 index 000000000..9d4df92f4 --- /dev/null +++ b/redhat/core/tdebase/pamd.kdm-trinity-np.fc41 @@ -0,0 +1 @@ +pamd.kdm-trinity-np.fc39 \ No newline at end of file diff --git a/redhat/core/tdebase/pamd.kdm-trinity.fc41 b/redhat/core/tdebase/pamd.kdm-trinity.fc41 new file mode 120000 index 000000000..5022f14ef --- /dev/null +++ b/redhat/core/tdebase/pamd.kdm-trinity.fc41 @@ -0,0 +1 @@ +pamd.kdm-trinity.fc39 \ No newline at end of file diff --git a/redhat/core/tdebase/pamd.kscreensaver-trinity.fc41 b/redhat/core/tdebase/pamd.kscreensaver-trinity.fc41 new file mode 120000 index 000000000..a7b20accd --- /dev/null +++ b/redhat/core/tdebase/pamd.kscreensaver-trinity.fc41 @@ -0,0 +1 @@ +pamd.kscreensaver-trinity.fc39 \ No newline at end of file diff --git a/redhat/core/tdebase/tdebase.spec b/redhat/core/tdebase/tdebase.spec index c1dcce65c..570e9ced6 100644 --- a/redhat/core/tdebase/tdebase.spec +++ b/redhat/core/tdebase/tdebase.spec @@ -66,10 +66,10 @@ Source1: %{name}-rpmlintrc %if 0%{?mdkver} Source2: pamd.tde.omv5000 %else -Source2: pamd.kdm-trinity%{?pamd_suffix} -Source3: pamd.kdm-trinity-np%{?pamd_suffix} -Source4: pamd.kcheckpass-trinity%{?pamd_suffix} -Source5: pamd.kscreensaver-trinity%{?pamd_suffix} +Source2: pamd.kdm-trinity%{?dist} +Source3: pamd.kdm-trinity-np%{?dist} +Source4: pamd.kcheckpass-trinity%{?dist} +Source5: pamd.kscreensaver-trinity%{?dist} %endif %endif diff --git a/redhat/core/tdebase/tdm.fc41.te b/redhat/core/tdebase/tdm.fc41.te new file mode 120000 index 000000000..6d3f39b54 --- /dev/null +++ b/redhat/core/tdebase/tdm.fc41.te @@ -0,0 +1 @@ +tdm.fc39.te \ No newline at end of file diff --git a/redhat/docker/f41/Dockerfile.x86_64 b/redhat/docker/f41/Dockerfile.x86_64 new file mode 100644 index 000000000..88d2e1a21 --- /dev/null +++ b/redhat/docker/f41/Dockerfile.x86_64 @@ -0,0 +1,42 @@ +FROM fedora:41 + +ARG TDE_VERSION=14.1.2 +ARG ARCH=x86_64 + +# Fix DNF database corruption +# Add RPMFUSION repository +# Install Trinity build dependencies +COPY packages /packages +RUN echo "proxy=http://proxy:3128" >>"/etc/dnf.conf" \ + && rm -fv /etc/yum.repos.d/*{rawhide,testing}* \ + && sed -i /etc/yum.repos.d/fedora{,-updates}.repo -e "1,12s|enabled=0|enabled=1|" -e "s|\$releasever|41|g" \ + && dnf -y install dnf-plugin-ovl findutils \ + && dnf -y --enableplugin=ovl install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-41.noarch.rpm \ + && dnf -y --enableplugin=ovl update \ + && dnf -y --enableplugin=ovl install --skip-broken $(>/etc/sudoers \ + && echo "export QA_RPATHS=\$(( 0x0001|0x0002 ))" >>/home/trinity/.bashrc + +USER trinity +COPY rpmmacros /home/trinity/.rpmmacros + +RUN rpm -i https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/35/Everything/source/tree/Packages/w/wireless-tools-29-28.fc35.src.rpm \ + && sed -i ${HOME}/rpmbuild/SPECS/wireless-tools.spec -e "s|%patch|%patch -P |g" \ + && rpmbuild -ba ${HOME}/rpmbuild/SPECS/wireless-tools.spec \ + && sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/wireless-tools{,-devel}-29* + +RUN rpm -i https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/source/tree/Packages/l/libnjb-2.2.7-24.fc36.src.rpm \ + && sed -i ${HOME}/rpmbuild/SPECS/libnjb.spec -e "s|libusb-devel|libusb1-devel|" \ + && rpmbuild -ba ${HOME}/rpmbuild/SPECS/libnjb.spec \ + && sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/libnjb{,-devel}-2* diff --git a/redhat/docker/f41/packages b/redhat/docker/f41/packages new file mode 100644 index 000000000..7df12183b --- /dev/null +++ b/redhat/docker/f41/packages @@ -0,0 +1,238 @@ +alsa-lib-devel +aspell +aspell-devel +audiofile-devel +autotrace +avahi-devel +bdftopcf +bind-devel +binutils-devel +bison +boost-devel +boost-python3-devel +byacc +bzip2-devel +ccache +cdparanoia +cdparanoia-devel +chmlib-devel +chrpath +clamav +clamav-devel +clucene-core-devel +cmake +cpp +cppunit-devel +crda +createrepo_c +cryptsetup-devel +cups-devel +dbus-glib-devel +djvulibre +djvulibre-devel +dnf-plugin-ovl +docbook2X +doxygen +dssi-devel +esound-devel +exempi-devel +exiv2-devel +fdupes +fedora-rpm-macros +ffmpeg-devel +fftw-devel +file-devel +flac-devel +flex-static +fontpackages-devel +fribidi-devel +gcc +gcc-c++ +geoip-devel +gettext-devel +giflib-devel +glib-devel +gmime-devel +gmp-devel +gnokii-devel +gperf +gpgme-devel +gphoto2-devel +GraphicsMagick-devel +graphviz +gsl-devel +gstreamer1-devel +gstreamer1-plugins-base-devel +gtk2-devel +gtk3-devel +gtk+-devel +gtk-doc +guile-devel +harfbuzz-devel +heimdal-devel +hspell-devel +html2ps +iceauth +icu +ImageMagick-devel +imake +imlib2-devel +intltool +jack-audio-connection-kit-devel +jasper-devel +java-1.8.0-openjdk-devel +java-devel +java-openjdk +lame-devel +lcms-devel +less +libacl-devel +libblkid-devel +libcap-devel +libcdio-devel +libcdio-paranoia-devel +libconfig-devel +libcurl-devel +libdb-cxx-devel +libdb-devel +libdvdread-devel +libfontenc-devel +libgadu-devel +libgpod-devel +libgsf-devel +libical-devel +libidn-devel +libifp-devel +liblo-devel +liblrdf-devel +libmad-devel +libmng-devel +libmp4v2-devel +libmpcdec-devel +libmtp-devel +libmusicbrainz5-devel +libnsl2-devel +libofx-devel +libogg-devel +libotr-devel +libpaper-devel +libpqxx-devel +libqalculate-devel +libraw1394-devel +librsvg2 +librsvg2-tools +libsamplerate-devel +libsmbclient-devel +libsndfile-devel +libssh-devel +libssh2-devel +libtheora-devel +libtiff-devel +libtirpc-devel +libtool +libtool-ltdl-devel +libudev-devel +libudisks2-devel +libusb-compat-0.1-devel +libusb1-devel +libutempter-devel +libuuid-devel +libv4l-devel +libvisual-devel +libvncserver-devel +libvorbis-devel +libwmf-devel +libwpd-devel +libXaw-devel +libXcomposite-devel +libXdamage-devel +libXdmcp-devel +libxkbfile-devel +libXScrnSaver-devel +libxslt-devel +libXtst-devel +libXv-devel +libXxf86dga-devel +libXxf86vm-devel +libyaz-devel +libzrtpcpp-devel +lirc-devel +lm_sensors-devel +meanwhile-devel +mesa-libGL-devel +mftrace +mysql-devel +nas-devel +neon-devel +netpbm-progs +NetworkManager-libnm-devel +net-snmp-devel +net-tools +nspr-devel +ocaml +ocaml(compiler) +ocaml-facile-devel +OpenEXR-devel +openldap-devel +opensc +openslp-devel +opensp-devel +pam-devel +pciutils-devel +pcre-devel +pcsc-lite-devel +pcsc-perl +perl +perl-devel +perl(ExtUtils::MakeMaker) +perl(PAR::Packer) +perl(XML::Parser) +pilot-link-devel +pkcs11-helper-devel +polkit-devel +poppler-devel +postgresql +postgresql-private-devel +postgresql-server-devel +ppp +pulseaudio-libs-devel +python3 +python3-devel +qt4-devel +recode +redhat-rpm-config +rpcgen +rpm-build +ruby +ruby-devel +sane-backends-devel +scons +SDL-devel +selinux-policy-devel +speex-devel +sqlite-devel +subversion-devel +sudo +swig +sword-devel +t1lib-devel +t1utils +taglib-devel +texinfo +texlive-newunicodechar +torsocks +transfig +udisks-devel +unixODBC-devel +usbutils +valgrind +xbase-devel +xine-lib-devel +xkeyboard-config-devel +xmedcon +xmedcon-devel +xmlto +xorg-x11-font-utils +xscreensaver +xscreensaver-extras +xz-devel diff --git a/redhat/docker/f41/rpmbuild.repo b/redhat/docker/f41/rpmbuild.repo new file mode 100644 index 000000000..750290651 --- /dev/null +++ b/redhat/docker/f41/rpmbuild.repo @@ -0,0 +1,11 @@ +[rpmbuild.${ARCH}] +name=rpmbuild.${ARCH} +baseurl=file:///home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/${ARCH} +enabled=1 +gpgcheck=0 + +[rpmbuild.noarch] +name=rpmbuild.noarch +baseurl=file:///home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/noarch +enabled=1 +gpgcheck=0 diff --git a/redhat/docker/f41/rpmmacros b/redhat/docker/f41/rpmmacros new file mode 100644 index 000000000..69f287007 --- /dev/null +++ b/redhat/docker/f41/rpmmacros @@ -0,0 +1,10 @@ +%dist .fc41 +%_smp_mflags -j8 +%jobs 8 +%__brp_remove_la_files %nil +%__cmake_builddir %nil +%__cmake_in_source_build 1 +%_debugsource_packages %nil +%_debugsource_template %nil +%source_date_epoch_from_changelog 0 +%python python3 diff --git a/redhat/extras/htdig/htdig.spec b/redhat/extras/htdig/htdig.spec index f1a779fc9..e256f59b5 100644 --- a/redhat/extras/htdig/htdig.spec +++ b/redhat/extras/htdig/htdig.spec @@ -20,10 +20,12 @@ URL: http://www.htdig.org/ Source0: htdig_3.2.0b6.orig.tar.gz Patch1: patches/htdig_3.2.0b6-13.diff -Patch2: patches/gcc-6 -Patch3: patches/sourceforge_logo -Patch4: patches/drop-bogus-assignment -Patch5: patches/gcc-11 +Patch2: patches/kfreebsd +Patch3: patches/gcc-6 +Patch4: patches/sourceforge_logo +Patch5: patches/drop-bogus-assignment +Patch6: patches/gcc-11.patch +Patch7: patches/fix-ftbfs-gcc14 BuildRequires: flex >= 2.5.4a-13 BuildRequires: libtool @@ -114,10 +116,10 @@ Libraries needed to develop for htdig. %defattr(-,root,root) %doc ChangeLog %doc htdoc/* -#%{_libdir}/htdig/*.a +%{_libdir}/htdig/*.a %{_libdir}/htdig/*.la %{_libdir}/htdig/*[a-z].so -#%{_libdir}/htdig_db/*.a +%{_libdir}/htdig_db/*.a %{_libdir}/htdig_db/*.la %{_libdir}/htdig_db/*[a-z].so %{_includedir}/* @@ -148,7 +150,6 @@ various web servers on the campus network. %files web %defattr(-,root,root) -%config(missingok, noreplace) %attr(0755,root,root) /etc/cron.daily/htdig-dbgen %{contentdir}/html/htdig %{contentdir}/cgi-bin/* @@ -193,6 +194,8 @@ fi %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 autoreconf -fiv @@ -226,9 +229,6 @@ rm -rf %{buildroot} %__make install DESTDIR=%{?buildroot} -# Installs the cron job -%__install -d -m 755 cron/htdig-dbgen "%{buildroot}%{?_sysconfdir}/cron.daily/htdig-dbgen" - cp %{buildroot}%{contentdir}/cgi-bin/htsearch %{buildroot}%{_bindir} chmod 644 %{buildroot}%{contentdir}/html/htdig/* @@ -238,10 +238,10 @@ ln -sf ./search.html %{buildroot}%{contentdir}/html/htdig/index.html # now get rid of the %{buildroot} paths in the conf files for i in /etc/htdig.conf /usr/bin/rundig ; do - perl -pi -e "s|%{buildroot}||g" %{buildroot}/$i + perl -pi -e "s|%{buildroot}||g" %{buildroot}/$i done -mkdir -p %{buildroot}%{_datadir} +%__install -d %{buildroot}%{_datadir} mv %{buildroot}%{contentdir}/html/htdig %{buildroot}%{_datadir} ln -sf ../../../usr/share/htdig %{buildroot}%{contentdir}/html/htdig diff --git a/redhat/extras/htdig/patches/fix-ftbfs-gcc14 b/redhat/extras/htdig/patches/fix-ftbfs-gcc14 new file mode 100644 index 000000000..88914b6a0 --- /dev/null +++ b/redhat/extras/htdig/patches/fix-ftbfs-gcc14 @@ -0,0 +1,11 @@ +--- a/db/os_map.c ++++ b/db/os_map.c +@@ -31,6 +31,8 @@ + #endif + + #include "db_int.h" ++#include "db_page.h" ++#include "db_ext.h" + #include "os_jump.h" + + #ifdef HAVE_MMAP diff --git a/redhat/extras/htdig/patches/gcc-11 b/redhat/extras/htdig/patches/gcc-11 deleted file mode 100644 index 09c974cea..000000000 --- a/redhat/extras/htdig/patches/gcc-11 +++ /dev/null @@ -1,370 +0,0 @@ -Index: b/htword/WordBitCompress.cc -=================================================================== ---- a/htword/WordBitCompress.cc -+++ b/htword/WordBitCompress.cc -@@ -29,7 +29,7 @@ - #include"WordBitCompress.h" - - // ******** HtVector_byte (implementation) --#define GType byte -+#define GType byte_t - #define HtVectorGType HtVector_byte - #include "HtVectorGenericCode.h" - -@@ -424,13 +424,13 @@ - // ************************************************** - - void --BitStream::put_zone(byte *vals,int n,const char *tag) -+BitStream::put_zone(byte_t *vals,int n,const char *tag) - { - add_tag(tag); - for(int i=0;i<(n+7)/8;i++){put_uint(vals[i],TMin(8,n-8*i),NULL);} - } - void --BitStream::get_zone(byte *vals,int n,const char *tag) -+BitStream::get_zone(byte_t *vals,int n,const char *tag) - { - check_tag(tag); - for(int i=0;i<(n+7)/8;i++){vals[i]=get_uint(TMin(8,n-8*i));} -@@ -699,16 +699,16 @@ - if(all){printf("\n");} - - } --byte * -+byte_t * - BitStream::get_data() - { -- byte *res=(byte *)malloc(buff.size()); -+ byte_t *res=(byte_t *)malloc(buff.size()); - CHECK_MEM(res); - for(int i=0;imaxv){maxv=v;} - } - int nbits=num_bits(maxv); -- if(n>=pow2(NBITS_NVALS)){errr("Compressor::put_fixedbitl(byte *) : overflow: nvals>2^16");} -+ if(n>=pow2(NBITS_NVALS)){errr("Compressor::put_fixedbitl(byte_t *) : overflow: nvals>2^16");} - put_uint(nbits,NBITS_NBITS_CHARVAL,"nbits"); - add_tag("data"); - for(i=0;i=(buff.size()<<3)){errr("BitStream::get reading past end of BitStream!");} -- byte res=buff[bitpos>>3] & pow2(bitpos & 0x07); -+ byte_t res=buff[bitpos>>3] & pow2(bitpos & 0x07); - // printf("get:res:%d bitpos:%5d/%d buff[%3d]=%x\n",res,bitpos,bitpos%8,bitpos/8,buff[bitpos/8]); - bitpos++; - return(res); -@@ -139,8 +139,8 @@ - unsigned int get_uint( int n,const char *tag=(char*)NULL); - - // get/put n bits of data stored in vals -- void put_zone(byte *vals,int n,const char *tag); -- void get_zone(byte *vals,int n,const char *tag); -+ void put_zone(byte_t *vals,int n,const char *tag); -+ void get_zone(byte_t *vals,int n,const char *tag); - - // - inline void add_tag(const char *tag) -@@ -167,9 +167,9 @@ - int buffsize(){return(buff.size());} - - // get a copy of the buffer -- byte *get_data(); -+ byte_t *get_data(); - // set the buffer from outside data (current buffer must be empty) -- void set_data(const byte *nbuff,int nbits); -+ void set_data(const byte_t *nbuff,int nbits); - - // use this for reading a BitStream after you have written in it - // (generally for debuging) -@@ -211,7 +211,7 @@ - #define NBITS_VAL 32 - // number of bits to code he number of bits used by an unsigned int value - #define NBITS_NBITS_VAL 5 --// number of bits to code the number of bits used by a byte value -+// number of bits to code the number of bits used by a byte_t value - #define NBITS_NBITS_CHARVAL 4 - - class Compressor : public BitStream -@@ -240,8 +240,8 @@ - int get_vals(unsigned int **pres,const char *tag=(char*)"BADTAG!"); - - // compress/decompress an array of bytes (very simple) -- int put_fixedbitl(byte *vals,int n,const char *tag); -- int get_fixedbitl(byte **pres,const char *tag=(char*)"BADTAG!"); -+ int put_fixedbitl(byte_t *vals,int n,const char *tag); -+ int get_fixedbitl(byte_t **pres,const char *tag=(char*)"BADTAG!"); - - // compress/decompress an array of unsigned ints (very simple) - void get_fixedbitl(unsigned int *res,int n); -Index: b/htword/WordDBPage.cc -=================================================================== ---- a/htword/WordDBPage.cc -+++ b/htword/WordDBPage.cc -@@ -155,7 +155,7 @@ - Uncompress_main(pin); - break; - case CMPRTYPE_BADCOMPRESS:// this page did not compress correctly -- pin->get_zone((byte *)pg,pgsz*8,"INITIALBUFFER"); -+ pin->get_zone((byte_t *)pg,pgsz*8,"INITIALBUFFER"); - break; - default: - errr("WordDBPage::Uncompress: CMPRTYPE incoherent"); -@@ -181,7 +181,7 @@ - int *rnum_sizes=new int[nnums]; - CHECK_MEM(rnum_sizes); - // char differences between words -- byte *rworddiffs=NULL; -+ byte_t *rworddiffs=NULL; - int nrworddiffs; - - // *********** read header -@@ -288,7 +288,7 @@ - return OK; - } - void --WordDBPage::Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte *rworddiffs,int nrworddiffs) -+WordDBPage::Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte_t *rworddiffs,int nrworddiffs) - { - int irwordiffs=0; - int nfields=WordKey::NFields(); -@@ -405,7 +405,7 @@ - - // display - void --WordDBPage::Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte *rworddiffs,int nrworddiffs) -+WordDBPage::Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte_t *rworddiffs,int nrworddiffs) - { - int i,j; - if(verbose) -@@ -464,7 +464,7 @@ - res->put_uint(COMPRESS_VERSION,NBITS_COMPRESS_VERSION,"COMPRESS_VERSION"); - res->put_uint(CMPRTYPE_BADCOMPRESS,NBITS_CMPRTYPE,"CMPRTYPE"); - -- res->put_zone((byte *)pg,pgsz*8,"INITIALBUFFER"); -+ res->put_zone((byte_t *)pg,pgsz*8,"INITIALBUFFER"); - } - - if(verbose) -@@ -761,7 +761,7 @@ - printf("compare failed in some unknown place in header:\n"); - for(i=0;i<(int)(sizeof(PAGE)-sizeof(db_indx_t));i++) - { -- printf("%3d: %3x %3x\n",i,((byte *)pg)[i],((byte *)other.pg)[i]); -+ printf("%3d: %3x %3x\n",i,((byte_t *)pg)[i],((byte_t *)other.pg)[i]); - } - } - -@@ -998,7 +998,7 @@ - printf("%5d: ",nn); - for(j=0;j<20;j++) - { -- printf("%2x ",((byte *)pg)[nn++]); -+ printf("%2x ",((byte_t *)pg)[nn++]); - if(nn>=pgsz){break;} - } - printf("\n"); -Index: b/htword/WordDBPage.h -=================================================================== ---- a/htword/WordDBPage.h -+++ b/htword/WordDBPage.h -@@ -65,7 +65,7 @@ - } - } - WordDBRecord():WordRecord(){;} -- WordDBRecord(byte *dat,int len,int rectyp):WordRecord() -+ WordDBRecord(byte_t *dat,int len,int rectyp):WordRecord() - { - type=(rectyp ? DefaultType() : WORD_RECORD_STATS); - Unpack(String((char *)dat,len)); -@@ -118,7 +118,7 @@ - } - else{Unpack(String((char *)nkey->data,nkey->len));} - } -- WordDBKey(byte *data,int len):WordKey() -+ WordDBKey(byte_t *data,int len):WordKey() - { - key=NULL; - if(!data || !len){errr("WordDBKey::WordDBKey(data,len) !data || !len");} -@@ -207,7 +207,7 @@ - void *alloc_entry(int size) - { - size=WORD_ALIGN_TO(size,4); -- int inp_pos=((byte *)&(pg->inp[insert_indx]))-(byte *)pg; -+ int inp_pos=((byte_t *)&(pg->inp[insert_indx]))-(byte_t *)pg; - insert_pos-=size; - if(insert_pos<=inp_pos) - { -@@ -216,7 +216,7 @@ - errr("WordDBPage::alloc_entry: PAGE OVERFLOW"); - } - pg->inp[insert_indx++]=insert_pos; -- return((void *)((byte *)pg+insert_pos)); -+ return((void *)((byte_t *)pg+insert_pos)); - } - - -@@ -260,11 +260,11 @@ - ky.Pack(pkey); - keylen=pkey.length(); - } -- int size=keylen+((byte *)&(bti.data))-((byte *)&bti);// pos of data field in BINTERNAL -+ int size=keylen+((byte_t *)&(bti.data))-((byte_t *)&bti);// pos of data field in BINTERNAL - if(empty) - { - if(verbose){printf("WordDBPage::insert_btikey: empty : BINTERNAL:%d datapos:%d keylen:%d size:%d alligned to:%d\n",(int)sizeof(BINTERNAL), -- (int)(((byte *)&(bti.data))-((byte *)&bti)), -+ (int)(((byte_t *)&(bti.data))-((byte_t *)&bti)), - keylen,size,WORD_ALIGN_TO(size,4));} - } - -@@ -306,8 +306,8 @@ - int Uncompress_main(Compressor *pin); - void Uncompress_vals_chaged_flags(Compressor &in,unsigned int **pcflags,int *pn); - int Uncompress_header(Compressor &in); -- void Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte *rworddiffs,int nrworddiffs); -- void Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte *rworddiffs,int nrworddiffs); -+ void Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte_t *rworddiffs,int nrworddiffs); -+ void Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte_t *rworddiffs,int nrworddiffs); - - int TestCompress(int debuglevel); - int Compare(WordDBPage &other); -@@ -326,14 +326,14 @@ - out.put_uint(btikey(i)->type ,sizeof(btikey(i)->type )*8,label_str("seperatekey_bti_type" ,i)); - out.put_uint(btikey(i)->pgno ,sizeof(btikey(i)->pgno )*8,label_str("seperatekey_bti_pgno" ,i)); - out.put_uint(btikey(i)->nrecs,sizeof(btikey(i)->nrecs)*8,label_str("seperatekey_bti_nrecs",i)); -- if(len){out.put_zone((byte *)btikey(i)->data,8*len,label_str("seperatekey_btidata",i));} -+ if(len){out.put_zone((byte_t *)btikey(i)->data,8*len,label_str("seperatekey_btidata",i));} - } - else - { - int len=key(i)->len; - out.put_uint(len,NBITS_KEYLEN,label_str("seperatekey_len",i)); - if(verbose){printf("WordDBPage::compress_key: compress(typ5):%d\n",len);} -- out.put_zone((byte *)key(i)->data,8*len,label_str("seperatekey_data",i)); -+ out.put_zone((byte_t *)key(i)->data,8*len,label_str("seperatekey_data",i)); - } - } - void compress_data(Compressor &out,int i) -@@ -341,7 +341,7 @@ - int len=data(i)->len; - out.put_uint(len,NBITS_DATALEN,label_str("seperatedata_len",i)); - if(verbose){printf("WordDBPage::compress_data: compressdata(typ5):%d\n",len);} -- out.put_zone((byte *)data(i)->data,8*len,label_str("seperatedata_data",i)); -+ out.put_zone((byte_t *)data(i)->data,8*len,label_str("seperatedata_data",i)); - } - WordDBKey uncompress_key(Compressor &in,int i) - { -@@ -360,7 +360,7 @@ - if(len!=bti.len){errr("WordDBPage::uncompress_key: incoherence: len!=bti.len");} - if(len) - { -- byte *gotdata=new byte[len]; -+ byte_t *gotdata=new byte_t[len]; - CHECK_MEM(gotdata); - in.get_zone(gotdata,8*len,label_str("seperatekey_btidata",i)); - res=WordDBKey(gotdata,len); -@@ -370,7 +370,7 @@ - } - else - { -- byte *gotdata=new byte[len]; -+ byte_t *gotdata=new byte_t[len]; - CHECK_MEM(gotdata); - in.get_zone(gotdata,8*len,label_str("seperatekey_data",i)); - res=WordDBKey(gotdata,len); -@@ -384,7 +384,7 @@ - WordDBRecord res; - int len=in.get_uint(NBITS_DATALEN,label_str("seperatedata_len",i)); - if(verbose)printf("uncompressdata:len:%d\n",len); -- byte *gotdata=new byte[len]; -+ byte_t *gotdata=new byte_t[len]; - CHECK_MEM(gotdata); - in.get_zone(gotdata,8*len,label_str("seperatedata_data",i)); - res=WordDBRecord(gotdata,len,rectyp); -@@ -488,7 +488,7 @@ - { - init0(); - pgsz=npgsz; -- pg=(PAGE *)(new byte[pgsz]); -+ pg=(PAGE *)(new byte_t[pgsz]); - CHECK_MEM(pg); - insert_pos=pgsz; - insert_indx=0; diff --git a/redhat/extras/htdig/patches/gcc-11.patch b/redhat/extras/htdig/patches/gcc-11.patch new file mode 100644 index 000000000..09c974cea --- /dev/null +++ b/redhat/extras/htdig/patches/gcc-11.patch @@ -0,0 +1,370 @@ +Index: b/htword/WordBitCompress.cc +=================================================================== +--- a/htword/WordBitCompress.cc ++++ b/htword/WordBitCompress.cc +@@ -29,7 +29,7 @@ + #include"WordBitCompress.h" + + // ******** HtVector_byte (implementation) +-#define GType byte ++#define GType byte_t + #define HtVectorGType HtVector_byte + #include "HtVectorGenericCode.h" + +@@ -424,13 +424,13 @@ + // ************************************************** + + void +-BitStream::put_zone(byte *vals,int n,const char *tag) ++BitStream::put_zone(byte_t *vals,int n,const char *tag) + { + add_tag(tag); + for(int i=0;i<(n+7)/8;i++){put_uint(vals[i],TMin(8,n-8*i),NULL);} + } + void +-BitStream::get_zone(byte *vals,int n,const char *tag) ++BitStream::get_zone(byte_t *vals,int n,const char *tag) + { + check_tag(tag); + for(int i=0;i<(n+7)/8;i++){vals[i]=get_uint(TMin(8,n-8*i));} +@@ -699,16 +699,16 @@ + if(all){printf("\n");} + + } +-byte * ++byte_t * + BitStream::get_data() + { +- byte *res=(byte *)malloc(buff.size()); ++ byte_t *res=(byte_t *)malloc(buff.size()); + CHECK_MEM(res); + for(int i=0;imaxv){maxv=v;} + } + int nbits=num_bits(maxv); +- if(n>=pow2(NBITS_NVALS)){errr("Compressor::put_fixedbitl(byte *) : overflow: nvals>2^16");} ++ if(n>=pow2(NBITS_NVALS)){errr("Compressor::put_fixedbitl(byte_t *) : overflow: nvals>2^16");} + put_uint(nbits,NBITS_NBITS_CHARVAL,"nbits"); + add_tag("data"); + for(i=0;i=(buff.size()<<3)){errr("BitStream::get reading past end of BitStream!");} +- byte res=buff[bitpos>>3] & pow2(bitpos & 0x07); ++ byte_t res=buff[bitpos>>3] & pow2(bitpos & 0x07); + // printf("get:res:%d bitpos:%5d/%d buff[%3d]=%x\n",res,bitpos,bitpos%8,bitpos/8,buff[bitpos/8]); + bitpos++; + return(res); +@@ -139,8 +139,8 @@ + unsigned int get_uint( int n,const char *tag=(char*)NULL); + + // get/put n bits of data stored in vals +- void put_zone(byte *vals,int n,const char *tag); +- void get_zone(byte *vals,int n,const char *tag); ++ void put_zone(byte_t *vals,int n,const char *tag); ++ void get_zone(byte_t *vals,int n,const char *tag); + + // + inline void add_tag(const char *tag) +@@ -167,9 +167,9 @@ + int buffsize(){return(buff.size());} + + // get a copy of the buffer +- byte *get_data(); ++ byte_t *get_data(); + // set the buffer from outside data (current buffer must be empty) +- void set_data(const byte *nbuff,int nbits); ++ void set_data(const byte_t *nbuff,int nbits); + + // use this for reading a BitStream after you have written in it + // (generally for debuging) +@@ -211,7 +211,7 @@ + #define NBITS_VAL 32 + // number of bits to code he number of bits used by an unsigned int value + #define NBITS_NBITS_VAL 5 +-// number of bits to code the number of bits used by a byte value ++// number of bits to code the number of bits used by a byte_t value + #define NBITS_NBITS_CHARVAL 4 + + class Compressor : public BitStream +@@ -240,8 +240,8 @@ + int get_vals(unsigned int **pres,const char *tag=(char*)"BADTAG!"); + + // compress/decompress an array of bytes (very simple) +- int put_fixedbitl(byte *vals,int n,const char *tag); +- int get_fixedbitl(byte **pres,const char *tag=(char*)"BADTAG!"); ++ int put_fixedbitl(byte_t *vals,int n,const char *tag); ++ int get_fixedbitl(byte_t **pres,const char *tag=(char*)"BADTAG!"); + + // compress/decompress an array of unsigned ints (very simple) + void get_fixedbitl(unsigned int *res,int n); +Index: b/htword/WordDBPage.cc +=================================================================== +--- a/htword/WordDBPage.cc ++++ b/htword/WordDBPage.cc +@@ -155,7 +155,7 @@ + Uncompress_main(pin); + break; + case CMPRTYPE_BADCOMPRESS:// this page did not compress correctly +- pin->get_zone((byte *)pg,pgsz*8,"INITIALBUFFER"); ++ pin->get_zone((byte_t *)pg,pgsz*8,"INITIALBUFFER"); + break; + default: + errr("WordDBPage::Uncompress: CMPRTYPE incoherent"); +@@ -181,7 +181,7 @@ + int *rnum_sizes=new int[nnums]; + CHECK_MEM(rnum_sizes); + // char differences between words +- byte *rworddiffs=NULL; ++ byte_t *rworddiffs=NULL; + int nrworddiffs; + + // *********** read header +@@ -288,7 +288,7 @@ + return OK; + } + void +-WordDBPage::Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte *rworddiffs,int nrworddiffs) ++WordDBPage::Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte_t *rworddiffs,int nrworddiffs) + { + int irwordiffs=0; + int nfields=WordKey::NFields(); +@@ -405,7 +405,7 @@ + + // display + void +-WordDBPage::Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte *rworddiffs,int nrworddiffs) ++WordDBPage::Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums0,byte_t *rworddiffs,int nrworddiffs) + { + int i,j; + if(verbose) +@@ -464,7 +464,7 @@ + res->put_uint(COMPRESS_VERSION,NBITS_COMPRESS_VERSION,"COMPRESS_VERSION"); + res->put_uint(CMPRTYPE_BADCOMPRESS,NBITS_CMPRTYPE,"CMPRTYPE"); + +- res->put_zone((byte *)pg,pgsz*8,"INITIALBUFFER"); ++ res->put_zone((byte_t *)pg,pgsz*8,"INITIALBUFFER"); + } + + if(verbose) +@@ -761,7 +761,7 @@ + printf("compare failed in some unknown place in header:\n"); + for(i=0;i<(int)(sizeof(PAGE)-sizeof(db_indx_t));i++) + { +- printf("%3d: %3x %3x\n",i,((byte *)pg)[i],((byte *)other.pg)[i]); ++ printf("%3d: %3x %3x\n",i,((byte_t *)pg)[i],((byte_t *)other.pg)[i]); + } + } + +@@ -998,7 +998,7 @@ + printf("%5d: ",nn); + for(j=0;j<20;j++) + { +- printf("%2x ",((byte *)pg)[nn++]); ++ printf("%2x ",((byte_t *)pg)[nn++]); + if(nn>=pgsz){break;} + } + printf("\n"); +Index: b/htword/WordDBPage.h +=================================================================== +--- a/htword/WordDBPage.h ++++ b/htword/WordDBPage.h +@@ -65,7 +65,7 @@ + } + } + WordDBRecord():WordRecord(){;} +- WordDBRecord(byte *dat,int len,int rectyp):WordRecord() ++ WordDBRecord(byte_t *dat,int len,int rectyp):WordRecord() + { + type=(rectyp ? DefaultType() : WORD_RECORD_STATS); + Unpack(String((char *)dat,len)); +@@ -118,7 +118,7 @@ + } + else{Unpack(String((char *)nkey->data,nkey->len));} + } +- WordDBKey(byte *data,int len):WordKey() ++ WordDBKey(byte_t *data,int len):WordKey() + { + key=NULL; + if(!data || !len){errr("WordDBKey::WordDBKey(data,len) !data || !len");} +@@ -207,7 +207,7 @@ + void *alloc_entry(int size) + { + size=WORD_ALIGN_TO(size,4); +- int inp_pos=((byte *)&(pg->inp[insert_indx]))-(byte *)pg; ++ int inp_pos=((byte_t *)&(pg->inp[insert_indx]))-(byte_t *)pg; + insert_pos-=size; + if(insert_pos<=inp_pos) + { +@@ -216,7 +216,7 @@ + errr("WordDBPage::alloc_entry: PAGE OVERFLOW"); + } + pg->inp[insert_indx++]=insert_pos; +- return((void *)((byte *)pg+insert_pos)); ++ return((void *)((byte_t *)pg+insert_pos)); + } + + +@@ -260,11 +260,11 @@ + ky.Pack(pkey); + keylen=pkey.length(); + } +- int size=keylen+((byte *)&(bti.data))-((byte *)&bti);// pos of data field in BINTERNAL ++ int size=keylen+((byte_t *)&(bti.data))-((byte_t *)&bti);// pos of data field in BINTERNAL + if(empty) + { + if(verbose){printf("WordDBPage::insert_btikey: empty : BINTERNAL:%d datapos:%d keylen:%d size:%d alligned to:%d\n",(int)sizeof(BINTERNAL), +- (int)(((byte *)&(bti.data))-((byte *)&bti)), ++ (int)(((byte_t *)&(bti.data))-((byte_t *)&bti)), + keylen,size,WORD_ALIGN_TO(size,4));} + } + +@@ -306,8 +306,8 @@ + int Uncompress_main(Compressor *pin); + void Uncompress_vals_chaged_flags(Compressor &in,unsigned int **pcflags,int *pn); + int Uncompress_header(Compressor &in); +- void Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte *rworddiffs,int nrworddiffs); +- void Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte *rworddiffs,int nrworddiffs); ++ void Uncompress_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte_t *rworddiffs,int nrworddiffs); ++ void Uncompress_show_rebuild(unsigned int **rnums,int *rnum_sizes,int nnums,byte_t *rworddiffs,int nrworddiffs); + + int TestCompress(int debuglevel); + int Compare(WordDBPage &other); +@@ -326,14 +326,14 @@ + out.put_uint(btikey(i)->type ,sizeof(btikey(i)->type )*8,label_str("seperatekey_bti_type" ,i)); + out.put_uint(btikey(i)->pgno ,sizeof(btikey(i)->pgno )*8,label_str("seperatekey_bti_pgno" ,i)); + out.put_uint(btikey(i)->nrecs,sizeof(btikey(i)->nrecs)*8,label_str("seperatekey_bti_nrecs",i)); +- if(len){out.put_zone((byte *)btikey(i)->data,8*len,label_str("seperatekey_btidata",i));} ++ if(len){out.put_zone((byte_t *)btikey(i)->data,8*len,label_str("seperatekey_btidata",i));} + } + else + { + int len=key(i)->len; + out.put_uint(len,NBITS_KEYLEN,label_str("seperatekey_len",i)); + if(verbose){printf("WordDBPage::compress_key: compress(typ5):%d\n",len);} +- out.put_zone((byte *)key(i)->data,8*len,label_str("seperatekey_data",i)); ++ out.put_zone((byte_t *)key(i)->data,8*len,label_str("seperatekey_data",i)); + } + } + void compress_data(Compressor &out,int i) +@@ -341,7 +341,7 @@ + int len=data(i)->len; + out.put_uint(len,NBITS_DATALEN,label_str("seperatedata_len",i)); + if(verbose){printf("WordDBPage::compress_data: compressdata(typ5):%d\n",len);} +- out.put_zone((byte *)data(i)->data,8*len,label_str("seperatedata_data",i)); ++ out.put_zone((byte_t *)data(i)->data,8*len,label_str("seperatedata_data",i)); + } + WordDBKey uncompress_key(Compressor &in,int i) + { +@@ -360,7 +360,7 @@ + if(len!=bti.len){errr("WordDBPage::uncompress_key: incoherence: len!=bti.len");} + if(len) + { +- byte *gotdata=new byte[len]; ++ byte_t *gotdata=new byte_t[len]; + CHECK_MEM(gotdata); + in.get_zone(gotdata,8*len,label_str("seperatekey_btidata",i)); + res=WordDBKey(gotdata,len); +@@ -370,7 +370,7 @@ + } + else + { +- byte *gotdata=new byte[len]; ++ byte_t *gotdata=new byte_t[len]; + CHECK_MEM(gotdata); + in.get_zone(gotdata,8*len,label_str("seperatekey_data",i)); + res=WordDBKey(gotdata,len); +@@ -384,7 +384,7 @@ + WordDBRecord res; + int len=in.get_uint(NBITS_DATALEN,label_str("seperatedata_len",i)); + if(verbose)printf("uncompressdata:len:%d\n",len); +- byte *gotdata=new byte[len]; ++ byte_t *gotdata=new byte_t[len]; + CHECK_MEM(gotdata); + in.get_zone(gotdata,8*len,label_str("seperatedata_data",i)); + res=WordDBRecord(gotdata,len,rectyp); +@@ -488,7 +488,7 @@ + { + init0(); + pgsz=npgsz; +- pg=(PAGE *)(new byte[pgsz]); ++ pg=(PAGE *)(new byte_t[pgsz]); + CHECK_MEM(pg); + insert_pos=pgsz; + insert_indx=0; diff --git a/redhat/extras/htdig/patches/series b/redhat/extras/htdig/patches/series index da0d40c91..857883dbb 100644 --- a/redhat/extras/htdig/patches/series +++ b/redhat/extras/htdig/patches/series @@ -3,4 +3,5 @@ kfreebsd gcc-6 sourceforge_logo drop-bogus-assignment -gcc-11 +gcc-11.patch +fix-ftbfs-gcc14 -- cgit v1.2.1