OpenINF / docker-fisher

🐳 Dockerfiles built for plug-and-play Fish 🐟 shell components powered by the scorching fast Fisher πŸ”₯ plugin manager
https://github.com/OpenINF/docker-fisher?tab=readme-ov-file#readme
3 stars 1 forks source link

🏷️✨ add support for CentOS 7 #16

Open DerekNonGeneric opened 1 year ago

DerekNonGeneric commented 1 year ago

This probably sounds like a strange request, but where i live, people get certified as Linux Professions experienced w/ this particular distribution and version (CentOS 7) being more important than any others, so the priority is even higher than Debian-based distributions. This is about Enterprise Linux, not really meant to appeal too much to hobbyists and the like.

DerekNonGeneric commented 12 months ago

So, let's get this show on the road as if you were a broke college student taking this certification course. First thing you'd likely do is go to the Apple Store and buy yourself a nice new Mac for your school work. Then you'd likely realize MacBooks are priced out of budget, so you buy yourself a nice new Mac Mini. These days that would be one with an M1 chip.

M1 chips have not been supported by VirtualBox (our virtualization software) until recently.

There won't be any further M1 packages on the 7.0 branch as we don't backport any significant fixes/enhancements for ARM there, so it doesn't make much sense to invest time on building and releasing a package which will not see any real progress. If you want to run the developer preview for VBox on M1 you can check out the latest testbuilds which has a lot of fixes and enhancements for M1 (just don't expect any performance improvement). — https://www.virtualbox.org/ticket/21771

Be sure to download the appropriate latest build from the testbuilds page located in the table as seen below.

Latest 7.0.x test builds

OS Build
Windows 7.0.x revision 158811
macOS 7.0.x revision 158813
macOS \/ ARM64 BETA 7.0.x revision 158798

WARNING:
The Hypervisor type of VirtualBox is not preferable in all use cases. VirtualBox is a Type 2 Hypervisor which comes w/ all the associated risk(s).

DerekNonGeneric commented 12 months ago

Despite being what may seem like the wrong architecture, x86_64 is preferable over aarch64, which will not even boot on this VM software.

You'll want the EVERYTHING 2009 variant (other choices may not even work).

DerekNonGeneric commented 10 months ago

Anyway, i am just going to start taking notes here since it looks like we will have to continue investing in this old platform until it is officially EOL'd next year. πŸ˜€

DerekNonGeneric commented 10 months ago

Something that came up that was not brought to my attention in the class is that we need to update the latest version of Git, as the one that comes pre-installed is outdated to the point of causing VS Code to complain about its age.

According to the official Git website:

Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.

RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.

https://git-scm.com/download/linux

We will go with the IUS Community Project option here.


The SO answer below suggests:

# Install IUS Repo and Epel-Release:
yum install -y https://repo.ius.io/ius-release-el${CENTOS_MAIN_VERSION}.rpm
yum install -y epel-release 

# re-install git:
yum erase -y git*
yum install -y git-core

Because the stock git must first be uninstalled.

πŸ”— https://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-8-x-7-x-6-x#answer-38133865

NOTE: This will also uninstall gh if it is already installed, so updating Git first would have to take priority.

DerekNonGeneric commented 8 months ago

Upgrade to latest cURL

This is necessary for plenty of reasons, notably required by Homebrew, but before we can do that, we need to install the latest OpenSSL 1.1.1 (next comment instead of the links below here):

DerekNonGeneric commented 8 months ago

The following must be completed in the CentOS VM before building cURL from source…

OpenSSL 1.1 Installation

  1. We are able to use package manager for this step.
    sudo yum -y install openssl11

The guide below is for building OpenSSL 11 from source, which may not be necessary…

We are able to build latest cURL from source w/o problems (using link from bottom of prev comment).

DerekNonGeneric commented 8 months ago

We are finally ready for this…

Homebrew Installation

DerekNonGeneric commented 8 months ago
  1. (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/dory/.bashrc
  2. eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  3. sudo yum groupinstall 'Development Tools'
  4. brew install gcc

Error: Please update your system curl or set HOMEBREW_CURL_PATH to a newer version. Minimum required version: 7.41.0 Your curl version: 7.29.0

Don't sweat that error, it will just get auto-updated.

TODO: correct this recurring error above πŸ‘†

The next error basically stops all development…
Run out of storage? > tar: binutils/2.41_1/x86_64-pc-linux-gnu: Cannot mkdir: No space left on device Oh, looks like i may need to re-partition my Linux VM drive(s) since all the new unallocated space ends up on the wrong partition. Time to install [GParted](https://gparted.org/download.php) ```sh sudo yum -y install gparted ``` Fill the entire space, we are going to be re-mounting `/home` over there…

There needs to be clarification on dirnames in Glossary !

DerekNonGeneric commented 8 months ago

We are finally ready for this…

Homebrew Installation

My bad, the procedure necessary to arrive at this stage is not entirely clear cut, and explaining how is part of helping all getting involved; my CentOS VM was unrecoverable for unknowns (was no longer bootable, unsure precisely how)…

We will be documenting how we are typically supposed to get there… ^^

DerekNonGeneric commented 7 months ago

well, it looks like fish shell is developed on centos!

πŸ”— https://github.com/fish-shell/fish-shell/blob/master/Dockerfile

we should use that container for this repo

OpenINFbot commented 7 months ago

adding support for CentOS 7 would mean adding it to our Fish shell container offerings; not merely adding it as the devcontainer OS of the repo that builds them, my apologies!

DerekNonGeneric commented 7 months ago

right, multi-stage builds w/ layers & things like that should be coming soon to help knock this out in the most effective and intelligent way (actually using design patterns)❗

πŸ”— https://firefox-source-docs.mozilla.org/taskcluster/kinds.html#docker-image

DerekNonGeneric commented 7 months ago

As a result, CentOS Linux 7 will reach end of life (EOL) on June 30, 2024. — https://www.redhat.com/en/topics/linux/centos-linux-eol