Week 10 Report for RISC-V Support for Gentoo Prefix

Hello all,
Hope everyone is doing good. This is my report for the 10th week of my GSoC project. This week I worked on testing packages with all keywords in app-portage[1] and app-arch[2]. Also working on testing sci-physics/geant, as it has several flags so its taking quite sometime .

 

Upcoming week I will do the same for sys-apps. My mentor has also shared with me the list of packages they use in Prefix, so we can test them on RISC-V, we will test them as well. I continued working on documentation of “Porting Prefix” and I will get it reviewed this week. Also will get reviews for the dangling PR’s like [4] and [5]

[1] https://github.com/gentoo/gentoo/pull/26679
[2] https://github.com/gentoo/gentoo/pull/26725
[3] https://github.com/gentoo/gentoo/pull/26902
[4] https://github.com/gentoo/gentoo/pull/26848
[5] https://github.com/gentoo/gentoo/pull/26853


Regards,
wiredhikari

Posted in RISC-V Prefix | Leave a comment

Gentoo musl Support Expansion for Qt/KDE Week 10

This week I’ve finished testing the KDE applications, cleaned up the Mauikit ebuild commits, and various fixes on Portage and Crossdev. I have also started writing a little bit on the PinePhone Pro wiki, and also gotten Gentoo musl installed on riscv64 (VisionFive).

I’ll start with mentioning the KDE app tests. I made a simple application called gdepend that takes any number of package atoms as its command line arguments, and prints out a space separated list of all their dependencies combined. This was useful because kde-apps-meta is a “meta-meta” package, meaning it depends on other meta packages, so this allowed me to do “FEATURES=test emerge $(gdepend $(gdepend kde-apps-meta))” to test every KDE application. It is basically equery depend, but prints the output in an emerge-friendly way.

Continue reading

Posted in musl KDE | Leave a comment

Daily blog 15 aug by Catcream

Today I’ve finished most of my work on the Mauikit applications and the PinePhone.

I looked over dependencies once again and fixed a final few things in the mauikit ebuilds, like USE-flags for libmpv on Clip. I then wanted to fix up my commits, and instead of just copying the finished ebuilds into a new ::kde checkout, I took the opportunity to learn efficiently rebasing with git. My goal was to get one commit per package, and I had a real mess of commits :(.

To start I broke up commits that affected multiple packages into separate commits by rebasing, resetting and then doing add+commit for each file. An example of this is a commit where I added LGPL-3 license to every package. I then had some trouble squashing all the remaining commits. But after searching a while I found out that you could just move the lines in git rebase –interactive and place all the commits you want to squash in order, very nice! It took me kind of a long time to figure all the git rebase things out, but if I was to do it again it would go extremely fast.

I also finally solved a USB bug with my PinePhone Pro so that my keyboard works. I also got levinboot (bootloader) running with megi’s prebuilt kernel, with Gentoo musl. levinboot solves a Tow boot bug where you need to put your phone into maskrom mode to charge if the battery gets emptied, so this is a lot better. Instead of a conventional /boot directory, levinboot uses hardcoded (with GUID) partitions where you write lz4 compressed payloads consisting of initramfs, kernel, dtb and a trusted firmware elf file. You also hardcode boot options and kernel arguments into the dtb. Very different from a conventional bootloader + grub but I really enjoy using it! Feels very simple and you know what the things do by not hiding them.

I tried running the FreeRDP test on my laptop but somehow it ran fine there. Tomorrow I’ll continue looking over the failing kde-apps-meta tests.

Posted in Uncategorized | Leave a comment

Week 9 Report for RISC-V Support for Gentoo Prefix

Hello all,

Hope everyone is doing good. This is my report for the ninth week of my Google Summer of Code Project. This week I worked on testing and making a draft for documentation. I got some feedbacks on my previous ARCH testing PR’s and I am working on implementing them.

I tested packages in `sys-apps` for RISC-V[1] that to be keyworded. Some packages needed prefix support [2] and [3].
Here is the list:

* sys-apps/apparmor
* sys-apps/apparmor-utils
* sys-apps/bolt
* sys-apps/cinit
* sys-apps/ckbcomp
* sys-apps/clrngd
* sys-apps/collectl
* sys-apps/colorized-logs
* sys-apps/consolation
* sys-apps/cracklib-words
* sys-apps/crazydiskinfo
* sys-apps/daisydog
* sys-apps/dchroot
* sys-apps/dnotify
* sys-apps/dog
* sys-apps/dstat
* sys-apps/duc
* sys-apps/fakeroot
* sys-apps/firejail
* sys-apps/fxload
* sys-apps/gradm
* sys-apps/hd-idle
* sys-apps/highway
* sys-apps/hw-probe
* sys-apps/init-system-helpers
* sys-apps/iotools
* sys-apps/lnxhc
* sys-apps/logwatch
* sys-apps/mawk
* sys-apps/miller
* sys-apps/minised
* sys-apps/moreutils
* sys-apps/most
* sys-apps/nawk
* sys-apps/netkit-base
* sys-apps/noexec
* sys-apps/opentmpfiles
* sys-apps/paxctld
* sys-apps/plocate
* sys-apps/rename
* sys-apps/syscriptor
* sys-apps/the_silver_searcher
* sys-apps/udevil
* sys-apps/yarn

In upcoming weeks I will be working on completing documentation and testing packages.

[1] https://github.com/gentoo/gentoo/pull/26869
[2] https://github.com/gentoo/gentoo/pull/26853
[3] https://github.com/gentoo/gentoo/pull/26848


Regards,

* Nix-Bitcoin fork on Fedimint – https://github.com/fedimint/nix-bitcoin. Commits – https://github.com/fort-nix/nix-bitcoin/compare/master…fedimint:nix-bitcoin:master
* allows creation of /var/lib/minimint and allows minimint service to run – https://github.com/fedimint/nix-bitcoin/pull/6
* removing rev as two commits of same source are being pulled – https://github.com/fedimint/hbbft/pull/6
* Use dev version of core-lightning for faster polling – https://github.com/fedimint/fedimint/pull/210
* cachix: enabling cachix to run on forks – https://github.com/fedimint/fedimint/pull/214
* niv: updating nixpkgs to pull latest packages – https://github.com/fedimint/fedimint/pull/202
* Pull binaries from nix builds for integration tests – https://github.com/fedimint/fedimint/issues/184
* actions: run cachix only on fedimint/minimint – https://github.com/fedimint/fedimint/pull/170
* Run cachix action only run on fedimint/minimint repo and not on forks – https://github.com/fedimint/fedimint/issues/169
* cachix: switching to auth token – https://github.com/fedimint/fedimint/pull/164
* docs: adding docs for nix – https://github.com/fedimint/fedimint/pull/154
* Flakifying minimint – https://github.com/fedimint/fedimint/pull/147
* Integration Tests: lightning-cli enters infinite loop – https://github.com/fedimint/fedimint/issues/138
* actions: adding cachix – https://github.com/fedimint/fedimint/pull/136
* minimint-docker repo – https://github.com/fedimint/minimint-docker
* pulling back naersk to older version for fixing nix-build – https://github.com/fedimint/fedimint/pull/135
* Dockerfile for building nix-builds – https://github.com/fedimint/fedimint/pull/110
* Adding tests for nix-build – https://github.com/fedimint/fedimint/pull/111
* Updating the links to rust-secp256k1-zkp repo – https://github.com/fedimint/fedimint/pull/108
* Fixing the broken nix-build – https://github.com/fedimint/fedimint/pull/98
* Masking Fenix – https://github.com/fedimint/fedimint/pull/92
* Cleaning up yaml file – https://github.com/fedimint/fedimint/pull/91
* Docker container that builds nix scripts and integration tests – https://github.com/fedimint/fedimint/pull/83
* Optimizing Build times – https://github.com/fedimint/fedimint/pull/73
* Nix expression to build minimint’s binary outputs – https://github.com/fedimint/fedimint/pull/60
* nix: adding nix shell support – https://github.com/fedimint/fedimint/pull/45

Posted in RISC-V Prefix | Leave a comment

Gentoo musl Support Expansion for Qt/KDE Week 9

This week I’ve tested every application in the kde-apps-meta meta package, I have also spent a lot of time learning ebuild development tooling by working with the mauikit ebuilds.

To start with I’ll talk about the mauikit ebuilds, and more generally using tools related to ebuild development. I had look over a lot of dependencies, and making sure that I had no unneeded deps. So I learned how to use things like iwdevtools, lddtree, and scanelf. A limitation of iwdevtools is that it can only look for linked libraries and not things like QML plugins. So I decided to make my own tool I call “ehide”.

Ehide hides dependencies from the system, so you can run applications and see if they actually need the dependencies or not. It works by creating a new mount namespace, then enumerates files via ‘equery files ‘, then checks if it’s a file with stat(2) and finally bind mounts /dev/null to the files and spawns a new shell in the created namespace. This shell can now run commands and programs as if the dependency wasn’t on the system to begin with. Creating a new mount namespace with unshare(CLONE_NEWNS) required CAP_SYS_ADMIN. So I also learned how to check for capabilities with libcap, as well as setting capabs with fcaps.eclass in my ebuild. All in all I learned a lot when working with this.

Example of how I used it with Clip:
1) $ qa-vdb clip
dev-qt/qtmultimedia:5 <
# This indicates that qtmultimedia may be a wrong/unneeded RDEPEND, let’s verify with ehide.
2) $ ehide qtmultimedia
3) (from spawned shell) $ clip
CREATING INSTANCE OF MAUI APP
QQmlApplicationEngine failed to load component
qrc:/main.qml:5:1: module “QtMultimedia” is not installed
This means that QtMultimedia is in fact required!

It also works with multiple atoms, just like you’d expect. Sam had an idea of integrating it into Portage so that you could hide every non-dependency of a package, to make sure that you have exactly the dependencies you need in the ebuild, no more, no less. Think the inverse of emerge –emptytree, and the “universe” being world.

Back to the ebuilds themselves: they are mostly finished but I just need to clean up the commits so it becomes one commit per package. This is probably easiest to do by just copying the ebuilds to some temp dir, git reset –hard, and then copying back and commiting one by one. But I feel like untangling this with git-rebase and friends is probably really good for me to further learn using git.

The second thing I did was kde-apps-meta testing. Most things just worked except for these following packages: Postgres, poxml, FreeRDP, and Okular. Poxml was actually an old error related to a gettext issue me and Sam spent a lot of time working on, but it’s still not fixed. (Upstream bug: https://savannah.gnu.org/bugs/?62659). So that leaves Postgres, FreeRDP and Okular, though I’ve used Okular and it works just fine. So I will start working on Postgres and FreeRDP next week, and do Okular last. I’ll also mention here that the Konsole test from two weeks ago is still not fixed https://bugs.gentoo.org/862594.

When I first wanted to emerge kde-apps-meta with FEATURES=test I wanted a way to emerge deps of deps. Much like –emptytree but with a specified max depth. This is because kde-apps-meta depends on other meta packages like kde-apps/kdeaccessibility-meta, kde-apps/kdeadmin-meta, and kde-apps/kdeedu-meta. I did some initial work on a tool I called rdeps which is used like “emerge $(rdeps kde-apps-meta 2)”. It kind of worked but it had some bugs. As I just wanted to emerge my packages and not spend too much time I instead made a much simpler program used like this: ’emerge $(rdeps “$(rdeps kde-apps-meta)”)’ which worked!

Looking back at this week I feel like I’ve learnt a whole lot, especially regarding ebuild development and how to properly check for *DEPENDS. To summarize I’ve ran test suites for kde-apps-meta, wrote two ebuild development applications, and almost finished writing the mauikit ebuilds. Personally I feel like I’ve done relatively little actual work but a whole lot of learning compared to previous weeks.

Today I will continue playing a bit with my PinePhone so I can get an initial sketch of my PPP Gentoo musl guide as requested. I got some help from megi debugging a levinboot buildtime issue, so I’ll go for that instead of Tow-boot since it has a very annoying charging bug fixed. Megi is a developer who does the majority of the low level PinePhone Pro work.

Next week I’ll untangle the mauikit ebuild commits, fix Postgres, poxml, FreeRDP, and Okular tests, and also work on getting accountsservice rewritten. In my proposal schedule next week is actually about getting test suites to run for kde-apps-meta, so I am right on schedule!

Posted in musl KDE | Leave a comment

Daily blog 11 aug by Catcream

Today I’ve been doing basically the same things as yesterday. I’ve continued work on mauikit apps and now I just need to untangle my git commits and make every package one commit to not clutter up ::kde git history. I have also done some work on ehide to allow for multiple packages to be hidden from the filesystem. It’s insanely useful together with iwdevtools for figuring out what needs to go in RDEPEND!
https://github.com/alfredfo/ehide

Posted in musl KDE | Leave a comment

Daily blog 9-10 aug by Catcream

Today (and yesterday) I’ve been spending my time on both testing applications and fixing my mauikit ebuilds. I’ve ran test suites for basically all KDE packages now, that being two layer deep deps of kde-apps-meta. Most tests pass and I’ve written down every failing test in an org-document that I’ll look back to after I’m finished with mauikit ebuilds.

I’ve learnt a lot when fixing the mauikit ebuilds, like how to use lddtree, scanelf, iwdevtools and also just more general ebuild writing stuff. Like how you can go about setting *DEPENDS: for example using COMMON_DEPEND or doing RDEPEND=…, DEPEND=RDEPEND, RDEPEND+=…

I have also written my second tool this week focused on ebuild development. This one I call “ehide”. You give it a package atom and it will hide the package from the filesystem using mount namespaces. It works by calling equery files, creates a new mount namespace with unshare(CLONE_NEWNS), bind mounts /dev/null to all owned files (determined using stat(2)), and then spawns $SHELL with execvp. Bind mounting /dev/null feels a bit hacky but it works in my case, any suggestions?

An example of how I used ehide for mauikit Clip:
1) $ qa-vdb clip
dev-qt/qtmultimedia:5 <
2) $ ehide qtmultimedia
3) $ clip
CREATING INSTANCE OF MAUI APP
QQmlApplicationEngine failed to load component
qrc:/main.qml:5:1: module "QtMultimedia" is not installed

Which means that QtMultimedia actually is a correct RDEPEND!

Posted in Uncategorized | Leave a comment

Daily blog 8 aug by Catcream

Today I’ve been testing various KDE applications. I’ve kept a list of applications that fail and I’ll look back at them once I’ve finished running all the test suites. I also made a simple tool for listing dependencies of meta-packages with a user-specified depth. I personally needed something like emerge –emptytree but with a –depth option when reemerging kde-apps-meta with FEATURES=test. kde-apps-meta depends on other metapackages like kdecore-meta and kdeutils-meta. So what I wanted was a way to just do “FEATURES=test emerge kde-apps-meta –emptytree –depth 2” to rebuild every KDE application with tests enabled. Currently my tool just crashes if used with depth >2, but it works for now!

Tomorrow I’ll continue with application testing, and probably start fixing some of them.

Posted in Uncategorized | Leave a comment

Week 8 Report for RISC-V Support for Gentoo Prefix

Hello all, hope everyone is fine.

This is my weekly report for the eighth week of my GSoC project. I have worked on documenting and testing Prefix this week. Apart from that I tested packages in `app-arch` for RISC-V keyword.This week we also had a EESSI monthly meet and I shared progress of the project there.

Apart from working on Documenting “Porting Prefix to new Architecture”, I tested all packages in `app-arch` for RISC-V[1] and 50+ needed to be keyworded. Here is the list:

* app-arch/sharutils
* app-arch/afio
* app-arch/arj
* app-arch/atool
* app-arch/bsdsfv
* app-arch/cksfv
* app-arch/csnappy
* app-arch/deb2targz
* app-arch/duff
* app-arch/funzix
* app-arch/hardlink
* app-arch/innoextract
* app-arch/lcab
* app-arch/lrzip
* app-arch/lunzip
* app-arch/lz5
* app-arch/lziprecover
* app-arch/makeself
* app-arch/mt-st
* app-arch/par2cmdline
* app-arch/pdlzip
* app-arch/pet2tgz
* app-arch/pure-sfv
* app-arch/patool
* app-arch/pbzip2
* app-arch/tapeutils
* app-arch/pdv
* app-arch/pxz
* app-arch/qpress
* app-arch/rzip
* app-arch/stenc
* app-arch/tardelta
* app-arch/stormlib
* app-arch/zoo
* app-arch/zpaq
* app-arch/tarlz
* app-arch/torrentzip
* app-arch/unadf
* app-arch/unp
* app-arch/unace
* app-arch/vimball
* app-arch/zpaq-extras
* app-arch/unrpa
* app-arch/xdms
* app-arch/tarsync
* dev-libs/ucl
* gnustep-base/gnustep-base
* gnustep-base/gnustep-make
* app-arch/unar
* app-arch/upx
* app-arch/libpar2

In upcoming weeks I will be working more on documentation and testing packages.

[1] https://github.com/gentoo/gentoo/pull/26725


Regards,
wiredhikari

Posted in RISC-V Prefix | Leave a comment

Gentoo musl Support Expansion for Qt/KDE Week 8

This week I’ve spent most of my time getting Gentoo musl to run on my PinePhone Pro and packaging mauikit apps. I have also done some minor testing on KDE applications and some other miscellaneous things.

In my proposal I had initially planned on porting KDE applications and making them build on Gentoo musl the following two weeks, and then making sure test suites run the week following that. But I’ve already gotten kde-apps-meta installed and the programs are working well for the most part. Though I haven’t enabled every use flag for the KDE apps and I haven’t ran every test suite so there’s definitely work to do left, just not 3 weeks work. So instead I asked Sam if I could spend some time working on getting Gentoo musl to run on my PinePhone Pro with Plasma Mobile as a side project.
Continue reading

Posted in musl KDE | Leave a comment