Gentoo Archives: gentoo-commits

From: Yuta SATOH <nigoro.gentoo@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-bsd:master commit in: dev-util/catalyst/files/, dev-util/catalyst/
Date: Fri, 23 Nov 2012 13:06:28
Message-Id: 1353675958.054b239319dfca3b9de0ad329b4785eb422ea163.yuta_satoh@gentoo
1 commit: 054b239319dfca3b9de0ad329b4785eb422ea163
2 Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
3 AuthorDate: Fri Nov 23 13:05:58 2012 +0000
4 Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
5 CommitDate: Fri Nov 23 13:05:58 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=054b2393
7
8 catalyst-2.0.12.1 -- correctly fix lbzip2 support
9
10 ---
11 dev-util/catalyst/Manifest | 4 +-
12 dev-util/catalyst/catalyst-2.0.12.1.ebuild | 7 +-
13 .../catalyst/files/catalyst-2.0.12.1-fbsd.patch | 193 +++++++++++++++++++-
14 3 files changed, 193 insertions(+), 11 deletions(-)
15
16 diff --git a/dev-util/catalyst/Manifest b/dev-util/catalyst/Manifest
17 index 85aaad7..9f141fe 100644
18 --- a/dev-util/catalyst/Manifest
19 +++ b/dev-util/catalyst/Manifest
20 @@ -1,10 +1,10 @@
21 AUX 2.0.8.1-arm-softfp.patch 1551 SHA256 54ae43557d15bd51d6227aec8160d61c07e45b1cb6b6c8f11fe1c4804772afcc SHA512 93b90a36a1c9d737a06b5b78df583f0b99ef26704b6fd615bb01dda4e101d3287ae4c4d65df2d51ce1b1ed21a2a267d6c32c7c26de785fc5b4f83b7ed480b49d WHIRLPOOL 6de731b98cec1c28280992b0228885a03beab7d281582ad27f3980771c3e521178bd88cb33791ab15be2ccd9e2d1e169c6158967fdc614cfba3b528cdcfa2bfd
22 AUX catalyst-2.0.10.1-fbsd.patch 7223 SHA256 ea4d2ee2cc2dae5f2d3b12109fbe11ab930db926d00618279a76ce4cf11980ef SHA512 2e13ee67ef4bfed1433ab02a200908321effba3bcf6ad82396cf6df7116f21dbadea7e1c88c40ccec506a5d9f3edc51db703ba07f108f5584a38d6aa8d16f8f0 WHIRLPOOL b206dbc0bd7567eea2f9172ea9dad3e67946c669b67814d3dfe0b1a24c5cdf1b5abaa2c707ade9b209911601fab6a1a3e89bb2cd7c56b00e0fb8ccfa0defc0c0
23 AUX catalyst-2.0.11-fbsd.patch 4763 SHA256 35cb646dd3a12142bfe25e2f7f4f99b067ca18d948291f3391bee0208423209f SHA512 9fc2d595825e8b07b77d1a06862c04b8c58517a4e86bebe922c442e7fdabe834c6331936f8b8002aa220d7110595e1c7b14df50df08f544bfad3ab52dc522fdc WHIRLPOOL 1358eacd093678b48fe190d43d7048ec4d325350dca04509790ce26522e405185260c8fcd7884ba68f57912a63553b6356462c481babf28dc4b96670fdf39653
24 -AUX catalyst-2.0.12.1-fbsd.patch 1392 SHA256 d8641861c4a8631f28c49493ee27afbc4904b807f47cce8fa2af1f4197ca9e62 SHA512 53ec18ad967ca7fd60390ab58f5d742ec1d685383afc7c5442be16162a0e5e98124fb839f71145bfcc3152782e193518cb463d38710fe27def5b60b0a939f2a9 WHIRLPOOL 2efc6284d7999284649c65563fc17c13938c18cfb1f9cef6da40138ec2f06871175b8d95e27e5f5dcbff3f3701b2a61c6dc0f1a767235995e9a58d55d4bc0d65
25 +AUX catalyst-2.0.12.1-fbsd.patch 9706 SHA256 6029c3d323bf1928727d807ecdf1f090732d5bd885269e0a8d9d0dc7e58aa0db SHA512 b1e6bd89fb947782c5386c4fdf6d0689800106c14c7281af2a4367d888f38b7b415873fdf71c46ca442a0e552858f8495342b77fa2511f63c7ca5ab744c489ca WHIRLPOOL a3ccee2d90222df0d6418d87a769ef96cd2818399deb754740a3dd867e4897eefe236b5318f49b78d09a0ab509abb3e2c80cd1fea2419bf37776d6711e81617c
26 DIST catalyst-2.0.10.1.tar.bz2 909073 SHA256 3ed2217c579dcc01e13afc017dbfea869d2c99a0c169290e678fc113db6891ed SHA512 b21e576a41926b8f71a76410c2e3e593267994cb5bdb39639add001a610f6c481ac7506ec88caf6016f65ecc09c86bae9a78812b3dc2879e32046e118c0e5671 WHIRLPOOL 168d20e1ff19005b647230852d249552fd98d50e9ece0ca19b5e3b743a971255f9065f8832fb7e29ef8f561ca8f40fe1f9f8732f54c4d9d233cd2df8ab7c42ad
27 DIST catalyst-2.0.11.tar.bz2 909191 SHA256 6fed91ac834179f676905f6fa544fb642b18b95ec1c89420432ef05fb9fde7da SHA512 935d42f72bc5e181ef0eff4862e414a52914b7ac82d6e75c2d80c1a4d055b428da2c2d255c35cf851bcb729aca1a9c8ee0301923433d4c7fedb03bc1f06d5ca3 WHIRLPOOL e91a01b2d0f17e2d7c371d05362a658e7ddc7142982ae84efb71db9327e933227651d6efaeb8c86b0d5305e350632a2adac0ff81fed888588fe6078cb049ab7b
28 DIST catalyst-2.0.12.1.tar.bz2 908119 SHA256 91bc71a0140da9977fda4969a137a25ed04c3dd6fa2c038404806b7f562eda62 SHA512 1f448b4c849567d5097246f0c6e140e25781b0c3f093bec8c616cf83d2ad86af5dbebfaf4bafd1e240db41c3213e0f3ea9da77a22b1ee73480a0d1c39d6d0a8f WHIRLPOOL 9c2c3f491611c0cb99694aabb24af1f2b45576e6c5f056335fb5f028a93e9d91e1beba652bf7aaf3a93f54a1abb6bdb827624659845dfb01f8ea4bee6868e48e
29 EBUILD catalyst-2.0.10.1.ebuild 3331 SHA256 e16830ca69796659ed19fb00121a920b3ef66a0be9db63d09261b08f76eeb111 SHA512 48f60b6350f567f028e6ca466eacbdafcdf2defc5f9fcc98f9be109aed871cab5b5c5f67a42b1fb1909160ded86fdb1451449aca0de7329765afbe536efa96a1 WHIRLPOOL 35efea44ffa1af504daacbf4202b7aa28b26a35f4bc0d9b0d351e88f48c575883170f1547a3f8d02d5e1f9d86f98302d3481f17e8f9cf50305eb0c6f21fa2801
30 EBUILD catalyst-2.0.11.ebuild 3387 SHA256 5183cf2f1bfbfd3d3650090a6294dff6fd8f8cf1633c344f30efe986839d04a5 SHA512 f07297968a9a0a2af2c016f13cd7a4b162eb391c88da54cb43d6805682df35da5a467a57d71ded187829f131f82695104a9e5cd1e1d6e07681c67bafe40156f0 WHIRLPOOL 9a8807cf2ce2c88acc11db4521463f8acd9436c919841638c73bae6517ffa80e9d6cca0a2a5a4c3dc874b0315b636ad2eb9c4781af26ece0bacd321463616384
31 -EBUILD catalyst-2.0.12.1.ebuild 3561 SHA256 9ad5a45a59c49f767baf5220a82c6262b5038cf8e3b869e2ab8d63be25b2c2a8 SHA512 e6de9ce5b5931666980d70764792ffe933384c94c74b3b8b63c9fce717a449481b1dbb26496d60ea0b8b3f47767e6c007080035fac4e61b9429210bae1beedd6 WHIRLPOOL f3e79136337be9602f8aee4cb2a84108ee2de9bf30cc590786da08dec8f2cd6312d431229dac057a2ce58f2fbed3f0c7ef43df8b86ae3e55edbd7da2e8356f97
32 +EBUILD catalyst-2.0.12.1.ebuild 3403 SHA256 121f97286ce9d99de654f9e5c50ec399abf86f04d635490ae8b2e88580936b7c SHA512 b53c57bb61ceece3af690be8a05bee15cd9f83852cb7ce7d3d52cee2b6d1306135ad4141077c753a03b136f5b14f6a6392574d3a8a88830dc1b15e1346e0468e WHIRLPOOL b729ceead96c35ac3fa129c806c8be952e910de58b63705863787dc68061a49a99ac1fb37281f4d73778af68c451cf4e90bfdc7c52c6d77f96830484bd21939f
33
34 diff --git a/dev-util/catalyst/catalyst-2.0.12.1.ebuild b/dev-util/catalyst/catalyst-2.0.12.1.ebuild
35 index c766851..655566e 100644
36 --- a/dev-util/catalyst/catalyst-2.0.12.1.ebuild
37 +++ b/dev-util/catalyst/catalyst-2.0.12.1.ebuild
38 @@ -70,12 +70,7 @@ pkg_setup() {
39 src_prepare() {
40 python_convert_shebangs 2 catalyst modules/catalyst_lock.py
41
42 - if use elibc_FreeBSD ; then
43 - epatch "${FILESDIR}"/${PN}-2.0.11-fbsd.patch
44 - epatch "${FILESDIR}"/${PN}-2.0.12.1-fbsd.patch
45 - # BSD's tar doesn't support lbzip2
46 - find . -type f -exec gsed -i 's:tar -I lbzip2:tar:g' {} \;
47 - fi
48 + use elibc_FreeBSD && epatch "${FILESDIR}"/${PN}-2.0.12.1-fbsd.patch
49 }
50
51 src_install() {
52
53 diff --git a/dev-util/catalyst/files/catalyst-2.0.12.1-fbsd.patch b/dev-util/catalyst/files/catalyst-2.0.12.1-fbsd.patch
54 index 9cd8751..70d55d1 100644
55 --- a/dev-util/catalyst/files/catalyst-2.0.12.1-fbsd.patch
56 +++ b/dev-util/catalyst/files/catalyst-2.0.12.1-fbsd.patch
57 @@ -1,7 +1,78 @@
58 +diff -Nur catalyst-2.0.12.1.orig/arch/x86.py catalyst-2.0.12.1/arch/x86.py
59 +--- catalyst-2.0.12.1.orig/arch/x86.py 2012-11-02 09:27:51.000000000 +0900
60 ++++ catalyst-2.0.12.1/arch/x86.py 2012-11-23 21:27:15.000000000 +0900
61 +@@ -7,9 +7,12 @@
62 + def __init__(self,myspec):
63 + builder.generic.__init__(self,myspec)
64 + if self.settings["buildarch"]=="amd64":
65 +- if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"):
66 +- raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)"
67 +- self.settings["CHROOT"]="linux32 chroot"
68 ++ if os.uname()[0] == "Linux":
69 ++ if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"):
70 ++ raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)"
71 ++ self.settings["CHROOT"]="linux32 chroot"
72 ++ else:
73 ++ self.settings["CHROOT"]="chroot"
74 + self.settings["crosscompile"] = False;
75 + else:
76 + self.settings["CHROOT"]="chroot"
77 +diff -Nur catalyst-2.0.12.1.orig/modules/catalyst_support.py catalyst-2.0.12.1/modules/catalyst_support.py
78 +--- catalyst-2.0.12.1.orig/modules/catalyst_support.py 2012-11-02 09:27:51.000000000 +0900
79 ++++ catalyst-2.0.12.1/modules/catalyst_support.py 2012-11-23 21:37:39.000000000 +0900
80 +@@ -108,7 +108,7 @@
81 + #"find" :[calc_contents,"find %(path)s"],
82 + "tar-tv":[calc_contents,"tar tvf %(file)s"],
83 + "tar-tvz":[calc_contents,"tar tvzf %(file)s"],
84 +- "tar-tvj":[calc_contents,"tar -I lbzip2 -tvf %(file)s"],
85 ++ "tar-tvj":[calc_contents,"tar tvjf %(file)s"],
86 + "isoinfo-l":[calc_contents,"isoinfo -l -i %(file)s"],
87 + # isoinfo-f should be a last resort only
88 + "isoinfo-f":[calc_contents,"isoinfo -f -i %(file)s"],
89 diff -Nur catalyst-2.0.12.1.orig/modules/generic_stage_target.py catalyst-2.0.12.1/modules/generic_stage_target.py
90 ---- catalyst-2.0.12.1.orig/modules/generic_stage_target.py 2012-11-22 20:03:11.000000000 +0900
91 -+++ catalyst-2.0.12.1/modules/generic_stage_target.py 2012-11-22 20:07:05.000000000 +0900
92 -@@ -901,18 +901,18 @@
93 +--- catalyst-2.0.12.1.orig/modules/generic_stage_target.py 2012-11-02 09:27:51.000000000 +0900
94 ++++ catalyst-2.0.12.1/modules/generic_stage_target.py 2012-11-23 21:34:08.000000000 +0900
95 +@@ -649,7 +649,8 @@
96 + self.settings["source_path"]+"\nto "+\
97 + self.settings["chroot_path"]+\
98 + " (This may take some time) ...\n"
99 +- if "bz2" == self.settings["chroot_path"][-3:]:
100 ++ if "bz2" == self.settings["chroot_path"][-3:] \
101 ++ and os.uname()[0] == "Linux":
102 + unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
103 + self.settings["chroot_path"]
104 + else:
105 +@@ -664,7 +665,8 @@
106 + self.settings["source_path"]+"\nto "+\
107 + self.settings["chroot_path"]+\
108 + " (This may take some time) ...\n"
109 +- if "bz2" == self.settings["chroot_path"][-3:]:
110 ++ if "bz2" == self.settings["chroot_path"][-3:] \
111 ++ and os.uname()[0] == "Linux":
112 + unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
113 + self.settings["chroot_path"]
114 + else:
115 +@@ -766,7 +768,8 @@
116 + read_from_clst(self.settings["snapshot_cache_path"]+\
117 + "catalyst-hash")
118 + destdir=self.settings["snapshot_cache_path"]
119 +- if "bz2" == self.settings["chroot_path"][-3:]:
120 ++ if "bz2" == self.settings["chroot_path"][-3:] \
121 ++ and os.uname()[0] == "Linux":
122 + unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
123 + else:
124 + unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir
125 +@@ -785,7 +788,8 @@
126 + cleanup_errmsg="Error removing existing snapshot directory."
127 + cleanup_msg=\
128 + "Cleaning up existing portage tree (This can take a long time)..."
129 +- if "bz2" == self.settings["chroot_path"][-3:]:
130 ++ if "bz2" == self.settings["chroot_path"][-3:] \
131 ++ and os.uname()[0] == "Linux":
132 + unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
133 + self.settings["chroot_path"]+"/usr"
134 + else:
135 +@@ -901,18 +905,18 @@
136 src=self.mountmap[x]
137 if self.settings.has_key("SNAPCACHE") and x == "/usr/portage":
138 self.snapshot_lock_object.read_lock()
139 @@ -30,3 +101,119 @@ diff -Nur catalyst-2.0.12.1.orig/modules/generic_stage_target.py catalyst-2.0.12
140 self.settings["chroot_path"]+x)
141 else:
142 retval=os.system("mount --bind "+src+" "+\
143 +@@ -1111,9 +1115,15 @@
144 + if os.path.exists(self.settings["chroot_path"]+"/usr/local/portage"):
145 + cmd("rm -rf "+self.settings["chroot_path"]+"/usr/local/portage",\
146 + "Could not remove /usr/local/portage",env=self.env)
147 +- cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
148 +- "/etc/portage/make.conf",\
149 +- "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
150 ++ if os.path.exists(self.settings["chroot_path"]+"/etc/portage/make.conf"):
151 ++ if os.path.exists("/usr/bin/gsed"):
152 ++ cmd("gsed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
153 ++ "/etc/portage/make.conf",\
154 ++ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
155 ++ else:
156 ++ cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
157 ++ "/etc/portage/make.conf",\
158 ++ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
159 +
160 + """ Clean up old and obsoleted files in /etc """
161 + if os.path.exists(self.settings["stage_path"]+"/etc"):
162 +@@ -1207,9 +1217,14 @@
163 +
164 + print "Creating stage tarball..."
165 +
166 +- cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
167 +- self.settings["stage_path"]+" .",\
168 +- "Couldn't create stage tarball",env=self.env)
169 ++ if os.uname()[0] == "Linux":
170 ++ cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
171 ++ self.settings["stage_path"]+" .",\
172 ++ "Couldn't create stage tarball",env=self.env)
173 ++ else:
174 ++ cmd("tar cjpf "+self.settings["target_path"]+" -C "+\
175 ++ self.settings["stage_path"]+" .",\
176 ++ "Couldn't create stage tarball",env=self.env)
177 +
178 + self.gen_contents_file(self.settings["target_path"])
179 + self.gen_digest_file(self.settings["target_path"])
180 +diff -Nur catalyst-2.0.12.1.orig/modules/snapshot_target.py catalyst-2.0.12.1/modules/snapshot_target.py
181 +--- catalyst-2.0.12.1.orig/modules/snapshot_target.py 2012-11-02 09:27:51.000000000 +0900
182 ++++ catalyst-2.0.12.1/modules/snapshot_target.py 2012-11-23 21:35:42.000000000 +0900
183 +@@ -50,8 +50,12 @@
184 + self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env)
185 +
186 + print "Compressing Portage snapshot tarball..."
187 +- cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
188 +- "Snapshot creation failure",env=self.env)
189 ++ if os.uname()[0] == "Linux":
190 ++ cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
191 ++ "Snapshot creation failure",env=self.env)
192 ++ else:
193 ++ cmd("tar cjf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
194 ++ "Snapshot creation failure",env=self.env)
195 +
196 + self.gen_contents_file(self.settings["snapshot_path"])
197 + self.gen_digest_file(self.settings["snapshot_path"])
198 +diff -Nur catalyst-2.0.12.1.orig/modules/stage1_target.py catalyst-2.0.12.1/modules/stage1_target.py
199 +--- catalyst-2.0.12.1.orig/modules/stage1_target.py 2012-11-02 09:27:51.000000000 +0900
200 ++++ catalyst-2.0.12.1/modules/stage1_target.py 2012-11-23 21:29:03.000000000 +0900
201 +@@ -92,10 +92,15 @@
202 + # stage_path/proc probably doesn't exist yet, so create it
203 + if not os.path.exists(self.settings["stage_path"]+"/proc"):
204 + os.makedirs(self.settings["stage_path"]+"/proc")
205 ++ if not os.path.exists(self.settings["stage_path"]+"/dev"):
206 ++ os.makedirs(self.settings["stage_path"]+"/dev")
207 +
208 + # alter the mount mappings to bind mount proc onto it
209 + self.mounts.append("/tmp/stage1root/proc")
210 + self.mountmap["/tmp/stage1root/proc"]="/proc"
211 ++ if os.uname()[0] == "FreeBSD":
212 ++ self.mounts.append("/tmp/stage1root/dev")
213 ++ self.mountmap["/tmp/stage1root/dev"]="/dev"
214 +
215 + def set_update_seed(self):
216 + if self.settings.has_key("update_seed"):
217 +diff -Nur catalyst-2.0.12.1.orig/targets/stage3/stage3-chroot.sh catalyst-2.0.12.1/targets/stage3/stage3-chroot.sh
218 +--- catalyst-2.0.12.1.orig/targets/stage3/stage3-chroot.sh 2012-11-02 09:27:51.000000000 +0900
219 ++++ catalyst-2.0.12.1/targets/stage3/stage3-chroot.sh 2012-11-23 21:27:15.000000000 +0900
220 +@@ -5,4 +5,11 @@
221 + ## START BUILD
222 + setup_pkgmgr
223 +
224 +-run_merge "-e system"
225 ++if [[ $(uname) == "FreeBSD" ]] ; then
226 ++ # workaround fix bug 425530, 438112
227 ++ run_merge "-e @system --exclude=sys-apps/portage"
228 ++ run_merge "sys-apps/portage"
229 ++else
230 ++ run_merge "-e system"
231 ++fi
232 ++
233 +diff -Nur catalyst-2.0.12.1.orig/targets/support/chroot-functions.sh catalyst-2.0.12.1/targets/support/chroot-functions.sh
234 +--- catalyst-2.0.12.1.orig/targets/support/chroot-functions.sh 2012-11-02 09:27:51.000000000 +0900
235 ++++ catalyst-2.0.12.1/targets/support/chroot-functions.sh 2012-11-23 21:27:15.000000000 +0900
236 +@@ -413,5 +413,22 @@
237 + Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
238 + }
239 +
240 ++# GNU sed wrapper
241 ++sed(){
242 ++ if [ -e /usr/bin/gsed ]
243 ++ then
244 ++ /usr/bin/gsed "$@"
245 ++ elif [ -e /bin/sed ]
246 ++ then
247 ++ /bin/sed "$@"
248 ++ elif [ -e /usr/bin/sed ]
249 ++ then
250 ++ /usr/bin/sed "$@"
251 ++ else
252 ++ echo "ERROR: failed the selection of sed."
253 ++ exit 1
254 ++ fi
255 ++}
256 ++
257 + # We do this everywhere, so why not put it in this script
258 + run_default_funcs