From c5921c33ccb4397fbcda1c79aa644204a8b49bd9 Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 11 Jul 2025 18:54:14 -0400 Subject: [PATCH] Tighten up Mandriva support --- README.bbcode | 4 ++-- README.md | 4 ++-- installJRMC | 31 ++++++++++++++++++------------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/README.bbcode b/README.bbcode index 5c60241..ba26442 100644 --- a/README.bbcode +++ b/README.bbcode @@ -25,7 +25,7 @@ $ installJRMC --help --install, -i repo|local repo: Install MC from repository, future updates will be handled by the system package manager local: Build and install MC package from official source package ---build[=suse|fedora|centos] +--build[=suse|fedora|centos|mandriva] Build RPM from source DEB but do not install Optionally, specify a target distro for cross-building (ex. --build=suse, note the '=') --compat @@ -48,7 +48,7 @@ $ installJRMC --help Starts services at boot (system) or user login (user) (default: per-service, see SERVICES) --container, -c CONTAINER (TODO: Under construction) See CONTAINERS section below for a list of containers to deploy ---createrepo[=suse|fedora|centos] +--createrepo[=suse|fedora|centos|mandriva] Build rpm, copy to webroot, and run createrepo. Optionally, specify a target distro for non-native repo (ex. --createrepo=fedora, note the '=') --createrepo-webroot PATH diff --git a/README.md b/README.md index 338f427..a4c243a 100755 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ $ installJRMC --help --install, -i repo|local repo: Install MC from repository, future updates will be handled by the system package manager local: Build and install MC package locally from official source package ---build[=suse|fedora|centos] +--build[=suse|fedora|centos|mandriva] Build RPM from source DEB but do not install Optionally, specify a target distro for cross-building (ex. --build=suse, note the '=') --compat @@ -45,7 +45,7 @@ $ installJRMC --help Starts services at boot (system) or user login (user) (default: per-service, see SERVICES) --container, -c CONTAINER (TODO: Under construction) See CONTAINERS section below for a list of containers to deploy ---createrepo[=suse|fedora|centos] +--createrepo[=suse|fedora|centos|mandriva] Build rpm, copy to webroot, and run createrepo. Optionally, specify a target distro for non-native repo (ex. --createrepo=fedora, note the '=') --createrepo-webroot PATH diff --git a/installJRMC b/installJRMC index 60945cb..5b8b9c7 100755 --- a/installJRMC +++ b/installJRMC @@ -48,7 +48,7 @@ print_help() { --install, -i repo|local repo: Install MC from repository, updates are handled by the system package manager local: Build and install MC locally from official source package - --build[=suse|fedora|centos] + --build[=suse|fedora|centos|mandriva] Build RPM from source DEB but do not install Optionally, specify a target distro for cross-building (ex. --build=suse, note the '=') --compat @@ -71,7 +71,7 @@ print_help() { Starts services at boot (system) or at user login (user) (default: per service, see SERVICES) --container, -c CONTAINER (TODO: Under construction) See CONTAINERS section below for a list of possible services to install - --createrepo[=suse|fedora|centos] + --createrepo[=suse|fedora|centos|mandriva] Build rpm, copy to webroot, and run createrepo. Use in conjunction with --build=TARGET for crossbuilding repos Optionally, specify a target distro for non-native repo (ex. --createrepo=fedora, note the '=') @@ -462,18 +462,19 @@ install_package() { shift done - # Define package aliases based on the distribution + # Define distribution-specific package aliases case $ID in - debian|ubuntu) - pkg_aliases=( - [rpm-build]="rpm" - [createrepo_c]="createrepo" - [tigervnc-server]="tigervnc-standalone-server" - ) ;; - suse) - pkg_aliases=( - [buildah]="buildah fuse-overlayfs" - ) ;; + debian|ubuntu) pkg_aliases=( + [rpm-build]="rpm" + [createrepo_c]="createrepo" + [tigervnc-server]="tigervnc-standalone-server" + ) ;; + suse) pkg_aliases=( + [buildah]="buildah fuse-overlayfs" + ) ;; + mandriva) pkg_aliases=( + [dpkg]="dpkg gnutar" + ) ;; esac # Filter out already installed packages to create pkg_array @@ -567,6 +568,10 @@ install_external_repos() { # execute sudo zypper --non-interactive --quiet refresh # fi ;; + mandriva) + branch=$(grep ^PRETTY_NAME= /etc/os-release | tr -d '"' | rev | cut -d' ' -f1 | rev | tr '[:upper:]' '[:lower:]') + execute sudo dnf config-manager --set-enabled "${branch}-${ARCH}-extra" + ;; esac }