Open pnispero opened 3 weeks ago
This issue is in progress at Branch feat-6
.
This issue is put on hold as getting root accounts is taking some time among other things. Moving on with issue #7
Notes - rpm spec I used to build the RPM
test-ioc.spec
Name: test-ioc
Version: 1.0.0
Release: 1%{?dist}
Summary: test-ioc built for buildsystem testing
BuildArch: x86_64
License: GPL
Source0: %{name}-%{version}.tar.gz
# Requires:
# TODO: Need to figure out if we want to specify dependencies here like all of them?
# Or just copy over the dependencies from the manifest CONFIG.yaml
%description
A demo RPM build
# Define the _prefix macro with a default value
%define _prefix /sdf/scratch/ad/build/lcls/epics/iocTop
%prep
%setup -q
# %build
# No build steps for this - can assume the tarball is already built
%install
# Install refers to installing the tarball on BUILDROOT/ of the rpm package
# Create the test-ioc directory in the buildroot
mkdir -p %{buildroot}%{_prefix}/%{name}-%{version}/bin
mkdir -p %{buildroot}%{_prefix}/%{name}-%{version}/db
mkdir -p %{buildroot}%{_prefix}/%{name}-%{version}/dbd
mkdir -p %{buildroot}%{_prefix}/%{name}-%{version}/iocBoot
# List the contents of the source directories for debugging
echo "Listing source directory contents:"
ls -R %{_sourcedir}/%{name}-%{version}.tar.gz
# Copy contents from the unpacked tarball into the test-ioc directory
cp -a bin/* %{buildroot}%{_prefix}/%{name}-%{version}/bin/
cp -a db/* %{buildroot}%{_prefix}/%{name}-%{version}/db/
cp -a dbd/* %{buildroot}%{_prefix}/%{name}-%{version}/dbd/
cp -a iocBoot/* %{buildroot}%{_prefix}/%{name}-%{version}/iocBoot/
%clean
# No clean steps for this - since there is no building step
%files
# Files refer to copying the files to desired directories on target system
# This one has to be dynamic with %_prefix
# The install location is dynamic and determined at installation using '_prefix'
# ex: rpm -i test-ioc.rpm --prefix /sdf/scratch/ad/build/lcls/epics/iocTop
%{_prefix}/%{name}-%{version}/bin/*
%{_prefix}/%{name}-%{version}/db/*
%{_prefix}/%{name}-%{version}/dbd/*
%{_prefix}/%{name}-%{version}/iocBoot/*
%changelog
* Fri Aug 23 2024 Patrick Nisperos <pnispero@slac.stanford.edu> - 1.0.0
- First version being packaged
Build and deploy rpm logic for an IOC
note - If rpm's is the direction were heading, we will build and deploy rpms for the other types of apps as well including HLA, Tools/script, matlab, pydm, etc.
Building RPM
3.1) cd build_results
Deploying RPM