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