#700 *pkg import: check specfile matches the repo name
Merged by onosek. Opened by onosek.
onosek/rpkg check_specfile  into  master

Download 700.patch

Specfile in SRPM is check whether has the same name as the dist-git
repository name. It should prevent having multiple similar
repositories accidentally created.
This behavior can be ommited by adding argument after import
command: '--do-not-check-specfile-name'.

JIRA: RHELCMP-12669
Fixes: https://pagure.io/fedpkg/issue/529
Relates: https://pagure.io/releng/issue/7523

Signed-off-by: Ondřej Nosek onosek@redhat.com

I assume this will end execution of fedpkg, therefore it should rather be "Error" IMHO.

rebased onto 13623dbfc85ad5200db677dec70095d7d72e76c1

  • OK, changed to Error.
  • During testing, I realized, that the specfile check was performed after extracting files from SRPM. I moved it before the extract operation.
  • Added some minor changes like clarifying error messages.

Pull-Request has been merged by onosek

The check looks reasonable to me but you forgot to strip the namespace from self.repo_name and therefore this check fails when trying to import packages to Copr DistGit.

Please see https://github.com/fedora-copr/copr/issues/3365

Temporarily I am disabling the check in our code but I think it would be nice to eventually have it.
https://github.com/fedora-copr/copr/issues/3365

Can you please add support for namespaced repositories here? :-)

Should I create a new rpkg issue for this?

Metadata