This set of steps will do some preliminary "safety" checks to ensure the local environment is ok and setup some important information. This checks for old tarballs (and particularly unpacked distributions) which might confuse the later processing. If this step finds outstanding files you need to remove them before continuing! find . -name 'net-snmp-5*' | egrep '^[^\?]' This should show the last version number published in this branch by looking at the time line in the README file: head -1 README Please enter the version number to publish. Net-SNMP convention dictates that this be a version number like 5.7 or 5.7.1. Pre-releases that occur before a branch freezes should be appended with ".preN" like 5.7.1.pre2. Release-candidates should be labeled ".rcN" like 5.7.1.rc1. Please enter the last version number that the changelog should be generated from. This should be easy for a new release on a branch, but may be more tricky for a main release. # version number with dashes instead of dots $self->{'parameters'}{'VERSIONTAGNAME'} = "v" . $self->{'parameters'}{'VERSION'}; $self->{'parameters'}{'LASTVERSIONTAGNAME'} = "v" . $self->{'parameters'}{'LASTVERSION'}; # target version number (without preN/rcN) $self->{'parameters'}{'VERSIONTARGET'} = $self->{'parameters'}{'VERSION'}; if ( $self->{'parameters'}{'VERSIONTARGET'} =~ /\.pre.*/ ) { $self->{'parameters'}{'VERSIONTARGET'} =~ s/\.pre.*//; $self->{'parameters'}{'RELEASETYPE'} = "pre"; } elsif ( $self->{'parameters'}{'VERSIONTARGET'} =~ /\.rc.*/ ) { $self->{'parameters'}{'VERSIONTARGET'} =~ s/\.rc.*//; $self->{'parameters'}{'RELEASETYPE'} = "rc"; } else { $self->{'parameters'}{'RELEASETYPE'} = "full"; } # version in floating point form for perl modules my ($major, $minor, $patch, $opps) = ($self->{'parameters'}{'VERSION'} =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/); $self->{'parameters'}{'VERSIONFLOAT'} = $major + $minor/100 + $patch/10000 + $opps/100000; # find out the git branch we're on. open(GITINFO,"git branch|"); while(<GITINFO>) { if (/^\*\s+(.*)/) { $self->{'parameters'}{'BRANCHPATH'} = $1; my ($nextBranch); $nextBranch = <GITINFO>; $nextBranch =~ s/^\s+//; $self->{'parameters'}{'NEXTBRANCH'} = $nextBranch; last; } } close(GITINFO); return 0; Here is the configured information we'll be using: VERSION: {VERSION} VERSION tag name: {VERSIONTAGNAME} Floating point VERSION: {VERSIONFLOAT} Git Branch Name: {BRANCHPATH} We need to make sure your code is up to date and matches the latest sources in this branch. git pull This steps looks for outstanding files that have been modified. There should be no outstanding modifications! If this step finds outstanding modified files you need to check them in or revert them before continuing! git status --porcelain | egrep '^[^\?]' This set of steps will modify various places within the source code tree to bring it up to date with the new version number about to be published. These steps will modify the various files in the source tree that contain the version number, show you the changes that will be made and then check in the resulting changes if you approve of them. You may need to edit Makefile.top to update the library version numbering - see the comments there about LIBCURRENT, LIBAGE and LIBREVISION for details. This is usually only needed for the first pre-release of a given version. This script will commit the file for you after you're done. We'll now commit the Makefile.top file if you've modified it. git commit -m "version update for {VERSION}" Makefile.top These steps will modify the various files in the source tree that contain the version number, show you the changes that will be made and then check in the resulting changes if you approve of them. We will now modify files through the code to replace the version number with the newer one. perl/SNMP/SNMP.pm perl/agent/agent.pm perl/agent/Support/Support.pm* perl/agent/default_store/default_store.pm perl/default_store/default_store.pm perl/OID/OID.pm perl/ASN/ASN.pm perl/AnyData_SNMP/Storage.pm perl/AnyData_SNMP/Format.pm perl/TrapReceiver/TrapReceiver.pm snmplib/snmp_version.c README FAQ dist/net-snmp.spec dist/Makefile* configure.in* configure.ac* snmplib/snmp_version.c We modified configure.in, so we now need to run autoconf to rebuild configure. rm -f configure dist/run-autoconf Check the following changes for proper version number differences before we commit the chances. git diff Check the changes in the above diff and then we'll commit the results here if they look ok. git commit -a -m "Version number update: {VERSION}" Note in 'dist/release' that this branch is in release candidate mode git checkout V5-7-patches grep -v {BRANCHPATH} dist/release > dist/release.new echo {BRANCHPATH} rc >> dist/release.new mv dist/release.new dist/release git commit -m "Release Candidate for {BRANCHPATH}" dist/release git checkout {BRANCHPATH} grep -v {BRANCHPATH} dist/release > dist/release.new echo {BRANCHPATH} rc >> dist/release.new mv dist/release.new dist/release git commit -m "Release Candidate for {BRANCHPATH}" dist/release Ensure that 'dist/release' doesn't reference this branch git checkout V5-7-patches grep -v {BRANCHPATH} dist/release > dist/release.new mv dist/release.new dist/release git commit -m "{BRANCHPATH} out of Release Candidate" dist/release git checkout {BRANCHPATH} grep -v {BRANCHPATH} dist/release > dist/release.new mv dist/release.new dist/release git commit This step will create manual pages from doxygen instrumented code files. if [ -f Makefile ] then make docs make mancp fi This will run git status to figure out what files have changed since the previous man page generation steps were done. After this step, we'll commit all the modified files. You may find additional files (marked with a ?) that should be added to the repository and you'll need to do this by hand before going on to the next step. Note: based on a recent net-snmp-admin discussion, we're no longer going to be adding the bazillions of man pages that doxygen generates by default. Only important ones should be added. git status --porcelain man Update man/Makefile.in with details of any new man pages, and run 'git add' on them. I'll commit these changes for you after you're done. git commit -m "documentation update for {VERSION}" man These steps will help you test the source code to ensure it passes some simple "it works" tests. First we need to clean the existing build tree and start from scratch. NETSNMP_DONT_CHECK_VERSION=1 make distclean We need to run configure to set up the build tree. ./configure --cache=config.cache --with-defaults --with-mib-modules='host examples examples/example testhandler tlstm-mib tsm-mib smux Rmon disman/event-mib' --with-transports="IPX TLSTCP DTLSUDP" --with-security-modules="tsm" --enable-ipv6 --enable-embedded-perl --enable-shared Then we need to build the code NETSNMP_DONT_CHECK_VERSION=1 make 2>&1 | tee -a make-$(date +%y%m%d_%H%M).log Now we run "make test" which should produce a perfect set up test results. If not, this needs to be fixed or at least understood and accepted as is for some other reason. make test 2>&1 | tee -a make-test-$(date +%y%m%d_%H%M).log Now we run the unit-tests which should also produce a perfect set up test results. If not, this needs to be fixed or at least understood and accepted as is for some other reason. cd testing && ./RUNFULLTESTS -g unit-tests Now we run the transport tests which should also produce a perfect set up test results, if your machine supports all the transports. If not, this needs to be fixed or at least understood and accepted as is for some other reason (like you can't do IPv6 on your system). cd testing && ./RUNFULLTESTS -g transports This command looks for source code oddities and policy violations. make checks Certain files in the distribution are built on a per-release basis. These steps will help set up these files. This step creates Makefile dependencies using the "distdepend" rule in the top level Makefile. Note that if you have any additional MIB module code files in the source tree, these will be included in the Makefile dependency list. You may wish to remove these and re-run "make distdepend" before committing the changes. make distdepend This step commits the dependency changes done in the previous step. git commit -m "make depend for {VERSION}" `find . -name Makefile.depend` We need to extract the portions of the change logs committed to the repository. git log --no-merges {LASTVERSIONTAGNAME}..HEAD > ChangeLog.add You need to manually insert the *relevent* portions of 'ChangeLog.add' into the ChangeLog file. I also suggest truncating ChangeLog.add to only contain the *relevent* portions for this release, as this will make CHANGES.new2 and NEWS.new2 more accurate later on. I'll commit these changes for you after you finish cutting out the proper changes. git commit -m "version update for {VERSION}" ChangeLog perl dist/extractnews -s ----- -e ----- ChangeLog perl dist/extractnews -c CHANGES.new2 -n NEWS.new2 ChangeLog.add You need to manually insert the relevent portions of 'CHANGES.new' and 'NEWS.new' into the CHANGES and NEWS file. (There are alternative versions in 'CHANGES.new2' and 'NEWS.new2') You may wish to update the README file as well. I'll commit these changes for you afterwards git commit -m "version update for {VERSION}" README NEWS CHANGES One more git pull and status to make sure nothing odd exists in your source tree. Please check the results! git pull git status --porcelain This is it! After this point it's much harder to turn back. If everything is ok until this point and you're ready to actually tag the release in git and make release files, these steps will do that for you. This will actually copy the current checked out branch to the new tag name. Specifically: git tag -u ACB19FD6 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" git tag -u ACB19FD6 -s {VERSIONTAGNAME} -m "Tagging of version {VERSION} as {VERSIONTAGNAME}" git archive --prefix=net-snmp-{VERSION}/ {BRANCHPATH} | tar xf - net-snmp-{VERSION}/remove-files net-snmp-{VERSION} star artype=ustar -c -z -f net-snmp-{VERSION}.tar.gz net-snmp-{VERSION} rm -f net-snmp-{VERSION}.zip zip -r net-snmp-{VERSION}.zip net-snmp-{VERSION} gpg --list-secret-keys net-snmp-admin gpg --use-agent -u ACB19FD6 -a --detach-sign net-snmp-{VERSION}.tar.gz gpg --use-agent -u ACB19FD6 -a --detach-sign net-snmp-{VERSION}.zip Mark these code modifications as specific to this particular branch git checkout {NEXTBRANCH} git merge -s ours -m "Release {VERSION} specific changes" {BRANCHPATH} git checkout {BRANCHPATH} Push the code modifications to the upstream branch git push git push --tags origin {VERSIONTAGNAME} We'll also re-build the source and retest a few things to ensure the packaged file can actually be built. rm -rf net-snmp-{VERSION} tar xzf net-snmp-{VERSION}.tar.gz cd net-snmp-{VERSION} && ./configure --cache=config.cache --with-defaults --with-mib-modules='host examples examples/example testhandler smux Rmon disman/event-mib' --with-transports=IPX --enable-ipv6 --enable-embedded-perl --enable-shared cd net-snmp-{VERSION} && make 2>&1 | tee -a make-$(date +%y%m%d_%H%M).log cd net-snmp-{VERSION} && make test 2>&1 | tee -a make-test-$(date +%y%m%d_%H%M).log Now we'll publish the results to the SF server This will copy the results to the SF uploads directory in your account on frs.sourceforge.net. The following command is just as an example - this script does *not* upload the files automatically. You must do something like: echo rsync -v net-snmp-{VERSION}.tar.gz net-snmp-{VERSION}.tar.gz.asc net-snmp-{VERSION}.zip net-snmp-{VERSION}.zip.asc $USER@frs.sourceforge.net:/home/frs/project/net-snmp/net-snmp/{VERSIONTARGET}-pre-releases/ Update the project download web page (http://www.net-snmp.org/download.html) to mention this new release If this the final version of this release, then: Any official patches for the previous release should be re-prioritised to level 5. Any official patches for the earlier releases should be re-prioritised to level 1 and closed. firefox 'http://www.net-snmp.org/official_patches/' Binaries: build rpms, .tar.gzs, etc. You need to run nsrollup now to sync all the changes we've made into any upstream branches. This will likely cause merge conflicts because of the version number clashes and will need to be resolved. Run (in bash): . local/gittools/shell-functions nsrollup nssync XXX: For conflicts, we can probably pick -s ours but needs to be checked and documented. Send an announcement message to one of the following mailing lists based on its type: pre: net-snmp-coders@lists.sourceforge.net rc: net-snmp-users@lists.sourceforge.net final: net-snmp-announce@lists.sourceforge.net (one week after the source tarball is made available) Update the topic on the #Net-SNMP channel if this is a trunk based release (or the latest on the top most patch tree). Advertise: NEWS upload to sf, publish on -announce, freshmeat, and the GNU FSF directory (http://directory.fsf.org/project/net-snmp/)... (send mail to bug-directory@gnu.org)