69
I Use This!
High Activity

News

Analyzed about 15 hours ago. based on code collected about 16 hours ago.
Posted over 4 years ago by saloni
This blog will contain all the information about what I have done till now. I started with the input preferences directory and started solving the issues according to haiku guidelines. A few changes have been made to clang-format. This work takes a ... [More] lot of time because it needs a complete understanding of how the llvm code works. As there was number of files, it was difficult to figure out which file should contain the solution of the problem but PulkoMandy really helps me alot. While working on this project I learn new things which were really good! Preserve the indentation of comments In the Haiku coding style, comments are sometimes indented one level more than the code (when they refer to the line above them) but clang-format doesn’t accept these one level indented comments and change their indentation to previous line indentation if (a)  return ;   // Comment to remain as it is else {  return; } So, this comment was previously getting equal to indentation of return statement. Then, I write some code which checks the indentation of previous line and compares with the original line and formats according. Please have a review After this I added a functionality that this code should only work when “haiku” is passed as argument because some people may not want that for their project. Please have a review Removal of braces for multiline control statements According to haiku guidelines, if there is single line control statement then the braces should be removed otherwise not. if (acceptFirstClickBox) { acceptFirstClick = acceptFirstClickBox->Value() == B_CONTROL_ON; } In the above case clang-format was removing the braces for such conditions. So, I got a patchset from llvm which I firstly set as the base code for this. Base code After that some changes were made and the redundant braces remover code was removed. Revert the redundant code After that finally, the final commit was made which removes the extra changes and sets the correct indentation mode matching with Haiku. Please have a review Line break after return type in function definitions Functions with one arguments were not properly detected. But the functions with no or more than one argument, code formatted correctly. void MouseView::MouseUp(BPoint) { fButtons = 0; Invalidate(_ButtonsRect()); fOldButtons = fButtons; } In this above example the clang format was not breaking after the return type with one argument but when I passed no or more than 1 argument it breaks correctly, This issue took alot of time as firstly I tried with different configuration but nothing works then I supposed that any function needs to be called for the break after return type but found nothing. Then I tried with llvm latest code also but even then it doesn’t formatted correctly. After that, I came to know that this was a problem in llvm code and was mising this specific case. At,last I write the code for this specific case in the isFunctionDeclarationName function. Please have review Ongoing review Unusual indentation of BLayoutBuilder block The block was getting formatted incorrectly BLayoutBuilder::Group<>(this, B_VERTICAL) .AddGroup(B_HORIZONTAL) .SetInsets(B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING, B_USE_WINDOW_SPACING, 0) .Add(fSettingsView) .End() .Add(new BSeparatorView(B_HORIZONTAL)) .AddGroup(B_HORIZONTAL) .Add(fDefaultsButton) .Add(fRevertButton) .AddGlue() .End(); The clang-format formats this block such that the indentation level of all these lines become equal which was against Haiku guidelines. So according to the community this block needs special handling. The options was: Have some very specific code to detect the use of BLayoutBuilder and the specific indentation it needs Annotate the sourcecode with some comments to tell clang-format to not touch this part of the code. As the haiku code contains number of such block, so it will become messy to use clang-format off. So, I just proceed with first option. As, I was not familiar with how the indentation of this block is to be done as differnt file was following different rule so, I planned a meeting with Preetpal in which she explains me the process for this block and I write some code for this which correctly indented this block even after giving any incorrect indentation. Please have a review Then one issue remained unsolved in which the .SetInsets line was exceeding the column limit i.e. 80 according to Haiku guidelines. This line was not getting properly breaked and merged. After spending time with the code looking into this issue I found that when I changed this block LineComment block the block was getting formatted correctly as expected. I looked into this to find such condition and change it according to the requirements but found nothing. So, now I am working on this to write some code that will call required functions to format it correctly. I made some changes and write some code but it breaks at some point. I am looking for it and is working side by side on it. Extra space before ++ operator in for loop In for loop the extra space was added before the ++ operator. for (itr = fMouseSettingsObject.begin(); itr != fMouseSettingsObject.end(); ++itr) Then, I take a look at files and see the configurations and made the changes for Haiku. Please have a review But the PulkoMandy suggested me that there can be much better option than this and suggested me to look into ContinuationIndentor.cpp file which will contain some function which is violating our defined options style configuration which were UseTab set to UT_Always so even if it tries to do alignment, it should be using only tabs. set bracket style to BAS_DontAlign so it should not be aligning things this way. But we both look into it and tried to find appropriate function but till now got nothing. It’s a WIP task and working on that also. Tabs are converted into spaces Output of Haiku-format is converting tabs into spaces : private: BString fTitle; BBitmap* fPrimaryIcon; bool fSelected; whereas the expected output is : private: BString fTitle; BBitmap* fPrimaryIcon; bool fSelected; The basic idea is : indented 1 tab: qualifiers (volatile, virtual, static) indented 3 tabs: type of fields and return type of functions indented 2 tabs: function or field name I have writted the code for it that need some changes which is under progress. You can find the sources on Github and my weekly blogs here. Thankyou :) [Less]
Posted over 4 years ago by jt15s
FOR IMMEDIATE RELEASE July 25, 2021 THE HAIKU PROJECT CELEBRATES THE RELEASE OF BETA 3 Poetry is in motion. The Haiku Project, its developers and team members announced the Haiku operating system released its third beta release, version R1/Beta3 ... [More] , July 25th, 2021. Version R1B3 continues the trend of more frequent releases to provide users and developers with an up to date and stable platform to work on. This release combines the best of Haiku’s history as a spiritual successor of BeOS and the hard work of a passionate community. It provides several new features and performance improvements that make Haiku even better. Beta 3 includes the new Czech translation for the system and bundled applications. With this addition, Haiku is now available in 28 different languages. The Haiku Project is thankful to those who have given their time to ensure Haiku is available in a wide variety of languages so the operating system can be used all over the world. WebKit, the backend of the bundled web browser developed by the Haiku team, WebPositive, received multiple major improvements. This provides a good base for further improvements as well as an improved browsing and website rendering experience in WebPositive, which developers will continue to focus on for the next release, Beta 4 and as Haiku nears its first initial release, R1. Additional improvements include: A better installation process, with various fixes to the disk partitioner (DriveSetup GUI) to make the process easier and go more smoothly. Improved hardware drivers, with a focus on: improvements to Wi-Fi networking to match FreeBSD 13 audio drivers, mass storage, USB performance on NVIDIA graphics cards (GeForce 6200-GeForce Go 6400). Significantly improved WebPositive stability and compatibility. Software updates can now be resumed in case of network issues. New and updated ports of various software, including deprecating Python 2 and making Python 3 the default version installed Greater POSIX compatibility Numerous bug fixes. All of these improvements have been implemented for the community and by the community, to provide greater control to the end-user over the devices they use every day. A complete list of changes can be found at https://www.haiku-os.org/get-haiku/r1beta3/release-notes/. Of course, all this would not be possible without the generous donations from donors all over the world, as well as a passionate and hardworking community. The Haiku Project thanks those who have contributed with their time or with their donations. Haiku could always use developers and volunteers, with plenty of opportunities for anyone interested to make their mark and the computing world a better place. Haiku is a free and open-source operating system for personal computing - the download is provided as an ISO file which can be burned to physical media to be installed onto physical hardware, or used in a virtual machine. For more information, to download or to volunteer, visit https://haiku-os.org or https://haiku-os.org/community/getting-involved/. ENDS For media enquiries, please contact: [email protected] Download press kit here NOTES TO EDITORS Note that screenshots, logos and other resources are included in the press kit for this release for use in publications. About Haiku: Haiku is a free and open-source operating system inspired by BeOS and licensed under the MIT license. Specifically targeting personal computing, Haiku is a fast, efficient, simple to use, easy to learn, and yet very powerful system for computer users of all levels, and can be downloaded freely from the official project website as an ISO file. Maintained by a passionate and friendly volunteer community (known collectively as the “Haiku Project”), Haiku welcomes all volunteers and contributors regardless of their skill level or background. For more information please visit https://haiku-os.org About Haiku Inc: Haiku Inc. is a 501(c)(3) non-profit organization (registered in the United States) dedicated to supporting the Haiku Project and the development of Haiku. Haiku Inc. holds the trademark registrations for Haiku, collects donations on behalf of and manages finances for the Haiku Project. In the past, donations collected have been used to fund paid development contracts and the Haiku Code Drive - a program similar to Google’s Summer of Code. For more information, please visit https://haiku-inc.org [Less]
Posted over 4 years ago by ritz
Tl;dr I have completed the bot with basic functionality for my local gerrit instance Link to Introductory blog Link to Progress 1 Link to Progress 2 As I have said before I divided my project in the following parts For every event (change, patch ... [More] etc.), trigger the Concourse CI pipeline. Implement pipeline in concourse CI for fetching the Git repo and running the haiku-format tool on the relevant files and creating appropriate reports out of the tool. Implement REST API call to post the result back to Gerrit reviews as a robot comment. Since last time I started working on creating a report that could be displayed under patchset comments by the bot. I started by looking at various flags of clang-format command out of which --dry-run, --Werror seemed to be working just fine. But I wanted to run the tool only on the files that have been updated/added since last commit and not the entire project. Eventually I found a better way for this i.e. git-clang-format python script which is already present in the llvm project. After installing clang-format, we just need to put this script in /usr/bin/ folder. We can invoke the script using git clang-format directly. git clang-format --diff --style=haiku HEAD~1 would run clang-format with haiku style on the files that have been updated/added since last commit and showcase the diff of it. In order to use this diff information later I dumped the output of the previous command in a file named diff.txt. To use it in my concourse workflow, I added the git-clang-format script on my local server that I created last time using golang to host the clang-format file. Now this seemed rather promising so I went ahead onto the next task i.e. Implement REST API call to post the result back to Gerrit reviews as a robot comment. Before starting GSoC, I had already achieved posting the comments on Gerrit using REST API. Anybody interested can look into https://gerrit-review.googlesource.com/Documentation/config-robot-comments.html and https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html Set Review Section The following is the API signature: POST /changes/{change-id}/revisions/{revision-id}/review [HEADER] - Authorization: 'Basic ' - Content-Type: application/json [BODY] { "tag": "test tag", "message": "Hi! This is robot!", "labels": { "Verified": 1 } } Now the url for calling the above API requires change-id and revision-id. After searching for it I found that change-id and revision-id are already stored in the .gerrit_version.json file inside the container under the cloned repo folder which is created by the gerrit resource. Below is a sample .gerrit_version.json [ { "change_id": "test~master~I2a33f7448147f9aab068df24e4a31bb7f0e974f4", "revision": "916609dc2d5f6d4a51bb6510fc37d4366efbae97", "created": "2021-06-03T15:38:59Z" } ] Now I needed to parse change_id and revision from this json file so I used the jq utility. I created the necessary commands for jq and stored change_id and revision in the CHANGE_ID and REVISION_ID variable respectively. I then created a basic logic for assigning +1 to the verified variable in case the files are formatted correctly according to haiku coding guidelines and -1 in case the files are not properly formatted. Then I constructed the necessary json input for the API. I pulled up the curl command for calling the API from postman, added the variables created previously at necessary fields and added the entire curl command formed inside the pipeline.yml file. Now it was time for testing the pipeline so I ran a new build manually, everything seemed to be working perfectly except the fact that it would also print terminal color codes along with diff in the patchset comments (patchset comments in gerrit do not seem to support coloring text). After looking for various ways to remove it I settled with using git config color.diff false. Now it was time for the final test. First I created a new change set in my local gerrit that added a new unformatted .cpp file and everything worked perfectly. clang-format ran only one file and gave “-1” in “Verified” in the patchset along with the diff in the comment. Then I added another change set in my local gerrit that updated already existing .cpp to the formatted one according to haiku guidelines. This time again everything worked perfectly and clang-format ran only on this updated cpp file and did not report any issues, only “Verified” was changed to “+1”. The following pipeline.yml was used for it. resource_types: - name: gerrit type: registry-image source: repository: docker.io/bluedocks/gerrit-resource resources: - name: test type: gerrit source: url: "http://hrithik:8090" query: "status:open project:test" jobs: - name: job public: true plan: - get: test trigger: true - task: check_coding_style config: inputs: - name: test platform: linux image_resource: type: registry-image source: repository: ubuntu tag: 20.04 run: path: /bin/sh args: - -c - | apt update && apt install -y wget curl jq python3 git python-is-python3 # setup clang-format and git-clang-format wget http://hrithik:9000//clang-format wget http://hrithik:9000//git-clang-format chmod 777 ./clang-format chmod 777 ./git-clang-format mv ./clang-format /usr/bin mv ./git-clang-format /usr/bin cd ./test git config color.diff false git clang-format --diff --style=haiku -q HEAD~1 > diff.txt cat diff.txt # check if diff.txt is empty or not and set verified if [ -s diff.txt ] then verified=-1 else verified=1 fi echo "verified: $verified" BASE_URL=http://hrithik:8090 CHANGE_ID=$(jq -r '.change_id' ./.gerrit_version.json) REVISION_ID=$(jq -r '.revision' ./.gerrit_version.json) TOKEN=Y2hlY2tlcmJvdDpnUlBONXdQQ0tVOTIxTUNzNitBc1dXclNSYzd4Mm9wWlNXNzNtYTRUOFE= jq --null-input -M --rawfile message diff.txt --arg verified $verified \ '{ "tag": "test tag", "message": "```\n\($message)\n```", "labels": { "Verified": $verified } }' > data.json curl --location --request POST "${BASE_URL}/a/changes/${CHANGE_ID}/revisions/${REVISION_ID}/review" \ --header "Authorization: Basic ${TOKEN}" \ --header 'Content-Type: application/json' \ --data-binary '@data.json' So end to end everything is working well on my local machine :) Now my main focus would be on integrating my work in haiku infrastructure. As always suggestions and ideas are welcome. [Less]
Posted over 4 years ago by jt15s
The Haiku Project’s release coordinator for the R1/Beta3 release, kallisti5, has made the decision to bump back the release of R1/Beta3 by one week. The updated timeline is here. The Beta3 release introduces an important update to Haiku WebKit, which ... [More] subsequently produces some rendering regressions. While several of the bugs have already been fixed in Haiku WebKit this week, one final bug remains, which involves an issue with disappearing text. Given the amazing progress made by developers working on WebKit and WebPositive in the last week, the release has been pushed back by a week to give them additional time to fix the issue. It is possible for Haiku WebKit updates to be issued post-release, however it is a priority of the Haiku Project to ensure that the browsing experience in Haiku is as best as it can be, especially considering that the web browsers are an important part of any operating system and that WebPositive is a major focus point for reviewers. We thank you for your understanding and your patience. [Less]
Posted over 4 years ago by pulkomandy
Hello, it’s time for the June activity report! (yes, not much innovation in the tagline for these reports lately. I’m out of ideas, or maybe just lazy to find new ones). Before we dig into the report, two important announcements (in case you are not ... [More] following the other news on the website, since both were already announced separately). The beta 3 release process is going well, and there are some testing candidate images available for testing. If you have some time to install one of these and see if everything is running fine on your hardware, that would be great! The second announcement is that Haiku Inc. recently funded RISC-V hardware for two Haiku developers, X512 and kallisti5. They have both been working on the RISC-V port and X512 got it booting to the desktop on virtual machines. The next step is getting it to run on real hardware, and, as expected (if you already have done similar things), the virtual and real hardware don’t behave in exactly the same way. Anyway, you can find progress reports on the forums if you want to know more about the low level details of this. Of course, this hardware sponsoring would not be possible without the donations and sponsoring from the community. Thanks to everyone who made this possible! See our funding page for more information about ways to donate money to Haiku. If you are a Haiku developer or contributor, you can contact Haiku inc for your funding requests, it can be for buying some specific hardware, or negociating a paid contract if that allows you to spend more time working on Haiku or related things. You can also join our Liberapay team to collect a part of the donations sent to the team, and make your Liberapay profile more visible to donators if they want to target you directly. You need an invitation to join the team, please contact one of the existing team members so they can invite you. With that being said, let’s look at what happened in Haiku sourcecode this month! Of course with the release announcement, everyone has been scrambling to get their changes in at the last minute, so it has been a bit more busy than usual (this is only my arbitrary and subjective perception of things, with no statistics to back it). This report covers revisions hrev55130-hrev55223. POSIX compatibility The USER and GROUP variables (indicating the current user and group id) are now set even for applications running outside of Terminal. This also fixes compatibility with BeOS, which did this correctly. korli modified the strace utility (which is used to log system calls made by an application) to translate signal numbers to human readable names. He also added an implementation of ppoll, which is not yet part of the POSIX standard, but will be added in the next version of it. korli (definitely our POSIX person) also added some commonly present fields in the rusage struct. While we already implemented all the fields required by POSIX, several other UNIX systems implement a few more, and it’s very common that applications will try to use these without testing if they are available. This results in annoying build failures and requires custom patches. Currently, the new fields are always set to 0, the plan is to implement some of them later. Even if this is not required by POSIX, and potentially misleading, it seems a good idea to introduce all the fields at the same time, so we only introduce one new version of the rusage structure, saving us some complications in providing binary compatibility with previous applications. He also added the STDC_NO_THREADS define to our header files since we don’t currently have support for C11 native threads. madmax fixed the behavior of the confstr function in some edge cases, improving the behavior of the getconf command line utility. Font rendering and text management madmax has fixed several issues with font rendering. First, he fixed font metrics for bitmap fonts (which are rendered using fixed bitmaps, rather than vector graphics). John Scipione largely reworked the code of BTextView to compute the text position in the view. Mainly this avoids a problem in Tracker where the text would sometimes be completely outside the view when trying to rename an icon. PulkoMandy added the Noto Emoji font to the font fallback system, providing some more of the missing characters commonly used in text and websites. Drivers kallisti5 fixed some problems in the XHCI (USB3) driver, making it better at recovering from error situations. rudolfc made a lot of progress on the Intel video card driver, improving support for VGA, DVI and HDMI output on SandyBridge and IvyBridge systems, which was not really working before. DisplayPort is also working on some devices already, but may need a little more testing. This work also enables some machines to drive two displays, in clone mode so far. Many parts of the driver were reworked to allow for this, and it opens for support of more modern cards later on, as well as maybe more work on actual dual screen (not cloned) support (but let’s not get ahead of ourselves). mmu_man extended the “poke” driver to allow opening by multiple applications at the same time, and to set the IOPL flag when the device is opened. This driver allows any application to perform I/O access. It previously allowed that only through dedicated ioctl system calls, but with the IOPL flag, it also enables applications to directly use the IN and OUT assembler instructions on x86 CPUs. This is similar to the equivalent driver in FreeBSD and can be used to port tools like Flashrom, which requires such low level access to handle some devices. The wavelan wifi driver is now completely removed. This driver was ported from FreeBSD, and the FreeBSD version was removed in FreeBSD 13. After some investigation, it seems this driver supports only very old hardware that couldn’t connect to WPA Wifi networks, so, it seems a bit useless in the modern days. There was no reason to keep it up to date. korli added suppot for controlling the keyboard backlight on asus laptops. korli disabled the intel pstates (power saving/CPU idling) driver for Atom Silvermont and Airmont CPUs, which are not compatible with the way the driver works currently, resulting in unbootable systems. PulkoMandy reworked the SDHCI (SD cards) driver which could in some cases try to send a command to the hardware before the previous one was completed, resulting in de-synchronization between the driver and the hardware, and the OS waiting forever for a reply from the hardware. While the driver is still not working perfectly with all hardware, at least it should now not freeze the system. Kernel korli fixed some permission flags on x86 processors related to handling of signals, I/O access, and disallowing user threads to enable or disable interrupts. This allows DosBox to run correctly (it unintentionally disabled interrupts, which led to kernel panics later on). Besides this fix specific to DosBox, this led to some other changes in related areas after studying what other OS are doing there. korli also improved the C++ demangler in the kernel debugger to handle some more cases, allowing to get readable information from C++ symbol names in kenrel panic backtraces. Non-X86 architectures Work continues on merging X512 RISC-V work in Haiku. This month, we merged some parts of the virtio driver rework, updates to the uname command to report the new CPU architecture, various initial patches to the kernel headers, addition of the RISC-V architecture to our ELF handling code, implementation of the system_info function, data alignment problems in the AHCI (SATA) driver, and made the classic ATI driver (for mach64 cards) work outside of x86 platforms, so he could use it with QEMU emulating a RISC-V machine (a combination that may be a bit unlikely on real hardware). Han Pengfei continues the work on the ARM port. Starting with fixing some build failures due to a change in the kernel console font (also used by the ARM bootloader when there is no hardware textmode available and only a framebuffer). He also rewrote the ARM linker script using the RISC-V one as a base, which fixed some issues with the early initialization of Haiku. Now we finally have some output on the UART port, making it much easier to debug the next issues without being completely in the dark. bootloader The EFI loader now always include support for GPT partitions. Previously, this support was only enabled for x86 systems (and the bootloader was not running on anything else), but with the progress on RISC-V, kallisti5 could now find and fix the problem. X512 added support for the J and K keys to navigate up and down in the bootloader menu. This is useful on platforms where the BIOS (or equivalent firmware) does not provide a keyboard driver good enough to use the arrow keys. kallisti5 packaged a copy of the EFI bootloader file in the system partition. This makes it a bit easier to find it when preparing an EFI machine for booting Haiku (previously it had to be copied from the EFI partition which is not mounted by default). Later on this can be used to automatically update the bootloader, whereas this currently needs to be done manually. jessicah, kallisti5 and beaglejoe (almost a new contributor, they had submitted another patch in February but had not been properly greeted then, so, welcome!) reworked the enumeration of available boot partitions in the EFI bootloader, which in some cases would find several partitions, but not manage to decide which one to boot from. This was a long running problem and in fact pre-dates the beta 2 release. tqh was also involved previously in reworking various parts of the code to simplify it, and these last few commits completed the work. jessicah also modified the bootloader to always put the bootsplash icons at the same position. Before this change, the official bootloader (with the Haiku logo) and test builds (not using the logo) would align the icons differently. When using mismatched kernels and bootloaders, this would result in a glitch with misaligned icons. Not anymore! File Systems The ongoing GSoC project about XFS is going well, and finally all the remaning patches from the previous years have been finalized and merged. The next phase of the GSoC project will be on doing new development on access to filesystem attributes, and then start the work on write support. korli fixed handling of inodes with “metadata checksum” in the ext2/3/4 filesystem. These inodes have a checksum covering more bytes than is the default in ext2. The implementation in Haiku didn’t agree with the Linux one on how much data should be used. Applications and user interface Jessica Tallon made her first contributions (welcome!) with automatic resizing of the HaikuDepot screenshot window to always match the screenshot size, and also added support for playing webradios from m3u playlists in MediaPlayer. madmax fixed the scrolling of large menus that don’t fit on screen, as well as computation of the width of items in the menus. korli fixed TextSearch to not attempt to open directories as files and search for text in them. nielx fixed problems with the recently added i18n (language translation) support in the Cortex application (which is a bit specific because it reuses some strings many times from different add-ons, and we didn’t want translators to re-translate them multiple times). CodeForEvolution added an animated icon to the shutdown dialog when waiting for applications to terminate. This was one of the nice little details from the BeOS user interface that had been missing in Haiku for a long time. apl-haiku continues his work on HaikuDepot, and moved several tasks to background threads, to provide a more smooth running experience to users. Documentation John Scipione updated the documentation for BTextView with a general class overview. AlwaysLivid updated the README to include a “getting involved” link. This is part of a much larger ongoing work to completely reorganize the website and more clearly separate user oriented and developer oriented documentation, to facilitate onboarding of both new users and new developers. Sourcecode cleanup mt continues his work on running Haiku code through various static analyzers to find and fix problems. This month the work includes removing some “set but never used” variables, fixing some printf format strings, and correcting invalid ASSERT calls in the gutenprint printer driver. He also fixed the build in DEBUG mode for the new libnetservices library (providing an updated version of our HTTP APIs). AlwaysLivid removed a copy of the libunwind code that had been added to Haiku but never used for anything. David Sebek (another new contributor, welcome!) fixed some format string problems in devfs when built in debug mode. This is part of a larger patch series to fix “trim” support on SATA disks, the other parts are still being reviewed on Gerrit. Media PulkoMandy reverted an old change that broke listing of audio and video formats in the Media Kit. This restored support for Youtube video playbacks (and unfortunately, it is still possible to crash app_server by playing a video in Youtube). mt modified the cddb lookup tool (which allows to get album and track names online for audio CDs) to point to a new online database, since the previously used freedb is now offline. CodeForEvolution added MIME types for Markdown files and fixed some other minor issues in the MIME database. Buildsystem The usual work around a new release was done by kallisti5 (the release manager for the upcoming beta3 release): updating the version reported in our system headers, increasing the release image size to fit everything in, and switching our package repositories to a new, less confusing identifier. Historically, repositories were identified by their URL, but this proved problematic when attempting to set up repository mirrors. The identifier and URL had been separated before the beta2 release, but, in order to provide a smooth upgrade path to beta1 users, the distincion had not been put into full use yet, and the identifier was still an HTTP URL. It is now instead a “tag:” URI, following IETF best practises on the matter. jessicah replaced the use of mtools in building the EFI bootable images with our own tool fatshell. This reduces our dependencies to uncommon 3rd party tools, making Haiku easier to build on more platforms. Networking PulkoMandy fixed a bug in handling of HEAD requests and 204 responses in the HTTP client. Both of these are special because the response has only headers and no contents. The code was a bit confused about that and would return an error when in fact, everything was fine. In particular, this made it impossible to load some pages on the Gerrit code review tool, which is a bit annoying since that is the main place where we handle patches and code review. The web browser was finally updated to a more recent WebKit release. This was made possible because the buildbots for creating haikuports packages are now running a pre-release version of beta3. This was needed to build the latest versions of WebKit, which rely on new APIs in the app_server not yet available in beta 2. This new WebKit version has some known regressions, that will be fixed in a later update (some are already fixed thanks to the work of jessicah, nephele and PulkoMandy to investigate the problems, but one important issue remains with text sometimes completely disappearing from webpages). [Less]
Posted over 4 years ago by pulkomandy
Hello, it’s time for the June activity report! (yes, not much innovation in the tagline for these reports lately. I’m out of ideas, or maybe just lazy to find new ones). Before we dig into the report, two important announcements (in case you are not ... [More] following the other news on the website, since both were already announced separately). The beta 3 release process is going well, and there are some “testing candidate” images available for testing. If you have some time to install one of these and see if everything is running fine on your hardware, that would be great! The second announcement is that Haiku inc recently funded RISC-V hardware for two Haiku developers, X512 and kallisti5. They have both been working on the RISC-V port and X512 got it booting to the desktop on virtual machines. The next step is getting it to run on real hardware, and, as expected (if you already have done similar things), the virtual and real hardware don’t behave in exactly the same way. Anyway, you can find progress reports on the forums if you want to know more about the low level details of this. Of course, this hardware sponsoring would not be possible without the donations and sponsoring from the community. Thanks to everyone who made this possible! See our funding page for more information about ways to donate money to Haiku. If you are a Haiku developer or contributor, you can contact Haiku inc for your funding requests, it can be for buying some specific hardware, or negociating a paid contract if that allows you to spend more time working on Haiku or related things. You can also join our Liberapay team to collect a part of the donations sent to the team, and make your Lierapay profile more visible to donators if they want to target you directly. You need an invitation to join the team, please contact one of the existing team members so they can invite you. With that being said, let’s look at what happened in Haiku sourcecode this month! Of course with the release announcement, everyone has been scrambling to get their changes in at the last minute, so it has been a bit more busy than usual (this is only my arbitrary and subjective perception of things, with no statistics to back it). This report covers revisions hrev55130-hrev55223. POSIX compatibility The USER and GROUP variables (indicating the current user and group id) are now set even for applications running outside of Terminal. This also fixes compatibility with BeOS, which did this correctly. korli modified the strace utility (which is used to log system calls made by an application) to translate signal numbers to human readable names. He also added an implementation of ppoll, which is not yet part of the POSIX standard, but will be added in the next version of it. korli (definitely our POSIX person) also added some commonly present fields in the rusage struct. While we already implemented all the fields required by POSIX, several other UNIX systems implement a few more, and it’s very common that applications will try to use these without testing if they are available. This results in annoying build failures and requires custom patches. Currently, the new fields are always set to 0, the plan is to implement some of them later. Even if this is not required by POSIX, and potentially misleading, it seems a good idea to introduce all the fields at the same time, so we only introduce one new version of the rusage structure, saving us some complications in providing binary compatibility with previous applications. He also added the STDC_NO_THREADS define to our header files since we don’t currently have support for C11 native threads. madmax fixed the behavior of the confstr function in some edge cases, improving the behavior of the getconf command line utility. Font rendering and text management madmax has fixed several issues with font rendering. First, he fixed font metrics for bitmap fonts (which are rendered using fixed bitmaps, rather than vector graphics). John Scipione largely reworked the code of BTextView to compute the text position in the view. Mainly this avoids a problem in Tracker where the text would sometimes be completely outside the view when trying to rename an icon. PulkoMandy added the Noto Emoji font to the font fallback system, providing some more of the missing characters commonly used in text and websites. Drivers kallisti5 fixed some problems in the XHCI (USB3) driver, making it better at recovering from error situations. rudolfc made a lot of progress on the Intel video card driver, improving support for VGA, DVI and HDMI output on SandyBridge and IvyBridge systems, which was not really working before. DisplayPort is also working on some devices already, but may need a little more testing. This work also enables some machines to drive two displays, in clone mode so far. Many parts of the driver were reworked to allow for this, and it opens for support of more modern cards later on, as well as maybe more work on actual dual screen (not cloned) support (but let’s not get ahead of ourselves). mmu_man extended the “poke” driver to allow opening by multiple applications at the same time, and to set the IOPL flag when the device is opened. This driver allows any application to perform I/O access. It previously allowed that only through dedicated ioctl system calls, but with the IOPL flag, it also enables applications to directly use the IN and OUT assembler instructions on x86 CPUs. This is similar to the equivalent driver in FreeBSD and can be used to port tools like Flashrom, which requires such low level access to handle some devices. The wavelan wifi driver is now completely removed. This driver was ported from FreeBSD, and the FreeBSD version was removed in FreeBSD 13. After some investigation, it seems this driver supports only very old hardware that couldn’t connect to WPA Wifi networks, so, it seems a bit useless in the modern days. There was no reason to keep it up to date. korli added suppot for controlling the keyboard backlight on asus laptops. korli disabled the intel pstates (power saving/CPU idling) driver for Atom Silvermont and Airmont CPUs, which are not compatible with the way the driver works currently, resulting in unbootable systems. PulkoMandy reworked the SDHCI (SD cards) driver which could in some cases try to send a command to the hardware before the previous one was completed, resulting in de-synchronization between the driver and the hardware, and the OS waiting forever for a reply from the hardware. While the driver is still not working perfectly with all hardware, at least it should now not freeze the system. Kernel korli fixed some permission flags on x86 processors related to handling of signals, I/O access, and disallowing user threads to enable or disable interrupts. This allows DosBox to run correctly (it unintentionally disabled interrupts, which led to kernel panics later on). Besides this fix specific to DosBox, this led to some other changes in related areas after studying what other OS are doing there. korli also improved the C++ demangler in the kernel debugger to handle some more cases, allowing to get readable information from C++ symbol names in kenrel panic backtraces. Non-X86 architectures Work continues on merging X512 RISC-V work in Haiku. This month, we merged some parts of the virtio driver rework, updates to the uname command to report the new CPU architecture, various initial patches to the kernel headers, addition of the RISC-V architecture to our ELF handling code, implementation of the system_info function, data alignment problems in the AHCI (SATA) driver, and made the classic ATI driver (for mach64 cards) work outside of x86 platforms, so he could use it with QEMU emulating a RISC-V machine (a combination that may be a bit unlikely on real hardware). Han Pengfei continues the work on the ARM port. Starting with fixing some build failures due to a change in the kernel console font (also used by the ARM bootloader when there is no hardware textmode available and only a framebuffer). He also rewrote the ARM linker script using the RISC-V one as a base, which fixed some issues with the early initialization of Haiku. Now we finally have some output on the UART port, making it much easier to debug the next issues without being completely in the dark. bootloader The EFI loader now always include support for GPT partitions. Previously, this support was only enabled for x86 systems (and the bootloader was not running on anything else), but with the progress on RISC-V, kallisti5 could now find and fix the problem. X512 added support for the J and K keys to navigate up and down in the bootloader menu. This is useful on platforms where the BIOS (or equivalent firmware) does not provide a keyboard driver good enough to use the arrow keys. kallisti5 packaged a copy of the EFI bootloader file in the system partition. This makes it a bit easier to find it when preparing an EFI machine for booting Haiku (previously it had to be copied from the EFI partition which is not mounted by default). Later on this can be used to automatically update the bootloader, whereas this currently needs to be done manually. jessicah, kallisti5 and beaglejoe (almost a new contributor, they had submitted another patch in February but had not been properly greeted then, so, welcome!) reworked the enumeration of available boot partitions in the EFI bootloader, which in some cases would find several partitions, but not manage to decide which one to boot from. This was a long running problem and in fact pre-dates the beta 2 release. tqh was also involved previously in reworking various parts of the code to simplify it, and these last few commits completed the work. jessicah also modified the bootloader to always put the bootsplash icons at the same position. Before this change, the official bootloader (with the Haiku logo) and test builds (not using the logo) would align the icons differently. When using mismatched kernels and bootloaders, this would result in a glitch with misaligned icons. Not anymore! File Systems The ongoing GSoC project about XFS is going well, and finally all the remaning patches from the previous years have been finalized and merged. The next phase of the GSoC project will be on doing new development on access to filesystem attributes, and then start the work on write support. korli fixed handling of inodes with “metadata checksum” in the ext2/3/4 filesystem. These inodes have a checksum covering more bytes than is the default in ext2. The implementation in Haiku didn’t agree with the Linux one on how much data should be used. Applications and user interface Jessica Tallon made her first contributions (welcome!) with automatic resizing of the HaikuDepot screenshot window to always match the screenshot size, and also added support for playing webradios from m3u playlists in MediaPlayer. madmax fixed the scrolling of large menus that don’t fit on screen, as well as computation of the width of items in the menus. korli fixed TextSearch to not attempt to open directories as files and search for text in them. nielx fixed problems with the recently added i18n (language translation) support in the Cortex application (which is a bit specific because it reuses some strings many times from different add-ons, and we didn’t want translators to re-translate them multiple times). CodeForEvolution added an animated icon to the shutdown dialog when waiting for applications to terminate. This was one of the nice little details from the BeOS user interface that had been missing in Haiku for a long time. apl-haiku continues his work on HaikuDepot, and moved several tasks to background threads, to provide a more smooth running experience to users. Documentation John Scipione updated the documentation for BTextView with a general class overview. AlwaysLivid updated the README to include a “getting involved” link. This is part of a much larger ongoing work to completely reorganize the website and more clearly separate user oriented and developer oriented documentation, to facilitate onboarding of both new users and new developers. Sourcecode cleanup mt continues his work on running Haiku code through various static analyzers to find and fix problems. This month the work includes removing some “set but never used” variables, fixing some printf format strings, and correcting invalid ASSERT calls in the gutenprint printer driver. He also fixed the build in DEBUG mode for the new libnetservices library (providing an updated version of our HTTP APIs). AlwaysLivid removed a copy of the libunwind code that had been added to Haiku but never used for anything. David Sebek (another new contributor, welcome!) fixed some format string problems in devfs when built in debug mode. This is part of a larger patch series to fix “trim” support on SATA disks, the other parts are still being reviewed on Gerrit. Media PulkoMandy reverted an old change that broke listing of audio and video formats in the Media Kit. This restored support for Youtube video playbacks (and unfortunately, it is still possible to crash app_server by playing a video in Youtube). mt modified the cddb lookup tool (which allows to get album and track names online for audio CDs) to point to a new online database, since the previously used freedb is now offline. CodeForEvolution added MIME types for Markdown files and fixed some other minor issues in the MIME database. Buildsystem The usual work around a new release was done by kallisti5 (the release manager for the upcoming beta3 release): updating the version reported in our system headers, increasing the release image size to fit everything in, and switching our package repositories to a new, less confusing identifier. Historically, repositories were identified by their URL, but this proved problematic when attempting to set up repository mirrors. The identifier and URL had been separated before the beta2 release, but, in order to provide a smooth upgrade path to beta1 users, the distincion had not been put into full use yet, and the identifier was still an HTTP URL. It is now instead a “tag:” URI, following IETF best practises on the matter. jessicah replaced the use of mtools in building the EFI bootable images with our own tool fatshell. This reduces our dependencies to uncommon 3rd party tools, making Haiku easier to build on more platforms. Networking PulkoMandy fixed a bug in handling of HEAD requests and 204 responses in the HTTP client. Both of these are special because the response has only headers and no contents. The code was a bit confused about that and would return an error when in fact, everything was fine. In particular, this made it impossible to load some pages on the Gerrit code review tool, which is a bit annoying since that is the main place where we handle patches and code review. The web browser was finally updated to a more recent WebKit release. This was made possible because the buildbots for creating haikuports packages are now running a pre-release version of beta3. This was needed to build the latest versions of WebKit, which rely on new APIs in the app_server not yet available in beta 2. This new WebKit version has some known regressions, that will be fixed in a later update (some are already fixed thanks to the work of jessicah, nephele and PulkoMandy to investigate the problems, but one important issue remains with text sometimes completely disappearing from webpages). [Less]
Posted over 4 years ago by jadedctrl
Looks like it’s time for me to clutter the blog again! To start: Since the last update, Caya has been hard-forked and renamed to “Cardie” (short for “cardinal”), which at least fits the “bird theme” of libpurple clients. … And the name’s fitting ... [More] , since it’s now a fairly functional libpurple client. :-) libpurple support There are a few features not implemented yet, which keeps it behind the XMPP add-on in terms of functionality, but the core is there: Configuring and managing accounts for any protocol, joining/creating/leaving rooms, chatting, sending/receiving your own status, room invitations, managing roster, purple-side chat commands, etc. This means Cardie is now (at a base-level) usable for just about any protocol that purple supports, even through third-party plugins. Getting started on the add-on was a bit tricky, and it took a few days to get things working― libpurple didn’t take too well to multiple instances running simultaneously (as the other protocols do, in dedicated threads), and symbols failed to load with the add-on― leading me to take a slightly different approach compared to the other add-ons: A background process runs in parallel to Cardie when purple account(s) are used, and each account’s thread exchanges messages with that process. Aside from that, it’s gone fairly smoothly― libpurple’s pleasant to work with, and the folks over at #pidgin are friendly and helpful. Add-on changes In add-on news that’s dyed something other than purple, I got together a native IRC add-on within a day. It isn’t polished by any means, and was done more as practice and proof of concept: Writing a protocol add-on really doesn’t take that long. I’d recommend using libpurple’s IRC plugin if you can though, it’s definitely more featureful― though in both cases, you might want to use ZNC as a go-between, since SSL in both the native add-on and with libpurple isn’t quite working yet. As for more underlying changes to the add-on spec, protocol add-ons can now specify custom chat commands, “templates” for certain parts of the GUI (for contacts’ “edit” window and room joining/creation), and custom items in the user-list right-click menu. These are optional, only there if you need/want the flexibility. UI changes As far as general UI/functionality goes, user commands are now supported ("/help”, “/kick”, “/ban”, etc), there is tab-completion for usernames, time-stamps with messages, unique color per chat-user, roster management, and the room list is now organized by associated account. Finally, windows/dialogues with a “neutral” context have a drop-down menu where the user can select the account they’d like to deal with― for example, you can select the correct account in the “Join a room” window, among others― but in contexts tied to a specific account (inviting someone to a room), the option is unavailable. Next up For the last phase of GSoC, I’m planning on finishing off the last few bits unsupported by the purple add-on (getting SSL working foremost, remote logs, user statuses, contact images, roster saving), and writing ports for a couple plugins. (On that note, I’d like to thank Begasus for updating the libpurple port and kindly reporting some compilation errors with Cardie!) Aside from that, I’m going to focus on some well-needed polishing and bugfixing― there are some usability/UI tweaks that especially need to happen, much of which I’ve put into the issue tracker. If there’s any problems you notice, or anything you’d like to see, please pop it in. Cheers! [Less]
Posted over 4 years ago by xiaojie
XFS project progress Hi, I am going to make a short summary of the XFS project work since last post. Anyway, you can find my post named ‘GSoC 2021 Project: XFS support progress’ on the forum. It records part of the work. Of course, the most is on ... [More] Gerrit. topic:“xfs” on Gerrit We could find all remaining patches are merged. But, by the way, not all problems. There is a problem leaving. To be honest, I just learned how to use GDB under linux to debug today… I lack big project experience before so it is also new skills for me. Now I need to fix it soon and then move to next step quickly, if there is no other changes, it will be attributes read support. So it is also why I choose to write summary at this time. I need to continue my attempt afterwards. Above is current state about XFS work progress. Then, let me review my work and study. Before I turn to fix the problems on Gerrit. I send many emails to CruxBox. That’s not good. But I don’t know how to do my work at that time and just want to solve all problems at once. So I always want to find a perfect solution…and ask many ‘strange’ and not smart questions at that time, such as could we use smart pointers… :P Anyway, thanks for CruxBox’s nice. The turning point of the matter happened after CruxBox pushed a patch by himself. He made a start point for me. So I realized I should also do this. If I can fix all problems in one patch, it is good. If not, we could get it little by little. After that, we got several patches merged quickly. Then about the code, except for some minor errors, in my view the mainly things can be said to be memory management and code reuse. For memory stuff, we chose to allocate it on heap and then use AutoDeleter/StackOrHeap to manage memory, since it can free memory automatically. For code reuse, in my mind, actually it is because XFS use B+Tree in different parts and there are always some methods are as same between them. So we got this problem. I just did it by review the code, and tried many times. I think it is also I got from CruxBox, just keep hacking. Then about XFS its own states on Haiku. From my view, it could be said like, now we can provide read support for XFS, incompletely. : ( More details I will post on the forum after we arrived phase goals. What’s more, after we implement other part of read support basically, I guess we still need to find better way for tests. Now all our tests are based on images shared by CruxBox. Mainly for v4 linux kernel I think. So later we may need more check. I have prepared this will be a long-term job. [Less]
Posted over 4 years ago by leavengood
RISC-V is an interesting, relatively new and open source hardware platform. The inventors of RISC-V created a company called HiFive and that company recently released a desktop-class System on a Chip (SoC) board called HiFive Unmatched. Long before ... [More] this release Haiku developer Alexander von Gluck (kallisti5) had pre-ordered this board and had begun work on the Haiku port to RISC-V, making some progress on the boot loader, u-boot support and memory mapping. Starting about two months ago Haiku developer X512 also started working on the RISC-V port for Haiku, but from another angle. All the details are too much for this post, but they can be read in his associated Haiku forum post. To summarize: he ported a small RISC-V emulator called TinyEmu to Haiku, wrote a toy operating system and other tools to learn the platform, then he slowly got Haiku working in that emulator, with full GUI support, progressively getting more and more things working. He then started doing similar work in QEMU, which more accurately emulates real hardware. All of this was done in Haiku itself running on an x86 computer. While so far it has all been done in emulation, this is absolutely the furthest Haiku has gotten on any other platform than x86. Given the tremendous progress X512 made on the port with TinyEmu the community asked if Haiku, Inc. could sponsor the purchase of the HiFive Unmatched board for X512, and after a short deliberation Haiku, Inc. agreed to do so. X512 has already been sent enough money to purchase the board and he has already ordered it. The board is expected to arrive by July 6, 2021. In addition, even though he did not ask, Haiku, Inc. decided to reimburse Alexander for his purchase of a HiFive Unmatched as well. This was a combination of matching the same sponsorship as was done for X512 and also thanking Alex for his dedication to the community and his tireless efforts on Haiku infrastructure and many other contributions, such as his own work on the RISC-V port. We expect both X512 and Alexander will continue to collaborate on the port, and with both having the same hardware we expect great results. [Less]
Posted over 4 years ago by ritz
Link to Introductory blog Link to Progress 1 On my quest to finding a way to trigger my jobs anytime a commit happens in gerrit I was looking into this repo and trying to make it work. I tried using it as a resource but it turns out either it’s not ... [More] public anymore or it was deleted. Then I went through the list of forks in that repo and found this. He claimed to have a base for a somewhat working resource after he made some changes. I cloned his repo and tried building the Dockerfile but it threw some errors. After struggling on it for quite some time and making some minor changes to the files I finally managed to build it and upload it to dockerhub. Then I tried using it as a resource but it failed to fetch my local gerrit repo. Also, the whole thing was written in go which was totally new to me so I started by learning “go” and after some time when I got the hang of it, I started the debugging phase. First, I started with the idea of running the docker image manually in local, entering inside its shell and studying the behaviour of check binary. I struggled a bit and had to look at the concourse documentation to learn about its I/O format. After studying, I created the necessary json input and provided it to check. Unfortunately, it did not work, since my local gerrit url was not recognised. I found a --network=host flag for docker run command which solves this issue and was able to get the desired output from the check. So I concluded that the entire thing seems to be working perfectly when run manually on shell. For reference check input looks like this { "source": { "url": "http://hrithik:8090/", "query": "status:open project:test" } } and check output looks like this [ { "change_id": "test~master~I2a33f7448147f9aab068df24e4a31bb7f0e974f4", "revision": "916609dc2d5f6d4a51bb6510fc37d4366efbae97", "created": "2021-06-03T15:38:59Z" } ] But still concourse was not fetching the repo, I read this and changed the type from docker-image to repository-image with full url of my docker hub image in my concourse pipeline YAML file. Along with this I had to put latest tag during image push and update my docker image at dockerhub since it was giving manifest errors. After all this struggle, finally it worked! :) I ran various experiments and it seems to be working perfectly i.e. triggering the job anytime a patchset is created. The Docker image can be found here. Below is my sample pipeline.yml I ran using it. resource_types: - name: gerrit type: registry-image source: repository: docker.io/bluedocks/gerrit-resource resources: - name: test type: gerrit source: url: "http://hrithik:8090" query: "status:open project:test" jobs: - name: job public: true plan: - get: test trigger: true - task: list_repo config: inputs: - name: test platform: linux image_resource: type: registry-image source: repository: busybox run: path: /bin/sh args: - -c - | ls -a test While my mentors will be testing this docker image, I started working on the next phase of this project i.e. running haiku review tool with every job that gets triggered. For reference the basic parts in which I divided my project are given below: For every event (change, patch etc.), trigger the Concourse CI pipeline. Implement pipeline in concourse CI for fetching the Git repo and running the haiku-format tool on the relevant files and create appropriate report out of the tool. Implement REST API call to post the result back to Gerrit reviews as a robot comment. Now in order to start working on haiku review tool I cloned this repo and as suggested by my mentor @suhel_mehta ran the necessary commands for building it. I used clang-format binary on various C++ files and tried to familiarise myself with its working. Since building haiku-review tool might take some time each time concourse is triggered, hence I created a simple server using golang to host the already built clang-format binary file. Running the tool was an issue in alpine linux, so I had to use ubuntu linux as base docker image. Then I wrote the necessary commands required to run haiku-review tool in my pipeline.yml file and then ran the pipeline and it worked like a charm. Below is a sample pipeline.yml I ran using it. resource_types: - name: gerrit type: registry-image source: repository: docker.io/bluedocks/gerrit-resource resources: - name: test type: gerrit source: url: "http://hrithik:8090" query: "status:open project:test" jobs: - name: job public: true plan: - get: test trigger: true - task: haiku_review_tool config: inputs: - name: test platform: linux image_resource: type: registry-image source: repository: ubuntu run: path: /bin/sh args: - -c - | apt update && apt install -y wget wget http://hrithik:9000//clang-format chmod 777 ./clang-format ./clang-format -style=haiku ./test/*.cpp Suggestion Box: These are couple of observations regarding haiku review tool The llvm project is over a GB in size Building the clang-format tool takes some time It doesn’t look like a good idea to clone llvm project and build it everytime the pipeline is triggered maybe we can provide prebuilt clang-format hosted somewhere. Also, I would like to hear from devs on what kind of report/analysis (by haiku review tool) will be helpful to present in the gerrit patchset comments (posted by robot)? [Less]