diff -Nru arj-3.10.22/debian/changelog arj-3.10.22/debian/changelog --- arj-3.10.22/debian/changelog 2011-02-28 03:53:53.000000000 +0000 +++ arj-3.10.22/debian/changelog 2013-05-10 03:10:21.000000000 +0000 @@ -1,3 +1,21 @@ +arj (3.10.22-11) unstable; urgency=low + + * Now using Standards-Version 3.9.4 (no changes needed). + * Set the static const intergrity_identifier variable as volatile instead + of building the file with -O0 to avoid the compiler optimizing it away, + so that we can use standard flags everywhere. + * Fix clean target by checking existence of GNUmakefile instead of Makefile. + * Fix build failure on GNU/Hurd, by handling unimplemented fcntl(F_GETLK). + * Fix upstream build system to honour CPPFLAGS and LDFLAGS. + * Fix format security errors. + * Switch to use dpkg-buildflags to set CPPFLAGS, CFLAGS and LDFLAGS, + thus enabling hardening flags. (Closes: #673479) + * Support nostrip build option, by changing the upstrem build system to + optionally strip the binaries after the linking stage and before their + preprocessing. (Closes: #436473) + + -- Guillem Jover Fri, 10 May 2013 05:01:06 +0200 + arj (3.10.22-10) unstable; urgency=low * Fix build failure on GNU/Hurd due to missing -ldl, by adding “gnu*” to diff -Nru arj-3.10.22/debian/control arj-3.10.22/debian/control --- arj-3.10.22/debian/control 2011-02-28 03:53:52.000000000 +0000 +++ arj-3.10.22/debian/control 2013-05-09 13:05:51.000000000 +0000 @@ -7,7 +7,7 @@ Vcs-Browser: http://git.hadrons.org/?p=debian/pkgs/arj.git Vcs-Git: git://git.hadrons.org/git/debian/pkgs/arj.git Build-Depends: debhelper (>= 7), autotools-dev, autoconf -Standards-Version: 3.9.1 +Standards-Version: 3.9.4 Package: arj Architecture: any diff -Nru arj-3.10.22/debian/patches/002_no_remove_static_const.patch arj-3.10.22/debian/patches/002_no_remove_static_const.patch --- arj-3.10.22/debian/patches/002_no_remove_static_const.patch 2009-03-22 22:24:32.000000000 +0000 +++ arj-3.10.22/debian/patches/002_no_remove_static_const.patch 2013-05-10 03:09:29.000000000 +0000 @@ -1,20 +1,15 @@ -Index: b/gnu/makefile.in -=================================================================== ---- a/gnu/makefile.in 2004-04-17 14:28:06.000000000 +0300 -+++ b/gnu/makefile.in 2008-06-16 08:25:42.000000000 +0300 -@@ -192,6 +192,15 @@ timestamp: $(TOOLS_DIR)/today$x - dispose: - - # -+# XXX: Do not use -O2, it removes the static const variable with gcc 4.x -+# -+ -+INTEGR_DIRS = $(ARJ_DIR) $(REARJ_DIR) $(ARJCRYPT_DIR) $(REGISTER_DIR) -+ -+$(patsubst %,%/integr.o, $(INTEGR_DIRS)): $(SRC_DIR)/integr.c -+ $(CC) -Wall -g -c -o$@ $< -+ -+# - # The tools - # +--- + integr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/integr.c ++++ b/integr.c +@@ -5,7 +5,7 @@ + * + */ +-static const char intergrity_identifier[] = { ++static volatile const char intergrity_identifier[] = { + 0xB0, 0x03, 0xB0, 0x02, 0xB0, 0x03, + 0xB0, 0x04, 0xB0, 0x05, + 0x90, 0x90, 0x90, 0x90, diff -Nru arj-3.10.22/debian/patches/004_parallel_build.patch arj-3.10.22/debian/patches/004_parallel_build.patch --- arj-3.10.22/debian/patches/004_parallel_build.patch 2009-03-22 22:24:32.000000000 +0000 +++ arj-3.10.22/debian/patches/004_parallel_build.patch 2013-05-10 03:09:29.000000000 +0000 @@ -1,7 +1,9 @@ -Index: b/gnu/makefile.in -=================================================================== ---- a/gnu/makefile.in 2008-06-16 08:25:42.000000000 +0300 -+++ b/gnu/makefile.in 2008-06-16 08:25:45.000000000 +0300 +--- + gnu/makefile.in | 74 +++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 44 insertions(+), 30 deletions(-) + +--- a/gnu/makefile.in ++++ b/gnu/makefile.in @@ -159,13 +159,15 @@ $(SFXSTUB_DIR)/%.o: $(SRC_DIR)/%.c # Main dependency tree # @@ -60,10 +62,10 @@ -dispose: - -# - # XXX: Do not use -O2, it removes the static const variable with gcc 4.x + # The tools # -@@ -264,7 +280,7 @@ $(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_O +@@ -255,7 +271,7 @@ $(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_O $(CC) $(ALL_CFLAGS) $(DLL_FLAGS) -o $@ $(ARJCRYPT_OBJS) $(ARJCRYPT_DEF) $(LIBS) $(TOOLS_DIR)/postproc $@ @@ -72,7 +74,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_crp $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -278,7 +294,7 @@ $(SFXSTUB_DIR)/sfxstub$x: $(SFXSTUB_OBJS +@@ -269,7 +285,7 @@ $(SFXSTUB_DIR)/sfxstub$x: $(SFXSTUB_OBJS $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(SFXSTUB_OBJS) $(LIBS) $(TOOLS_DIR)/postproc$x $@ -sfx @@ -81,7 +83,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_stb $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -296,7 +312,8 @@ $(ARJSFXV_DIR)/arjsfxv$x: $(ARJSFXV_OBJS +@@ -287,7 +303,8 @@ $(ARJSFXV_DIR)/arjsfxv$x: $(ARJSFXV_OBJS $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXV_OBJS) $(LIBS) $(DYN_LIBS) $(TOOLS_DIR)/postproc$x $@ -sfx @@ -91,7 +93,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_sfv $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -313,7 +330,8 @@ $(ARJSFX_DIR)/arjsfx$x: $(ARJSFX_OBJS) $ +@@ -304,7 +321,8 @@ $(ARJSFX_DIR)/arjsfx$x: $(ARJSFX_OBJS) $ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFX_OBJS) $(LIBS) $(TOOLS_DIR)/postproc$x $@ -sfx @@ -101,7 +103,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_sfx $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -328,7 +346,8 @@ $(ARJSFXJR_DIR)/arjsfxjr$x: $(ARJSFXJR_O +@@ -319,7 +337,8 @@ $(ARJSFXJR_DIR)/arjsfxjr$x: $(ARJSFXJR_O $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXJR_OBJS) $(LIBS) $(TOOLS_DIR)/postproc$x $@ -sfx @@ -111,7 +113,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_sfj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -363,7 +382,8 @@ $(ARJ_DIR)/arj$x: $(ARJ_OBJS) \ +@@ -354,7 +373,8 @@ $(ARJ_DIR)/arj$x: $(ARJ_OBJS) \ $(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(BASEDIR)/help.arj $(TOOLS_DIR)/postproc $@ @@ -121,7 +123,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_arj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -381,7 +401,8 @@ $(REARJ_DIR)/rearj$x: $(REARJ_OBJS) \ +@@ -372,7 +392,8 @@ $(REARJ_DIR)/rearj$x: $(REARJ_OBJS) \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REARJ_OBJS) $(LIBS) $(TOOLS_DIR)/postproc $@ @@ -131,7 +133,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_rej $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -397,7 +418,8 @@ $(REGISTER_DIR)/$(REGISTER)$x: $(REGISTE +@@ -388,7 +409,8 @@ $(REGISTER_DIR)/$(REGISTER)$x: $(REGISTE $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REGISTER_OBJS) $(LIBS) $(TOOLS_DIR)/postproc $@ -sfx @@ -141,7 +143,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_reg $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -411,7 +433,8 @@ ARJDISP_OBJS = $(patsubst %,$(ARJDISP_DI +@@ -402,7 +424,8 @@ ARJDISP_OBJS = $(patsubst %,$(ARJDISP_DI $(ARJDISP_DIR)/arjdisp$x: $(ARJDISP_OBJS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJDISP_OBJS) $(LIBS) @@ -151,7 +153,7 @@ $(TOOLS_DIR)/msgbind $(RESFILE) msg_adi $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) # -@@ -436,18 +459,9 @@ prepare: +@@ -427,18 +450,9 @@ prepare: # clean: diff -Nru arj-3.10.22/debian/patches/gnu_build_flags.patch arj-3.10.22/debian/patches/gnu_build_flags.patch --- arj-3.10.22/debian/patches/gnu_build_flags.patch 1970-01-01 00:00:00.000000000 +0000 +++ arj-3.10.22/debian/patches/gnu_build_flags.patch 2013-05-10 03:10:20.000000000 +0000 @@ -0,0 +1,38 @@ +--- + gnu/makefile.in | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/gnu/makefile.in ++++ b/gnu/makefile.in +@@ -56,7 +56,7 @@ DEBUG_SM = r + ADD_LDFLAGS = -s @LD_STRIP@ + endif + +-ALL_CFLAGS += $(CFLAGS) ++ALL_CFLAGS += @CPPFLAGS@ $(CPPFLAGS) @CFLAGS@ $(CFLAGS) + + # Build Installation paths + +@@ -80,11 +80,11 @@ SFXSTUB_DIR = $(BASEDIR)/sfxstub + # Definitions for compiling submodules + + LDFLAGS = @LDFLAGS@ $(ADD_LDFLAGS) +-DLL_FLAGS = @DLL_FLAGS@ $(ADD_LDFLAGS) ++DLL_FLAGS = @DLL_FLAGS@ $(LDFLAGS) + DLL_CFLAGS = @DLL_CFLAGS@ + REQUIRES_DEF = @REQUIRES_DEF@ + +-COPT = -c -I@OUT_DIR@ -I$(BASEDIR) -I$(SRC_DIR) @CFLAGS@ $(ALL_CFLAGS) ++COPT = -c -I@OUT_DIR@ -I$(BASEDIR) -I$(SRC_DIR) $(ALL_CFLAGS) + STD_COPT = -DARJUTIL $(COPT) + ARJ_COPT = -DSFL=4 $(COPT) + ARJSFXV_COPT = -DSFL=3 $(COPT) +@@ -189,7 +190,7 @@ msg-headers: $(MSG_HEADERS) + mkdir -p $@ + + .deps/%.d: %.c .deps +- $(CC) $(CPPFLAGS) $(COPT) $< -MM > $@ ++ $(CC) $(COPT) $< -MM > $@ + + SOURCES = $(wildcard *.c) + DEPS = $(addprefix .deps/,$(SOURCES:.c=.d)) diff -Nru arj-3.10.22/debian/patches/gnu_build_strip.patch arj-3.10.22/debian/patches/gnu_build_strip.patch --- arj-3.10.22/debian/patches/gnu_build_strip.patch 1970-01-01 00:00:00.000000000 +0000 +++ arj-3.10.22/debian/patches/gnu_build_strip.patch 2013-05-10 03:10:21.000000000 +0000 @@ -0,0 +1,96 @@ +--- + gnu/makefile.in | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +--- a/gnu/makefile.in ++++ b/gnu/makefile.in +@@ -50,10 +50,15 @@ endif + + ifdef DEBUG + DEBUG_SM = d +-ALL_CFLAGS += -g -DDEBUG ++ALL_CFLAGS += -DDEBUG + else + DEBUG_SM = r +-ADD_LDFLAGS = -s @LD_STRIP@ ++endif ++ ++ifdef BUILD_STRIP ++STRIP = strip --strip-unneeded ++else ++STRIP = : + endif + + ALL_CFLAGS += @CPPFLAGS@ $(CPPFLAGS) @CFLAGS@ $(CFLAGS) +@@ -269,6 +274,7 @@ ARJCRYPT_OBJS = $(patsubst %,$(ARJCRYPT_ + + $(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_OBJS) $(TOOLS_DIR)/postproc$x + $(CC) $(ALL_CFLAGS) $(DLL_FLAGS) -o $@ $(ARJCRYPT_OBJS) $(ARJCRYPT_DEF) $(LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/postproc $@ + + $(BASEDIR)/nmsg_crp.c $(BASEDIR)/msg_crp.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) +@@ -283,6 +289,7 @@ SFXSTUB_OBJS = $(patsubst %,$(SFXSTUB_DI + + $(SFXSTUB_DIR)/sfxstub$x: $(SFXSTUB_OBJS) $(TOOLS_DIR)/postproc$x + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(SFXSTUB_OBJS) $(LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/postproc$x $@ -sfx + + $(BASEDIR)/nmsg_stb.c $(BASEDIR)/msg_stb.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) +@@ -301,6 +308,7 @@ ARJSFXV_OBJS = $(patsubst %,$(ARJSFXV_DI + + $(ARJSFXV_DIR)/arjsfxv$x: $(ARJSFXV_OBJS) $(TOOLS_DIR)/postproc$x + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXV_OBJS) $(LIBS) $(DYN_LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/postproc$x $@ -sfx + + $(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c \ +@@ -319,6 +327,7 @@ ARJSFX_OBJS = $(patsubst %,$(ARJSFX_DIR) + + $(ARJSFX_DIR)/arjsfx$x: $(ARJSFX_OBJS) $(TOOLS_DIR)/postproc$x + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFX_OBJS) $(LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/postproc$x $@ -sfx + + $(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c \ +@@ -335,6 +344,7 @@ ARJSFXJR_OBJS = $(patsubst %,$(ARJSFXJR_ + + $(ARJSFXJR_DIR)/arjsfxjr$x: $(ARJSFXJR_OBJS) $(TOOLS_DIR)/postproc$x + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXJR_OBJS) $(LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/postproc$x $@ -sfx + + $(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c \ +@@ -364,6 +374,7 @@ $(ARJ_DIR)/arj$x: $(ARJ_OBJS) \ + $(ARJSFX_DIR)/arjsfx$x \ + $(ARJSFXJR_DIR)/arjsfxjr$x + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJ_OBJS) $(LIBS) $(DYN_LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(ARJSFXJR_DIR)/arjsfxjr$x + $(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(ARJSFX_DIR)/arjsfx$x + $(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(ARJSFXV_DIR)/arjsfxv$x +@@ -390,6 +401,7 @@ REARJ_OBJS = $(patsubst %,$(REARJ_DIR)/% + $(REARJ_DIR)/rearj$x: $(REARJ_OBJS) \ + $(TOOLS_DIR)/postproc$x + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REARJ_OBJS) $(LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/postproc $@ + + $(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c \ +@@ -407,6 +419,7 @@ REGISTER_OBJS = $(patsubst %,$(REGISTER_ + $(REGISTER_DIR)/$(REGISTER)$x: $(REGISTER_OBJS) \ + $(TOOLS_DIR)/postproc$x + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REGISTER_OBJS) $(LIBS) ++ $(STRIP) $@ + $(TOOLS_DIR)/postproc $@ -sfx + + $(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c \ +@@ -423,6 +436,7 @@ ARJDISP_OBJS = $(patsubst %,$(ARJDISP_DI + + $(ARJDISP_DIR)/arjdisp$x: $(ARJDISP_OBJS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJDISP_OBJS) $(LIBS) ++ $(STRIP) $@ + + $(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c \ + $(BASEDIR)/msg_adi.h: $(TOOLS_DIR)/msgbind$x $(RESFILE) diff -Nru arj-3.10.22/debian/patches/hurd_no_fcntl_getlk.patch arj-3.10.22/debian/patches/hurd_no_fcntl_getlk.patch --- arj-3.10.22/debian/patches/hurd_no_fcntl_getlk.patch 1970-01-01 00:00:00.000000000 +0000 +++ arj-3.10.22/debian/patches/hurd_no_fcntl_getlk.patch 2013-05-10 03:10:20.000000000 +0000 @@ -0,0 +1,16 @@ +--- + environ.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/environ.c ++++ b/environ.c +@@ -1775,7 +1775,8 @@ int file_test_access(char *name) + memset(&flk, 0, sizeof(flk)); + rc=fcntl(handle, F_GETLK, &flk); + close(handle); +- return(((rc==-1&&errno!=EINVAL)||(rc!=1&&flk.l_type==F_RDLCK))?-1:0); ++ return(((rc==-1&&errno!=EINVAL&&errno!=ENOSYS)|| ++ (rc!=1&&flk.l_type==F_RDLCK))?-1:0); + #endif + } + #endif diff -Nru arj-3.10.22/debian/patches/security_format.patch arj-3.10.22/debian/patches/security_format.patch --- arj-3.10.22/debian/patches/security_format.patch 1970-01-01 00:00:00.000000000 +0000 +++ arj-3.10.22/debian/patches/security_format.patch 2013-05-10 03:10:20.000000000 +0000 @@ -0,0 +1,302 @@ +--- + arj_arcv.c | 12 ++++++------ + arj_user.c | 8 ++++---- + arjdisp.c | 58 ++++++++++++++++++++++++++++------------------------------ + arjsfx.c | 2 +- + fardata.c | 10 +++++----- + rearj.c | 2 +- + register.c | 2 +- + 7 files changed, 46 insertions(+), 48 deletions(-) + +--- a/fardata.c ++++ b/fardata.c +@@ -52,7 +52,7 @@ int error_proc(FMSG *errmsg, ...) + /* Check if the message could have a standard error code */ + if(errno!=0&&is_std_error(errmsg)) + { +- msg_cprintf(0, lf); ++ msg_cprintf(0, "\n"); + error_report(); + } + #endif +@@ -379,10 +379,10 @@ static void flush_cbuf(int ccode, char * + { + #if SFX_LEVEL>=ARJSFXV + fprintf(new_stdout, strform, n_text); +- fprintf(new_stdout, lf); ++ fprintf(new_stdout, "\n"); + #else + printf(strform, n_text); +- printf(lf); ++ printf("\n"); + #endif + } + else +@@ -393,13 +393,13 @@ static void flush_cbuf(int ccode, char * + #ifdef NEED_CRLF + scr_out("\r"); + #endif +- scr_out(lf); ++ scr_out("\n"); + } + if(!no_colors) + textcolor(color_table[ccode&H_COLORMASK].color); + #else + printf(strform, n_text); +- printf(lf); ++ printf("\n"); + #endif + n_text=t_text+1; + #if SFX_LEVEL>=ARJ +--- a/arj_user.c ++++ b/arj_user.c +@@ -1059,7 +1059,7 @@ static void finish_processing(int cmd) + if(recover_file(tmp_archive_name, nullstr, tmp_tmp_filename, protected, eof_pos)) + { + msg_cprintf(H_HL, M_CANT_FIND_DAMAGE, archive_name); +- printf(lf); ++ printf("\n"); + } + else + { +@@ -1294,7 +1294,7 @@ static void finish_processing(int cmd) + if(recover_file(archive_name, nullstr, nullstr, protected, eof_pos)) + { + msg_cprintf(H_HL, M_CANT_FIND_DAMAGE, archive_name); +- printf(lf); ++ printf("\n"); + } + else + { +@@ -1327,7 +1327,7 @@ static void finish_processing(int cmd) + msg_cprintf(0, M_CHAPTERS_ON); + else if(chapter_mode==CHAP_REMOVE) + msg_cprintf(0, M_CHAPTERS_OFF); +- msg_cprintf(0, strform, lf); ++ msg_cprintf(0, strform, "\n"); + } + if(cmd==ARJ_CMD_COPY&&protfile_option&&!arjprot_tail) + msg_cprintf(0, M_ARJPROT_DISABLED); +@@ -2303,7 +2303,7 @@ void process_archive() + timestamp_to_str(timetext, &ftime_stamp); + msg_cprintf(H_HL|H_NFMT, M_ARCHIVE_CREATED, timetext); + if(show_ansi_comments) +- printf(cmt_ptr); ++ fputs(cmt_ptr, stdout); + else + display_comment(cmt_ptr); + /* The sfx_setup() occurs here */ +--- a/arj_arcv.c ++++ b/arj_arcv.c +@@ -913,13 +913,13 @@ int supply_comment(char *cmtname, char * + else + { + strcat(tmp_comment, tmp_cmtline); +- strcat(tmp_comment, lf); ++ strcat(tmp_comment, "\n"); + } + } + else + { + strcat(tmp_comment, tmp_cmtline); +- strcat(tmp_comment, lf); ++ strcat(tmp_comment, "\n"); + } + } + } +@@ -1846,7 +1846,7 @@ int pack_file(int is_update, int is_repl + raw_eh=eh_lookup(eh, UXSPECIAL_ID)->raw; + uxspecial_stats(raw_eh, UXSTATS_SHORT); + } +- msg_cprintf(0, lf); ++ msg_cprintf(0, "\n"); + } + if(err_id==0&&user_wants_fail) + { +@@ -2523,9 +2523,9 @@ int unpack_validation() + { + msg_cprintf(0, (FMSG *)strform, misc_buf); + if(search_mode==SEARCH_DEFAULT) +- msg_cprintf(0, (FMSG *)lf); ++ msg_cprintf(0, "\n"); + if(search_mode==SEARCH_BRIEF) +- msg_cprintf(0, (FMSG *)cr); ++ msg_cprintf(0, "\r"); + } + for(pattern=0; pattern=ARJSFXV + if(ferror(stdout)) +- msg_fprintf(stderr, M_DISK_FULL); ++ msg_fprintf(stderr, "Can't write file. Disk full?"); + if(debug_enabled&&strchr(debug_opt, 't')!=NULL) + { + ticks=get_ticks()-ticks; +--- a/rearj.c ++++ b/rearj.c +@@ -935,7 +935,7 @@ static int convert_archive(char *name) + msg_cprintf(H_HL|H_NFMT, M_OLD_SIZE, old_fsize); + msg_cprintf(H_HL|H_NFMT, M_NEW_SIZE, new_fsize); + msg_cprintf(H_HL|H_NFMT, M_SAVINGS_SIZE, gain); +- printf(lf); ++ printf("\n"); + total_old_fsize+=old_fsize; + total_new_fsize+=new_fsize; + total_files++; +--- a/register.c ++++ b/register.c +@@ -205,7 +205,7 @@ int main(int argc, char **argv) + char reg_source[200]; + int i; + +- printf(M_REGISTER_BANNER); ++ fputs(M_REGISTER_BANNER, stdout); + integrity_pattern[0]--; + build_crc32_table(); + if(argc!=2) +--- a/arjdisp.c ++++ b/arjdisp.c +@@ -20,8 +20,6 @@ static long bytes; + static long compsize; + static char cmd_verb; + static char msg_lf[]="\n"; +-char strform[]="%s"; /* Export it for scrnio.c, too +- (a byte saved is a byte gained) */ + + /* Pseudographical controls */ + +@@ -54,19 +52,19 @@ static void show_init_scrn() + textcolor(7); + clrscr(); + gotoxy(2, 2); +- scrprintf(win_top); ++ fputs(win_top, stdout); + for(i=3; i<24; i++) + { +- gotoxy(2, i); scrprintf(win_border); +- gotoxy(79, i); scrprintf(win_border); ++ gotoxy(2, i); fputs(win_border, stdout); ++ gotoxy(79, i); fputs(win_border, stdout); + } +- gotoxy(2, 24); scrprintf(win_bottom); ++ gotoxy(2, 24); fputs(win_bottom, stdout); + gotoxy(10, 5); +- scrprintf(M_ARJDISP_COPYRIGHT); ++ fputs(M_ARJDISP_COPYRIGHT, stdout); + gotoxy(10, 6); +- scrprintf(M_ARJDISP_DISTRIBUTION); ++ fputs(M_ARJDISP_DISTRIBUTION, stdout); + gotoxy(10, 7); +- scrprintf(M_ARJDISP_LICENSE); ++ fputs(M_ARJDISP_LICENSE, stdout); + gotoxy(16, 10); + scrprintf(M_PROCESSING_ARCHIVE, archive_name); + t=strtok(M_ARJDISP_INFO, msg_lf); +@@ -74,11 +72,11 @@ static void show_init_scrn() + while(t!=NULL&&i<=23) + { + gotoxy(10, i++); +- scrprintf(strform, t); ++ scrprintf("%s", t); + t=strtok(NULL, msg_lf); + } + gotoxy(16, 20); +- scrprintf(M_PRESS_ANY_KEY); ++ fputs(M_PRESS_ANY_KEY, stdout); + uni_getch(); + gotoxy(1, 24); + } +@@ -96,19 +94,19 @@ static void show_proc_scrn() + { + clrscr(); + gotoxy(2, 2); +- scrprintf(win_top); ++ fputs(win_top, stdout); + for(i=3; i<24; i++) + { +- gotoxy(2, i); scrprintf(win_border); +- gotoxy(79, i); scrprintf(win_border); ++ gotoxy(2, i); fputs(win_border, stdout); ++ gotoxy(79, i); fputs(win_border, stdout); + } +- gotoxy(2, 24); scrprintf(win_bottom); ++ gotoxy(2, 24); fputs(win_bottom, stdout); + gotoxy(10, 5); +- scrprintf(M_ARJDISP_COPYRIGHT); ++ fputs(M_ARJDISP_COPYRIGHT, stdout); + gotoxy(10, 6); +- scrprintf(M_ARJDISP_DISTRIBUTION); ++ fputs(M_ARJDISP_DISTRIBUTION, stdout); + gotoxy(10, 7); +- scrprintf(M_ARJDISP_LICENSE); ++ fputs(M_ARJDISP_LICENSE, stdout); + gotoxy(16, 10); + scrprintf(M_PROCESSING_ARCHIVE, archive_name); + gotoxy(16, 12); +@@ -132,13 +130,13 @@ static void show_proc_scrn() + break; + } + gotoxy(15, 14); +- scrprintf(ind_top); ++ fputs(ind_top, stdout); + gotoxy(15, 15); +- scrprintf(ind_middle); ++ fputs(ind_middle, stdout); + gotoxy(15, 16); +- scrprintf(ind_bottom); ++ fputs(ind_bottom, stdout); + gotoxy(16, 18); +- scrprintf(M_ARJDISP_CTR_START); ++ fputs(M_ARJDISP_CTR_START, stdout); + } + else + { +@@ -146,7 +144,7 @@ static void show_proc_scrn() + gotoxy(16, 15); + memset(progress, indo, i); + progress[i]='\0'; +- scrprintf(progress); ++ fputs(progress, stdout); + gotoxy(16, 18); + scrprintf(M_ARJDISP_CTR, calc_percentage(bytes, uncompsize)/10); + } +@@ -165,19 +163,19 @@ static void show_ending_scrn() + textcolor(7); + clrscr(); + gotoxy(2, 2); +- scrprintf(win_top); ++ fputs(win_top, stdout); + for(i=3; i<24; i++) + { +- gotoxy(2, i); scrprintf(win_border); +- gotoxy(79, i); scrprintf(win_border); ++ gotoxy(2, i); fputs(win_border, stdout); ++ gotoxy(79, i); fputs(win_border, stdout); + } +- gotoxy(2, 24); scrprintf(win_bottom); ++ gotoxy(2, 24); fputs(win_bottom, stdout); + gotoxy(10, 5); +- scrprintf(M_ARJDISP_COPYRIGHT); ++ fputs(M_ARJDISP_COPYRIGHT, stdout); + gotoxy(10, 6); +- scrprintf(M_ARJDISP_DISTRIBUTION); ++ fputs(M_ARJDISP_DISTRIBUTION, stdout); + gotoxy(10, 7); +- scrprintf(M_ARJDISP_LICENSE); ++ fputs(M_ARJDISP_LICENSE, stdout); + gotoxy(16, 10); + scrprintf(M_FINISHED_PROCESSING, archive_name); + gotoxy(1, 24); diff -Nru arj-3.10.22/debian/patches/series arj-3.10.22/debian/patches/series --- arj-3.10.22/debian/patches/series 2011-02-27 18:31:30.000000000 +0000 +++ arj-3.10.22/debian/patches/series 2013-05-10 03:10:21.000000000 +0000 @@ -4,5 +4,9 @@ 004_parallel_build.patch 005_use_system_strnlen.patch 006_use_safe_strcpy.patch +hurd_no_fcntl_getlk.patch +security_format.patch doc_refer_robert_k_jung.patch gnu_build_fix.patch +gnu_build_flags.patch +gnu_build_strip.patch diff -Nru arj-3.10.22/debian/rules arj-3.10.22/debian/rules --- arj-3.10.22/debian/rules 2011-02-28 03:53:52.000000000 +0000 +++ arj-3.10.22/debian/rules 2013-05-10 03:10:21.000000000 +0000 @@ -19,18 +19,18 @@ conf_gnu_type += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif -CFLAGS = -Wall -g - -ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif +CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall +LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS))) DEBUG = "DEBUG=1" endif +ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) + STRIP = "BUILD_STRIP=1" +endif + gnu/configure: gnu/configure.in dh_testdir @@ -54,7 +54,8 @@ build-arch: gnu/config.status dh_testdir - $(MAKE) CFLAGS="$(CFLAGS)" $(DEBUG) + $(MAKE) $(DEBUG) $(STRIP)\ + CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" build: build-arch build-indep @@ -62,7 +63,7 @@ dh_testdir dh_testroot - [ ! -f Makefile ] || $(MAKE) clean + [ ! -f GNUmakefile ] || $(MAKE) clean -rm -f gnu/configure -rm -f gnu/config.status gnu/config.log gnu/config.cache @@ -93,8 +94,9 @@ dh_installinfo dh_installchangelogs ChangeLog dh_link - # NOTE: Do not strip, it is currently done in the linker stage. - # Otherwise when stripping the self-extracting modules and the + # NOTE: Do not strip here, it is currently done in the upstream build + # system, after the linker stage and before preprocessing the binary + # files. Otherwise when stripping the self-extracting modules and the # help text are removed. # dh_strip dh_compress