Closed Bug 369517 Opened 19 years ago Closed 19 years ago

for portability, tr_install.pl should use Text::Patch instead of patch command

Categories

(Testopia :: General, enhancement)

x86
Other
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: uspoerlein, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.0.5) Gecko/20060816 Firefox/1.5.0.5 Build Identifier: testopia-1.1.3 Hi, I'm trying to set up Bugzilla 2.22.1 + Testopia 1.1.3 on a FreeBSD system. tr_install.pl will fail in three places, since it is assumeing a newer patch version. 1. The test for 'patch -v' fails, as the FreeBSD version prints a single line on STDERR. Simple workaround for this is to use 'patch -v 2>&1' instead. 2. The second bumper is the --dry-run option. FreeBSD patch uses -C for this. 3. The actual patching will fail, too. There is no -z option on FreeBSD's patch and -b is different please refer to the manpage, to see which options do apply: http://www.freebsd.org/cgi/man.cgi?query=patch Reproducible: Always Steps to Reproduce: 1. Install FreeBSD 6.2 2. Try to install Testopia
We have no freebsd machines to test with. If you're willing and able, please attach a tr_install fix for freebsd that doesn't break other operating systems. If not, we'll need to leave this bug open for someone else to pick up.
Assignee: ghendricks → nobody
Due to time constraints I can't work on a truly portable solution, so let this be a FYI for other FreeBSD users trying to install Bugzilla/Testopia Since I need to patch the install script on the fly, I used the following sed(1) command. This should make it work on pretty much every FreeBSD-Installation out there: sed -e 's/patchPath -v`/patchPath -v 2>\&1`/' \ -e 's/patchPath -s -l --dry-run -bp 2/patchPath --quiet -l -C -p2/' \ -e 's/patchPath -s -l -z .orig -bp 2/patchPath --quiet -l -p2/' \ tr_install.pl.orig > tr_install.pl This will of course break Linux systems, as the --dry-run/-C flags conflict and -b has a different meaning. Ideally, you could use a Perlmodule 'Patch', that can provide a truly portable way of patching the bugzilla source. This would also remove the need to check for a Win32 patch.exe. (I don't know if such a module exists) In other news: Testopia, as installed by me, required two additional perl modules to work. These modules are not installed along the perl-5.8.8 port I'm using, nor does testopia check for their existance! You should at least document them in the manual as requirements ... darn! I see that Text::Diff is actually mentiond there, but the JSON module is not listed.
(In reply to comment #2) > In other news: Testopia, as installed by me, required two additional perl > modules to work. These modules are not installed along the perl-5.8.8 port I'm > using, nor does testopia check for their existance! You should at least > document them in the manual as requirements ... darn! I see that Text::Diff is > actually mentiond there, but the JSON module is not listed. I agree -- the manual is out of date -- sigh. I'm updating http://wiki.mozilla.org/Testopia:README#Requirements to mention these perl modules. Both Text::Diff and JSON are enforced as requirements in the (patched) checksetup.pl. According to http://wiki.mozilla.org/Testopia:README#Installation you're supposed to run checksetup after tr_install. Your suggestion to use http://search.cpan.org/~cade/Text-Patch-1.2/Patch.pm is excellent, btw.
Summary: tr_install.pl: Not working on FreeBSD, due to different patch(1) version → for portability, tr_install.pl should use Text::Patch instead of patch command
Severity: normal → enhancement
tr_install no longer exists (as of Testopia 1.3).
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
Assignee: nobody → nobody
You need to log in before you can comment on or make changes to this bug.