From 850f20567efbcacdee4615b4dbf74daaec8925ab Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Wed, 24 Jul 2013 12:27:06 +0200 Subject: [PATCH] Fix apg --- pkgs/tools/security/apg/apg.patch | 44 +++++++++++++++++++++++++++++ pkgs/tools/security/apg/default.nix | 6 ++-- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 pkgs/tools/security/apg/apg.patch diff --git a/pkgs/tools/security/apg/apg.patch b/pkgs/tools/security/apg/apg.patch new file mode 100644 index 000000000000..abc22647d52f --- /dev/null +++ b/pkgs/tools/security/apg/apg.patch @@ -0,0 +1,44 @@ +diff -rc apg-2.2.3/Makefile apg-2.2.3-new/Makefile +*** apg-2.2.3/Makefile 2003-08-07 17:40:30.000000000 +0200 +--- apg-2.2.3-new/Makefile 2013-07-24 12:25:31.159938436 +0200 +*************** +*** 113,131 **** + if test -x ./apg; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + if test -x ./apgd; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ +! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ + fi + if test -x ./apgbfm; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + +--- 113,131 ---- + if test -x ./apg; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + if test -x ./apgd; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ +! ./install-sh -c -m 0755 ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ + fi + if test -x ./apgbfm; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + diff --git a/pkgs/tools/security/apg/default.nix b/pkgs/tools/security/apg/default.nix index 7eeb491374a3..28f66e1e4929 100644 --- a/pkgs/tools/security/apg/default.nix +++ b/pkgs/tools/security/apg/default.nix @@ -8,10 +8,8 @@ stdenv.mkDerivation rec { configurePhase = '' substituteInPlace Makefile --replace /usr/local "$out" ''; - preInstall = '' - export CHOWNPROG=true - export CHGRPPROG=true - ''; + + patches = [ ./apg.patch ]; meta = { description = "A tool set for random password generation.";