In practice, any deformation problem over fields of characteristic zero is governed by a differential graded Lie algebra (DGLA). Following Deligne, Goldman-Millson and Simpson described via DGLAs the local structure of moduli spaces for various geometric situations. Given an object with a notion of cohomology theory, how can one describe all its deformations subject to cohomology constraints? We will present an approach via DGLA pairs. As applications, we discuss the structure of cohomology jump loci of vector bundles and of local systems. This is joint work with Botong Wang.