  Let A -> B be a homomorphism of commutative rings. The squaring operation is
a functor Sq_{B/A} from the derived category D(B) of complexes B-modules into
itself. The squaring operation is needed for the definition of rigid complexes
(in the sense of Van den Bergh), that in turn leads to a new approach to
Grothendieck duality for rings, schemes and even DM stacks.
  In our paper with J.J. Zhang from 2008 we introduced the squaring operation,
and explored some of its properties. Unfortunately some of the proofs in that
paper had severe gaps in them.
  In the present paper we reproduce the construction of the squaring operation.
This is done in a somewhat more general context than in the first paper: here
we consider a homomorphism A -> B of commutative DG rings. Our first main
result is that the square Sq_{B/A}(M) of a DG B-module M is independent of the
resolutions used to present it. Our second main result is on the trace
functoriality of the squaring operation. We give precise statements and
complete correct proofs.
  In a subsequent paper we will reproduce the remaining parts of the 2008 paper
that require fixing. This will allow us to proceed with the other papers,
mentioned in the bibliography, on the rigid approach to Grothendieck duality.
  The proofs of the main results require a substantial amount of foundational
work on commutative and noncommutative DG rings, including a study of semi-free
DG rings, their lifting properties, and their homotopies. This part of the
paper could be of independent interest.
