From aba9ba3a6cd0c087a9d03866f652dcab61eee956 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 24 Sep 2016 13:46:46 -0700 Subject: patch README for Debian Remove build instructions, and functions for when zxcvbn-c ws compiled with USE_DICT_FILE (see README.source). Forwarded: not-needed Gbp-Pq: Name patch-README-for-Debian.patch --- README.md | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/README.md b/README.md index 73cd924..2adb941 100644 --- a/README.md +++ b/README.md @@ -11,42 +11,15 @@ The original coffee script version is available at An article on the reasons for zxcvbn is at https://tech.dropox.com/2012/04/zxcvbn-realistic-password-strength-estimation -##Building - -The makefile will build several test programs to test the code. It shows the steps needed -to use the code in C and C++ programs, using the dictionary data read from file or included -within the program executable. -The makefile has only been tried on Linux using GCC version 4.8.4, but should be faily -portable to other systems. - -When dictionary data is included in your program's executable, the files `zxcvbn.c` , -`zxcvbn.h` , `dict-src.h` are used in your program. - -When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h` -and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC -of the dictionary data file is written to `dict-crc.h` so your executable can detect -corruption of the data. - -Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++. - -The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from -dict-generate.cpp (see makefile for details). - ##Using -Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be -omitted when dictionary data is included in the executable. - Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy estimation and optional information on the password parts (which will need freeing with `ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character of it is entered into your program. The optional user dictionary can change between each call. -Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be -omitted when dictionary data is included in the executable. - -Review the test program in `test.c` for an example. +Review the test program in `examples/test.c` for an example. ## Differences from the original version. -- cgit v1.2.3 From e25022026478f56c5f0a905681eb934535567301 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 8 Sep 2018 11:29:01 -0700 Subject: cross =================================================================== Gbp-Pq: Name cross.patch --- makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 3b1b519..0957b06 100644 --- a/makefile +++ b/makefile @@ -5,6 +5,7 @@ CXXFLAGS ?= -O2 -Wall -Wextra CC ?= gcc AR ?= ar CXX ?= g++ +CXX_FOR_BUILD ?= $(CXX) # need zxcvbn.h prior to package installation CPPFLAGS += -I. @@ -57,7 +58,7 @@ dict-crc.h: dictgen $(WORDS) ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) dictgen: dict-generate.cpp makefile - $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ -o dictgen dict-generate.cpp $(LDFLAGS) test-c++inline: test.c zxcvbn-c++inline.o -- cgit v1.2.3 From 57e9ab639f40d5ba8a7bde59bb22f9f9accf6d36 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 24 Sep 2016 13:46:46 -0700 Subject: patch README for Debian Remove build instructions, and functions for when zxcvbn-c ws compiled with USE_DICT_FILE (see README.source). Forwarded: not-needed Gbp-Pq: Name patch-README-for-Debian.patch --- README.md | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/README.md b/README.md index 1fe31e7..9868fff 100644 --- a/README.md +++ b/README.md @@ -11,42 +11,15 @@ The original CoffeeScript version is available at An article on the reasons for zxcvbn is at https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-password-strength-estimation/ -## Building - -The makefile will build several test programs to test the code. It shows the steps needed -to use the code in C and C++ programs, using the dictionary data read from file or included -within the program executable. -The makefile has only been tried on Linux using GCC version 4.8.4, but should be fairly -portable to other systems. - -When dictionary data is included in your program's executable, the files `zxcvbn.c` , -`zxcvbn.h` , `dict-src.h` are used in your program. - -When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h` -and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC -of the dictionary data file is written to `dict-crc.h` so your executable can detect -corruption of the data. - -Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++. - -The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from -dict-generate.cpp (see makefile for details). - ## Using -Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be -omitted when dictionary data is included in the executable. - Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy estimation and optional information on the password parts (which will need freeing with `ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character of it is entered into your program. The optional user dictionary can change between each call. -Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be -omitted when dictionary data is included in the executable. - -Review the test program in `test.c` for an example. +Review the test program in `examples/test.c` for an example. ## Differences from the original version -- cgit v1.2.3 From b976403f5c302ff65f4800eb932c26e11eea60e2 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sun, 25 Mar 2018 13:36:47 +0200 Subject: fix crossbuilding zxcvbn-c Gbp-Pq: Name cross.patch --- makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 40c88f2..6223330 100644 --- a/makefile +++ b/makefile @@ -5,6 +5,7 @@ CXXFLAGS ?= -O2 -Wall -Wextra CC ?= gcc AR ?= ar CXX ?= g++ +CXX_FOR_BUILD ?= $(CXX) # need zxcvbn.h prior to package installation CPPFLAGS += -I. @@ -61,7 +62,7 @@ dict-crc.h: dictgen $(WORDS) ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) dictgen: dict-generate.cpp makefile - $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ -o dictgen dict-generate.cpp $(LDFLAGS) test-c++inline: test.c zxcvbn-c++inline.o -- cgit v1.2.3 From 3e21e764ce071225e34d3102ef6691b54302f21a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 8 Sep 2018 11:35:01 -0700 Subject: Commit patch queue (exported by git-debrebase) [git-debrebase make-patches: export and commit patches] --- debian/patches/cross.patch | 29 ++++++++++++++ debian/patches/patch-README-for-Debian.patch | 60 ++++++++++++++++++++++++++++ debian/patches/series | 2 + 3 files changed, 91 insertions(+) create mode 100644 debian/patches/cross.patch create mode 100644 debian/patches/patch-README-for-Debian.patch create mode 100644 debian/patches/series diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch new file mode 100644 index 0000000..cd46962 --- /dev/null +++ b/debian/patches/cross.patch @@ -0,0 +1,29 @@ +From: Helmut Grohne +Date: Sun, 25 Mar 2018 13:36:47 +0200 +Subject: fix crossbuilding zxcvbn-c + +--- + makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/makefile b/makefile +index 40c88f2..6223330 100644 +--- a/makefile ++++ b/makefile +@@ -5,6 +5,7 @@ CXXFLAGS ?= -O2 -Wall -Wextra + CC ?= gcc + AR ?= ar + CXX ?= g++ ++CXX_FOR_BUILD ?= $(CXX) + + # need zxcvbn.h prior to package installation + CPPFLAGS += -I. +@@ -61,7 +62,7 @@ dict-crc.h: dictgen $(WORDS) + ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) + + dictgen: dict-generate.cpp makefile +- $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ ++ $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + -o dictgen dict-generate.cpp $(LDFLAGS) + + test-c++inline: test.c zxcvbn-c++inline.o diff --git a/debian/patches/patch-README-for-Debian.patch b/debian/patches/patch-README-for-Debian.patch new file mode 100644 index 0000000..e3db968 --- /dev/null +++ b/debian/patches/patch-README-for-Debian.patch @@ -0,0 +1,60 @@ +From: Sean Whitton +Date: Sat, 24 Sep 2016 13:46:46 -0700 +Subject: patch README for Debian + +Remove build instructions, and functions for when zxcvbn-c ws compiled +with USE_DICT_FILE (see README.source). + +Forwarded: not-needed +--- + README.md | 29 +---------------------------- + 1 file changed, 1 insertion(+), 28 deletions(-) + +diff --git a/README.md b/README.md +index 1fe31e7..9868fff 100644 +--- a/README.md ++++ b/README.md +@@ -11,42 +11,15 @@ The original CoffeeScript version is available at + An article on the reasons for zxcvbn is at + https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-password-strength-estimation/ + +-## Building +- +-The makefile will build several test programs to test the code. It shows the steps needed +-to use the code in C and C++ programs, using the dictionary data read from file or included +-within the program executable. +-The makefile has only been tried on Linux using GCC version 4.8.4, but should be fairly +-portable to other systems. +- +-When dictionary data is included in your program's executable, the files `zxcvbn.c` , +-`zxcvbn.h` , `dict-src.h` are used in your program. +- +-When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h` +-and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC +-of the dictionary data file is written to `dict-crc.h` so your executable can detect +-corruption of the data. +- +-Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++. +- +-The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from +-dict-generate.cpp (see makefile for details). +- + ## Using + +-Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be +-omitted when dictionary data is included in the executable. +- + Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy + estimation and optional information on the password parts (which will need freeing with + `ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character + of it is entered into your program. The optional user dictionary can change between each + call. + +-Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be +-omitted when dictionary data is included in the executable. +- +-Review the test program in `test.c` for an example. ++Review the test program in `examples/test.c` for an example. + + + ## Differences from the original version diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..559c234 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +patch-README-for-Debian.patch +cross.patch -- cgit v1.2.3 From 93843ab4ad48b5300f24bf09add0d20551261e6f Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 8 Sep 2018 11:52:26 -0700 Subject: finalise changelog for 2.4+dfsg-1 upload --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 88c1036..212dfd8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -zxcvbn-c (2.4+dfsg-1) UNRELEASED; urgency=medium +zxcvbn-c (2.4+dfsg-1) unstable; urgency=medium * Update to new upstream version 2.4+dfsg. * Add d/copyright stanza for test-internals.c. - -- Sean Whitton Sat, 08 Sep 2018 11:31:00 -0700 + -- Sean Whitton Sat, 08 Sep 2018 11:52:22 -0700 zxcvbn-c (2.3+dfsg-2) unstable; urgency=medium -- cgit v1.2.3 From e67c117265c7d8718b001b0c814f1ee1d638c09e Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sun, 9 Sep 2018 08:20:31 -0700 Subject: Fix a parallel FTBFS caused by a missing makefile dependency Gbp-Pq: Name parallel.patch --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 6223330..5e8ea98 100644 --- a/makefile +++ b/makefile @@ -45,7 +45,7 @@ test-inline: test.c zxcvbn-inline.o $(CC) $(CPPFLAGS) $(CFLAGS) \ -o test-inline test.c zxcvbn-inline.o $(LDFLAGS) -lm -test-internals: test-internals.c zxcvbn.c dict-crc.h zxcvbn.h +test-internals: test-internals.c zxcvbn.c dict-src.h dict-crc.h zxcvbn.h $(CC) $(CPPFLAGS) $(CFLAGS) \ -o test-internals test-internals.c $(LDFLAGS) -lm -- cgit v1.2.3 From af820b1ccee1bbdcf259b47d30cbe9768cbe2c39 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 9 Sep 2018 08:22:05 -0700 Subject: changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 212dfd8..3525e17 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +zxcvbn-c (2.4+dfsg-2) UNRELEASED; urgency=medium + + * Add missing dependency in Makefile (Closes: #908381). + Thank you to Adrian Bunk for the patch. + + -- Sean Whitton Sun, 09 Sep 2018 08:21:26 -0700 + zxcvbn-c (2.4+dfsg-1) unstable; urgency=medium * Update to new upstream version 2.4+dfsg. -- cgit v1.2.3 From bb39c477cf7bee6ad155eba5abc244531369d472 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 9 Sep 2018 08:28:01 -0700 Subject: finalise changelog for 2.4+dfsg-2 upload --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3525e17..9cecf4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -zxcvbn-c (2.4+dfsg-2) UNRELEASED; urgency=medium +zxcvbn-c (2.4+dfsg-2) unstable; urgency=medium * Add missing dependency in Makefile (Closes: #908381). Thank you to Adrian Bunk for the patch. - -- Sean Whitton Sun, 09 Sep 2018 08:21:26 -0700 + -- Sean Whitton Sun, 09 Sep 2018 08:28:00 -0700 zxcvbn-c (2.4+dfsg-1) unstable; urgency=medium -- cgit v1.2.3 From 5dad81321042a43cdc45d61158640deb8cb237b6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 9 Sep 2018 08:28:04 -0700 Subject: Commit patch queue (exported by git-debrebase) [git-debrebase make-patches: export and commit patches] --- debian/patches/parallel.patch | 21 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 22 insertions(+) create mode 100644 debian/patches/parallel.patch diff --git a/debian/patches/parallel.patch b/debian/patches/parallel.patch new file mode 100644 index 0000000..497af75 --- /dev/null +++ b/debian/patches/parallel.patch @@ -0,0 +1,21 @@ +From: Adrian Bunk +Date: Sun, 9 Sep 2018 08:20:31 -0700 +Subject: Fix a parallel FTBFS caused by a missing makefile dependency + +--- + makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/makefile b/makefile +index 6223330..5e8ea98 100644 +--- a/makefile ++++ b/makefile +@@ -45,7 +45,7 @@ test-inline: test.c zxcvbn-inline.o + $(CC) $(CPPFLAGS) $(CFLAGS) \ + -o test-inline test.c zxcvbn-inline.o $(LDFLAGS) -lm + +-test-internals: test-internals.c zxcvbn.c dict-crc.h zxcvbn.h ++test-internals: test-internals.c zxcvbn.c dict-src.h dict-crc.h zxcvbn.h + $(CC) $(CPPFLAGS) $(CFLAGS) \ + -o test-internals test-internals.c $(LDFLAGS) -lm + diff --git a/debian/patches/series b/debian/patches/series index 559c234..f4182e3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ patch-README-for-Debian.patch cross.patch +parallel.patch -- cgit v1.2.3 From 1fe3389601d40ac732cb9e0a6f7737111a8dbe91 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 24 Sep 2016 13:46:46 -0700 Subject: patch README for Debian Remove build instructions, and functions for when zxcvbn-c ws compiled with USE_DICT_FILE (see README.source). Forwarded: not-needed Gbp-Pq: Name patch-README-for-Debian.patch --- README.md | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/README.md b/README.md index 2833487..9d4d0ea 100644 --- a/README.md +++ b/README.md @@ -11,42 +11,15 @@ The original CoffeeScript version is available at An article on the reasons for zxcvbn is at https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-password-strength-estimation/ -## Building - -The makefile will build several test programs to test the code. It shows the steps needed -to use the code in C and C++ programs, using the dictionary data read from file or included -within the program executable. -The makefile has only been tried on Linux using GCC version 4.8.4, but should be fairly -portable to other systems. - -When dictionary data is included in your program's executable, the files `zxcvbn.c` , -`zxcvbn.h` , `dict-src.h` are used in your program. - -When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h` -and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC -of the dictionary data file is written to `dict-crc.h` so your executable can detect -corruption of the data. - -Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++. - -The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from -dict-generate.cpp (see makefile for details). - ## Using -Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be -omitted when dictionary data is included in the executable. - Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy estimation and optional information on the password parts (which will need freeing with `ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character of it is entered into your program. The optional user dictionary can change between each call. -Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be -omitted when dictionary data is included in the executable. - -Review the test program in `test.c` for an example. +Review the test program in `examples/test.c` for an example. ## Differences from the original version -- cgit v1.2.3 From 75b7bd5e9799f7e353fdfd01bf5d1e44cb1632a5 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sun, 25 Mar 2018 13:36:47 +0200 Subject: fix crossbuilding zxcvbn-c Gbp-Pq: Name cross.patch --- makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 399bccc..5e8ea98 100644 --- a/makefile +++ b/makefile @@ -5,6 +5,7 @@ CXXFLAGS ?= -O2 -Wall -Wextra CC ?= gcc AR ?= ar CXX ?= g++ +CXX_FOR_BUILD ?= $(CXX) # need zxcvbn.h prior to package installation CPPFLAGS += -I. @@ -61,7 +62,7 @@ dict-crc.h: dictgen $(WORDS) ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) dictgen: dict-generate.cpp makefile - $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ -o dictgen dict-generate.cpp $(LDFLAGS) test-c++inline: test.c zxcvbn-c++inline.o -- cgit v1.2.3 From 52cebd82243e6785ad14b84692e206dddcd913ca Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 10 Apr 2022 13:45:08 -0700 Subject: Commit patch queue (exported by git-debrebase) [git-debrebase make-patches: export and commit patches] --- debian/patches/cross.patch | 29 ++++++++++++++ debian/patches/patch-README-for-Debian.patch | 60 ++++++++++++++++++++++++++++ debian/patches/series | 2 + 3 files changed, 91 insertions(+) create mode 100644 debian/patches/cross.patch create mode 100644 debian/patches/patch-README-for-Debian.patch create mode 100644 debian/patches/series diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch new file mode 100644 index 0000000..704b7fa --- /dev/null +++ b/debian/patches/cross.patch @@ -0,0 +1,29 @@ +From: Helmut Grohne +Date: Sun, 25 Mar 2018 13:36:47 +0200 +Subject: fix crossbuilding zxcvbn-c + +--- + makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/makefile b/makefile +index 399bccc..5e8ea98 100644 +--- a/makefile ++++ b/makefile +@@ -5,6 +5,7 @@ CXXFLAGS ?= -O2 -Wall -Wextra + CC ?= gcc + AR ?= ar + CXX ?= g++ ++CXX_FOR_BUILD ?= $(CXX) + + # need zxcvbn.h prior to package installation + CPPFLAGS += -I. +@@ -61,7 +62,7 @@ dict-crc.h: dictgen $(WORDS) + ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) + + dictgen: dict-generate.cpp makefile +- $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ ++ $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + -o dictgen dict-generate.cpp $(LDFLAGS) + + test-c++inline: test.c zxcvbn-c++inline.o diff --git a/debian/patches/patch-README-for-Debian.patch b/debian/patches/patch-README-for-Debian.patch new file mode 100644 index 0000000..44f389b --- /dev/null +++ b/debian/patches/patch-README-for-Debian.patch @@ -0,0 +1,60 @@ +From: Sean Whitton +Date: Sat, 24 Sep 2016 13:46:46 -0700 +Subject: patch README for Debian + +Remove build instructions, and functions for when zxcvbn-c ws compiled +with USE_DICT_FILE (see README.source). + +Forwarded: not-needed +--- + README.md | 29 +---------------------------- + 1 file changed, 1 insertion(+), 28 deletions(-) + +diff --git a/README.md b/README.md +index 2833487..9d4d0ea 100644 +--- a/README.md ++++ b/README.md +@@ -11,42 +11,15 @@ The original CoffeeScript version is available at + An article on the reasons for zxcvbn is at + https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-password-strength-estimation/ + +-## Building +- +-The makefile will build several test programs to test the code. It shows the steps needed +-to use the code in C and C++ programs, using the dictionary data read from file or included +-within the program executable. +-The makefile has only been tried on Linux using GCC version 4.8.4, but should be fairly +-portable to other systems. +- +-When dictionary data is included in your program's executable, the files `zxcvbn.c` , +-`zxcvbn.h` , `dict-src.h` are used in your program. +- +-When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h` +-and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC +-of the dictionary data file is written to `dict-crc.h` so your executable can detect +-corruption of the data. +- +-Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++. +- +-The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from +-dict-generate.cpp (see makefile for details). +- + ## Using + +-Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be +-omitted when dictionary data is included in the executable. +- + Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy + estimation and optional information on the password parts (which will need freeing with + `ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character + of it is entered into your program. The optional user dictionary can change between each + call. + +-Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be +-omitted when dictionary data is included in the executable. +- +-Review the test program in `test.c` for an example. ++Review the test program in `examples/test.c` for an example. + + + ## Differences from the original version diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..559c234 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +patch-README-for-Debian.patch +cross.patch -- cgit v1.2.3 From 3b2be819f507ee76fa1b969f955f09a7f32080dc Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Mon, 8 Jan 2024 08:09:08 +0100 Subject: makefile: Use CPPFLAGS_FOR_BUILD & CXXFLAGS_FOR_BUILD --- makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 5e8ea98..5a5a130 100644 --- a/makefile +++ b/makefile @@ -10,6 +10,9 @@ CXX_FOR_BUILD ?= $(CXX) # need zxcvbn.h prior to package installation CPPFLAGS += -I. +CPPFLAGS_FOR_BUILD ?= $(CPPFLAGS) +CXXFLAGS_FOR_BUILD ?= $(CXXFLAGS) + # library metadata TARGET_LIB = libzxcvbn.so.0.0.0 SONAME = libzxcvbn.so.0 @@ -62,7 +65,7 @@ dict-crc.h: dictgen $(WORDS) ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) dictgen: dict-generate.cpp makefile - $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + $(CXX_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) -std=c++11 $(CXXFLAGS_FOR_BUILD) \ -o dictgen dict-generate.cpp $(LDFLAGS) test-c++inline: test.c zxcvbn-c++inline.o -- cgit v1.2.3 From 74f999af25e9298f6892a940476dff0dcf5207c5 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 26 Feb 2024 11:24:06 +0800 Subject: changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 395db34..ccecb74 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +zxcvbn-c (2.5+dfsg-2) unstable; urgency=medium + + * makefile: Use CPPFLAGS_FOR_BUILD & CXXFLAGS_FOR_BUILD (Closes: #1060268). + Thanks to Helmut Grohne for the patch. + + -- Sean Whitton Mon, 26 Feb 2024 11:22:14 +0800 + zxcvbn-c (2.5+dfsg-1) unstable; urgency=medium * Update to new upstream version 2.5+dfsg. -- cgit v1.2.3 From baae733430abf00cb9d58812d79da7db72c644cf Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 26 Feb 2024 11:24:25 +0800 Subject: Commit patch queue (exported by git-debrebase) [git-debrebase make-patches: export and commit patches] --- ...Use-CPPFLAGS_FOR_BUILD-CXXFLAGS_FOR_BUILD.patch | 31 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 debian/patches/makefile-Use-CPPFLAGS_FOR_BUILD-CXXFLAGS_FOR_BUILD.patch diff --git a/debian/patches/makefile-Use-CPPFLAGS_FOR_BUILD-CXXFLAGS_FOR_BUILD.patch b/debian/patches/makefile-Use-CPPFLAGS_FOR_BUILD-CXXFLAGS_FOR_BUILD.patch new file mode 100644 index 0000000..ddee2e0 --- /dev/null +++ b/debian/patches/makefile-Use-CPPFLAGS_FOR_BUILD-CXXFLAGS_FOR_BUILD.patch @@ -0,0 +1,31 @@ +From: Helmut Grohne +Date: Mon, 8 Jan 2024 08:09:08 +0100 +Subject: makefile: Use CPPFLAGS_FOR_BUILD & CXXFLAGS_FOR_BUILD + +--- + makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/makefile b/makefile +index 5e8ea98..5a5a130 100644 +--- a/makefile ++++ b/makefile +@@ -10,6 +10,9 @@ CXX_FOR_BUILD ?= $(CXX) + # need zxcvbn.h prior to package installation + CPPFLAGS += -I. + ++CPPFLAGS_FOR_BUILD ?= $(CPPFLAGS) ++CXXFLAGS_FOR_BUILD ?= $(CXXFLAGS) ++ + # library metadata + TARGET_LIB = libzxcvbn.so.0.0.0 + SONAME = libzxcvbn.so.0 +@@ -62,7 +65,7 @@ dict-crc.h: dictgen $(WORDS) + ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) + + dictgen: dict-generate.cpp makefile +- $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ ++ $(CXX_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) -std=c++11 $(CXXFLAGS_FOR_BUILD) \ + -o dictgen dict-generate.cpp $(LDFLAGS) + + test-c++inline: test.c zxcvbn-c++inline.o diff --git a/debian/patches/series b/debian/patches/series index 559c234..66236a7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ patch-README-for-Debian.patch cross.patch +makefile-Use-CPPFLAGS_FOR_BUILD-CXXFLAGS_FOR_BUILD.patch -- cgit v1.2.3