[rear-devel] RFC: Cleanup of the LSB RPM requirements in Rear RPM

Gratien D'haese gratien.dhaese at it3.be
Fri Feb 7 15:52:25 CET 2014


Hi Johannes,
please create an issue for this at github as it is requiring some serious
engineering from our side before we can resolve this one.
rgds,
Gratien
 
On Fri, 7 Feb 2014 15:07:47 +0100 (CET), Johannes Meixner <jsmeix at suse.de>
wrote:
> Hello,
> 
> I would like to propose that the Rear RPM "Requires: lsb"
> gets replaced by explicitly requiring only those RPM packages
> that are mandatory for Rear (in particular when a binary is
> called in a script) because "Requires: lsb" would require
> much too much.
> 
> Reasoning:
> 
> See https://bugzilla.novell.com/show_bug.cgi?id=807747#c4
> that reads:
>
===========================================================================
> See what Robert Schweikert wrote
> in the "libjpeg API issues" mail thread
> on the lsb-discuss at lists.linux-foundation.org mailing list
>
http://lists.linuxfoundation.org/pipermail/lsb-discuss/2013-May/007643.html
>
---------------------------------------------------------------------------
> Note that even with the modularization in LSB 5.0
> (https://wiki.linuxfoundation.org/en/LSBModularizationDesign)
> there will only be 1 LSB certification, meaning an LSB certified
> distribution has to provide all requirements for all modules.
> 
> We will NOT have a "LSB-Base" certification.
> A distribution is LSB Certified or LSB compliant if and only if
> the distribution provides all requirements as outlined in the
> specification.
>
===========================================================================
> 
> Accordingly the lsb RPM requires tons of stuff that is not needed by
Rear
> (in particular various graphical libraries, sound stuff, printing stuff,
> and so on).
> 
> But the Rear RPM should be installable even on miminal server systems
> without graphical stuff, sound stuff, printing stuff, and so on.
> 
> Therefore I propose the following RPM requirements in rear.spec
> that I made on an openSUSE 13.1 system:
>
-------------------------------------------------------------------------
> # LSB RPM Requires:
> # Begin of "Requires: lsb" cleanup:
> # Rear upstream has "Requires: lsb" but that requires much too much,
> # see https://bugzilla.novell.com/show_bug.cgi?id=807747#c4
> # "A distribution is LSB Certified or LSB compliant if and only if
> #  the distribution provides all requirements as outlined in the
> #  specification."
> # Accordingly SUSE's lsb RPM requires tons of stuff that is not
> # needed by Rear (in particular various graphical libraries,
> # sound stuff, printing stuff, and so on).
> # Therefore "Requires: lsb" is replaced by explicitly listing
> # the RPM packages that are mandatory (in particular when a binary
> # is called in a script) for Rear (as RPM Requires)
> # plus what seems to be optional (nice to have) for Rear
> # (as RPM Recommends)
> # minus library packages because needed libraries should be
> # automatically required.
> # I <jsmeix at suse.de> think requiring RPM packages instead
> # of binaries is better because it keeps the list shorter
> # which is hopefully easier to maintain and the requirements
> # are on a more higher level which is hopefully more 
> # unsusceptible against minor changes in what exact
> # binaries names are actually called by Rear.
> # To test if a binary is called by a Rear script
> # the following was done (example for /usr/bin/bc):
> #   BIN="bc"
> #   for f in $( find /usr/share/rear/ )
> #   do grep "\<$BIN\> " $f 2>/dev/null | grep -v '^[[:space:]]*#'
> #   done
> # What is not tested to find out if a binary is called
> # by a Rear script is "eval" stuff, something like
> #   STRING=<result of whatever calls> ; eval $STRING
> # Usually Rear calls "eval echo ..."
> # or "eval "${EXTERNAL_whatever[@]}" except in
> # /usr/share/rear/finalize/default/88_check_for_mount_by_id.sh
> # that calls
> #   eval "$(scsi_id ...
> # where the only scsi_id that I could find is /usr/lib/udev/scsi_id
> # which belongs to udev and I assume that udev is installed in any
> # case so that there is no explicit RPM Requires for udev in Rear.
> # What is also not tested to find out what Rear actually needs is
> # which files (not only binaries) Rear needs to build up its
> # recovery system (in particular tools for partitioning, creating
> # filesystems, and bootloader installation).
> # I assume what Rear needs to build up the system-specific recovery
> # system is installed (e.g. if the ext4 filesystem is used, I assume
> # mkfs.ext4 is installed) so that there are no explicit RPM Requires
> # needed for that in Rear.
> # The following list was derived from the RPM Requires
> # of SUSE's lsb package
> # (its last RPM changelog entry dated "Tue Oct  1 07:01:56 UTC 2013")
> # as follows:
> #   for r in $( grep ^Requires: lsb.spec | tr -s ' ' | cut -d ' ' -f2 )
> #   do rpm -q --whatprovides $r
> #   done | sort -u
> # which results the following list where only
> # what is needed for Rear is activated:
> #   Mesa-9.2.3-61.9.1.i586
> #   Mesa-libGL1-9.2.3-61.9.1.i586
> #   at-3.1.13-5.4.1.i586
> Requires:       bash
> Requires:       bc
> Requires:       binutils
> Requires:       coreutils
> Requires:       cpio
> #   cronie-1.4.8-50.1.2.i586
> #   cups-client-1.5.4-140.1.i586
> Requires:       diffutils
> #   ed-1.9-2.1.2.i586
> Requires:       file
> Requires:       findutils
> #   fontconfig-2.11.0-1.1.i586
> #   foomatic-filters-4.0.12-5.1.1.i586
> Requires:       gawk
> #   gettext-runtime-0.18.3.1-1.1.i586
> #   ghostscript-9.10-45.4.i586
> # Rear calls getent in
> # /usr/share/rear/rescue/default/90_clone_users_and_groups.sh
> Requires:       glibc
> #   glibc-i18ndata-2.18-4.11.1.noarch
> Requires:       grep
> Requires:       gzip
> #   libGLU1-9.0.0-7.1.2.i586
> #   libXt6-1.1.4-2.1.2.i586
> #   libXtst6-1.2.2-2.1.2.i586
> #   libasound2-1.0.27.2-3.5.1.i586
> #   libatk-1_0-0-2.10.0-1.1.i586
> #   libglib-2_0-0-2.38.2-8.2.i586
> #   libgtk-2_0-0-2.24.22-2.1.i586
> #   libjpeg62-62.0.0-24.1.3.i586
> #   libpango-1_0-0-1.36.1-4.2.i586
> #   libpng12-0-1.2.50-6.1.2.i586
> #   libqt4-4.8.5-5.6.1.i586
> #   libqt4-sql-4.8.5-5.6.1.i586
> #   libqt4-x11-4.8.5-5.6.1.i586
> #   libxml2-tools-2.9.1-2.1.2.i586
> #   lsb-release-2.0-20.2.1.noarch
> #   m4-1.4.16-14.1.2.i586
> #   mailx-12.5-14.1.3.i586
> #   make-3.82-160.2.1.i586
> #   man-2.6.3-9.1.3.i586
> #   mozilla-nss-3.15.3.1-8.1.i586
> Requires:       net-tools
> #   patch-2.7.1-4.1.2.i586
> #   pax-3.4-155.1.2.i586
> Requires:       perl-base
> #   postfix-2.9.6-7.4.1.i586
> Requires:       procps
> #   psmisc-22.20-5.1.2.i586
> #   python-2.7.5-8.3.1.i586
> #   python3-3.3.2-5.1.3.i586
> #   qt3-3.3.8c-128.1.2.i586
> Requires:       rsync
> Requires:       sed
> #   shadow-4.1.5.1-8.1.2.i586
> #   systemd-sysvinit-208-15.1.i586
> #   sysvinit-tools-2.88+-89.1.2.i586
> Requires:       tar
> #   time-1.7-3.1.2.i586
> Requires:       util-linux
> #   xdg-utils-20121008-2.2.1.noarch
> # End of "Requires: lsb" cleanup.
> # Non-LSB RPM Requires:
> # all RPM based systems seem to have this and call it the same
> Requires:       ethtool
> Requires:       iproute2
> Requires:       iputils
> %if 0%{?suse_version} >= 1230
> Requires:       %{_sbindir}/agetty
> %else
> Requires:       /sbin/mingetty
> %endif
> %if %{with use_mkisofs}
> Requires:       %{_bindir}/mkisofs
> %else
> Requires:       %{_bindir}/genisoimage
> %endif
> # recent SuSE versions have an extra nfs-client package
> Requires:       nfs-client
> # Rear calls openssl in /usr/share/rear/rescue/default/50_ssh.sh
> Requires:       openssl
> # openSUSE from 11.1 and SLES from 11 uses rpcbind instead of portmap
> Requires:       rpcbind
> Requires:       syslinux
>
-------------------------------------------------------------------------
> 
> Curently I build rear with that RPM requirements in rear.spec in
> the openSUSE build service project "home:jsmeix:branches:Archiving".
> 
> If it looks good, I would like to submit that to "Archiving"
> and from there to openSUSE:Factory.
> 
> What do you think about such a cleanup of the LSB RPM requirements?
> 
> 
> Kind Regards
> Johannes Meixner
> -- 
> SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg --
Germany
> HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix
Imendoerffer
> _______________________________________________
> rear-devel mailing list
> rear-devel at lists.relax-and-recover.org
> http://pikachu.3ti.be/mailman/listinfo/rear-devel

-- 
Gratien D'haese
IT3 Consultants bvba 
Vennestraat 15, B-2560 Nijlen



More information about the rear-devel mailing list