From 7f9385f5f39e4251fcf9119627c9ca043c85ea31 Mon Sep 17 00:00:00 2001 From: Marek Marusic Date: Fri, 21 Oct 2016 10:16:49 +0200 Subject: [PATCH 1/4] Created dnf test using FTP protocol --- testcases/client-server/dnf-FTP/client | 11 ++++++++ testcases/client-server/dnf-FTP/deps | 4 +++ testcases/client-server/dnf-FTP/dummy.spec | 31 ++++++++++++++++++++++ testcases/client-server/dnf-FTP/server | 20 ++++++++++++++ 4 files changed, 66 insertions(+) create mode 100755 testcases/client-server/dnf-FTP/client create mode 100755 testcases/client-server/dnf-FTP/deps create mode 100644 testcases/client-server/dnf-FTP/dummy.spec create mode 100755 testcases/client-server/dnf-FTP/server diff --git a/testcases/client-server/dnf-FTP/client b/testcases/client-server/dnf-FTP/client new file mode 100755 index 0000000..8a1ba2a --- /dev/null +++ b/testcases/client-server/dnf-FTP/client @@ -0,0 +1,11 @@ +#!/bin/bash -e +mkdir -p /run/fedora-networking +cd /run/fedora-networking + +DESTINATION="${DESTINATION:-localhost}" + +TMPDIR=`mktemp -d` + +dnf install -y dummy-rpm --disablerepo=* --enablerepo=fedora-networking \ + --repofrompath fedora-networking,ftp://$DESTINATION/pub/fedora-networking \ + --installroot=/run/fedora-networking/$TMPDIR diff --git a/testcases/client-server/dnf-FTP/deps b/testcases/client-server/dnf-FTP/deps new file mode 100755 index 0000000..c9769f6 --- /dev/null +++ b/testcases/client-server/dnf-FTP/deps @@ -0,0 +1,4 @@ +yum +rpm-build +createrepo +vsftpd diff --git a/testcases/client-server/dnf-FTP/dummy.spec b/testcases/client-server/dnf-FTP/dummy.spec new file mode 100644 index 0000000..74800c5 --- /dev/null +++ b/testcases/client-server/dnf-FTP/dummy.spec @@ -0,0 +1,31 @@ +Summary: This is a dummy rpm-test +Name: dummy-rpm +Version: 1.0 +#Release: %(echo `date '+%%Y%%m%%d.%%H%%M%%S'`) +Release: 1 +Epoch: 0 +Group: Development/Interpreters +License: GPL+ +BuildArch: noarch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%prep + +%build + +%install + +#mkdir -p %buildroot +touch dummy-file + +%clean + +%files +%doc dummy-file + +%description + +This rpm contains a dummy file /usr/doc/%name-%version/file. +It means the whole rpm is also dummy. + diff --git a/testcases/client-server/dnf-FTP/server b/testcases/client-server/dnf-FTP/server new file mode 100755 index 0000000..77489d7 --- /dev/null +++ b/testcases/client-server/dnf-FTP/server @@ -0,0 +1,20 @@ +#!/bin/bash -e +mkdir -p /run/fedora-networking +/usr/bin/cp -u dummy.spec /run/fedora-networking/ +cd /run/fedora-networking + +rpmbuild -ba dummy.spec + +mkdir -p /var/ftp/pub/fedora-networking + +/usr/bin/cp -u \ + /root/rpmbuild/RPMS/noarch/dummy-rpm-1.0-1.noarch.rpm \ + /var/ftp/pub/fedora-networking + +cd /var/ftp/pub/ + +createrepo fedora-networking + +cd /run/fedora-networking + +exec `which vsftpd` From 59e57cb1c4e7c5159fde620f7a6e5b6cf2ebd377 Mon Sep 17 00:00:00 2001 From: Marek Marusic Date: Fri, 21 Oct 2016 10:19:13 +0200 Subject: [PATCH 2/4] moved dnf-FTP to dnf-ftp --- testcases/client-server/{dnf-FTP => dnf-ftp}/client | 0 testcases/client-server/{dnf-FTP => dnf-ftp}/deps | 0 testcases/client-server/{dnf-FTP => dnf-ftp}/dummy.spec | 0 testcases/client-server/{dnf-FTP => dnf-ftp}/server | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename testcases/client-server/{dnf-FTP => dnf-ftp}/client (100%) rename testcases/client-server/{dnf-FTP => dnf-ftp}/deps (100%) rename testcases/client-server/{dnf-FTP => dnf-ftp}/dummy.spec (100%) rename testcases/client-server/{dnf-FTP => dnf-ftp}/server (100%) diff --git a/testcases/client-server/dnf-FTP/client b/testcases/client-server/dnf-ftp/client similarity index 100% rename from testcases/client-server/dnf-FTP/client rename to testcases/client-server/dnf-ftp/client diff --git a/testcases/client-server/dnf-FTP/deps b/testcases/client-server/dnf-ftp/deps similarity index 100% rename from testcases/client-server/dnf-FTP/deps rename to testcases/client-server/dnf-ftp/deps diff --git a/testcases/client-server/dnf-FTP/dummy.spec b/testcases/client-server/dnf-ftp/dummy.spec similarity index 100% rename from testcases/client-server/dnf-FTP/dummy.spec rename to testcases/client-server/dnf-ftp/dummy.spec diff --git a/testcases/client-server/dnf-FTP/server b/testcases/client-server/dnf-ftp/server similarity index 100% rename from testcases/client-server/dnf-FTP/server rename to testcases/client-server/dnf-ftp/server From 557beb1b317d1f9dd456d3e195a21754d64e73cf Mon Sep 17 00:00:00 2001 From: Marek Marusic Date: Mon, 11 Sep 2017 11:59:33 +0200 Subject: [PATCH 3/4] fix issues --- testcases/client-server/dnf-ftp/dummy.spec | 3 --- testcases/client-server/dnf-ftp/server | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/testcases/client-server/dnf-ftp/dummy.spec b/testcases/client-server/dnf-ftp/dummy.spec index 74800c5..c71d6eb 100644 --- a/testcases/client-server/dnf-ftp/dummy.spec +++ b/testcases/client-server/dnf-ftp/dummy.spec @@ -6,9 +6,6 @@ Release: 1 Epoch: 0 Group: Development/Interpreters License: GPL+ -BuildArch: noarch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %prep diff --git a/testcases/client-server/dnf-ftp/server b/testcases/client-server/dnf-ftp/server index 77489d7..7e8c637 100755 --- a/testcases/client-server/dnf-ftp/server +++ b/testcases/client-server/dnf-ftp/server @@ -3,12 +3,12 @@ mkdir -p /run/fedora-networking /usr/bin/cp -u dummy.spec /run/fedora-networking/ cd /run/fedora-networking -rpmbuild -ba dummy.spec +rpmbuild --define "_topdir /var/run/fedora-networking" -ba dummy.spec mkdir -p /var/ftp/pub/fedora-networking /usr/bin/cp -u \ - /root/rpmbuild/RPMS/noarch/dummy-rpm-1.0-1.noarch.rpm \ + /var/run/fedora-networking/RPMS/noarch/dummy-rpm-1.0-1.noarch.rpm \ /var/ftp/pub/fedora-networking cd /var/ftp/pub/ From 0782f93273f47ee40cd0f0d08a51c38a3a2550a5 Mon Sep 17 00:00:00 2001 From: Marek Marusic Date: Thu, 1 Mar 2018 21:17:43 +0100 Subject: [PATCH 4/4] Undu deletion of the BuildArch. Undu deletion of the BuildArch. --- testcases/client-server/dnf-ftp/dummy.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/testcases/client-server/dnf-ftp/dummy.spec b/testcases/client-server/dnf-ftp/dummy.spec index c71d6eb..f4954e2 100644 --- a/testcases/client-server/dnf-ftp/dummy.spec +++ b/testcases/client-server/dnf-ftp/dummy.spec @@ -6,6 +6,7 @@ Release: 1 Epoch: 0 Group: Development/Interpreters License: GPL+ +BuildArch: noarch %prep