Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions 2.1/build/build-rpms.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
# $1 Release version
qemu_lite_version=741f430a960b5b67745670e8270db91aeb083c5f

if [ -z "$1" ]; then
echo "No cc-oci-runtime version specified"
Expand All @@ -9,32 +10,30 @@ if [ -z "$1" ]; then
exit 1
fi

# Download cc-oci-runtime.tar.gz
curl -OkL https://github.com/01org/cc-oci-runtime/archive/$1.tar.gz

# Download qemu-lite.tar.gz
curl -OkL https://github.com/01org/qemu-lite/archive/da5004e3ffc6a79df82d1b9d8f8533c4045f193c.tar.gz
# version can't have '-' character
version=$(echo $1 | tr '-' '.')

# Setup cc-oci-runtime
rpmdev-setuptree
cd ~/rpmbuild/SOURCES

version=$(echo $1)
mv ~/$1.tar.gz ~/rpmbuild/SOURCES/cc-oci-runtime-$version.tar.gz
# Download cc-oci-runtime.tar.gz
curl -kL https://github.com/01org/cc-oci-runtime/archive/$1.tar.gz -o cc-oci-runtime-$version.tar.gz

# Move qemu-lite tar
mv ~/da5004e3ffc6a79df82d1b9d8f8533c4045f193c.tar.gz ~/rpmbuild/SOURCES
# Download qemu-lite.tar.gz
curl -OkL https://github.com/01org/qemu-lite/archive/$qemu_lite_version.tar.gz

# Update cc-oci-runtime.spec template
sed "s/VERSION/$version/g; s/PACKAGE/$1/g" ~/rpmbuild/SOURCES/cc-oci-runtime.spec-template > ~/rpmbuild/SOURCES/cc-oci-runtime.spec

# Update qemu-lite.spec template
sed "s/QEMU_LITE_VERSION/$qemu_lite_version/g" ~/rpmbuild/SOURCES/qemu-lite.spec-template > ~/rpmbuild/SOURCES/qemu-lite.spec

# Build qemu-lite
cd ~/rpmbuild/SOURCES && \
rpmbuild -ba qemu-lite.spec
rpmbuild -ba qemu-lite.spec

# Build cc-oci-runtime
cd ~/rpmbuild/SOURCES && \
rpmbuild -ba cc-oci-runtime.spec
rpmbuild -ba cc-oci-runtime.spec

# Copy RPMs
cp ~/rpmbuild/RPMS/x86_64/* ~/build/
2 changes: 1 addition & 1 deletion 2.1/build/centos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Make sure you have write access on that directory.

```
# export BUILD_DIR=/tmp/build
# export VERSION=2.1.1
# export VERSION=2.1.2
# docker run -ti --rm -v $BUILD_DIR:/home/cc/build -v $PWD/../build-rpms.sh:/usr/bin/build-rpms.sh centos-clear-containers /usr/bin/build-rpms.sh $VERSION
```

Expand Down
1 change: 0 additions & 1 deletion 2.1/build/centos/SOURCES/cc-oci-runtime.spec-template
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
/usr/share/defaults/cc-oci-runtime/genfile.sh

%files bin
%defattr(-,root,root,-)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name: qemu-lite
Version: 2.7.1
Release: 0
Source0: https://github.com/01org/qemu-lite/archive/da5004e3ffc6a79df82d1b9d8f8533c4045f193c.tar.gz
Source0: https://github.com/01org/qemu-lite/archive/QEMU_LITE_VERSION.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Summary : OpenBIOS development utilities
Group : Development/Tools
Expand Down Expand Up @@ -45,7 +45,7 @@ data components for the qemu-lite package.


%prep
%setup -q -n qemu-lite-da5004e3ffc6a79df82d1b9d8f8533c4045f193c
%setup -q -n qemu-lite-QEMU_LITE_VERSION
%patch1 -p1

%build
Expand Down
2 changes: 1 addition & 1 deletion 2.1/build/fedora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Make sure you have write access on that directory.

```
# export BUILD_DIR=/tmp/build
# export VERSION=2.1.1
# export VERSION=2.1.2
# docker run -ti --rm -v $BUILD_DIR:/home/cc/build -v $PWD/../build-rpms.sh:/usr/bin/build-rpms.sh fedora-clear-containers /usr/bin/build-rpms.sh $VERSION
```

Expand Down
1 change: 0 additions & 1 deletion 2.1/build/fedora/SOURCES/cc-oci-runtime.spec-template
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
/usr/share/defaults/cc-oci-runtime/genfile.sh

%files bin
%defattr(-,root,root,-)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name: qemu-lite
Version: 2.7.1
Release: 0
Source0: https://github.com/01org/qemu-lite/archive/da5004e3ffc6a79df82d1b9d8f8533c4045f193c.tar.gz
Source0: https://github.com/01org/qemu-lite/archive/QEMU_LITE_VERSION.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Summary : OpenBIOS development utilities
Group : Development/Tools
Expand Down Expand Up @@ -45,7 +45,7 @@ data components for the qemu-lite package.


%prep
%setup -q -n qemu-lite-da5004e3ffc6a79df82d1b9d8f8533c4045f193c
%setup -q -n qemu-lite-QEMU_LITE_VERSION
%patch1 -p1

%build
Expand Down
1 change: 0 additions & 1 deletion 2.1/build/rpmbuild/SOURCES/cc-oci-runtime.spec-template
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
/usr/share/defaults/cc-oci-runtime/genfile.sh

%files bin
%defattr(-,root,root,-)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name: qemu-lite
Version: 2.7.1
Release: 0
Source0: https://github.com/01org/qemu-lite/archive/da5004e3ffc6a79df82d1b9d8f8533c4045f193c.tar.gz
Source0: https://github.com/01org/qemu-lite/archive/QEMU_LITE_VERSION.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Summary : OpenBIOS development utilities
Group : Development/Tools
Expand Down Expand Up @@ -45,7 +45,7 @@ data components for the qemu-lite package.


%prep
%setup -q -n qemu-lite-da5004e3ffc6a79df82d1b9d8f8533c4045f193c
%setup -q -n qemu-lite-QEMU_LITE_VERSION
%patch1 -p1

%build
Expand Down