Skip to content

Commit

Permalink
Add files
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasraman committed Aug 8, 2023
0 parents commit e5d14ab
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Install Thunderbird 115 on Fedora 38/7/6

This is a simple script to install Thunderbird on Fedora 38/7/6. This uses packages from the Koji builds that are currently in the pipeline.



## How to install:

```
git clone https://github.com/tejasraman/install-tb115-fedora.git
cd install-tb115-fedora
./install-tb115.py
```


27 changes: 27 additions & 0 deletions install-tb115.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3

import osfinder
import os

version = osfinder.FindOsver()
arch = osfinder.FindArch()

urls = [
f"https://kojipkgs.fedoraproject.org//packages/thunderbird/115.0.1/1.{version}/{arch}/thunderbird-115.0.1-1.{version}.{arch}.rpm > /dev/null 2>&1",
f"https://kojipkgs.fedoraproject.org//packages/thunderbird/115.0.1/1.{version}/{arch}/thunderbird-librnp-rnp-115.0.1-1.{version}.{arch}.rpm > /dev/null 2>&1",
f"https://kojipkgs.fedoraproject.org//packages/thunderbird/115.0.1/1.{version}/{arch}/thunderbird-debuginfo-115.0.1-1.{version}.{arch}.rpm > /dev/null 2>&1",
f"https://kojipkgs.fedoraproject.org//packages/thunderbird/115.0.1/1.{version}/{arch}/thunderbird-debugsource-115.0.1-1.{version}.{arch}.rpm > /dev/null 2>&1",
f"https://kojipkgs.fedoraproject.org//packages/thunderbird/115.0.1/1.{version}/{arch}/thunderbird-librnp-rnp-debuginfo-115.0.1-1.{version}.{arch}.rpm > /dev/null 2>&1"
]

os.system(f"mkdir /tmp/thunderbird-115-fedora")

num = 1
for i in urls:
print(f"Downloading file {num}/5")
os.system(
f"curl --url {i} --output /tmp/thunderbird-115-fedora/thunderbird{num}.rpm")
num += 1

print("Installing (please enter root password)")
os.system("sudo dnf localinstall /tmp/thunderbird-115-fedora/* -y")
32 changes: 32 additions & 0 deletions osfinder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import subprocess
import platform


def FindOsver():

cat = subprocess.Popen(['cat', '/etc/os-release'], stdout=subprocess.PIPE)
grep = subprocess.Popen(
['grep', "REDHAT_SUPPORT_PRODUCT="], stdin=cat.stdout, stdout=subprocess.PIPE)
is_fedora = True if "Fedora" in (grep.communicate()[0]).decode(
"utf-8").split("=")[1] else False

if is_fedora == False:
raise ValueError("System is not Fedora. Quitting")
else:
cat = subprocess.Popen(
['cat', '/etc/os-release'], stdout=subprocess.PIPE)
grep = subprocess.Popen(
['grep', "VERSION_ID"], stdin=cat.stdout, stdout=subprocess.PIPE)
version = (grep.communicate()[0]).decode("utf-8").split("=")[1].strip()
if version == 36:
return "eln128"
else:
return f"fc{version}"


def FindArch():
arch = subprocess.Popen(['uname', '-m'], stdout=subprocess.PIPE)
return arch.stdout.read().strip().decode("utf-8")


print(FindArch())

0 comments on commit e5d14ab

Please sign in to comment.