CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Updated to 5.35.1
authorVictor Martinez <pitillo@ono.com>
Tue, 5 Apr 2011 10:46:42 +0000 (10:46 +0000)
committerVictor Martinez <pitillo@ono.com>
Tue, 5 Apr 2011 10:46:42 +0000 (10:46 +0000)
19 files changed:
src/Makefile
src/README
src/main.cc
src/pkgadd.8.in
src/pkgadd.cc
src/pkginfo.8.in
src/pkginfo.cc
src/pkginfo.h
src/pkgmk.8.in
src/pkgmk.conf
src/pkgmk.conf.5.in
src/pkgmk.in
src/pkgrm.8.in
src/pkgrm.cc
src/pkgrm.h
src/pkgutil.cc
src/pkgutil.h
src/rejmerge.8.in
src/rejmerge.in

index 36f11f46a5d2fcaa82ae478121c90e6d88217056..4d0b524d41a1528b53d4d6478e849dd6ed7b7625 100644 (file)
@@ -2,7 +2,7 @@
 #  pkgutils
 #
 #  Copyright (c) 2000-2005 by Per Liden <per@fukt.bth.se>
 #  pkgutils
 #
 #  Copyright (c) 2000-2005 by Per Liden <per@fukt.bth.se>
-#  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+#  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 #
 #  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
 #
 #  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
@@ -25,14 +25,16 @@ BINDIR = /usr/bin
 MANDIR = /usr/man
 ETCDIR = /etc
 
 MANDIR = /usr/man
 ETCDIR = /etc
 
-VERSION = 5.34.2
+VERSION = 5.35.1
 NAME = pkgutils-$(VERSION)
 
 CXXFLAGS += -DNDEBUG
 CXXFLAGS += -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" \
            -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 
 NAME = pkgutils-$(VERSION)
 
 CXXFLAGS += -DNDEBUG
 CXXFLAGS += -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" \
            -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 
-LDFLAGS += -static -larchive -lz
+LIBARCHIVELIBS := $(shell pkg-config --libs --static libarchive)
+
+LDFLAGS += -static $(LIBARCHIVELIBS)
 
 OBJECTS = main.o pkgutil.o pkgadd.o pkgrm.o pkginfo.o
 
 
 OBJECTS = main.o pkgutil.o pkgadd.o pkgrm.o pkginfo.o
 
index 1e57cdc3e0151ba37271af46f18cfbee6a7465b2..703a8efc4ddbd975092653d78d0a97614f92a1eb 100644 (file)
@@ -22,7 +22,7 @@ $ make DESTDIR=/some/other/path install
 Copyright
 ---------
 pkgutils is Copyright (c) 2000-2005 Per Liden and
 Copyright
 ---------
 pkgutils is Copyright (c) 2000-2005 Per Liden and
-Copyright (c) 2006-2007 CRUX team (http://crux.nu).
+Copyright (c) 2006-2010 CRUX team (http://crux.nu).
 
 pkgutils is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
 
 pkgutils is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
index 566f4db95d71c230d56b441f1d747f9ac6460793..6897c8fc31f6c53bd5ef09f082eec4f2680d93d8 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
index a4747ca93ca8ca4c109b417b696ef52ec111b147..34dcb52e929fcc37a2c165ab6d391f317c24e1d1 100644 (file)
@@ -58,6 +58,6 @@ Configuration file.
 .SH SEE ALSO
 pkgrm(8), pkginfo(8), pkgmk(8), rejmerge(8)
 .SH COPYRIGHT
 .SH SEE ALSO
 pkgrm(8), pkginfo(8), pkgmk(8), rejmerge(8)
 .SH COPYRIGHT
-pkgadd (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2007 CRUX team (http://crux.nu).
+pkgadd (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2010 CRUX team (http://crux.nu).
 pkgadd (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
 pkgadd (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
index 335ffddecba4f16161992a50390be2de3fce1d64..a5721fee0a8ffdb7218b69aa0e83c3888924f8f2 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
index 8d2f8257265da746efb21c4354d547364b7d1036..ee0da6cc3cec6cd80720d63aa8799b5dc18e06a1 100644 (file)
@@ -37,6 +37,6 @@ Print help and exit.
 .SH SEE ALSO
 pkgadd(8), pkgrm(8), pkgmk(8), rejmerge(8)
 .SH COPYRIGHT
 .SH SEE ALSO
 pkgadd(8), pkgrm(8), pkgmk(8), rejmerge(8)
 .SH COPYRIGHT
-pkginfo (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2007 CRUX team (http://crux.nu).
+pkginfo (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2010 CRUX team (http://crux.nu).
 pkginfo (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
 pkginfo (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
index d4b827087443375f0debb495321a101cd1654925..fb4d993138dfe4dc529094a71ad4b5a508cdc14c 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
index 535dfbe24a0672a0ee7afb8fb71f7bc6208d1c7e..8db95da7a0fe8772d80c068cb209ec05d8806d23 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
index b9fca2637e1e92fade9e9279929eeadbfedc3ac2..b2043c2c3c9762ccd5a86770d0edb4e1cd2bd689 100644 (file)
@@ -5,7 +5,7 @@ pkgmk \- make software package
 \fBpkgmk [options]\fP
 .SH DESCRIPTION
 \fBpkgmk\fP is a \fIpackage management\fP utility, which makes
 \fBpkgmk [options]\fP
 .SH DESCRIPTION
 \fBpkgmk\fP is a \fIpackage management\fP utility, which makes
-a software package. A \fIpackage\fP is an archive of files (.pkg.tar.gz)
+a software package. A \fIpackage\fP is an archive of files (.pkg.tar.gz, .pkg.tar.bz2 or .pkg.tar.xz)
 that can be installed using pkgadd(8).
 
 To prepare to use pkgmk, you must write a file named \fIPkgfile\fP
 that can be installed using pkgadd(8).
 
 To prepare to use pkgmk, you must write a file named \fIPkgfile\fP
@@ -43,6 +43,9 @@ Update footprint and treat last build as successful.
 .B "\-if, \-\-ignore\-footprint"
 Build package without checking footprint.
 .TP
 .B "\-if, \-\-ignore\-footprint"
 Build package without checking footprint.
 .TP
+.B "\-in, \-\-ignore\-new"
+Build package, ignore new files in a footprint mismatch.
+.TP
 .B "\-um, \-\-update\-md5sum"
 Update md5sum using the current source files.
 .TP
 .B "\-um, \-\-update\-md5sum"
 Update md5sum using the current source files.
 .TP
@@ -85,9 +88,40 @@ Global package make configuration.
 .TP
 .B "wget"
 Used by pkgmk to download source code.
 .TP
 .B "wget"
 Used by pkgmk to download source code.
+.SH EXIT CODES
+.TP
+.B 0
+No error occured.
+.TP
+.B 1
+A general error has occured.
+.TP
+.B 2
+The Pkgfile is invalid.
+.TP
+.B 3
+The source or build directory is missing or is lacking read/write permissions.
+.TP
+.B 4
+An error occured during the download of source files.
+.TP
+.B 5
+An error occured during unpacking of source files.
+.TP
+.B 6
+An md5sum mismatch occured.
+.TP
+.B 7
+A footprint mismatch occured.
+.TP
+.B 8
+An error occured while running the build function.
+.TP
+.B 9
+An error occured while installing the package via pkgadd.
 .SH SEE ALSO
 pkgmk.conf(5), pkgadd(8), pkgrm(8), pkginfo(8), rejmerge(8), wget(1)
 .SH COPYRIGHT
 .SH SEE ALSO
 pkgmk.conf(5), pkgadd(8), pkgrm(8), pkginfo(8), rejmerge(8), wget(1)
 .SH COPYRIGHT
-pkgmk (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2007 CRUX team (http://crux.nu).
+pkgmk (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2010 CRUX team (http://crux.nu).
 pkgmk (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
 pkgmk (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
index ef73123a20cd87e50aeb13515aecf5333848fc64..1d44319df9bdecd4058b3579eb950c6a87a0a398 100644 (file)
@@ -6,8 +6,8 @@ export CHOST="$(echo $MACHTYPE)"
 
 # eabi
 export CTARGET="arm-crux-linux-gnueabi"
 
 # eabi
 export CTARGET="arm-crux-linux-gnueabi"
-export CLFS="/devel/crux-arm/toolchain/clfs"
-export CROSSTOOLS="/devel/crux-arm/toolchain/crosstools"
+export CLFS="/des/lokalix/crux-arm/prod/toolchain/clfs"
+export CROSSTOOLS="/des/lokalix/crux-arm/prod/toolchain/crosstools"
 
 # no-eabi
 #export CTARGET="arm-crux-linux-gnu"
 
 # no-eabi
 #export CTARGET="arm-crux-linux-gnu"
@@ -25,9 +25,12 @@ export RANLIB="$CTARGET-ranlib"
 export LD="$CTARGET-ld"
 export STRIP="$CTARGET-strip"
 
 export LD="$CTARGET-ld"
 export STRIP="$CTARGET-strip"
 
-export CFLAGS="-O2 -pipe"
+export CFLAGS="-O2 -msoft-float"
 export CXXFLAGS="$CFLAGS"
 
 export CXXFLAGS="$CFLAGS"
 
+#export CFLAGS="-O2 -pipe"
+#export CXXFLAGS="$CFLAGS"
+
 arm9tdmi_CFLAGS="-O2 -pipe -march=armv4 -mtune=arm9tdmi"
 armv5te_CFLAGS="-O2 -pipe -msoft-float -march=armv5te"
 strongarm_CFLAGS="-O2 -pipe -march=armv4 -mtune=strongarm"
 arm9tdmi_CFLAGS="-O2 -pipe -march=armv4 -mtune=arm9tdmi"
 armv5te_CFLAGS="-O2 -pipe -msoft-float -march=armv5te"
 strongarm_CFLAGS="-O2 -pipe -march=armv4 -mtune=strongarm"
@@ -37,11 +40,16 @@ STRIP_CMD="$STRIP"
 
 # PKGMK_SOURCE_MIRRORS=()
 # PKGMK_SOURCE_DIR="$PWD"
 
 # PKGMK_SOURCE_MIRRORS=()
 # PKGMK_SOURCE_DIR="$PWD"
+PKGMK_SOURCE_DIR="/des/lokalix/crux-arm/prod/ports/src"
 # PKGMK_PACKAGE_DIR="$PWD"
 # PKGMK_PACKAGE_DIR="$PWD"
+PKGMK_PACKAGE_DIR="/des/lokalix/crux-arm/prod/ports/pkg"
 # PKGMK_WORK_DIR="$PWD/work"
 # PKGMK_WORK_DIR="$PWD/work"
+PKGMK_WORK_DIR="$PWD/work"
 # PKGMK_DOWNLOAD="no"
 # PKGMK_IGNORE_FOOTPRINT="no"
 # PKGMK_DOWNLOAD="no"
 # PKGMK_IGNORE_FOOTPRINT="no"
+# PKGMK_IGNORE_NEW="no"
 # PKGMK_NO_STRIP="no"
 # PKGMK_WGET_OPTS=""
 # PKGMK_NO_STRIP="no"
 # PKGMK_WGET_OPTS=""
+# PKGMK_COMPRESSION_MODE="gz"
 
 # End of file
 
 # End of file
index dcb6a207124240f654fb4ac6ce3f5f626c1bb734..f9f690843d33ec796308fc24971fd9a85da507c9 100644 (file)
@@ -53,13 +53,23 @@ If set to 'yes', pkgmk will not perform a footprint check of the built package.
 .br
 Default: 'no'
 .TP
 .br
 Default: 'no'
 .TP
+\fBPKGMK_IGNORE_NEW='STRING'\fP
+If set to 'yes', pkgmk will ignore new files in a footprint mismatch.
+.br
+Default: 'no'
+.TP
 \fBPKGMK_NO_STRIP='STRING'\fP
 If set to 'no', pkgmk will strip built binaries.
 .br
 Default: 'no'
 \fBPKGMK_NO_STRIP='STRING'\fP
 If set to 'no', pkgmk will strip built binaries.
 .br
 Default: 'no'
+.TP
+\fBPKGMK_COMPRESSION_MODE='STRING'\fP
+Option to select the mode used to compress the packages. Valid strings are gz, bz2 and xz.
+.br
+Default: 'gz'
 .SH SEE ALSO
 pkgmk(8)
 .SH COPYRIGHT
 .SH SEE ALSO
 pkgmk(8)
 .SH COPYRIGHT
-pkgmk (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2008 CRUX team (http://crux.nu).
+pkgmk (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2010 CRUX team (http://crux.nu).
 pkgmk (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
 pkgmk (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
index 08413f6f3f960b7bef062cf381f2a78375919772..c69329f4e765416779cc759178a2e1a23634582d 100755 (executable)
@@ -3,10 +3,9 @@
 #  pkgutils
 # 
 #  Copyright (c) 2000-2005 Per Liden
 #  pkgutils
 # 
 #  Copyright (c) 2000-2005 Per Liden
-#  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
-#
+#  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 #  Patches for crosscompilation by Jose V Beneyto <sepen@crux.nu>
 #  Patches for crosscompilation by Jose V Beneyto <sepen@crux.nu>
-#  (CRUX-ARM System Team <crux-arm@mikeux.dyndns.org>)
+#  (CRUX-ARM System Team <devel@crux-arm.nu>)
 # 
 #  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
 # 
 #  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
 #  USA.
 #
 
 #  USA.
 #
 
+##
+# error codes
+E_GENERAL=1
+E_PKGFILE=2    # invalid Pkgfile
+E_DIR_PERM=3   # (source/build) directory missing or missing read/write permission
+E_DOWNLOAD=4   # error during download
+E_UNPACK=5     # error during unpacking of source file(s)
+E_MD5=6        # md5sum verification failed
+E_FOOTPRINT=7  # footprint check failure
+E_BUILD=8      # error while running 'build()'
+E_INSTALL=9    # error while installing the package via 'pkgadd'
+
 info() {
        echo "=======> $1"
 }
 info() {
        echo "=======> $1"
 }
@@ -52,29 +63,29 @@ get_basename() {
 check_pkgfile() {
        if [ ! "$name" ]; then
                error "Variable 'name' not specified in $PKGMK_PKGFILE."
 check_pkgfile() {
        if [ ! "$name" ]; then
                error "Variable 'name' not specified in $PKGMK_PKGFILE."
-               exit 1
+               exit $E_PKGFILE
        elif [ ! "$version" ]; then
                error "Variable 'version' not specified in $PKGMK_PKGFILE."
        elif [ ! "$version" ]; then
                error "Variable 'version' not specified in $PKGMK_PKGFILE."
-               exit 1
+               exit $E_PKGFILE
        elif [ ! "$release" ]; then
                error "Variable 'release' not specified in $PKGMK_PKGFILE."
        elif [ ! "$release" ]; then
                error "Variable 'release' not specified in $PKGMK_PKGFILE."
-               exit 1
+               exit $E_PKGFILE
        elif [ "`type -t build`" != "function" ]; then
                error "Function 'build' not specified in $PKGMK_PKGFILE."
        elif [ "`type -t build`" != "function" ]; then
                error "Function 'build' not specified in $PKGMK_PKGFILE."
-               exit 1
+               exit $E_PKGFILE
        fi
 }
 
 check_directory() {
        if [ ! -d $1 ]; then
                error "Directory '$1' does not exist."
        fi
 }
 
 check_directory() {
        if [ ! -d $1 ]; then
                error "Directory '$1' does not exist."
-               exit 1
+               exit $E_DIR_PERM
        elif [ ! -w $1 ]; then
                error "Directory '$1' not writable."
        elif [ ! -w $1 ]; then
                error "Directory '$1' not writable."
-               exit 1
+               exit $E_DIR_PERM
        elif [ ! -x $1 ] || [ ! -r $1 ]; then
                error "Directory '$1' not readable."
        elif [ ! -x $1 ] || [ ! -r $1 ]; then
                error "Directory '$1' not readable."
-               exit 1
+               exit $E_DIR_PERM
        fi
 }
 
        fi
 }
 
@@ -90,7 +101,7 @@ download_file() {
 
        if [ ! "`type -p wget`" ]; then
                error "Command 'wget' not found."
 
        if [ ! "`type -p wget`" ]; then
                error "Command 'wget' not found."
-               exit 1
+               exit $E_GENERAL
        fi
 
        LOCAL_FILENAME=`get_filename $1`
        fi
 
        LOCAL_FILENAME=`get_filename $1`
@@ -132,7 +143,7 @@ download_file() {
        
        if [ $error != 0 ]; then
                error "Downloading '$1' failed."
        
        if [ $error != 0 ]; then
                error "Downloading '$1' failed."
-               exit 1
+               exit $E_DOWNLOAD
        fi
        
        mv -f "$LOCAL_FILENAME_PARTIAL" "$LOCAL_FILENAME"
        fi
        
        mv -f "$LOCAL_FILENAME_PARTIAL" "$LOCAL_FILENAME"
@@ -146,13 +157,13 @@ download_source() {
                if [ ! -e $LOCAL_FILENAME ]; then
                        if [ "$LOCAL_FILENAME" = "$FILE" ]; then
                                error "Source file '$LOCAL_FILENAME' not found (can not be downloaded, URL not specified)."
                if [ ! -e $LOCAL_FILENAME ]; then
                        if [ "$LOCAL_FILENAME" = "$FILE" ]; then
                                error "Source file '$LOCAL_FILENAME' not found (can not be downloaded, URL not specified)."
-                               exit 1
+                               exit $E_DOWNLOAD
                        else
                                if [ "$PKGMK_DOWNLOAD" = "yes" ]; then
                                        download_file $FILE
                                else
                                        error "Source file '$LOCAL_FILENAME' not found (use option -d to download)."
                        else
                                if [ "$PKGMK_DOWNLOAD" = "yes" ]; then
                                        download_file $FILE
                                else
                                        error "Source file '$LOCAL_FILENAME' not found (use option -d to download)."
-                                       exit 1
+                                       exit $E_DOWNLOAD
                                fi
                        fi
                fi
                                fi
                        fi
                fi
@@ -165,7 +176,7 @@ unpack_source() {
        for FILE in ${source[@]}; do
                LOCAL_FILENAME=`get_filename $FILE`
                case $LOCAL_FILENAME in
        for FILE in ${source[@]}; do
                LOCAL_FILENAME=`get_filename $FILE`
                case $LOCAL_FILENAME in
-                       *.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tar.xz|*.tar.lzma|*.zip)
+                       *.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm)
                                COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" ;;
                        *)
                                COMMAND="cp $LOCAL_FILENAME $SRC" ;;
                                COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" ;;
                        *)
                                COMMAND="cp $LOCAL_FILENAME $SRC" ;;
@@ -180,7 +191,7 @@ unpack_source() {
                                rm -rf $PKGMK_WORK_DIR
                        fi
                        error "Building '$TARGET' failed."
                                rm -rf $PKGMK_WORK_DIR
                        fi
                        error "Building '$TARGET' failed."
-                       exit 1
+                       exit $E_UNPACK
                fi
        done
 }
                fi
        done
 }
@@ -227,11 +238,11 @@ check_md5sum() {
 
                        if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
                                error "Md5sum not ok."
 
                        if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
                                error "Md5sum not ok."
-                               exit 1
+                               exit $E_MD5
                        fi
 
                        error "Building '$TARGET' failed."
                        fi
 
                        error "Building '$TARGET' failed."
-                       exit 1
+                       exit $E_MD5
                fi
        else
                if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
                fi
        else
                if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
@@ -239,7 +250,7 @@ check_md5sum() {
                                rm -rf $PKGMK_WORK_DIR
                        fi
                        info "Md5sum not found."
                                rm -rf $PKGMK_WORK_DIR
                        fi
                        info "Md5sum not found."
-                       exit 1
+                       exit $E_MD5
                fi
                
                warning "Md5sum not found, creating new."
                fi
                
                warning "Md5sum not found, creating new."
@@ -305,13 +316,6 @@ compress_manpages() {
        done
 }
 
        done
 }
 
-fix_cross_paths() {
-       # remove the last / from CLFS path if appeared
-       CLFS=${CLFS%*/}
-
-       find $PKG -type f -name '*.la' -exec sed -e "s|$CLFS||g" -e "s|$CROSTOOLS/$CTARGET|/usr|g" -e "s|$CROSSTOOLS||g" -i {} \;
-}
-
 check_footprint() {
        local FILE="$PKGMK_WORK_DIR/.tmp"
        
 check_footprint() {
        local FILE="$PKGMK_WORK_DIR/.tmp"
        
@@ -328,9 +332,14 @@ check_footprint() {
                                sed 's/^+/NEW       /g' | \
                                sed 's/^-/MISSING   /g' > $FILE.footprint.diff
                        if [ -s $FILE.footprint.diff ]; then
                                sed 's/^+/NEW       /g' | \
                                sed 's/^-/MISSING   /g' > $FILE.footprint.diff
                        if [ -s $FILE.footprint.diff ]; then
-                               error "Footprint mismatch found:"
+                               if [ "$PKGMK_IGNORE_NEW" = "yes" ] && \
+                                  [ -z "$(egrep -l ^MISSING $FILE.footprint.diff)" ] ; then
+                                       info "New files found:"
+                               else
+                                       error "Footprint mismatch found:"
+                                       BUILD_SUCCESSFUL="no"
+                               fi
                                cat $FILE.footprint.diff >&2
                                cat $FILE.footprint.diff >&2
-                               BUILD_SUCCESSFUL="no"
                        fi
                else
                        warning "Footprint not found, creating new."
                        fi
                else
                        warning "Footprint not found, creating new."
@@ -363,6 +372,7 @@ remove_work_dir() {
 
 build_package() {
        local BUILD_SUCCESSFUL="no"
 
 build_package() {
        local BUILD_SUCCESSFUL="no"
+       local COMPRESSION
        
        check_file "$TARGET"
        make_work_dir
        
        check_file "$TARGET"
        make_work_dir
@@ -384,12 +394,17 @@ build_package() {
                fi
                
                compress_manpages
                fi
                
                compress_manpages
-               fix_cross_paths
                
                cd $PKG
                info "Build result:"
                
                cd $PKG
                info "Build result:"
-               tar czvvf $TARGET *
-               
+
+               case $PKGMK_COMPRESSION_MODE in
+                       gz)  COMPRESSION="-z" ;;
+                       bz2) COMPRESSION="-j" ;;
+                       xz)  COMPRESSION="-J" ;;
+               esac
+               bsdtar -c $COMPRESSION -f $TARGET *  &&  bsdtar -t -v -f $TARGET
+
                if [ $? = 0 ]; then
                        BUILD_SUCCESSFUL="yes"
 
                if [ $? = 0 ]; then
                        BUILD_SUCCESSFUL="yes"
 
@@ -525,6 +540,7 @@ print_help() {
        echo "  -utd, --up-to-date          do not build, only check if package is up to date"
        echo "  -uf,  --update-footprint    update footprint using result from last build"
        echo "  -if,  --ignore-footprint    build package without checking footprint"
        echo "  -utd, --up-to-date          do not build, only check if package is up to date"
        echo "  -uf,  --update-footprint    update footprint using result from last build"
        echo "  -if,  --ignore-footprint    build package without checking footprint"
+       echo "  -in,  --ignore-new          build package, ignore new files in a footprint missmatch"
        echo "  -um,  --update-md5sum       update md5sum"
        echo "  -im,  --ignore-md5sum       build package without checking md5sum"
        echo "  -cm,  --check-md5sum        do not build, only check md5sum"
        echo "  -um,  --update-md5sum       update md5sum"
        echo "  -im,  --ignore-md5sum       build package without checking md5sum"
        echo "  -cm,  --check-md5sum        do not build, only check md5sum"
@@ -559,6 +575,8 @@ parse_options() {
                                PKGMK_UPDATE_FOOTPRINT="yes" ;;
                        -if|--ignore-footprint)
                                PKGMK_IGNORE_FOOTPRINT="yes" ;;
                                PKGMK_UPDATE_FOOTPRINT="yes" ;;
                        -if|--ignore-footprint)
                                PKGMK_IGNORE_FOOTPRINT="yes" ;;
+                       -in|--ignore-new)
+                               PKGMK_IGNORE_NEW="yes" ;;
                        -um|--update-md5sum)
                                PKGMK_UPDATE_MD5SUM="yes" ;;
                        -im|--ignore-md5sum)
                        -um|--update-md5sum)
                                PKGMK_UPDATE_MD5SUM="yes" ;;
                        -im|--ignore-md5sum)
@@ -617,9 +635,17 @@ main() {
        check_directory "`dirname $PKGMK_WORK_DIR`"
        
        check_pkgfile
        check_directory "`dirname $PKGMK_WORK_DIR`"
        
        check_pkgfile
-       
-       TARGET="$PKGMK_PACKAGE_DIR/$name#$version-$release.pkg.tar.gz"
-       
+
+       case $PKGMK_COMPRESSION_MODE in
+               gz|bz2|xz)
+                       TARGET="$PKGMK_PACKAGE_DIR/$name#$version-$release.pkg.tar.$PKGMK_COMPRESSION_MODE"
+                       ;;
+               *)
+                       error "Compression mode '$PKGMK_COMPRESSION_MODE' not supported"
+                       exit 1
+                       ;;
+       esac
+
        if [ "$PKGMK_CLEAN" = "yes" ]; then
                clean
                exit 0
        if [ "$PKGMK_CLEAN" = "yes" ]; then
                clean
                exit 0
@@ -682,8 +708,6 @@ readonly PKGMK_VERSION="#VERSION#"
 readonly PKGMK_COMMAND="$0"
 readonly PKGMK_ROOT="$PWD"
 
 readonly PKGMK_COMMAND="$0"
 readonly PKGMK_ROOT="$PWD"
 
-STRIP_CMD="strip"
-
 PKGMK_CONFFILE="/etc/pkgmk.conf"
 PKGMK_PKGFILE="Pkgfile"
 PKGMK_FOOTPRINT=".footprint"
 PKGMK_CONFFILE="/etc/pkgmk.conf"
 PKGMK_PKGFILE="Pkgfile"
 PKGMK_FOOTPRINT=".footprint"
@@ -695,6 +719,8 @@ PKGMK_SOURCE_DIR="$PWD"
 PKGMK_PACKAGE_DIR="$PWD"
 PKGMK_WORK_DIR="$PWD/work"
 
 PKGMK_PACKAGE_DIR="$PWD"
 PKGMK_WORK_DIR="$PWD/work"
 
+PKGMK_COMPRESSION_MODE="gz"
+
 PKGMK_INSTALL="no"
 PKGMK_RECURSIVE="no"
 PKGMK_DOWNLOAD="no"
 PKGMK_INSTALL="no"
 PKGMK_RECURSIVE="no"
 PKGMK_DOWNLOAD="no"
@@ -703,6 +729,7 @@ PKGMK_EXTRACT_ONLY="no"
 PKGMK_UP_TO_DATE="no"
 PKGMK_UPDATE_FOOTPRINT="no"
 PKGMK_IGNORE_FOOTPRINT="no"
 PKGMK_UP_TO_DATE="no"
 PKGMK_UPDATE_FOOTPRINT="no"
 PKGMK_IGNORE_FOOTPRINT="no"
+PKGMK_IGNORE_NEW="no"
 PKGMK_FORCE="no"
 PKGMK_KEEP_WORK="no"
 PKGMK_UPDATE_MD5SUM="no"
 PKGMK_FORCE="no"
 PKGMK_KEEP_WORK="no"
 PKGMK_UPDATE_MD5SUM="no"
index 25de6a3652c9c6704a6622d211e646900785d2f4..ba78afe15a68a480a23db7de2d3f4a60627dfc5b 100644 (file)
@@ -23,6 +23,6 @@ Print help and exit.
 .SH SEE ALSO
 pkgadd(8), pkginfo(8), pkgmk(8), rejmerge(8)
 .SH COPYRIGHT
 .SH SEE ALSO
 pkgadd(8), pkginfo(8), pkgmk(8), rejmerge(8)
 .SH COPYRIGHT
-pkgrm (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2007 CRUX team (http://crux.nu).
+pkgrm (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2010 CRUX team (http://crux.nu).
 pkgrm (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
 pkgrm (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
index 18d6169c51240de047d106f50badd24bc2b6a985..2a53a2648afbd873c1b03b1589b4edd0f234df10 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
index 5a5ebb005f6802b8458ee5751eed877a2c0504e5..967c0269f05ba573f9e52eeb32752ab785ae36d2 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
index 69fefc1e4bde7474df824508cdcc7cd77b0c79ff..f549b893e12b92884a6b437cfb9b9752868606bd 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
@@ -45,6 +45,8 @@
 
 #define INIT_ARCHIVE(ar) \
        archive_read_support_compression_gzip((ar)); \
 
 #define INIT_ARCHIVE(ar) \
        archive_read_support_compression_gzip((ar)); \
+       archive_read_support_compression_bzip2((ar)); \
+       archive_read_support_compression_xz((ar)); \
        archive_read_support_format_tar((ar))
 
 using __gnu_cxx::stdio_filebuf;
        archive_read_support_format_tar((ar))
 
 using __gnu_cxx::stdio_filebuf;
index 30b41f84e35213ad2edc81164105833b682cdfb8..faebf10d1d57c21e6568b871274a63c87c521cd2 100644 (file)
@@ -2,7 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
-//  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+//  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 // 
 //  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
 // 
 //  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
@@ -33,7 +33,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 
 #include <sys/types.h>
 #include <dirent.h>
 
-#define PKG_EXT         ".pkg.tar.gz"
+#define PKG_EXT         ".pkg.tar."
 #define PKG_DIR         "var/lib/pkg"
 #define PKG_DB          "var/lib/pkg/db"
 #define PKG_REJECTED    "var/lib/pkg/rejected"
 #define PKG_DIR         "var/lib/pkg"
 #define PKG_DB          "var/lib/pkg/db"
 #define PKG_REJECTED    "var/lib/pkg/rejected"
index baf8eb825b058c5adfdad85013ef647f61ae5151..cc05c4c8f58c3e89c2b72597ee81210ec30438ab 100644 (file)
@@ -73,6 +73,6 @@ Directory where rejected files are stored.
 .SH SEE ALSO
 pkgadd(8), pkgrm(8), pkginfo(8), pkgmk(8)
 .SH COPYRIGHT
 .SH SEE ALSO
 pkgadd(8), pkgrm(8), pkginfo(8), pkgmk(8)
 .SH COPYRIGHT
-rejmerge (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2007 CRUX team (http://crux.nu).
+rejmerge (pkgutils) is Copyright (c) 2000-2005 Per Liden and Copyright (c) 2006-2010 CRUX team (http://crux.nu).
 rejmerge (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
 rejmerge (pkgutils) is licensed through the GNU General Public License.
 Read the COPYING file for the complete license.
index 6570b77504ce22a49863d474d10f07a59cac2254..d6b479ab6ca97a5297f7a4a96e2cf6ee62d1f3b7 100755 (executable)
@@ -3,7 +3,7 @@
 #  rejmerge (pkgutils)
 # 
 #  Copyright (c) 2000-2005 Per Liden
 #  rejmerge (pkgutils)
 # 
 #  Copyright (c) 2000-2005 Per Liden
-#  Copyright (c) 2006-2007 by CRUX team (http://crux.nu)
+#  Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
 # 
 #  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
 # 
 #  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