Bug 9920

Summary: opkg-utils: disallow package names that are not all lower case
Product: [Yocto Project Subprojects] opkg Reporter: Alejandro del Castillo <alejandro.delcastillo>
Component: opkgAssignee: Alejandro del Castillo <alejandro.delcastillo>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Undecided    
Version: 0.3.2   
Target Milestone: 0.4.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Alejandro del Castillo 2016-07-12 19:41:04 UTC
OpenWRT carries a patch to add case insensitive flag for pattern matching (050-add-case-insensitive-flag.patch). However, case insensitive pattern matching can be dangerous since opkg let's you have 2 packages with the same name with different capitalization. A better solution would be to follow debian policy and only allow lower case pacakges.

From the Debian policy manual:

"Package names (both source and binary, see Package, Section 5.6.7) must consist  only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character."

opkg-build and opkg-make-index need to be fixed to follow the policy.
Comment 1 Alejandro del Castillo 2018-11-16 22:31:08 UTC
opkg-build already checks that package names only have [a-z0-9.+-] values. It doesn't enforce a minimum of 2 characters for package names, but that's OK since one letter package names are used on the opkg ATS (and other than a convenience, I don't know why that restriction is in place).