diff --git a/testcases/client-server/rpm-ftp/client b/testcases/client-server/rpm-ftp/client new file mode 100755 index 0000000..a9acfb6 --- /dev/null +++ b/testcases/client-server/rpm-ftp/client @@ -0,0 +1,9 @@ +#!/bin/bash -e +mkdir -p /run/fedora-networking +cd /run/fedora-networking + +DESTINATION="${DESTINATION:-localhost}" + +TMPDIR=`mktemp -d` + +rpm --root=$TMPDIR -ivh ftp://$DESTINATION/pub/fedora-networking/dummy-rpm-1.0-1.noarch.rpm diff --git a/testcases/client-server/rpm-ftp/deps b/testcases/client-server/rpm-ftp/deps new file mode 100755 index 0000000..3729fac --- /dev/null +++ b/testcases/client-server/rpm-ftp/deps @@ -0,0 +1,4 @@ +rpm +rpm-build +createrepo +vsftpd diff --git a/testcases/client-server/rpm-ftp/dummy.spec b/testcases/client-server/rpm-ftp/dummy.spec new file mode 100644 index 0000000..74800c5 --- /dev/null +++ b/testcases/client-server/rpm-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/rpm-ftp/server b/testcases/client-server/rpm-ftp/server new file mode 100755 index 0000000..77489d7 --- /dev/null +++ b/testcases/client-server/rpm-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`