Build and packaging scripts for OpenContrail.
├── rpm/ # RPM packaging
│ ├── contrail/ # RPMs for contrail
│ │ ├── contrail.spec # RPM spec for package contrail
│ │ └── <pkg-files> # Files used with package contrail
│ └── <pkg-name>/ # RPMs for <pkg-name>
│ │ ├── <pkg-name>.spec # RPM spec for package <pkg-name>
│ │ └── <pkg-files> # Files used with package <pkg-name>
├── utils/ # Utility scripts
└── Makefile
- Keep spec files in corresponding directories (e.g. contrail-heat: rpm/contrail-heat/contrail-heat.spec)
- Keep all additional files in directories specific to package
- Use absolute paths for sandbox-related variables (e.g.
%define _distropkgdir %{_sbtop}tools/packages/rpm/%{name}
)
- Makefile can be used from anywhere within the contrail sandbox, e.g.
make -f <current_path_to_packages>/Makefile
- Following Makefile targets are supported:
rpm
- builds all rpm packages in the repositoryrpm-<pkg-name>
- builds specific package<pkg-name>
dep
- installs all dependencies for all packages (requires root privileges or sudo)dep-<pkg-name>
- installs dependencies for<pkg-name>
(requires root privileges or sudo)list
- lists all the packages available for buildinginfo
- shows information about set variables
- Following Environment variables can be used for controlling Makefile behavior:
DEBUGINFO
=TRUE
/FALSE
- build debuginfo packages (default:TRUE
)TOPDIR
- control where packages will be built (default:SB_TOP
)SCONSOPT
=debug
/production
- select optimization level for scons (default:production
)SRCVER
- specify source code version (default fromcontroller/src/base/version.info
)KVERS
- kernel version to build against (default: installed version ofkernel-devel
)BUILDTAG
- additional tag for versioning (default:date +%m%d%Y%H%M
)SKUTAG
- OpenStack SKU (default:ocata
)