diff options
author | Stefan Eßer <se@FreeBSD.org> | 2018-12-23 07:19:01 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2018-12-23 07:19:01 +0000 |
commit | 4d6c49aae2f811fa43af5c75bdedd7e2527846ad (patch) | |
tree | e9e9ae9cf9f01b03e20dbf78c8b1db5ceba723a7 /misc/ctm/files/patch-ctm_ctm.c | |
parent | Update to the lastest MIT krb5 github commit. (diff) |
Apply changes developed by Stephen Montgomery-Smith and required to
actually use CTM to distribute FreeBSD updates. They have been further
refined by Julian H. Stacey.
These changes add support for delta numbers with more than 5 digits
and better compression formats.
Submitted by: Stephen Montgomery-Smith, Julian H. Stacey
Approved by: antoine (implicit)
Notes
Notes:
svn path=/head/; revision=488168
Diffstat (limited to 'misc/ctm/files/patch-ctm_ctm.c')
-rw-r--r-- | misc/ctm/files/patch-ctm_ctm.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/misc/ctm/files/patch-ctm_ctm.c b/misc/ctm/files/patch-ctm_ctm.c new file mode 100644 index 000000000000..f586f430c4e2 --- /dev/null +++ b/misc/ctm/files/patch-ctm_ctm.c @@ -0,0 +1,25 @@ +--- ctm/ctm.c.orig 2018-10-27 15:56:22 UTC ++++ ctm/ctm.c +@@ -213,6 +213,22 @@ Proc(char *filename, unsigned applied) + strcat(p,filename); + f = popen(p,"r"); + if(!f) { warn("%s", p); return Exit_Garbage; } ++ } else if(p && !strcmp(p,".bz2")) { ++ p = alloca(20 + strlen(filename)); ++ strcpy(p,"bzcat < "); ++ strcat(p,filename); ++ f = popen(p,"r"); ++ if(!f) { warn("%s", p); return Exit_Garbage; } ++ } else if(p && !strcmp(p,".xz")) { ++ if (system("which -s xz") != 0) { ++ fprintf(stderr, "xz is not found in $PATH. You can install it from ports, or adjust $PATH.\n"); ++ return Exit_Garbage; ++ } ++ p = alloca(20 + strlen(filename)); ++ strcpy(p,"xz -dc < "); ++ strcat(p,filename); ++ f = popen(p,"r"); ++ if(!f) { warn("%s", p); return Exit_Garbage; } + } else { + p = 0; + f = fopen(filename,"r"); |