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...
~/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@host ~]$ git clone https://urldefense.proofpoint.com/v2/url?u=https-3A__git.centos.org_rpms_ker... ; cd kernel # let's work on the centos7 kernel [user@host kernel]$ git checkout c7 # download binary files [user@host kernel]$ ~/bin/get_sources.sh # switch to the local tree to edit [user@host kernel]$ git checkout -b my-kernel # make edits to SPEC file, etc [user@host kernel]$ git commit -m'my local changes' -a # ensure we can create a srpm [user@host kernel]$ rpmbuild --nodeps --define "%_topdir `pwd`" -bs SPECS/kernel.spec # if that works, [user@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@centos-8 centos-git-common]$ rm -rf samba [herrold@centos-8 centos-git-common]$ ls Sources-20200423.txt centos-git-common [herrold@centos-8 centos-git-common]$ git clone https://urldefense.proofpoint.com/v2/url?u=https-3A__git.centos.org_rpms_sam...
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@centos-8 centos-git-common]$ cd samba [herrold@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@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@centos-8 samba]$ ~/bin/get_sources.sh Retrieving https://urldefense.proofpoint.com/v2/url?u=https-3A__git.centos.org_sources_... % 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_... % 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@centos-8 samba]$ git checkout -b my-samba Switched to a new branch 'my-samba' [herrold@centos-8 samba]$ find . -name samba.spec ./SPECS/samba.spec #### #### a minimal comment at EOF of the .spec #### [herrold@centos-8 samba]$ echo "##" >> ./SPECS/samba.spec
[herrold@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@centos-8 samba]$ git log --after=yesterday --full-history -- patch commit e32384460854ecc360201cec4503078aa6199b06 (HEAD -> my-samba) Author: R P Herrold herrold@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@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@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@centos-8 samba]$ find -name samba-4.10.4.tar.xz ./SOURCES/samba-4.10.4.tar.xz [herrold@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@centos.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.centos.org_mailma...