  We study G-valued Galois deformation rings with prescribed properties, where
G is an arbitrary (not necessarily connected) reductive group over an extension
of Z_l for some prime l. In particular, for the Galois groups of p-adic local
fields (with p possibly equal to l) we prove that these rings are generically
smooth, compute their dimensions, and show that functorial operations on Galois
representations give rise to well-defined maps between the sets of irreducible
components of the corresponding deformation rings. We use these local results
to prove lower bounds on the dimension of global deformation rings with
prescribed local properties. Applying our results to unitary groups, we improve
results in the literature on the existence of lifts of mod l Galois
representations, and on the weight part of Serre's conjecture.
