aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2001-01-02 23:41:50 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2001-01-02 23:41:50 +0000
commit7541e3a812b0d6190b63bcc8327526d9cbef68e2 (patch)
tree7f2b94c79f12b1a8d8f184fbc9568f84d2be66cf
parent004827d71597b49c9c2eaac2654edc114981367c (diff)
downloadbusybox-7541e3a812b0d6190b63bcc8327526d9cbef68e2.tar.gz
add dpkg-deb command
-rw-r--r--Changelog3
-rw-r--r--Config.h13
-rw-r--r--applets.h3
-rw-r--r--applets/usage.c14
-rw-r--r--ar.c2
-rw-r--r--archival/ar.c2
-rw-r--r--archival/tar.c4
-rw-r--r--include/applets.h3
-rw-r--r--tar.c4
-rw-r--r--usage.c14
10 files changed, 55 insertions, 7 deletions
diff --git a/Changelog b/Changelog
index d5c7ec31c..2803ad902 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,6 @@
0.49pre
-
+
+ * Glenn McGrath -- new 'dpkg-deb' command
* me -- md5sum was broken. Now fixed.
* Matt Kraai -- new sort.c
diff --git a/Config.h b/Config.h
index c156d949c..e3bc731b0 100644
--- a/Config.h
+++ b/Config.h
@@ -25,6 +25,7 @@
#define BB_DIRNAME
#define BB_DMESG
#define BB_DOS2UNIX
+#define BB_DPKG_DEB
#define BB_DUTMP
#define BB_DU
#define BB_DUMPKMAP
@@ -327,6 +328,18 @@
#endif
#endif
//
+#ifdef BB_DPKG_DEB
+#ifndef BB_AR
+#define BB_AR
+#endif
+#ifndef BB_TAR
+#define BB_TAR
+#endif
+#ifndef BB_FEATURE_TAR_GZIP
+#define BB_FEATURE_TAR_GZIP
+#endif
+#endif
+//
#ifdef BB_TAR
#ifdef BB_FEATURE_TAR_GZIP
#ifndef BB_GUNZIP
diff --git a/applets.h b/applets.h
index fe8c59782..4837cb564 100644
--- a/applets.h
+++ b/applets.h
@@ -89,6 +89,9 @@ const struct BB_applet applets[] = {
#ifdef BB_DOS2UNIX
APPLET("dos2unix", dos2unix_main, _BB_DIR_USR_BIN, dos2unix_usage)
#endif
+#ifdef BB_DPKG_DEB
+ APPLET("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb_usage)
+#endif
#ifdef BB_DU
APPLET("du", du_main, _BB_DIR_USR_BIN, du_usage)
#endif
diff --git a/applets/usage.c b/applets/usage.c
index b904e0c7c..e92b87a9c 100644
--- a/applets/usage.c
+++ b/applets/usage.c
@@ -228,6 +228,20 @@ const char dos2unix_usage[] =
;
#endif
+#if defined BB_DPKG_DEB
+const char dpkg_deb_usage[] =
+ "dpkg-deb [-cexX] file directory"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "Perform actions on debian packages (.debs)\n"
+ "Options:\n"
+ "\t-c\tList contents of filesystem tree\n"
+ "\t-e\tExtract control files to directory\n"
+ "\t-x\tExctract packages filesystem tree to directory\n"
+ "\t-X\tVerbose extract\n"
+#endif
+ ;
+#endif
+
#if defined BB_DU
const char du_usage[] =
"du [OPTION]... [FILE]...\n"
diff --git a/ar.c b/ar.c
index bd54bb6b8..596574e6a 100644
--- a/ar.c
+++ b/ar.c
@@ -39,7 +39,7 @@ typedef struct ar_headers_s {
/*
* return the headerL_t struct for the filename descriptor
*/
-static ar_headers_t get_headers(int srcFd)
+extern ar_headers_t get_headers(int srcFd)
{
typedef struct raw_ar_header_s { /* Byte Offset */
char name[16]; /* 0-15 */
diff --git a/archival/ar.c b/archival/ar.c
index bd54bb6b8..596574e6a 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -39,7 +39,7 @@ typedef struct ar_headers_s {
/*
* return the headerL_t struct for the filename descriptor
*/
-static ar_headers_t get_headers(int srcFd)
+extern ar_headers_t get_headers(int srcFd)
{
typedef struct raw_ar_header_s { /* Byte Offset */
char name[16]; /* 0-15 */
diff --git a/archival/tar.c b/archival/tar.c
index 04e351e37..4971e4775 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -134,7 +134,7 @@ struct TarInfo
typedef struct TarInfo TarInfo;
/* Local procedures to restore files from a tar file. */
-static int readTarFile(int tarFd, int extractFlag, int listFlag,
+extern int readTarFile(int tarFd, int extractFlag, int listFlag,
int tostdoutFlag, int verboseFlag, char** extractList,
char** excludeList);
@@ -153,7 +153,7 @@ void child_died()
exit(EXIT_FAILURE);
}
-static int tar_unzip_init(int tarFd)
+extern int tar_unzip_init(int tarFd)
{
int child_pid;
static int unzip_pipe[2];
diff --git a/include/applets.h b/include/applets.h
index fe8c59782..4837cb564 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -89,6 +89,9 @@ const struct BB_applet applets[] = {
#ifdef BB_DOS2UNIX
APPLET("dos2unix", dos2unix_main, _BB_DIR_USR_BIN, dos2unix_usage)
#endif
+#ifdef BB_DPKG_DEB
+ APPLET("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb_usage)
+#endif
#ifdef BB_DU
APPLET("du", du_main, _BB_DIR_USR_BIN, du_usage)
#endif
diff --git a/tar.c b/tar.c
index 04e351e37..4971e4775 100644
--- a/tar.c
+++ b/tar.c
@@ -134,7 +134,7 @@ struct TarInfo
typedef struct TarInfo TarInfo;
/* Local procedures to restore files from a tar file. */
-static int readTarFile(int tarFd, int extractFlag, int listFlag,
+extern int readTarFile(int tarFd, int extractFlag, int listFlag,
int tostdoutFlag, int verboseFlag, char** extractList,
char** excludeList);
@@ -153,7 +153,7 @@ void child_died()
exit(EXIT_FAILURE);
}
-static int tar_unzip_init(int tarFd)
+extern int tar_unzip_init(int tarFd)
{
int child_pid;
static int unzip_pipe[2];
diff --git a/usage.c b/usage.c
index b904e0c7c..e92b87a9c 100644
--- a/usage.c
+++ b/usage.c
@@ -228,6 +228,20 @@ const char dos2unix_usage[] =
;
#endif
+#if defined BB_DPKG_DEB
+const char dpkg_deb_usage[] =
+ "dpkg-deb [-cexX] file directory"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "Perform actions on debian packages (.debs)\n"
+ "Options:\n"
+ "\t-c\tList contents of filesystem tree\n"
+ "\t-e\tExtract control files to directory\n"
+ "\t-x\tExctract packages filesystem tree to directory\n"
+ "\t-X\tVerbose extract\n"
+#endif
+ ;
+#endif
+
#if defined BB_DU
const char du_usage[] =
"du [OPTION]... [FILE]...\n"