-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from packit/misc
A few improvements RELEASE NOTES BEGIN Section and Tag objects now have normalized_name property for more convenient comparison. There is a new method, Specfile.get_active_macros(), to get active macros in the context of the spec file. The underlying rpm.spec instance is now exposed as Specfile.rpm_spec property. There is a new utility class for parsing NEVRA strings. RELEASE NOTES END Reviewed-by: Tomas Tomecek <[email protected]>
- Loading branch information
Showing
8 changed files
with
315 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
# Copyright Contributors to the Packit project. | ||
# SPDX-License-Identifier: MIT | ||
|
||
# valid section names as defined in build/parseSpec.c in RPM source | ||
SECTION_NAMES = { | ||
"package", | ||
"prep", | ||
"generate_buildrequires", | ||
"conf", | ||
"build", | ||
"install", | ||
"check", | ||
"clean", | ||
"preun", | ||
"postun", | ||
"pretrans", | ||
"posttrans", | ||
"pre", | ||
"post", | ||
"files", | ||
"changelog", | ||
"description", | ||
"triggerpostun", | ||
"triggerprein", | ||
"triggerun", | ||
"triggerin", | ||
"trigger", | ||
"verifyscript", | ||
"sepolicy", | ||
"filetriggerin", | ||
"filetrigger", | ||
"filetriggerun", | ||
"filetriggerpostun", | ||
"transfiletriggerin", | ||
"transfiletrigger", | ||
"transfiletriggerun", | ||
"transfiletriggerpostun", | ||
"end", | ||
"patchlist", | ||
"sourcelist", | ||
} | ||
|
||
# valid tag names as defined in build/parsePreamble.c in RPM source | ||
TAG_NAMES = { | ||
"name", | ||
"version", | ||
"release", | ||
"epoch", | ||
"summary", | ||
"license", | ||
"distribution", | ||
"disturl", | ||
"vendor", | ||
"group", | ||
"packager", | ||
"url", | ||
"vcs", | ||
"source", | ||
"patch", | ||
"nosource", | ||
"nopatch", | ||
"excludearch", | ||
"exclusivearch", | ||
"excludeos", | ||
"exclusiveos", | ||
"icon", | ||
"provides", | ||
"requires", | ||
"recommends", | ||
"suggests", | ||
"supplements", | ||
"enhances", | ||
"prereq", | ||
"conflicts", | ||
"obsoletes", | ||
"prefixes", | ||
"prefix", | ||
"buildroot", | ||
"buildarchitectures", | ||
"buildarch", | ||
"buildconflicts", | ||
"buildprereq", | ||
"buildrequires", | ||
"autoreqprov", | ||
"autoreq", | ||
"autoprov", | ||
"docdir", | ||
"disttag", | ||
"bugurl", | ||
"translationurl", | ||
"upstreamreleases", | ||
"orderwithrequires", | ||
"removepathpostfixes", | ||
"modularitylabel", | ||
} | ||
|
||
# tags that can optionally have an argument (language or qualifier) | ||
TAGS_WITH_ARG = { | ||
"summary", | ||
"group", | ||
"requires", | ||
"prereq", | ||
"orderwithrequires", | ||
} | ||
|
||
# canonical architecture names as defined in rpmrc.in in RPM source | ||
ARCH_NAMES = { | ||
"aarch64", | ||
"alpha", | ||
"alphaev5", | ||
"alphaev56", | ||
"alphaev6", | ||
"alphaev67", | ||
"alphapca56", | ||
"amd64", | ||
"armv3l", | ||
"armv4b", | ||
"armv4l", | ||
"armv5tejl", | ||
"armv5tel", | ||
"armv5tl", | ||
"armv6hl", | ||
"armv6l", | ||
"armv7hl", | ||
"armv7hnl", | ||
"armv7l", | ||
"armv8hl", | ||
"armv8l", | ||
"atariclone", | ||
"atarist", | ||
"atariste", | ||
"ataritt", | ||
"athlon", | ||
"em64t", | ||
"falcon", | ||
"geode", | ||
"hades", | ||
"i370", | ||
"i386", | ||
"i486", | ||
"i586", | ||
"i686", | ||
"ia32e", | ||
"ia64", | ||
"IP", | ||
"loongarch64", | ||
"m68k", | ||
"m68kmint", | ||
"milan", | ||
"mips", | ||
"mips64", | ||
"mips64el", | ||
"mips64r6", | ||
"mips64r6el", | ||
"mipsel", | ||
"mipsr6", | ||
"mipsr6el", | ||
"pentium3", | ||
"pentium4", | ||
"ppc", | ||
"ppc32dy4", | ||
"ppc64", | ||
"ppc64iseries", | ||
"ppc64le", | ||
"ppc64p7", | ||
"ppc64pseries", | ||
"ppc8260", | ||
"ppc8560", | ||
"ppciseries", | ||
"ppcpseries", | ||
"riscv", | ||
"riscv64", | ||
"rs6000", | ||
"s390", | ||
"s390x", | ||
"sh", | ||
"sh3", | ||
"sh4", | ||
"sh4a", | ||
"sparc", | ||
"sparc64", | ||
"sparc64v", | ||
"sparcv8", | ||
"sparcv9", | ||
"sparcv9v", | ||
"sun4", | ||
"sun4c", | ||
"sun4d", | ||
"sun4m", | ||
"sun4u", | ||
"x86_64", | ||
"xtensa", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.