  In 1965, Erd\H{o}s and P\'{o}sa proved that there is a duality between the
maximum size of a packing of cycles and the minimum size of a vertex set
hitting all cycles. Such a duality does not hold for odd cycles, and Dejter and
Neumann-Lara asked in 1988 to find all pairs ${(\ell, z)}$ of integers where
such a duality holds for the family of cycles of length $\ell$ modulo $z$. We
characterise all such pairs, and we further generalise this characterisation to
cycles in graphs labelled with a bounded number of abelian groups, whose values
avoid a bounded number of elements of each group. This unifies almost all known
types of cycles that admit such a duality, and it also provides new results.
Moreover, we characterise the obstructions to such a duality in this setting,
and thereby obtain an analogous characterisation for cycles in graphs
embeddable on a fixed compact orientable surface.
