autorandr icon indicating copy to clipboard operation
autorandr copied to clipboard

Feature request: packaging support

Open nazar-pc opened this issue 9 years ago • 11 comments

I'm looking for something to replace gnome-settings-daemon's ~/.config/monitors.xml support functionality (it was moved to gnome-shell, but since I'm only using g-s-d, I need some replacement). This fork of autorandr seems pretty much what I need, however, I do not feel comfortable with installing software from sources globally.

So the feature request is to provide automated packaging, for instance, through openSUSE Build Service or at least add commands that produce packages to Makefile.

I'm primarily interested in deb package. As the side effect some sort of versioning is needed (hopefully, http://semver.org/).

nazar-pc avatar Sep 12 '16 00:09 nazar-pc

Both options sound good to me.

  • [x] We should resolve #45 (move the pm-utils script to a more neutral location - not all systems use pm-utils, but autorandr uses the script in various places) beforehand
  • [ ] This request would benefit from a solution to #17, the request for automated testing.

I can't tell when I'll find the time to resolve this issue yet, but I'll happily merge build scripts or link to your own OBS repository!

phillipberndt avatar Sep 12 '16 08:09 phillipberndt

Thanks for quick and positive response. Unfortunately I'm not familiar with packaging from developer prospective at all to contribute build scripts, but maybe someone else can help here.

nazar-pc avatar Sep 12 '16 09:09 nazar-pc

See the packaging-deb branch for an initial proposal based on my idea for solving #45. The make deb command currently produces a very simple deb file (provided you have dpkg-deb insalled) which wouldn't be eligible for inclusion into Debian (because it largely ignores their packaging standards). It suffices if all you want is for apt to manage the installed files though.

Note that the package currently places all files under the package manager's control, leaving you without any options for controlling udev/systemd/pm.d behaviour. This is something that could be improved. I'd suggest using a defaults file (i.e., a bash script in /etc/default/ that sets some environment variables) for that.

phillipberndt avatar Sep 19 '16 12:09 phillipberndt

I've tried it - works perfectly! Just installed, added 2 profiles and it handles monitors connects/disconnects right away.

Now the question is how to get it automatically packaged for some repository.

nazar-pc avatar Oct 01 '16 02:10 nazar-pc

Great. I've merged what we have so far, including your autostart script - thanks for providing that btw - into master. (I'm leaving this open to track the open build system integration.)

phillipberndt avatar Oct 02 '16 19:10 phillipberndt

openSUSE seems to require manual uploads, so I've started trying to get something working on launchpad. There is a project now: https://launchpad.net/autorandr I've added this repository there as source for importing code. Will read a bit later how to create recipe that will build packages daily as new commits appear in repository. If you have an account on launchpad - I'd like to add you to that project.

nazar-pc avatar Oct 29 '16 05:10 nazar-pc

In case you would like to add me: https://launchpad.net/~blueyed I did my fair share of ppa/packaging stuff, but use Arch Linux by now.

blueyed avatar Oct 29 '16 16:10 blueyed

Mine is https://launchpad.net/~phillip-berndt

For the record, automated updates are possible with the Suse build system. I'm using that to build pqiv packages. The _service file is the key, and you have to enable a webhook in the git repository. (All other files prefixed with _service are auto-generated by obs.)

What are your opinions on versioning autorandr? I like semver, too, but it feels kind of stupid to tag every commit with a patch release version, which is what we'd effectively end up doing.

phillipberndt avatar Oct 30 '16 09:10 phillipberndt

Added you to the team and transferred ownership of the team as well.

I typically see a pair of repositories: stable and unstable. Stable might be using only git tags and unstable might use latest git tag + date like 0.1.0~nightly20161030 (this is what some of packages I'm using look like).

If Suse indeed supports automated updates it might indeed be better to use it (I failed to find how to do that, will take a look now), since it supports more targets (distros) that launchpad, which I think is Ubuntu-only.

nazar-pc avatar Oct 30 '16 15:10 nazar-pc

I've tagged the current version as 1.0 and started playing with OBS:

https://build.opensuse.org/package/show/home:phillipberndt/autorandr

I've mainly copied the configuration I used for pqiv for now. I'll test this for Debian distributions; please give the RPM based ones a try and let me know if they work. I'll link to the OBS page from the readme once I have your feedback. If you'd like to add support for another operating system, you can easily branch the package in the obs and issue a pull request there. Or let me know if you'd like to have commit permissions within my home project. I'll also welcome other contributions, like extended description texts etc.

(Using the system isn't that complicated. There's likely a package for whatever distribution you're using, and here's a tutorial. Issuing a build is only a matter of pushing new data to your repository, and the syntax to the osc command is very similar to svn's.)

Here's a TODO for the OBS packages:

Lintian:

  • [ ] E: autorandr: no-copyright-file
  • [ ] W: autorandr: unknown-section miscellaneous
  • [ ] W: autorandr: binary-without-manpage usr/bin/autorandr

rpmlint:

  • [ ] autorandr.noarch: W: systemd-service-without-service_del_preun autorandr-resume.service The package contains a systemd service but doesn't contain a %preun with a call to service_del_preun.
  • [ ] autorandr.noarch: W: systemd-service-without-service_del_postun autorandr-resume.service The package contains a systemd service but doesn't contain a %postun with a call to service_del_postun.
  • [ ] autorandr.noarch: W: systemd-service-without-service_add_pre autorandr-resume.service The package contains a systemd service but doesn't contain a %pre with a call to service_add_pre.
  • [ ] autorandr.noarch: W: systemd-service-without-service_add_post autorandr-resume.service The package contains a systemd service but doesn't contain a %post with a call to service_add_post.
  • [ ] autorandr.noarch: W: suse-missing-rclink autorandr-resume The package contains an init script or systemd service file but lacks the symlink /usr/sbin/rcFOO -> /usr/sbin/service
  • [ ] autorandr.noarch: W: no-manual-page-for-binary autorandr Each executable in standard binary directories should have a man page.

phillipberndt avatar Dec 07 '16 12:12 phillipberndt

I'm not familiar with RPM-based distros, always using Ubuntu/Debian locally and on servers

nazar-pc avatar Dec 07 '16 13:12 nazar-pc