cmspkg
is collection of helper script used by http://github.com/cms-sw/pkgtools for building and distributing http://github.com/cms-sw/cmssw RPMs. It is to replace the apt
usage.
cmspkg
puppet package provider documentation is available here
Converting apt
-speak to cmspkg
-speak is mostly replacing apt-*
commands with cmspkg -a arch
. Not all apt-* commands are available in cmspkg. See the table below for details
Purpose | APT | CMSPKG |
---|---|---|
Retrieve/update new lists of packages | apt-get update |
cmspkg -a arch update |
Install new packages | apt-get -y install package |
cmspkg -a arch -y install package |
Reinstalling an installed package | apt-get reinstall package |
cmspkg -a arch reinstall package |
Reinstalling an installed package | apt-get --reinstall install package |
cmspkg -a arch --reinstall install package |
Remove packages | apt-get remove package |
cmspkg -a arch remove package |
Cleaup downloaded package files | apt-get clean |
cmspkg -a arch clean |
Perform an upgrade | apt-get upgrade |
cmspkg -a arch upgrade |
Remove unused not-explicitly installed packages | - |
cmspkg -a arch dist-clean |
Search a package | apt-cache search package |
cmspkg -a arch search package |
Show some general information for a single package | apt-cache showpkg package |
cmspkg -a arch showpkg package |
Show a readable record for the package | apt-cache show package |
cmspkg -a arch show package |
Shows listing of dependency of a package | apt-cache depends package |
cmspkg -a arch depends package |
cmspkg
internally sources the latest available rpm
env, so no need to source apt/rpm init.[sh|csh]
script before running cmspkg
commands.
To run rpm
commands, one can use cmspkg -a arch rpm -- <rpm command and options>
ARCH=slc6_amd64_gcc530
INSTALL_DIR=/path/to/install
wget http://cmsrep.cern.ch/cmssw/repos/bootstrap.sh
sh -ex ./bootstrap.sh -r cms -a $ARCH -p $INSTALL_DIR setup
$INSTALL_DIR/common/cmspkg -a $ARCH search cmssw
$INSTALL_DIR/common/cmspkg -a $ARCH -y install cms+cmssw+CMSSW_9_2_0
- @smuzaffar 2016-05-24: Initial version with basic commands working
- @smuzaffar 2016-06-22: Added setup, clone and upgrade commands
- setup: It create wrapper script and RPM environment scripts.
- clone: To clone an existsing repository on to a different server.
- upgrade: Download and install new cmspkg client is available.
- @smuzaffar 2016-06-24: Correctly find the server cgi-bin path and repository directory from the server URL.
- @smuzaffar 2016-06-24:
- Correctly inform user is he/she does not have write permission to install
- For dist-clean options, force delete the package install directory install-prefix/arch/pkg-group/pkg-name/pkg-version
- Avoid sending duplicate paramters to server.
- @smuzaffar 2016-06-24: Bug fix, Fixed re-try logic for downloading packages.
- @smuzaffar 2016-06-28: New -D|--delete-dir option to force deletion of package directory
- @smuzaffar 2016-06-30: Always download and verify new cmsos amd drivers file for clone.
- @smuzaffar 2016-07-01: Added showpkg command to show all revisions of a package.
- @smuzaffar 2016-07-01: Bug fix, make sure that download directory exists before fetching a file.
- @smuzaffar 2016-07-11:
- Code cleanup: Import only what is needed
- Use subprocess.Popen if commands.getstatusoutput is not available (e.g. in python 3.0)
- @smuzaffar 2016-07-12: Bug fix, avoid override of exit function call
- @smuzaffar 2016-07-12: Bug fix, avoid override of exit function call
- @smuzaffar 2016-07-12: updates to make the cmspkg client work with python3.x
- @smuzaffar 2016-07-13: Fixes to make it work with python 2.4 and above
- @smuzaffar 2016-07-13: Typo
- @smuzaffar 2016-07-20: Fixes for OSX
- Use md5 -q
- Use shasum -a 256
- @smuzaffar 2016-07-22: Make sure that cmspkg.py exit with non-zero code if failed to install RPMs.
- @smuzaffar 2016-08-08: New command 'depends' to show the dependencies of a package.
- @smuzaffar 2016-08-15: Check output of 'rpm' command as it does not always exit with non-zero code on errors.
- @smuzaffar 2016-08-19: new command rpmenv to run any command under rpm env e.g. cmspkg -a arch rpmenv -- rpmdb --rebuild
- @smuzaffar 2016-10-24: New option --use-store for clone command
- To create a common store for all cloned repositories
- Avoid downloading same RPM is available in multiple repos.
- @smuzaffar 2016-11-28: Send timestamp with caches/cache requests to always get the latest results.
- @smuzaffar 2017-02-16: Fix rpm version sort login.
- New command "env" same as "rpmenv"
- @smuzaffar 2017-04-12: Make search command also show revision if --show-revision is set.
- @smuzaffar 2017-10-04: Added -o|--download-options 'download options' to be passed to curl|wget.
- @smuzaffar 2017-11-03: Added repository command to get the repository/server details.
- @smuzaffar 2018-03-19: Do not remove cms+cmsswdata+ packages as they are shared between architectures.
- @smuzaffar 2018-05-17: New option added to Ignore known RPM errors.
- @smuzaffar 2018-11-26: New options added to be passed to underlying RPM commands.
- @mrodozov 2019-01-25: Use RPM query info package to get size of the package. Using --queryformat %SIZE fails for size over 4GB
- @smuzaffar 2019-03-18: Do not create lock for download command.
- @smuzaffar 2019-08-23: Update clone to copy common driver files
- @smuzaffar 2019-08-23: Do not fail if optional files not found.
- @smuzaffar 2019-08-23: Make use of new optional parameter to check for optional files.
- @smuzaffar 2019-10-05: Python3 fix, use cmspkg_print
- @smuzaffar 2019-11-22: Ignore size checks for installing releases.
- @smuzaffar 2020-01-21: New --install-only option to install package without its dependencies
- @smuzaffar 2020-01-23: Fixed some typos
- @smuzaffar 2020-06-12: Fix regexp for matching the rpm size. It was failing for slc5 cms-sw/cms-docker#65
- @smuzaffar 2020-10-20: Added --reference option to use a local install directory and create symlinks for already installed packages.
- @smuzaffar 2020-10-21: Install multiple packages in one go. This avoid reading RPM DB multiple times.
- @smuzaffar 2020-10-30: Cleanup obsolete APT code
- @smuzaffar 2020-11-24: Support to show multiple packages.
- @smuzaffar 2020-12-10: Drop cmsos as it is now taken from original cms-common repository.
- @smuzaffar 2021-02-17: Clone system files e.g. cmsos, bootstrap.sh and README.md
- @smuzaffar 2021-03-24: Bug fix, cmspkg failed to install if multiple packages are provided and last one is already installed.
- @smuzaffar 2021-03-25: Revert last change
- @smuzaffar 2021-09-10: Use python3 as default otherwise fallback to python.
- @smuzaffar 2021-11-29: Fixes for running under QEMU
- @smuzaffar 2022-02-28: For cmspkg remove command, covert RPM name to cmspkg name
- @smuzaffar 2022-03-12: Run OS specific commands under CMSPKG_OS_COMMAND if set. This allow to run most of the cmspkg command on host.
- @smuzaffar 2022-03-13: Big fix for large RPM sizes
- @smuzaffar 2022-03-13: Fixes for qemu printouts
- @smuzaffar 2022-03-13: Fix typo
- @smuzaffar 2022-03-13: Use system rpm for getting rpm file expand size and requirements
- @smuzaffar 2022-03-13: New --upgrade-packages options for upgrade command added. Thsi should update default packages like cms-common
- @smuzaffar 2022-03-13: Fixes for package clean
- @smuzaffar 2022-03-13: Fix dist-clean and reference install bug
- @smuzaffar 2022-03-15: Print upgrade packages details
- @smuzaffar 2022-03-18: Set various LANG and LC_ env to about perl warnings.
- @smuzaffar 2022-11-16: Added --no-reference option to skip creating symlinks for selected packages.
- @smuzaffar 2022-11-16: Fix no-reference packages
- @smuzaffar 2022-11-21: Remove qemu: Unsupported syscall: messages from cmd output
- @smuzaffar 2022-11-27: --build-order option added to show searched packages in build order (latest first)
- @smuzaffar 2023-02-02: Bug fix: Make sure to convert package revision number to int before comparison
- @sumuzaffar 2023-11-27 Apply ROOT WebGUI patch for root packages 6.26-6.31
- @sumuzaffar 2023-11-28 Bug fix for python2
- @sumuzaffar 2024-07-04 add crab and cmssw-osenv as no ref packages
- @sumuzaffar 2024-08-02 Support Python 3.12