mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials
@ 2012-11-13  9:29 Andreas Bießmann
  2012-11-13 15:26 ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Bießmann @ 2012-11-13  9:29 UTC (permalink / raw)
  To: PTXdist list

Before the search for alternative location of the 'db' to lookup the number
for a given user/group-name was only searched in ${prefix} projectroot which
is mostly available in a project. However the ${prefix} for installed ptxdist
is 'generic'.
Check this additional prefix to prevent errors when no local /etc/passwd or
/etc/group is available to use the generic version provbided by ptxdist.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
---
 scripts/lib/ptxd_make_xpkg_pkg.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 476ad58..8dd850c 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -48,7 +48,8 @@ ptxd_install_getent_id() {
 
     eval ${key}_name='\(${!key}\)'
 
-    if ! ptxd_get_alternative "projectroot" "${db}"; then
+    if ! ptxd_get_alternative "projectroot" "${db}" -o \
+        ! ptxd_get_alternative "generic" "${db}" ; then
 	ptxd_bailout "
 
   Unable to find '${db}'.
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials
  2012-11-13  9:29 [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials Andreas Bießmann
@ 2012-11-13 15:26 ` Marc Kleine-Budde
  2012-11-13 16:00   ` Andreas Bießmann
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-11-13 15:26 UTC (permalink / raw)
  To: ptxdist; +Cc: Andreas Bießmann


[-- Attachment #1.1: Type: text/plain, Size: 1043 bytes --]

On 11/13/2012 10:29 AM, Andreas Bießmann wrote:
> Before the search for alternative location of the 'db' to lookup the number
> for a given user/group-name was only searched in ${prefix} projectroot which
> is mostly available in a project. However the ${prefix} for installed ptxdist
> is 'generic'.
> Check this additional prefix to prevent errors when no local /etc/passwd or
> /etc/group is available to use the generic version provbided by ptxdist.
> 
> Signed-off-by: Andreas Bießmann <biessmann@corscience.de>

There should be a link in your ptxdist git checkout/installtion.

[mkl@dude:~ (master)]$ ll /opt/lib/ptxdist-2012.10.0/projectroot
lrwxrwxrwx 1 root root 7 Oct 12 10:02 /opt/lib/ptxdist-2012.10.0/projectroot -> generic/


Marc


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials
  2012-11-13 15:26 ` Marc Kleine-Budde
@ 2012-11-13 16:00   ` Andreas Bießmann
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Bießmann @ 2012-11-13 16:00 UTC (permalink / raw)
  To: ptxdist; +Cc: Marc Kleine-Budde

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13.11.2012 16:26, Marc Kleine-Budde wrote:
> On 11/13/2012 10:29 AM, Andreas Bießmann wrote:
>> Before the search for alternative location of the 'db' to lookup 
>> the number for a given user/group-name was only searched in 
>> ${prefix} projectroot which is mostly available in a project. 
>> However the ${prefix} for installed ptxdist is 'generic'. Check 
>> this additional prefix to prevent errors when no local 
>> /etc/passwd or /etc/group is available to use the generic
>> version provbided by ptxdist.
>> 
>> Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
> 
> There should be a link in your ptxdist git checkout/installtion.
> 
> [mkl@dude:~ (master)]$ ll /opt/lib/ptxdist-2012.10.0/projectroot 
> lrwxrwxrwx 1 root root 7 Oct 12 10:02 
> /opt/lib/ptxdist-2012.10.0/projectroot -> generic/

well, yes. You pointed a bug in my internal debian packages, thanks.

Best regards

Andreas Bießmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCibrQACgkQ1OEBoXD6rEwN6QCfcmvWIHMe09kfZS4flVdvn/Cr
IaoAoMcUuq4nIg4ddwALog+1+w9VSZ5/
=nhdx
-----END PGP SIGNATURE-----

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-13 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-13  9:29 [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials Andreas Bießmann
2012-11-13 15:26 ` Marc Kleine-Budde
2012-11-13 16:00   ` Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox