Bug#783695: apg: FTBFS

2016-03-12 Thread Marc Haber
tags #783695 confirmed pending
thanks

81fdd78a046342e1779bffec217e841be1812dcf Use getent passwd root instead of 
grepping /etc/passwd
diff --git a/debian/patches/Makefile b/debian/patches/Makefile
index 752bf2d..17b9608 100644
--- a/debian/patches/Makefile
+++ b/debian/patches/Makefile
@@ -45,3 +45,12 @@ Forwarded: not-needed

  
  # Solaris
+@@ -75,7 +75,7 @@ APGD_MAN_DIR = /man/man8
+
+ # == YOU DO NOT NEED TO MODIFY ANYTHING BELOW THIS LINE ==
+ # Find group ID for user root
+-FIND_GROUP = `grep '^root:' /etc/passwd | awk -F: '{ print $$4 }'`
++FIND_GROUP = `getent passwd root | awk -F: '{ print $$4 }'`
+
+ PROGNAME = apg
+ CS_PROGNAME = apgd

committed.



Bug#783695: apg: FTBFS

2015-04-29 Thread Edmund Grimley Evans
Source: apg
Version: 2.2.3.dfsg.1-2

This failed to build for me with an error like this:

./install-sh -c -m 0755 -o root -g `grep '^root:' /etc/passwd | awk
-F: '{ print $4 }'` ./apg /«PKGBUILDDIR»/debian/apg/usr/bin; \
./install-sh -c -m 0444 ./doc/man/apg.1
/«PKGBUILDDIR»/debian/apg/usr/share/man/man1; \
fi
mkdir /«PKGBUILDDIR»/debian/apg/usr/bin
mkdir /«PKGBUILDDIR»/debian/apg/usr/share
mkdir /«PKGBUILDDIR»/debian/apg/usr/share/man
mkdir /«PKGBUILDDIR»/debian/apg/usr/share/man/man1
install:  1 does not exist

This happened because I had two users called root in /etc/passwd,
perhaps a side-effect of how LDAP was set up, or something like that.
In any case, I don't think it's safe to assume that there will always
be exactly one user called root in /etc/passwd; there could be none
or more than one. So the code snippet

FIND_GROUP = `grep '^root:' /etc/passwd | awk -F: '{ print $$4 }'`

in the Makefile is not sufficiently robust. Could it be replaced or
somehow bypassed, please?


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org