[tools] Re: Do you have man page for rhnget?

Dag Wieers dag at wieers.com
Fri Mar 30 18:16:26 CEST 2007


On Fri, 30 Mar 2007, Bo Xie wrote:

> rhnget (http://svn.rpmforge.net/svn/trunk/tools/mrepo/rhnget) is a
> great tool, but I don't know how to use it.
> I mean I want to call rhnget directly (not thru mrepo) on RHEL4 to
> download a gcc-xxx.rpm. Could you show me how to call rhnget?
> e.g., #rhnget -username xxx -password yyy -get gcc-zzz
> 
> Look forward to your reply and thank you very much!

rhnget needs a systemid file. So if you haven't got one, you have to 
create one first using gensystemid.

	usage: gensystemid -r release [-a arch] [-p password] [-q] [-u username] [-v] dir1 dir2 ...
	Generate a custom RHN systemid
	
	gensystemid options:
	  -a, --arch=arch              specify architecture (i386, x86_64, ppc, ia64)
	  -q, --quiet                  minimal output
	  -p, --password=password      specify rhn password (asked when not given)
	  -r, --release=rhnrelease     specify rhn release {2.1,3,4}{AS,ES,WS,Desktop} 5{Server,Client}
	  -u, --username=username      specify rhn username (asked when not given)
	  -v, --verbose                increase verbosity
	  -vv, -vvv, -vvvv..           increase verbosity more

So you do:

	gensystemid -r 4AS -a i386 -u <username> -p <password> /var/mrepo/rhel4as-i386/

For rhnget you need to provide your systemid, eg.

	usage: rhnget [options] rhns://server/channel destination-path
	Download packages from Red Hat Network (RHN)

	rhnget options:
	      --delete            delete files that are not on the sender side
	      --download-all      download all package versions available
	      --filter            filter packages based on regexp
	  -l, --list              list the available packages
	  -n, --dry-run           show what would have been done
	  -q, --quiet             minimal output
	  -r, --release=release   specify the RHN release (if different from the systemid)
	  -s, --systemid=file     systemid to use
	  -v, --verbose           increase verbosity
	  -vv, -vvv, -vvvv..      increase verbosity more

So something like:

	rhnget -s /var/mrepo/rhel4as-i386/systemid --filter=gcc4-4.1.0-18.EL4.3 /tmp

should work. If you do not provide your systemid file, it will take the 
system one from /etc/sysconfig/rhn/systemid.

Kind regards,
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]


More information about the tools mailing list