Skip to content

Commit

Permalink
Copies libgcc_s.so.1 so that libpthreads doesn't fail in ZFS 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Vasquez committed Nov 8, 2016
1 parent 6c88dc9 commit 5df1615
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES
@@ -1,3 +1,8 @@
6.8.1
------------
- Including 'libgcc_s.so.1' in the initramfs due to ZFS 0.7.0's pthreads loading it during runtime.
https://github.com/zfsonlinux/zfs/issues/4749

6.8.0
------------
- udev/eudev/or systemd-udev is now required.
Expand Down
2 changes: 1 addition & 1 deletion README
@@ -1,4 +1,4 @@
Bliss Initramfs - v6.8.0
Bliss Initramfs - v6.8.1
Jonathan Vasquez <jvasquez1011@gmail.com>
Mozilla Public License v2.0

Expand Down
20 changes: 20 additions & 0 deletions pkg/libs/Core.py
Expand Up @@ -372,6 +372,26 @@ def LastSteps(cls):
Tools.ActivateTriggerInInit(var.useAddonLine)
call(["sed", "-i", "-e", var.addonModulesLine + "s/\"\"/\"" + " ".join(Addon.GetFiles()) + "\"/", var.temp + "/init"])

cls.CopyLibGccLibrary()

# Copy the 'libgcc' library so that when libpthreads loads it during runtime, it works.
# https://github.com/zfsonlinux/zfs/issues/4749
@classmethod
def CopyLibGccLibrary(cls):
cmd = "gcc-config -L | cut -d ':' -f 1"
res = Tools.Run(cmd)

if len(res) < 1:
Tools.Fail("Unable to retrieve gcc library path!")

libgcc_filename = "libgcc_s.so"
libgcc_filename_main = libgcc_filename + ".1"
libgcc_path = res[0] + "/" + libgcc_filename_main

Tools.SafeCopy(libgcc_path, var.llib64)
os.chdir(var.llib64)
os.symlink(libgcc_filename_main, libgcc_filename)

# Create the initramfs
@classmethod
def CreateInitramfs(cls):
Expand Down
8 changes: 8 additions & 0 deletions pkg/libs/Tools.py
Expand Up @@ -214,6 +214,14 @@ def CopyConfigOrWarn(cls, targetConfig):
else:
Tools.Warn(targetConfig + " was not detected on this system. The default settings will be used.")

# Runs a shell command and returns its output
@classmethod
def Run(cls, command):
try:
return check_output(command, universal_newlines=True, shell=True).strip().split("\n")
except:
Tools.Fail("An error occured while processing the following command: " + command)

####### Message Functions #######

# Returns the string with a color to be used in bash
Expand Down
2 changes: 1 addition & 1 deletion pkg/libs/Variables.py
Expand Up @@ -14,7 +14,7 @@
author = "Jonathan Vasquez"
email = "jvasquez1011@gmail.com"
contact = author + " <" + email + ">"
version = "6.8.0"
version = "6.8.1"
license = "Mozilla Public License 2.0"

# Locations
Expand Down

0 comments on commit 5df1615

Please sign in to comment.