Commit c601011e authored by Dennis Klein's avatar Dennis Klein
Browse files

Save first working revision

parent 4d0c58e3
#!/bin/bash
tree=${HOME}/rpmbuild
rpmdev-setuptree
rpmdev-wipetree
mock=fedora-32-x86_64
function build_srpm() {
pkg=$1
name=$(rpmspec -q --srpm --qf "%{name}" packages/${pkg}/*.spec)
version=$(rpmspec -q --srpm --qf "%{version}" packages/${pkg}/*.spec)
tarball=$(rpmspec -q --srpm --qf "%{source}" packages/${pkg}/*.spec)
url=$(rpmspec -q --srpm --qf "%{url}" packages/${pkg}/*.spec)
tmpdir=$(mktemp -d)
pushd ${tmpdir}
git clone -b v${version} --depth 1 ${url} ${name}-${version}
tar cvzf ${tarball} ${name}-${version}
mv ${tarball} ${tree}/SOURCES
popd
rm -rf ${tmpdir}
cp packages/${pkg}/${pkg}.spec ${tree}/SPECS
mock -r ${mock} --macro-file=macros --buildsrpm --spec ${tree}/SPECS/${pkg}.spec --sources ${tree}/SOURCES
mv /var/lib/mock/${mock}/result/${name}*.src.rpm ${tree}/SRPMS
}
function build_rpms() {
pkg=$1
name=$(rpmspec -q --srpm --qf "%{name}" packages/${pkg}/*.spec)
arch=$(rpmspec -q --srpm --qf "%{arch}" packages/${pkg}/*.spec)
mock -r ${mock} --macro-file=macros --rebuild ${tree}/SRPMS/${name}*.src.rpm
mv /var/lib/mock/${mock}/result/*${arch}.rpm ${tree}/RPMS
}
function build() {
pkg=$1
tree -h ${tree}
build_srpm fairlogger
build_rpms fairlogger
mock -r ${mock} --macro-file=macros --clean
}
build fairlogger
tree -h ${tree}
#!/bin/bash
rpmspec -q --load=macros --qf "%-30{NAME}%{version}\n" packages/*/*.spec
rpmspec --srpm -q --load=macros --qf "%-30{NAME}%{version}\n" packages/*/*.spec
echo
tree -h ${HOME}/rpmbuild
%__scm_setup_git2\
%{__git} clone -b "v%{version}" %{url} .
%{__git} clone -b "v%{version}" --depth 1 %{url} .\
%{__git} describe
Subproject commit 8acc71bb3616e85f4328bdd1e7c9ed5293e26f33
Subproject commit 0d88495e471adb274b4b217e09ad1634ddde4ed6
#!/bin/bash
tree=${HOME}/rpmbuild
tree -h ${tree}
rpm --resign ${tree}/RPMS/*.rpm
pushd ${tree}/RPMS
createrepo --update .
gpg --batch --yes --detach-sign --armor repodata/repomd.xml
gpg --armor --export d.klein@gsi.de > repo.key
popd
tree -h ${tree}
echo
du -hs ${tree}/RPMS
#!/bin/bash
dnf install gcc rpm-build rpm-devel rpm-sign rpmlint make python bash coreutils diffutils patch rpmdevtools mock
#!/bin/bash
mock -r fedora-32-x86_64 --update
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment