alnum-chars = ALPHA / DIGIT
Name = alnum-chars *( portable-filename-chars / "+" )
Epoch = 1*DIGIT
segment-delim-chars = "+" / "." / "_"
low-order-char = "~" ; Proposed future use - sort order subject to change
verrel = alnum-chars *( alnum-chars / segment-delim-chars / low-order-char )
Version = verrel
Release = verrel
Arch = alnum-chars *( alnum-chars / "_" )
OS = alnum-chars *( portable-filename-chars / "/" )
filename-arch = Arch / "src" / "nosrc"
Rpm-Filename = Name "-" Version "-" Release "." filename-arch ".rpm"
evr = [ Epoch ":" ] Version [ "-" Release ]
pathname = "/" [ path-seg *( "/" path-seg ) [ "/" ] ]
path-seg = 1*valid-file-chars
dep-token = Name [ feature ]
feature-chars = portable-filename-chars / "+" / "~" / "/" / ":" / "-"
feature = "(" alnum-chars *feature-chars ")"
; From OpenSUSE packagers manual
split-token = Name ":" pathname
relationship = ( "<" / ">" )
/ ( [ "<" / ">" ] "=" )
dependency = ( dep-token [ 1*WSP relationship 1*WSP evr ] )
/ pathname
; XXX check this; I'm not clear on what the delimiter rule really is
dep-delim = ( *WSP "," *WSP )
/ 1*WSP
deplist = dependency *( 1*dep-delim dependency )
provide = dependency / split-token
Provides = provide *( 1*dep-delim provide )
build-req-types = "prep"
/ "build"
/ "install"
/ "clean"
/ "hint"
install-req-types = "interp"
/ "preun"
/ "pre"
/ "postun"
/ "post"
/ "rpmlib"
/ "verify"
/ "hint"
build-req-tags = "buildrequires" / "buildprereq"
install-req-tags = "requires" / "prereq"
misc-dep-tags = "buildsuggests"
/ "buildenhances"
/ "buildconflicts"
/ "suggests"
/ "ehances"
/ "conflicts"
/ "obsoletes"
dep-tag = misc-dep-tags
/ ( build-req-tags [ "(" build-req-types ")" ] )
/ ( install-req-tags [ "(" install-req-types ")" ] )
UTF8-ne = 1*UTF8-char
Summary = UTF8-ne
; Definitions after here are from external sources, as noted
; From SUSv3
; (ABNF created, not in source)
portable-filename-chars = ALPHA / DIGIT / "." / "_" / "-"
; From SUSv3, everything but NULL (%x00) and "/" (%x2F)
; (ABNF created, not in source)
valid-file-chars = %x01-2E / %x30-FF
; From RFC 4234 Appendix B
DIGIT = %x30-39 ; 0-9
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
WSP = SP / HTAB ; white space
SP = %x20 ; space
HTAB = %x09 ; horizontal tab
; From RFC 3629 Section 4
UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
UTF8-1 = %x00-7F
UTF8-2 = %xC2-DF UTF8-tail
UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
%xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
%xF4 %x80-8F 2( UTF8-tail )
UTF8-tail = %x80-BF