Browse Source
* algernon * apg * aptly * arj * codecrypt * crunch * cryptopp * diskus * google-glog * hexyl * jp2a * libgfshare * libmcrypt * libmhash * libmicrohttpd * libnftnl * libsigsegv * lua-lpeg * morse2ascii * seccure * secure-delete * ssss * steghide * taglib * unicorn * vegeta * vis * wren * wuzz * zsyncemacs-27
Leonid Plyushch
5 years ago
74 changed files with 3548 additions and 0 deletions
@ -0,0 +1,35 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://algernon.roboticoverlords.org/ |
|||
TERMUX_PKG_DESCRIPTION="Small self-contained web server with Lua, Markdown, QUIC, Redis and PostgreSQL support" |
|||
TERMUX_PKG_LICENSE="MIT" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.12.5 |
|||
TERMUX_PKG_SRCURL=https://github.com/xyproto/algernon/archive/$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=b7fe682748e060c404aff5cbcbeca83feb9afb25de15c91a14c1fe78485b423b |
|||
|
|||
termux_step_make() { |
|||
termux_setup_golang |
|||
|
|||
export GOPATH=$TERMUX_PKG_BUILDDIR |
|||
mkdir -p "$GOPATH"/src/github.com/xyproto |
|||
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/xyproto/algernon |
|||
|
|||
cd "$GOPATH"/src/github.com/xyproto/algernon |
|||
|
|||
# Needed to deal with following error on v1.12.5: |
|||
# verifying github.com/lucas-clemente/quic-go@v0.12.0: checksum mismatch |
|||
rm -f go.sum |
|||
|
|||
go build |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm700 \ |
|||
"$GOPATH"/src/github.com/xyproto/algernon/algernon \ |
|||
"$TERMUX_PREFIX"/bin/ |
|||
|
|||
# Offline samples may be useful to get started with Algernon. |
|||
rm -rf "$TERMUX_PREFIX"/share/doc/algernon |
|||
mkdir -p "$TERMUX_PREFIX"/share/doc/algernon |
|||
cp -a "$GOPATH"/src/github.com/xyproto/algernon/samples \ |
|||
"$TERMUX_PREFIX"/share/doc/algernon/ |
|||
} |
@ -0,0 +1,73 @@ |
|||
diff -uNr algernon-1.12.3/engine/config.go algernon-1.12.3.mod/engine/config.go
|
|||
--- algernon-1.12.3/engine/config.go 2019-02-19 17:14:55.000000000 +0200
|
|||
+++ algernon-1.12.3.mod/engine/config.go 2019-02-25 19:41:17.564347427 +0200
|
|||
@@ -273,16 +273,16 @@
|
|||
defaultLimitString: strconv.Itoa(10), |
|||
|
|||
// Default Bolt database file, for some operating systems |
|||
- defaultBoltFilename: "/tmp/algernon.db",
|
|||
+ defaultBoltFilename: "@TERMUX_PREFIX@/tmp/algernon.db",
|
|||
|
|||
// Default log file, for some operating systems |
|||
- defaultLogFile: "/tmp/algernon.log",
|
|||
+ defaultLogFile: "@TERMUX_PREFIX@/var/log/algernon.log",
|
|||
|
|||
// Default filename for a Lua script that provides data to a template |
|||
defaultLuaDataFilename: "data.lua", |
|||
|
|||
// List of configuration filenames to check |
|||
- serverConfigurationFilenames: []string{"/etc/algernon/serverconf.lua", "/etc/algernon/server.lua"},
|
|||
+ serverConfigurationFilenames: []string{"@TERMUX_PREFIX@/etc/algernon/serverconf.lua", "@TERMUX_PREFIX@/etc/algernon/server.lua"},
|
|||
|
|||
// Compression speed over compactness |
|||
cacheCompressionSpeed: true, |
|||
diff -uNr algernon-1.12.3/engine/flags.go algernon-1.12.3.mod/engine/flags.go
|
|||
--- algernon-1.12.3/engine/flags.go 2019-02-19 17:14:55.000000000 +0200
|
|||
+++ algernon-1.12.3.mod/engine/flags.go 2019-02-25 19:42:16.171195391 +0200
|
|||
@@ -300,9 +300,9 @@
|
|||
switch { |
|||
case ac.productionMode: |
|||
// Use system directories |
|||
- ac.serverDirOrFilename = "/srv/algernon"
|
|||
- ac.serverCert = "/etc/algernon/cert.pem"
|
|||
- ac.serverKey = "/etc/algernon/key.pem"
|
|||
+ ac.serverDirOrFilename = "@TERMUX_PREFIX@/var/lib/algernon"
|
|||
+ ac.serverCert = "@TERMUX_PREFIX@/etc/algernon/cert.pem"
|
|||
+ ac.serverKey = "@TERMUX_PREFIX@/etc/algernon/key.pem"
|
|||
ac.cacheMode = cachemode.Production |
|||
ac.serverMode = true |
|||
case ac.devMode: |
|||
diff -uNr algernon-1.12.3/engine/mime.go algernon-1.12.3.mod/engine/mime.go
|
|||
--- algernon-1.12.3/engine/mime.go 2019-02-19 17:14:55.000000000 +0200
|
|||
+++ algernon-1.12.3.mod/engine/mime.go 2019-02-25 19:42:57.227988150 +0200
|
|||
@@ -6,5 +6,5 @@
|
|||
|
|||
func (ac *Config) initializeMime() { |
|||
// Read in the mimetype information from the system. Set UTF-8 when setting Content-Type. |
|||
- ac.mimereader = mime.New("/etc/mime.types", true)
|
|||
+ ac.mimereader = mime.New("@TERMUX_PREFIX@/etc/mime.types", true)
|
|||
} |
|||
diff -uNr algernon-1.12.3/vendor/github.com/go-sql-driver/mysql/dsn.go algernon-1.12.3.mod/vendor/github.com/go-sql-driver/mysql/dsn.go
|
|||
--- algernon-1.12.3/vendor/github.com/go-sql-driver/mysql/dsn.go 2019-02-19 17:14:55.000000000 +0200
|
|||
+++ algernon-1.12.3.mod/vendor/github.com/go-sql-driver/mysql/dsn.go 2019-02-25 20:31:01.069051948 +0200
|
|||
@@ -88,7 +88,7 @@
|
|||
case "tcp": |
|||
cfg.Addr = "127.0.0.1:3306" |
|||
case "unix": |
|||
- cfg.Addr = "/tmp/mysql.sock"
|
|||
+ cfg.Addr = "@TERMUX_PREFIX@/tmp/mysql.sock"
|
|||
default: |
|||
return errors.New("default addr for network '" + cfg.Net + "' unknown") |
|||
} |
|||
diff -uNr algernon-1.12.3/vendor/github.com/xyproto/gopher-lua/utils.go algernon-1.12.3.mod/vendor/github.com/xyproto/gopher-lua/utils.go
|
|||
--- algernon-1.12.3/vendor/github.com/xyproto/gopher-lua/utils.go 2019-02-19 17:14:55.000000000 +0200
|
|||
+++ algernon-1.12.3.mod/vendor/github.com/xyproto/gopher-lua/utils.go 2019-02-25 20:30:26.585626361 +0200
|
|||
@@ -156,7 +156,7 @@
|
|||
} |
|||
|
|||
func popenArgs(arg string) (string, []string) { |
|||
- cmd := "/bin/sh"
|
|||
+ cmd := "@TERMUX_PREFIX@/bin/sh"
|
|||
args := []string{"-c"} |
|||
if LuaOS == "windows" { |
|||
cmd = "C:\\Windows\\system32\\cmd.exe" |
@ -0,0 +1,51 @@ |
|||
diff -uNr apg-2.3.0b/Makefile apg-2.3.0b.mod/Makefile
|
|||
--- apg-2.3.0b/Makefile 2003-08-07 18:40:39.000000000 +0300
|
|||
+++ apg-2.3.0b.mod/Makefile 2019-05-20 02:04:28.641201031 +0300
|
|||
@@ -1,19 +1,19 @@
|
|||
################################################################## |
|||
# Directories |
|||
# Install dirs |
|||
-INSTALL_PREFIX = /usr/local
|
|||
+INSTALL_PREFIX = @TERMUX_PREFIX@
|
|||
|
|||
# Full default path is /usr/local/bin |
|||
APG_BIN_DIR = /bin |
|||
|
|||
# Full default path is /usr/local/man/man1 |
|||
-APG_MAN_DIR = /man/man1
|
|||
+APG_MAN_DIR = /share/man/man1
|
|||
|
|||
# Full default path is /usr/local/sbin |
|||
-APGD_BIN_DIR = /sbin
|
|||
+APGD_BIN_DIR = $(APG_BIN_DIR)
|
|||
|
|||
# Full default path is /usr/local/man/man8 |
|||
-APGD_MAN_DIR = /man/man8
|
|||
+APGD_MAN_DIR = /share/man/man8
|
|||
|
|||
# You should not edit 2 lines below |
|||
APGBFM_CLIBS = -lm |
|||
@@ -35,7 +35,7 @@
|
|||
# This works on MacOS X |
|||
# |
|||
STANDALONE_OPTIONS += -DAPG_USE_CRYPT |
|||
-APG_CLIBS += -lcrypt
|
|||
+APG_CLIBS += -L@TERMUX_PREFIX@/lib -lcrypt
|
|||
|
|||
################################################################## |
|||
# Support for cracklib |
|||
@@ -60,12 +60,12 @@
|
|||
################################################################## |
|||
# You can modify CC variable if you have compiler other than GCC |
|||
# But the code was designed and tested with GCC |
|||
-CC = gcc
|
|||
+CC ?= gcc
|
|||
|
|||
################################################################## |
|||
# Compilation flags |
|||
# You should comment the line below for AIX+native cc |
|||
-CFLAGS = -Wall
|
|||
+CFLAGS = -Wall -I@TERMUX_PREFIX@/include -Wl,-rpath=@TERMUX_PREFIX@/lib -Wl,--enable-new-dtags
|
|||
|
|||
#################################################################### |
|||
# If you plan to install APG daemon you should look at lines below # |
@ -0,0 +1,20 @@ |
|||
## Note: APG project seems dead. Official homepage & src urls |
|||
## disappeared. |
|||
|
|||
TERMUX_PKG_HOMEPAGE=http://www.adel.nursat.kz/apg/index.shtml |
|||
TERMUX_PKG_DESCRIPTION="Automated Password Generator" |
|||
TERMUX_PKG_LICENSE="BSD" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=2.3.0b |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=http://web.archive.org/web/20150925034746/http://www.adel.nursat.kz/apg/download/apg-${TERMUX_PKG_VERSION}.tar.gz |
|||
TERMUX_PKG_SHA256=d1e52029709e2d7f9cb99bedce3e02ee7a63cff7b8e2b4c2bc55b3dc03c28b92 |
|||
TERMUX_PKG_DEPENDS="libcrypt" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_post_extract_package() { |
|||
# Fix permissions. |
|||
find "$TERMUX_PKG_SRCDIR" -type d -exec chmod 700 "{}" \; |
|||
find "$TERMUX_PKG_SRCDIR" -type f -executable -exec chmod 700 "{}" \; |
|||
find "$TERMUX_PKG_SRCDIR" -type f ! -executable -exec chmod 600 "{}" \; |
|||
} |
@ -0,0 +1,16 @@ |
|||
diff -uNr apg-2.2.3/install-sh apg-2.2.3.mod/install-sh
|
|||
--- apg-2.2.3/install-sh 2003-08-07 18:40:30.000000000 +0300
|
|||
+++ apg-2.2.3.mod/install-sh 2019-01-28 21:07:56.823960998 +0200
|
|||
@@ -35,9 +35,9 @@
|
|||
mvprog="${MVPROG-mv}" |
|||
cpprog="${CPPROG-cp}" |
|||
chmodprog="${CHMODPROG-chmod}" |
|||
-chownprog="${CHOWNPROG-chown}"
|
|||
-chgrpprog="${CHGRPPROG-chgrp}"
|
|||
-stripprog="${STRIPPROG-strip}"
|
|||
+chownprog="${CHOWNPROG-true}"
|
|||
+chgrpprog="${CHGRPPROG-true}"
|
|||
+stripprog="${STRIPPROG-true}"
|
|||
rmprog="${RMPROG-rm}" |
|||
mkdirprog="${MKDIRPROG-mkdir}" |
|||
|
@ -0,0 +1,12 @@ |
|||
diff -uNr aptly-1.4.0/Makefile aptly-1.4.0.mod/Makefile
|
|||
--- aptly-1.4.0/Makefile 2019-07-06 16:03:14.000000000 +0300
|
|||
+++ aptly-1.4.0.mod/Makefile 2019-07-23 00:58:29.206419471 +0300
|
|||
@@ -4,7 +4,7 @@
|
|||
else |
|||
TAG="$(shell git describe --tags)" |
|||
endif |
|||
-VERSION=$(shell echo $(TAG) | sed 's@^v@@' | sed 's@-@+@g')
|
|||
+VERSION ?= $(shell echo $(TAG) | sed 's@^v@@' | sed 's@-@+@g')
|
|||
PACKAGES=context database deb files gpg http query swift s3 utils |
|||
PYTHON?=python |
|||
TESTS?= |
@ -0,0 +1,29 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://www.aptly.info |
|||
TERMUX_PKG_DESCRIPTION="A Swiss Army knife for Debian repository management." |
|||
TERMUX_PKG_LICENSE="MIT" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.4.0 |
|||
TERMUX_PKG_REVISION=2 |
|||
TERMUX_PKG_SRCURL=https://github.com/aptly-dev/aptly/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=4172d54613139f6c34d5a17396adc9675d7ed002e517db8381731d105351fbe5 |
|||
|
|||
termux_step_make() { |
|||
termux_setup_golang |
|||
export GOPATH=$TERMUX_PKG_BUILDDIR |
|||
|
|||
mkdir -p "$GOPATH"/src/github.com/aptly-dev/ |
|||
cp -a "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/aptly-dev/aptly |
|||
cd "$GOPATH"/src/github.com/aptly-dev/aptly |
|||
|
|||
make install VERSION=$TERMUX_PKG_VERSION |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm700 \ |
|||
"$GOPATH"/bin/${GOOS}_${GOARCH}/aptly \ |
|||
"$TERMUX_PREFIX"/bin/aptly |
|||
|
|||
install -Dm600 \ |
|||
"$TERMUX_PKG_SRCDIR"/man/aptly.1 \ |
|||
"$TERMUX_PREFIX"/share/man/man1/aptly.1 |
|||
} |
@ -0,0 +1,41 @@ |
|||
Description: Correct build failure on ia64 due to unaligned memory access. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2008-06-16 |
|||
|
|||
Index: b/arj_proc.c
|
|||
===================================================================
|
|||
--- a/arj_proc.c 2005-06-21 22:53:12.000000000 +0300
|
|||
+++ b/arj_proc.c 2008-06-16 08:25:28.000000000 +0300
|
|||
@@ -2898,7 +2898,7 @@ char *ltrim(char *str)
|
|||
} |
|||
#endif |
|||
|
|||
-#if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER)
|
|||
+#if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && !defined(ARJDISP) && !defined(REGISTER)
|
|||
/* Model-independent routine to get 2 bytes from far RAM */ |
|||
|
|||
unsigned int mget_word(char FAR *p) |
|||
Index: b/arj_proc.h
|
|||
===================================================================
|
|||
--- a/arj_proc.h 2004-01-25 12:39:30.000000000 +0200
|
|||
+++ b/arj_proc.h 2008-06-16 08:25:28.000000000 +0300
|
|||
@@ -12,7 +12,7 @@
|
|||
|
|||
#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF) |
|||
#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c) |
|||
-#ifndef WORDS_BIGENDIAN
|
|||
+#if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
|
|||
#define mget_word(p) (*(unsigned short *)(p)&0xFFFF) |
|||
#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w)) |
|||
#define mget_dword(p) (*(unsigned long *)(p)) |
|||
@@ -60,7 +60,7 @@ void pack_mem(struct mempack *mempack);
|
|||
void unpack_mem(struct mempack *mempack); |
|||
void strip_lf(char *str); |
|||
char *ltrim(char *str); |
|||
-#ifdef WORDS_BIGENDIAN
|
|||
+#if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
|
|||
unsigned int mget_word(char FAR *p); |
|||
unsigned long mget_dword(char FAR *p); |
|||
void mput_word(unsigned int w, char FAR *p); |
@ -0,0 +1,23 @@ |
|||
Description: 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. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2013-05-10 |
|||
|
|||
---
|
|||
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, |
@ -0,0 +1,203 @@ |
|||
Description: Make code 64-bit clean. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/339815 |
|||
Forwarded: no |
|||
Last-Update: 2005-11-24 |
|||
|
|||
Index: b/arj_arcv.c
|
|||
===================================================================
|
|||
--- a/arj_arcv.c 2005-06-21 22:53:12.000000000 +0300
|
|||
+++ b/arj_arcv.c 2008-06-16 08:25:43.000000000 +0300
|
|||
@@ -59,27 +59,27 @@ static char idxid_fault[]="?";
|
|||
#define setup_hput(ptr) (tmp_hptr=(ptr)) |
|||
|
|||
#define hget_byte() (*(tmp_hptr++)&0xFF) |
|||
-#define hput_byte(c) (*(tmp_hptr++)=(char) (c))
|
|||
+#define hput_byte(c) (*(tmp_hptr++)=(uint8_t) (c))
|
|||
|
|||
/* Reads two bytes from the header, incrementing the pointer */ |
|||
|
|||
-static unsigned int hget_word()
|
|||
+static uint16_t hget_word()
|
|||
{ |
|||
- unsigned int result;
|
|||
+ uint16_t result;
|
|||
|
|||
result=mget_word(tmp_hptr); |
|||
- tmp_hptr+=sizeof(short);
|
|||
+ tmp_hptr+=sizeof(uint16_t);
|
|||
return result; |
|||
} |
|||
|
|||
/* Reads four bytes from the header, incrementing the pointer */ |
|||
|
|||
-static unsigned long hget_longword()
|
|||
+static uint32_t hget_longword()
|
|||
{ |
|||
- unsigned long result;
|
|||
+ uint32_t result;
|
|||
|
|||
result=mget_dword(tmp_hptr); |
|||
- tmp_hptr+=sizeof(unsigned long);
|
|||
+ tmp_hptr+=sizeof(uint32_t);
|
|||
return result; |
|||
} |
|||
|
|||
@@ -87,18 +87,18 @@ static unsigned long hget_longword()
|
|||
|
|||
/* Writes two bytes to the header, incrementing the pointer */ |
|||
|
|||
-static void hput_word(unsigned int w)
|
|||
+static void hput_word(uint16_t w)
|
|||
{ |
|||
mput_word(w,tmp_hptr); |
|||
- tmp_hptr+=sizeof(unsigned short);
|
|||
+ tmp_hptr+=sizeof(uint16_t);
|
|||
} |
|||
|
|||
/* Writes four bytes to the header, incrementing the pointer */ |
|||
|
|||
-static void hput_longword(unsigned long l)
|
|||
+static void hput_longword(uint32_t l)
|
|||
{ |
|||
mput_dword(l,tmp_hptr); |
|||
- tmp_hptr+=sizeof(unsigned long);
|
|||
+ tmp_hptr+=sizeof(uint32_t);
|
|||
} |
|||
|
|||
/* Calculates and stores the basic header size */ |
|||
Index: b/arj_proc.c
|
|||
===================================================================
|
|||
--- a/arj_proc.c 2008-06-16 08:25:28.000000000 +0300
|
|||
+++ b/arj_proc.c 2008-06-16 08:25:43.000000000 +0300
|
|||
@@ -585,7 +585,7 @@ int search_for_extension(char *name, cha
|
|||
/* Returns the exact amount of data that could be safely written to the |
|||
destination volume */ |
|||
|
|||
-unsigned long get_volfree(unsigned int increment)
|
|||
+unsigned long get_volfree(unsigned long increment)
|
|||
{ |
|||
unsigned long pvol; |
|||
unsigned int arjsec_overhead; |
|||
@@ -605,7 +605,7 @@ unsigned long get_volfree(unsigned int i
|
|||
remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead- |
|||
(long)out_bytes-(long)cpos-(long)ext_voldata- |
|||
MULTIVOLUME_RESERVE-t_volume_offset; |
|||
- return((unsigned long)min(remain, (unsigned long)increment));
|
|||
+ return((unsigned long)min(remain, increment));
|
|||
} |
|||
|
|||
/* Performs various checks when multivolume data is packed to predict an |
|||
@@ -2466,14 +2466,14 @@ static int get_str_from_jq()
|
|||
*tsptr='\0'; |
|||
endptr=tsptr; |
|||
tsptr=sptr; |
|||
- while((unsigned int)tsptr<(unsigned int)endptr&&patterns<SEARCH_STR_MAX)
|
|||
+ while((intptr_t)tsptr<(intptr_t)endptr&&patterns<SEARCH_STR_MAX)
|
|||
{ |
|||
while(*tsptr=='\0') |
|||
tsptr++; |
|||
- if((unsigned int)tsptr<(unsigned int)endptr)
|
|||
+ if((intptr_t)tsptr<(intptr_t)endptr)
|
|||
{ |
|||
search_str[patterns++]=tsptr; |
|||
- while(*tsptr!='\0'&&(unsigned int)tsptr<(unsigned int)endptr)
|
|||
+ while(*tsptr!='\0'&&(intptr_t)tsptr<(intptr_t)endptr)
|
|||
tsptr++; |
|||
} |
|||
} |
|||
@@ -2901,9 +2901,9 @@ char *ltrim(char *str)
|
|||
#if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && !defined(ARJDISP) && !defined(REGISTER) |
|||
/* Model-independent routine to get 2 bytes from far RAM */ |
|||
|
|||
-unsigned int mget_word(char FAR *p)
|
|||
+uint16_t mget_word(char FAR *p)
|
|||
{ |
|||
- unsigned int b0, b1;
|
|||
+ uint16_t b0, b1;
|
|||
|
|||
b0=mget_byte(p); |
|||
b1=mget_byte(p+1); |
|||
@@ -2912,9 +2912,9 @@ unsigned int mget_word(char FAR *p)
|
|||
|
|||
/* Model-independent routine to get 4 bytes from far RAM */ |
|||
|
|||
-unsigned long mget_dword(char FAR *p)
|
|||
+uint32_t mget_dword(char FAR *p)
|
|||
{ |
|||
- unsigned long w0, w1;
|
|||
+ uint32_t w0, w1;
|
|||
|
|||
w0=mget_word(p); |
|||
w1=mget_word(p+2); |
|||
@@ -2923,7 +2923,7 @@ unsigned long mget_dword(char FAR *p)
|
|||
|
|||
/* Model-independent routine to store 2 bytes in far RAM */ |
|||
|
|||
-void mput_word(unsigned int w, char FAR *p)
|
|||
+void mput_word(uint16_t w, char FAR *p)
|
|||
{ |
|||
mput_byte(w&0xFF, p); |
|||
mput_byte(w>>8 , p+1); |
|||
@@ -2931,7 +2931,7 @@ void mput_word(unsigned int w, char FAR
|
|||
|
|||
/* Model-independent routine to store 4 bytes in far RAM */ |
|||
|
|||
-void mput_dword(unsigned long d, char FAR *p)
|
|||
+void mput_dword(uint32_t d, char FAR *p)
|
|||
{ |
|||
mput_word(d&0xFFFF, p); |
|||
mput_word(d>>16 , p+2); |
|||
Index: b/arj_proc.h
|
|||
===================================================================
|
|||
--- a/arj_proc.h 2008-06-16 08:25:28.000000000 +0300
|
|||
+++ b/arj_proc.h 2008-06-16 08:25:43.000000000 +0300
|
|||
@@ -8,15 +8,17 @@
|
|||
#ifndef ARJ_PROC_INCLUDED |
|||
#define ARJ_PROC_INCLUDED |
|||
|
|||
+#include <stdint.h>
|
|||
+
|
|||
/* Helper macros */ |
|||
|
|||
-#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
|
|||
-#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
|
|||
+#define mget_byte(p) (*(uint8_t FAR *)(p)&0xFF)
|
|||
+#define mput_byte(c, p) *(uint8_t FAR *)(p)=(uint8_t)(c)
|
|||
#if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN) |
|||
-#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
|
|||
-#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
|
|||
-#define mget_dword(p) (*(unsigned long *)(p))
|
|||
-#define mput_dword(w,p) (*(unsigned long *)(p)=(unsigned long)(w))
|
|||
+#define mget_word(p) (*(uint16_t *)(p)&0xFFFF)
|
|||
+#define mput_word(w,p) (*(uint16_t *)(p)=(uint16_t)(w))
|
|||
+#define mget_dword(p) (*(uint32_t *)(p))
|
|||
+#define mput_dword(w,p) (*(uint32_t *)(p)=(uint32_t)(w))
|
|||
#endif |
|||
|
|||
/* Prototypes */ |
|||
@@ -31,7 +33,7 @@ void copy_bytes(unsigned long nbytes);
|
|||
int translate_path(char *name); |
|||
void restart_proc(char *dest); |
|||
int search_for_extension(char *name, char *ext_list); |
|||
-unsigned long get_volfree(unsigned int increment);
|
|||
+unsigned long get_volfree(unsigned long increment);
|
|||
unsigned int check_multivolume(unsigned int increment); |
|||
void store(); |
|||
void hollow_encode(); |
|||
@@ -61,10 +63,10 @@ void unpack_mem(struct mempack *mempack)
|
|||
void strip_lf(char *str); |
|||
char *ltrim(char *str); |
|||
#if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN) |
|||
-unsigned int mget_word(char FAR *p);
|
|||
-unsigned long mget_dword(char FAR *p);
|
|||
-void mput_word(unsigned int w, char FAR *p);
|
|||
-void mput_dword(unsigned long d, char FAR *p);
|
|||
+uint16_t mget_word(char FAR *p);
|
|||
+uint32_t mget_dword(char FAR *p);
|
|||
+void mput_word(uint16_t w, char FAR *p);
|
|||
+void mput_dword(uint32_t d, char FAR *p);
|
|||
#endif |
|||
|
|||
#endif |
@ -0,0 +1,183 @@ |
|||
Description: Fix upstream build sysstem to support parallel builds. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2007-12-05 |
|||
|
|||
---
|
|||
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 |
|||
# |
|||
|
|||
-.PHONY: timestamp prepare cleanup package help
|
|||
+.PHONY: timestamp msg-headers depends prepare clean package help
|
|||
|
|||
ifdef COMMERCIAL |
|||
MAKE_KEY=$(TOOLS_DIR)/make_key$x |
|||
endif |
|||
|
|||
all: prepare timestamp |
|||
+ $(MAKE) msg-headers
|
|||
+ $(MAKE) depends
|
|||
$(MAKE) do-all |
|||
|
|||
do-all: \ |
|||
@@ -175,8 +177,28 @@ do-all: \
|
|||
$(REGISTER_DIR)/$(REGISTER)$x \ |
|||
$(ARJDISP_DIR)/arjdisp$x \ |
|||
$(TOOLS_DIR)/packager$x \ |
|||
- $(MAKE_KEY) \
|
|||
- dispose
|
|||
+ $(MAKE_KEY)
|
|||
+
|
|||
+MSG_ID := \
|
|||
+ msg_crp msg_stb msg_sfv msg_sfx msg_sfj msg_arj msg_rej msg_reg msg_adi
|
|||
+MSG_HEADERS := $(patsubst %,$(BASEDIR)/%.h,$(MSG_ID))
|
|||
+
|
|||
+msg-headers: $(MSG_HEADERS)
|
|||
+
|
|||
+.deps:
|
|||
+ mkdir -p $@
|
|||
+
|
|||
+.deps/%.d: %.c .deps
|
|||
+ $(CC) $(CPPFLAGS) $(COPT) $< -MM > $@
|
|||
+
|
|||
+SOURCES = $(wildcard *.c)
|
|||
+DEPS = $(addprefix .deps/,$(SOURCES:.c=.d))
|
|||
+
|
|||
+ifeq ($(sort $(DEPS)),$(sort $(wildcard .deps/*.d)))
|
|||
+include $(DEPS)
|
|||
+endif
|
|||
+
|
|||
+depends: $(DEPS)
|
|||
|
|||
# |
|||
# Update timestamp file |
|||
@@ -186,12 +208,6 @@ timestamp: $(TOOLS_DIR)/today$x
|
|||
$(TOOLS_DIR)/today$x $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
-# Final cleanup
|
|||
-#
|
|||
-
|
|||
-dispose:
|
|||
-
|
|||
-#
|
|||
# The tools |
|||
# |
|||
|
|||
@@ -255,7 +271,7 @@ $(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_O
|
|||
$(CC) $(ALL_CFLAGS) $(DLL_FLAGS) -o $@ $(ARJCRYPT_OBJS) $(ARJCRYPT_DEF) $(LIBS) |
|||
$(TOOLS_DIR)/postproc $@ |
|||
|
|||
-$(BASEDIR)/nmsg_crp.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/nmsg_crp.c $(BASEDIR)/msg_crp.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_crp $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -269,7 +285,7 @@ $(SFXSTUB_DIR)/sfxstub$x: $(SFXSTUB_OBJS
|
|||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(SFXSTUB_OBJS) $(LIBS) |
|||
$(TOOLS_DIR)/postproc$x $@ -sfx |
|||
|
|||
-$(BASEDIR)/nmsg_stb.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/nmsg_stb.c $(BASEDIR)/msg_stb.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_stb $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -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 |
|||
|
|||
-$(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c \
|
|||
+$(BASEDIR)/msg_sfv.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfv $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -304,7 +321,8 @@ $(ARJSFX_DIR)/arjsfx$x: $(ARJSFX_OBJS) $
|
|||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFX_OBJS) $(LIBS) |
|||
$(TOOLS_DIR)/postproc$x $@ -sfx |
|||
|
|||
-$(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c \
|
|||
+$(BASEDIR)/msg_sfx.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfx $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -319,7 +337,8 @@ $(ARJSFXJR_DIR)/arjsfxjr$x: $(ARJSFXJR_O
|
|||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXJR_OBJS) $(LIBS) |
|||
$(TOOLS_DIR)/postproc$x $@ -sfx |
|||
|
|||
-$(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c \
|
|||
+$(BASEDIR)/msg_sfj.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -354,7 +373,8 @@ $(ARJ_DIR)/arj$x: $(ARJ_OBJS) \
|
|||
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(BASEDIR)/help.arj |
|||
$(TOOLS_DIR)/postproc $@ |
|||
|
|||
-$(BASEDIR)/fmsg_arj.c $(BASEDIR)/imsg_arj.c $(BASEDIR)/nmsg_arj.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/fmsg_arj.c $(BASEDIR)/imsg_arj.c $(BASEDIR)/nmsg_arj.c \
|
|||
+$(BASEDIR)/msg_arj.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_arj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -372,7 +392,8 @@ $(REARJ_DIR)/rearj$x: $(REARJ_OBJS) \
|
|||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REARJ_OBJS) $(LIBS) |
|||
$(TOOLS_DIR)/postproc $@ |
|||
|
|||
-$(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c \
|
|||
+$(BASEDIR)/msg_rej.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_rej $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -388,7 +409,8 @@ $(REGISTER_DIR)/$(REGISTER)$x: $(REGISTE
|
|||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REGISTER_OBJS) $(LIBS) |
|||
$(TOOLS_DIR)/postproc $@ -sfx |
|||
|
|||
-$(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c \
|
|||
+$(BASEDIR)/msg_reg.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_reg $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -402,7 +424,8 @@ ARJDISP_OBJS = $(patsubst %,$(ARJDISP_DI
|
|||
$(ARJDISP_DIR)/arjdisp$x: $(ARJDISP_OBJS) |
|||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJDISP_OBJS) $(LIBS) |
|||
|
|||
-$(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
+$(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c \
|
|||
+$(BASEDIR)/msg_adi.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
|
|||
$(TOOLS_DIR)/msgbind $(RESFILE) msg_adi $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR) |
|||
|
|||
# |
|||
@@ -427,18 +450,9 @@ prepare:
|
|||
# |
|||
|
|||
clean: |
|||
- -rm -f $(BASEDIR)/*
|
|||
- -rm -f $(TOOLS_DIR)/*
|
|||
- -rm -f $(ARJCRYPT_DIR)/*
|
|||
- -rm -f $(SFXSTUB_DIR)/*
|
|||
- -rm -f $(ARJSFXV_DIR)/*
|
|||
- -rm -f $(ARJSFX_DIR)/*
|
|||
- -rm -f $(ARJSFXJR_DIR)/*
|
|||
- -rm -f $(ARJ_DIR)/*
|
|||
- -rm -f $(REARJ_DIR)/*
|
|||
- -rm -f $(REGISTER_DIR)/*
|
|||
- -rm -f $(ARJDISP_DIR)/*
|
|||
- -rm -f arj.core
|
|||
+ rm -rf .deps
|
|||
+ rm -rf $(BASEDIR)
|
|||
+ rm -f arj.core
|
|||
|
|||
# |
|||
# Local installation |
@ -0,0 +1,55 @@ |
|||
Description: Detect and conditionally use system strnlen function. |
|||
This fixes build failures when the system has eglibc 2.10. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/546475 |
|||
Forwarded: no |
|||
Last-Update: 2009-09-13 |
|||
|
|||
---
|
|||
fardata.c | 2 ++ |
|||
gnu/config.h.in | 1 + |
|||
gnu/configure.in | 4 +++- |
|||
3 files changed, 6 insertions(+), 1 deletion(-) |
|||
|
|||
--- a/fardata.c
|
|||
+++ b/fardata.c
|
|||
@@ -190,6 +190,7 @@ int msg_sprintf(char *str, FMSG *fmt, ..
|
|||
|
|||
/* Length-limited strlen() */ |
|||
|
|||
+#ifndef HAVE_STRNLEN
|
|||
static int strnlen(const char FAR *s, int count) |
|||
{ |
|||
const char FAR *sc; |
|||
@@ -198,6 +199,7 @@ static int strnlen(const char FAR *s, in
|
|||
; |
|||
return(sc-s); |
|||
} |
|||
+#endif
|
|||
|
|||
/* Hex representation of digits */ |
|||
|
|||
--- a/gnu/config.h.in
|
|||
+++ b/gnu/config.h.in
|
|||
@@ -8,6 +8,7 @@
|
|||
#undef HAVE_FCLOSEALL |
|||
#undef HAVE_SETPRIORITY |
|||
#undef HAVE_STRCASECMP |
|||
+#undef HAVE_STRNLEN
|
|||
#undef HAVE_STRUPR |
|||
#undef HAVE_STRLWR |
|||
#undef USE_COLORS |
|||
--- a/gnu/configure.in
|
|||
+++ b/gnu/configure.in
|
|||
@@ -35,7 +35,9 @@ AC_FUNC_MEMCMP
|
|||
AC_FUNC_SETVBUF_REVERSED |
|||
AC_TYPE_SIGNAL |
|||
AC_FUNC_VPRINTF |
|||
-AC_CHECK_FUNCS([getcwd min max mkdir mkdtemp rmdir fcloseall strcasecmp setpriority strdup strerror strstr strupr strlwr strtol strtoul])
|
|||
+AC_CHECK_FUNCS([getcwd min max mkdir mkdtemp rmdir fcloseall \
|
|||
+ strcasecmp setpriority strdup strerror strstr strnlen \
|
|||
+ strupr strlwr strtol strtoul])
|
|||
|
|||
dnl Platform-specific tuning |
|||
PROG_EXT= |
@ -0,0 +1,100 @@ |
|||
Description: Use a safe strcpy for overlapping strings, among others |
|||
fixes a build problem with a mangled generated .c file by msgbind |
|||
(thus FTBFS), and CRC errors at run-time. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/590354 |
|||
Forwarded: no |
|||
Last-Update: 2010-07-26 |
|||
|
|||
---
|
|||
arj.c | 2 +- |
|||
arjdata.c | 9 +-------- |
|||
ea_mgr.c | 2 +- |
|||
misc.h | 4 ++++ |
|||
msgbind.c | 2 +- |
|||
packager.c | 2 +- |
|||
6 files changed, 9 insertions(+), 12 deletions(-) |
|||
|
|||
--- a/arjdata.c
|
|||
+++ b/arjdata.c
|
|||
@@ -204,13 +204,6 @@ void date_fmt(char *dest)
|
|||
#endif |
|||
} |
|||
|
|||
-/* A safe strcpy() */
|
|||
-
|
|||
-static void safe_strcpy(char *dest, char *src)
|
|||
-{
|
|||
- memmove(dest, src, strlen(src)+1);
|
|||
-}
|
|||
-
|
|||
/* Context substitution routine */ |
|||
|
|||
char *expand_tags(char *str, int limit) |
|||
@@ -232,7 +225,7 @@ char *expand_tags(char *str, int limit)
|
|||
{ |
|||
if(*(p+1)==TAG_CHAR) |
|||
{ |
|||
- strcpy(p, p+1);
|
|||
+ safe_strcpy(p, p+1);
|
|||
p++; |
|||
} |
|||
else if(*(p+1)==TAG_SPECIAL_BEGIN&&(et=strchr(p+3, TAG_SPECIAL_END))!=NULL) |
|||
--- a/arj.c
|
|||
+++ b/arj.c
|
|||
@@ -1169,7 +1169,7 @@ int main(int argc, char *argv[])
|
|||
if(strlen(tmp_ptr)<=121) |
|||
tmp_ptr[0]='\0'; |
|||
else if(tmp_ptr[120]==' ') |
|||
- strcpy(tmp_ptr, tmp_ptr+121);
|
|||
+ safe_strcpy(tmp_ptr, tmp_ptr+121);
|
|||
} |
|||
if(cmd==ARJ_CMD_ORDER&&strpbrk(tmp_ptr, wildcard_pattern)!=NULL) |
|||
error(M_ORDER_WILDCARD); |
|||
--- a/ea_mgr.c
|
|||
+++ b/ea_mgr.c
|
|||
@@ -696,7 +696,7 @@ int resolve_longname(char *dest, char *n
|
|||
tmp_name[st_len]='\0'; |
|||
if(tmp_name[0]==0xFD&&tmp_name[1]==0xFF) |
|||
{ |
|||
- strcpy(tmp_name, (char *)tmp_name+4);
|
|||
+ safe_strcpy(tmp_name, (char *)tmp_name+4);
|
|||
st_len-=4; |
|||
} |
|||
if(st_len==0||st_len+entry>=FILENAME_MAX) |
|||
--- a/msgbind.c
|
|||
+++ b/msgbind.c
|
|||
@@ -578,7 +578,7 @@ int main(int argc, char **argv)
|
|||
} |
|||
strcat(pool[tpool].data, msgname); |
|||
strcat(pool[tpool].data, ", "); |
|||
- strcpy(msg_buffer, msg_buffer+1);
|
|||
+ safe_strcpy(msg_buffer, msg_buffer+1);
|
|||
buf_len=strlen(msg_buffer); |
|||
msg_buffer[--buf_len]='\0'; |
|||
patch_string(msg_buffer); |
|||
--- a/packager.c
|
|||
+++ b/packager.c
|
|||
@@ -347,7 +347,7 @@ int main(int argc, char **argv)
|
|||
expand_tags(buf, sizeof(buf)-1); |
|||
if((p=strchr(buf, '.'))!=NULL) |
|||
{ |
|||
- strcpy(p, p+1);
|
|||
+ safe_strcpy(p, p+1);
|
|||
if((p=strchr(buf, '.'))!=NULL) |
|||
*p='\0'; |
|||
} |
|||
--- a/misc.h
|
|||
+++ b/misc.h
|
|||
@@ -11,6 +11,10 @@
|
|||
#include "arjtypes.h" |
|||
#include "filelist.h" |
|||
|
|||
+/* A safe strcpy() */
|
|||
+
|
|||
+#define safe_strcpy(dest, src) memmove(dest, src, strlen(src)+1);
|
|||
+
|
|||
/* ASCIIZ string copy macro */ |
|||
|
|||
#define strcpyn(dest, src, n) \ |
@ -0,0 +1,41 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://arj.sourceforge.net/ |
|||
TERMUX_PKG_DESCRIPTION="Open-source version of arj archiver" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=3.10.22 |
|||
TERMUX_PKG_REVISION=5 |
|||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/arj/arj-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=589e4c9bccc8669e7b6d8d6fcd64e01f6a2c21fe10aad56a83304ecc3b96a7db |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_pre_configure() { |
|||
(cd ./gnu && autoconf -f -i) |
|||
|
|||
# Hack for executing configure script in |
|||
# non-standard directory. |
|||
{ |
|||
echo "#!/bin/sh" |
|||
echo "cd ./gnu" |
|||
echo "\$(dirname \$0)/gnu/configure \"\$@\"" |
|||
} > ./configure |
|||
chmod +x ./configure |
|||
} |
|||
|
|||
# ARJ appends archive of its help to its end. Unfortunately stripping and |
|||
# ELF cleaning remove it. So redo this addition and correct the |
|||
# ARJ self-checksum. |
|||
termux_step_post_massage() { |
|||
local build_subdir |
|||
|
|||
if [ "$TERMUX_ARCH" = "arm" ]; then |
|||
build_subdir="linux-androideabi" |
|||
else |
|||
build_subdir="linux-android" |
|||
fi |
|||
|
|||
"$TERMUX_PKG_SRCDIR/$build_subdir"/en/rs/tools/join \ |
|||
bin/arj \ |
|||
"$TERMUX_PKG_SRCDIR/$build_subdir"/en/rs/help.arj |
|||
"$TERMUX_PKG_SRCDIR/$build_subdir"/en/rs/tools/postproc \ |
|||
bin/arj |
|||
} |
@ -0,0 +1,21 @@ |
|||
Description: Refer to original author Robert K. Jung in the manual page. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/456275 |
|||
Forwarded: no |
|||
Last-Update: 2008-06-16 |
|||
|
|||
Index: b/resource/en/arj.1
|
|||
===================================================================
|
|||
--- a/resource/en/arj.1 2005-06-21 21:27:20.000000000 +0300
|
|||
+++ b/resource/en/arj.1 2008-06-16 08:25:47.000000000 +0300
|
|||
@@ -21,6 +21,9 @@ arj \- Archiver for .arj files
|
|||
.IR archive [ .arj ] |
|||
.RI [ "base directory" ] |
|||
.RI [ "!list name" | "path name" | "wildcard name" ] |
|||
+.SH DESCRIPTION
|
|||
+\fIarj\fP is a compression and file archiving utility. It was invented by
|
|||
+Robert K. Jung. \fIARJ\fP stands for \fIA\fPrchived by \fIR\fPobert \fIJ\fPung.
|
|||
.SH COMMANDS |
|||
.TP |
|||
.B ac |
@ -0,0 +1,31 @@ |
|||
Description: Fix build failure on GNU/Hurd due to missing -ldl, by |
|||
adding “gnu*” to the configure case handling libdl linking. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2011-02-28 |
|||
|
|||
---
|
|||
gnu/configure.in | 7 +------ |
|||
1 file changed, 1 insertion(+), 6 deletions(-) |
|||
|
|||
--- a/gnu/configure.in
|
|||
+++ b/gnu/configure.in
|
|||
@@ -49,16 +49,11 @@ OS_DEF="-D_UNIX"
|
|||
DLL_CFLAGS="-fPIC" |
|||
|
|||
case $host_os in |
|||
-linux*)
|
|||
+gnu*|linux*|k*bsd*)
|
|||
AC_DEFINE(ELF_EXECUTABLES, 1, [Define if executables use ELF format]) |
|||
DYN_LIBS="-ldl" |
|||
LD_STRIP="gnu/stripgcc.lnk" |
|||
;; |
|||
-k*bsd*)
|
|||
- AC_DEFINE(ELF_EXECUTABLES)
|
|||
- DYN_LIBS="-ldl"
|
|||
- LD_STRIP="gnu/stripgcc.lnk"
|
|||
- ;;
|
|||
*bsd*) |
|||
AC_DEFINE(ELF_EXECUTABLES) |
|||
DLL_FLAGS="-shared -export-dynamic" |
@ -0,0 +1,44 @@ |
|||
Description: Fix upstream build system to honour CPPFLAGS and LDFLAGS. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2013-05-09 |
|||
|
|||
---
|
|||
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)) |
@ -0,0 +1,44 @@ |
|||
Description: Support PIE build option. |
|||
We always pass -shared and -fPIC after all user defined flags, so that these |
|||
will override any possibly passed -fPIE option. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2016-06-03 |
|||
|
|||
---
|
|||
gnu/configure.in | 2 ++ |
|||
gnu/makefile.in | 4 ++-- |
|||
2 files changed, 4 insertions(+), 2 deletions(-) |
|||
|
|||
--- a/gnu/makefile.in
|
|||
+++ b/gnu/makefile.in
|
|||
@@ -85,7 +85,7 @@ SFXSTUB_DIR = $(BASEDIR)/sfxstub
|
|||
# Definitions for compiling submodules |
|||
|
|||
LDFLAGS = @LDFLAGS@ $(ADD_LDFLAGS) |
|||
-DLL_FLAGS = @DLL_FLAGS@ $(LDFLAGS)
|
|||
+DLL_FLAGS = $(LDFLAGS) @DLL_FLAGS@
|
|||
DLL_CFLAGS = @DLL_CFLAGS@ |
|||
REQUIRES_DEF = @REQUIRES_DEF@ |
|||
|
|||
@@ -98,7 +98,7 @@ ARJSFXJR_COPT = -DSFL=1 $(COPT)
|
|||
REARJ_COPT = -DREARJ $(COPT) |
|||
REGISTER_COPT = -DREGISTER $(COPT) |
|||
ARJDISP_COPT = -DARJDISP $(COPT) |
|||
-ARJCRYPT_COPT = $(DLL_CFLAGS) $(COPT)
|
|||
+ARJCRYPT_COPT = $(COPT) $(DLL_CFLAGS)
|
|||
SFXSTUB_COPT = -DSFXSTUB $(COPT) |
|||
|
|||
# Linkage |
|||
--- a/gnu/configure.in
|
|||
+++ b/gnu/configure.in
|
|||
@@ -52,6 +52,8 @@ case $host_os in
|
|||
gnu*|linux*|k*bsd*) |
|||
AC_DEFINE(ELF_EXECUTABLES, 1, [Define if executables use ELF format]) |
|||
DYN_LIBS="-ldl" |
|||
+ DLL_FLAGS="-shared -fPIC"
|
|||
+ DLL_CFLAGS="-fPIC"
|
|||
LD_STRIP="gnu/stripgcc.lnk" |
|||
;; |
|||
*bsd*) |
@ -0,0 +1,105 @@ |
|||
Description: Support nostrip build option. |
|||
By changing the upstrem build system to optionally strip the binaries |
|||
after the linking stage and before their preprocessing. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/436473 |
|||
Forwarded: no |
|||
Last-Update: 2013-05-10 |
|||
|
|||
---
|
|||
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 --remove-section=.comment --remove-section=.note
|
|||
+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) |
@ -0,0 +1,24 @@ |
|||
Description: Fix build failure on GNU/Hurd, by handling unimplemented |
|||
fcntl(F_GETLK). The Hurd does not implement yet fcntl(F_GETLK) and |
|||
returns ENOSYS, handle this as a non-fatal error. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2013-05-10 |
|||
|
|||
---
|
|||
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 |
@ -0,0 +1,16 @@ |
|||
Declare arj_integrity_identifier as global. |
|||
|
|||
Without this it's not added to resulting binary |
|||
and we need it. |
|||
|
|||
--- src-orig/integr.c 2017-09-08 21:45:38.422802558 +0200
|
|||
+++ src/integr.c 2017-09-08 22:25:22.853785365 +0200
|
|||
@@ -5,7 +5,7 @@
|
|||
* |
|||
*/ |
|||
|
|||
-static volatile const char intergrity_identifier[] = {
|
|||
+volatile const char arj_intergrity_identifier[] = {
|
|||
0xB0, 0x03, 0xB0, 0x02, 0xB0, 0x03, |
|||
0xB0, 0x04, 0xB0, 0x05, |
|||
0x90, 0x90, 0x90, 0x90, |
@ -0,0 +1,15 @@ |
|||
Fix mode consts. |
|||
|
|||
Use modern consts present on modern Android. |
|||
|
|||
--- src-orig/arjsfxjr.c 2017-09-08 21:45:38.418802563 +0200
|
|||
+++ src/arjsfxjr.c 2017-09-08 22:12:14.130184907 +0200
|
|||
@@ -520,7 +520,7 @@
|
|||
} |
|||
} |
|||
create_subdir_tree(filename); |
|||
- if(file_type!=ARJT_DIR&&(atstream=open(filename, O_CREAT|O_TRUNC|O_BINARY|O_RDWR, S_IREAD|S_IWRITE))<0)
|
|||
+ if(file_type!=ARJT_DIR&&(atstream=open(filename, O_CREAT|O_TRUNC|O_BINARY|O_RDWR, S_IRUSR|S_IWUSR))<0)
|
|||
{ |
|||
skip_file(M_CANTOPEN_F); |
|||
errors++; |
@ -0,0 +1,42 @@ |
|||
Description: Fix out-of-bounds read |
|||
We need to handle possible overflows, by using an int instead of a short, |
|||
and terminating if after computing the index it is out-of-bounds. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/783948 |
|||
Forwarded: no |
|||
Last-Update: 2015-07-01 |
|||
|
|||
---
|
|||
|
|||
--- arj-3.10.22.orig/decode.c
|
|||
+++ arj-3.10.22/decode.c
|
|||
@@ -416,10 +416,10 @@ static void NEAR decode_end()
|
|||
|
|||
void decode(int action) |
|||
{ |
|||
- short i;
|
|||
- short r;
|
|||
- short c;
|
|||
- static short j;
|
|||
+ int i;
|
|||
+ int r;
|
|||
+ int c;
|
|||
+ static int j;
|
|||
|
|||
#if SFX_LEVEL>=ARJSFXV |
|||
if(!setjmp(decode_proc)) |
|||
@@ -450,9 +450,12 @@ void decode(int action)
|
|||
{ |
|||
j=c-(UCHAR_MAX+1-THRESHOLD); |
|||
count-=(unsigned long)j; |
|||
- i=r-decode_p()-1;
|
|||
+ int P = decode_p();
|
|||
+ i=r-P-1;
|
|||
if(i<0) |
|||
i+=DICSIZ; |
|||
+ if(i<0)
|
|||
+ goto termination;
|
|||
if(r>i&&r<DICSIZ-MAXMATCH-1) |
|||
{ |
|||
while(--j>=0) |
@ -0,0 +1,35 @@ |
|||
Description: Fix buffer overflow causing an invalid pointer free(). |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/774015 |
|||
Forwarded: no |
|||
Last-Update: 2015-02-26 |
|||
|
|||
---
|
|||
decode.c | 6 +++--- |
|||
1 file changed, 3 insertions(+), 3 deletions(-) |
|||
|
|||
--- a/decode.c
|
|||
+++ b/decode.c
|
|||
@@ -255,7 +255,7 @@ void read_pt_len(int nn, int nbit, int i
|
|||
if(i==i_special) |
|||
{ |
|||
c=getbits(2); |
|||
- while(--c>=0)
|
|||
+ while(--c>=0&&i<nn)
|
|||
pt_len[i++]=0; |
|||
} |
|||
} |
|||
@@ -314,10 +314,10 @@ void read_c_len()
|
|||
c=getbits(CBIT); |
|||
c+=20; |
|||
} |
|||
- while(--c>=0)
|
|||
+ while(--c>=0&&i<NC)
|
|||
c_len[i++]=0; |
|||
} |
|||
- else
|
|||
+ else if (i<NC)
|
|||
c_len[i++]=(unsigned char)(c-2); |
|||
} |
|||
while(i<NC) |
@ -0,0 +1,33 @@ |
|||
Description: Fix absolute path traversals. |
|||
Catch multiple leading slashes when checking for absolute path traversals. |
|||
. |
|||
Fixes CVE-2015-0557. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/774435 |
|||
Forwarded: no |
|||
Last-Update: 2015-02-26 |
|||
|
|||
---
|
|||
environ.c | 3 +++ |
|||
1 file changed, 3 insertions(+) |
|||
|
|||
--- a/environ.c
|
|||
+++ b/environ.c
|
|||
@@ -1087,6 +1087,8 @@ static char *validate_path(char *name)
|
|||
if(action!=VALIDATE_DRIVESPEC) |
|||
{ |
|||
#endif |
|||
+ while (name[0]!='\0'&&
|
|||
+ (name[0]=='.'||name[0]==PATHSEP_DEFAULT||name[0]==PATHSEP_UNIX)) {
|
|||
if(name[0]=='.') |
|||
{ |
|||
if(name[1]=='.'&&(name[2]==PATHSEP_DEFAULT||name[2]==PATHSEP_UNIX)) |
|||
@@ -1096,6 +1098,7 @@ static char *validate_path(char *name)
|
|||
} |
|||
if(name[0]==PATHSEP_DEFAULT||name[0]==PATHSEP_UNIX) |
|||
name++; /* "\\" - revert to root */ |
|||
+ }
|
|||
#if SFX_LEVEL>=ARJSFXV |
|||
} |
|||
} |
@ -0,0 +1,85 @@ |
|||
Description: Fix symlink directory traversal. |
|||
Do not allow symlinks that traverse the current directoru, nor absolute |
|||
symlinks. |
|||
. |
|||
Fixes CVE-2015-0556. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Bug-Debian: https://bugs.debian.org/774434 |
|||
Forwarded: no |
|||
Last-Update: 2015-03-28 |
|||
|
|||
---
|
|||
uxspec.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
1 file changed, 54 insertions(+) |
|||
|
|||
--- a/uxspec.c
|
|||
+++ b/uxspec.c
|
|||
@@ -120,6 +120,58 @@ int query_uxspecial(char FAR **dest, cha
|
|||
} |
|||
#endif |
|||
|
|||
+#if TARGET==UNIX
|
|||
+static int is_link_traversal(const char *name)
|
|||
+{
|
|||
+ enum {
|
|||
+ STATE_NONE,
|
|||
+ STATE_DOTS,
|
|||
+ STATE_NAME,
|
|||
+ } state = STATE_NONE;
|
|||
+ int ndir = 0;
|
|||
+ int dots = 0;
|
|||
+
|
|||
+ while(*name) {
|
|||
+ int c = *name++;
|
|||
+
|
|||
+ if (c == '/')
|
|||
+ {
|
|||
+ if ((state == STATE_DOTS) && (dots == 2))
|
|||
+ ndir--;
|
|||
+ if (ndir < 0)
|
|||
+ return 1;
|
|||
+ if ((state == STATE_DOTS && dots == 1) && ndir == 0)
|
|||
+ return 1;
|
|||
+ if (state == STATE_NONE && ndir == 0)
|
|||
+ return 1;
|
|||
+ if ((state == STATE_DOTS) && (dots > 2))
|
|||
+ ndir++;
|
|||
+ state = STATE_NONE;
|
|||
+ dots = 0;
|
|||
+ }
|
|||
+ else if (c == '.')
|
|||
+ {
|
|||
+ if (state == STATE_NONE)
|
|||
+ state = STATE_DOTS;
|
|||
+ dots++;
|
|||
+ }
|
|||
+ else
|
|||
+ {
|
|||
+ if (state == STATE_NONE)
|
|||
+ ndir++;
|
|||
+ state = STATE_NAME;
|
|||
+ }
|
|||
+ }
|
|||
+
|
|||
+ if ((state == STATE_DOTS) && (dots == 2))
|
|||
+ ndir--;
|
|||
+ if ((state == STATE_DOTS) && (dots > 2))
|
|||
+ ndir++;
|
|||
+
|
|||
+ return ndir < 0;
|
|||
+}
|
|||
+#endif
|
|||
+
|
|||
/* Restores the UNIX special file data */ |
|||
|
|||
int set_uxspecial(char FAR *storage, char *name) |
|||
@@ -156,6 +208,8 @@ int set_uxspecial(char FAR *storage, cha
|
|||
l=sizeof(tmp_name)-1; |
|||
far_memmove((char FAR *)tmp_name, dptr, l); |
|||
tmp_name[l]='\0'; |
|||
+ if (is_link_traversal(tmp_name))
|
|||
+ return(UXSPEC_RC_ERROR);
|
|||
rc=(id==UXSB_HLNK)?link(tmp_name, name):symlink(tmp_name, name); |
|||
if(!rc) |
|||
return(0); |
@ -0,0 +1,308 @@ |
|||
Description: Fix format security errors. |
|||
Author: Guillem Jover <guillem@debian.org> |
|||
Origin: vendor |
|||
Forwarded: no |
|||
Last-Update: 2013-05-09 |
|||
|
|||
---
|
|||
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<SEARCH_STR_MAX; search_occurences[pattern++]=0); |
|||
reserve_size=0; |
|||
@@ -3652,7 +3652,7 @@ void archive_cleanup()
|
|||
{ |
|||
if(msg_fprintf(idxstream, M_TESTING, archive_name)<0) |
|||
error(M_DISK_FULL); |
|||
- if(fprintf(idxstream, lf)<0)
|
|||
+ if(fprintf(idxstream, "\n")<0)
|
|||
error(M_DISK_FULL); |
|||
} |
|||
cmd_verb=ARJ_CMD_TEST; |
|||
--- a/arjsfx.c
|
|||
+++ b/arjsfx.c
|
|||
@@ -214,7 +214,7 @@ static void final_cleanup(void)
|
|||
freopen(dev_con, m_w, stdout); |
|||
#if SFX_LEVEL>=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); |
@ -0,0 +1,52 @@ |
|||
Description: Fix arj self-integrity check on 64-bit systems |
|||
Author: B Watson <yalhcru@gmail.com> |
|||
Origin: other, http://slackbuilds.org/cgit/slackbuilds/tree/system/arj/patches/SBo_integrity_64bit.patch |
|||
Forwarded: no |
|||
Reviewed-By: Guillem Jover <guillem@debian.org> |
|||
Last-Update: 2014-08-06 |
|||
|
|||
diff -Naur arj-3.10.22/arj_proc.c arj-3.10.22.patched/arj_proc.c
|
|||
--- arj-3.10.22/arj_proc.c 2005-06-21 15:53:12.000000000 -0400
|
|||
+++ arj-3.10.22.patched/arj_proc.c 2014-08-06 04:11:35.000000000 -0400
|
|||
@@ -7,6 +7,7 @@
|
|||
* |
|||
*/ |
|||
|
|||
+#include <stdint.h>
|
|||
#include "arj.h" |
|||
|
|||
DEBUGHDR(__FILE__) /* Debug information block */ |
|||
@@ -929,9 +930,9 @@
|
|||
#endif |
|||
fclose(stream); |
|||
#if SFX_LEVEL>=ARJSFXV |
|||
- return(crc32term==st_crc&&fsize==st_fsize);
|
|||
+ return((uint32_t)crc32term==(uint32_t)st_crc&&(uint32_t)fsize==(uint32_t)st_fsize);
|
|||
#else |
|||
- if(crc32term==st_crc&&fsize==st_fsize)
|
|||
+ if((uint32_t)crc32term==(uint32_t)st_crc&&(uint32_t)fsize==(uint32_t)st_fsize)
|
|||
msg_cprintf(0, M_INTEGRITY_OK); |
|||
else |
|||
pause_error(M_INTEGRITY_VIOLATED); |
|||
diff -Naur arj-3.10.22/postproc.c arj-3.10.22.patched/postproc.c
|
|||
--- arj-3.10.22/postproc.c 2003-06-22 07:12:28.000000000 -0400
|
|||
+++ arj-3.10.22.patched/postproc.c 2014-08-06 03:22:16.000000000 -0400
|
|||
@@ -6,6 +6,7 @@
|
|||
* |
|||
*/ |
|||
|
|||
+#include <stdint.h>
|
|||
#include "arj.h" |
|||
|
|||
/* Operations */ |
|||
@@ -37,8 +38,9 @@
|
|||
|
|||
static char buf[PROC_BLOCK_SIZE]; |
|||
|
|||
-static void _fput_dword(const unsigned long l, FILE *stream)
|
|||
+static void _fput_dword(const unsigned long w, FILE *stream)
|
|||
{ |
|||
+ uint32_t l = (uint32_t)w;
|
|||
#ifdef WORDS_BIGENDIAN |
|||
fputc(l ,stream); |
|||
fputc(l>>8 ,stream); |
@ -0,0 +1,230 @@ |
|||
Make arj cross-compileable. |
|||
|
|||
arj assumes that build and host are the same. |
|||
Fix those assumptions. |
|||
|
|||
diff '--exclude=config.status' '--exclude=configure' '--exclude=*autom4te*' '--exclude=config.log' '--exclude=*~' -ur src-orig/gnu/configure.in src/gnu/configure.in
|
|||
--- src-orig/gnu/configure.in 2017-09-08 21:45:38.474802486 +0200
|
|||
+++ src/gnu/configure.in 2017-09-08 23:09:57.990014311 +0200
|
|||
@@ -15,11 +15,15 @@
|
|||
AC_CONFIG_HEADER([../c_defs.h:config.h.in]) |
|||
|
|||
dnl Checks for the canonical system name |
|||
+AC_CANONICAL_BUILD
|
|||
AC_CANONICAL_HOST |
|||
|
|||
dnl Checks for programs. |
|||
AC_PROG_CC |
|||
|
|||
+AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc clang])
|
|||
+test -z "$BUILD_CC" && AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])
|
|||
+
|
|||
dnl Checks for header files. |
|||
AC_HEADER_STDC |
|||
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h]) |
|||
@@ -196,6 +200,7 @@
|
|||
AC_SUBST(LD_STRIP) |
|||
AC_SUBST(REGISTER) |
|||
AC_SUBST(TOLERANT_FNMATCH) |
|||
+AC_SUBST(BUILD_CC)
|
|||
|
|||
AC_CONFIG_FILES([../GNUmakefile:makefile.in]) |
|||
AC_OUTPUT |
|||
diff '--exclude=config.status' '--exclude=configure' '--exclude=*autom4te*' '--exclude=config.log' '--exclude=*~' -ur src-orig/gnu/makefile.in src/gnu/makefile.in
|
|||
--- src-orig/gnu/makefile.in 2017-09-08 21:45:38.474802486 +0200
|
|||
+++ src/gnu/makefile.in 2017-09-08 23:17:01.790798189 +0200
|
|||
@@ -14,6 +14,8 @@
|
|||
LIBS = @LIBS@ |
|||
REGISTER = @REGISTER@ |
|||
|
|||
+BUILD_CC = @BUILD_CC@
|
|||
+
|
|||
# Programs |
|||
|
|||
INSTALL = @INSTALL@ |
|||
@@ -40,17 +42,21 @@
|
|||
|
|||
ALL_CFLAGS = -DLOCALE=LANG_$(LOCALE) -DLOCALE_DESC="\"$(LOCALE)\"" \ |
|||
-DPKGLIBDIR="\"$(pkglibdir)\"" @OS_DEF@ |
|||
+BUILD_ALL_CFLAGS = -DLOCALE=LANG_$(LOCALE) -DLOCALE_DESC="\"$(LOCALE)\"" \
|
|||
+ -DPKGLIBDIR="\"$(pkglibdir)\"" @OS_DEF@
|
|||
|
|||
ifndef COMMERCIAL |
|||
PACKAGE = s |
|||
else |
|||
PACKAGE = c |
|||
ALL_CFLAGS += -DCOMMERCIAL |
|||
+BUILD_ALL_CFLAGS += -DCOMMERCIAL
|
|||
endif |
|||
|
|||
ifdef DEBUG |
|||
DEBUG_SM = d |
|||
ALL_CFLAGS += -DDEBUG |
|||
+BUILD_ALL_CFLAGS += -DDEBUG
|
|||
else |
|||
DEBUG_SM = r |
|||
endif |
|||
@@ -62,6 +68,7 @@
|
|||
endif |
|||
|
|||
ALL_CFLAGS += @CPPFLAGS@ $(CPPFLAGS) @CFLAGS@ $(CFLAGS) |
|||
+BUILD_ALL_CFLAGS += $(BUILD_CPPFLAGS) $(BUILD_CFLAGS)
|
|||
|
|||
# Build Installation paths |
|||
|
|||
@@ -73,6 +80,7 @@
|
|||
|
|||
TOOLS_DIR = $(BASEDIR)/tools |
|||
ARJ_DIR = $(BASEDIR)/arj |
|||
+BUILD_ARJ_DIR = $(BASEDIR)/build-arj
|
|||
ARJSFXV_DIR = $(BASEDIR)/arjsfxv |
|||
ARJSFX_DIR = $(BASEDIR)/arjsfx |
|||
ARJSFXJR_DIR = $(BASEDIR)/arjsfxjr |
|||
@@ -90,8 +98,10 @@
|
|||
REQUIRES_DEF = @REQUIRES_DEF@ |
|||
|
|||
COPT = -c -I@OUT_DIR@ -I$(BASEDIR) -I$(SRC_DIR) $(ALL_CFLAGS) |
|||
-STD_COPT = -DARJUTIL $(COPT)
|
|||
+BUILD_COPT = -c -I@OUT_DIR@ -I$(BASEDIR) -I$(SRC_DIR) $(BUILD_ALL_CFLAGS)
|
|||
+BUILD_STD_COPT = -DARJUTIL $(BUILD_COPT)
|
|||
ARJ_COPT = -DSFL=4 $(COPT) |
|||
+BUILD_ARJ_COPT = -DSFL=4 $(BUILD_COPT)
|
|||
ARJSFXV_COPT = -DSFL=3 $(COPT) |
|||
ARJSFX_COPT = -DSFL=2 $(COPT) |
|||
ARJSFXJR_COPT = -DSFL=1 $(COPT) |
|||
@@ -106,6 +116,9 @@
|
|||
$(ARJ_DIR)/%.o: $(BASEDIR)/%.c |
|||
$(CC) $(COPT) -o$@ $< |
|||
|
|||
+$(BUILD_ARJ_DIR)/%.o: $(BASEDIR)/%.c
|
|||
+ $(BUILD_CC) -DDISABLE_ARJCRYPT=1 $(BUILD_COPT) -o$@ $<
|
|||
+
|
|||
$(ARJSFX_DIR)/%.o: $(BASEDIR)/%.c |
|||
$(CC) $(COPT) -o$@ $< |
|||
|
|||
@@ -131,11 +144,14 @@
|
|||
$(CC) $(COPT) -o$@ $< |
|||
|
|||
$(TOOLS_DIR)/%.o: $(SRC_DIR)/%.c |
|||
- $(CC) $(STD_COPT) -o$@ $<
|
|||
+ $(BUILD_CC) $(BUILD_STD_COPT) -o$@ $<
|
|||
|
|||
$(ARJ_DIR)/%.o: $(SRC_DIR)/%.c |
|||
$(CC) $(ARJ_COPT) -o$@ $< |
|||
|
|||
+$(BUILD_ARJ_DIR)/%.o: $(SRC_DIR)/%.c
|
|||
+ $(BUILD_CC) $(BUILD_ARJ_COPT) -DDISABLE_ARJCRYPT=1 -o$@ $<
|
|||
+
|
|||
$(ARJSFXV_DIR)/%.o: $(SRC_DIR)/%.c |
|||
$(CC) $(ARJSFXV_COPT) -o$@ $< |
|||
|
|||
@@ -235,22 +251,22 @@
|
|||
filemode.o packager.o arjdata.o) |
|||
|
|||
$(TOOLS_DIR)/msgbind$x: $(MSGBIND_OBJS) |
|||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(MSGBIND_OBJS) $(LIBS)
|
|||
+ $(BUILD_CC) $(BUILD_ALL_CFLAGS) $(BUILD_LDFLAGS) -ldl -o $@ $(MSGBIND_OBJS) $(LIBS)
|
|||
|
|||
$(TOOLS_DIR)/today$x: $(TODAY_OBJS) |
|||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(TODAY_OBJS) $(LIBS)
|
|||
+ $(BUILD_CC) $(BUILD_ALL_CFLAGS) $(BUILD_LDFLAGS) -ldl -o $@ $(TODAY_OBJS) $(LIBS)
|
|||
|
|||
$(TOOLS_DIR)/make_key$x: $(MAKE_KEY_OBJS) |
|||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(MAKE_KEY_OBJS) $(LIBS)
|
|||
+ $(BUILD_CC) $(BUILD_ALL_CFLAGS) $(BUILD_LDFLAGS) -ldl -o $@ $(MAKE_KEY_OBJS) $(LIBS)
|
|||
|
|||
$(TOOLS_DIR)/postproc$x: $(POSTPROC_OBJS) |
|||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(POSTPROC_OBJS) $(LIBS)
|
|||
+ $(BUILD_CC) $(BUILD_ALL_CFLAGS) $(BUILD_LDFLAGS) -ldl -o $@ $(POSTPROC_OBJS) $(LIBS)
|
|||
|
|||
$(TOOLS_DIR)/join$x: $(JOIN_OBJS) |
|||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JOIN_OBJS) $(LIBS)
|
|||
+ $(BUILD_CC) $(BUILD_ALL_CFLAGS) $(BUILD_LDFLAGS) -ldl -o $@ $(JOIN_OBJS) $(LIBS)
|
|||
|
|||
$(TOOLS_DIR)/packager$x: $(PACKAGER_OBJS) |
|||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(PACKAGER_OBJS) $(LIBS)
|
|||
+ $(BUILD_CC) $(BUILD_ALL_CFLAGS) $(BUILD_LDFLAGS) -ldl -o $@ $(PACKAGER_OBJS) $(LIBS)
|
|||
|
|||
# This rule tells that timestamping badly needs date_sig.c (it may bail out |
|||
# otherwise when the timestamps are being created for the first time) |
|||
@@ -355,17 +371,22 @@
|
|||
# ARJ itself |
|||
# |
|||
|
|||
-ARJ_OBJS = $(patsubst %,$(ARJ_DIR)/%, \
|
|||
- filemode.o date_sig.o fmsg_arj.o imsg_arj.o \
|
|||
+ARJ_OBJS_BASE= filemode.o date_sig.o fmsg_arj.o imsg_arj.o \
|
|||
nmsg_arj.o integr.o file_reg.o decode.o encode.o \ |
|||
arj.o enc_gwy.o fardata.o arj_user.o arj_arcv.o \ |
|||
arj_file.o crc32.o misc.o debug.o arj_proc.o \ |
|||
environ.o ea_mgr.o uxspec.o ext_hdr.o arjtypes.o exe_sear.o chk_fmsg.o \ |
|||
filelist.o arjsec_h.o arjsec_l.o garble.o scrnio.o ansi.o \ |
|||
crc16tab.o recovery.o gost.o gost40.o gost_t.o \ |
|||
- externs.o)
|
|||
+ externs.o
|
|||
+
|
|||
+ARJ_OBJS = $(patsubst %,$(ARJ_DIR)/%, $(ARJ_OBJS_BASE) )
|
|||
+BUILD_ARJ_OBJS = $(patsubst %,$(BUILD_ARJ_DIR)/%, $(ARJ_OBJS_BASE) )
|
|||
+
|
|||
+$(BUILD_ARJ_DIR)/arj$x: $(BUILD_ARJ_OBJS)
|
|||
+ $(BUILD_CC) $(BUILD_ALL_CFLAGS) $(BUILD_LDFLAGS) -ldl -o $@ $(BUILD_ARJ_OBJS)
|
|||
|
|||
-$(ARJ_DIR)/arj$x: $(ARJ_OBJS) \
|
|||
+$(ARJ_DIR)/arj$x: $(ARJ_OBJS) $(BUILD_ARJ_DIR)/arj$x \
|
|||
$(RES_DIR)/$(LOCALE)/arjl.txt $(RES_DIR)/$(LOCALE)/arjs.txt \ |
|||
$(TOOLS_DIR)/join$x \ |
|||
$(TOOLS_DIR)/postproc$x \ |
|||
@@ -380,7 +401,7 @@
|
|||
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(ARJSFXV_DIR)/arjsfxv$x |
|||
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(SFXSTUB_DIR)/sfxstub$x |
|||
rm -f $(BASEDIR)/help.arj |
|||
- $(ARJ_DIR)/arj$x a $(BASEDIR)/help.arj -+ -t1f -2e -e -jm -jh65535 -jt $(RES_DIR)/$(LOCALE)/arj?.txt
|
|||
+ $(BUILD_ARJ_DIR)/arj$x a $(BASEDIR)/help.arj -+ -t1f -2e -e -jm -jh65535 -jt $(RES_DIR)/$(LOCALE)/arj?.txt
|
|||
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(BASEDIR)/help.arj |
|||
$(TOOLS_DIR)/postproc $@ |
|||
|
|||
@@ -455,6 +476,7 @@
|
|||
-mkdir -p $(ARJSFX_DIR) |
|||
-mkdir -p $(ARJSFXJR_DIR) |
|||
-mkdir -p $(ARJ_DIR) |
|||
+ -mkdir -p $(BUILD_ARJ_DIR)
|
|||
-mkdir -p $(REARJ_DIR) |
|||
-mkdir -p $(REGISTER_DIR) |
|||
-mkdir -p $(ARJDISP_DIR) |
|||
--- src-orig/garble.c 2004-02-21 23:53:34.000000000 +0100
|
|||
+++ src/garble.c 2017-10-05 15:30:09.416517680 +0200
|
|||
@@ -90,6 +90,7 @@
|
|||
#if TARGET==OS2||TARGET==WIN32||TARGET==UNIX |
|||
static void remove_arjcrypt() |
|||
{ |
|||
+#ifndef DISABLE_ARJCRYPT
|
|||
if(arjcrypt_loaded) |
|||
{ |
|||
#if TARGET==OS2 |
|||
@@ -100,6 +101,7 @@
|
|||
dlclose(arjcrypt_hmod); |
|||
#endif |
|||
} |
|||
+#endif
|
|||
arjcrypt_loaded=0; |
|||
} |
|||
#endif |
|||
@@ -109,6 +109,10 @@
|
|||
|
|||
static int arjcrypt_init(char *name) |
|||
{ |
|||
+#ifdef DISABLE_ARJCRYPT
|
|||
+ fputs("arjcrypt is disabled", new_stdout);
|
|||
+ error(M_ARJCRYPT_ERROR);
|
|||
+#else
|
|||
FILE *stream; |
|||
int arjcrypt_size; /* Size of ARJCRYPT module */ |
|||
char *tmp_cryptmem; /* Temporary storage for ARJCRYPT */ |
|||
@@ -186,6 +190,7 @@
|
|||
if((arjcrypt_entry=dlsym(arjcrypt_hmod, "entry"))==NULL) |
|||
error(M_NO_ARJCRYPT_ENTRY); |
|||
#endif |
|||
+#endif
|
|||
return(0); |
|||
} |
|||
|
@ -0,0 +1,16 @@ |
|||
diff -uNr codecrypt-1.8/autogen.sh codecrypt-1.8.mod/autogen.sh
|
|||
--- codecrypt-1.8/autogen.sh 2017-10-31 22:42:06.000000000 +0200
|
|||
+++ codecrypt-1.8.mod/autogen.sh 2019-04-25 01:43:13.982529470 +0300
|
|||
@@ -3,10 +3,10 @@
|
|||
# simple autogen script that generates basic layout for autotools. |
|||
|
|||
NAME="ccr" |
|||
-COMMON_CPPFLAGS="-I/usr/local/include"
|
|||
+COMMON_CPPFLAGS=""
|
|||
COMMON_CFLAGS="-Wall" |
|||
COMMON_CXXFLAGS="${COMMON_CFLAGS} -std=c++11" |
|||
-COMMON_LDFLAGS="-L/usr/local/lib"
|
|||
+COMMON_LDFLAGS=""
|
|||
COMMON_LDADD="" |
|||
|
|||
OUT=Makefile.am |
@ -0,0 +1,17 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://e-x-a.org/codecrypt/ |
|||
TERMUX_PKG_DESCRIPTION="The post-quantum cryptography tool" |
|||
TERMUX_PKG_LICENSE="LGPL-3.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.8 |
|||
TERMUX_PKG_REVISION=8 |
|||
TERMUX_PKG_SRCURL=https://github.com/exaexa/codecrypt/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=25f11bc361b4f8aca7245698334b5715b7d594d708a75e8cdb2aa732dc46eb96 |
|||
TERMUX_PKG_DEPENDS="cryptopp, fftw, libgmp" |
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-cryptopp" |
|||
|
|||
termux_step_pre_configure() { |
|||
./autogen.sh |
|||
export LIBS="-lm" |
|||
export CRYPTOPP_CFLAGS="-I$TERMUX_PREFIX/include" |
|||
export CRYPTOPP_LIBS="-L$TERMUX_PREFIX/lib -lcryptopp" |
|||
} |
@ -0,0 +1,43 @@ |
|||
diff -uNr codecrypt-1.8/src/pwrng.cpp codecrypt-1.8.mod/src/pwrng.cpp
|
|||
--- codecrypt-1.8/src/pwrng.cpp 2017-10-31 22:42:06.000000000 +0200
|
|||
+++ codecrypt-1.8.mod/src/pwrng.cpp 2019-04-24 22:56:36.290265068 +0300
|
|||
@@ -23,38 +23,17 @@
|
|||
#include "iohelpers.h" |
|||
#include <stdlib.h> |
|||
|
|||
-#if (HAVE_READPASSPHRASE == 1)
|
|||
-#include <readpassphrase.h>
|
|||
-#elif (HAVE_BSDREADPASSPHRASE == 1)
|
|||
-#include <bsd/readpassphrase.h>
|
|||
-#else
|
|||
-#warning "Falling back to getpass(3), which is marked obsolete!"
|
|||
-/* If you see this, you might as well want to take the readpassphrase()
|
|||
- * implementation from e.g. openssh's openbsd-compat and put it here. */
|
|||
#include <unistd.h> |
|||
-#endif
|
|||
|
|||
#define MAX_PW_LEN 1024 //like if someone enjoyed typing that. |
|||
|
|||
+
|
|||
static bool read_password (const std::string&prompt, std::string&pw) |
|||
{ |
|||
-#if (HAVE_READPASSPHRASE == 1 || HAVE_BSDREADPASSPHRASE==1)
|
|||
- /* readpassphrase reads at most bufsiz-1 bytes and gets the terminating
|
|||
- * zero just right */
|
|||
- std::vector<char> pwbuf;
|
|||
- pwbuf.resize (MAX_PW_LEN, 0);
|
|||
- if (!readpassphrase (prompt.c_str(), pwbuf.data(), MAX_PW_LEN,
|
|||
- RPP_REQUIRE_TTY))
|
|||
- return false;
|
|||
-
|
|||
- pw = pwbuf.data();
|
|||
- return true;
|
|||
-#else
|
|||
char* pass = getpass (prompt.c_str()); |
|||
if (!pass) return false; |
|||
pw = pass; |
|||
return true; |
|||
-#endif
|
|||
} |
|||
|
|||
bool pw_rng::seed_from_user_password (const std::string&reason, |
@ -0,0 +1,32 @@ |
|||
diff -uNr crunch-3.6/Makefile crunch-3.6.mod/Makefile
|
|||
--- crunch-3.6/Makefile 2014-05-03 20:04:11.000000000 +0300
|
|||
+++ crunch-3.6.mod/Makefile 2019-01-31 00:31:33.642061600 +0200
|
|||
@@ -28,7 +28,7 @@
|
|||
# General variables |
|||
PACKAGE = crunch |
|||
VERSION = 3.6 |
|||
-PREFIX = /usr
|
|||
+PREFIX ?= /usr
|
|||
DISTDIR = $(PACKAGE)-$(VERSION) |
|||
DISTFILES = crunch.c crunch.1 charset.lst |
|||
BINDIR = $(PREFIX)/bin |
|||
@@ -37,8 +37,8 @@
|
|||
DOCDIR = $(PREFIX)/share/doc/$(PACKAGE) |
|||
MANDIR = $(PREFIX)/share/man/man1 |
|||
|
|||
-INSTALL = sudo $(shell which install)
|
|||
-CC = $(shell which gcc)
|
|||
+INSTALL = $(shell which install)
|
|||
+CC ?= $(shell which gcc)
|
|||
LIBFLAGS = -lm |
|||
THREADFLAGS = -pthread |
|||
OPTFLAGS = -g -o0 |
|||
@@ -56,7 +56,7 @@
|
|||
LFS="" |
|||
else |
|||
#non-mac as you were |
|||
- INSTALL_OPTIONS = -g root -o root
|
|||
+ INSTALL_OPTIONS =
|
|||
endif |
|||
|
|||
# Default target |
@ -0,0 +1,9 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://sourceforge.net/projects/crunch-wordlist |
|||
TERMUX_PKG_DESCRIPTION="Highly customizable wordlist generator" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=3.6 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/crunch-wordlist/crunch-wordlist/crunch-${TERMUX_PKG_VERSION}.tgz |
|||
TERMUX_PKG_SHA256=6a8f6c3c7410cc1930e6854d1dadc6691bfef138760509b33722ff2de133fe55 |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,36 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://www.cryptopp.com/ |
|||
TERMUX_PKG_DESCRIPTION="A free C++ class library of cryptographic schemes" |
|||
TERMUX_PKG_LICENSE="BSL-1.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=8.2.0 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=https://www.cryptopp.com/cryptopp${TERMUX_PKG_VERSION//./}.zip |
|||
TERMUX_PKG_SHA256=03f0e2242e11b9d19b28d0ec5a3fa8ed5cc7b27640e6bed365744f593e858058 |
|||
TERMUX_PKG_BREAKS="cryptopp-dev" |
|||
TERMUX_PKG_REPLACES="cryptopp-dev" |
|||
TERMUX_PKG_SKIP_SRC_EXTRACT=true |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
TERMUX_PKG_RM_AFTER_INSTALL=" |
|||
bin/ |
|||
share/cryptopp/ |
|||
" |
|||
|
|||
termux_step_extract_package() { |
|||
mkdir -p $TERMUX_PKG_CACHEDIR |
|||
termux_download $TERMUX_PKG_SRCURL $TERMUX_PKG_CACHEDIR/cryptopp.zip \ |
|||
$TERMUX_PKG_SHA256 |
|||
|
|||
mkdir -p $TERMUX_PKG_SRCDIR |
|||
cd $TERMUX_PKG_SRCDIR |
|||
unzip $TERMUX_PKG_CACHEDIR/cryptopp.zip |
|||
} |
|||
|
|||
termux_step_make() { |
|||
CXXFLAGS+=" -fPIC -DCRYPTOPP_DISABLE_ASM" |
|||
make -j $TERMUX_MAKE_PROCESSES dynamic libcryptopp.pc CC=$CC CXX=$CXX |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
make install-lib PREFIX=$TERMUX_PREFIX |
|||
} |
@ -0,0 +1,283 @@ |
|||
diff -uNr cryptopp/cpu.cpp cryptopp.mod/cpu.cpp
|
|||
--- cryptopp/cpu.cpp 2019-04-28 23:36:50.000000000 +0000
|
|||
+++ cryptopp.mod/cpu.cpp 2019-05-10 14:47:58.091890446 +0000
|
|||
@@ -47,7 +47,7 @@
|
|||
// "$ANDROID_NDK_ROOT/sources/android/cpufeatures". |
|||
// setenv-android.sh will copy the header and source file |
|||
// into PWD and the makefile will build it in place. |
|||
-#if defined(__ANDROID__)
|
|||
+#if 0
|
|||
# include "cpu-features.h" |
|||
#endif |
|||
|
|||
@@ -548,264 +548,64 @@
|
|||
|
|||
inline bool CPU_QueryARMv7() |
|||
{ |
|||
-#if defined(__aarch32__) || defined(__aarch64__)
|
|||
- // ARMv7 or above
|
|||
+#if defined(__arm__) || defined(__aarch32__) || defined(__aarch64__)
|
|||
return true; |
|||
-#elif defined(__ANDROID__) && defined(__arm__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_ARMv7) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__arm__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_ARMv7) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__arm__)
|
|||
- // Apple hardware is ARMv7 or above.
|
|||
- return true;
|
|||
-#endif
|
|||
+#else
|
|||
return false; |
|||
+#endif
|
|||
} |
|||
|
|||
inline bool CPU_QueryNEON() |
|||
{ |
|||
-#if defined(__ANDROID__) && defined(__aarch64__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_ASIMD) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__arm__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_ASIMD) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_ASIMD) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__arm__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_ARM_NEON) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__)
|
|||
- // Core feature set for Aarch32 and Aarch64.
|
|||
+#if defined(__arm__) || defined(__aarch32__) || defined(__aarch64__)
|
|||
return true; |
|||
-#endif
|
|||
+#else
|
|||
return false; |
|||
+#endif
|
|||
} |
|||
|
|||
inline bool CPU_QueryCRC32() |
|||
{ |
|||
-#if defined(__ANDROID__) && defined(__aarch64__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_CRC32) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_CRC32) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_CRC32) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_CRC32) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__)
|
|||
- // No compiler support. CRC intrinsics result in a failed compiled.
|
|||
- return false;
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QueryPMULL() |
|||
{ |
|||
-#if defined(__ANDROID__) && defined(__aarch64__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_PMULL) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_PMULL) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_PMULL) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_PMULL) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__)
|
|||
- // No compiler support. PMULL intrinsics result in a failed compiled.
|
|||
- return false;
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QueryAES() |
|||
{ |
|||
-#if defined(__ANDROID__) && defined(__aarch64__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_AES) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_AES) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_AES) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_AES) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__)
|
|||
- unsigned int device, version;
|
|||
- GetAppleMachineInfo(device, version);
|
|||
- return IsAppleMachineARMv8(device, version);
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QuerySHA1() |
|||
{ |
|||
-#if defined(__ANDROID__) && defined(__aarch64__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA1) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA1) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_SHA1) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA1) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__)
|
|||
- unsigned int device, version;
|
|||
- GetAppleMachineInfo(device, version);
|
|||
- return IsAppleMachineARMv8(device, version);
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QuerySHA2() |
|||
{ |
|||
-#if defined(__ANDROID__) && defined(__aarch64__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA2) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__)
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA2) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_SHA2) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA2) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__)
|
|||
- unsigned int device, version;
|
|||
- GetAppleMachineInfo(device, version);
|
|||
- return IsAppleMachineARMv8(device, version);
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QuerySHA512() |
|||
{ |
|||
-// Some ARMv8.4 features are disabled at the moment
|
|||
-#if defined(__ANDROID__) && defined(__aarch64__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA512) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA512) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_SHA512) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA512) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__) && 0
|
|||
- unsigned int device, version;
|
|||
- GetAppleMachineInfo(device, version);
|
|||
- return IsAppleMachineARMv84(device, version);
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QuerySHA3() |
|||
{ |
|||
-// Some ARMv8.4 features are disabled at the moment
|
|||
-#if defined(__ANDROID__) && defined(__aarch64__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA3) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA3) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_SHA3) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA3) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__) && 0
|
|||
- unsigned int device, version;
|
|||
- GetAppleMachineInfo(device, version);
|
|||
- return IsAppleMachineARMv84(device, version);
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QuerySM3() |
|||
{ |
|||
-// Some ARMv8.4 features are disabled at the moment
|
|||
-#if defined(__ANDROID__) && defined(__aarch64__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SM3) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SM3) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_SM3) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_SM3) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__) && 0
|
|||
- unsigned int device, version;
|
|||
- GetAppleMachineInfo(device, version);
|
|||
- return IsAppleMachineARMv84(device, version);
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
|||
inline bool CPU_QuerySM4() |
|||
{ |
|||
-// Some ARMv8.4 features are disabled at the moment
|
|||
-#if defined(__ANDROID__) && defined(__aarch64__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SM4) != 0))
|
|||
- return true;
|
|||
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0
|
|||
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
|
|||
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SM4) != 0))
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch64__)
|
|||
- if ((getauxval(AT_HWCAP) & HWCAP_SM4) != 0)
|
|||
- return true;
|
|||
-#elif defined(__linux__) && defined(__aarch32__)
|
|||
- if ((getauxval(AT_HWCAP2) & HWCAP2_SM4) != 0)
|
|||
- return true;
|
|||
-#elif defined(__APPLE__) && defined(__aarch64__) && 0
|
|||
- unsigned int device, version;
|
|||
- GetAppleMachineInfo(device, version);
|
|||
- return IsAppleMachineARMv84(device, version);
|
|||
-#endif
|
|||
return false; |
|||
} |
|||
|
@ -0,0 +1,9 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://github.com/sharkdp/diskus |
|||
TERMUX_PKG_DESCRIPTION="A minimal, fast alternative to 'du -sh'" |
|||
TERMUX_PKG_LICENSE="Apache-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.5.0 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=https://github.com/sharkdp/diskus/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=90d785f3f24899a6adcc497846f29112812a887c8042d0657d6b258d5a5352bc |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,28 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://github.com/google/glog |
|||
TERMUX_PKG_DESCRIPTION="Logging library for C++" |
|||
TERMUX_PKG_LICENSE="BSD 3-Clause" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.4.0 |
|||
TERMUX_PKG_REVISION=6 |
|||
TERMUX_PKG_SRCURL=https://github.com/google/glog/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c |
|||
TERMUX_PKG_DEPENDS="libc++" |
|||
TERMUX_PKG_BREAKS="google-glog-dev" |
|||
TERMUX_PKG_REPLACES="google-glog-dev" |
|||
|
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" |
|||
-DBUILD_SHARED_LIBS=ON" |
|||
|
|||
termux_step_pre_configure() { |
|||
LDFLAGS+=" -llog" |
|||
} |
|||
|
|||
termux_step_post_make_install() { |
|||
install -Dm600 "$TERMUX_PKG_SRCDIR"/libglog.pc.in \ |
|||
"$TERMUX_PREFIX"/lib/pkgconfig/libglog.pc |
|||
sed -i "s|@prefix@|$TERMUX_PREFIX|g" "$TERMUX_PREFIX"/lib/pkgconfig/libglog.pc |
|||
sed -i "s|@exec_prefix@|$TERMUX_PREFIX|g" "$TERMUX_PREFIX"/lib/pkgconfig/libglog.pc |
|||
sed -i "s|@libdir@|$TERMUX_PREFIX/lib|g" "$TERMUX_PREFIX"/lib/pkgconfig/libglog.pc |
|||
sed -i "s|@includedir@|$TERMUX_PREFIX/include|g" "$TERMUX_PREFIX"/lib/pkgconfig/libglog.pc |
|||
sed -i "s|@VERSION@|$TERMUX_PKG_VERSION|g" "$TERMUX_PREFIX"/lib/pkgconfig/libglog.pc |
|||
} |
@ -0,0 +1,9 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://github.com/sharkdp/hexyl |
|||
TERMUX_PKG_DESCRIPTION="A command-line hex viewer" |
|||
TERMUX_PKG_LICENSE="Apache-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.5.1 |
|||
TERMUX_PKG_REVISION=3 |
|||
TERMUX_PKG_SRCURL=https://github.com/sharkdp/hexyl/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=9c12bc6377d1efedc4a1731547448f7eb6ed17ee1c267aad9a35995b42091163 |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,15 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://github.com/cslarsen/jp2a |
|||
TERMUX_PKG_DESCRIPTION="A simple JPEG to ASCII converter" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.0.8 |
|||
TERMUX_PKG_REVISION=5 |
|||
_COMMIT=61d205f6959d88e0cc8d8879fe7d66eb0932ecca |
|||
TERMUX_PKG_SRCURL=https://github.com/cslarsen/jp2a/archive/${_COMMIT}.zip |
|||
TERMUX_PKG_SHA256=26f655e4b977bf24b8193150f34c015195c07c1116d064375223dd46ea5b8b4e |
|||
TERMUX_PKG_DEPENDS="libcurl, libjpeg-turbo, ncurses" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_pre_configure() { |
|||
autoreconf -vi |
|||
} |
@ -0,0 +1,20 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.digital-scurf.org/software/libgfshare |
|||
TERMUX_PKG_DESCRIPTION="Utilities for multi-way secret-sharing" |
|||
TERMUX_PKG_LICENSE="MIT" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=2.0.0 |
|||
TERMUX_PKG_REVISION=6 |
|||
TERMUX_PKG_SRCURL=http://www.digital-scurf.org/files/libgfshare/libgfshare-$TERMUX_PKG_VERSION.tar.bz2 |
|||
TERMUX_PKG_SHA256=86f602860133c828356b7cf7b8c319ba9b27adf70a624fe32275ba1ed268331f |
|||
TERMUX_PKG_BREAKS="libgfshare-dev" |
|||
TERMUX_PKG_REPLACES="libgfshare-dev" |
|||
|
|||
termux_step_post_configure() { |
|||
gcc -DHAVE_CONFIG_H \ |
|||
-I. \ |
|||
-I"$TERMUX_PKG_SRCDIR" \ |
|||
-I"$TERMUX_PKG_SRCDIR"/include \ |
|||
"$TERMUX_PKG_SRCDIR"/src/gfshare_maketable.c \ |
|||
-o gfshare_maketable |
|||
touch -d "next hour" gfshare_maketable |
|||
} |
@ -0,0 +1,11 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://mcrypt.sourceforge.net/ |
|||
TERMUX_PKG_DESCRIPTION="A library which provides a uniform interface to several symmetric encryption algorithms" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=2.5.8 |
|||
TERMUX_PKG_REVISION=2 |
|||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/mcrypt/libmcrypt-$TERMUX_PKG_VERSION.tar.bz2 |
|||
TERMUX_PKG_SHA256=bf2f1671f44af88e66477db0982d5ecb5116a5c767b0a0d68acb34499d41b793 |
|||
TERMUX_PKG_BREAKS="libmcrypt-dev" |
|||
TERMUX_PKG_REPLACES="libmcrypt-dev" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,11 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://mhash.sourceforge.net/ |
|||
TERMUX_PKG_DESCRIPTION="A thread-safe hash library which provides a uniform interface to hash algorithms" |
|||
TERMUX_PKG_LICENSE="LGPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.9.9.9 |
|||
TERMUX_PKG_REVISION=2 |
|||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/sourceforge/mhash/mhash-${TERMUX_PKG_VERSION}.tar.bz2 |
|||
TERMUX_PKG_SHA256=56521c52a9033779154432d0ae47ad7198914785265e1f570cee21ab248dfef0 |
|||
TERMUX_PKG_BREAKS="libmhash-dev" |
|||
TERMUX_PKG_REPLACES="libmhash-dev" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,18 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/libmicrohttpd/ |
|||
TERMUX_PKG_DESCRIPTION="A small C library that is supposed to make it easy to run an HTTP server as part of another application" |
|||
TERMUX_PKG_LICENSE="LGPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.9.66 |
|||
TERMUX_PKG_REVISION=1 |
|||
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=4e66d4db1574f4912fbd2690d10d227cc9cc56df6a10aa8f4fc2da75cea7ab1b |
|||
TERMUX_PKG_DEPENDS="libgnutls" |
|||
TERMUX_PKG_BREAKS="libmicrohttpd-dev" |
|||
TERMUX_PKG_REPLACES="libmicrohttpd-dev" |
|||
|
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" |
|||
--disable-examples |
|||
--enable-curl |
|||
--enable-https |
|||
--enable-largefile |
|||
--enable-messages" |
@ -0,0 +1,11 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://www.netfilter.org/projects/libnftnl/ |
|||
TERMUX_PKG_DESCRIPTION="Netfilter library providing interface to the nf_tables subsystem" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.1.3 |
|||
TERMUX_PKG_REVISION=3 |
|||
TERMUX_PKG_SRCURL=http://netfilter.org/projects/libnftnl/files/libnftnl-$TERMUX_PKG_VERSION.tar.bz2 |
|||
TERMUX_PKG_SHA256=22dd97d3b06ae8c67499506e2bfd6803ce116479076ec3700e7a4c7cd9fcba0f |
|||
TERMUX_PKG_DEPENDS="libmnl" |
|||
TERMUX_PKG_BREAKS="libnftnl-dev" |
|||
TERMUX_PKG_REPLACES="libnftnl-dev" |
@ -0,0 +1,10 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/libsigsegv/ |
|||
TERMUX_PKG_DESCRIPTION="GNU libsigsegv is a library for handling page faults in user mode" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=2.12 |
|||
TERMUX_PKG_REVISION=5 |
|||
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=3ae1af359eebaa4ffc5896a1aee3568c052c99879316a1ab57f8fe1789c390b6 |
|||
TERMUX_PKG_BREAKS="libsigsegv-dev" |
|||
TERMUX_PKG_REPLACES="libsigsegv-dev" |
@ -0,0 +1,23 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.inf.puc-rio.br/~roberto/lpeg |
|||
TERMUX_PKG_DESCRIPTION="Pattern-matching library for Lua 5.3" |
|||
TERMUX_PKG_LICENSE="MIT" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.0.2 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe |
|||
TERMUX_PKG_DEPENDS="liblua" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_make() { |
|||
make \ |
|||
CC="$CC" \ |
|||
CFLAGS="$CFLAGS -fPIC" \ |
|||
LDFLAGS="$LDFLAGS -llua" \ |
|||
LUADIR="$TERMUX_PREFIX"/include |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm600 lpeg.so "$TERMUX_PREFIX"/lib/lua/5.3/lpeg.so |
|||
install -Dm600 re.lua "$TERMUX_PREFIX"/share/lua/5.3/re.lua |
|||
} |
@ -0,0 +1,30 @@ |
|||
diff -uNr lpeg-1.0.2/makefile lpeg-1.0.2.mod/makefile
|
|||
--- lpeg-1.0.2/makefile 2019-03-11 16:08:29.000000000 +0200
|
|||
+++ lpeg-1.0.2.mod/makefile 2019-05-10 16:13:05.997196863 +0300
|
|||
@@ -1,7 +1,7 @@
|
|||
LIBNAME = lpeg |
|||
LUADIR = ../lua/ |
|||
|
|||
-COPT = -O2 -DNDEBUG
|
|||
+#COPT = -O2 -DNDEBUG
|
|||
# COPT = -g |
|||
|
|||
CWARNS = -Wall -Wextra -pedantic \ |
|||
@@ -22,7 +22,7 @@
|
|||
# -Wunreachable-code \ |
|||
|
|||
|
|||
-CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
|
|||
+CFLAGS += $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
|
|||
CC = gcc |
|||
|
|||
FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o |
|||
@@ -36,7 +36,7 @@
|
|||
$(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup" |
|||
|
|||
lpeg.so: $(FILES) |
|||
- env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so
|
|||
+ env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so $(LDFLAGS)
|
|||
|
|||
$(FILES): makefile |
|||
|
@ -0,0 +1,10 @@ |
|||
--- ./Makefile
|
|||
+++ ../Makefile
|
|||
@@ -1,6 +1,6 @@
|
|||
EXE = morse2ascii |
|||
CFLAGS += -O2 -s |
|||
-PREFIX = /usr/local
|
|||
+PREFIX = @TERMUX_PREFIX@
|
|||
BINDIR = $(PREFIX)/bin |
|||
LIBS = -lm |
|||
|
@ -0,0 +1,9 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/sid/morse2ascii |
|||
TERMUX_PKG_DESCRIPTION="A tool to decode the morse codes from a PCM WAV file as well as from text and RAW PCM files" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.2 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/m/morse2ascii/morse2ascii_${TERMUX_PKG_VERSION}+dfsg.orig.tar.xz |
|||
TERMUX_PKG_SHA256=0d41f544818f27db2fb211b2950e48893ff4856f1d114ab1878c91e6e27e4c49 |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,19 @@ |
|||
diff -uNr seccure-0.5/Makefile seccure-0.5.mod/Makefile
|
|||
--- seccure-0.5/Makefile 2014-08-11 15:46:47.000000000 +0300
|
|||
+++ seccure-0.5.mod/Makefile 2019-02-13 02:22:01.521088395 +0200
|
|||
@@ -1,5 +1,5 @@
|
|||
-CFLAGS = -O2 -Wall -Wextra -std=c89 -pedantic -D_POSIX_C_SOURCE=200112 # -D NOBEEP
|
|||
-LIBS = -lgcrypt
|
|||
+CFLAGS += $(CPPFLAGS) -Wall -Wextra -std=c89 -pedantic -D_POSIX_C_SOURCE=200112 # -D NOBEEP
|
|||
+LIBS = $(LDFLAGS) -lgcrypt
|
|||
|
|||
default: binaries # doc |
|||
|
|||
@@ -31,7 +31,6 @@
|
|||
seccure-key: seccure.o numtheory.o ecc.o serialize.o protocol.o curves.o aes256ctr.o |
|||
$(CC) $(CFLAGS) -o seccure-key seccure.o numtheory.o ecc.o \ |
|||
curves.o serialize.o protocol.o aes256ctr.o $(LIBS) |
|||
- strip seccure-key
|
|||
|
|||
seccure-encrypt: seccure-key |
|||
ln -f seccure-key seccure-encrypt |
@ -0,0 +1,25 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://point-at-infinity.org/seccure/ |
|||
TERMUX_PKG_DESCRIPTION="SECCURE Elliptic Curve Crypto Utility for Reliable Encryption" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.5 |
|||
TERMUX_PKG_REVISION=6 |
|||
TERMUX_PKG_SRCURL=http://point-at-infinity.org/seccure/seccure-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=6566ce4afea095f83690b93078b910ca5b57b581ebc60e722f6e3fe8e098965b |
|||
TERMUX_PKG_DEPENDS="libgcrypt" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_make() { |
|||
make seccure-key |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm700 seccure-key "$TERMUX_PREFIX"/bin/ |
|||
install -Dm600 seccure.1 "$TERMUX_PREFIX"/share/man/man1/ |
|||
|
|||
for i in encrypt decrypt sign verify signcrypt veridec dh; do |
|||
ln -sfr "$TERMUX_PREFIX"/bin/seccure-key "$TERMUX_PREFIX"/bin/seccure-${i} |
|||
ln -sfr "$TERMUX_PREFIX"/share/man/man1/seccure.1 "$TERMUX_PREFIX"/share/man/man1/seccure-${i}.1 |
|||
done |
|||
unset i |
|||
} |
@ -0,0 +1,257 @@ |
|||
diff -uNr secure-delete-3.1/Makefile secure-delete-3.1.mod/Makefile
|
|||
--- secure-delete-3.1/Makefile 2003-10-29 23:07:06.000000000 +0200
|
|||
+++ secure-delete-3.1.mod/Makefile 2019-01-31 02:39:41.391298344 +0200
|
|||
@@ -1,19 +1,19 @@
|
|||
CC=gcc |
|||
-OPT=-O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
|||
+OPT=$(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
|||
#OPT=-Wall -D_DEBUG_ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
|||
-INSTALL_DIR=/usr/local/bin
|
|||
+INSTALL_DIR=$(prefix)/bin
|
|||
MAN_DIR=/usr/local/man |
|||
DOC_DIR=/usr/share/doc/secure_delete |
|||
OPT_MOD=-D__KERNEL__ -DMODULE -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 |
|||
#LD_MOD=-r |
|||
|
|||
-all: sdel-lib.o srm sfill sswap smem sdel-mod.o
|
|||
- @echo
|
|||
- @echo "A Puritan is someone who is deathly afraid that someone, somewhere, is"
|
|||
- @echo "having fun."
|
|||
- @echo
|
|||
- @echo "I hope YOU have fun!"
|
|||
- @echo
|
|||
+all: sdel-lib.o srm sfill sswap smem
|
|||
+# @echo
|
|||
+# @echo "A Puritan is someone who is deathly afraid that someone, somewhere, is"
|
|||
+# @echo "having fun."
|
|||
+# @echo
|
|||
+# @echo "I hope YOU have fun!"
|
|||
+# @echo
|
|||
|
|||
sdel-mod.o: sdel-mod.c |
|||
$(CC) $(OPT) $(OPT_MOD) $(LD_MOD) -I/lib/modules/`uname -r`/build/include -c sdel-mod.c |
|||
@@ -23,32 +23,28 @@
|
|||
|
|||
srm: srm.c |
|||
$(CC) ${OPT} -o srm srm.c sdel-lib.o |
|||
- -strip srm
|
|||
sfill: sfill.c |
|||
$(CC) ${OPT} -o sfill sfill.c sdel-lib.o |
|||
- -strip sfill
|
|||
sswap: sswap.c |
|||
$(CC) ${OPT} -o sswap sswap.c sdel-lib.o |
|||
- -strip sswap
|
|||
smem: smem.c |
|||
$(CC) ${OPT} -o smem smem.c sdel-lib.o |
|||
- -strip smem
|
|||
|
|||
clean: |
|||
rm -f sfill srm sswap smem sdel sdel-lib.o sdel-mod.o core *~ |
|||
|
|||
install: all |
|||
mkdir -p -m 755 ${INSTALL_DIR} 2> /dev/null |
|||
- rm -f sdel && ln -s srm sdel
|
|||
- cp -f sdel srm sfill sswap smem the_cleaner.sh ${INSTALL_DIR}
|
|||
- chmod 711 ${INSTALL_DIR}/srm ${INSTALL_DIR}/sfill ${INSTALL_DIR}/sswap ${INSTALL_DIR}/smem ${INSTALL_DIR}/the_cleaner.sh
|
|||
- mkdir -p -m 755 ${MAN_DIR}/man1 2> /dev/null
|
|||
- cp -f srm.1 sfill.1 sswap.1 smem.1 ${MAN_DIR}/man1
|
|||
- chmod 644 ${MAN_DIR}/man1/srm.1 ${MAN_DIR}/man1/sfill.1 ${MAN_DIR}/man1/sswap.1 ${MAN_DIR}/man1/smem.1
|
|||
- mkdir -p -m 755 ${DOC_DIR} 2> /dev/null
|
|||
- cp -f CHANGES FILES README secure_delete.doc usenix6-gutmann.doc ${DOC_DIR}
|
|||
- -test -e sdel-mod.o && cp -f sdel-mod.o /lib/modules/`uname -r`/kernel/drivers/char
|
|||
+# rm -f sdel && ln -s srm sdel
|
|||
+ cp -f srm sfill sswap smem ${INSTALL_DIR}
|
|||
+ chmod 711 ${INSTALL_DIR}/srm ${INSTALL_DIR}/sfill ${INSTALL_DIR}/sswap ${INSTALL_DIR}/smem
|
|||
+# mkdir -p -m 755 ${MAN_DIR}/man1 2> /dev/null
|
|||
+# cp -f srm.1 sfill.1 sswap.1 smem.1 ${MAN_DIR}/man1
|
|||
+# chmod 644 ${MAN_DIR}/man1/srm.1 ${MAN_DIR}/man1/sfill.1 ${MAN_DIR}/man1/sswap.1 ${MAN_DIR}/man1/smem.1
|
|||
+# mkdir -p -m 755 ${DOC_DIR} 2> /dev/null
|
|||
+# cp -f CHANGES FILES README secure_delete.doc usenix6-gutmann.doc ${DOC_DIR}
|
|||
+# -test -e sdel-mod.o && cp -f sdel-mod.o /lib/modules/`uname -r`/kernel/drivers/char
|
|||
# @-test '!' -e sdel-mod.o -a `uname -s` = 'Linux' && echo "type \"make sdel-mod install\" to compile and install the Linux loadable kernel module for secure delete" |
|||
- @echo
|
|||
- @echo "If men could get pregnant, abortion would be a sacrament."
|
|||
- @echo
|
|||
+# @echo
|
|||
+# @echo "If men could get pregnant, abortion would be a sacrament."
|
|||
+# @echo
|
|||
diff -uNr secure-delete-3.1/sfill.1 secure-delete-3.1.mod/sfill.1
|
|||
--- secure-delete-3.1/sfill.1 2003-05-05 16:36:09.000000000 +0300
|
|||
+++ secure-delete-3.1.mod/sfill.1 2019-01-31 02:39:41.391298344 +0200
|
|||
@@ -16,7 +16,7 @@
|
|||
is designed to delete data which lies on available diskspace on mediums |
|||
in a secure manner which can not be recovered by thiefs, law enforcement |
|||
or other threats. |
|||
-The wipe algorythm is based on the paper "Secure Deletion of Data from
|
|||
+The wipe algorithm is based on the paper "Secure Deletion of Data from
|
|||
Magnetic and Solid-State Memory" presented at the 6th Usenix Security |
|||
Symposium by Peter Gutmann, one of the leading civilian cryptographers. |
|||
.PP |
|||
@@ -59,7 +59,7 @@
|
|||
and a final mode with random values. |
|||
.TP |
|||
.B \-l |
|||
--l for a second time lessons the security even more: only one random pass
|
|||
+\-l for a second time lessons the security even more: only one random pass
|
|||
is written. |
|||
.TP |
|||
.B \-v |
|||
@@ -130,5 +130,5 @@
|
|||
(1), |
|||
.I sswap |
|||
(1), |
|||
-.I smem
|
|||
+.I sdmem
|
|||
(1) |
|||
diff -uNr secure-delete-3.1/smem.1 secure-delete-3.1.mod/smem.1
|
|||
--- secure-delete-3.1/smem.1 2003-05-05 16:36:16.000000000 +0300
|
|||
+++ secure-delete-3.1.mod/smem.1 2019-01-31 02:39:41.391298344 +0200
|
|||
@@ -3,16 +3,16 @@
|
|||
.if n .sp |
|||
.if t .sp 0.4 |
|||
.. |
|||
-.TH SMEM 1
|
|||
+.TH SDMEM 1
|
|||
|
|||
.SH NAME |
|||
-smem \- secure memory wiper (secure_deletion toolkit)
|
|||
+sdmem \- secure memory wiper (secure_deletion toolkit)
|
|||
|
|||
.SH SYNOPSIS |
|||
-.B smem [-f] [-l] [-l] [-v]
|
|||
+.B sdmem [-f] [-l] [-l] [-v]
|
|||
|
|||
.SH DESCRIPTION |
|||
-.I smem
|
|||
+.I sdmem
|
|||
is designed to delete data which may lie still in your memory (RAM) |
|||
in a secure manner which can not be recovered by thiefs, law enforcement |
|||
or other threats. |
|||
@@ -24,7 +24,7 @@
|
|||
.PP |
|||
The |
|||
.I secure data deletion |
|||
-process of smem goes like this:
|
|||
+process of sdmem goes like this:
|
|||
.PP |
|||
.TP |
|||
.B * |
|||
@@ -51,20 +51,26 @@
|
|||
and a final random one. |
|||
.TP |
|||
.B \-l |
|||
--l for a second time lessons the security even more: only one pass with
|
|||
+\-l for a second time lessons the security even more: only one pass with
|
|||
0x00 is written. |
|||
.TP |
|||
.B \-v |
|||
verbose mode |
|||
.PP |
|||
|
|||
+.SH NOTE
|
|||
+.TP
|
|||
+This utility was originally called
|
|||
+.I smem
|
|||
+but was renamed for debian to avoid name clashes with another package.
|
|||
+
|
|||
.SH BEWARE |
|||
.TP |
|||
.B SLOW |
|||
-Wiping the memory is very slow. You might use smem with the -ll option. (tip)
|
|||
+Wiping the memory is very slow. You might use sdmem with the \-ll option. (tip)
|
|||
.TP |
|||
.B BETA! |
|||
-.I smem
|
|||
+.I sdmem
|
|||
is still beta. |
|||
|
|||
.PP |
|||
@@ -84,7 +90,7 @@
|
|||
can be obtained from |
|||
.I http://www.thc.org |
|||
.Sp |
|||
-.I smem
|
|||
+.I sdmem
|
|||
and the |
|||
.I secure_deletion package |
|||
is (C) 1997-2003 by van Hauser / THC (vh@thc.org) |
|||
diff -uNr secure-delete-3.1/srm.1 secure-delete-3.1.mod/srm.1
|
|||
--- secure-delete-3.1/srm.1 2003-05-05 16:36:23.000000000 +0300
|
|||
+++ secure-delete-3.1.mod/srm.1 2019-01-31 02:39:41.391298344 +0200
|
|||
@@ -55,7 +55,7 @@
|
|||
.TP |
|||
.B \-d |
|||
ignore the two special dot files . and .. on the commandline. (so you can |
|||
-execute it like "srm -d .* *")
|
|||
+execute it like "srm \-d .* *")
|
|||
.TP |
|||
.B \-f |
|||
fast (and insecure mode): no /dev/urandom, no synchronize mode. |
|||
@@ -65,7 +65,7 @@
|
|||
and a final mode random values. |
|||
.TP |
|||
.B \-l |
|||
--l for a second time lessons the security even more: only one random pass
|
|||
+\-l for a second time lessons the security even more: only one random pass
|
|||
is written. |
|||
.TP |
|||
.B \-r |
|||
@@ -95,7 +95,7 @@
|
|||
which comes with the |
|||
.I secure_deletion package |
|||
to ensure to wipe also the free diskspace. However, If already a small |
|||
-file aquired a block with your precious data, no tool known to me can help
|
|||
+file acquired a block with your precious data, no tool known to me can help
|
|||
you here. For a secure deletion of the swap space |
|||
.I sswap |
|||
is available. |
|||
@@ -136,5 +136,5 @@
|
|||
(1), |
|||
.I sswap |
|||
(1), |
|||
-.I smem
|
|||
+.I sdmem
|
|||
(1) |
|||
diff -uNr secure-delete-3.1/srm.c secure-delete-3.1.mod/srm.c
|
|||
--- secure-delete-3.1/srm.c 2003-10-31 01:17:19.000000000 +0200
|
|||
+++ secure-delete-3.1.mod/srm.c 2019-01-31 02:39:41.391298344 +0200
|
|||
@@ -110,7 +110,7 @@
|
|||
if ( (filestat.st_dev != controlstat.st_dev) || (filestat.st_ino != controlstat.st_ino) ) { |
|||
fprintf(stderr, "Race found! (directory %s became a link)\n", filename); |
|||
} else { |
|||
- if ((dir = opendir (".")) != NULL) {
|
|||
+ if ((dir = opendir (".")) < 0) {
|
|||
(void) chmod(".", 0700); /* ignore permission errors */ |
|||
dir = opendir ("."); |
|||
} |
|||
@@ -166,8 +166,10 @@
|
|||
return 3; |
|||
} |
|||
|
|||
- if (sdel_overwrite(mode, fd, 0, bufsize, filestat.st_size > 0 ? filestat.st_size : 1, zero) == 0)
|
|||
+ if (sdel_overwrite(mode, fd, 0, bufsize, filestat.st_size > 0 ? filestat.st_size : 1, zero) == 0) {
|
|||
+ close(fd);
|
|||
return sdel_unlink(filename, 0, 1, slow); |
|||
+ }
|
|||
} /* end IS_REG() */ |
|||
else { |
|||
if (S_ISDIR(filestat.st_mode)) { |
|||
diff -uNr secure-delete-3.1/sswap.1 secure-delete-3.1.mod/sswap.1
|
|||
--- secure-delete-3.1/sswap.1 2003-05-05 16:36:31.000000000 +0300
|
|||
+++ secure-delete-3.1.mod/sswap.1 2019-01-31 02:39:41.391298344 +0200
|
|||
@@ -49,7 +49,7 @@
|
|||
a final mode with random values. |
|||
.TP |
|||
.B \-l |
|||
--l for a second time lessons the security even more: only one pass with
|
|||
+\-l for a second time lessons the security even more: only one pass with
|
|||
random values is written. |
|||
.TP |
|||
.B \-v |
|||
@@ -106,5 +106,5 @@
|
|||
(1), |
|||
.I sfill |
|||
(1), |
|||
-.I smem
|
|||
+.I sdmem
|
|||
(1) |
@ -0,0 +1,9 @@ |
|||
diff -uNr secure-delete-3.1/Makefile secure-delete-3.1.mod/Makefile
|
|||
--- secure-delete-3.1/Makefile 2019-01-31 02:43:09.911882461 +0200
|
|||
+++ secure-delete-3.1.mod/Makefile 2019-01-31 02:43:29.125266812 +0200
|
|||
@@ -1,4 +1,4 @@
|
|||
-CC=gcc
|
|||
+CC ?= gcc
|
|||
OPT=$(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
|||
#OPT=-Wall -D_DEBUG_ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
|||
INSTALL_DIR=$(prefix)/bin |
@ -0,0 +1,18 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.thc.org/ |
|||
TERMUX_PKG_DESCRIPTION="Secure file, disk, swap, memory erasure utilities" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=3.1 |
|||
TERMUX_PKG_REVISION=5 |
|||
TERMUX_PKG_SRCURL=http://deb.debian.org/debian/pool/main/s/secure-delete/secure-delete_$TERMUX_PKG_VERSION.orig.tar.gz |
|||
TERMUX_PKG_SHA256=78af201401e6dc159298cb5430c28996a8bdc278391d942d1fe454534540ee3c |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_make() { |
|||
make -j1 CC="$CC" |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
make install INSTALL_DIR="$TERMUX_PREFIX/bin" |
|||
install -Dm600 -t "$TERMUX_PREFIX"/share/man/man1 sfill.1 smem.1 srm.1 sswap.1 |
|||
} |
@ -0,0 +1,14 @@ |
|||
diff -uNr ssss-0.5/Makefile ssss-0.5.mod/Makefile
|
|||
--- ssss-0.5/Makefile 2006-01-15 13:10:01.000000000 +0200
|
|||
+++ ssss-0.5.mod/Makefile 2019-02-13 02:11:26.317857778 +0200
|
|||
@@ -1,8 +1,7 @@
|
|||
-all: ssss-split ssss-combine ssss.1 ssss.1.html
|
|||
+all: ssss-split
|
|||
|
|||
ssss-split: ssss.c |
|||
- $(CC) -W -Wall -O2 -lgmp -o ssss-split ssss.c
|
|||
- strip ssss-split
|
|||
+ $(CC) -W -Wall -DNOMLOCK $(CPPFLAGS) $(CFLAGS) -o ssss-split ssss.c $(LDFLAGS) -lgmp
|
|||
|
|||
ssss-combine: ssss-split |
|||
ln -f ssss-split ssss-combine |
@ -0,0 +1,25 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://point-at-infinity.org/ssss/ |
|||
TERMUX_PKG_DESCRIPTION="Simple command-line implementation of Shamir's Secret Sharing Scheme" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.5 |
|||
TERMUX_PKG_REVISION=5 |
|||
TERMUX_PKG_SRCURL=http://point-at-infinity.org/ssss/ssss-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=5d165555105606b8b08383e697fc48cf849f51d775f1d9a74817f5709db0f995 |
|||
TERMUX_PKG_DEPENDS="libgmp" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm700 ssss-split "$TERMUX_PREFIX"/bin/ |
|||
ln -sfr "$TERMUX_PREFIX"/bin/ssss-split $TERMUX_PREFIX/bin/ssss-combine |
|||
|
|||
install -Dm600 \ |
|||
"$TERMUX_PKG_BUILDER_DIR"/ssss.1 \ |
|||
"$TERMUX_PREFIX"/share/man/man1/ |
|||
ln -sfr \ |
|||
"$TERMUX_PREFIX"/share/man/man1/ssss.1 \ |
|||
"$TERMUX_PREFIX"/share/man/man1/ssss-combine.1 |
|||
ln -sfr \ |
|||
"$TERMUX_PREFIX"/share/man/man1/ssss.1 \ |
|||
"$TERMUX_PREFIX"/share/man/man1/ssss-split.1 |
|||
} |
@ -0,0 +1,62 @@ |
|||
.TH ssss 1 User Manuals |
|||
.SH NAME |
|||
ssss \- Split and Combine Secrets using Shamir's Secret Sharing Scheme. |
|||
.SH SYNOPSIS |
|||
\fBssss-split -t \fIthreshold\fB -n \fIshares\fB [-w \fItoken\fB] [-s \fIlevel\fB] [-x] [-q] [-Q] [-D] [-v] |
|||
|
|||
ssss-combine -t \fIthreshold\fB [-x] [-q] [-Q] [-D] [-v] |
|||
\f1 |
|||
.SH DESCRIPTION |
|||
ssss is an implementation of Shamir's Secret Sharing Scheme. The program suite does both: the generation of shares for a known secret, and the reconstruction of a secret using user-provided shares. |
|||
.SH COMMANDS |
|||
\fBssss-split\f1: prompt the user for a secret and generate a set of corresponding shares. |
|||
|
|||
\fBssss-combine\f1: read in a set of shares and reconstruct the secret. |
|||
.SH OPTIONS |
|||
.TP |
|||
\fB-t \fIthreshold\fB\f1 |
|||
Specify the number of shares necessary to reconstruct the secret. |
|||
.TP |
|||
\fB-n \fIshares\fB\f1 |
|||
Specify the number of shares to be generated. |
|||
.TP |
|||
\fB-w \fItoken\fB\f1 |
|||
Text token to name shares in order to avoid confusion in case one utilizes secret sharing to protect several independent secrets. The generated shares are prefixed by these tokens. |
|||
.TP |
|||
\fB-s \fIlevel\fB\f1 |
|||
Enforce the scheme's security level (in bits). This option implies an upper bound for the length of the shared secret (shorter secrets are padded). Only multiples of 8 in the range from 8 to 1024 are allowed. If this option is ommitted (or the value given is 0) the security level is chosen automatically depending on the secret's length. The security level directly determines the length of the shares. |
|||
.TP |
|||
\fB-x\f1 |
|||
Hex mode: use hexadecimal digits in place of ASCII characters for I/O. This is useful if one wants to protect binary data, like block cipher keys. |
|||
.TP |
|||
\fB-q\f1 |
|||
Quiet mode: disable all unnecessary output. Useful in scripts. |
|||
.TP |
|||
\fB-Q\f1 |
|||
Extra quiet mode: like \fB-q\f1, but also suppress warnings. |
|||
.TP |
|||
\fB-D\f1 |
|||
Disable the diffusion layer added in version 0.2. This option is needed when shares are combined that where generated with ssss version 0.1. |
|||
.TP |
|||
\fB-v\f1 |
|||
Print version information. |
|||
.SH EXAMPLE |
|||
In case you want to protect your login password with a set of ten shares in such a way that any three of them can reconstruct the password, you simply run the command |
|||
|
|||
ssss-split -t 3 -n 10 -w passwd |
|||
|
|||
To reconstruct the password pass three of the generated shares (in any order) to |
|||
|
|||
ssss-combine -t 3 |
|||
.SH NOTES |
|||
To protect a secret larger than 1024 bits a hybrid technique has to be applied: encrypt the secret with a block cipher and apply secret sharing to just the key. Among others openssl and gpg can do the encryption part: |
|||
|
|||
openssl bf -e < file.plain > file.encrypted |
|||
|
|||
gpg -c < file.plain > file.encrypted |
|||
.SH SECURITY |
|||
\fBssss\f1 tries to lock its virtual address space into RAM for privacy reasons. But this may fail for two reasons: either the current uid doesn't permit page locking, or the RLIMIT_MEMLOCK is set too low. After printing a warning message \fBssss\f1 will run even without obtaining the desired mlock. |
|||
.SH AUTHOR |
|||
This software (v0.5) was written in 2006 by B. Poettering (ssss AT point-at-infinity.org). Find the newest version of ssss on the project's homepage: \fBhttp://point-at-infinity.org/ssss/\f1. |
|||
.SH FURTHER READING |
|||
\fBhttp://en.wikipedia.org/wiki/Secret_sharing\f1 |
@ -0,0 +1,14 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://steghide.sourceforge.net/ |
|||
TERMUX_PKG_DESCRIPTION="Embeds a message in a file by replacing some of the least significant bits" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.5.1 |
|||
TERMUX_PKG_REVISION=3 |
|||
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/steghide/steghide-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=78069b7cfe9d1f5348ae43f918f06f91d783c2b3ff25af021e6a312cf541b47b |
|||
TERMUX_PKG_DEPENDS="libjpeg-turbo, libmcrypt, libmhash, zlib" |
|||
|
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" |
|||
ac_cv_file__dev_random=yes |
|||
ac_cv_file__dev_urandom=yes |
|||
" |
@ -0,0 +1,75 @@ |
|||
diff -Naur steghide-0.5.1.orig/src/AuData.h steghide-0.5.1.new/src/AuData.h
|
|||
--- steghide-0.5.1.orig/src/AuData.h 2003-09-28 11:30:29.000000000 -0400
|
|||
+++ steghide-0.5.1.new/src/AuData.h 2007-06-28 17:22:44.000000000 -0400
|
|||
@@ -26,22 +26,30 @@
|
|||
|
|||
// AuMuLawAudioData |
|||
typedef AudioDataImpl<AuMuLaw,BYTE> AuMuLawAudioData ; |
|||
+template<>
|
|||
inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; } |
|||
+template<>
|
|||
inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; } |
|||
|
|||
// AuPCM8AudioData |
|||
typedef AudioDataImpl<AuPCM8,SBYTE> AuPCM8AudioData ; |
|||
+template<>
|
|||
inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; } |
|||
+template<>
|
|||
inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; } |
|||
|
|||
// AuPCM16AudioData |
|||
typedef AudioDataImpl<AuPCM16,SWORD16> AuPCM16AudioData ; |
|||
+template<>
|
|||
inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; } |
|||
+template<>
|
|||
inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; } |
|||
|
|||
// AuPCM32AudioData |
|||
typedef AudioDataImpl<AuPCM32,SWORD32> AuPCM32AudioData ; |
|||
+template<>
|
|||
inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; } |
|||
+template<>
|
|||
inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; } |
|||
|
|||
#endif // ndef SH_AUDATA_H |
|||
diff -Naur steghide-0.5.1.orig/src/AuSampleValues.cc steghide-0.5.1.new/src/AuSampleValues.cc
|
|||
--- steghide-0.5.1.orig/src/AuSampleValues.cc 2003-09-28 11:30:30.000000000 -0400
|
|||
+++ steghide-0.5.1.new/src/AuSampleValues.cc 2007-06-28 17:23:52.000000000 -0400
|
|||
@@ -21,17 +21,25 @@
|
|||
#include "AuSampleValues.h" |
|||
|
|||
// AuMuLawSampleValue |
|||
+template<>
|
|||
const BYTE AuMuLawSampleValue::MinValue = 0 ; |
|||
+template<>
|
|||
const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ; |
|||
|
|||
// AuPCM8SampleValue |
|||
+template<>
|
|||
const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ; |
|||
+template<>
|
|||
const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ; |
|||
|
|||
// AuPCM16SampleValue |
|||
+template<>
|
|||
const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ; |
|||
+template<>
|
|||
const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ; |
|||
|
|||
// AuPCM32SampleValue |
|||
+template<>
|
|||
const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ; |
|||
+template<>
|
|||
const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ; |
|||
diff -Naur steghide-0.5.1.orig/src/MHashPP.cc steghide-0.5.1.new/src/MHashPP.cc
|
|||
--- steghide-0.5.1.orig/src/MHashPP.cc 2003-10-05 06:17:50.000000000 -0400
|
|||
+++ steghide-0.5.1.new/src/MHashPP.cc 2007-06-28 17:22:44.000000000 -0400
|
|||
@@ -120,7 +120,7 @@
|
|||
|
|||
std::string MHashPP::getAlgorithmName (hashid id) |
|||
{ |
|||
- char *name = mhash_get_hash_name (id) ;
|
|||
+ char *name = (char *) mhash_get_hash_name (id) ;
|
|||
std::string retval ; |
|||
if (name == NULL) { |
|||
retval = std::string ("<algorithm not found>") ; |
@ -0,0 +1,21 @@ |
|||
diff -uNr steghide-0.5.1/src/Makefile.in steghide-0.5.1.mod/src/Makefile.in
|
|||
--- steghide-0.5.1/src/Makefile.in 2003-10-15 11:01:29.000000000 +0300
|
|||
+++ steghide-0.5.1.mod/src/Makefile.in 2019-07-01 15:51:46.023373760 +0300
|
|||
@@ -190,7 +190,7 @@
|
|||
WavPCMSampleValue.cc error.cc main.cc msg.cc SMDConstructionHeuristic.cc |
|||
|
|||
localedir = $(datadir)/locale |
|||
-LIBTOOL = $(SHELL) libtool
|
|||
+LIBTOOL = $(SHELL) /usr/bin/libtool
|
|||
MAINTAINERCLEANFILES = Makefile.in |
|||
subdir = src |
|||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
|||
@@ -278,7 +278,7 @@
|
|||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ |
|||
$(AM_CXXFLAGS) $(CXXFLAGS) |
|||
CXXLD = $(CXX) |
|||
-CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
|||
+CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
|||
$(AM_LDFLAGS) $(LDFLAGS) -o $@ |
|||
DIST_SOURCES = $(steghide_SOURCES) |
|||
HEADERS = $(noinst_HEADERS) |
@ -0,0 +1,11 @@ |
|||
diff -ruN steghide-0.5.1.orig/src/Graph.cc steghide-0.5.1/src/Graph.cc
|
|||
--- steghide-0.5.1.orig/src/Graph.cc 2003-10-11 23:54:26.000000000 +0200
|
|||
+++ steghide-0.5.1/src/Graph.cc 2008-12-14 14:23:27.000000000 +0100
|
|||
@@ -22,6 +22,7 @@
|
|||
#include <list> |
|||
#include <map> |
|||
#include <vector> |
|||
+#include <climits>
|
|||
|
|||
#include "BitString.h" |
|||
#include "CvrStgFile.h" |
@ -0,0 +1,22 @@ |
|||
--- steghide-0.5.1/src/Arguments.h.orig 2018-06-09 11:04:48.795952519 +0000
|
|||
+++ steghide-0.5.1/src/Arguments.h 2018-06-09 11:00:57.239290249 +0000
|
|||
@@ -100,7 +100,7 @@
|
|||
static const VERBOSITY Default_Verbosity = NORMAL ; |
|||
static const unsigned long Default_Radius = 0 ; // there is no default radius for all file formats |
|||
static const unsigned int Max_Algorithm = 3 ; |
|||
- static const float Default_Goal = 100.0 ;
|
|||
+ static constexpr float Default_Goal = 100.0 ;
|
|||
static const DEBUGCOMMAND Default_DebugCommand = NONE ; |
|||
static const bool Default_Check = false ; |
|||
static const unsigned int Default_DebugLevel = 0 ; |
|||
--- steghide-0.5.1/src/ProgressOutput.h.orig 2018-06-09 11:01:44.662622682 +0000
|
|||
+++ steghide-0.5.1/src/ProgressOutput.h 2018-06-09 11:01:57.755955767 +0000
|
|||
@@ -64,7 +64,7 @@
|
|||
**/ |
|||
void done (float rate, float avgweight = NoAvgWeight) const ; |
|||
|
|||
- static const float NoAvgWeight = -1.0 ;
|
|||
+ static constexpr float NoAvgWeight = -1.0 ;
|
|||
|
|||
protected: |
|||
std::string vcompose (const char *msgfmt, va_list ap) const ; |
@ -0,0 +1,17 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://taglib.github.io/ |
|||
TERMUX_PKG_DESCRIPTION="A Library for reading and editing the meta-data of several popular audio formats." |
|||
TERMUX_PKG_LICENSE="LGPL-2.0, MPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.11.1 |
|||
TERMUX_PKG_REVISION=7 |
|||
TERMUX_PKG_SRCURL=http://taglib.github.io/releases/taglib-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b |
|||
TERMUX_PKG_BUILD_DEPENDS="boost, zlib" |
|||
TERMUX_PKG_BREAKS="taglib-dev" |
|||
TERMUX_PKG_REPLACES="taglib-dev" |
|||
TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="bin/taglib-config" |
|||
|
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" |
|||
-DBUILD_SHARED_LIBS=ON |
|||
-DWITH_MP4=ON |
|||
-DWITH_ASF=ON" |
@ -0,0 +1,11 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.unicorn-engine.org/ |
|||
TERMUX_PKG_DESCRIPTION="Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework." |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=1.0.1 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=https://github.com/unicorn-engine/unicorn/archive/$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=3a6a4f2b8c405ab009040ca43af8e4aa10ebe44d9c8b336aa36dc35df955017c |
|||
TERMUX_PKG_BREAKS="unicorn-dev" |
|||
TERMUX_PKG_REPLACES="unicorn-dev" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,20 @@ |
|||
diff --git a/samples/Makefile b/samples/Makefile
|
|||
index 4724f17..8303ba5 100644
|
|||
--- a/samples/Makefile
|
|||
+++ b/samples/Makefile
|
|||
@@ -14,12 +14,12 @@ V ?= 0
|
|||
|
|||
CFLAGS += -Wall -Werror -I../include |
|||
|
|||
-LDFLAGS += -L$(LIBDIR) -lunicorn -lpthread -lm
|
|||
+LDFLAGS += -L$(LIBDIR) -lunicorn -lm
|
|||
ifeq ($(UNAME_S), Linux) |
|||
-LDFLAGS += -lrt
|
|||
+LDFLAGS +=
|
|||
endif |
|||
|
|||
-LDLIBS += -lpthread -lunicorn -lm
|
|||
+LDLIBS += -lunicorn -lm
|
|||
|
|||
ifneq ($(CROSS),) |
|||
CC = $(CROSS)gcc |
@ -0,0 +1,26 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://github.com/tsenart/vegeta |
|||
TERMUX_PKG_DESCRIPTION="HTTP load testing tool" |
|||
TERMUX_PKG_LICENSE="MIT" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=12.7.0 |
|||
TERMUX_PKG_REVISION=2 |
|||
TERMUX_PKG_SRCURL=https://github.com/tsenart/vegeta/archive/v${TERMUX_PKG_VERSION}.tar.gz |
|||
TERMUX_PKG_SHA256=0e6882d2044e8dc1979f4cd2d96ccbfc47db8ac575f66ebf1020f98d702988a9 |
|||
|
|||
termux_step_make() { |
|||
termux_setup_golang |
|||
|
|||
export GOPATH=$TERMUX_PKG_BUILDDIR |
|||
mkdir -p "$GOPATH"/src/github.com/tsenart |
|||
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/tsenart/vegeta |
|||
|
|||
cd "$GOPATH"/src/github.com/tsenart/vegeta |
|||
go get -d -v github.com/tsenart/vegeta |
|||
go build |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm700 \ |
|||
"$GOPATH"/src/github.com/tsenart/vegeta/vegeta \ |
|||
"$TERMUX_PREFIX"/bin/vegeta |
|||
} |
@ -0,0 +1,10 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.brain-dump.org/projects/vis/ |
|||
TERMUX_PKG_DESCRIPTION="Modern, legacy free, simple yet efficient vim-like editor" |
|||
TERMUX_PKG_LICENSE="ISC" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.5 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=https://github.com/martanne/vis/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=77ea70ebc9c811d88e32199ef5b3ee9b834ac1e880fb61b6d2460f93f0587df5 |
|||
TERMUX_PKG_DEPENDS="liblua, libtermkey, lua-lpeg, ncurses" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
@ -0,0 +1,67 @@ |
|||
diff -uNr vis-0.5/configure vis-0.5.mod/configure
|
|||
--- vis-0.5/configure 2018-03-25 20:55:55.000000000 +0300
|
|||
+++ vis-0.5.mod/configure 2019-02-25 23:23:27.018873339 +0200
|
|||
@@ -422,60 +422,9 @@
|
|||
test "$lpeg" = "yes" && lua=yes |
|||
|
|||
if test "$lua" != "no" ; then |
|||
-
|
|||
- printf "checking for liblua >= 5.2 ...\n"
|
|||
-
|
|||
-cat > "$tmpc" <<EOF
|
|||
-#include <lua.h>
|
|||
-#include <lualib.h>
|
|||
-#include <lauxlib.h>
|
|||
-
|
|||
-#if LUA_VERSION_NUM < 502
|
|||
-#error "Need at least Lua 5.2"
|
|||
-#endif
|
|||
-
|
|||
-int main(int argc, char *argv[]) {
|
|||
- lua_State *L = luaL_newstate();
|
|||
- luaL_openlibs(L);
|
|||
- lua_close(L);
|
|||
- return 0;
|
|||
-}
|
|||
-EOF
|
|||
-
|
|||
- for liblua in lua lua5.3 lua5.2 lua-5.3 lua-5.2 lua53 lua52; do
|
|||
- printf " checking for %s... " "$liblua"
|
|||
-
|
|||
- if test "$have_pkgconfig" = "yes" ; then
|
|||
- CFLAGS_LUA=$(pkg-config --cflags $liblua 2>/dev/null)
|
|||
- LDFLAGS_LUA=$(pkg-config --libs $liblua 2>/dev/null)
|
|||
- if test $? -eq 0 && $CC $CFLAGS $CFLAGS_LUA "$tmpc" \
|
|||
- $LDFLAGS $LDFLAGS_LUA -o "$tmpo" >/dev/null 2>&1 ; then
|
|||
- CONFIG_LUA=1
|
|||
- printf "yes\n"
|
|||
- break
|
|||
- fi
|
|||
- fi
|
|||
-
|
|||
- CFLAGS_LUA=""
|
|||
- LDFLAGS_LUA="-l$liblua -lm -ldl"
|
|||
-
|
|||
- if $CC $CFLAGS $CFLAGS_LUA "$tmpc" \
|
|||
- $LDFLAGS $LDFLAGS_LUA -o "$tmpo" >/dev/null 2>&1 ; then
|
|||
- CONFIG_LUA=1
|
|||
- printf "yes\n"
|
|||
- break
|
|||
- else
|
|||
- printf "no\n"
|
|||
- CFLAGS_LUA=""
|
|||
- LDFLAGS_LUA=""
|
|||
- fi
|
|||
- done
|
|||
-
|
|||
- test "$lua" = "yes" -a $CONFIG_LUA -ne 1 && fail "$0: cannot find liblua"
|
|||
-
|
|||
- if test $CONFIG_LUA -eq 1; then
|
|||
- CFLAGS_LUA="$CFLAGS_LUA -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_ALL"
|
|||
- fi
|
|||
+ CONFIG_LUA=1
|
|||
+ CFLAGS_LUA="-DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_ALL"
|
|||
+ LDFLAGS_LUA="-llua -lm"
|
|||
fi |
|||
|
|||
CONFIG_LPEG=0 |
@ -0,0 +1,23 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://wren.io/ |
|||
TERMUX_PKG_DESCRIPTION="Small, fast, class-based concurrent scripting language" |
|||
TERMUX_PKG_LICENSE="MIT" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.1.0 |
|||
TERMUX_PKG_REVISION=2 |
|||
TERMUX_PKG_SRCURL=https://github.com/wren-lang/wren/archive/$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=ebf8687dfdb55997a3fc263d41f306c6f40d9562ccbd945d9c12c48795388eae |
|||
TERMUX_PKG_DEPENDS="libuv" |
|||
TERMUX_PKG_BREAKS="wren-dev" |
|||
TERMUX_PKG_REPLACES="wren-dev" |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm700 "$TERMUX_PKG_SRCDIR"/bin/wren \ |
|||
"$TERMUX_PREFIX"/bin/wren |
|||
|
|||
install -Dm600 "$TERMUX_PKG_SRCDIR"/src/include/wren.h \ |
|||
"$TERMUX_PREFIX"/include/wren.h |
|||
|
|||
install -Dm600 "$TERMUX_PKG_SRCDIR"/lib/libwren.so \ |
|||
"$TERMUX_PREFIX"/lib/libwren.so |
|||
} |
@ -0,0 +1,48 @@ |
|||
diff -uNr wren-0.1.0/src/cli/vm.h wren-0.1.0.mod/src/cli/vm.h
|
|||
--- wren-0.1.0/src/cli/vm.h 2016-05-21 20:53:05.000000000 +0300
|
|||
+++ wren-0.1.0.mod/src/cli/vm.h 2019-07-01 21:53:28.116581394 +0300
|
|||
@@ -1,7 +1,7 @@
|
|||
#ifndef vm_h |
|||
#define vm_h |
|||
|
|||
-#include "uv.h"
|
|||
+#include <uv.h>
|
|||
#include "wren.h" |
|||
|
|||
// Executes the Wren script at [path] in a new VM. |
|||
diff -uNr wren-0.1.0/src/module/io.c wren-0.1.0.mod/src/module/io.c
|
|||
--- wren-0.1.0/src/module/io.c 2016-05-21 20:53:05.000000000 +0300
|
|||
+++ wren-0.1.0.mod/src/module/io.c 2019-07-01 21:53:23.563209454 +0300
|
|||
@@ -1,7 +1,7 @@
|
|||
#include <stdlib.h> |
|||
#include <string.h> |
|||
|
|||
-#include "uv.h"
|
|||
+#include <uv.h>
|
|||
|
|||
#include "scheduler.h" |
|||
#include "vm.h" |
|||
diff -uNr wren-0.1.0/src/module/scheduler.c wren-0.1.0.mod/src/module/scheduler.c
|
|||
--- wren-0.1.0/src/module/scheduler.c 2016-05-21 20:53:05.000000000 +0300
|
|||
+++ wren-0.1.0.mod/src/module/scheduler.c 2019-07-01 21:53:03.086368797 +0300
|
|||
@@ -1,7 +1,7 @@
|
|||
#include <stdlib.h> |
|||
#include <string.h> |
|||
|
|||
-#include "uv.h"
|
|||
+#include <uv.h>
|
|||
|
|||
#include "scheduler.h" |
|||
#include "wren.h" |
|||
diff -uNr wren-0.1.0/src/module/timer.c wren-0.1.0.mod/src/module/timer.c
|
|||
--- wren-0.1.0/src/module/timer.c 2016-05-21 20:53:05.000000000 +0300
|
|||
+++ wren-0.1.0.mod/src/module/timer.c 2019-07-01 21:53:32.426617909 +0300
|
|||
@@ -1,7 +1,7 @@
|
|||
#include <stdlib.h> |
|||
#include <string.h> |
|||
|
|||
-#include "uv.h"
|
|||
+#include <uv.h>
|
|||
|
|||
#include "scheduler.h" |
|||
#include "vm.h" |
@ -0,0 +1,102 @@ |
|||
diff -uNr wren-0.1.0/util/wren.mk wren-0.1.0.mod/util/wren.mk
|
|||
--- wren-0.1.0/util/wren.mk 2016-05-21 20:53:05.000000000 +0300
|
|||
+++ wren-0.1.0.mod/util/wren.mk 2019-07-01 21:55:56.761159939 +0300
|
|||
@@ -42,11 +42,11 @@
|
|||
# Mode configuration. |
|||
ifeq ($(MODE),debug) |
|||
WREN := wrend |
|||
- C_OPTIONS += -O0 -DDEBUG -g
|
|||
+ C_OPTIONS += -DDEBUG -g $(CFLAGS) $(CPPFLAGS)
|
|||
BUILD_DIR := $(BUILD_DIR)/debug |
|||
else |
|||
WREN += wren |
|||
- C_OPTIONS += -O3
|
|||
+ C_OPTIONS += $(CFLAGS) $(CPPFLAGS)
|
|||
BUILD_DIR := $(BUILD_DIR)/release |
|||
endif |
|||
|
|||
@@ -106,8 +106,6 @@
|
|||
# Link in the right libraries needed by libuv on Windows and Linux. |
|||
ifeq ($(OS),mingw32) |
|||
LIBUV_LIBS := -lws2_32 -liphlpapi -lpsapi -luserenv |
|||
- else
|
|||
- LIBUV_LIBS := -lpthread -lrt
|
|||
endif |
|||
endif |
|||
|
|||
@@ -119,13 +117,9 @@
|
|||
VM_OBJECTS := $(addprefix $(BUILD_DIR)/vm/, $(notdir $(VM_SOURCES:.c=.o))) |
|||
TEST_OBJECTS := $(patsubst test/api/%.c, $(BUILD_DIR)/test/%.o, $(TEST_SOURCES)) |
|||
|
|||
-LIBUV_DIR := deps/libuv
|
|||
-LIBUV := build/libuv$(LIBUV_ARCH).a
|
|||
-
|
|||
# Flags needed to compile source files for the CLI, including the modules and |
|||
# API tests. |
|||
-CLI_FLAGS := -D_XOPEN_SOURCE=600 -Isrc/include -I$(LIBUV_DIR)/include \
|
|||
- -Isrc/cli -Isrc/module
|
|||
+CLI_FLAGS := -D_XOPEN_SOURCE=600 -Isrc/include -Isrc/cli -Isrc/module
|
|||
|
|||
# Targets --------------------------------------------------------------------- |
|||
|
|||
@@ -148,11 +142,10 @@
|
|||
test: $(BUILD_DIR)/test/$(WREN) |
|||
|
|||
# Command-line interpreter. |
|||
-bin/$(WREN): $(OPT_OBJECTS) $(CLI_OBJECTS) $(MODULE_OBJECTS) $(VM_OBJECTS) \
|
|||
- $(LIBUV)
|
|||
+bin/$(WREN): $(OPT_OBJECTS) $(CLI_OBJECTS) $(MODULE_OBJECTS) $(VM_OBJECTS)
|
|||
@ printf "%10s %-30s %s\n" $(CC) $@ "$(C_OPTIONS)" |
|||
@ mkdir -p bin |
|||
- @ $(CC) $(CFLAGS) $^ -o $@ -lm $(LIBUV_LIBS)
|
|||
+ @ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -lm -luv
|
|||
|
|||
# Static library. |
|||
lib/lib$(WREN).a: $(OPT_OBJECTS) $(VM_OBJECTS) |
|||
@@ -168,21 +161,21 @@
|
|||
|
|||
# Test executable. |
|||
$(BUILD_DIR)/test/$(WREN): $(OPT_OBJECTS) $(MODULE_OBJECTS) $(TEST_OBJECTS) \ |
|||
- $(VM_OBJECTS) $(BUILD_DIR)/cli/modules.o $(BUILD_DIR)/cli/vm.o $(LIBUV)
|
|||
+ $(VM_OBJECTS) $(BUILD_DIR)/cli/modules.o $(BUILD_DIR)/cli/vm.o
|
|||
@ printf "%10s %-30s %s\n" $(CC) $@ "$(C_OPTIONS)" |
|||
@ mkdir -p $(BUILD_DIR)/test |
|||
- @ $(CC) $(CFLAGS) $^ -o $@ -lm $(LIBUV_LIBS)
|
|||
+ @ $(CC) $(CFLAGS) $^ -o $@ -lm -luv
|
|||
|
|||
# CLI object files. |
|||
$(BUILD_DIR)/cli/%.o: src/cli/%.c $(CLI_HEADERS) $(MODULE_HEADERS) \ |
|||
- $(VM_HEADERS) $(LIBUV)
|
|||
+ $(VM_HEADERS)
|
|||
@ printf "%10s %-30s %s\n" $(CC) $< "$(C_OPTIONS)" |
|||
@ mkdir -p $(BUILD_DIR)/cli |
|||
@ $(CC) -c $(CFLAGS) $(CLI_FLAGS) -o $@ $(FILE_FLAG) $< |
|||
|
|||
# Module object files. |
|||
$(BUILD_DIR)/module/%.o: src/module/%.c $(CLI_HEADERS) $(MODULE_HEADERS) \ |
|||
- $(VM_HEADERS) $(LIBUV)
|
|||
+ $(VM_HEADERS)
|
|||
@ printf "%10s %-30s %s\n" $(CC) $< "$(C_OPTIONS)" |
|||
@ mkdir -p $(BUILD_DIR)/module |
|||
@ $(CC) -c $(CFLAGS) $(CLI_FLAGS) -o $@ $(FILE_FLAG) $< |
|||
@@ -201,19 +194,11 @@
|
|||
|
|||
# Test object files. |
|||
$(BUILD_DIR)/test/%.o: test/api/%.c $(OPT_HEADERS) $(MODULE_HEADERS) \ |
|||
- $(VM_HEADERS) $(TEST_HEADERS) $(LIBUV)
|
|||
+ $(VM_HEADERS) $(TEST_HEADERS)
|
|||
@ printf "%10s %-30s %s\n" $(CC) $< "$(C_OPTIONS)" |
|||
@ mkdir -p $(dir $@) |
|||
@ $(CC) -c $(CFLAGS) $(CLI_FLAGS) -o $@ $(FILE_FLAG) $< |
|||
|
|||
-# Download libuv.
|
|||
-$(LIBUV_DIR)/build/gyp/gyp: util/libuv.py
|
|||
- @ ./util/libuv.py download
|
|||
-
|
|||
-# Build libuv to a static library.
|
|||
-$(LIBUV): $(LIBUV_DIR)/build/gyp/gyp util/libuv.py
|
|||
- @ ./util/libuv.py build $(LIBUV_ARCH)
|
|||
-
|
|||
# Wren modules that get compiled into the binary as C strings. |
|||
src/optional/wren_opt_%.wren.inc: src/optional/wren_opt_%.wren util/wren_to_c_string.py |
|||
@ printf "%10s %-30s %s\n" str $< |
@ -0,0 +1,26 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://github.com/asciimoo/wuzz |
|||
TERMUX_PKG_DESCRIPTION="Interactive command line tool for HTTP inspection" |
|||
TERMUX_PKG_LICENSE="AGPL-V3" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.4.0 |
|||
TERMUX_PKG_REVISION=5 |
|||
TERMUX_PKG_SRCURL=https://github.com/asciimoo/wuzz/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=acf8e82481740d1403b744c58918b9089128d91c3c6edc15b76b6e1c97ead645 |
|||
|
|||
termux_step_make() { |
|||
termux_setup_golang |
|||
|
|||
export GOPATH=$TERMUX_PKG_BUILDDIR |
|||
mkdir -p "$GOPATH"/src/github.com/asciimoo |
|||
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/asciimoo/wuzz |
|||
|
|||
cd "$GOPATH"/src/github.com/asciimoo/wuzz |
|||
go get -d -v github.com/asciimoo/wuzz |
|||
go build |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
install -Dm700 \ |
|||
"$GOPATH"/src/github.com/asciimoo/wuzz/wuzz \ |
|||
"$TERMUX_PREFIX"/bin/wuzz |
|||
} |
@ -0,0 +1,9 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://zsync.moria.org.uk/ |
|||
TERMUX_PKG_DESCRIPTION="A file transfer program to download files from remote web servers" |
|||
TERMUX_PKG_LICENSE="Artistic-License-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" |
|||
TERMUX_PKG_VERSION=0.6.2 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=http://zsync.moria.org.uk/download/zsync-$TERMUX_PKG_VERSION.tar.bz2 |
|||
TERMUX_PKG_SHA256=0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2 |
|||
TERMUX_PKG_BUILD_IN_SRC=true |
Loading…
Reference in new issue