David Auer ccbadf
# Building systemd rpms for local development using rpmbuild --build-in-place
Zbigniew Jędrzejewski-Szmek 05f788
David Auer ccbadf
This approach is based on filbranden's [git-rpmbuild](https://github.com/filbranden/git-rpmbuild)
David Auer ccbadf
and his [talk during ASG2019](https://www.youtube.com/watch?v=fVM1kJrymRM).
Zbigniew Jędrzejewski-Szmek 05f788
Zbigniew Jędrzejewski-Szmek 05f788
```
Zbigniew Jędrzejewski-Szmek 05f788
git clone https://github.com/systemd/systemd
Zbigniew Jędrzejewski-Szmek 05f788
fedpkg clone systemd fedora-systemd
Zbigniew Jędrzejewski-Szmek 05f788
cd systemd
Zbigniew Jędrzejewski-Szmek 05f788
rpmbuild -bb --build-in-place --noprep --define "_sourcedir $PWD/../fedora-systemd" --define "_rpmdir $PWD/rpms" --with inplace ../systemd.spec
Zbigniew Jędrzejewski-Szmek 05f788
sudo dnf upgrade --setopt install_weak_deps=False rpms/*/*.rpm
Zbigniew Jędrzejewski-Szmek 05f788
```
Zbigniew Jędrzejewski-Szmek 05f788
Zbigniew Jędrzejewski-Szmek 05f788
`--without lto` and `--without tests` may be useful to speed up the build.