From Fedora Project Wiki

m (srpm -> sources)
(Fix pre tag ending.)
Line 89: Line 89:
      
      
     - libanl: Fix crash if first helper thread creation failed (#1646381)
     - libanl: Fix crash if first helper thread creation failed (#1646381)
<pre>
</pre>
Following the spec file %changelog examle from above.
Following the spec file %changelog examle from above.



Revision as of 18:10, 19 November 2018

Rawhide synchronization for the GNU C Library

Pre-requisites

  • Install fedpkg, python3-pygit2, python3-rpm and git-merge-changelog
  • Configure your ~/.gitconfig to have entries for name, and a merge driver for GNU Changelogs.
[user]
	name = My Name

[merge "merge-changelog"]
        name = GNU-style ChangeLog Merge driver
        driver = /usr/bin/git-merge-changelog
[core]
	attributesfile = ~/.gitattributes
  • Configure your ~/.gitattributes
ChangeLog       merge=merge-changelog
  • Clone glibc-maintainer-scripts into $GLIBC_MS for the git synchronization scripts.
export GLIBC_MS=$HOME/fedsrc/glibc-maintainer-scripts
mkdir -p $HOME/fedsrc
cd $HOME/fedsrc
git clone ssh://git@pagure.io/glibc-maintainer-scripts.git
  • Clone UpstreamToolchainScripts from the Fedora Toolchain team for the build log fetching scripts.
export TOOLS=$HOME/fedsrc/UpstreamToolchainScripts
cd $HOME/fedsrc
git clone ssh://git@pagure.io/FedoraToolchainTeam/UpstreamToolchainBuildScripts.git

Synchronization Process

  • Setup/Fetch a clean upstream master repository for glibc. This can be an existing directory also which you switch to master branch and ensure it has been rebased e.g. git pull --rebase cleanly to head.
mkdir -p $HOME/src
cd $HOME/src
git clone git://sourceware.org/git/glibc.git glibc-pristine
  • Setup/Fetch a clean Fedora rawhide glibc repository.
cd $HOME/fedsrc
fedpkg clone glibc
  • DJ - run fedpkg sources which downloads the .tar.xy file you need
  • Convert the Fedora rawhide glibc dist-git repository to a glibc-patches repository (git repo with Fedora patches applied as commits).
cd $HOME/fedsrc/glibc
$GLIBC_MS/glibc-patches-to-git.py
  • Synchronize from upstream master to Fedora rawhide and review changes.
cd $HOME/fedsrc/glibc
$GLIBC_MS/glibc-sync-upstream.py --import-git $HOME/src/glibc-pristine --verbose
git diff
  • Manually add new changes. This step is probably the most complex. You need to look at all the changes since the last sync (the hash is recorded in the %changelog) and see if there is anything note-worthy to talk about e.g. git diff HASH1^..HASH2. You will use this text in your commit message also.
* Wed Nov 07 2018 Florian Weimer <fweimer@redhat.com> - 2.28.9000-14
- Auto-sync with upstream branch master,
  commit 1df872fd74f730bcae3df201a229195445d2e18a:
- libanl: Fix crash if first helper thread creation failed (#1646381)
  • Add new files (still in the Fedora rawhide directory from the last step) and commit
git add glibc-*.tar.gz
fedpkg new-sources glibc-*.tar.gz
git add glibc.spec
git commit

An appropriate commit message would be:

    Auto-sync with upstream branch master
    
    Upstream commit: 1df872fd74f730bcae3df201a229195445d2e18a
    
    - libanl: Fix crash if first helper thread creation failed (#1646381)

Following the spec file %changelog examle from above.

  • Test a scratch build, and wait for it to complete.
fedpkg srpm
fedpkg build --scratch --srpm ./glibc-XXX.src.rpm
  • Verify scratch build results by downloading logs and looking for any unexpected failures.
$TOOLS/codonell/get-build-logs.sh https://koji.fedoraproject.org/koji/taskinfo?taskID=$TASKID
  • Lastly, push the commit and kick off a Rawhide build if the logs look good.
git push
fedpkg build