commit 0b56d86cf88ebb6ea35e9530aba23d65451c01d8 from: Alex Arx date: Tue Nov 19 11:53:14 2024 UTC document the dictionary paths, remove m4 compile-time dependency and fix the man page commit - 1384c2edaf411442ce10a2487e43e4bc80d5c910 commit + 0b56d86cf88ebb6ea35e9530aba23d65451c01d8 blob - 86db2cebe36322c9345d67a423ec7af0372576a0 blob + 0d59a1335a2c62aa63e479ae7019c70597c56ae1 --- Makefile +++ Makefile @@ -4,13 +4,10 @@ BIN = gpass OBJ = $(BIN:=.o) SRC = $(BIN:=.c) MAN = $(BIN:=.1) -M4S = $(BIN:=.m4) PREFIX ?= $(DESTDIR)/usr/local MANPREFIX ?= $(PREFIX)/man -M4 ?= m4 - LIBS = -lm bindir = $(PREFIX)/bin @@ -20,19 +17,12 @@ gpassdir = $(sharedir)/gpass all: $(BIN) $(MAN) -.SUFFIXES: .c .o .1 .m4 - $(BIN): $(OBJ) $(CC) -o $@ $(OBJ) $(LIBS) $(LDFLAGS) .c.o: $(CC) -std=c99 -pedantic -DPREFIX=\"$(PREFIX)\" $(CFLAGS) $(CPPFLAGS) -c $< -$(MAN): $(M4S) - -.m4.1: - $(M4) -DPREFIX=$(PREFIX) <$< >$@ - install: all mkdir -p $(bindir) install -m 755 $(BIN) $(bindir) @@ -47,11 +37,11 @@ uninstall: rm -rf $(gpassdir) # clean up legacy files clean: - -rm -f $(BIN) $(OBJ) $(MAN) *.tar.gz *.core gpass-$(V) + -rm -rf $(BIN) $(OBJ) *.tar.gz *.core gpass-$(V) dist: clean mkdir -p gpass-$(V) - cp -f CHANGES COPYING README Makefile version.mk eff.long $(SRC) $(M4S) \ + cp -f CHANGES COPYING README Makefile version.mk eff.long $(SRC) $(MAN) \ gpass-$(V) tar cf - gpass-$(V) | gzip >gpass-$(V).tar.gz rm -rf gpass-$(V) blob - /dev/null blob + 079446b9f6af906da2948c473b57b7f1c8ace4f0 (mode 644) --- /dev/null +++ gpass.1 @@ -0,0 +1,72 @@ +.Dd November 17, 2024 +.Dt GPASS 1 +.Os +.Sh NAME +.Nm gpass +.Nd generate passphrases +.Sh SYNOPSIS +.Nm +.Op Fl a +.Op Fl d Ar dict +.Op Fl e Ar bits +.Op Fl n Ar num +.Sh DESCRIPTION +The utility +.Nm +outputs a secure passphrase by randomly choosing an appropriate number of lines +from a dictionary file, containing whitespace-separated words. +The options are as follows: +.Bl -tag -width Ds +.It Fl a +Instead of generating a passphrases from the wordlist, generate strings of +random alphanumeric characters. +.It Fl d Ar dict +Use the dictionary +.Ar dict . +.It Fl e Ar bits +Generate a passphrase with at least the specified number of +.Ar bits +of entropy. +Default is 70. +.It Fl l Ar length +Generate a passphrase of +.Ar length +words, or characters if +.Fl a +is used. +Overrides +.Fl e . +.It Fl n Ar num +Generate +.Ar num +passphrases instead of just one. +.El +.Sh ENVIRONMENT +.Bl -tag -width GPASS_DIC +.It Ev GPASS_DIC +Path to the dictionary file to use unless the option +.Fl d +is specified. +.El +.Sh FILES +.Bl -tag -width Ds -compact +.It Pa $XDG_DATA_HOME/gpass.dic +.It Pa $HOME/.gpass.dic +.It Pa /usr/share/gpass.dic +.It Pa /usr/local/share/gpass.dic +Paths searched for the default dictionary file. +Only searched if +.Ev GPASS_DIC +is not set or empty, and +.Fl d +is not used. +First to be found is used. +.Pa $HOME/.gpass.dic +is only used when +.Ev XDG_DATA_HOME +is not set. +.El +.Sh EXIT STATUS +.Ex -std +.Sh AUTHORS +.An Alex Arx Aq Mt aa@manpager.net . blob - 80853795ba23cea0a9cfffd2d981d098b060c04a (mode 644) blob + /dev/null --- gpass.m4 +++ /dev/null @@ -1,59 +0,0 @@ -.Dd May 30, 2023 -.Dt GPASS 1 -.Os -.Sh NAME -.Nm gpass -.Nd generate passphrases -.Sh SYNOPSIS -.Nm -.Op Fl a -.Op Fl d Ar dict -.Op Fl e Ar bits -.Op Fl n Ar num -.Sh DESCRIPTION -The utility -.Nm -outputs a secure passphrase by randomly choosing an appropriate number of lines -from a dictionary file, containing whitespace-separated words. -The options are as follows: -.Bl -tag -width Ds -.It Fl a -Instead of generating a passphrases from the wordlist, generate strings of -random alphanumeric characters. -.It Fl d Ar dict -Use the dictionary -.Ar dict . -.It Fl e Ar bits -Generate a passphrase with at least the specified number of -.Ar bits -of entropy. -Default is 70. -.It Fl l Ar length -Generate a passphrase of -.Ar length -words, or characters if -.Fl a -is used. -Overrides -.Fl e . -.It Fl n Ar num -Generate -.Ar num -passphrases instead of just one. -.El -.Sh ENVIRONMENT -.Bl -tag -width GPASS_DIC -.It Ev GPASS_DIC -Path to the dictionary file to use unless the option -.Fl d -is specified. -.El -.Sh FILES -.Bl -tag -width Ds -.It Pa PREFIX/share/gpass/eff.long -The default dictionary file. -.El -.Sh AUTHORS -.An Alexander Arkhipov Aq Mt aa@manpager.net . -.Sh EXIT STATUS -.Ex -std