Nagy Karoly Gabriel
12 years ago
committed by
Christian Wiese
5 changed files with 254 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
|
# |
||||||
|
# Filename: package/.../altermime/altermime.conf |
||||||
|
# Copyright (C) 2013 The OpenSDE Project |
||||||
|
# |
||||||
|
# More information can be found in the files COPYING and README. |
||||||
|
# |
||||||
|
# This program is free software; you can redistribute it and/or modify |
||||||
|
# it under the terms of the GNU General Public License as published by |
||||||
|
# the Free Software Foundation; version 2 of the License. A copy of the |
||||||
|
# GNU General Public License can be found in the file COPYING. |
||||||
|
# --- SDE-COPYRIGHT-NOTE-END --- |
||||||
|
|
||||||
|
var_append makeinstopt " " "DESTDIR=$root/$bindir" |
@ -0,0 +1,38 @@ |
|||||||
|
[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||||
|
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
|
[COPY] |
||||||
|
[COPY] Filename: package/.../altermime/altermime.desc |
||||||
|
[COPY] Copyright (C) 2013 The OpenSDE Project |
||||||
|
[COPY] |
||||||
|
[COPY] More information can be found in the files COPYING and README. |
||||||
|
[COPY] |
||||||
|
[COPY] This program is free software; you can redistribute it and/or modify |
||||||
|
[COPY] it under the terms of the GNU General Public License as published by |
||||||
|
[COPY] the Free Software Foundation; version 2 of the License. A copy of the |
||||||
|
[COPY] GNU General Public License can be found in the file COPYING. |
||||||
|
[COPY] --- SDE-COPYRIGHT-NOTE-END --- |
||||||
|
|
||||||
|
[I] A small program which is used to alter your mime-encoded mailpacks |
||||||
|
|
||||||
|
[T] Altermime can: |
||||||
|
[T] Insert disclaimers |
||||||
|
[T] Insert arbitary X-headers |
||||||
|
[T] Modify existing headers |
||||||
|
[T] Remove attachments based on filename or content-type |
||||||
|
[T] Replace attachments based on filename |
||||||
|
|
||||||
|
|
||||||
|
[U] http://www.pldaniels.com/altermime |
||||||
|
|
||||||
|
[A] Paul L Daniels <pldaniels@pldaniels.com> |
||||||
|
[M] Nagy Karoly Gabriel <nagy.karoly@opensde.org> |
||||||
|
|
||||||
|
[C] extra/tool |
||||||
|
|
||||||
|
[L] BSD |
||||||
|
[S] Stable |
||||||
|
[V] 0.3.10 |
||||||
|
|
||||||
|
[P] X -----5---9 700.000 |
||||||
|
|
||||||
|
[D] 1521229141 altermime-0.3.10.tar.gz http://www.pldaniels.com/altermime/ |
@ -0,0 +1,63 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||||
|
#
|
||||||
|
# Filename: package/.../altermime/altermime.patch
|
||||||
|
# Copyright (C) 2013 The OpenSDE Project
|
||||||
|
#
|
||||||
|
# More information can be found in the files COPYING and README.
|
||||||
|
#
|
||||||
|
# This patch file is dual-licensed. It is available under the license the
|
||||||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||||||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||||
|
# of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||||
|
|
||||||
|
diff -Naur altermime-0.3.10/qpe.c altermime-0.3.10-new/qpe.c
|
||||||
|
--- ./qpe.c 2008-11-16 09:45:45.000000000 +0100
|
||||||
|
+++ ./qpe.c 2010-11-24 14:28:43.153334114 +0100
|
||||||
|
@@ -97,7 +97,7 @@
|
||||||
|
op+= strlen(paragraph);// +3; /** jump the output + =\r\n **/
|
||||||
|
out_remaining-= (strlen(paragraph)); // Was +3, updated to fix Outlook problems
|
||||||
|
|
||||||
|
- QPD fprintf(stdout, "Soft break (%d + %d > 76 char) for '%s'\n", current_line_length, charout_size, paragraph);
|
||||||
|
+ QPD fprintf(stdout, "Soft break (%zd + %d > 76 char) for '%s'\n", current_line_length, charout_size, paragraph);
|
||||||
|
|
||||||
|
/** reinitialize the paragraph **/
|
||||||
|
paragraph[0] = '\0';
|
||||||
|
@@ -108,7 +108,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
snprintf(pp, pp_remaining, "%s", charout);
|
||||||
|
- QPD fprintf(stdout,"charout='%s', size=%d, pp_remain=%d result='%s'\n", charout, charout_size, pp_remaining, paragraph);
|
||||||
|
+ QPD fprintf(stdout,"charout='%s', size=%d, pp_remain=%zd result='%s'\n", charout, charout_size, pp_remaining, paragraph);
|
||||||
|
pp += charout_size;
|
||||||
|
pp_remaining -= charout_size;
|
||||||
|
p++;
|
||||||
|
@@ -149,13 +149,13 @@
|
||||||
|
out_size = in_size *3;
|
||||||
|
in_buffer = malloc( sizeof(char) *in_size +1);
|
||||||
|
if (in_buffer == NULL) {
|
||||||
|
- QPD fprintf(stdout,"Error allocating %d bytes for input buffer\n", in_size);
|
||||||
|
+ QPD fprintf(stdout,"Error allocating %zd bytes for input buffer\n", in_size);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
out_buffer = malloc( sizeof(char) *out_size *3 +1);
|
||||||
|
if (in_buffer == NULL) {
|
||||||
|
- QPD fprintf(stdout,"Error allocating %d bytes for output buffer\n", out_size);
|
||||||
|
+ QPD fprintf(stdout,"Error allocating %zd bytes for output buffer\n", out_size);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -169,7 +169,7 @@
|
||||||
|
** we segfault ;) **/
|
||||||
|
*(in_buffer +in_size) = '\0';
|
||||||
|
|
||||||
|
- QPD fprintf(stdout,"file %s is loaded, size = %d\n", fname, in_size);
|
||||||
|
+ QPD fprintf(stdout,"file %s is loaded, size = %zd\n", fname, in_size);
|
||||||
|
|
||||||
|
qp_encode( out_buffer, out_size, in_buffer, in_size );
|
||||||
|
|
||||||
|
|
@ -0,0 +1,101 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||||
|
#
|
||||||
|
# Filename: package/.../altermime/fix-unused-but-set-variables.patch
|
||||||
|
# Copyright (C) 2013 The OpenSDE Project
|
||||||
|
#
|
||||||
|
# More information can be found in the files COPYING and README.
|
||||||
|
#
|
||||||
|
# This patch file is dual-licensed. It is available under the license the
|
||||||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||||||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||||
|
# of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||||
|
|
||||||
|
Description: Fix compiler warnings for 'unused-but-set-variable' causing FTBFS with -Werror and GCC 4.6
|
||||||
|
Author: Julien Valroff <julien@debian.org>
|
||||||
|
Bug-Debian: http://bugs.debian.org/625307
|
||||||
|
|
||||||
|
--- ./MIME_headers.c
|
||||||
|
+++ ./MIME_headers.c
|
||||||
|
@@ -1081,12 +1081,10 @@
|
||||||
|
int linesize=0;
|
||||||
|
int totalsize_original=0;
|
||||||
|
int result = 0;
|
||||||
|
- int firstline = 1;
|
||||||
|
int search_count=0;
|
||||||
|
char *tmp;
|
||||||
|
char *tmp_original;
|
||||||
|
char *fget_result = NULL;
|
||||||
|
- char *headerline_end;
|
||||||
|
char *p;
|
||||||
|
char *linestart;
|
||||||
|
char *lineend;
|
||||||
|
@@ -1184,7 +1182,6 @@
|
||||||
|
glb.headerline = tmp;
|
||||||
|
totalsize = linesize;
|
||||||
|
PLD_strncpy(glb.headerline, linestart, (linesize +1));
|
||||||
|
- headerline_end = glb.headerline +totalsize;
|
||||||
|
} // If the global headerline is currently NULL
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -1271,7 +1268,6 @@
|
||||||
|
FFGET_SDL_MODE = 0;
|
||||||
|
} // FFGET_doubleCR test
|
||||||
|
|
||||||
|
- firstline = 0;
|
||||||
|
} // While reading more headers from the source file.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2724,13 +2720,13 @@
|
||||||
|
{
|
||||||
|
/** scan through our headers string looking for information that is
|
||||||
|
** valid **/
|
||||||
|
- char *safeh, *h, *safehl;
|
||||||
|
+ char *h, *safehl;
|
||||||
|
char *current_header_position;
|
||||||
|
int headerlength;
|
||||||
|
|
||||||
|
if (MIMEH_DNORMAL) LOGGER_log("%s:%d:MIMEH_parse_headers:DEBUG: Start [hinfo=%p]\n",FL, hinfo);
|
||||||
|
|
||||||
|
- safeh = h = headers;
|
||||||
|
+ h = headers;
|
||||||
|
|
||||||
|
/** Duplicate the headers for processing - this way we don't 'taint' the
|
||||||
|
** original headers during our searching / altering. **/
|
||||||
|
--- ./mime_alter.c
|
||||||
|
+++ ./mime_alter.c
|
||||||
|
@@ -2432,7 +2432,6 @@
|
||||||
|
char mpackold[AM_1K_BUFFER_SIZE+1]="";
|
||||||
|
struct AM_disclaimer_details dd;
|
||||||
|
int result = 0;
|
||||||
|
- int segment_read = 0;
|
||||||
|
|
||||||
|
/* create our temp filename */
|
||||||
|
snprintf(mpacktmp,AM_1K_BUFFER_SIZE, "%s.tmp",mpackname);
|
||||||
|
@@ -2623,7 +2622,6 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
- segment_read = 0;
|
||||||
|
if (FFGET_feof(&f)) break;
|
||||||
|
|
||||||
|
// If we've found a boundary and a text content section...
|
||||||
|
@@ -3698,7 +3696,6 @@
|
||||||
|
int AM_attachment_replace_recurse( struct MIMEH_header_info *hinfo, FFGET_FILE *f, FILE *outputfile, regex_t *preg, char *new_attachment_name, int iteration )
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
- int boundary_exists=0;
|
||||||
|
size_t bc;
|
||||||
|
|
||||||
|
if (AM_DNORMAL) LOGGER_log("%s:%d:AM_attachment_replace_recurse:DEBUG: Starting: iteration=%d",FL, iteration );
|
||||||
|
@@ -3776,7 +3773,6 @@
|
||||||
|
{
|
||||||
|
if (AM_DNORMAL)LOGGER_log("%s:%d:AM_attachment_replace_recurse:DEBUG: pushing BS='%s'",FL, hinfo->boundary );
|
||||||
|
BS_push( hinfo->boundary );
|
||||||
|
- boundary_exists = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now, determine if this block/segment is the one which contains our file which we must 'nullify'
|
@ -0,0 +1,37 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||||
|
#
|
||||||
|
# Filename: package/.../altermime/makefile-destdir.patch
|
||||||
|
# Copyright (C) 2013 The OpenSDE Project
|
||||||
|
#
|
||||||
|
# More information can be found in the files COPYING and README.
|
||||||
|
#
|
||||||
|
# This patch file is dual-licensed. It is available under the license the
|
||||||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||||||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||||
|
# of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||||
|
|
||||||
|
Description: Adds ${DESTDIR} variable to Makefile
|
||||||
|
Author: Julien Valroff <julien@debian.org>
|
||||||
|
Forwarded: not-needed
|
||||||
|
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -25,11 +25,11 @@
|
||||||
|
# Build Install
|
||||||
|
install: altermime
|
||||||
|
strip altermime
|
||||||
|
- cp altermime /usr/local/bin
|
||||||
|
- chmod a+rx /usr/local/bin/altermime
|
||||||
|
+ cp altermime ${DESTDIR}
|
||||||
|
+ chmod a+rx ${DESTDIR}/altermime
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
- rm -f /usr/local/bin/altermime
|
||||||
|
+ rm -f ${DESTDIR}/altermime
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o altermime
|
Loading…
Reference in new issue