[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpm-devel
Subject:    Refactoring rpmpopt content, adding macros to rpmrepo
From:       Jeff Johnson <n3npq () mac ! com>
Date:       2009-01-24 14:59:25
Message-ID: E39F4389-0B6D-4CE5-BEB8-1BBDE6A443A4 () mac ! com
[Download RAW message or body]

I've enhanced popt (as described in the message below) in order
to attach popt aliases to multiple executables through a glob
pattern match, and to permit aliases to be read from a file path.

So a line like this becomes a popt alias for every "rpm*" executable:
	rpm*	alias --foo --bar
Using a glob pattern match will permit removing existed duplicated  
entries
in rpmpopt.

I've also managed to get popt to interpolate file content into an
alias definition. E.g. (see message for the original definition)
	rpm     alias /usr/lib/rpm/popt/deb:md5sums \
	        --POPTdesc=$"display debian/md5sums manifest"

That syntax is likely a useful enhancement for popt, but is still not
what I want/need to share complicated --queryformat templates between  
rpm and
rpmrepo. There's syntax artifacts like "--qf '.......'" that are  
needed for rpm,
but not for rpmrepo.

So I'll likely enhance --queryformat to permit a file path
whose contents will be substituted for the existing literal
string argument.

(aside)
There's also the tyranny of not being able to use popt-1.15
functionality until popt-1.15 is released. I've already wired up
POPT_ARGFLAG_TOGGLE in several places (with a retrofit to
disable functionality if popt-1.15 isn't being used), and I will
likely change several popt aliases to use the new functionality
that I've just described on HEAD. Note that I'm __NOT__ going
to attempt complicated syntactical retrofits for legacy popt
through AutoFu, life's too short to wrestle "compatibility"
from both sides of an implementation.

Adding macros to rpmrepo will be needed to parameterize the
path to a "solvedb" look-aside package header cache to minimize
network usage while downloading metadata from server to client.
The change is mostly
	...
	    /* Process options. */
	-   optCon = rpmioInit(argc, argv, optionsTable);
	+   optCon = rpmcliInit(argc, argv, optionsTable);
	...
so that rpm macros (and lua and ...) are fully initialized within
rpmrepo.

The goal is to merge rpmcache into rpmrepo, and eliminate rpmcache.

73 de Jeff

Begin forwarded message:
>
> RPM uses popt in more complicated ways than any other program.
>
> One of the problems that I need to solve for RPM is how to share popt
> aliases between multiple executables, with a single common
> representation for very complicated popt aliases.
>
> For one example of the size (and complexity) of RPM popt aliases:
> 	rpm --query --info ...
> contained in /usr/lib/rpm/rpmpopt.
>
> But now I have popt aliases in RPM for various forms of markup
> spewage that need to be shared between rpm and rpmrepo. Note
> that popt aliases are being to carry templates/iterators for
> for database dumps in XML, YAML, SQL, and several other less
> well known forms of markup.
>
> So I plan on adding a look-aside backing store for popt
> aliases based on a new "aliascache" syntax. (Hmmm,
> mebbe "alsiasfile" or "aliasdir" or "aliasglob" or ... naming
> instead. *shrug*)
>
> Here's a concrete example. Currently,
> there's a popt alias instantiated in rpmpopt that looks like:
>
> 	rpm     alias --deb:md5sums --qf '\
> 	%|FILENAMES?{\
> 	[\
> 	%{Debmd5sums}\n\
> 	]\
> 	}|\
> 	' \
> 	        --POPTdesc=$"display debian/md5sums manifest"
>
> I hope to represent that same content in a file as
> 	rpm	aliascache	/usr/lib/rpm/popt/aliases/deb:md5sums \
> 		--POPTdesc=$"display debian/md5sums manifest"
> with the obvious textual interpolation(s), including using
> the basename of the path as the alias name, from the file content at  
> the path.
>
> I may be able to also support, say,
> 	rpm	aliascache	/usr/lib/rpm/popt/aliases/*
> where all files that match the glob pattern would be iteratively
> added as aliases.
>
> There's also the possibility of lazily loading popt aliases from
> the cache when mentioned, not when popt is initialized, but
> lazily loading is very much at odds with, say, --help dispplays
> for popt aliases. We'll see ...
>
> The other needed feature to attach content from a file to multiple
> executable names will be to permit the "executable" argument to
> be a POSIX regex pattern like
> 	
> 	rpm.*	aliascache	/usr/lib/rpm/popt/aliases/*
>
> which I think I've mentioned on <popt-devel@rpm5.org> before (maybe  
> not).
>
> Opinions?
>
> 73 de Jeff


["smime.p7s" (smime.p7s)]

0	*H
 010	+0	*H
 00 rk 0
	*H
0|10	UDE10U
TC TrustCenter GmbH1%0#UTC TrustCenter Class 1 L1 CA1(0&UTC TrustCenter \
Class 1 L1 CA VI0 081202135405Z
091203135405Z0B10	UUS10UJeff Johnson10	*H
	
n3npq@mac.com0"0
	*H
0
Ҭ14B~:*;˄rx%I"^~22Wń9i,#O))~SC	` \
˨ŕ1i!~I5S)R&Ϥ(tuIAЈTOb߁>fN*5Q<1Rn&,f`iR!S~WUzsB \
SNg>Ox>ɐ{FMк00+00Q+0Eh \
ttp://www.trustcenter.de/certservices/cacerts/tc_class1_L1_CA_VI.crt02+0&http \
://ocsp.VI.tcclass1.trustcenter.de0U#0NjkJɻdK&0U00JU \
C0A0?	*,0200+$http://www.trustcenter.de/guidelines0U0UDL荺e9=7N&d?0TUM0K0I \
G EChttp://crl.VI.tcclass1.trustcenter.de/crl/v2/tc_class1_L1_CA_VI.crl03U%,0*+++
 +70U0
n3npq@mac.com0
	*H
c3#5@+Nwc<~3mJ \
2݉}dsOM3/cCåt(:ӌmxH#F?&N^?6c"*-7lu`+x|W \
ʕnbgҮV4H008 bnrd0 	*H
010	UDE10UHamburg10UHamburg1:08U
1TC TrustCenter for Security in Data Networks GmbH1"0 UTC TrustCenter Class 1 \
CA1)0'	*H 	certificate@trustcenter.de0
080718113854Z
101231225959Z0|10	UDE10U
TC TrustCenter GmbH1%0#UTC TrustCenter Class 1 L1 CA1(0&UTC TrustCenter \
Class 1 L1 CA VI00 	*H
0?N~ݤ㰾(ݙuLαlK%8H
~uH@MNCm]9Xq
K1~_݄Vfk(ѢzaW00'
@00+00L+0@http://www.trustcenter.de/certservices/ \
cacerts/tc_class_1_ca.crt0/+0#http://ocsp.tcclass1.trustcenter.de0U00JU \
C0A0?	*,0200+$http://www.trustcenter.de/guidelines0U0UNjkJɻdK&0U00 \
 ؆;http://crl.tcclass1.trustcenter.de/crl/v2/tc_class_1_ca.crlldap://www.trustc \
enter.de/CN=TC%20TrustCenter%20Class%201%20CA,O=TC%20TrustCenter%20AG,ou=rootcerts,dc=trustcenter,dc=de?certificateRevocationList?base?0
 	*H
ng,<H[<KB*8ُ˰y}e-pT-):mnzq/eJ̄tZմw"D˴W\&8kT.WƎ|W[30(0 \
0 	*H
0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing \
Authority1!0	*H 	support@cacert.org0
070806160927Z
090805160927Z0810UCAcert WoT User10	*H
	
n3npq@mac.com0"0
	*H
0
MǼ~arqC?j(Ѝ.=
ܐ[m47囵{Hǰmgk׼=FlFَ^ \
c9hٕ/,fOcY;ik"XFS	)֟W:Z#AqW:_rIqc&ZZAKBH
 oY_x(V!zd	AHDJAdG*QXVr:tpM00U00V	`HB
 IGTo get your own certificate for FREE head over to \
http://www.CAcert.org0@U%907++ +7

+7
	`HB02+&0$0"+0http://ocsp.cacert.org0U0
n3npq@mac.com0
	*H
BmC2G$+`?kdC
o߫'iƬ'9\q459xOS@B= \
49ێ0أZ-n!Hrλy)gPmcFkrzGr1d3)g"LZ\bkR&h@[%|%@ht'?Нc]y4J


m
!ϵ[4QB}bK_gD,	?
wG:U\XC\!}i)7%7ufmW]-x|̭QćHxNF%3z3rR>~c͛y2GL<n#K/
  (_Q7nfrCejT \
q$,76ICm@C@)H4{\ZX̢T@niQjcN'.i. +(a
=F(>O1B0>00|10	UDE10U
TC TrustCenter GmbH1%0#UTC TrustCenter Class 1 L1 CA1(0&UTC TrustCenter \
Class 1 L1 CA VIrk 0	+ 0	*H 	1	*H
0	*H
	1
090124145925Z0#	*H
	1OR8irR>0	+7100y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing \
Authority1!0	*H 	support@cacert.org0*H
	1 0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing \
Authority1!0	*H 	support@cacert.org0
	*H
mLݭ&U^79c#J+̏&(yb=L	WFpoD%qa
$(TYȘ\4n\5zӦlnD]oO4TS-g{.,ŖM~YΪ'NMyDlH&"jgj@ȱ2YvZ6ig?{ERk+x(HZ
 LτS]AE<
 \P_z%F6뛖`
7^R;.C]l;b< 


______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic