[CentOS-devel] re/building Samba from git sources

Patrick Riehecky

riehecky at fnal.gov
Fri Apr 24 16:52:08 UTC 2020


I'm running into some formatting issues which make following bits of
this somewhat tricky....

I've attached a shell script that works on my system to download and
rebuild the CentOS8 sources for samba.

I hope this helps.

Pat

On Thu, 2020-04-23 at 15:06 -0400, R P Herrold wrote:
> On Thu, 23 Apr 2020, Patrick Riehecky wrote:
> 
> > It looks like you skipped :
> > 
> > git checkout c7
> 
> Thank you, Patrick
> 
> Perhaps I mis-understand the earlier indicated error at the 
> stop point for me in my earlier post.  I had considered your 
> approach, but do not see that this solves the issue by 
> slavishly following the webpage:
> 
> 	lynx -dump 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.centos.org_Sources&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=OAMtP0DWou0nlXG7Kmxo2enjXJfwb1DXS9fwcaESuTE&m=ZZ4JQTN_DbPIbWBf7MVqTI7okHTTTbAhiN2BrofJc_k&s=az1brogF4yqtnAbLEOfjVwbqFVxxA2q5-enRrYrarT8&e=
>   > ~/centos-git-common.Sources-20200423.txt
> 
> That lynx -dump of the relevant part is:
> 
>    Assume we want to work with the CentOS kernel sources.
> 
> [user at host ~]$ git clone 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.centos.org_rpms_kernel.git&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=OAMtP0DWou0nlXG7Kmxo2enjXJfwb1DXS9fwcaESuTE&m=ZZ4JQTN_DbPIbWBf7MVqTI7okHTTTbAhiN2BrofJc_k&s=rp9ItANuXpIp8xmhz6CbxGvEFrOSNbsqnuryQCJIvsM&e=
>   ; cd kernel
> # let's work on the centos7 kernel
> [user at host kernel]$ git checkout c7
> # download binary files
> [user at host kernel]$ ~/bin/get_sources.sh
> # switch to the local tree to edit
> [user at host kernel]$ git checkout -b my-kernel
> # make edits to SPEC file, etc
> [user at host kernel]$ git commit -m'my local changes' -a
> # ensure we can create a srpm
> [user at host kernel]$ rpmbuild --nodeps --define "%_topdir `pwd`" -bs
> SPECS/kernel.spec
> # if that works,
> [user at host kernel]$ rpmbuild --define "%_topdir `pwd`" -ba
> SPECS/kernel.spec
> 
> (excerpt ends) 
> 
> 
> Continuing with the later matter does not help, as the path to 
> the tarball file is munged, and so failing to attain the 
> desired result:
> 	# ensure we can create a srpm
> 
> 
> ## RPH, demonstrating: removing the prior fail, and following 
> ## the webpage 
> 
> [herrold at centos-8 centos-git-common]$ rm -rf samba
> [herrold at centos-8 centos-git-common]$ ls
> Sources-20200423.txt  centos-git-common
> [herrold at centos-8 centos-git-common]$  git clone 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.centos.org_rpms_samba.git&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=OAMtP0DWou0nlXG7Kmxo2enjXJfwb1DXS9fwcaESuTE&m=ZZ4JQTN_DbPIbWBf7MVqTI7okHTTTbAhiN2BrofJc_k&s=YlbX_GvyaH8acwqLQ-2cLQULV8f4eYHXNQY0tK_KlW8&e=
>   
> Cloning into 'samba'...
> remote: Counting objects: 660, done.
> remote: Compressing objects: 100% (578/578), done.
> remote: Total 660 (delta 70), reused 612 (delta 39)
> Receiving objects: 100% (660/660), 1.50 MiB | 1.12 MiB/s, done.
> Resolving deltas: 100% (70/70), done.
> warning: remote HEAD refers to nonexistent ref, unable to checkout.
> 
> [herrold at centos-8 centos-git-common]$ cd samba
> [herrold at centos-8 samba]$ ls -al 
> total 24
> drwxrwxr-x. 3 herrold herrold 4096 Apr 23 14:48 .
> drwxrwxr-x. 4 herrold herrold 4096 Apr 23 14:48 ..
> drwxrwxr-x. 7 herrold herrold 4096 Apr 23 14:48 .git
> [herrold at centos-8 samba]$ git checkout c8
> Checking out files: 100% (16/16), done.
> Branch 'c8' set up to track remote branch 'c8' from 'origin'.
> Switched to a new branch 'c8'
> [herrold at centos-8 samba]$ ~/bin/get_sources.sh
> Retrieving 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.centos.org_sources_samba_c8_6bf33724c18b74427453f0e3fc0180f84ff60818&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=OAMtP0DWou0nlXG7Kmxo2enjXJfwb1DXS9fwcaESuTE&m=ZZ4JQTN_DbPIbWBf7MVqTI7okHTTTbAhiN2BrofJc_k&s=sPWSpSEnugL_0cgvEgQ7V2k4fPv-HrBf5etX7BdKSPU&e= 
>   % Total    % Received % Xferd  Average Speed   Time    Time     
> Time  Current
>                                  Dload  Upload   Total   Spent    
> Left  Speed
> 100  1275  100  1275    0     0   4194      0 --:--:-- 
> --:--:-- --:--:--  4194
> Retrieving 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.centos.org_sources_samba_c8_c24e15add96d79950552f0ffbb44234e4142342c&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=OAMtP0DWou0nlXG7Kmxo2enjXJfwb1DXS9fwcaESuTE&m=ZZ4JQTN_DbPIbWBf7MVqTI7okHTTTbAhiN2BrofJc_k&s=6HiCPgLeKvBw_BNX9shLExlswQclPcwrTAcoDmaDVUA&e= 
>   % Total    % Received % Xferd  Average Speed   Time    Time     
> Time  Current
>                                  Dload  Upload   Total   Spent    
> Left  Speed
> 100 11.3M  100 11.3M    0     0  1284k      0  0:00:09  
> 0:00:09 --:--:-- 1387k
> [herrold at centos-8 samba]$ git checkout -b my-samba 
> Switched to a new branch 'my-samba'
> [herrold at centos-8 samba]$ find . -name samba.spec
> ./SPECS/samba.spec
> ####
> ####   a minimal comment at EOF of the .spec
> ####
> [herrold at centos-8 samba]$ echo "##" >> ./SPECS/samba.spec
> 
> [herrold at centos-8 samba]$ git commit -m'my local changes' -a
> [my-samba e323844] my local changes
>  1 file changed, 1 insertion(+)
> 
> #### 	confirm it is there
> ####
> [herrold at centos-8 samba]$ git log --after=yesterday --full-history --
> patch
> commit e32384460854ecc360201cec4503078aa6199b06 (HEAD -> my-samba)
> Author: R P Herrold <herrold at owlriver.com>
> Date:   Thu Apr 23 14:50:45 2020 -0400
> 
>     my local changes
> 
> diff --git a/SPECS/samba.spec b/SPECS/samba.spec
> index 65b987e..e6ea97f 100644
> --- a/SPECS/samba.spec
> +++ b/SPECS/samba.spec
> @@ -5693,3 +5693,4 @@ fi
>  - Added smbadduser command (missed from all previous RPMs) - 
> Doooh!
>  - Added smbuser file and smb.conf file updates for username 
> map
>  
> +##
> 
> ### at this point, either version should be able to attain a 
> new SRPM .. it does not
> 
> [herrold at centos-8 samba]$ rpmbuild --nodeps --define "%_topdir `pwd`"
> -bs SPECS/samba.spec 
> error: Bad source: /home/herrold/centos-git-
> common/samba/SOURCES/samba/samba-4.10.4.tar.xz: 
> No such file or directory
> [herrold at centos-8 samba]$ 
> 
> 
> #### Note the addition of the extra 'samba/' in the path
> 
> the tarball is there, but something is munging the correct 
> path to it
> 
> [herrold at centos-8 samba]$ find -name samba-4.10.4.tar.xz
> ./SOURCES/samba-4.10.4.tar.xz
> [herrold at centos-8 samba]$
> 
> 
> I do not live and breathe CentOS' approaches any more, but the 
> somewhat snotty remark earlier in this thread to consult the 
> web page seems not to work
> 
> -- Russ herrold
> _______________________________________________
> CentOS-devel mailing list
> CentOS-devel at centos.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.centos.org_mailman_listinfo_centos-2Ddevel&d=DwICAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=OAMtP0DWou0nlXG7Kmxo2enjXJfwb1DXS9fwcaESuTE&m=ZZ4JQTN_DbPIbWBf7MVqTI7okHTTTbAhiN2BrofJc_k&s=IMVooS-m33uHTwGpH_Q3redrC0mlV_NriiLYvugY_J8&e= 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rebuild_samba.sh
Type: application/x-shellscript
Size: 755 bytes
Desc: rebuild_samba.sh
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20200424/594521c8/attachment.bin>


More information about the CentOS-devel mailing list