tMake .tar.bz2 the only supported format - pm - barely a pack manager
 (HTM) git clone git://z3bra.org/pm
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 070bae1b48719edc68bd7975cc5a536274eb8fa7
 (DIR) parent c96c002a084e780cea693b4de0cc8a88b786fdc0
 (HTM) Author: z3bra <willyatmailoodotorg>
       Date:   Tue,  5 Jan 2016 01:46:45 +0100
       
       Make .tar.bz2 the only supported format
       
       .tar.bz2 is now the only supported format. This enable simpler
       package handling, as well as making static linking easier.
       
       static binaries can now be built by adding "-static" to the LDFLAGS
       macro in config.mk
       
       Diffstat:
         M config.mk                           |       4 ++--
         M makefile                            |       3 +++
         M pm.c                                |       8 ++++----
       
       3 files changed, 9 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/config.mk b/config.mk
       t@@ -4,5 +4,5 @@ LD = $(CC)
        PREFIX = /usr/local
        MANPREFIX = $(PREFIX)/man
        
       -CFLAGS = -Wall -g
       -LDFLAGS = -larchive
       +CFLAGS = -Wall -Wextra -g
       +LDFLAGS = -larchive -lbz2 -lz
 (DIR) diff --git a/makefile b/makefile
       t@@ -4,6 +4,9 @@ BIN = pm
        
        all: $(BIN)
        
       +.c:
       +        $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
       +
        clean:
                rm -f $(BIN)
        
 (DIR) diff --git a/pm.c b/pm.c
       t@@ -156,8 +156,8 @@ list_archive(int fd, char *filename)
        
                /* configure archive to support all types */
                a = archive_read_new();
       -        archive_read_support_filter_all(a);
       -        archive_read_support_format_all(a);
       +        archive_read_support_filter_bzip2(a);
       +        archive_read_support_format_tar(a);
        
                /* set blocksize to 0 as libarchive will choose the best size anyway */
                r = archive_read_open_filename(a, filename, 0);
       t@@ -307,8 +307,8 @@ unpack(char *root, char *in)
                          |ARCHIVE_EXTRACT_SECURE_NODOTDOT;
        
                a = archive_read_new();
       -        archive_read_support_filter_all(a);
       -        archive_read_support_format_all(a);
       +        archive_read_support_filter_bzip2(a);
       +        archive_read_support_format_tar(a);
        
                w = archive_write_disk_new();
                archive_write_disk_set_options(w, mask);