Opened 14 years ago

Last modified 14 years ago

#22798 closed defect

signing-party port is missing a dependency to "getent" — at Version 3

Reported by: brian.gupta@… Owned by: milosh@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc:
Port: signing-party

Description (last modified by jmroot (Joshua Root))

B$ gpg-mailkeys KEYIDMASKED /opt/local/bin/gpg-mailkeys: line 54: getent: command not found

Looks like getent isn't available on OS-X, due to weirdness in NetInfo and DirectoryServices vs Linux user management.

Looks like it's simply puling out the current user's name: getent passwd $USER | cut -d: -f5 | cut -d, -f1

We could use a fake script called getent like this:

#!/bin/bash
# This file will not be consulted for authentication unless the BSD local node
#!/bin/bash
if [ -z $1 ];
  then
    echo "You must specify an user"
    exit 1
  else
    echo `dscl . -read /Users/$2 RecordName | sed 's/RecordName: //g'`:*:`dscl . -read /Users/$2 UniqueID | sed 's/UniqueID: //g'`:`dscl . -read /Users/$2 PrimaryGroupID | sed 's/PrimaryGroupID: //g'`:`dscl . -read /Users/$2 RealName | sed -e 's/RealName://g' -e 's/^ //g' | awk '{printf("%s", $0 (NR==1 ? "" : ""))}'`:/Users/$2:`dscl . -read /Users/$2 UserShell | sed 's/UserShell: //g'`
fi

exit 0

Change History (3)

comment:1 in reply to:  description Changed 14 years ago by brian.gupta@…

Opps try this:

#!/bin/bash if [ -z $1 ];

then

echo "You must specify an user" exit 1

else

echo dscl . -read /Users/$2 RecordName | sed 's/RecordName: g':*:dscl . -read /Users/$2 UniqueID | sed 's/UniqueID: g':dscl . -read /Users/$2 PrimaryGroupID | sed 's/PrimaryGroupID: g':dscl . -read /Users/$2 RealName | sed -e 's/RealName://g' -e 's/ g' | awk '{printf("%s", $0 (NR==1 ? "" : ""))}':/Users/$2:dscl . -read /Users/$2 UserShell | sed 's/UserShell: g'

fi

exit 0

comment:2 in reply to:  description Changed 14 years ago by brian.gupta@…

Find another missing deplendcy: qprint. http://www.fourmilab.ch/webtools/qprint/

Replying to brian.gupta@…:

B$ gpg-mailkeys KEYIDMASKED /opt/local/bin/gpg-mailkeys: line 54: getent: command not found

Looks like getent isn't available on OS-X, due to weirdness in NetInfo and DirectoryServices vs Linux user management.

Looks like it's simply puling out the current user's name: getent passwd $USER | cut -d: -f5 | cut -d, -f1

We could use a fake script called getent like this:

#!/bin/bash # This file will not be consulted for authentication unless the BSD local node #!/bin/bash if [ -z $1 ];

then

echo "You must specify an user" exit 1

else

echo dscl . -read /Users/$2 RecordName | sed 's/RecordName: //g':*:dscl . -read /Users/$2 UniqueID | sed 's/UniqueID: //g':dscl . -read /Users/$2 PrimaryGroupID | sed 's/PrimaryGroupID: //g':dscl . -read /Users/$2 RealName | sed -e 's/RealName://g' -e 's/^ //g' | awk '{printf("%s", $0 (NR==1 ? "" : ""))}':/Users/$2:dscl . -read /Users/$2 UserShell | sed 's/UserShell: //g'

fi

exit 0

comment:3 Changed 14 years ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: changed from macports-tickets@… to milosh@…
Port: signing-party added
Note: See TracTickets for help on using tickets.