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

Fix srpm create path problems #652

Conversation

@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Jan 8, 2020

  • Fix the macros during rpmbuild command.
  • Save the by-default-created archive in the spec-dir.
  • Strip the output from the get-current-version action.
  • Allow setting cwd in command handlers.
  • Refactor and simplify the archive-related methods.

  • Fixes problem occurring here: olysonek/vsftpd#2 ✔️ (tested)
  • Not sure, if we can use some rpmbuild macro instead. ✔️

TODO:

  • will add the vsftpd to tests
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
]
logger.debug(
"SRPM build command: " + " ".join([f'"{cmd_part}"' for cmd_part in cmd])
)

This comment has been minimized.

Copy link
@lachmanfrantisek

lachmanfrantisek Jan 8, 2020

Author Member

To have some copy-paste friendly output.

@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 8, 2020

Build failed.

@packit-as-a-service

This comment has been minimized.

Copy link

packit-as-a-service bot commented Jan 8, 2020

Congratulations! The build has finished successfully. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/packit-service-packit-652
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@TomasTomecek

This comment has been minimized.

Copy link
Contributor

TomasTomecek commented Jan 8, 2020

I thought the _srcdir is for that :/

@TomasTomecek

This comment has been minimized.

Copy link
Contributor

TomasTomecek commented Jan 8, 2020

-13: _sourcedir %{_topdir}/SOURCES                                                                                                                                           
-13: _specdir   %{_topdir}/SPECS                                                                                                                                             
-13: _srcrpmdir %{_topdir}/SRPMS               

But given the error message, it seems we set _sourcedir to ., so maybe we just need to set it to the path where spec file is?

@lachmanfrantisek

This comment has been minimized.

Copy link
Member Author

lachmanfrantisek commented Jan 8, 2020

I thought the _srcdir is for that :/

Thanks.

But given the error message, it seems we set _sourcedir to ., so maybe we just need to set it to the path where spec file is?

Yes, there are some absolute/relative path problems. I've finally make it work.


Since the cwd is not needed in the CommandHandler shall I remove it?

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 8, 2020

Build failed.

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 8, 2020

Build failed.

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 8, 2020

Build failed.

@packit-as-a-service

This comment has been minimized.

Copy link

packit-as-a-service bot commented Jan 8, 2020

There was an error while running a copr build:

Request is not in JSON format, there is probably a bug in the API code.

You can re-trigger copr build by adding a comment (/packit copr-build) into this pull request.

@lachmanfrantisek

This comment has been minimized.

Copy link
Member Author

lachmanfrantisek commented Jan 8, 2020

\packit build

@lachmanfrantisek

This comment has been minimized.

Copy link
Member Author

lachmanfrantisek commented Jan 8, 2020

/packit build

@packit-as-a-service

This comment has been minimized.

Copy link

packit-as-a-service bot commented Jan 8, 2020

Congratulations! The build has finished successfully. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/packit-service-packit-652
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 8, 2020

Build succeeded.

@lachmanfrantisek lachmanfrantisek force-pushed the lachmanfrantisek:fix-srpm-create-dir branch from 2ebb538 to a52e845 Jan 8, 2020
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 8, 2020

Build failed.

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
@lachmanfrantisek lachmanfrantisek force-pushed the lachmanfrantisek:fix-srpm-create-dir branch from a52e845 to 0c2bcd4 Jan 8, 2020
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 8, 2020

Build succeeded.

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 9, 2020

Build succeeded.

@lachmanfrantisek lachmanfrantisek changed the title WIP: Fix srpm create dir Fix srpm create dir Jan 9, 2020
@lachmanfrantisek lachmanfrantisek changed the title Fix srpm create dir Fix srpm create path problems Jan 9, 2020
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

softwarefactory-project-zuul bot commented Jan 9, 2020

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 0345a7e into packit-service:master Jan 9, 2020
10 of 11 checks passed
10 of 11 checks passed
packit/rpm-build-fedora-30-x86_64 RPM build has started...
Details
LGTM analysis: Python No new or fixed alerts
Details
ci/dockercloud Your tests passed in Docker Cloud
Details
local/check check status: success
Details
local/gate gate status: success
Details
packit/rpm-build-fedora-31-x86_64 RPMs were built successfully.
Details
packit/rpm-build-fedora-rawhide-x86_64 RPMs were built successfully.
Details
packit/srpm-build SRPM was built successfully.
Details
packit/testing-farm-fedora-30-x86_64 All tests passed
Details
packit/testing-farm-fedora-31-x86_64 All tests passed
Details
packit/testing-farm-fedora-rawhide-x86_64 All tests passed
Details
@lachmanfrantisek lachmanfrantisek deleted the lachmanfrantisek:fix-srpm-create-dir branch Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.