Bug 159665 - [patch] ctm(1) does not work with bzip2 or xz compressed files.
Summary: [patch] ctm(1) does not work with bzip2 or xz compressed files.
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 23:40 UTC by Stephen Montgomery-Smith
Modified: 2018-02-08 16:53 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.48 KB, patch)
2011-08-10 23:40 UTC, Stephen Montgomery-Smith
no flags Details | Diff
patch-for-ctm-v07 (15.46 KB, text/plain; charset=UTF-8)
2012-12-17 03:59 UTC, Stephen Montgomery-Smith
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Montgomery-Smith freebsd_committer 2011-08-10 23:40:07 UTC
	
I run the CTM creation computers.  I would like to allow ctm to decompress bzip2'ed files and xz'ed files, as well as gzip'ed files.

Fix: Apply this patch to src/usr.sbin/ctm/ctm/.

Since xz isn't part of early versions of FreeBSD (e.g. FreeBSD 7.x), I have added a comment to the man page, and a helpful error message to ctm.c.
Comment 1 Roman Kurakin freebsd_committer 2012-01-18 13:41:29 UTC
State Changed
From-To: open->analyzed

I'll take care of it. 


Comment 2 Roman Kurakin freebsd_committer 2012-01-18 13:41:29 UTC
Responsible Changed
From-To: freebsd-bugs->rik

I'll take care of it.
Comment 3 emil.cazamir 2012-01-18 15:29:10 UTC
I have a comment about the message displayed to the user.

'which -s' won't find an executable file if $PATH does not include it's location:

[root@x] ~# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
[root@x] ~# mkdir ~/xbin
[root@x] ~# touch ~/xbin/sample_executable
[root@x] ~# chmod +x /xbin/sample_executable
[root@x] ~# rehash
[root@x] ~/xbin# which sample_executable
sample_executable: Command not found.
<add ~/xbin to $PATH>
[root@x] ~/xbin# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/root/xbin
[root@x] ~/xbin# which sample_executable
/root/xbin/sample_executable

I suggest adjusting the text for letting the user know xz is not in the search 
path or installed, instead of simply telling 'is not installed', which may not 
be true.

-- 
Best regards,

Emil Cazamir

--------------------------------------------------------------------------
Acest e-mail este confidential si poate contine informatii protejate prin
lege. Daca nu sunteti destinatarul de drept al mesajului, nu sunteti
autorizat sa cititi, imprimati, salvati, procesati sau sa divulgati acest
mesaj. Daca ati primit mesajul dintr-o eroare, va rugam sa informati
expeditorul cat mai curand posibil si sa stergeti acest e-mail, documentele
atasate si orice copii ale mesajului. Va multumim!

This e-mail is confidential and may also contain privileged information.
If you are not the intended recipient, you are not authorised to read, print,
save, process or disclose this message. If you have received this message by
mistake, please inform the sender immediately and delete this e-mail, its
attachments and any copies. Thank you!
Comment 4 Stephen Montgomery-Smith 2012-12-17 03:59:18 UTC
I didn't see the previous follow up until today.  That's why my reply is
11 months late.

So I made a mild modification to the error message if xz is not
installed.  If you don't like my mild modification, use whatever else
you would like to use, as long as it says the same thing.

But I also added a large number of other changes so that ctm can handle
the new ctm-svn-cur deltas.

You will also find this patch at
ftp://ftp.freebsd.org/pub/FreeBSD/CTM/svn-cur (you might have to wait
an hour or so after this email is sent until this patch appears on that
ftp site).
Comment 5 Stephen Montgomery-Smith 2012-12-17 04:32:39 UTC
Oops - I forgot to modify the error message if subversion isn't in the
path.  But something similar to when xz isn't found will do just fine.
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2013-07-03 01:50:32 UTC
State Changed
From-To: analyzed->analyzed

commit bit has been taken in for safekeeping. 


Comment 7 Mark Linimon freebsd_committer freebsd_triage 2013-07-03 01:50:32 UTC
Responsible Changed
From-To: rik->freebsd-bugs
Comment 8 jhs 2018-02-08 16:53:49 UTC
4 to 6 years on :-)
Please forget the old patches from same author, & instead commit 
stephen@missouri.edu 's latest patches, namely:
        ftp://ctm.berklix.org/pub/FreeBSD/development/CTM/svn-cur/
          16221 Nov 15  2014 patch-for-ctm-v09
            878 Sep 24  2012 patch-for-ctm_rmail
            583 Dec 25  2011 patch-for-ctm_smail
           8655 Nov 15  2014 patch-for-mkctm-v05

An easy, long awaited commit, these are addresses a
commiter can check back with if wanted:
  CTM User list:           <ctm-users@freebsd.org>
  CTM Orginal Author:      "Poul-Henning Kamp" <phk@freebsd.org>
  CTM diffs, gen & tools:  "Stephen Montgomery-Smith," <stephen@missouri.edu>
  CTM repository:          "Julian H. Stacey" <jhs@berklix.com>
  More URLs                http://berklix.org/ctm/