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: Thu, 29 Aug 2013 15:34:08
Message-Id: 1377790423.fe88c29aebe9f2eec4679a34c12e9e0cdfc85300.yuta_satoh@gentoo
1 commit: fe88c29aebe9f2eec4679a34c12e9e0cdfc85300
2 Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
3 AuthorDate: Thu Aug 29 15:33:43 2013 +0000
4 Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
5 CommitDate: Thu Aug 29 15:33:43 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=fe88c29a
7
8 added catalyst-2.0.14.ebuild and catalyst-2.0.14-fbsd.patch
9
10 ---
11 dev-util/catalyst/Manifest | 3 +
12 dev-util/catalyst/catalyst-2.0.14.ebuild | 100 +++++++++
13 dev-util/catalyst/files/catalyst-2.0.14-fbsd.patch | 236 +++++++++++++++++++++
14 3 files changed, 339 insertions(+)
15
16 diff --git a/dev-util/catalyst/Manifest b/dev-util/catalyst/Manifest
17 index 30e0708..76dfea7 100644
18 --- a/dev-util/catalyst/Manifest
19 +++ b/dev-util/catalyst/Manifest
20 @@ -1,3 +1,6 @@
21 AUX catalyst-2.0.12.1-fbsd.patch 9713 SHA256 c66f856b7f3b0b9988984cf7eac1ab332d6103ac4bbcc855dbfdb0f4de8e6692 SHA512 335b29e7bda61c1875a66694031924a3f04851b056651b6ee8f3572209bf216d5f63520513223ca996f3b9404eeefacf7cfe40d0feddbebd5c3782bf8db36d4d WHIRLPOOL b63adab3d5ead0950a06d9a6490cfbef9d07ca420e45eaee99b9bef87f3b96d93cdaada2212faa368c1473360f917db094f8319f34bdbc1dd673390fb55cc9bf
22 +AUX catalyst-2.0.14-fbsd.patch 10559 SHA256 c4f53aa4a29eceb01a19b76b08b898efab1244b045b7657430c81ac796ebd8f3 SHA512 344193243bea083c8af3c641f69b70362635af7eaec9887cb0a5aa92957f951b53bbc8ea68f62e66395a2efa63b3b69bb2da7aeac489f88df70abf117a6108b7 WHIRLPOOL 3c54e14b0a05e272403ff738c2a5ba25eaa5c034148f35317809c5ccb758f245490ccead2d6554b36ef3f4e6a592faa2988974f901f01096eefe1466de058272
23 DIST catalyst-2.0.12.2.tar.bz2 907893 SHA256 411d531b6de8c8c1bc9fa9502af3a4882e94e9db8b911bb48e4a0fcfc1efe7e8 SHA512 12349f6249363a94a72a71d05b2fe6ee13593b5ea67e1cb9a054c5ece896ff68f89d1af6341b98238ba6a6510e2737f81dcc2606649c10681235315663ab04ae WHIRLPOOL 1769a78f615c8e0eec2167dd9d6ab873e24801ecb5e4634037898933c6f5a1dbb189d967a628be6f8811f6769eadc91c5003ddbb6bd58eb05efbbd5110f740c7
24 +DIST catalyst-2.0.14.tar.bz2 873415 SHA256 5a2f506026bde6df5d7ad5d94c3dbea0c151422b2201c347eafbaee135915586 SHA512 75e09be72e124ed4af1489af0688ed3858b36d25d76f331d8bfd1d45256fe068b9eb21c783541863f41786d9c91565695387582fc759bea5ef046ad2fa51eb1a WHIRLPOOL fd8c4660ccf11d6a6d89ebbdf20f69467e32984cd5a721c6d34ad3a0a94bb149e020ceefb7a21863aa30ebbdc27e3b5875b3d22fcb2381f6834ac56112335001
25 EBUILD catalyst-2.0.12.2.ebuild 3660 SHA256 4b0714dbb8eb96a9588f6b95e5e9021ddb62144c1a2e47f717111d70a84593a2 SHA512 f5ca61ec95864928d27e93ac72c2b441fdc04d30a27ebb3cedff6ec327147cee51a213b06d5f8e82bfda50ebc9e2eff51d77f43d3b699018459a4094b691ff4f WHIRLPOOL 1a558bd6eba2f278e4f6fcc4c846d884cf3fe79961204e6cf04bdb41889c96dd5f0af447eb14a6e8d17eac0622d8874cc6be20ff97e59d9632114495c77c2019
26 +EBUILD catalyst-2.0.14.ebuild 3166 SHA256 90063f74c89fa79969cfc35c695cadd20aadce8c922dd9d9444d8243b08f974e SHA512 1e0a83a4c65679c0f2c11b3ccbb96695a7f551f97c875bb0d81453db1f6803873a1ef8838eee884a9b34bb69dd97bbdb80344deac103301882d9e95dd61e8b55 WHIRLPOOL 6239a89daa41d5bc983cf020eb2fd6486c3e990ebc5cccd27260ce54ade5fb9a1e20c256d8a6861c728fa9286f54d0f6b7fa7e63949222147f178bcbd2e0a3b7
27
28 diff --git a/dev-util/catalyst/catalyst-2.0.14.ebuild b/dev-util/catalyst/catalyst-2.0.14.ebuild
29 new file mode 100644
30 index 0000000..6c17b60
31 --- /dev/null
32 +++ b/dev-util/catalyst/catalyst-2.0.14.ebuild
33 @@ -0,0 +1,100 @@
34 +# Copyright 1999-2013 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +# $Header: $
37 +
38 +EAPI=3
39 +PYTHON_DEPEND="2"
40 +
41 +if [[ ${PV} == *9999* ]]; then
42 + EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/catalyst.git"
43 + inherit git-2
44 + SRC_URI=""
45 + S="${WORKDIR}/${PN}"
46 + KEYWORDS=""
47 +else
48 + SRC_URI="mirror://gentoo/${P}.tar.bz2
49 + http://dev.gentoo.org/~mattst88/distfiles/${P}.tar.bz2"
50 + KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
51 +fi
52 +inherit eutils multilib python
53 +
54 +DESCRIPTION="release metatool used for creating releases based on Gentoo Linux"
55 +HOMEPAGE="http://www.gentoo.org/proj/en/releng/catalyst/"
56 +
57 +LICENSE="GPL-2"
58 +SLOT="0"
59 +RESTRICT=""
60 +IUSE="ccache kernel_linux"
61 +
62 +DEPEND="app-text/asciidoc"
63 +RDEPEND="app-crypt/shash
64 + virtual/cdrtools
65 + x86? ( >=sys-boot/syslinux-3.72 )
66 + amd64? ( >=sys-boot/syslinux-3.72 )
67 + ccache? ( dev-util/ccache )
68 + ia64? ( sys-fs/dosfstools )
69 + kernel_linux? ( app-arch/lbzip2 app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )"
70 +
71 +pkg_setup() {
72 + if use ccache ; then
73 + einfo "Enabling ccache support for catalyst."
74 + else
75 + ewarn "By default, ccache support for catalyst is disabled."
76 + ewarn "If this is not what you intended,"
77 + ewarn "then you should add ccache to your USE."
78 + fi
79 + echo
80 + einfo "The template spec files are now installed by default. You can find"
81 + einfo "them under /usr/share/doc/${PF}/examples"
82 + einfo "and they are considered to be the authorative source of information"
83 + einfo "on catalyst."
84 + echo
85 + if [[ ${PV} == *9999* ]]; then
86 + ewarn "The ${EGIT_BRANCH:-master} branch (what you get with this ${PV} ebuild) contains"
87 + ewarn "work-in-progress code. Be aware that it's likely that it will not"
88 + ewarn "be in a working state at any given point. Please do not file bugs"
89 + ewarn "until you have posted on the gentoo-catalyst mailing list and we"
90 + ewarn "have asked you to do so."
91 + fi
92 + python_set_active_version 2
93 +}
94 +
95 +src_prepare() {
96 + python_convert_shebangs 2 catalyst modules/catalyst_lock.py
97 + epatch "${FILESDIR}"/${PN}-2.0.14-fbsd.patch
98 +}
99 +
100 +src_install() {
101 + insinto /usr/$(get_libdir)/${PN}
102 + exeinto /usr/$(get_libdir)/${PN}
103 + doexe catalyst || die "copying catalyst"
104 + if [[ ${PV} == 3.9999* ]]; then
105 + doins -r modules files || die "copying files"
106 + else
107 + doins -r arch modules livecd || die "copying files"
108 + fi
109 + for x in targets/*; do
110 + exeinto /usr/$(get_libdir)/${PN}/$x
111 + doexe $x/* || die "copying ${x}"
112 + done
113 + make_wrapper catalyst /usr/$(get_libdir)/${PN}/catalyst
114 + insinto /etc/catalyst
115 + doins files/catalyst.conf files/catalystrc || die "copying configuration"
116 + insinto /usr/share/doc/${PF}/examples
117 + doins examples/* || die
118 + dodoc README AUTHORS
119 + doman files/catalyst.1 files/catalyst-spec.5
120 + # Here is where we actually enable ccache
121 + use ccache && \
122 + dosed 's:options="autoresume kern:options="autoresume ccache kern:' \
123 + /etc/catalyst/catalyst.conf
124 + dosed "s:/usr/lib/catalyst:/usr/$(get_libdir)/catalyst:" \
125 + /etc/catalyst/catalyst.conf
126 +}
127 +
128 +pkg_postinst() {
129 + einfo "You can find more information about catalyst by checking out the"
130 + einfo "catalyst project page at:"
131 + einfo "http://www.gentoo.org/proj/en/releng/catalyst/index.xml"
132 + echo
133 +}
134
135 diff --git a/dev-util/catalyst/files/catalyst-2.0.14-fbsd.patch b/dev-util/catalyst/files/catalyst-2.0.14-fbsd.patch
136 new file mode 100644
137 index 0000000..56c8de6
138 --- /dev/null
139 +++ b/dev-util/catalyst/files/catalyst-2.0.14-fbsd.patch
140 @@ -0,0 +1,236 @@
141 +diff --git a/catalyst-2.0.14/arch/x86.py b/catalyst-2.0.14/arch/x86.py
142 +index 0391b79..2b67dba 100644
143 +--- a/catalyst-2.0.14/arch/x86.py
144 ++++ b/catalyst-2.0.14/arch/x86.py
145 +@@ -7,9 +7,12 @@ class generic_x86(builder.generic):
146 + def __init__(self,myspec):
147 + builder.generic.__init__(self,myspec)
148 + if self.settings["buildarch"]=="amd64":
149 +- if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"):
150 +- raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)"
151 +- self.settings["CHROOT"]="linux32 chroot"
152 ++ if os.uname()[0] == "Linux":
153 ++ if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"):
154 ++ raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)"
155 ++ self.settings["CHROOT"]="linux32 chroot"
156 ++ else:
157 ++ self.settings["CHROOT"]="chroot"
158 + self.settings["crosscompile"] = False;
159 + else:
160 + self.settings["CHROOT"]="chroot"
161 +diff --git a/catalyst-2.0.14/modules/catalyst_support.py b/catalyst-2.0.14/modules/catalyst_support.py
162 +index 316dfa3..a5ae52f 100644
163 +--- a/catalyst-2.0.14/modules/catalyst_support.py
164 ++++ b/catalyst-2.0.14/modules/catalyst_support.py
165 +@@ -108,7 +108,7 @@ contents_map={
166 + #"find" :[calc_contents,"find %(path)s"],
167 + "tar-tv":[calc_contents,"tar tvf %(file)s"],
168 + "tar-tvz":[calc_contents,"tar tvzf %(file)s"],
169 +- "tar-tvj":[calc_contents,"tar -I lbzip2 -tvf %(file)s"],
170 ++ "tar-tvj":[calc_contents,"tar tvjf %(file)s"],
171 + "isoinfo-l":[calc_contents,"isoinfo -l -i %(file)s"],
172 + # isoinfo-f should be a last resort only
173 + "isoinfo-f":[calc_contents,"isoinfo -f -i %(file)s"],
174 +diff --git a/catalyst-2.0.14/modules/generic_stage_target.py b/catalyst-2.0.14/modules/generic_stage_target.py
175 +index 848aca2..b81ccfc 100644
176 +--- a/catalyst-2.0.14/modules/generic_stage_target.py
177 ++++ b/catalyst-2.0.14/modules/generic_stage_target.py
178 +@@ -98,6 +98,14 @@ class generic_stage_target(generic_target):
179 + self.settings["crosscompile"]=(self.settings["hostarch"]!=\
180 + self.settings["buildarch"])
181 +
182 ++ """ FreeBSD's tar doesn't support -I lbzip2 option. """
183 ++ if os.uname()[0] == "Linux":
184 ++ self.settings["tar-cjpf"]="tar -I lbzip2 -cpf"
185 ++ self.settings["tar-xjpf"]="tar -I lbzip2 -xpf"
186 ++ else:
187 ++ self.settings["tar-cjpf"]="tar cjpf"
188 ++ self.settings["tar-xjpf"]="tar xjpf"
189 ++
190 + """ Call arch constructor, pass our settings """
191 + try:
192 + self.arch=self.subarchmap[self.settings["subarch"]](self.settings)
193 +@@ -654,10 +662,10 @@ class generic_stage_target(generic_target):
194 + self.settings["chroot_path"]+\
195 + " (This may take some time) ...\n"
196 + if "bz2" == self.settings["chroot_path"][-3:]:
197 +- unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
198 ++ unpack_cmd=self.settings["tar-xjpf"]+" "+self.settings["source_path"]+" -C "+\
199 + self.settings["chroot_path"]
200 + else:
201 +- unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
202 ++ unpack_cmd=self.settings["tar-xjpf"]+" "+self.settings["source_path"]+" -C "+\
203 + self.settings["chroot_path"]
204 + error_msg="Tarball extraction of "+\
205 + self.settings["source_path"]+" to "+\
206 +@@ -669,10 +677,10 @@ class generic_stage_target(generic_target):
207 + self.settings["chroot_path"]+\
208 + " (This may take some time) ...\n"
209 + if "bz2" == self.settings["chroot_path"][-3:]:
210 +- unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
211 ++ unpack_cmd=self.settings["tar-xjpf"]+" "+self.settings["source_path"]+" -C "+\
212 + self.settings["chroot_path"]
213 + else:
214 +- unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
215 ++ unpack_cmd=self.settings["tar-xjpf"]+" "+self.settings["source_path"]+" -C "+\
216 + self.settings["chroot_path"]
217 + error_msg="Tarball extraction of "+self.settings["source_path"]+\
218 + " to "+self.settings["chroot_path"]+" failed."
219 +@@ -771,7 +779,7 @@ class generic_stage_target(generic_target):
220 + "catalyst-hash")
221 + destdir=self.settings["snapshot_cache_path"]
222 + if "bz2" == self.settings["chroot_path"][-3:]:
223 +- unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
224 ++ unpack_cmd=self.settings["tar-xjpf"]+" "+self.settings["snapshot_path"]+" -C "+destdir
225 + else:
226 + unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir
227 + unpack_errmsg="Error unpacking snapshot"
228 +@@ -790,7 +798,7 @@ class generic_stage_target(generic_target):
229 + cleanup_msg=\
230 + "Cleaning up existing portage tree (This can take a long time)..."
231 + if "bz2" == self.settings["chroot_path"][-3:]:
232 +- unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
233 ++ unpack_cmd=self.settings["tar-xjpf"]+" "+self.settings["snapshot_path"]+" -C "+\
234 + self.settings["chroot_path"]+"/usr"
235 + else:
236 + unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\
237 +@@ -905,18 +913,18 @@ class generic_stage_target(generic_target):
238 + src=self.mountmap[x]
239 + if "SNAPCACHE" in self.settings and x == "/usr/portage":
240 + self.snapshot_lock_object.read_lock()
241 +- if os.uname()[0] == "FreeBSD":
242 +- if src == "/dev":
243 +- retval=os.system("mount -t devfs none "+\
244 +- self.settings["chroot_path"]+x)
245 +- else:
246 +- retval=os.system("mount_nullfs "+src+" "+\
247 ++ if src == "tmpfs":
248 ++ if "var_tmpfs_portage" in self.settings:
249 ++ retval=os.system("mount -t tmpfs -o size="+\
250 ++ self.settings["var_tmpfs_portage"]+"G "+src+" "+\
251 + self.settings["chroot_path"]+x)
252 + else:
253 +- if src == "tmpfs":
254 +- if "var_tmpfs_portage" in self.settings:
255 +- retval=os.system("mount -t tmpfs -o size="+\
256 +- self.settings["var_tmpfs_portage"]+"G "+src+" "+\
257 ++ if os.uname()[0] == "FreeBSD":
258 ++ if src == "/dev":
259 ++ retval=os.system("mount -t devfs none "+\
260 ++ self.settings["chroot_path"]+x)
261 ++ else:
262 ++ retval=os.system("mount_nullfs "+src+" "+\
263 + self.settings["chroot_path"]+x)
264 + else:
265 + retval=os.system("mount --bind "+src+" "+\
266 +@@ -1119,9 +1127,15 @@ class generic_stage_target(generic_target):
267 + if os.path.exists(self.settings["chroot_path"]+"/usr/local/portage"):
268 + cmd("rm -rf "+self.settings["chroot_path"]+"/usr/local/portage",\
269 + "Could not remove /usr/local/portage",env=self.env)
270 +- cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
271 +- "/etc/portage/make.conf",\
272 +- "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
273 ++ if os.path.exists(self.settings["chroot_path"]+"/etc/portage/make.conf"):
274 ++ if os.path.exists("/usr/bin/gsed"):
275 ++ cmd("gsed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
276 ++ "/etc/portage/make.conf",\
277 ++ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
278 ++ else:
279 ++ cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
280 ++ "/etc/portage/make.conf",\
281 ++ "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
282 +
283 + """ Clean up old and obsoleted files in /etc """
284 + if os.path.exists(self.settings["stage_path"]+"/etc"):
285 +@@ -1215,7 +1229,7 @@ class generic_stage_target(generic_target):
286 +
287 + print "Creating stage tarball..."
288 +
289 +- cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
290 ++ cmd(self.settings["tar-cjpf"]+" "+self.settings["target_path"]+" -C "+\
291 + self.settings["stage_path"]+" .",\
292 + "Couldn't create stage tarball",env=self.env)
293 +
294 +diff --git a/catalyst-2.0.14/modules/snapshot_target.py b/catalyst-2.0.14/modules/snapshot_target.py
295 +index e93a86a..a665b94 100644
296 +--- a/catalyst-2.0.14/modules/snapshot_target.py
297 ++++ b/catalyst-2.0.14/modules/snapshot_target.py
298 +@@ -50,8 +50,12 @@ class snapshot_target(generic_stage_target):
299 + self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env)
300 +
301 + print "Compressing Portage snapshot tarball..."
302 +- cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
303 +- "Snapshot creation failure",env=self.env)
304 ++ if os.uname()[0] == "Linux":
305 ++ cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
306 ++ "Snapshot creation failure",env=self.env)
307 ++ else:
308 ++ cmd("tar cjf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
309 ++ "Snapshot creation failure",env=self.env)
310 +
311 + self.gen_contents_file(self.settings["snapshot_path"])
312 + self.gen_digest_file(self.settings["snapshot_path"])
313 +diff --git a/catalyst-2.0.14/modules/stage1_target.py b/catalyst-2.0.14/modules/stage1_target.py
314 +index aa43926..3675bd5 100644
315 +--- a/catalyst-2.0.14/modules/stage1_target.py
316 ++++ b/catalyst-2.0.14/modules/stage1_target.py
317 +@@ -86,10 +86,15 @@ class stage1_target(generic_stage_target):
318 + # stage_path/proc probably doesn't exist yet, so create it
319 + if not os.path.exists(self.settings["stage_path"]+"/proc"):
320 + os.makedirs(self.settings["stage_path"]+"/proc")
321 ++ if not os.path.exists(self.settings["stage_path"]+"/dev"):
322 ++ os.makedirs(self.settings["stage_path"]+"/dev")
323 +
324 + # alter the mount mappings to bind mount proc onto it
325 + self.mounts.append("/tmp/stage1root/proc")
326 + self.mountmap["/tmp/stage1root/proc"]="/proc"
327 ++ if os.uname()[0] == "FreeBSD":
328 ++ self.mounts.append("/tmp/stage1root/dev")
329 ++ self.mountmap["/tmp/stage1root/dev"]="/dev"
330 +
331 + def register(foo):
332 + foo.update({"stage1":stage1_target})
333 +diff --git a/catalyst-2.0.14/targets/stage3/stage3-chroot.sh b/catalyst-2.0.14/targets/stage3/stage3-chroot.sh
334 +index 6cf9106..e96c7fd 100644
335 +--- a/catalyst-2.0.14/targets/stage3/stage3-chroot.sh
336 ++++ b/catalyst-2.0.14/targets/stage3/stage3-chroot.sh
337 +@@ -5,4 +5,11 @@ source /tmp/chroot-functions.sh
338 + ## START BUILD
339 + setup_pkgmgr
340 +
341 +-run_merge "-e @system"
342 ++if [[ $(uname) == "FreeBSD" ]] ; then
343 ++ # workaround fix bug 425530, 438112, 448256
344 ++ run_merge "-e @world --exclude=sys-apps/portage"
345 ++ run_merge "sys-apps/portage"
346 ++else
347 ++ run_merge "-e system"
348 ++fi
349 ++
350 +diff --git a/catalyst-2.0.14/targets/support/chroot-functions.sh b/catalyst-2.0.14/targets/support/chroot-functions.sh
351 +index 5c30537..848be40 100644
352 +--- a/catalyst-2.0.14/targets/support/chroot-functions.sh
353 ++++ b/catalyst-2.0.14/targets/support/chroot-functions.sh
354 +@@ -414,5 +414,22 @@ Comment=This is a link to the local copy of the Gentoo Linux Handbook.
355 + Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
356 + }
357 +
358 ++# GNU sed wrapper
359 ++sed(){
360 ++ if [ -e /usr/bin/gsed ]
361 ++ then
362 ++ /usr/bin/gsed "$@"
363 ++ elif [ -e /bin/sed ]
364 ++ then
365 ++ /bin/sed "$@"
366 ++ elif [ -e /usr/bin/sed ]
367 ++ then
368 ++ /usr/bin/sed "$@"
369 ++ else
370 ++ echo "ERROR: failed the selection of sed."
371 ++ exit 1
372 ++ fi
373 ++}
374 ++
375 + # We do this everywhere, so why not put it in this script
376 + run_default_funcs