1

I want to install BIND9 with its source code on Linux (CentOS 6.3), we know by using yum install bind* we don't get the source code, we get only the binary files.

Can anybody explain to me how to install BIND with its whole source code especially the .c files by using source RPM?

Something like this:

$ yumdownloader --source module-init-tools
Joseph R.
  • 39,549
Nidal
  • 8,956
  • Why do you believe that you need the source code? – Ignacio Vazquez-Abrams Aug 23 '13 at 16:14
  • @IgnacioVazquez-Abramsm, because I need to change the source code so I want to change it in linux after insatlling it – Nidal Aug 23 '13 at 16:15
  • So then why do you need to install BIND and the source code? – Ignacio Vazquez-Abrams Aug 23 '13 at 16:16
  • how then can I change the source code of BIND9 and make linux take it as it changed not the original code @IgnacioVazquez-Abrams – Nidal Aug 23 '13 at 16:18
  • You would modify and then rebuild the SRPM. – Ignacio Vazquez-Abrams Aug 23 '13 at 16:18
  • how can I rebuild SPRM @IgnacioVazquez-Abrams – Nidal Aug 23 '13 at 16:19
  • I wrote up most of this on my blog in a 4 part series: http://www.lamolabs.org/blog/8156/centos-rpm-tutorial-part-4-another-example-of-rolling-your-own-spec-file/ – slm Aug 23 '13 at 16:24
  • You'll need to setup your own rpmbuild work area, install the SRPM (rpm -ivh whatever.srpm), then depending on your change (configuration options - make them in the .spec file) actual code changes you'd untar the tarball in SOURCES directory, make changes, re-tar it back up, and rebuild the RPM using the .spec file in SPEC dir. – slm Aug 23 '13 at 16:26

1 Answers1

1

How to rebuild SRPM from the CentOS documentation: http://wiki.centos.org/HowTos/RebuildSRPM

Tim
  • 6,141