Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.git repo not present in the BUILD/ dir after running %prep #92

Open
dhodovsk opened this issue Sep 29, 2020 · 1 comment
Open

.git repo not present in the BUILD/ dir after running %prep #92

dhodovsk opened this issue Sep 29, 2020 · 1 comment

Comments

@dhodovsk
Copy link
Contributor

dhodovsk commented Sep 29, 2020

This occurred again, seen on packages (c8):

  • perl-Dist-CheckConflicts, perl-ExtUtils-Config, perl-Package-Generator, perl-Package-Stash, perl-Package-Stash-XS, perl-Sub-Exporter-Progressive, python-botocore, tinyxml2, ghc-extra, libpinyin, latex2html, ldns , metis, mingw-gsm, mingw-nspr, nss-util, openldap, python-suds, rhel-system-roles, unbound, brltty, xorg-x11-font-utils, xorg-x11-fonts, fuse, gtk-vnc, openblas, ibus-libpinyin, ibus-libzhuyin
@TomasTomecek
Copy link
Member

the problem here is these packages change directories (#58) and the build will never pass with the current d2s & packit

we can tinker d2s so that source-git repos will get created though (but build won't pass b/c packit won't be able to recreate patches correctly)

let's look at openblas:

%prep
%setup -q -c -T

# Untar source
tar zxf %{SOURCE0}
cd OpenBLAS-%{version}
%if %{with system_lapack}
%patch0 -p1 -b .system_lapack
%endif
%patch1 -p1 -b .libname
%if 0%{?rhel} == 5
%patch2 -p1 -b .constructor
%endif
%patch3 -p1 -b .tests
...

the way we hijack rpm macros right now is that we override %patch and %autosetup, so with the first %patch invocation, the git repo is created (in %patch0)

but as you can see, we changed directory which is confusing d2s

and this is also the problem for recreating patches: packit creates them from the root of the source-git repo while they are being applied here in a subdirectory - we'd need to store that information that leading dirs should be stripped

TomasTomecek added a commit to TomasTomecek/dist-git-to-source-git that referenced this issue Sep 29, 2020
Sometimes packages have multiple sources (= archives) which they unpack
during %prep in different ways. This can be done with `%setup -aN -aM`.
Sadly `%autosetup -aN -aM` does not work: https://bugzilla.redhat.com/show_bug.cgi?id=1881840

So we need to turn back into overwriting %setup unless we detect this
use case.

But the eternal problem with patches applied in a subdir persists.

Fixes some of packit#92

Signed-off-by: Tomas Tomecek <[email protected]>
TomasTomecek added a commit to TomasTomecek/dist-git-to-source-git that referenced this issue Sep 29, 2020
Sometimes packages have multiple sources (= archives) which they unpack
during %prep in different ways. This can be done with `%setup -aN -aM`.
Sadly `%autosetup -aN -aM` does not work: https://bugzilla.redhat.com/show_bug.cgi?id=1881840

So we need to turn back into overwriting %setup unless we detect this
use case.

But the eternal problem with patches applied in a subdir persists.

Fixes some of packit#92

Signed-off-by: Tomas Tomecek <[email protected]>
TomasTomecek added a commit to TomasTomecek/dist-git-to-source-git that referenced this issue Oct 1, 2020
Sometimes packages have multiple sources (= archives) which they unpack
during %prep in different ways. This can be done with `%setup -aN -aM`.
Sadly `%autosetup -aN -aM` does not work: https://bugzilla.redhat.com/show_bug.cgi?id=1881840

So we need to turn back into overwriting %setup unless we detect this
use case.

But the eternal problem with patches applied in a subdir persists.

Fixes some of packit#92

Signed-off-by: Tomas Tomecek <[email protected]>
TomasTomecek added a commit to TomasTomecek/dist-git-to-source-git that referenced this issue Oct 8, 2020
Sometimes packages have multiple sources (= archives) which they unpack
during %prep in different ways. This can be done with `%setup -aN -aM`.
Sadly `%autosetup -aN -aM` does not work: https://bugzilla.redhat.com/show_bug.cgi?id=1881840

So we need to turn back into overwriting %setup unless we detect this
use case.

But the eternal problem with patches applied in a subdir persists.

Fixes some of packit#92

Signed-off-by: Tomas Tomecek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants