mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-02 03:30:48 +02:00
catalyst: xz hack and working ebuild
This commit is contained in:
parent
0faa861d0d
commit
00b77177d7
3 changed files with 275 additions and 0 deletions
2
dev-util/catalyst/Manifest
Normal file
2
dev-util/catalyst/Manifest
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
AUX HACK-default-to-xz6.patch 8760 SHA256 8f6f0454113537a4d9b09a1a4e40923104c412fdcab2f7d88e0179ebf1bcfa41 SHA512 bcdfa6ee2e7ef2f6ee1aeaa5b020728e7af3e6f7eeda420f5113e5a5d01421ffff3450755a52e29c4685b56460a9d316e8d4caeb41138c00a5197cbc4a978243 WHIRLPOOL 231be84af2f11c7ab91b4856d09e562067d75e84a38986afe321c45e34ae1a4022405a02215ebff7ab0123262edf9b26400a4eb9995a46312e55ca37db7d3d3a
|
||||
EBUILD catalyst-9999.ebuild 3317 SHA256 f1ef62c2ba04e204f4fd935edffc643d96a5370eb828cc3059c1d82906ef1ed2 SHA512 43ee854d1a0196ad92667b225030858f77f2c252c32c9fdf0710ede417d49aa2fb9c4088834b9a8e84b4fef3254cbd30010bff0cbfeba62a7e02a144998b6b1c WHIRLPOOL 60888d3c64171f8544db0b6d4ceb1ae9783360b0efb83fe9255eda9094cc27ad7be92b626e51bae7b73f648fb107aca9b109782949229314a656a4e99158cedc
|
||||
102
dev-util/catalyst/catalyst-9999.ebuild
Normal file
102
dev-util/catalyst/catalyst-9999.ebuild
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/catalyst/catalyst-9999.ebuild,v 1.29 2013/07/31 04:34:00 mattst88 Exp $
|
||||
|
||||
EAPI=3
|
||||
PYTHON_DEPEND="2"
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/catalyst.git"
|
||||
EGIT_BRANCH="2.X"
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
S="${WORKDIR}/${PN}"
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="mirror://gentoo/${P}.tar.bz2
|
||||
http://dev.gentoo.org/~jmbsvicetto/distfiles/${P}.tar.bz2"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
fi
|
||||
inherit eutils multilib python
|
||||
|
||||
DESCRIPTION="release metatool used for creating releases based on Gentoo Linux"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/releng/catalyst/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
IUSE="ccache xz-hack kernel_linux"
|
||||
|
||||
DEPEND="app-text/asciidoc"
|
||||
RDEPEND="app-arch/lbzip2
|
||||
app-crypt/shash
|
||||
virtual/cdrtools
|
||||
x86? ( >=sys-boot/syslinux-3.72 )
|
||||
amd64? ( >=sys-boot/syslinux-3.72 )
|
||||
ccache? ( dev-util/ccache )
|
||||
ia64? ( sys-fs/dosfstools )
|
||||
kernel_linux? ( app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )"
|
||||
|
||||
pkg_setup() {
|
||||
if use ccache ; then
|
||||
einfo "Enabling ccache support for catalyst."
|
||||
else
|
||||
ewarn "By default, ccache support for catalyst is disabled."
|
||||
ewarn "If this is not what you intended,"
|
||||
ewarn "then you should add ccache to your USE."
|
||||
fi
|
||||
echo
|
||||
einfo "The template spec files are now installed by default. You can find"
|
||||
einfo "them under /usr/share/doc/${PF}/examples"
|
||||
einfo "and they are considered to be the authorative source of information"
|
||||
einfo "on catalyst."
|
||||
echo
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
ewarn "The ${EGIT_BRANCH:-master} branch (what you get with this ${PV} ebuild) contains"
|
||||
ewarn "work-in-progress code. Be aware that it's likely that it will not"
|
||||
ewarn "be in a working state at any given point. Please do not file bugs"
|
||||
ewarn "until you have posted on the gentoo-catalyst mailing list and we"
|
||||
ewarn "have asked you to do so."
|
||||
fi
|
||||
python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
use xz-hack && epatch "${FILESDIR}"/HACK-default-to-xz6.patch
|
||||
python_convert_shebangs 2 catalyst modules/catalyst_lock.py
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/$(get_libdir)/${PN}
|
||||
exeinto /usr/$(get_libdir)/${PN}
|
||||
doexe catalyst || die "copying catalyst"
|
||||
if [[ ${PV} == 3.9999* ]]; then
|
||||
doins -r modules files || die "copying files"
|
||||
else
|
||||
doins -r arch modules livecd || die "copying files"
|
||||
fi
|
||||
for x in targets/*; do
|
||||
exeinto /usr/$(get_libdir)/${PN}/$x
|
||||
doexe $x/* || die "copying ${x}"
|
||||
done
|
||||
make_wrapper catalyst /usr/$(get_libdir)/${PN}/catalyst
|
||||
insinto /etc/catalyst
|
||||
doins files/catalyst.conf files/catalystrc || die "copying configuration"
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
doins examples/* || die
|
||||
dodoc README AUTHORS
|
||||
doman files/catalyst.1 files/catalyst-spec.5
|
||||
# Here is where we actually enable ccache
|
||||
use ccache && \
|
||||
dosed 's:options="autoresume kern:options="autoresume ccache kern:' \
|
||||
/etc/catalyst/catalyst.conf
|
||||
dosed "s:/usr/lib/catalyst:/usr/$(get_libdir)/catalyst:" \
|
||||
/etc/catalyst/catalyst.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "You can find more information about catalyst by checking out the"
|
||||
einfo "catalyst project page at:"
|
||||
einfo "http://www.gentoo.org/proj/en/releng/catalyst/index.xml"
|
||||
echo
|
||||
}
|
||||
171
dev-util/catalyst/files/HACK-default-to-xz6.patch
Normal file
171
dev-util/catalyst/files/HACK-default-to-xz6.patch
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
diff -Naur catalyst/modules/catalyst_support.py catalyst-xz/modules/catalyst_support.py
|
||||
--- catalyst/modules/catalyst_support.py 2013-12-13 21:24:46.000000000 -0500
|
||||
+++ catalyst-xz/modules/catalyst_support.py 2013-12-13 20:53:14.898398000 -0500
|
||||
@@ -72,6 +72,8 @@
|
||||
_ = 'tar-tvz'
|
||||
elif file.endswith('.tbz2') or file.endswith('.tar.bz2'):
|
||||
_ = 'tar-tvj'
|
||||
+ elif file.endswith('.xz') or file.endswith('.tar.xz'):
|
||||
+ _ = 'tar-tvJ'
|
||||
elif file.endswith('.tar'):
|
||||
_ = 'tar-tv'
|
||||
|
||||
@@ -109,6 +111,7 @@
|
||||
"tar-tv":[calc_contents,"tar tvf %(file)s"],
|
||||
"tar-tvz":[calc_contents,"tar tvzf %(file)s"],
|
||||
"tar-tvj":[calc_contents,"tar -I lbzip2 -tvf %(file)s"],
|
||||
+ "tar-tvJ":[calc_contents,"tar -I pixz -tvf %(file)s"],
|
||||
"isoinfo-l":[calc_contents,"isoinfo -l -i %(file)s"],
|
||||
# isoinfo-f should be a last resort only
|
||||
"isoinfo-f":[calc_contents,"isoinfo -f -i %(file)s"],
|
||||
diff -Naur catalyst/modules/generic_stage_target.py catalyst-xz/modules/generic_stage_target.py
|
||||
--- catalyst/modules/generic_stage_target.py 2013-12-13 21:24:45.000000000 -0500
|
||||
+++ catalyst-xz/modules/generic_stage_target.py 2013-12-13 20:53:14.923843000 -0500
|
||||
@@ -295,7 +295,7 @@
|
||||
|
||||
def set_target_path(self):
|
||||
self.settings["target_path"]=normpath(self.settings["storedir"]+\
|
||||
- "/builds/"+self.settings["target_subpath"]+".tar.bz2")
|
||||
+ "/builds/"+self.settings["target_subpath"]+".tar.xz")
|
||||
if "AUTORESUME" in self.settings\
|
||||
and os.path.exists(self.settings["autoresume_path"]+\
|
||||
"setup_target_path"):
|
||||
@@ -381,7 +381,10 @@
|
||||
"/tmp/"+self.settings["source_subpath"]+"/")
|
||||
else:
|
||||
self.settings["source_path"]=normpath(self.settings["storedir"]+\
|
||||
- "/builds/"+self.settings["source_subpath"]+".tar.bz2")
|
||||
+ "/builds/"+self.settings["source_subpath"]+".tar.xz")
|
||||
+ if not os.path.isfile(self.settings["source_path"]):
|
||||
+ self.settings["source_path"]=normpath(self.settings["storedir"]+\
|
||||
+ "/builds/"+self.settings["source_subpath"]+".tar.bz2")
|
||||
if os.path.isfile(self.settings["source_path"]):
|
||||
# XXX: Is this even necessary if the previous check passes?
|
||||
if os.path.exists(self.settings["source_path"]):
|
||||
@@ -395,7 +398,7 @@
|
||||
print "\tseedcache in the options of catalyst.conf the source path"
|
||||
print "\twill then be "+\
|
||||
normpath(self.settings["storedir"]+"/builds/"+\
|
||||
- self.settings["source_subpath"]+".tar.bz2\n")
|
||||
+ self.settings["source_subpath"]+".tar.xz\n")
|
||||
|
||||
def set_dest_path(self):
|
||||
if "root_path" in self.settings:
|
||||
@@ -653,9 +656,13 @@
|
||||
self.settings["source_path"]+"\nto "+\
|
||||
self.settings["chroot_path"]+\
|
||||
" (This may take some time) ...\n"
|
||||
- if "bz2" == self.settings["chroot_path"][-3:]:
|
||||
+ print "fuck this file"+self.settings["source_path"]
|
||||
+ if "bz2" == self.settings["source_path"][-3:]:
|
||||
unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
|
||||
self.settings["chroot_path"]
|
||||
+ elif "xz" == self.settings["source_path"][-2:]:
|
||||
+ unpack_cmd="tar -I pixz -xpf "+self.settings["source_path"]+" -C "+\
|
||||
+ self.settings["chroot_path"]
|
||||
else:
|
||||
unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
|
||||
self.settings["chroot_path"]
|
||||
@@ -668,9 +675,12 @@
|
||||
self.settings["source_path"]+"\nto "+\
|
||||
self.settings["chroot_path"]+\
|
||||
" (This may take some time) ...\n"
|
||||
- if "bz2" == self.settings["chroot_path"][-3:]:
|
||||
+ if "bz2" == self.settings["source_path"][-3:]:
|
||||
unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
|
||||
self.settings["chroot_path"]
|
||||
+ elif "xz" == self.settings["source_path"][-2:]:
|
||||
+ unpack_cmd="tar -I pixz -xpf "+self.settings["source_path"]+" -C "+\
|
||||
+ self.settings["chroot_path"]
|
||||
else:
|
||||
unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
|
||||
self.settings["chroot_path"]
|
||||
@@ -770,8 +780,10 @@
|
||||
read_from_clst(self.settings["snapshot_cache_path"]+\
|
||||
"catalyst-hash")
|
||||
destdir=self.settings["snapshot_cache_path"]
|
||||
- if "bz2" == self.settings["chroot_path"][-3:]:
|
||||
+ if "bz2" == self.settings["snapshot_path"][-3:]:
|
||||
unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
|
||||
+ elif "xz" == self.settings["snapshot_path"][-3:]:
|
||||
+ unpack_cmd="tar -I pixz -xpf "+self.settings["snapshot_path"]+" -C "+destdir
|
||||
else:
|
||||
unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir
|
||||
unpack_errmsg="Error unpacking snapshot"
|
||||
@@ -789,9 +801,12 @@
|
||||
cleanup_errmsg="Error removing existing snapshot directory."
|
||||
cleanup_msg=\
|
||||
"Cleaning up existing portage tree (This can take a long time)..."
|
||||
- if "bz2" == self.settings["chroot_path"][-3:]:
|
||||
+ if "bz2" == self.settings["snapshot_path"][-3:]:
|
||||
unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
|
||||
self.settings["chroot_path"]+"/usr"
|
||||
+ elif "xz" == self.settings["snapshot_path"][-3:]:
|
||||
+ unpack_cmd="tar -I pixz -xpf "+self.settings["snapshot_path"]+" -C "+\
|
||||
+ self.settings["chroot_path"]+"/usr"
|
||||
else:
|
||||
unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\
|
||||
self.settings["chroot_path"]+"/usr"
|
||||
@@ -1215,7 +1230,7 @@
|
||||
|
||||
print "Creating stage tarball..."
|
||||
|
||||
- cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
|
||||
+ cmd("tar -I pixz -cpf "+self.settings["target_path"]+" -C "+\
|
||||
self.settings["stage_path"]+" .",\
|
||||
"Couldn't create stage tarball",env=self.env)
|
||||
|
||||
diff -Naur catalyst/modules/livecd_stage2_target.py catalyst-xz/modules/livecd_stage2_target.py
|
||||
--- catalyst/modules/livecd_stage2_target.py 2013-12-13 21:24:45.000000000 -0500
|
||||
+++ catalyst-xz/modules/livecd_stage2_target.py 2013-12-13 20:53:14.886987000 -0500
|
||||
@@ -33,7 +33,7 @@
|
||||
file_locate(self.settings, ["cdtar","controller_file"])
|
||||
|
||||
def set_source_path(self):
|
||||
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2")
|
||||
+ self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.xz")
|
||||
if os.path.isfile(self.settings["source_path"]):
|
||||
self.settings["source_path_hash"]=generate_hash(self.settings["source_path"])
|
||||
else:
|
||||
diff -Naur catalyst/modules/snapshot_target.py catalyst-xz/modules/snapshot_target.py
|
||||
--- catalyst/modules/snapshot_target.py 2013-12-13 21:24:44.000000000 -0500
|
||||
+++ catalyst-xz/modules/snapshot_target.py 2013-12-13 20:53:14.922792000 -0500
|
||||
@@ -19,7 +19,7 @@
|
||||
self.settings["target_subpath"]="portage"
|
||||
st=self.settings["storedir"]
|
||||
self.settings["snapshot_path"]=normpath(st+"/snapshots/portage-"+self.settings["version_stamp"]\
|
||||
- +".tar.bz2")
|
||||
+ +".tar.xz")
|
||||
self.settings["tmp_path"]=normpath(st+"/tmp/"+self.settings["target_subpath"])
|
||||
|
||||
def setup(self):
|
||||
@@ -50,7 +50,7 @@
|
||||
self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env)
|
||||
|
||||
print "Compressing Portage snapshot tarball..."
|
||||
- cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
|
||||
+ cmd("tar -I pixz -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
|
||||
"Snapshot creation failure",env=self.env)
|
||||
|
||||
self.gen_contents_file(self.settings["snapshot_path"])
|
||||
diff -Naur catalyst/modules/stage2_target.py catalyst-xz/modules/stage2_target.py
|
||||
--- catalyst/modules/stage2_target.py 2013-12-13 21:24:44.000000000 -0500
|
||||
+++ catalyst-xz/modules/stage2_target.py 2013-12-13 20:53:14.887345000 -0500
|
||||
@@ -19,7 +19,7 @@
|
||||
if "SEEDCACHE" in self.settings and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")):
|
||||
self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")
|
||||
else:
|
||||
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2")
|
||||
+ self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.xz")
|
||||
if os.path.isfile(self.settings["source_path"]):
|
||||
if os.path.exists(self.settings["source_path"]):
|
||||
# XXX: Is this even necessary if the previous check passes?
|
||||
@@ -28,7 +28,7 @@
|
||||
print "Source path set to "+self.settings["source_path"]
|
||||
if os.path.isdir(self.settings["source_path"]):
|
||||
print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf"
|
||||
- print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n")
|
||||
+ print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.xz\n")
|
||||
|
||||
# XXX: How do these override_foo() functions differ from the ones in
|
||||
# generic_stage_target and why aren't they in stage3_target?
|
||||
Loading…
Reference in a new issue