Skip to content

Commit f681b78

Browse files
author
Casey Boettcher
committed
Initial commit:
new file: CHANGELOG new file: COPYING new file: Makefile new file: README new file: install-sh new file: mkinstalldirs new file: rephrase.c
0 parents  commit f681b78

File tree

7 files changed

+2064
-0
lines changed

7 files changed

+2064
-0
lines changed

CHANGELOG

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
--- Rephrase 0.2 ---
2+
3+
add support for recovering passphrases of files encrypted using
4+
'gpg --symmetric'
5+
6+
add support for recovering passphrases of LUKS encrypted volume
7+
8+
add some static (in the sense: "this declaration is only visible in this
9+
compilation unit") modifiers
10+
11+
pass more sensible strings to perror()
12+
13+
fclose() the file pointer to /dev/tty when we've finished using it
14+
15+
fix for platforms where sizeof(int) > 8:
16+
avoid stringifying an `int' into a buffer only large enough for up to
17+
64-bit `int's (otherwise, longer strings would be truncated, causing
18+
(possibly intermittent) failures to find a passphrase)
19+
20+
drop any setgid privileges we may have (rephrase shouldn't be setgid,
21+
but it could be if `binmode' were set to a silly value when installing)
22+
23+
when spawning gpg, use --no-tty as well as --batch (just in case this is
24+
necessary to ensure that output is never written to the terminal)
25+
26+
rename the BINDIR variable (which can be overridden in a `make install'
27+
command) to bindir (to follow GNU standards)
28+
29+
also honour the standard DESTDIR variable (in case that's set when
30+
installing)
31+
32+
instead of putting -D options directly in CFLAGS, put them in a DEFS
33+
variable, and include that variable in CPPFLAGS (not in CFLAGS)
34+
35+
avoid operator scope issues with `PATTERN_MAX':
36+
when `PATTERN_MAX' is specified in DEFS, put brackets around its
37+
(user-supplied) value, so that expressions such as `PATTERN_MAX + 1'
38+
will not be misinterpreted if the value supplied for `PATTERN_MAX' is
39+
something silly like `1 << 10'
40+
41+
make install: use `mkinstalldirs' and `install-sh' scripts (instead of
42+
using `mkdir', `rm', `cp' and `chmod' directly); and allow overriding of
43+
`dirmode', `binowner', `bingroup', and `binmode'
44+
45+
declare phony Makefile targets to be `.PHONY'
46+
47+
updates and fixes for the README
48+
49+
change license from GPL 2 to GPL 3
50+
51+
--- Rephrase 0.1 ---

COPYING

+674
Large diffs are not rendered by default.

Makefile

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Makefile (for compiling and installing, or building a distribution)
2+
# Copyright (C) 2003, 2014 Phil Lanch
3+
#
4+
# This file is part of Rephrase.
5+
#
6+
# Rephrase is free software; you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation; version 3.
9+
#
10+
# Rephrase is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
SHELL = /bin/sh
19+
20+
program = rephrase
21+
version = 0.2
22+
23+
what = $(program)-$(version)
24+
25+
GPG =
26+
ifneq (,$(GPG))
27+
gpg_def = -DGPG=\"$(GPG)\"
28+
else
29+
gpg_def =
30+
endif
31+
32+
CRYPTSETUP =
33+
ifneq (,$(CRYPTSETUP))
34+
cryptsetup_def = -DCRYPTSETUP=\"$(CRYPTSETUP)\"
35+
else
36+
cryptsetup_def =
37+
endif
38+
39+
PATTERN_MAX =
40+
ifneq (,$(PATTERN_MAX))
41+
pattern_max_def = -DPATTERN_MAX=\($(PATTERN_MAX)\)
42+
else
43+
pattern_max_def =
44+
endif
45+
46+
ARGS_MAX =
47+
ifneq (,$(ARGS_MAX))
48+
args_max_def = -DARGS_MAX=\($(ARGS_MAX)\)
49+
else
50+
args_max_def =
51+
endif
52+
53+
DEFS = -DVERSION=\"$(version)\" $(gpg_def) $(cryptsetup_def) $(pattern_max_def) $(args_max_def)
54+
CPPFLAGS += $(DEFS)
55+
CFLAGS = -Wall
56+
57+
prefix = /usr/local
58+
exec_prefix = ${prefix}
59+
bindir = ${exec_prefix}/bin
60+
61+
dirmode = 755
62+
binowner = 0
63+
bingroup = 0
64+
binmode = 4711
65+
66+
files = CHANGELOG COPYING install-sh Makefile mkinstalldirs README $(program).c
67+
68+
all: $(program)
69+
70+
dist: $(what).tar.gz $(what).tar.bz2
71+
72+
install: all
73+
./mkinstalldirs -m $(dirmode) $(DESTDIR)$(bindir)
74+
./install-sh -c -o $(binowner) -g $(bingroup) -m $(binmode) $(program) \
75+
$(DESTDIR)$(bindir)/$(program)
76+
77+
$(what).tar: $(files)
78+
rm -f $@
79+
rm -rf TREE
80+
mkdir TREE
81+
mkdir TREE/$(what)
82+
cp -p $(files) TREE/$(what)
83+
cd TREE && { tar -c -f ../$@ $(what) || { rm -f ../$@ && exit 1; }; }
84+
85+
$(what).tar.gz: $(what).tar
86+
rm -f $@
87+
gzip -c -9 $< > $@ || { rm -f $@ && exit 1; }
88+
89+
$(what).tar.bz2: $(what).tar
90+
rm -f $@
91+
bzip2 -k -9 $< || { rm -f $@ && exit 1; }
92+
93+
clean::
94+
rm -f $(program) $(program)-*.tar
95+
rm -rf TREE
96+
97+
distclean::
98+
$(MAKE) clean
99+
rm -f $(program)-*.tar.gz $(program)-*.tar.bz2
100+
101+
.PHONY: all dist install clean distclean

0 commit comments

Comments
 (0)