-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-samba.txt
88 lines (62 loc) · 3.92 KB
/
build-samba.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This small document illustrates how to build samba and the richacl module when prerequisites are not
# easily met and are complicated to build. The exact packages that were required may change, of course, the
# rpms built here are those required when building samba 4.13 on vanilla centos8.
dnf install rpm-build
mkdir ~/rpmbuild/SRPMS
# populate ~/rpmbuild/SRPMS: source rpms mostly taken from fedora,
# e.g. https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/source/tree/Packages
yum-builddep -y ~/rpmbuild/SRPMS/e2fsprogs-1.45.5-3.fc32.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/e2fsprogs-1.45.5-3.fc32.src.rpm
yum-builddep -y ~/rpmbuild/SRPMS/quota-4.05-5.fc31.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/quota-4.05-5.fc31.src.rpm
cd ~/rpmbuild/RPMS/x86_64
rpm -i quota-devel-4.05-5.el8.x86_64.rpm
yum-builddep -y ~/rpmbuild/SRPMS/libtalloc-2.3.1-2.fc32.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/libtalloc-2.3.1-2.fc32.src.rpm
rpm -i ~/rpmbuild/RPMS/x86_64/{libtalloc,libtalloc-devel}-2*64.rpm # check only overrides fail!
rpm -i ~/rpmbuild/RPMS/x86_64/{libtalloc,libtalloc-devel}-2*64.rpm --force
rpm -i ~/rpmbuild/RPMS/x86_64/{python3-talloc,python3-talloc-devel}-2*64.rpm --force
yum-builddep -y ~/rpmbuild/SRPMS/libtevent-0.10.2-2.fc32.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/libtevent-0.10.2-2.fc32.src.rpm
rpm -i ~/rpmbuild/RPMS/x86_64/{libtevent,libtevent-devel}-0.10.2-2.el8.x86_64.rpm --force
rpm -i ~/rpmbuild/RPMS/x86_64/python3-tevent-0.10.2-2.el8.x86_64.rpm
rpm -i ~/rpmbuild/RPMS/x86_64/python3-tevent-0.10.2-2.el8.x86_64.rpm --force
yum-builddep -y ~/rpmbuild/SRPMS/libtdb-1.4.3-2.fc32.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/libtdb-1.4.3-2.fc32.src.rpm
rpm -i ~/rpmbuild/RPMS/x86_64/{libtdb,libtdb-devel}-1*.rpm --force
rpm -i ~/rpmbuild/RPMS/x86_64/python3-tdb-1.4.3-2.el8.x86_64.rpm --force
yum-builddep -y ~/rpmbuild/SRPMS/libldb-2.*.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/libldb-2.*.src.rpm
rpm -i python*ldb* *libldb*
rpm -i python*ldb* *libldb* --force
#rpm -i libldb-devel-2.*.x86_64.rpm python3-ldb-devel-2.*.el8.x86_64.rpm libldb-2.*.el8.x86_64.rpm python-ldb-devel-common-2.*.el8.x86_64.rpm python3-ldb-2.*.el8.x86_64.rpm
yum-builddep -y ~/rpmbuild/SRPMS/openssl-1.1.1d*.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/openssl-1.1.1d*.src.rpm
rpm -i ~/rpmbuild/RPMS/x86_64/{openssl,openssl-libs,openssl-devel}-1.1.1d-7.el8.x86_64.rpm # check only override conflicts!
rpm -i ~/rpmbuild/RPMS/x86_64/{openssl,openssl-libs,openssl-devel}-1.1.1d-7.el8.x86_64.rpm --force
rpm -i ~/rpmbuild/RPMS/x86_64/{libss,libss-devel,libcom_err}-1.45.5-3.el8.x86_64.rpm # accept only override conflicts!
rpm -i ~/rpmbuild/RPMS/x86_64/{libss,libss-devel,libcom_err}-1.45.5-3.el8.x86_64.rpm --force
dnf install -y yasm words # somehow "dnf builddep" does not catch those
dnf builddep -y ~/rpmbuild/SRPMS/krb5-1.18*.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/krb5-1.18*.src.rpm
rpm -i krb5-devel-1.18-1.el8.x86_64.rpm krb5-server-1.18-1.el8.x86_64.rpm --force
dnf builddep -y ~/rpmbuild/SRPMS/samba-4.13.0-0.8.rc4.fc34.src.rpm
rpm -i ~/rpmbuild/SRPMS/samba-4.13*.src.rpm
rpmbuild -bb ~/rpmbuild/SPECS/samba.spec
# if there are no richacl, librichacl, etc packages yet:
dnf builddep -y ~/rpmbuild/SRPMS/richacl-1.1*.src.rpm
rpmbuild --rebuild ~/rpmbuild/SRPMS/richacl-1.1*.src.rpm
rpm -i *richacl*.rpm
cd
tar xvf sracl.tgz # this should contain samba_richacl.spec,samba_richacl_build.sh,src/vfs_richacl.c
./samba_richacl_build.sh samba srpm
# running the samba_richacl_build.script as follows depends on the
# rpmbuild -bb samba.spec above which leaving the build dir intact!
sh -x ./samba_richacl_build.sh samba srpm
rpmbuild --rebuild /root/rpmbuild/SRPMS/samba_richacl-4.*.src.rpm
yum install createrepo
cd ~/rpmbuild/RPMS
createrepo .
yum clean all
yum install --repofrompath 99,. --repoid=99 samba --nogpg
yum install --repofrompath 99,. --repoid=99 samba_richacl-lib --nogpg