Hello DJ,

On 08/27/2019 01:25 AM, DJ Lucas via blfs-dev wrote:


On 8/26/2019 7:22 PM, Jean-Marc Pigeon via blfs-dev wrote:
The solution, is to "hardcode" the fact glibc is gnu hash
compatible by inserting "Provides: rtld(GNU_HASH)"  within
glibc spec file (a simple marker).
Not exactly. I think you've misunderstood my suggestion here. Let me try
to explain the two parts separately.

The 'solution' above was RedHat's (and later SUSE's) solution to account
for a change in glibc packages after the new hash functionality became
available. I'm a bit fuzzy on this part, but I believe it was
[....]
without modification, but then why write your own specs?). My suggestion
for you to add the above was provided strictly as a workaround to
_avoid_ rebuilding LO and keep your existing package (since it takes
forever to build).
I agree with you redhat/suse "solution" is not nice (it's an RPM kludge,
rpm should be smart enough to detect link capability within available
library.... well...may be easier said than done)

The problem here was always in LO. If you are already going through the
trouble of rebuilding LO to account for the other downloads, then you
should probably leave the glibc spec alone and remove the rtld
requirement from your LO spec(s) so that it uses just your package names
and versions (no need to litter the RPM DB with additional provides
data). I might be oversimplifying things a bit here, I haven't seen your
spec for LO, and it could be some automated thing that I'm unaware of,
but that's what I was trying to guide you to discover on your own in my
earlier message - precisely why I told you to "provide it" rather than
the above verbatim for that matter - which I actually wound up removing
from my first message as I though it too much hand-holding. Make you
work for it, just a little, and you'll remember for life. :-)
Caution here......
I never ever set a "rtld requirement within the LO spec"
This the key point.
Among all other packages, LO is the only one (so far?) to
set the hash-style=gnu as linker directive.
This fact make LO unique compare to other packages and this
is the explanation/solution to the
"why LO is different from all the others" problem.
(Must say, I was not aware such linker option was existing)

Does that make more sense? And that's not to say that what you've done
will not work. In fact, it should have made your existing LO rpm
installable without any rebuild or need to force it to install, and will
clearly meet the requirements for your new rpm if you've still not
modified the dependencies.
I rebuild everything because glibc spec was "adjusted".  glibc is
rather important component, I wanted to make sure this was not
impacting other packages.

All that said, LFS and BLFS is about learning, but only to a certain
point (it has to be usable as well). There is nothing inherently wrong
with the above workaround other than it most likely being unnecessary
(and a bit unclean IMO) -- clearly RedHat and SUSE, who should be the
experts, think it's fine -- but I wanted to take the time to make sure
that you understand that the original error was not in your decision to
omit the provides in your glibc spec file, but the depends lines in LO's
spec. BTW, would you mind sharing both? It might be helpful for somebody
else later on and will most definitely answer my remaining question
about "some automated thing" above.
Up to libreoffice (I was specific about the fact, it was the first
time that libreoffice was included in (my) build process) glibc
specs was without "RTLD marker" and everything was working.
Linker hash-style directive within LO make it necessary.
According my understanding this is without
impact on performance (nor libraries complexity).

Ok. attaching both specs files, if this can help.
(see signature if you want to dig further)
Thanks for your comments DJ.

--
seen "Linux from scratch" and looking for ISO files
www.osukiss.org
#-----------------------------------------------------------------------------
%{?!dist:       %define dist    @@DIST@@}
#-----------------------------------------------------------------------------
Name            :       @@APPN@@
Version         :       @@VERSION@@
Release         :       @@RELEASE@@%{?dist}
Summary         :       The GNU libc libraries
Group           :       System Environment/Libraries

Packager        :       Osukiss Project <[email protected]>

License         :       LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Url             :       http://sources.redhat.com/glibc/

Source0         :       %{name}-%{version}.tar.xz
Patch0          :       %{name}-%{version}-fhs-1.patch

#-----------------------------------------------------------------------------
Requires        :       setup

# The dynamic linker supports DT_GNU_HASH
Provides        :       rtld(GNU_HASH)
#-----------------------------------------------------------------------------
%description
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
#=========================================================

%prep
%setup -q
%patch0 -p1

%build
#---------------------------------------------------------
#Fix a problem introduced with the linux-5.2 kernel
sed -i                                                  \
   -e '/asm.socket.h/a# include <linux/sockios.h>'      \
   sysdeps/unix/sysv/linux/bits/socket.h

mkdir build
pushd build

../configure                                            \
        --prefix=%{_prefix}                             \
        --exec-prefix=%{_exec_prefix}                   \
        --sysconfdir=%{_sysconfdir}                     \
        --sbindir=%{_sbindir}                           \
        --mandir=%{_mandir}                             \
        --libdir=%{_libdir}                             \
        --sharedstatedir=%{_var}/lib                    \
        --datarootdir=%{_datadir}                       \
        --infodir=%{_datadir}/locale                    \
        --docdir=%{_defaultdocdir}/%{name}-%{version}   \
        --with-headers=%{_includedir}                   \
        --disable-werror                                \
        --enable-stack-protector=strong                 \
        --enable-kernel=3.2                             \

#       libc_cv_slibdir=/%{_lib}
        

%define _smp_mflags -j%(/usr/bin/getconf _NPROCESSORS_ONLN)
make PARALLELMFLAGS="%{_smp_mflags}"
popd

%clean
%{__rm} -rf %{buildroot}

#installing program
%install

%{__rm} -rf %{buildroot}

%{__make}                                               \
        -C build                                        \
        DESTDIR="%{buildroot}"                          \
        install

#install all locales listed in glibc
%{__make}                                               \
        PARALLELMFLAGS="%{_smp_mflags}"                 \
        -C build                                        \
        DESTDIR="%{buildroot}"                          \
        localedata/install-locales

%{__mkdir_p} %{buildroot}/var/cache/nscd

cp nscd/nscd.conf %{buildroot}%{_sysconfdir}
cp nss/nsswitch.conf %{buildroot}%{_sysconfdir}

#Install NIS that are not installed by default; 
%{__mkdir_p} %{buildroot}%{_includedir}/rpcsvc
%{__cp} -a                                              \
        nis/rpcsvc/*.h                                  \
         %{buildroot}%{_includedir}/rpcsvc

#Install locale dir
%{__mkdir_p} %{buildroot}%{_libdir}/locale

mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cat > %{buildroot}%{_sysconfdir}/ld.so.conf << EOF
#----------------------------------------------------------------------
include ld.so.conf.d/*.conf
#----------------------------------------------------------------------
EOF

%{__rm} -fr %{buildroot}%{_infodir}/dir

%files                  
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_includedir}/arpa/*.h
%{_includedir}/bits/stab.def
%{_includedir}/bits/*.h
%{_includedir}/bits/types/*.h
%{_includedir}/finclude/math-vector-fortran.h
%{_includedir}/gnu/*.h
%{_includedir}/net/*.h
%{_includedir}/netash/*.h
%{_includedir}/netatalk/*.h
%{_includedir}/netax25/*.h
%{_includedir}/netinet/*.h
%{_includedir}/neteconet/*.h
%{_includedir}/netpacket/*.h
%{_includedir}/netipx/*.h
%{_includedir}/netiucv/*.h
%{_includedir}/netrom/*.h
%{_includedir}/netrose/*.h
%{_includedir}/nfs/*.h
%{_includedir}/protocols/*.h
%{_includedir}/rpc/*.h
%{_includedir}/rpcsvc/*.h
%{_includedir}/scsi/*.h
%{_includedir}/sys/*.h

/sbin/ldconfig
/sbin/sln

%dir %{_libdir}/locale
%dir %{_sysconfdir}/ld.so.conf.d
%{_sysconfdir}/ld.so.cache
%config (noreplace) %{_sysconfdir}/ld.so.conf
%config (noreplace) %{_sysconfdir}/nsswitch.conf
%config (noreplace) %{_sysconfdir}/nscd.conf
%{_sysconfdir}/rpc

%{_libexecdir}/getconf/*

%{_sbindir}/iconvconfig
%{_sbindir}/nscd
%{_sbindir}/zdump
%{_sbindir}/zic

%{_bindir}/*

%{_libdir}/*.a
%{_libdir}/*crt*.o
%{_libdir}/lib*.so
%{_libdir}/audit/*.so
%{_libdir}/gconv/*.so
%{_libdir}/gconv/gconv-modules
%{_libdir}/locale/locale-archive

%{_datadir}/i18n/locales/*
%{_datadir}/i18n/charmaps/*
%{_datadir}/locale/dir
%{_datadir}/locale/locale.alias
%{_datadir}/locale/libc.info*
%{_datadir}/locale/*/LC_MESSAGES/libc.mo

%{_var}/lib/nss_db/Makefile

/%{_lib}/ld*.so*
/%{_lib}/lib*.so*

#-----------------------------------------------------------------------------

%changelog
#-----------------------------------------------------------------------------
%{?!dist:       %define dist    @@DIST@@}
#-----------------------------------------------------------------------------
Name            :       @@APPN@@
Version         :       @@VERSION@@
Release         :       @@RELEASE@@%{?dist}
Summary         :       Free Software Productivity Suite
Group           :       System Environment/Daemons

Packager        :       Osukiss Project <[email protected]>

License         :       (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD
URL             :       http://download.documentfoundation.org/libreoffice/src/

Source0         :       %{name}-%{version}.tar.xz
Source1         :       %{name}-dictionaries-%{version}.tar.xz
Source2         :       %{name}-help-%{version}.tar.xz
Source3         :       %{name}-translations-%{version}.tar.xz

#-----------------------------------------------------------------------------
BuildRequires   :       apr
BuildRequires   :       apache-ant
BuildRequires   :       boost
BuildRequires   :       cairo
BuildRequires   :       clucene
BuildRequires   :       curl
BuildRequires   :       cups-devel
BuildRequires   :       expat
BuildRequires   :       glm
BuildRequires   :       gnutls
BuildRequires   :       gpgme
BuildRequires   :       graphite2
BuildRequires   :       gobject-introspection
BuildRequires   :       graphite2
BuildRequires   :       gst-plugins-base
BuildRequires   :       harfbuzz
BuildRequires   :       icu
BuildRequires   :       jdk
BuildRequires   :       lcms2
BuildRequires   :       libepoxy
BuildRequires   :       libpng
BuildRequires   :       libxml2
BuildRequires   :       neon
BuildRequires   :       nss
BuildRequires   :       nspr
BuildRequires   :       openjpeg
BuildRequires   :       openldap
BuildRequires   :       openssl
BuildRequires   :       poppler
BuildRequires   :       postgresql
BuildRequires   :       python3-lxml
BuildRequires   :       redland
BuildRequires   :       raptor2
BuildRequires   :       unixODBC
BuildRequires   :       xorg-libXt
BuildRequires   :       zip

Requires(post)  :       %{_bindir}/update-desktop-database
Requires(post)  :       %{_bindir}/gtk-update-icon-cache
#-----------------------------------------------------------------------------
%description
'%{name}' is an Open Source, community-developed, office productivity
suite. It includes the key desktop applications, such as a word
processor, spreadsheet, presentation manager, formula editor and
drawing program, with a user interface and feature set similar to other
office suites.  Sophisticated and flexible, LibreOffice also works
transparently with a variety of file formats, including Microsoft
Office File Formats.

%prep
%setup -q

#---------------------------------------------------------
#building application
%build

#adding components
%{__mkdir_p} external/tarballs
%{__cp}                                                 \
        %{SOURCE1}                                      \
        %{SOURCE2}                                      \
        %{SOURCE3}                                      \
        external/tarballs

#sed -i                                                 \
#  -e "/gzip -f/d"                                      \
#  -e "s|.1.gz|.1|g"                                    \
#  bin/distro-install-desktop-integration 
#
#sed -i                                                 \
#  -e "/distro-install-file-lists/d"                    \
#  Makefile.in


sed -i                                                  \
  -e '/JAVA_SOURCE_VER/s/6/7/'                          \
  -e '/JAVA_TARGET_VER/s/6/7/'                          \
  configure.ac

./autogen.sh                                            \
        --prefix=%{_prefix}                             \
        --includedir=%{_includedir}                     \
        --exec-prefix=%{_exec_prefix}                   \
        --libexecdir=%{_libexecdir}                     \
        --sysconfdir=%{_sysconfdir}                     \
        --sbindir=%{_sbindir}                           \
        --mandir=%{_mandir}                             \
        --libdir=%{_libdir}                             \
        --infodir=%{_infodir}                           \
        --localstatedir=%{_var}                         \
        --docdir=%{_defaultdocdir}/%{name}-%{version}   \
        --with-vendor=SAFE                              \
        --with-lang='fr en-GB'                          \
        --with-help                                     \
        --with-myspell-dicts                            \
        --without-junit                                 \
        --without-system-dicts                          \
        --disable-dconf                                 \
        -disable-gtk                                    \
        -enable-gtk3                                    \
        --disable-odk                                   \
        --without-fonts                                 \
        --enable-release-build=yes                      \
        --enable-python=system                          \
        --with-jdk-home=/opt/jdk                        \
        --with-ant-home=/opt/ant                        \
        --with-system-apr                               \
        --with-system-boost                             \
        --with-system-cairo                             \
        --with-system-clucene                           \
        --with-system-curl                              \
        --with-system-expat                             \
        --with-system-glm                               \
        --with-system-gpgmepp                           \
        --with-system-graphite                          \
        --with-system-harfbuzz                          \
        --with-system-icu                               \
        --with-system-jpeg                              \
        --with-system-lcms2                             \
        --with-system-libatomic_ops                     \
        --with-system-libpng                            \
        --with-system-libxml                            \
        --with-system-epoxy                             \
        --with-system-neon                              \
        --with-system-nss                               \
        --with-system-odbc                              \
        --with-system-openldap                          \
        --with-system-openssl                           \
        --with-system-poppler                           \
        --with-system-postgresql                        \
        --with-system-redland                           \
        --with-system-serf                              \
        --with-system-zlib                              \

%define _smp_mflags -j%(/usr/bin/getconf _NPROCESSORS_ONLN)
%{__make}                                               \
        %{_smp_mflags}                                  \
         build-nocheck

%clean
%{__rm} -rf %{buildroot}

#installing program
%install
%{__rm} -rf %{buildroot}

%{__make}                                                       \
        DESTDIR=%{buildroot}                                    \
        distro-pack-install

%files                  
%defattr(-,root,root,-)
%{_bindir}/lo*
%{_bindir}/%{name}
%{_bindir}/soffice
%{_bindir}/unopkg
%{_libdir}/%{name}/*
%{_libdir}/girepository-1.0/LOKDocView-0.1.typelib
%{_datadir}/appdata/%{name}-*.appdata.xml
%{_datadir}/appdata/org.libreoffice.kde.metainfo.xml
%{_datadir}/application-registry/%{name}.applications
%{_datadir}/bash-completion/completions/%{name}.sh
%{_datadir}/applications/%{name}-*.desktop
%{_datadir}/icons/hicolor/scalable/*/%{name}-*.svg
%{_datadir}/icons/hicolor/*x*/apps/%{name}-*.{png,svg}
%{_datadir}/icons/hicolor/*x*/mimetypes/%{name}-*.{png,svg}
%{_datadir}/icons/locolor/*x*/{apps,mimetypes}/%{name}-*.{png,svg}
%{_datadir}/icons/gnome/*x*/{apps,mimetypes}/%{name}-*.{png,svg}
%{_datadir}/icons/gnome/scalable/{apps,mimetypes}/%{name}-*.svg
%{_datadir}/gir-1.0/LOKDocView-0.1.gir
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/mime-info/%{name}.keys
%{_datadir}/mime-info/%{name}.mime
%{_mandir}/man1/%{name}.1.gz
%{_mandir}/man1/lo*.1.gz
%{_mandir}/man1/unopkg.1.gz


%postun
if [ "$1" = 0 ]; then
  %{_bindir}/gtk-update-icon-cache -t %{_datadir}/icons/hicolor 2> /dev/null
  %{_bindir}/update-desktop-database 2> /dev/null
  fi

%post
%{_bindir}/update-desktop-database 2> /dev/null
%{_bindir}/gtk-update-icon-cache -t %{_datadir}/icons/hicolor 2> /dev/null

%changelog

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to