From owner-svn-soc-all@FreeBSD.ORG Mon Jun 17 10:41:51 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DDD84950 for ; Mon, 17 Jun 2013 10:41:51 +0000 (UTC) (envelope-from dpl@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::16:124]) by mx1.freebsd.org (Postfix) with ESMTP id C08051A81 for ; Mon, 17 Jun 2013 10:41:51 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5HAfpgw091322 for ; Mon, 17 Jun 2013 10:41:51 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r5HAfpFl091318 for svn-soc-all@FreeBSD.org; Mon, 17 Jun 2013 10:41:51 GMT (envelope-from dpl@FreeBSD.org) Date: Mon, 17 Jun 2013 10:41:51 GMT Message-Id: <201306171041.r5HAfpFl091318@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r253070 - in soc2013/dpl: bzip2 mk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 10:41:51 -0000 Author: dpl Date: Mon Jun 17 10:41:51 2013 New Revision: 253070 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=253070 Log: Added Makefiles for bzip2 in a different directory. Added cap_enter() to bzip.c Added: soc2013/dpl/mk/ soc2013/dpl/mk/Makefile.bzip2 soc2013/dpl/mk/Makefile.bzip2recover Modified: soc2013/dpl/bzip2/bzip2.c Modified: soc2013/dpl/bzip2/bzip2.c ============================================================================== --- soc2013/dpl/bzip2/bzip2.c Mon Jun 17 09:49:07 2013 (r253069) +++ soc2013/dpl/bzip2/bzip2.c Mon Jun 17 10:41:51 2013 (r253070) @@ -88,6 +88,15 @@ # define SET_BINARY_MODE(fd) /**/ +/* Capsicum Support */ +# ifdef __FreeBSD__ +# include +# if __FreeBSD_version >= 900041 +# define CAPSICUM +# include +# endif +# endif + # ifdef __GNUC__ # define NORETURN __attribute__ ((noreturn)) # else @@ -1812,6 +1821,11 @@ # endif # endif + /* Enter in Capability mode */ +# if CAPSICUM + cap_enter(); +# endif + copyFileName ( inName, (Char*)"(none)" ); copyFileName ( outName, (Char*)"(none)" ); Added: soc2013/dpl/mk/Makefile.bzip2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2013/dpl/mk/Makefile.bzip2 Mon Jun 17 10:41:51 2013 (r253070) @@ -0,0 +1,51 @@ +# $FreeBSD: soc2013/dpl/head/usr.bin/bzip2/Makefile 201429 2010-01-02 10:27:05Z ed $ + +BZ2DIR= ${.CURDIR}/../bzip2 +.PATH: ${BZ2DIR} + +PROG= bzip2 +CFLAGS+= -D_FILE_OFFSET_BITS=64 + +WARNS?= 3 + +DPADD= ${LIBBZ2} +LDADD= -lbz2 + +LINKS= ${BINDIR}/bzip2 ${BINDIR}/bunzip2 +LINKS+= ${BINDIR}/bzip2 ${BINDIR}/bzcat +MLINKS= bzip2.1 bunzip2.1 bzip2.1 bzcat.1 + +REFFILES= sample1.ref sample2.ref sample3.ref +DREFFILES= sample1.bz2 sample2.bz2 sample3.bz2 +TESTFILES= ${REFFILES} ${DREFFILES} + +CLEANFILES+= ${TESTFILES} \ + sample1.rb2 sample2.rb2 sample3.rb2 \ + sample1.tst sample2.tst sample3.tst + +.for f in ${REFFILES} +${f}: ${f}.gz.uu + uudecode -p ${BZ2DIR}/${f}.gz.uu | gunzip > ${f} +.endfor +.for f in ${DREFFILES} +${f}: ${f}.uu + uudecode ${BZ2DIR}/${f}.uu +.endfor + +test: bzip2 ${TESTFILES} + @cat ${BZ2DIR}/words1 + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 + ./bzip2 -d < sample1.bz2 > sample1.tst + ./bzip2 -d < sample2.bz2 > sample2.tst + ./bzip2 -ds < sample3.bz2 > sample3.tst + cmp sample1.bz2 sample1.rb2 + cmp sample2.bz2 sample2.rb2 + cmp sample3.bz2 sample3.rb2 + cmp sample1.tst sample1.ref + cmp sample2.tst sample2.ref + cmp sample3.tst sample3.ref + @cat ${BZ2DIR}/words3 + +.include Added: soc2013/dpl/mk/Makefile.bzip2recover ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2013/dpl/mk/Makefile.bzip2recover Mon Jun 17 10:41:51 2013 (r253070) @@ -0,0 +1,11 @@ +# $FreeBSD: soc2013/dpl/head/usr.bin/bzip2recover/Makefile 250858 2013-04-19 19:45:00Z ed $ + +BZ2DIR= ${.CURDIR}/../bzip2 +.PATH: ${BZ2DIR} + +PROG= bzip2recover +NO_MAN= + +NO_WMISSING_VARIABLE_DECLARATIONS= + +.include