nkadel / samba4repo

Wrapper for SRPM building tools for Samba with domain controller on RHEL and Fedora
13 stars 11 forks source link

Give an example of building samba-4.12.5 on Fedora 32 #6

Closed tlsalex closed 4 years ago

tlsalex commented 4 years ago

Hello Man, I do not quite master Linux and not quit understand how this repo work. Could you please provide an example of building samba-4.12.5 on Fedora 32 in more detail.

  1. git clone --recurse-submodules https://github.com/nkadel/samba4repo
  2. cd samba4repo
  3. what I should do next ? (make cfgs; make repos; make ? from here https://github.com/nkadel/samba4repo/issues/5 ) x. x. last : compile samba from source by following the instructions here -- https://wiki.samba.org/index.php/Build_Samba_from_Source ?
nkadel commented 4 years ago

README.md says to use:

* git clone --recurse-submodules https://github.com/nkadel/samba4repo

Then:

cd samba4repo
make getsrc
make
tlsalex commented 4 years ago

At this step, show me bellow, what I should do

[alex@localhost samba4repo]$ make make: *** No rule to make target '/etc/mock/epel-7-x86_64.cfg', needed by 'samba4repo-7-x86_64.cfg'. Stop.

nkadel commented 4 years ago

On Mon, Jul 6, 2020 at 11:49 PM tlsalex notifications@github.com wrote:

At this step, show me bellow, what I should do

[alex@localhost samba4repo]$ make make: *** No rule to make target '/etc/mock/epel-7-x86_64.cfg', needed by 'samba4repo-7-x86_64.cfg'. Stop.

Install mock. and mock-core-configs.

sudo yum install /etc/mock/epel-7-x86_64.cfg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nkadel/samba4repo/issues/6#issuecomment-654582246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKREG2E7SYJIH7HCEJD5LTR2KLN3ANCNFSM4OSJ2C4A .

tlsalex commented 4 years ago

At the make step , it took several hours , but still fail with bellow message, I have no idea what to do with these error , any advise ? Will it possible to exclude redhat 7 and 8 , make the compiling only for fedora 32 platform to save time.

ctally building src.rpm in samba4repo-f32-x86_64
Actally building src.rpm in samba4repo-8-x86_64
ERROR: Exception(src.rpm) Config(samba4repo-8-x86_64) 2 minutes 8 seconds
ERROR: Command failed:
 # /usr/bin/systemd-nspawn -q -M fb4996bff56447e0a389b3bc2b957fdd -D /var/lib/mock/samba4repo-8-x86_64-bootstrap/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.1mr4ubji:/etc/resolv.conf --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/var/lib/mock/samba4repo-8-x86_64/root/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 --setenv=LC_MESSAGES=C.UTF-8 /usr/bin/dnf builddep --installroot /var/lib/mock/samba4repo-8-x86_64/root/ --releasever 8 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk --disableplugin=local --disableplugin=spacewalk /var/lib/mock/samba4repo-8-x86_64/root//builddir/build/SRPMS/samba-4.12.5-0.el8.src.rpm --setopt=tsflags=nocontexts
No matches found for the following disable plugin patterns: local, spacewalk
CentOS-8 - Base                                 5.2 kB/s | 3.9 kB     00:00
CentOS-8 - AppStream                            7.4 kB/s | 4.3 kB     00:00
CentOS-8 - PowerTools                           1.6 kB/s | 4.3 kB     00:02
CentOS-8 - Extras                               1.6 kB/s | 1.5 kB     00:00
epel                                            6.2 kB/s | 4.7 kB     00:00
samba4repo                                      2.9 MB/s | 3.0 kB     00:00
Package epel-rpm-macros-8-13.noarch is already installed.
Package gawk-4.2.1-1.el8.x86_64 is already installed.
Package gcc-8.3.1-5.el8.0.2.x86_64 is already installed.
Package gnupg2-2.2.9-1.el8.x86_64 is already installed.
No matching package to install: 'quota-devel'
Package sed-4.5-1.el8.x86_64 is already installed.
Package xz-5.2.4-3.el8.x86_64 is already installed.
Not all dependencies satisfied
Error: Some packages could not be found.

make[1]: *** [Makefile:44: samba4repo-8-x86_64] Error 30
make[1]: Leaving directory '/root/temp/samba4repo/samba-4.12.x-srpm'
make: *** [Makefile:106: samba-4.12.x-srpm] Error 2
nkadel commented 4 years ago

On Tue, Jul 7, 2020 at 9:22 AM tlsalex notifications@github.com wrote:

At the make step , it took several hours , but still fail with bellow message, I have no idea what to do with these error , any advise ? Will it possible to exclude redhat 7 and 8 , make the compiling only for fedora 32 platform to save time.

Yeah, it's building from scratch. There are notes in the README.md about the "quota-devel" package. You need to enable the "Devel" repository in CentOS 8, because Red Hat chose not to include all their build tools as part of their customer accessible repositories. As a RHEL customer, I wrote to Red Hat about this and got what I did not consider a helpful answer.

Take a look at /etc/mock/templates/centos-8.tpl and enable the Devel repository th3ere.

Nico Kadel-Garcia.

ctally building src.rpm in samba4repo-f32-x86_64 Actally building src.rpm in samba4repo-8-x86_64 ERROR: Exception(src.rpm) Config(samba4repo-8-x86_64) 2 minutes 8 seconds ERROR: Command failed:

/usr/bin/systemd-nspawn -q -M fb4996bff56447e0a389b3bc2b957fdd -D /var/lib/mock/samba4repo-8-x86_64-bootstrap/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.1mr4ubji:/etc/resolv.conf --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/var/lib/mock/samba4repo-8-x86_64/root/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;\007" --setenv=PS1= \s-\v\$ --setenv=LANG=C.UTF-8 --setenv=LC_MESSAGES=C.UTF-8 /usr/bin/dnf builddep --installroot /var/lib/mock/samba4repo-8-x86_64/root/ --releasever 8 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk --disableplugin=local --disableplugin=spacewalk /var/lib/mock/samba4repo-8-x86_64/root//builddir/build/SRPMS/samba-4.12.5-0.el8.src.rpm --setopt=tsflags=nocontexts

No matches found for the following disable plugin patterns: local, spacewalk CentOS-8 - Base 5.2 kB/s | 3.9 kB 00:00 CentOS-8 - AppStream 7.4 kB/s | 4.3 kB 00:00 CentOS-8 - PowerTools 1.6 kB/s | 4.3 kB 00:02 CentOS-8 - Extras 1.6 kB/s | 1.5 kB 00:00 epel 6.2 kB/s | 4.7 kB 00:00 samba4repo 2.9 MB/s | 3.0 kB 00:00 Package epel-rpm-macros-8-13.noarch is already installed. Package gawk-4.2.1-1.el8.x86_64 is already installed. Package gcc-8.3.1-5.el8.0.2.x86_64 is already installed. Package gnupg2-2.2.9-1.el8.x86_64 is already installed. No matching package to install: 'quota-devel' Package sed-4.5-1.el8.x86_64 is already installed. Package xz-5.2.4-3.el8.x86_64 is already installed. Not all dependencies satisfied Error: Some packages could not be found.

make[1]: [Makefile:44: samba4repo-8-x86_64] Error 30 make[1]: Leaving directory '/root/temp/samba4repo/samba-4.12.x-srpm' make: [Makefile:106: samba-4.12.x-srpm] Error 2

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nkadel/samba4repo/issues/6#issuecomment-654854514, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKREG66HBTCDUAYITVYEPTR2MOQ5ANCNFSM4OSJ2C4A .

tlsalex commented 4 years ago

Hey man , the "make" step is complete without problem, so next is "make build", and then "make build", and then "dnf install samba-dc" --> done ?

but when I run make build, it shows me bellow error, what should I do next, install some required package? please help me !

Installing src.rpm
setting SOURCE_DATE_EPOCH=1566604800
error: Failed build dependencies:
        autoconf is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        autogen is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        autogen-libopts-devel >= 5.18 is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        automake is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        datefudge is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        gettext-devel is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        gperf is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        guile-devel is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        libidn-devel is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        libtool is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        nettle32-devel >= 3.1.1 is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        softhsm is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        texinfo is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        trousers-devel >= 0.3.11.2 is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
        unbound-devel is needed by compat-gnutls34-3.4.17-0.1.fc32.x86_64
make[1]: *** [Makefile:38: build] Error 11
make[1]: Leaving directory '/root/temp/samba4repo/compat-gnutls34-3.x-srpm'
make[1]: Entering directory '/root/temp/samba4repo/libldb-2.1.x-srpm'
rpmbuild --define '_topdir /root/temp/samba4repo/libldb-2.1.x-srpm/rpmbuild' \
        --rebuild src.rpm
Installing src.rpm
setting SOURCE_DATE_EPOCH=1588032000
error: Failed build dependencies:
        lmdb-devel >= 0.9.16 is needed by libldb-2.1.4-0.fc32.x86_64
make[1]: *** [Makefile:39: build] Error 11
make[1]: Leaving directory '/root/temp/samba4repo/libldb-2.1.x-srpm'
make[1]: Entering directory '/root/temp/samba4repo/libtommath-1.0.x-srpm'
rpmbuild --define '_topdir /root/temp/samba4repo/libtommath-1.0.x-srpm/rpmbuild' \
        --rebuild src.rpm
Installing src.rpm
setting SOURCE_DATE_EPOCH=1557792000
error: Failed build dependencies:
        ghostscript is needed by libtommath-1.0.1-0.fc32.x86_64
        ghostscript-tools-dvipdf is needed by libtommath-1.0.1-0.fc32.x86_64
        libtiff-tools is needed by libtommath-1.0.1-0.fc32.x86_64
        libtool is needed by libtommath-1.0.1-0.fc32.x86_64
        tex(cmr10.tfm) is needed by libtommath-1.0.1-0.fc32.x86_64
        tex(fancyhdr.sty) is needed by libtommath-1.0.1-0.fc32.x86_64
        tex(hyphen.tex) is needed by libtommath-1.0.1-0.fc32.x86_64
        texlive-dvips-bin is needed by libtommath-1.0.1-0.fc32.x86_64
        texlive-latex-bin-bin is needed by libtommath-1.0.1-0.fc32.x86_64
        texlive-makeindex-bin is needed by libtommath-1.0.1-0.fc32.x86_64
        texlive-mfware-bin is needed by libtommath-1.0.1-0.fc32.x86_64
make[1]: *** [Makefile:43: build] Error 11
make[1]: Leaving directory '/root/temp/samba4repo/libtommath-1.0.x-srpm'
make[1]: Entering directory '/root/temp/samba4repo/libtomcrypt-1.18.x-srpm'
rpmbuild --define '_topdir /root/temp/samba4repo/libtomcrypt-1.18.x-srpm/rpmbuild' \
        --rebuild src.rpm
Installing src.rpm
setting SOURCE_DATE_EPOCH=1557705600
error: Failed build dependencies:
        ghostscript is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        libtommath-devel >= 1.0 is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        libtool is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        tex(cmr10.tfm) is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        tex(fancyhdr.sty) is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        tex(hyphen.tex) is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        tex(mf.mf) is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        texlive-latex-bin-bin is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        texlive-makeindex-bin is needed by libtomcrypt-1.18.2-0.fc32.x86_64
        texlive-mfware-bin is needed by libtomcrypt-1.18.2-0.fc32.x86_64
make[1]: *** [Makefile:35: build] Error 11
make[1]: Leaving directory '/root/temp/samba4repo/libtomcrypt-1.18.x-srpm'
make[1]: Entering directory '/root/temp/samba4repo/python-crypto-2.6.x-srpm'
rpmbuild --define '_topdir /root/temp/samba4repo/python-crypto-2.6.x-srpm/rpmbuild' \
        --rebuild src.rpm
Installing src.rpm
setting SOURCE_DATE_EPOCH=1557705600
error: Failed build dependencies:
        libtomcrypt-devel >= 1.16 is needed by python-crypto-2.6.1-0.fc32.x86_64
        python2 is needed by python-crypto-2.6.1-0.fc32.x86_64
        python2-devel >= 2.4 is needed by python-crypto-2.6.1-0.fc32.x86_64
make[1]: *** [Makefile:37: build] Error 11
make[1]: Leaving directory '/root/temp/samba4repo/python-crypto-2.6.x-srpm'
make[1]: Entering directory '/root/temp/samba4repo/samba-4.12.x-srpm'
rpmbuild --define '_topdir /root/temp/samba4repo/samba-4.12.x-srpm/rpmbuild' \
        --rebuild src.rpm
Installing src.rpm
setting SOURCE_DATE_EPOCH=1593648000
error: Failed build dependencies:
        libcephfs-devel is needed by samba-2:4.12.5-0.fc32.x86_64
        python3-crypto is needed by samba-2:4.12.5-0.fc32.x86_64
        python3-subunit-test is needed by samba-2:4.12.5-0.fc32.x86_64
make[1]: *** [Makefile:39: build] Error 11
make[1]: Leaving directory '/root/temp/samba4repo/samba-4.12.x-srpm'
make: *** [Makefile:72: build] Error 2
nkadel commented 4 years ago

Using "make build" means installing components in your local environment as you build them. It's much easier and more reliable to use mock, with the ordinary "make" command, Installing all the components to build locally and avoid conflicts with standard system components is an adventure. You'd need to do one package, install dependencies, do the next, install those, etc. It's going to be faster for you to use "mock.