[CentOS] Passing password to script for rpmsign of list of .rpm files

Fri May 20 18:13:28 UTC 2011
Keith Roberts <keith at karsites.net>

On Fri, 20 May 2011, Ljubomir Ljubojevic wrote:

> To: CentOS mailing list <centos at centos.org>
> From: Ljubomir Ljubojevic <office at plnet.rs>
> Subject: [CentOS] Passing password to script for rpmsign of list of .rpm files
> I am trying to automatize signing of unsigned .rpm files. My repo has at
> least 50 x 3 packages.
> But I would have to type numerous passwords for each file. I can not see
> hot to pass pass phrase to script.
> rpmsign --resign {--pass=??} <filename from list> ????
> Can someone advise me how to do that?

Hi Ljubomir.

Not sure if this would work for signing packages, but I use 
this script to start all services listed in a text file:


# Start all services on machine

echo "Running script: $0"

# start all services listed in service-names
xargs -a ./service-names -i chkconfig --level 2345 {} on

# list the status of services in service-names file
echo "All services are now turned on (all those listed in 
service-names file)
echo "for run levels 2345"
xargs -a ./service-names -i chkconfig --list {}

exit 0

You may be able to modify the above script to do what you 
need it to. xargs is in the findutils package:

Name       : findutils
Arch       : i386
Epoch      : 1
Version    : 4.2.27
Release    : 6.el5
Size       : 662 k
Repo       : installed
Summary    : The GNU versions of find utilities (find and xargs).
URL        : http://www.gnu.org/software/findutils/
License    : GPL

Description: The findutils package contains programs which 
will help you locate files on your system.  The find utility 
searches through a hierarchy of directories looking for 
files which match a certain set of criteria (such as a 
filename pattern).  The xargs utility builds and executes 
command lines from standard input arguments (usually lists 
of file names generated by the find command).


Kind Regards,



All email addresses are challenge-response protected with
TMDA [http://tmda.net]