Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bc (arbitrary precision calculator) not necessary for each Linux distribution #1625

Closed
ProBackup-nl opened this issue Dec 7, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@ProBackup-nl
Copy link
Contributor

ProBackup-nl commented Dec 7, 2017

  • rear version (/usr/sbin/rear -V): git
  • OS version (cat /etc/rear/os.conf or lsb_release -a): n/a

In pre-2017 version of the ReaR code there was no dependency for bc.

Some older Linux distributions apparently suffer a calculation bug which appears in the ReaR partition resizing code. Other Linux distributions correctly calculate partition sizes without helper utilities.

Make ReaR more Relax

Change the hard dependency for bc only to a hard dependency for the Linux distributions where needed.

Suggestion:

  1. make the sample sometimes failing calculation
  2. calculation failed? Only then include bc as required dependency
@jsmeix jsmeix self-assigned this Dec 7, 2017
@jsmeix jsmeix added discuss / RFC enhancement Adaptions and new features labels Dec 7, 2017
@jsmeix jsmeix added this to the ReaR future milestone Dec 7, 2017
@jsmeix
Copy link
Member

jsmeix commented Dec 7, 2017

In general I agree that REQUIRED_PROGS should be only
what is mandatory to have in the recovery system, cf.
#1570 (comment)

Regarding 'bc':
We have 'bc' currently unconditioned in REQUIRED_PROGS
because the current implementation of the mathlib_calculate()
function in lib/global-functions.sh and how that function is called
by other scripts only works with 'bc' because it depends
on the 'bc' syntax.
Accordingly a precondition to have 'bc' no longer mandatory
is a way that can be implemented and maintained with
reasonable effort how to do such calculations independent
of the actual calculation program.

@gdha
Copy link
Member

gdha commented Feb 23, 2018

@ProBackup-nl I would not mind to get rid of bc, OTOH there are too many other issues open that should get fixed in a timely fashion. Therefore, may I suggest if you have time and a strong desire to prepare a PR for a better bc-free rear?

@jsmeix
Copy link
Member

jsmeix commented Feb 23, 2018

Only a side note FYI:
Because etc/rear/local.conf is sourced by usr/sbin/rear after
the functions in usr/share/rear/lib/[a-z]*.sh had beed sourced
one can re-define the mathlib_calculate() function
by any other implementation in etc/rear/local.conf
and then check how that works with huge disks
in particular in migration mode.

@gdha
Copy link
Member

gdha commented Jul 19, 2018

As no feedback or additional comments were added I may assume that this issue has no future anymore? We better close it 'till further notice or new inspired input has been given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants