Bug 9920 - opkg-utils: disallow package names that are not all lower case
Summary: opkg-utils: disallow package names that are not all lower case
Status: RESOLVED INVALID
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.2
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 0.4.0
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-07-12 19:41 UTC by Alejandro del Castillo
Modified: 2018-11-16 22:31 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).