Given a map $f: S \to M$ of smooth manifolds, Bott & Tu define on page 78 a complex by $\Omega^q(f)=\Omega^q(M) \oplus \Omega^{q-1}(S)$ and $d(\omega, \theta)=(d\omega, f^*\omega - d\theta)$ where $f^*\omega$ is the usual pullback of forms, and the $d$'s denote the appropriate exterior derivatives. They then prove that there is a long exact sequence in de Rham cohomology $$\cdots \to H^{q}(f) \xrightarrow{\beta^*} H^{q}(M) \xrightarrow{f^*} H^{q}(S) \xrightarrow{\alpha^*} H^{q+1}(f) \to \cdots$$

where $f^*$ is the usual pullback on forms, $\alpha^*$ is induced by the obvious insertion into the first component $\Omega^q(S) \hookrightarrow \Omega^q(f))$, and $\beta^*$ is induced by the obvious projection $\Omega^q(f) \to \Omega^q(M)$ onto the first component. Moreover, $H^q(f)$ and $H^q(g)$ are isomorphic as algebras if $f$ and $g$ are homotopic maps.

In the case where $f: S \to M$ is a submanifold embedding, then this de Rham group $H^q(f)$ is just the usual relative cohomology $H^q(M,S;\mathbb{R})$

Question 1: Given an arbitrary (not necessarily an embedding) smooth map $f: S \to M$, what is $H^q(f)$, as a derived functor? For general (not necessarily constant) coefficients, is this construction the "right" way to define relative sheaf cohomology for arbitrary maps?

I am familiar with relative cohomology for pairs, but I have not come across relative cohomology for a map $f: S \to M$ which is not an embedding, so I am not sure how to interpret this. And I've read that the mapping cone construction fails to be functorial (at the derived level) so I'm not sure if this is the "right" way to construct sheaf cohomology for arbitrary maps.

Here are my thoughts:

Clearly, from the sheafy point of view the pullback map $f^*$ here comes from the unit natural transformation $f^*: 1 \Rightarrow f_*f^{-1}$ (I apologize for the possibly confusing notation). Applying the mapping cocone construction to this gives us an exact triangle in the derived category $$ \mathrm{Cocone}(f^*) \to 1 \to \mathbf{R}f_*f^{-1} \to [1]$$ Applying this to the de Rham resolution of the constant sheaf $\mathbb{R}$ and taking the global sections should give us Bott & Tu's relative cohomology.