GithubHelp home page GithubHelp logo

mur's Introduction

This is no longer necessary - Manjaro has released a repository with MESA nonfree. Follow instructions here.

MUR: MESA Unattended Recovery

This is a simple python script that can be used to download Mesa packages directly from Arch Linux servers to an installation of Manjaro. The original objective is to return proprietary codecs that Manjaro as an enterprise distribution cannot ship due to restrictive licences and codecs. The inspiration for the project comes from the mesa-freeworld package from the RPM Fusion repository, which attempts to address the missing hardware codecs for AMD graphics cards.

Be aware of this before running this script for the first time: It was developed to be as automated as possible to be used eventually later in a graphical interface. When running the script, the downloaded files will be temporarily stored in /tmp and deleted once the script has finished.

Instructions:

  1. Download the file mur from the repository.
  2. Make executable with: chmod +x ./mur
  3. Run it with: ./mur

Tip: If you are going to save this script on your personal computer in order to readily invoke it as a command in a terminal window, then make sure that the file has "execute permission" as instructed earlier, and that it resides in ~/.local/bin, which on Manjaro is part of your ${PATH}. To accomplish that, follow the next two steps:

  1. Move the file to ~/.local/bin using: mv mur ~/.local/bin/
  2. Now you can run mur from any terminal window by just typing its name.

mur's People

Contributors

clmbtti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mr-nuub

mur's Issues

Banned by https://archlinux.org/packages

Hi,

I am testing the script (i am not a dev and not know about python), and I added some packages more, when run it the archlinux.org server banned me. If use a VPN i can access, so is a ban.

Additionally, vulkan-headers that is flagged out of date, breaks the script.

No user agent or the speed for query maybe I guess?, well, i put here my modification:

import subprocess
import os

PACKAGES = [
    "mesa",
    "mesa-demos",
    "vulkan-mesa-layers",
    "opencl-mesa",
    "lib32-mesa",
    "vulkan-intel",
    "vulkan-swrast",
    "mesa-vdpau",
    "libva-mesa-driver",
    "libva-vdpau-driver",
    "libva",
    "lib32-libva-vdpau-driver",
    "lib32-libva-mesa-driver",
    "lib32-mesa-demos",
    "lib32-mesa-vdpau",
    "lib32-vulkan-icd-loader",
    "lib32-vulkan-intel",
    "lib32-vulkan-radeon",
    "mesa-utils",
    "vulkan-radeon",
    "vulkan-headers",
    "vulkan-icd-loader",
    "lib32-libva",
]

ARCH = subprocess.run(["uname", "-m"], capture_output=True, text=True).stdout.strip()
URL_PREFIX = f"https://archlinux.org/packages/@REPO@/{ARCH}"
URL_SUFFIX = "download"

CACHE_DIR = f"/tmp/package_cache"

# Create the cache directory inside /tmp if it does not exist
if not os.path.exists(CACHE_DIR):
    os.makedirs(CACHE_DIR)

# Set permissions to allow the current user to create and modify files in it
os.chmod(CACHE_DIR, 0o755)

# Generate a list of package URLs using a list comprehension
PACKAGES_URL = [
    f"{URL_PREFIX.replace('@REPO@', 'multilib')}/{package}/{URL_SUFFIX}"
    if package.startswith("lib32-")
    else f"{URL_PREFIX.replace('@REPO@', 'extra')}/{package}/{URL_SUFFIX}"
    for package in PACKAGES
    if subprocess.run(["pacman", "-Qi", package], capture_output=True, text=True).returncode == 0
]

# Start the yes command in the background to automatically respond "y" to the prompt
yes_process = subprocess.Popen(["yes", "S"], stdout=subprocess.PIPE)

# Run the pacman command, using the output of the yes command as the input
subprocess.run(
    ["sudo", "pacman", "--cachedir", CACHE_DIR, "-U"] + PACKAGES_URL,
    stdin=yes_process.stdout,
)

# Terminate the yes command
yes_process.terminate()

# Delete the cache directory
subprocess.run(["rm", "-rf", CACHE_DIR])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.