Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 425196 Details for
Bug 363577
any stages build fails on Gentoo/FreeBSD
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
catalyst-3.0_rc1-fbsd.patch
catalyst-3.0_rc1-fbsd.patch (text/plain), 6.24 KB, created by
Yuta SATOH
on 2016-02-11 12:35:33 UTC
(
hide
)
Description:
catalyst-3.0_rc1-fbsd.patch
Filename:
MIME Type:
Creator:
Yuta SATOH
Created:
2016-02-11 12:35:33 UTC
Size:
6.24 KB
patch
obsolete
>diff --git a/catalyst-3.0_rc1/catalyst/arch/x86.py b/catalyst-3.0_rc1/catalyst/arch/x86.py >index 118d5ce..64d8b91 100644 >--- a/catalyst-3.0_rc1/catalyst/arch/x86.py >+++ b/catalyst-3.0_rc1/catalyst/arch/x86.py >@@ -1,4 +1,6 @@ > >+import os >+ > from catalyst import builder > > class generic_x86(builder.generic): >@@ -6,8 +8,9 @@ class generic_x86(builder.generic): > def __init__(self,myspec): > builder.generic.__init__(self,myspec) > if self.settings["buildarch"]=="amd64": >- self.setarch('linux32') > self.settings["crosscompile"] = False >+ if os.uname()[0] == "Linux": >+ self.setarch('linux32') > > class arch_x86(generic_x86): > "builder class for generic x86 (386+)" >diff --git a/catalyst-3.0_rc1/catalyst/base/resume.py b/catalyst-3.0_rc1/catalyst/base/resume.py >index 70d9a4f..1e80027 100644 >--- a/catalyst-3.0_rc1/catalyst/base/resume.py >+++ b/catalyst-3.0_rc1/catalyst/base/resume.py >@@ -1,4 +1,4 @@ >-#!/usr/bin/python >+#! /usr/bin/env python > > # Maintained in full by: > # Catalyst Team <catalyst@gentoo.org> >diff --git a/catalyst-3.0_rc1/catalyst/base/stagebase.py b/catalyst-3.0_rc1/catalyst/base/stagebase.py >index 8891b3f..9e65624 100644 >--- a/catalyst-3.0_rc1/catalyst/base/stagebase.py >+++ b/catalyst-3.0_rc1/catalyst/base/stagebase.py >@@ -950,21 +950,22 @@ class StageBase(TargetBase, ClearBase, GenBase): > log.debug('bind(); src = %s', src) > if "snapcache" in self.settings["options"] and x == "portdir": > self.snapcache_lock.read_lock() >- if os.uname()[0] == "FreeBSD": >- if src == "/dev": >- _cmd = "mount -t devfs none " + target >- else: >- _cmd = "mount_nullfs " + src + " " + target >+ if src == "tmpfs": >+ if "var_tmpfs_portage" in self.settings: >+ _cmd = "mount -t tmpfs -o size=" + \ >+ self.settings["var_tmpfs_portage"] + "G " + \ >+ src + " " + target > else: >- if src == "tmpfs": >- if "var_tmpfs_portage" in self.settings: >- _cmd = "mount -t tmpfs -o size=" + \ >- self.settings["var_tmpfs_portage"] + "G " + \ >- src + " " + target >- elif src == "shmfs": >- _cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target >+ if os.uname()[0] == "FreeBSD": >+ if src == "/dev": >+ _cmd = "mount -t devfs none " + target >+ else: >+ _cmd = "mount_nullfs " + src + " " + target > else: >- _cmd = "mount --bind " + src + " " + target >+ if src == "shmfs": >+ _cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target >+ else: >+ _cmd = "mount --bind " + src + " " + target > log.debug('bind(); _cmd = %s', _cmd) > cmd(_cmd, "Bind mounting Failed", env=self.env, fail_func=self.unbind) > log.debug('bind(); finished :D') >@@ -1188,9 +1189,14 @@ class StageBase(TargetBase, ClearBase, GenBase): > if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]): > cmd("rm -rf " + self.settings["chroot_path"] + self.settings["local_overlay"], > "Could not remove " + self.settings["local_overlay"], env=self.env) >- cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ >- self.settings["make_conf"],\ >- "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) >+ if os.path.exists("/usr/bin/gsed"): >+ cmd("gsed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ >+ self.settings["make_conf"],\ >+ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) >+ else: >+ cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ >+ self.settings["make_conf"],\ >+ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) > > # Clean up old and obsoleted files in /etc > if os.path.exists(self.settings["stage_path"]+"/etc"): >diff --git a/catalyst-3.0_rc1/catalyst/targets/stage1.py b/catalyst-3.0_rc1/catalyst/targets/stage1.py >index 18ef520..354861c 100644 >--- a/catalyst-3.0_rc1/catalyst/targets/stage1.py >+++ b/catalyst-3.0_rc1/catalyst/targets/stage1.py >@@ -86,3 +86,7 @@ class stage1(StageBase): > self.mounts.append("stage1root/proc") > self.target_mounts["stage1root/proc"] = "/tmp/stage1root/proc" > self.mountmap["stage1root/proc"] = "/proc" >+ if os.uname()[0] == "FreeBSD": >+ self.mounts.append("stage1root/dev") >+ self.target_mounts["stage1root/dev"] = "/tmp/stage1root/dev" >+ self.mountmap["stage1root/dev"] = "/dev" >diff --git a/catalyst-3.0_rc1/doc/make_target_table.py b/catalyst-3.0_rc1/doc/make_target_table.py >index 9eb072b..b5cc54c 100755 >--- a/catalyst-3.0_rc1/doc/make_target_table.py >+++ b/catalyst-3.0_rc1/doc/make_target_table.py >@@ -1,4 +1,4 @@ >-#!/usr/bin/python >+#! /usr/bin/env python > # Copyright (C) 2012 W. Trevor King <wking@drexel.edu> > # Copyright (C) 2012 Sebastian Pipping <sebastian@pipping.org> > # Copyright (C) 2013 Brian dolbec <dolsen@gentoo.org> >diff --git a/catalyst-3.0_rc1/targets/stage1/build.py b/catalyst-3.0_rc1/targets/stage1/build.py >index fa4fd13..ca46722 100755 >--- a/catalyst-3.0_rc1/targets/stage1/build.py >+++ b/catalyst-3.0_rc1/targets/stage1/build.py >@@ -1,4 +1,4 @@ >-#!/usr/bin/python >+#! /usr/bin/env python > > import os > import sys >diff --git a/catalyst-3.0_rc1/targets/stage3/stage3-chroot.sh b/catalyst-3.0_rc1/targets/stage3/stage3-chroot.sh >index 6cf9106..258fe75 100755 >--- a/catalyst-3.0_rc1/targets/stage3/stage3-chroot.sh >+++ b/catalyst-3.0_rc1/targets/stage3/stage3-chroot.sh >@@ -5,4 +5,10 @@ source /tmp/chroot-functions.sh > ## START BUILD > setup_pkgmgr > >-run_merge "-e @system" >+if [[ $(uname) == "FreeBSD" ]] ; then >+ # Workaround of SED contained in sys-devel/libtool. bug #438112 >+ run_merge "-e @system --exclude=sys-apps/portage" >+ run_merge "sys-apps/portage" >+else >+ run_merge "-e @system" >+fi >diff --git a/catalyst-3.0_rc1/targets/support/chroot-functions.sh b/catalyst-3.0_rc1/targets/support/chroot-functions.sh >index 456ae4c..9262331 100755 >--- a/catalyst-3.0_rc1/targets/support/chroot-functions.sh >+++ b/catalyst-3.0_rc1/targets/support/chroot-functions.sh >@@ -429,5 +429,22 @@ Comment=This is a link to the local copy of the Gentoo Linux Handbook. > Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop > } > >+# GNU sed wrapper >+sed(){ >+ if [ -e /usr/bin/gsed ] >+ then >+ /usr/bin/gsed "$@" >+ elif [ -e /bin/sed ] >+ then >+ /bin/sed "$@" >+ elif [ -e /usr/bin/sed ] >+ then >+ /usr/bin/sed "$@" >+ else >+ echo "ERROR: failed the selection of sed." >+ exit 1 >+ fi >+} >+ > # We do this everywhere, so why not put it in this script > run_default_funcs
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 363577
:
269931
|
269933
|
269935
|
305721
|
305725
|
314077
|
314079
|
326448
|
330332
|
357332
|
425186
|
425188
|
425196
|
425294
|
425296
|
509212
|
509214
|
509216
|
509218
|
509224