Skip to content
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
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
NAME := romio
SRC_EXT := gz
NAME := romio
SRC_EXT := gz
TEST_PACKAGES := $(NAME)-tests

include packaging/Makefile_packaging.mk

# need to force rebuilding the SRPM because the source tarball is
# distro specific
romio-3.3.tar.gz: FORCE
$(SRPM): FORCE

debug:
echo $(SRPM)
$(SRPM): FORCE
30 changes: 2 additions & 28 deletions packaged-runtests-centos7.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
;;
-echo)
@@ -52,7 +53,7 @@
daos_pool=1
subset_only=1
;;
-fname=*)
- FILENAME=`echo $arg|sed 's/-*fname=//'`
Expand Down Expand Up @@ -47,7 +47,7 @@
echo "$hostname : $d"
fi
}
@@ -156,20 +157,20 @@
@@ -156,13 +157,13 @@
MakeExe simple
rm -rf $FILENAME*
echo "**** Testing ${1}.c ****"
Expand All @@ -63,23 +63,6 @@
$MAKE default
fi
#

if [ $daos_pool = 1 ] ; then
echo '**** Creating DAOS Pool ****'
-pool=`dmg_old create --size=1GB`
+pool=$(dmg_old create --size=1GB)
value=$pool
echo $value
OLDIFS=$IFS
@@ -178,7 +179,7 @@
IFS=$OLDIFS
export DAOS_POOL=${array[0]}
export DAOS_SVCL=${array[1]}
-export DAOS_CONT=`uuidgen`
+export DAOS_CONT=$(uuidgen)
echo '**** Creating DAOS Container ****'
daos cont create --pool=$DAOS_POOL --svc=$DAOS_SVCL --cont=$DAOS_CONT --type=POSIX
fi
@@ -193,7 +194,7 @@
MakeExe simple
\rm -f $FILENAME*
Expand Down Expand Up @@ -328,15 +311,6 @@
if test "$testfiles" = "*.out" ; then
echo "No output files remain from previous test!"
exit 1
@@ -465,7 +466,7 @@

if [ $daos_pool = 1 ] ; then
echo '**** Destroying DAOS Pool ****'
-pool=`mpirun -np 1 dmg_old destroy --force --pool=${array[0]}`
+pool=$($mpirun -np 1 dmg_old destroy --force --pool=${array[0]})
fi

#
@@ -473,14 +474,14 @@
# rm -f iotests.diff
# nodiff=1
Expand Down
30 changes: 2 additions & 28 deletions packaged-runtests-leap15.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
;;
-echo)
@@ -52,7 +53,7 @@
daos_pool=1
subset_only=1
;;
-fname=*)
- FILENAME=`echo $arg|sed 's/-*fname=//'`
Expand Down Expand Up @@ -47,7 +47,7 @@
echo "$hostname : $d"
fi
}
@@ -156,20 +157,20 @@
@@ -156,13 +157,13 @@
MakeExe simple
rm -rf $FILENAME*
echo "**** Testing ${1}.c ****"
Expand All @@ -63,23 +63,6 @@
$MAKE default
fi
#

if [ $daos_pool = 1 ] ; then
echo '**** Creating DAOS Pool ****'
-pool=`dmg_old create --size=1GB`
+pool=$(dmg_old create --size=1GB)
value=$pool
echo $value
OLDIFS=$IFS
@@ -178,7 +179,7 @@
IFS=$OLDIFS
export DAOS_POOL=${array[0]}
export DAOS_SVCL=${array[1]}
-export DAOS_CONT=`uuidgen`
+export DAOS_CONT=$(uuidgen)
echo '**** Creating DAOS Container ****'
daos cont create --pool=$DAOS_POOL --svc=$DAOS_SVCL --cont=$DAOS_CONT --type=POSIX
fi
@@ -193,7 +194,7 @@
MakeExe simple
\rm -f $FILENAME*
Expand Down Expand Up @@ -328,15 +311,6 @@
if test "$testfiles" = "*.out" ; then
echo "No output files remain from previous test!"
exit 1
@@ -465,7 +466,7 @@

if [ $daos_pool = 1 ] ; then
echo '**** Destroying DAOS Pool ****'
-pool=`mpirun -np 1 dmg_old destroy --force --pool=${array[0]}`
+pool=$($mpirun -np 1 dmg_old destroy --force --pool=${array[0]})
fi

#
@@ -473,14 +474,14 @@
# rm -f iotests.diff
# nodiff=1
Expand Down
4 changes: 2 additions & 2 deletions packaging/Dockerfile.centos.7
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2018-2019, Intel Corporation
# Copyright 2018-2020, Intel Corporation
#
# 'recipe' for Docker to build an RPM
#
Expand Down Expand Up @@ -28,7 +28,7 @@ RUN echo "$USER:$PASSWD" | chpasswd
RUN usermod -a -G mock $USER

# mock in Docker needs to use the old-chroot option
RUN grep use_nspawn || \
RUN grep use_nspawn /etc/mock/site-defaults.cfg || \
echo "config_opts['use_nspawn'] = False" >> /etc/mock/site-defaults.cfg

RUN chmod g+w /etc/mock/default.cfg
11 changes: 6 additions & 5 deletions packaging/Dockerfile.mockbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2018-2019, Intel Corporation
# Copyright 2018-2020, Intel Corporation
#
# 'recipe' for Docker to build an RPM
#
Expand All @@ -12,8 +12,9 @@ MAINTAINER daos-stack <[email protected]>
ARG UID=1000

# Install basic tools
RUN dnf -y install mock make rpm-build curl createrepo rpmlint redhat-lsb-core \
git python-srpm-macros rpmdevtools
RUN dnf -y install mock make \
rpm-build curl createrepo rpmlint redhat-lsb-core git \
python-srpm-macros rpmdevtools

# Add build user (to keep rpmbuild happy)
ENV USER build
Expand All @@ -24,7 +25,7 @@ RUN echo "$USER:$PASSWD" | chpasswd
RUN usermod -a -G mock $USER

# mock in Docker needs to use the old-chroot option
RUN grep use_nspawn || \
RUN grep use_nspawn /etc/mock/site-defaults.cfg || \
echo "config_opts['use_nspawn'] = False" >> /etc/mock/site-defaults.cfg

RUN chmod g+w /etc/mock/*
RUN chmod g+w /etc/mock/*
29 changes: 0 additions & 29 deletions packaging/Dockerfile.ubuntu.18.04

This file was deleted.

39 changes: 39 additions & 0 deletions packaging/Dockerfile.ubuntu.20.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Copyright 2019-2020, Intel Corporation
#
# 'recipe' for Docker to build an Debian package
#
# Pull base image
FROM ubuntu:20.04
MAINTAINER daos-stack <[email protected]>

# use same UID as host and default value of 1000 if not specified
ARG UID=1000
ARG REPO_URL=""
ARG REPO_UBUNTU_20_04=""

# Install basic tools
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
autoconf bash curl debhelper dh-make dpkg-dev doxygen gcc \
git git-buildpackage locales make patch pbuilder rpm wget \
ca-certificates scons python3-distutils pkg-config \
python3-dev python3-distro

# rpmdevtools
RUN echo "deb [trusted=yes] ${REPO_URL}${REPO_UBUNTU_20_04} focal main" > /etc/apt/sources.list.d/daos-stack-ubuntu-stable-local.list
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
rpmdevtools

# Add build user (to keep chrootbuild happy)
ENV USER build
RUN useradd -u $UID -ms /bin/bash $USER

# need to run the build command as root, as it needs to chroot
RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \
echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \
fi; \
echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \
echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \
chmod 0440 /etc/sudoers.d/build; \
visudo -c; \
sudo -l -U build
58 changes: 47 additions & 11 deletions packaging/Makefile_distro_vars.mk
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
DOT := .

DOCKER := docker

# Find out what we are
ID_LIKE := $(shell . /etc/os-release; echo $$ID_LIKE)
ID_LIKE := $(shell . /etc/os-release; echo $$ID_LIKE)
# Of course that does not work for SLES-12
ID := $(shell . /etc/os-release; echo $$ID)
VERSION_ID := $(shell . /etc/os-release; echo $$VERSION_ID)
ID := $(shell . /etc/os-release; echo $$ID)
VERSION_ID := $(shell . /etc/os-release; echo $$VERSION_ID)
VERSION_CODENAME := $(shell . /etc/os-release; echo $$VERSION_CODENAME)

ifeq ($(ID_LIKE),debian)
UBUNTU_VERS := $(shell . /etc/os-release; echo $$VERSION)
ifeq ($(VERSION_ID),19.04)
# Bug - distribution is set to "devel"
DISTRO_ID_OPT = --distribution disco
endif
DISTRO_ID := ubuntu$(VERSION_ID)
DISTRO_BASE = $(basename UBUNTU_$(VERSION_ID))
SPECTOOL := spectool
UBUNTU_VERS := $(shell . /etc/os-release; echo $$VERSION)
DISTRO_ID_OPT := --distribution $(VERSION_CODENAME)
DISTRO_ID := ubuntu$(VERSION_ID)
VERSION_ID_STR := $(subst $(DOT),_,$(VERSION_ID))
DISTRO_BASE := UBUNTU_$(VERSION_ID_STR)
endif
ifeq ($(ID),fedora)
DOCKER := podman
SPECTOOL := spectool
# a Fedora-based mock builder
# derive the the values of:
# VERSION_ID (i.e. 7)
Expand All @@ -27,12 +33,25 @@ DISTRO_ID := el7
DISTRO_BASE := EL_7
SED_EXPR := 1s/$(DIST)//p
endif
ifeq ($(CHROOT_NAME),epel-8-x86_64)
DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist})
VERSION_ID := 8
DISTRO_ID := el8
DISTRO_BASE := EL_8
SED_EXPR := 1s/$(DIST)//p
endif
ifeq ($(CHROOT_NAME),opensuse-leap-15.1-x86_64)
VERSION_ID := 15.1
DISTRO_ID := sl15.1
DISTRO_BASE := LEAP_15
SED_EXPR := 1p
endif
ifeq ($(CHROOT_NAME),opensuse-leap-15.2-x86_64)
VERSION_ID := 15.2
DISTRO_ID := sl15.2
DISTRO_BASE := LEAP_15
SED_EXPR := 1p
endif
ifeq ($(CHROOT_NAME),leap-42.3-x86_64)
# TBD if support is ever resurrected
endif
Expand All @@ -45,6 +64,7 @@ DISTRO_ID := el$(VERSION_ID)
DISTRO_BASE := $(basename EL_$(VERSION_ID))
DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist})
SED_EXPR := 1s/$(DIST)//p
SPECTOOL := spectool
define install_repo
if yum-config-manager --add-repo=$(1); then \
repo_file=$$(ls -tar /etc/yum.repos.d/*.repo | tail -1); \
Expand All @@ -66,7 +86,23 @@ DISTRO_ID := sle$(VERSION_ID)
DISTRO_BASE := $(basename SLES_$(VERSION_ID))
endif
ifeq ($(ID_LIKE),suse)
SPECTOOL := rpmdev-spectool
define install_repo
zypper --non-interactive ar $(1)
endef
endif
endif
ifeq ($(ID_LIKE),debian)
ifndef LANG
export LANG = C.UTF-8
endif
ifndef LC_ALL
export LC_ALL = C.UTF-8
endif
else
ifndef LANG
export LANG = C.utf8
endif
ifndef LC_ALL
export LC_ALL = C.utf8
endif
endif
Loading