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

Migrate DEB packages to antimicrox #87

Closed
2 tasks done
gombosg opened this issue Nov 15, 2020 · 30 comments
Closed
2 tasks done

Migrate DEB packages to antimicrox #87

gombosg opened this issue Nov 15, 2020 · 30 comments
Assignees
Labels
packaging Every issue linked with providing and fixing packages for different distributions and systems

Comments

@gombosg
Copy link
Collaborator

gombosg commented Nov 15, 2020

The DEB package was packaged last year. If possible, migrate users to antimicrox as that is the maintained version.

Goal:

@gombosg gombosg self-assigned this Nov 15, 2020
@gombosg gombosg added the packaging Every issue linked with providing and fixing packages for different distributions and systems label Nov 15, 2020
@gombosg
Copy link
Collaborator Author

gombosg commented Nov 15, 2020

I'm happy to start the conversation, @pktiuk do you have any specific inputs/suggestions before I contact the maintainer?

@pktiuk
Copy link
Member

pktiuk commented Nov 15, 2020

Just tell ask him whether does he use github.
If yes, he could answer us here.

@gombosg
Copy link
Collaborator Author

gombosg commented Nov 30, 2020

We had an email conversation. The Debian packager will package antimicrox for Debian, replacing antimicro. For this we need config migration ASAP since Debian stable freeze is in about a month.

I'll look into config migration this week, if the formats themselves are compatible it shouldn't be an issue.

@mirabilos
Copy link
Contributor

mirabilos commented Nov 30, 2020

I’ve begun packaging 3.1.3 and have a few comments already:

  • list(APPEND CMAKE_PREFIX_PATH "/usr/lib/arm-linux-gnueabihf") is a complete no-go; the packager/builder should be expected to set this correctly. Doing that in the CMakeLists file will cause build errors if building for some platform while having the armhf variants installed.

  • please add an option to not build a shared library (i.e. link the executable with the static library and not install the library); otherwise, I’d have to split the package and you’d have to commit to a stable ABI, which I’m sure you don’t want

  • hardcoding LD_LIBRARY_PATH in the binary is, similarily, a no-go, but I assume that would be a nōn-issue if the shared library is disabled

  • there’s a CHANGELOG.md and a HISTORY.md, can you decide on one of them? They both seem to be changelog-like files, not short NEWS-like ones.

  • files have the Unix executable attribute that shouldn’t (such as LGPL licence files, source/UI files, …); has someone committed from Windows there? ;-)

  • some even have a Byte-Order Mark that shan’t be there

  • the xbox fakeclasses and all tests/ files don’t have explicit copyright headers (not a problem, just an inconsistency)

I’ll probably find more and report.

@mirabilos
Copy link
Contributor

mirabilos commented Nov 30, 2020

Reported as: mitei/qglobalshortcut#1

@AriaMoradi
Copy link
Contributor

Reported as: mitei/qglobalshortcut#1

The original dev doesn't have any activity record for the past 5 years, hope they are actually around.

@gombosg gombosg mentioned this issue Dec 1, 2020
2 tasks
@gombosg
Copy link
Collaborator Author

gombosg commented Dec 1, 2020

Thanks @mirabilos!

I created issues and a project to track progress: https://github.com/AntiMicroX/antimicrox/projects/1

@AntiMicroX/members feel free to take issues.
@AriaMoradi #99 becomes high priority. We have to fix the pipeline somehow.

@pktiuk
Copy link
Member

pktiuk commented Dec 4, 2020

@mirabilos
Do I correctly assume we should also deal with all the problems reported by lintian for our package?
Current status

E: antimicrox: no-copyright-file
W: antimicrox: desktop-mime-but-no-exec-code usr/share/applications/io.github.antimicrox.antimicrox.desktop
W: antimicrox: extended-description-line-too-long
W: antimicrox: non-standard-dir-perm usr/ 0775 != 0755
W: antimicrox: non-standard-dir-perm usr/bin/ 0775 != 0755
W: antimicrox: non-standard-dir-perm usr/include/ 0775 != 0755
W: antimicrox: non-standard-dir-perm ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: antimicrox: syntax-error-in-debian-changelog line 10 "badly formatted heading line"
W: antimicrox: syntax-error-in-debian-changelog line 102 "badly formatted heading line"
W: antimicrox: syntax-error-in-debian-changelog line 108 "badly formatted heading line"
W: antimicrox: syntax-error-in-debian-changelog ... use --no-tag-display-limit to see all (or pipe to a file/program)
W: antimicrox: wrong-name-for-changelog-of-native-package usr/share/doc/antimicrox/changelog.Debian.gz

(but there is already PR with some fixes for this #117)

@mirabilos
Copy link
Contributor

mirabilos commented Dec 4, 2020 via email

@gombosg
Copy link
Collaborator Author

gombosg commented Dec 6, 2020

@mirabilos I think we have fixed the issues you mentioned.
You can check the items at https://github.com/AntiMicroX/antimicrox/projects/1.

Please do a test build on master f27aa8d if possible, and if you find it acceptable we'll make a release for the final package.

@pktiuk
Copy link
Member

pktiuk commented Dec 27, 2020

@mirabilos
Do you have any status updates for us?
We are thinking about pushing a new release soon, is it okay with your packaging efforts?

@mirabilos
Copy link
Contributor

mirabilos commented Dec 27, 2020 via email

@mirabilos
Copy link
Contributor

mirabilos commented Feb 1, 2021

CHANGELOG.md is installed during build:

-- Installing: /tmp/buildd/antimicro-3.1.4/debian/antimicro/usr/share/doc/antimicrox/CHANGELOG.md
-- Installing: /tmp/buildd/antimicro-3.1.4/debian/antimicro/usr/share/antimicrox/CHANGELOG.md

Twice is bad, once would be better, but since I install it in the correct Debian location using Debian mechanisms anyway it doesn’t need to be installed at all (not for Debian anyway), but I can just delete the file after make install.

Given that src/aboutdialog.cpp loads it from an embedded resource, I see no reason for cmake/make to install that file at all.

@mirabilos
Copy link
Contributor

The headers are also still installed; probably a remnant of the now-removed library. Since no library is installed, nothing can really make use of these headers, so they need not be installed.

@mirabilos
Copy link
Contributor

Compiling goes well; there’s one file with warnings:

[ 98%] Building CXX object CMakeFiles/antimicrox.dir/src/eventhandlers/uinputeventhandler.cpp.o
/usr/bin/c++ -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DWITH_UINPUT -DWITH_X11 -DWITH_XTEST -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu -I/tmp/buildd/antimicro-3.1.4 -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu/src -I/tmp/buildd/antimicro-3.1.4/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -g -O2 -ffile-prefix-map=/tmp/buildd/antimicro-3.1.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-deprecated-declarations -Wno-deprecated-copy -Wdate-time -D_FORTIFY_SOURCE=2 -DANTIMICROX_PKG_VERSION=\"'3.1.4-1 (Debian sid/amd64)'\" -std=c++11 -fPIE -fPIC -o CMakeFiles/antimicrox.dir/src/eventhandlers/uinputeventhandler.cpp.o -c /tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp: In member function ‘void UInputEventHandler::createUInputKeyboardDevice(int)’:
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp:398:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  398 |     write(filehandle, &uidev, sizeof(uidev));
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp: In member function ‘void UInputEventHandler::createUInputMouseDevice(int)’:
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp:414:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  414 |     write(filehandle, &uidev, sizeof(uidev));
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp: In member function ‘void UInputEventHandler::createUInputSpringMouseDevice(int)’:
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp:438:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  438 |     write(filehandle, &uidev, sizeof(uidev));
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp: In member function ‘void UInputEventHandler::write_uinput_event(int, int, int, int, bool)’:
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp:459:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  459 |     write(filehandle, &ev, sizeof(struct input_event));
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp:469:14: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  469 |         write(filehandle, &ev2, sizeof(struct input_event));
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

While these are very minor, you might want to fix them (e.g. by signalling an error if the write fails, or (if errno == EINTR or only a partial block was written) even repeating it.

@mirabilos
Copy link
Contributor

I’ve pushed a couple more issues (other than these I’ve mentioned here already) in #139, #140, #141, #142 and #143.

@mirabilos
Copy link
Contributor

I’ve uploaded a package antimicro (= 3.1.4-1) containing AntiMicroX to Debian unstable; it should arrive there and be built for all architectures shortly.

As I do not have any usable joystick, PLEASE TEST THIS because I cannot do it beyond starting and testing some dialogues.

This WILL migrate to Debian testing, soon to be released as bullseye (11), in ten days, so please test before so, if anything should go wrong, we can block and fix it.

Once migrated, I can look at backporting the new version to Debian buster (10, current stable, soon to be oldstable). With this I can then also upload it to my PPA for *buntu bionic (18.04 LTS) and focal (20.04 LTS); other versions on request but nōn-LTS versions are best-effort and can only be used for a few months after release. The package should enter the normal *buntu distribution (hirsute, 21.04) a short time after it enters Debian and therefore will also be available there.

In case anyone wants to look at my packaging repository, feel free to.

I’d like to thank my employer ⮡ tarent @tarent for sponsoring work on packaging antimicro (a coworker explicitly requested it for a project) for Debian.

@pktiuk
Copy link
Member

pktiuk commented Feb 1, 2021

I have merged your changes, everything works properly with them applied.

@mirabilos
Copy link
Contributor

Great, thanks.

Can you (or one of the devs anyway) please test the package as built in Debian, so we know that one’s also good?

@pktiuk
Copy link
Member

pktiuk commented Feb 1, 2021

I built it on fresh Debian 10 VM, but I was not able to run it.
For deb package built using cmake I get (this is the same problem I had in case of build for Raspberry Pi #121):

apt-get install ./antimicrox-3.1.4-x86_64.deb 
Reading package lists... Error!
E: Encountered a section with no Package: header

But in case of running bare binary it works properly.

@mirabilos
Copy link
Contributor

No, you really must test the binaries as built by Debian; they most likely require Debian unstable, or at least Debian testing (11).

You also did not build the Debian package. The Debian package is called antimicro, not antimicrox.

wget https://deb.debian.org/debian/pool/main/a/antimicro/antimicro_3.1.4-1_amd64.deb
apt-get install "$PWD/antimicro_3.1.4-1_amd64.deb"

… is a quick-and-dirty way to do that.

@pktiuk
Copy link
Member

pktiuk commented Feb 1, 2021

Everything works well with this package.

@mirabilos
Copy link
Contributor

OK, good to know, thanks! Then I’ll let it migrate to bullseye, buster-backports, *buntu PPA, …

@pktiuk
Copy link
Member

pktiuk commented Feb 1, 2021

Thanks for your help with this packaging :D

@gombosg
Copy link
Collaborator Author

gombosg commented Feb 3, 2021

Thanks for the incredible work you've done here @mirabilos ! :))

@mirabilos
Copy link
Contributor

Backports and PPAs are filled with packages ☺ so I consider this finished from my side. A user reported in #89 that the backported package works well on his Raspberry, too.

Take-aways for you are still:

  • the things I already opened separate issues for
  • CHANGELOG.md is installed during build, twice even, but it isn’t needed even once as it’s embedded
  • the headers are installed but they are now useless
  • some compiler warnings in src/eventhandlers/uinputeventhandler.cpp

@pktiuk pktiuk mentioned this issue Feb 19, 2021
@pktiuk
Copy link
Member

pktiuk commented Mar 14, 2021

I think it can be closed now.

@pktiuk pktiuk closed this as completed Mar 14, 2021
@mirabilos
Copy link
Contributor

From reading 3.1.4...3.1.5 I don’t think the CHANGELOG.md is needlessly installed, twice, issue is fixed.

-- Installing: /tmp/buildd/antimicro-3.1.4/debian/antimicro/usr/share/doc/antimicrox/CHANGELOG.md
-- Installing: /tmp/buildd/antimicro-3.1.4/debian/antimicro/usr/share/antimicrox/CHANGELOG.md

Both these files are (almost certainly) not needed because the file is also embedded into the binary as Qt resource, as far as I can tell.

The -Wunused-result warnings in src/eventhandlers/uinputeventhandler.cpp are probably also still there?

@pktiuk
Copy link
Member

pktiuk commented Mar 14, 2021

From reading 3.1.4...3.1.5 I don’t think the CHANGELOG.md is needlessly installed, twice, issue is fixed.

-- Installing: /tmp/buildd/antimicro-3.1.4/debian/antimicro/usr/share/doc/antimicrox/CHANGELOG.md
-- Installing: /tmp/buildd/antimicro-3.1.4/debian/antimicro/usr/share/antimicrox/CHANGELOG.md

Both these files are (almost certainly) not needed because the file is also embedded into the binary as Qt resource, as far as I can tell.

Yes, one is embedded into the binary, but I am not sure and I don't want to delete it without checking (these two files seem to be source of problems earlier 8b695c7 8b695c7). - I will investigate it later as a part of #157

The -Wunused-result warnings in src/eventhandlers/uinputeventhandler.cpp are probably also still there?

I don't get any warning for uinputeventhandler (but I get others like -Wold-style-cast or -Wswitch).
Could you just paste this warning here?

@mirabilos
Copy link
Contributor

mirabilos commented Mar 14, 2021 via email

Gallxz pushed a commit to Gallxz/antimicrox that referenced this issue Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Every issue linked with providing and fixing packages for different distributions and systems
Projects
None yet
Development

No branches or pull requests

4 participants