Skip to content

Commit

Permalink
Explicitly call createrepo_c instead of createrepo
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
dralley committed Nov 16, 2023
1 parent 43bafce commit 9681bb5
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM registry.fedoraproject.org/fedora:latest AS fedora-build

RUN dnf -yq install \
createrepo \
createrepo_c \
fedpkg \
gpg \
jq \
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ fixtures/rpm-unsigned-meta-only: fixtures fixtures/rpm-unsigned
fixtures/rpm-unsigned-modified: fixtures
rpm/gen-fixtures.sh $@ rpm/assets
rm $@/whale-0.2-1.noarch.rpm
createrepo --update $@
createrepo_c --update $@

fixtures/rpm-packages-updateinfo: fixtures
rpm/gen-patched-fixtures.sh -d $@ -f rpm/updateinfo-packages.patch
Expand All @@ -549,19 +549,19 @@ fixtures/rpm-with-sha: fixtures

fixtures/rpm-modular: fixtures
rpm/gen-fixtures.sh $@ rpm/assets-modularity
modifyrepo --mdtype=modules rpm/assets-modularity/modules.yaml "$@/repodata/"
modifyrepo_c --mdtype=modules rpm/assets-modularity/modules.yaml "$@/repodata/"

fixtures/rpm-with-modules: fixtures
rpm/gen-patched-fixtures.sh -d $@ -f rpm/modules-updateinfo.patch
modifyrepo --mdtype=modules rpm/assets/modules.yaml "$@/repodata/"
modifyrepo_c --mdtype=modules rpm/assets/modules.yaml "$@/repodata/"

fixtures/rpm-with-modules-modified: fixtures
rpm/gen-patched-fixtures.sh -d $@ -f rpm/modules-updateinfo.patch
rm $@/kangaroo-0.3-1.noarch.rpm
rm $@/shark-0.1-1.noarch.rpm
rm $@/stork-0.12-2.noarch.rpm
createrepo --update $@
modifyrepo --mdtype=modules rpm/assets/modules.yaml "$@/repodata/"
createrepo_c --update $@
modifyrepo_c --mdtype=modules rpm/assets/modules.yaml "$@/repodata/"

fixtures/rpm-modules-static-context: fixtures
rpm/gen-patched-fixtures.sh -d $@ -f rpm/modules-static-context.patch -t module -a rpm/assets-modularity
Expand All @@ -579,7 +579,7 @@ fixtures/rpm-with-sha-512: fixtures

fixtures/rpm-with-sha-1-modular: fixtures
rpm/gen-patched-fixtures.sh -d $@ -f rpm/modules-updateinfo.patch -s sha1
modifyrepo --mdtype=modules rpm/assets/modules.yaml "$@/repodata/"
modifyrepo_c --mdtype=modules rpm/assets/modules.yaml "$@/repodata/"

fixtures/rpm-with-vendor: fixtures
rpm/gen-rpm-and-repo.sh $@ "rpm/assets-specs/$$(basename $@).spec"
Expand All @@ -605,7 +605,7 @@ fixtures/rpm-zchunk: fixtures
fixtures/srpm-duplicate: fixtures
rpm-richnweak-deps/gen-srpms.sh $@/src srpm-duplicate/assets-specs/*.spec
rpm-richnweak-deps/gen-srpms.sh $@/dst srpm-duplicate/assets-specs/*.spec
createrepo --checksum sha256 $@
createrepo_c --checksum sha256 $@

fixtures/srpm-richnweak-deps: fixtures
rpm-richnweak-deps/gen-srpms.sh $@ rpm-richnweak-deps/assets-specs/*.spec
Expand Down
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ See ``make help``.
See ``fixtures/rpm-unsigned``.

``fixtures/rpm-modular``
The ``createrepo`` and ``modifyrepo`` executables must be available.
The ``createrepo_c`` and ``modifyrepo_c`` executables must be available.

.. NOTE:: All packages and metadata (modules, defaults, obsoletes and advisories)
are taken and combined from dnf-ci-fedora-modular, dnf-ci-thirdparty-modular,
Expand All @@ -193,20 +193,20 @@ See ``make help``.
See ``fixtures/rpm-unsigned``.

``fixtures/rpm-richnweak-deps``
The ``createrepo`` executable must be available.
The ``createrepo_c`` executable must be available.

``fixtures/rpm-signed``
The ``createrepo``, ``modifyrepo`` and ``rpmsign`` executables must be
The ``createrepo_c``, ``modifyrepo_c`` and ``rpmsign`` executables must be
available.

``fixtures/rpm-unsigned``
The ``createrepo`` and ``modifyrepo`` executables must be available.
The ``createrepo_c`` and ``modifyrepo_c`` executables must be available.

``fixtures/rpm-updated-updateinfo``
See ``fixtures/rpm-unsigned``.

``fixtures/rpm-with-modules``
The ``createrepo`` and ``modifyrepo`` executables must be available.
The ``createrepo_c`` and ``modifyrepo_c`` executables must be available.

``fixtures/rpm-with-non-ascii``
The ``fedpkg`` executable must be available.
Expand All @@ -218,7 +218,7 @@ See ``make help``.
See ``fixtures/rpm-unsigned``.

``fixtures/rpm-with-vendor``
The ``fedpkg`` and ``createrepo`` executables must be available.
The ``fedpkg`` and ``createrepo_c`` executables must be available.

``fixtures/rpm-with-pulp-distribution``
See ``fixtures/rpm-unsigned``.
Expand All @@ -227,14 +227,14 @@ See ``make help``.
See ``fixtures/srpm-richnweak-deps``.

``fixtures/srpm-richnweak-deps``
The ``rpmdev-setuptree``, ``rpmbuild`` and ``createrepo`` executable must be
The ``rpmdev-setuptree``, ``rpmbuild`` and ``createrepo_c_c`` executable must be
available.

``fixtures/srpm-signed``
The ``createrepo`` and ``modifyrepo`` executables must be available.
The ``createrepo_c_c`` and ``modifyrepo_c`` executables must be available.

``fixtures/srpm-unsigned``
The ``createrepo``, ``modifyrepo`` and ``rpmsign`` executables must be
The ``createrepo_c_c``, ``modifyrepo_c`` and ``rpmsign`` executables must be
available.

``gnupghome``
Expand Down
2 changes: 1 addition & 1 deletion rpm-richnweak-deps/gen-rpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ for srpm in "${@}"; do
filename="${filename%.src.rpm}.noarch.rpm"
cp "/root/rpmbuild/RPMS/noarch/${filename}" "${working_dir}/"
done
createrepo --checksum sha256 "${working_dir}"
createrepo_c --checksum sha256 "${working_dir}"
# Create or populate $output_dir.
#
# A $working_dir is used to make fixture generation more atomic. If fixture
Expand Down
2 changes: 1 addition & 1 deletion rpm-richnweak-deps/gen-srpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for specfile in "${@}"; do
filename="$(rpm --query --queryformat '%{NEVR}.src.rpm' --specfile "${specfile}")"
cp ~/rpmbuild/SRPMS/"${filename}" "${working_dir}"/
done
createrepo --checksum sha256 "${working_dir}"
createrepo_c --checksum sha256 "${working_dir}"

# Create or populate $output_dir.
#
Expand Down
14 changes: 7 additions & 7 deletions rpm/gen-fixtures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Options:
action.
--checksum-type <type>
The type of checksum that has to be included in repomd while using the
$(createrepo) command. Default checksum type is sha256.
$(createrepo_c) command. Default checksum type is sha256.
--zchunk
Whether or not to run createrepo with --zck option.
Whether or not to run createrepo_c with --zck option.
--productid
Whether to include a productid file or not. Default is 'not'
Expand Down Expand Up @@ -85,7 +85,7 @@ fi

# Sign RPMs and genereate repository metadata.
#
# NOTE: --groupfile should not be in $output_dir, but createrepo requires that
# NOTE: --groupfile should not be in $output_dir, but createrepo_c requires that
# --groupfile be relative to $output_dir. Thus, the relative path calculation.
cp --reflink=auto -t "${packages_dir}" "${assets_dir}/"*.rpm
if [ -n "${signing_key:-}" ]; then
Expand All @@ -95,23 +95,23 @@ if [ -n "${signing_key:-}" ]; then
fi
checksum_type_default=sha256
if test -f "${assets_dir}/comps.xml"; then
createrepo ${zchunk:-} --checksum "${checksum_type:-${checksum_type_default}}" \
createrepo_c ${zchunk:-} --checksum "${checksum_type:-${checksum_type_default}}" \
--groupfile "$(realpath --relative-to "${working_dir}" "${assets_dir}/comps.xml")" \
"${working_dir}"
else
createrepo ${zchunk:-} --checksum "${checksum_type:-${checksum_type_default}}" \
createrepo_c ${zchunk:-} --checksum "${checksum_type:-${checksum_type_default}}" \
"${working_dir}"
fi

if test -f "${assets_dir}/updateinfo.xml"; then
modifyrepo --mdtype updateinfo \
modifyrepo_c --mdtype updateinfo \
--checksum "${checksum_type:-${checksum_type_default}}" \
"${assets_dir}/updateinfo.xml" \
"${working_dir}/repodata/"
fi

if [[ "${productid}" && -f "${assets_dir}/productid" ]]; then
modifyrepo --mdtype productid --simple-md-filenames \
modifyrepo_c --mdtype productid --simple-md-filenames \
--checksum "${checksum_type:-${checksum_type_default}}" \
"${assets_dir}/productid" \
"${working_dir}/repodata/"
Expand Down
2 changes: 1 addition & 1 deletion rpm/gen-patched-fixtures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ patch "${assets_dir}/${destfile}" "${patchfile}"
./rpm/gen-fixtures.sh --checksum-type "${checksum_info}" "${output_dir}" "${assets_dir}"
if [[ $patchtype == "module" ]]
then
modifyrepo --mdtype modules "${assets_dir}/${destfile}" "${output_dir}/repodata"
modifyrepo_c --mdtype modules "${assets_dir}/${destfile}" "${output_dir}/repodata"
fi

0 comments on commit 9681bb5

Please sign in to comment.