1e01aa904Sopenharmony_ciContact 2e01aa904Sopenharmony_ci======= 3e01aa904Sopenharmony_ci 4e01aa904Sopenharmony_ciThe project homepage is at https://sourceware.org/libabigail 5e01aa904Sopenharmony_ci 6e01aa904Sopenharmony_ciThe current libabigail source code can be checked out with: 7e01aa904Sopenharmony_cigit clone git://sourceware.org/git/libabigail 8e01aa904Sopenharmony_ci 9e01aa904Sopenharmony_ciThe mailing list to send messages and patches to is 10e01aa904Sopenharmony_cilibabigail@sourceware.org. 11e01aa904Sopenharmony_ci 12e01aa904Sopenharmony_ciThe archives of that list are available at http://sourceware.org/ml/libabigail. 13e01aa904Sopenharmony_ci 14e01aa904Sopenharmony_ciFile bugs 15e01aa904Sopenharmony_ci========= 16e01aa904Sopenharmony_ci 17e01aa904Sopenharmony_ciBugs are to be filled in bugzilla at 18e01aa904Sopenharmony_cihttps://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail 19e01aa904Sopenharmony_ci 20e01aa904Sopenharmony_ciWriting and sending patches 21e01aa904Sopenharmony_ci============================ 22e01aa904Sopenharmony_ci 23e01aa904Sopenharmony_ciPlease supply patches using git format-patch and git send-email. If 24e01aa904Sopenharmony_ciyou don't know how to use git, send-email, fine. Just use your 25e01aa904Sopenharmony_cifavorite email client, attach the patch to a nice message, and send us 26e01aa904Sopenharmony_cithe message. 27e01aa904Sopenharmony_ci 28e01aa904Sopenharmony_ciPatches have to be sent by email to libabigail@sourceware.org. 29e01aa904Sopenharmony_ci 30e01aa904Sopenharmony_ciPlease read the file COMMIT-LOG-GUIDELINES in the source tree to learn 31e01aa904Sopenharmony_ciabout how to write the commit log accompanying the patch. 32e01aa904Sopenharmony_ci 33e01aa904Sopenharmony_ciIf you are adding a new public header file to the project, or if you 34e01aa904Sopenharmony_ciare defining a new entry point to the API of libabigail, please take 35e01aa904Sopenharmony_cisome time to read the file VISIBILITY about how you need to handle the 36e01aa904Sopenharmony_civisibility of symbols that are part of the API and ABI of libabigail. 37e01aa904Sopenharmony_ci 38e01aa904Sopenharmony_ciMake sure you sign your patch. To learn about signing, please read 39e01aa904Sopenharmony_cithe "Sign your work" chapter below. 40e01aa904Sopenharmony_ci 41e01aa904Sopenharmony_ciOne important thing to do before sending your patch is to launch the 42e01aa904Sopenharmony_ciregression tests. 43e01aa904Sopenharmony_ci 44e01aa904Sopenharmony_ciRegression tests 45e01aa904Sopenharmony_ci================ 46e01aa904Sopenharmony_ci 47e01aa904Sopenharmony_ciRegression tests are under the directory 'tests'. They are usually 48e01aa904Sopenharmony_ciwritten in C++ and are especially designed to be easy to debug. The 49e01aa904Sopenharmony_ciidea is that if the test fails, the programmer should just have to 50e01aa904Sopenharmony_cilaunch them under GDB and debug them right away. No-bullshit style. 51e01aa904Sopenharmony_ci 52e01aa904Sopenharmony_ciRegression tests are launched by doing: 53e01aa904Sopenharmony_ci 54e01aa904Sopenharmony_ci make check 55e01aa904Sopenharmony_ci 56e01aa904Sopenharmony_ciIf you have N processor cores on your machine, you can launch the 57e01aa904Sopenharmony_citests in parallel to make whole thing go faster by doing: 58e01aa904Sopenharmony_ci 59e01aa904Sopenharmony_ci make -jN -lN check 60e01aa904Sopenharmony_ci 61e01aa904Sopenharmony_ciIf you want to test the fabrication of the distribution tarball (this 62e01aa904Sopenharmony_ciis important, because that is how we do to actually release the 63e01aa904Sopenharmony_citarball of the project that you can download from the internet) then 64e01aa904Sopenharmony_ciyou can do: 65e01aa904Sopenharmony_ci 66e01aa904Sopenharmony_ci make distcheck-fast 67e01aa904Sopenharmony_ci 68e01aa904Sopenharmony_ciThis actually builds the tarball, then untars it, configure/compile 69e01aa904Sopenharmony_cithe untarred source code and launches the regression checks from 70e01aa904Sopenharmony_cithere. 71e01aa904Sopenharmony_ci 72e01aa904Sopenharmony_ciHere, "make distcheck-fast" is a variant of the standard "make distcheck". 73e01aa904Sopenharmony_ciIt compresses with "--fast" instead of default "--best", and is 74e01aa904Sopenharmony_cisignificantly faster, given the size of the distribution. You very likely 75e01aa904Sopenharmony_ciwant to use that one for local regression testing. (However, don't use 76e01aa904Sopenharmony_ci"make distcheck-fast" to create artifacts for distribution.) 77e01aa904Sopenharmony_ci 78e01aa904Sopenharmony_ciYou can also launch this in parallel by doing: 79e01aa904Sopenharmony_ci 80e01aa904Sopenharmony_ci make -jN -lN distcheck-fast 81e01aa904Sopenharmony_ci 82e01aa904Sopenharmony_ciwith N being the number of processor core you have on your system. 83e01aa904Sopenharmony_ci 84e01aa904Sopenharmony_ciPlease make sure you always launch "make distcheck-fast" before sending a 85e01aa904Sopenharmony_cipatch, so that you are sure that we can always build a tarball after 86e01aa904Sopenharmony_ciyour patch is applied to the source tree. 87e01aa904Sopenharmony_ci 88e01aa904Sopenharmony_ciA complementary regression checking target is "check-self-compare". 89e01aa904Sopenharmony_ciYou invoke it by doing "make check-self-compare". That target 90e01aa904Sopenharmony_cianalyzes the ABI of the libabigail.so shared object, serializes it 91e01aa904Sopenharmony_ciinto the ABIXML format and then compares the ABI internal 92e01aa904Sopenharmony_cirepresentation gathered from the libabigail.so binary against the one 93e01aa904Sopenharmony_cigathered from the ABIXML format. The two should be equal if 94e01aa904Sopenharmony_cieverything goes right. This is an important regression test. The 95e01aa904Sopenharmony_ciproblem is that it can take a considerable amount of time. 96e01aa904Sopenharmony_ciSo we've put it into its own separate target. 97e01aa904Sopenharmony_ci 98e01aa904Sopenharmony_ciSo, to be complete the regression checking command to run against your 99e01aa904Sopenharmony_cipatch should be: "make check-self-compare distcheck-fast -j16", if you have 100e01aa904Sopenharmony_cia machine with a 16 threads processors, for instance. 101e01aa904Sopenharmony_ci 102e01aa904Sopenharmony_ciLaunching regression tests in Valgrind 103e01aa904Sopenharmony_ci-------------------------------------- 104e01aa904Sopenharmony_ci 105e01aa904Sopenharmony_ciTo detect memory management errors, the tests of the regression test 106e01aa904Sopenharmony_cisuite can be run using Valgrind tools, essentially memcheck and 107e01aa904Sopenharmony_cihelgrind. 108e01aa904Sopenharmony_ci 109e01aa904Sopenharmony_ciTo do so, please do: 110e01aa904Sopenharmony_ci 111e01aa904Sopenharmony_ci make check-valgrind 112e01aa904Sopenharmony_ci 113e01aa904Sopenharmony_ciThis runs the tests under the control of the Valgrind memcheck and 114e01aa904Sopenharmony_cihelgrind tools. 115e01aa904Sopenharmony_ci 116e01aa904Sopenharmony_ciBut then, if you want Valgrind to check the libabigail command line 117e01aa904Sopenharmony_citools that are *forked* by some of the tests then type: 118e01aa904Sopenharmony_ci 119e01aa904Sopenharmony_ci make check-valgrind-recursive 120e01aa904Sopenharmony_ci 121e01aa904Sopenharmony_ciThis one takes a long time. On my system for instance, it takes an 122e01aa904Sopenharmony_cihour. But then it checks *everything*. If you don't have that time, 123e01aa904Sopenharmony_cithen "make check-valgrind" is enough, as the regression tests that use 124e01aa904Sopenharmony_cithe libabigail *library* directly (as opposed to forking libabigail 125e01aa904Sopenharmony_cicommand line tools) will be verified. 126e01aa904Sopenharmony_ci 127e01aa904Sopenharmony_ciHow tests are organized 128e01aa904Sopenharmony_ci----------------------- 129e01aa904Sopenharmony_ci 130e01aa904Sopenharmony_ciThere are two kinds of regression tests. Those that use the 131e01aa904Sopenharmony_cilibabigail *library* directly, and those that spawn one of the 132e01aa904Sopenharmony_cilibabigail command line tools. 133e01aa904Sopenharmony_ci 134e01aa904Sopenharmony_ciGenerally, both are usually made of a loop that churns through a set of input 135e01aa904Sopenharmony_cibinaries to compare. Once the comparison is done, the resulting 136e01aa904Sopenharmony_cireport is compared against a reference report that is provided. 137e01aa904Sopenharmony_ci 138e01aa904Sopenharmony_ciTest executables have names that starts with 'runtest*'. For instance, 139e01aa904Sopenharmony_ciunder <build-directory>/tests/ you can find tests named 140e01aa904Sopenharmony_ciruntestdiffdwarf, runtestabidiff, etc... 141e01aa904Sopenharmony_ci 142e01aa904Sopenharmony_ciIf a test executable is named 143e01aa904Sopenharmony_ci<build-directory>/tests/runtestdiffdwarf, then its source code is 144e01aa904Sopenharmony_citests/test-diff-dwarf.cc. Similarly, the source code of the test 145e01aa904Sopenharmony_ci<build-directory>/tests/runtestabidiff is tests/test-abidiff.cc. 146e01aa904Sopenharmony_ci 147e01aa904Sopenharmony_ciThe data provided for each test (for instance the input binaries to 148e01aa904Sopenharmony_cicompare and the reference report that should result from the 149e01aa904Sopenharmony_cicomparison) is to be found under tests/data. So data for the test 150e01aa904Sopenharmony_ciruntestdiffdwarf is to be found under tests/data/test-diff-dwarf. 151e01aa904Sopenharmony_ciData for the test runtestabidiff is to be found under 152e01aa904Sopenharmony_citests/data/test-abidiff.cc. 153e01aa904Sopenharmony_ci 154e01aa904Sopenharmony_ciSo adding your own tests usually just amounts to adding the right input 155e01aa904Sopenharmony_ciinto the right sub-directory of tests/data/. To do so, 156e01aa904Sopenharmony_cilook at several tests/test-*.cc to see which one you'd like to add 157e01aa904Sopenharmony_cisome input binaries to be compared in. 158e01aa904Sopenharmony_ci 159e01aa904Sopenharmony_ciThen once you know which tests/test-*.cc you'd like to extend, and if 160e01aa904Sopenharmony_ciyou added your input binaries and reference reports (maybe other 161e01aa904Sopenharmony_cithings too) to the right sub-director of tests/data/, you just need to 162e01aa904Sopenharmony_ciextend the array of input binaries/reference reports that the test 163e01aa904Sopenharmony_ciwalks to perform the comparisons. It's generally a global variable 164e01aa904Sopenharmony_cibefore the main() function of the test. In test-diff-dwarf.cc, for 165e01aa904Sopenharmony_ciinstance, the variable name is "in_out_specs". You just have to add a 166e01aa904Sopenharmony_cinew entry to that array; that new entry contains the paths to your new 167e01aa904Sopenharmony_ciinput binaries and reference reports. Just read the code in there and 168e01aa904Sopenharmony_ciuse your brains. It should be straight forward. 169e01aa904Sopenharmony_ci 170e01aa904Sopenharmony_ciAh, also, if you added new files for the tests, then the build system 171e01aa904Sopenharmony_cineeds to be told that those files have to be added to the distribution 172e01aa904Sopenharmony_citarball when we do "make dist" (or make distcheck). To do so, please 173e01aa904Sopenharmony_cimake sure to add your new test input files to the 174e01aa904Sopenharmony_citests/data/Makefile.am file, in the EXTRA_DIST variable. Look at how 175e01aa904Sopenharmony_cithings are organized in that file, and please do things similarly. 176e01aa904Sopenharmony_ci 177e01aa904Sopenharmony_cifedabipkgdiff testing 178e01aa904Sopenharmony_ci--------------------- 179e01aa904Sopenharmony_ci 180e01aa904Sopenharmony_ciThis depends on the Python koji and a few support modules. If these are 181e01aa904Sopenharmony_cinot available, 'configure' disables fedabipkgdiff and its 'make check' 182e01aa904Sopenharmony_citesting. 183e01aa904Sopenharmony_ci 184e01aa904Sopenharmony_ciDebian and Ubuntu, for example, don't provide packages for the Python 185e01aa904Sopenharmony_cikoji module. If you'd like to run fedabipkgdiff testing without manually 186e01aa904Sopenharmony_cidoing a proper Koji installation, you may simply download Koji sources 187e01aa904Sopenharmony_ci(<https://pagure.io/koji>, releases, or Git clone) and point to these via 188e01aa904Sopenharmony_cithe Python search path. For example, tested 2021-12-11: 189e01aa904Sopenharmony_ci 190e01aa904Sopenharmony_ci wget https://pagure.io/koji/archive/koji-1.27.0/koji-koji-1.27.0.tar.gz 191e01aa904Sopenharmony_ci tar -xzf koji-koji-1.27.0.tar.gz 192e01aa904Sopenharmony_ci export PYTHONPATH="$PWD"/koji-koji-1.27.0 193e01aa904Sopenharmony_ci 194e01aa904Sopenharmony_ciA libabigail 'configure' run then enables fedabipkgdiff and its 195e01aa904Sopenharmony_ci'make check' testing. 196e01aa904Sopenharmony_ci 197e01aa904Sopenharmony_ciCoding language and style 198e01aa904Sopenharmony_ci========================== 199e01aa904Sopenharmony_ci 200e01aa904Sopenharmony_ciThe coding style is self evident when reading the source code. So 201e01aa904Sopenharmony_ciplease, stick to and mimic what is already in there for the sake of 202e01aa904Sopenharmony_ciconsistency at very least. Just for history, it's derived from the 203e01aa904Sopenharmony_cistyle of the C++ standard library from the GNU project. 204e01aa904Sopenharmony_ci 205e01aa904Sopenharmony_ciAs of libabigail 2.0, the language we use is C++ 11. The level 206e01aa904Sopenharmony_cisupported is the one supported by the GCC 4.8.x series of compilers. 207e01aa904Sopenharmony_ciThis should be old and well tested enough to be supported by your 208e01aa904Sopenharmony_cicurrent favorite compiler. 209e01aa904Sopenharmony_ci 210e01aa904Sopenharmony_ciInitially, the code base of the project was written in C++03, with the 211e01aa904Sopenharmony_ciTR1 extensions. That heritage is well visible in the code base as it 212e01aa904Sopenharmony_ciis today. 213e01aa904Sopenharmony_ci 214e01aa904Sopenharmony_ciPlease do not rush and send gazillions of patches that just re-write 215e01aa904Sopenharmony_citons of code into your favorite C++ 11 flavour du jour. We will 216e01aa904Sopenharmony_cilikely reject those patches. We want to keep the history of the code 217e01aa904Sopenharmony_cibase in such a way that tools like "git blame <sourcefile> are still 218e01aa904Sopenharmony_ciuseful. 219e01aa904Sopenharmony_ci 220e01aa904Sopenharmony_ciSo we'll accept patches changing parts of the code base to more recent 221e01aa904Sopenharmony_ciC++ 11 constructs only if you happen to add functionality or fix 222e01aa904Sopenharmony_cithings in that area. If it makes "cultural common" sense to adopt 223e01aa904Sopenharmony_cithose constructs. What I mean by "cultural" is that must make sense 224e01aa904Sopenharmony_ciin relative to the culture of the project. And yes, that is 225e01aa904Sopenharmony_cisubjective. Sorry. 226e01aa904Sopenharmony_ci 227e01aa904Sopenharmony_ciAs a generic rule, we tend to favor the lowest possible level of 228e01aa904Sopenharmony_ciabstraction that makes sense without requiring future maintainers of 229e01aa904Sopenharmony_cithe project to have a PhD in design patterns. We are not impressed by 230e01aa904Sopenharmony_cidesign patterns. We use them where they make clear sense, but we 231e01aa904Sopenharmony_cidon't idolize them. Put it another way, we will always favor the one 232e01aa904Sopenharmony_ciwho *READS* and debug the code over the one who writes it. To put 233e01aa904Sopenharmony_cithings in a hypothetical perspective, we'll rather accept a repetitive 234e01aa904Sopenharmony_cicode that stays simple to read and debug over a highly abstract one 235e01aa904Sopenharmony_ciusing meta programming to save a few lines of repetitive code located 236e01aa904Sopenharmony_ciin a very small number of places. 237e01aa904Sopenharmony_ci 238e01aa904Sopenharmony_ciReally, in this project, we care about low level binary analysis 239e01aa904Sopenharmony_cistuff. Issues in that area can be hard to reproduce and quite 240e01aa904Sopenharmony_cichallenging to debug. So having tons of abstraction layers in the 241e01aa904Sopenharmony_cicode base have proven to be a maintenance burden over the years, from 242e01aa904Sopenharmony_ciour experience in working on similar projects. So please help us 243e01aa904Sopenharmony_ciavoid those mistakes that we make just for the pleasure of writing 244e01aa904Sopenharmony_ciwhat can look as "pleasant code" at a first naive sight. 245e01aa904Sopenharmony_ci 246e01aa904Sopenharmony_ciThat being said, we also love cleanly designed APIs that are fairly 247e01aa904Sopenharmony_cire-usable and well documented. And we also praise abstraction and 248e01aa904Sopenharmony_cimodularisation that we recognize as being the most basic tools of any 249e01aa904Sopenharmony_ciengineer. So we like to think about ourselves as well rounded people 250e01aa904Sopenharmony_ciwho care about maintaining things for a long time to come :-) 251e01aa904Sopenharmony_ci 252e01aa904Sopenharmony_ciSign your work 253e01aa904Sopenharmony_ci============== 254e01aa904Sopenharmony_ci 255e01aa904Sopenharmony_ciTo facilitate tracking of who did what, we've adopted a "sign-off" 256e01aa904Sopenharmony_ciprocedure for patches based on the procedure used by the Linux kernel 257e01aa904Sopenharmony_ciproject. 258e01aa904Sopenharmony_ci 259e01aa904Sopenharmony_ciThe sign-off is a simple line at the end of the explanation for the 260e01aa904Sopenharmony_cipatch, which certifies that you wrote it or otherwise have the right 261e01aa904Sopenharmony_cito pass it on as a patch under an appropriate license. The rules are 262e01aa904Sopenharmony_cipretty simple: if you can certify the below: 263e01aa904Sopenharmony_ci 264e01aa904Sopenharmony_ci Developer's Certificate of Origin 265e01aa904Sopenharmony_ci 266e01aa904Sopenharmony_ci By making a contribution to this project, I certify that: 267e01aa904Sopenharmony_ci 268e01aa904Sopenharmony_ci (a) The contribution was created in whole or in part by me, 269e01aa904Sopenharmony_ci and I have the right to submit the contribution under the 270e01aa904Sopenharmony_ci license indicated in, or otherwise designated as being 271e01aa904Sopenharmony_ci applicable to, the file. 272e01aa904Sopenharmony_ci 273e01aa904Sopenharmony_ci (b) The contribution was provided directly to me by some other 274e01aa904Sopenharmony_ci person who certified (a), and I have not modified it. 275e01aa904Sopenharmony_ci 276e01aa904Sopenharmony_ci (c) I understand and agree that the project and the 277e01aa904Sopenharmony_ci contribution are public and that a record of the 278e01aa904Sopenharmony_ci contribution (including all personal information I submit 279e01aa904Sopenharmony_ci with it, including my sign-off) is maintained indefinitely 280e01aa904Sopenharmony_ci and may be redistributed. 281e01aa904Sopenharmony_ci 282e01aa904Sopenharmony_cithen you just add a line saying 283e01aa904Sopenharmony_ci 284e01aa904Sopenharmony_ciSigned-off-by: Random J Developer <random@developer.example.org> 285e01aa904Sopenharmony_ci 286e01aa904Sopenharmony_ciusing your real name (sorry, no pseudonyms or anonymous contributions.) 287e01aa904Sopenharmony_ci 288e01aa904Sopenharmony_cigit commit --signoff will add such a Signed-off-by line at the end of 289e01aa904Sopenharmony_cithe commit log message for you. 290e01aa904Sopenharmony_ci 291e01aa904Sopenharmony_ciModifying the website 292e01aa904Sopenharmony_ci===================== 293e01aa904Sopenharmony_ci 294e01aa904Sopenharmony_ciThe source code of the website of libabigail is stored in CVS (sigh, 295e01aa904Sopenharmony_ciyeah, that is so old school). You can check out that web source code 296e01aa904Sopenharmony_ciby doing: 297e01aa904Sopenharmony_ci 298e01aa904Sopenharmony_ci CVS_RSH=ssh cvs -z9 -d :ext:user@sourceware.org:/cvs/libabigail/ co htdocs 299e01aa904Sopenharmony_ci 300e01aa904Sopenharmony_ciwhere 'user' is your username on the sourceware system. 301e01aa904Sopenharmony_ciAlternatively, you can check out the the web source code anonymously, 302e01aa904Sopenharmony_ciif you don't have any user account on the sourceware system by doing: 303e01aa904Sopenharmony_ci 304e01aa904Sopenharmony_ci export CVSROOT=:pserver:anoncvs@cygwin.com:/cvs/libabigail 305e01aa904Sopenharmony_ci cvs login 306e01aa904Sopenharmony_ci (the CVS anonymous password to use is "anoncvs") 307e01aa904Sopenharmony_ci cvs checkout htdocs 308e01aa904Sopenharmony_ci 309e01aa904Sopenharmony_ci 310e01aa904Sopenharmony_ciHappy Hacking! 311