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

Packaging for RPM #52

Closed
tim77 opened this issue Aug 31, 2019 · 49 comments
Closed

Packaging for RPM #52

tim77 opened this issue Aug 31, 2019 · 49 comments

Comments

@tim77
Copy link
Contributor

tim77 commented Aug 31, 2019

Some rpmlint errors:

E: zero-length /etc/nohang/version

This empty file really necessary or it could be deleted safely?

@hakavlad
Copy link
Owner

It's not empty if installed via git clone && make.

@tim77
Copy link
Contributor Author

tim77 commented Aug 31, 2019

Maybe because i build from latest git snapshot, not release?

@hakavlad
Copy link
Owner

No. It does not matter.

	install -d $(DESTDIR)$(CONFDIR)/nohang
	-git describe --tags --long --dirty > version
        -install -m0644 version $(DESTDIR)$(CONFDIR)/nohang/version

https://github.com/hakavlad/nohang/blob/master/Makefile

Maybe I should remake Makefile. But I don't know how.

@hakavlad
Copy link
Owner

Maybe because i build from latest git snapshot, not release?

v0.1 doesn't have version file, but v0.2 will have it.

@hakavlad
Copy link
Owner

Thank you for the packages.

@hakavlad
Copy link
Owner

There is no such problem with AUR https://aur.archlinux.org/packages/nohang-git/ package, version is not empty and --version works well.

@tim77
Copy link
Contributor Author

tim77 commented Sep 1, 2019

I found what cause this:

git describe --tags --long --dirty > version
fatal: not a git repository (or any of the parent directories): .git

This because i downloaded sources via git API, not git clone. Cloning repo and any internet access during build process not allowed in Fedora. But we can easily fix this and add this ver info in spec file during build RPM.

@hakavlad
Copy link
Owner

hakavlad commented Sep 1, 2019

Thank you. By the way, version on you package shows v0.1-4c1b5ee instead of v0.1-435-4c1b5ee.

@hakavlad
Copy link
Owner

hakavlad commented Sep 1, 2019

BuildRequires:  systemd
%else
BuildRequires:  systemd-rpm-macros
%endif
Requires:       logrotate%{?_isa}
%if 0%{?fedora} || 0%{?rhel} >= 8
Recommends:     libnotify%%{?_isa}
%endif
%{?systemd_requires}

logrotate and libnotify are optdepends and not required by default. Systemd gives best expirience, but it is not depend/recommend.

@tim77
Copy link
Contributor Author

tim77 commented Sep 1, 2019

Thank you. By the way, version on you package shows v0.1-4c1b5ee instead of v0.1-435-4c1b5ee.

Usually this enough. But if this critical go discuss this there and ask other maintainers how to do this better.

@tim77
Copy link
Contributor Author

tim77 commented Sep 1, 2019

logrotate and libnotify are optdepends and not required by default. Systemd gives best expirience, but it is not depend/recommend.

OK we can made logrotate as optional dependency too and own this dirs by nohang as well i think.

@hakavlad
Copy link
Owner

hakavlad commented Sep 8, 2019

@tim77 psi-monitor has been improved, see https://imgur.com/a/ENYTBYd

Please upgrade pkg

@tim77
Copy link
Contributor Author

tim77 commented Sep 8, 2019

Done. BTW i am still waiting for someone to review my package and then i can push it in main repos...

@hakavlad
Copy link
Owner

@tim77 I'd like to see the next packages:

  • nohang (only release versions, stable)
  • nohang-devel (unstable, maybe with autobuild)
  • nohang-desktop with config optimized for desktop, release versions

Is it possible?

@tim77
Copy link
Contributor Author

tim77 commented Sep 10, 2019

I think this could be done easily: IMO best way to do this if you did two separate build in makefile (nohang and nohang-desktop) and this both version i split as sub packages in rpm spec file. And push this both version to main Fedora repos.

And we can automatize build process in COPR for nohang-devel

@hakavlad
Copy link
Owner

8dacba0 done

@hakavlad
Copy link
Owner

@tim77 Please make a rebuild.

@tim77
Copy link
Contributor Author

tim77 commented Sep 10, 2019

Temp version here. We need to make things better there and automatize desktop case... :) WIP.

@hakavlad
Copy link
Owner

hakavlad commented Sep 12, 2019

how can I install nohang-desktop?

@tim77
Copy link
Contributor Author

tim77 commented Sep 12, 2019

sudo dnf install nohang-desktop -y

But you need manually replace or run nohang with desktop config file included into nohang-desktop package. We need to automatize this but better if we do this without %post scripts.

@hakavlad
Copy link
Owner

But you need manually replace

How to get it out of the box?

We need to automatize this but better if we do this without %post scripts.

How can we do this?

better if we do this without %post scripts

Why?

@hakavlad
Copy link
Owner

@tim77 Can I help you?

@tim77
Copy link
Contributor Author

tim77 commented Sep 12, 2019

Yes, IMO together we can do better. :) Check again this post and go discuss this there where other maintainers can help us too.

@hakavlad
Copy link
Owner

@tim77 Please make a rebuild. The demon received an important update related to the acceleration of GUI notifications 05ae755

@hakavlad hakavlad changed the title E: zero-length /etc/nohang/version Packaging for RPM Sep 19, 2019
@hakavlad
Copy link
Owner

hakavlad commented Sep 19, 2019

@tim77 GUI notifications is broken, please make a rebuild.

Also nohang-desktop doesn't work (it uses non-desktop config).

@hakavlad
Copy link
Owner

@tim77 What about CentOS 8?

@tim77
Copy link
Contributor Author

tim77 commented Sep 21, 2019

Also nohang-desktop doesn't work (it uses non-desktop config).

Yes, that was i what i talked about earlier. Easy to fix this via %post install scrips but we lose another useful feature by doing this - %config(noreplace). Definitely help wanted there, how to handle this better...

For now user need to manually replace config file with desktop config.

@hakavlad
Copy link
Owner

What about changing %install?

@hakavlad
Copy link
Owner

Recommends: %{name}-desktop

Why?

@tim77
Copy link
Contributor Author

tim77 commented Sep 21, 2019

What about changing %install?

Then we lost regular non-desktop version. Need to made to separate packages then.

Recommends: %{name}-desktop

Why?

Why what? It is optional weak dependency.

@hakavlad
Copy link
Owner

Why it is in Recommends? Why nohang depends on nohang-desktop?

@hakavlad
Copy link
Owner

What about 2 independant packages?

@tim77
Copy link
Contributor Author

tim77 commented Sep 21, 2019

What about 2 independant packages?

Need to open new review-request, waiting, waiting, waiting...

Why it is in Recommends? Why nohang depends on nohang-desktop?

  1. One more time - it not depends, it recommends it and could be skip easily if user wants.
  2. It helps user with such questions.

For Fedora and RHEL8 possible to supplement already installed packages so maybe good idea to improve this case when DE or Xorg installed on target system.

Maybe better to made two systemd units for desktop and non desktop? :) Just asking.

@tim77
Copy link
Contributor Author

tim77 commented Sep 21, 2019

@tim77 What about CentOS 8?

Packaged.

@hakavlad
Copy link
Owner

@tim77 Could you make a rebuild, please?

@tim77
Copy link
Contributor Author

tim77 commented Sep 23, 2019

Yep. I seen yesterday this #56 Not critical? It would be nice if you released new, tagged version which already tested.

@hakavlad
Copy link
Owner

#56 Seems like it is an old output bug, not critical

@hakavlad
Copy link
Owner

you released new, tagged version

OK, I want to tag, but

TODO: write a docs and else some fixes

@tim77
Copy link
Contributor Author

tim77 commented Sep 23, 2019

No rush then. :) Works for me and much more predictable compared to earlyoom.

@hakavlad
Copy link
Owner

much more predictable compared to earlyoom

Please write your review here https://pagure.io/fedora-workstation/issue/98

@KAMiKAZOW
Copy link
Contributor

v0.2 will have it.

Is there an ETA for that, btw? I want to get nohang into official openSUSE repositories and @tim77 does such great work on snapshot builds, I obviously want to base my work in his.

Packaging 0.1 seems antiquated after only a few months and using git snaphots is discouraged by openSUSE maintainers.

@tim77
Copy link
Contributor Author

tim77 commented Dec 10, 2019

Using git snaphots is discouraged by Fedora as well. So agree with @KAMiKAZOW nohang should switch to releases/tags.

@hakavlad
Copy link
Owner

hakavlad commented Dec 10, 2019

Packaging 0.1 seems antiquated after only a few months

BTW nohang 0.1 released more than year ago.

For release 0.2, I want to solve some problems and write documentation. Right now, on my localhost, the daemon is undergoing significant changes.

I want to close these issues to release:

@hakavlad
Copy link
Owner

Maybe I should close only #22 and release.

@hakavlad
Copy link
Owner

hakavlad commented Jan 1, 2020

Is there an ETA for that, btw?

I hope to make a release this month.

@hakavlad
Copy link
Owner

I hope to make a release this year.

@hakavlad
Copy link
Owner

hakavlad commented May 9, 2020

@KAMiKAZOW How to install nohang on openSUSE and on SLE? Could you make a PR to fix README.md, please?

@KAMiKAZOW
Copy link
Contributor

It would be easier if you made a proper release, then I could submit it to the distribution itself.

@hakavlad
Copy link
Owner

@KAMiKAZOW Congratulations! https://github.com/hakavlad/nohang/releases/tag/v0.2.0

Also maybe you want to package new tools (prelockd, memavaild, uresourced), see https://github.com/hakavlad/nohang#solution

@hakavlad hakavlad closed this as completed May 3, 2021
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

3 participants