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
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@ NAME := fio
SRC_EXT := bz2
SOURCE = http://brick.kernel.dk/snaps/$(NAME)-$(VERSION).tar.$(SRC_EXT)

include packaging/Makefile_packaging.mk
include source_deps.mk

include packaging/Makefile_packaging.mk

source_deps.mk:
for s in $(SOURCES); do \
echo $${s##*/}:; \
done > $@
11 changes: 9 additions & 2 deletions fio.spec
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
Name: fio
Version: 3.3
Release: 5%{?dist}
Version: 3.26
Release: 1%{?dist}
Summary: Multithreaded IO generation tool

Group: Applications/System
License: GPLv2
URL: http://git.kernel.dk/?p=fio.git;a=summary
Source: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
Patch0: https://github.com/axboe/fio/compare/267b164..c363fdd.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: libaio-devel
BuildRequires: zlib-devel
BuildRequires: libuuid-devel
%ifarch x86_64
BuildRequires: libpmem-devel
BuildRequires: libpmemblk-devel
Expand Down Expand Up @@ -50,6 +52,7 @@ FIO devel

%prep
%setup -q
%patch0 -p1 -b .267b164..c363fdd.patch
find . -type f > source_files.txt
# fix hard-coded /usr/bin/bash
sed -i -e "s|/usr/bin/bash|$(command -v bash)|g" tools/genfio
Expand Down Expand Up @@ -86,6 +89,10 @@ rm -rf $RPM_BUILD_ROOT
%{_usrsrc}/%{name}-%{version}

%changelog
* Wed Apr 07 2021 Jonathan Martinez Montes <jonathan.martinez.montes@intel.com> - 3.26-1
- New upstream version
- Add 267b164..c363fdd patch that adds DAOS support

* Tue Jul 30 2019 Brian J. Murrell <brian.murrell@intel.com> 3.3-5
- SUSE really wants source files in -devel, not -src

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-2021, 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-2021, Intel Corporation
#
# 'recipe' for Docker to build an RPM
#
Expand All @@ -12,8 +12,9 @@ MAINTAINER daos-stack <daos@daos.groups.io>
ARG UID=1000

# Install basic tools
RUN yum install -y mock make rpm-build curl createrepo rpmlint redhat-lsb-core \
git python-srpm-macros
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-2021, Intel Corporation
#
# 'recipe' for Docker to build an Debian package
#
# Pull base image
FROM ubuntu:20.04
MAINTAINER daos-stack <daos@daos.groups.io>

# 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
108 changes: 108 additions & 0 deletions packaging/Makefile_distro_vars.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
DOT := .

DOCKER := docker

# Find out what we are
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)
VERSION_CODENAME := $(shell . /etc/os-release; echo $$VERSION_CODENAME)

ifeq ($(ID_LIKE),debian)
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)
# DISTRO_ID (i.e. el7)
# DISTRO_BASE (i.e. EL_7)
# from the CHROOT_NAME
ifeq ($(CHROOT_NAME),epel-7-x86_64)
DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist})
VERSION_ID := 7
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
ifeq ($(CHROOT_NAME),sles-12.3-x86_64)
# TBD if support is ever resurrected
endif
endif
ifeq ($(ID),centos)
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); \
sed -i -e 1d -e '$$s/^/gpgcheck=False/' $$repo_file; \
else \
exit 1; \
fi
endef
endif
ifeq ($(findstring opensuse,$(ID)),opensuse)
ID_LIKE := suse
DISTRO_ID := sl$(VERSION_ID)
DISTRO_BASE := $(basename LEAP_$(VERSION_ID))
endif
ifeq ($(ID),sles)
# SLES-12 or 15 detected.
ID_LIKE := suse
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
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