= Google Summer of Code 2019 = {{{ #!comment #!div style="clear:left; display:block; width:100%; margin:0; padding:0;" Unfortunately, we have not been accepted for GSoC 2019. However, any contributions and enhancement proposals are welcome! Please see [https://guide.macports.org/#development the guide] and subscribe to the MailingLists! }}} {{{ #!comment #!div style="clear:left; display:block; width:100%; margin:0; padding:0;" We have been accepted for GSoC 2019. Further contributions and enhancement proposals are welcome! Please see [https://guide.macports.org/#development the guide] and subscribe to the MailingLists! }}} {{{ #!div style="clear:both; display:block; width: 75%; margin:0 auto; background-color: lightyellow; border: 2pt solid; font-weight:bold; text-align: center; font-size:120%;" MacPorts has applied for Google Summer Of Code 2019! \\ Stay tuned! }}} {{{ #!comment #!div style="clear:both; display:block; width: 75%; margin:0 auto; background-color: lightgreen; border: 2pt solid; font-weight:bold; text-align: center; font-size:120%;" We are accepting applications! Apply for Google Summer Of Code 2019 now! [[BR]] Deadline is 9 April, 18:00 UTC.[[BR]] [https://summerofcode.withgoogle.com/organizations/5306590446485504/ MacPorts at the GSoC 2019 website] }}} {{{ #!comment #!div style="clear:both; display:block; width: 75%; margin:0 auto; background-color: lightyellow; border: 1px solid; text-align: center; font-size:120%;" The application period is over. We are rating and deciding which proposals to accept and will start into GSoC soon! }}} [[PageOutline]] This is the MacPorts Project’s page for [https://summerofcode.withgoogle.com/ Google Summer of Code]. {{{ #!comment #!div style="margin: 5px auto; text-align: center;" [[Image(https://developers.google.com/open-source/gsoc/resources/downloads/GSoC-icon.svg, 350, link=https://summerofcode.withgoogle.com/, title=Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License)]] }}} Information about the past years can be found at SummerOfCodeArchive. == Applications for GSoC == The list of accepted organizations will be published '''27 February'''. Students will be able to apply from '''25 March until 9 April 18:00 UTC'''. If you're interested in working with MacPorts for Google Summer of Code 2019, you don't have to wait until the application period for students starts. Introduce yourself on the [MailingLists macports-dev mailing list] today or drop by in IRC by joining #macports on [http://freenode.net/irc_servers.shtml Freenode]. See [#contact Ways to Contact Us] for more information. === General info === For future reference, you may check the [https://summerofcode.withgoogle.com/ Google Summer of Code website]. The [http://en.flossmanuals.net/GSoCStudentGuide/ GSoC Student Guide] is also worth reading and explains what GSoC is about and how it works in detail. We suggest you take a few minutes and read this guide. See also [https://www.youtube.com/watch?v=YN7uGCg5vLg So You Want to Be a Google Summer of Code Student?] video. For the official schedule and deadlines, consult the [https://developers.google.com/open-source/gsoc/timeline timeline]. === Proposal Guidelines === '''Submit your proposal early''': early submissions get more attention from developers for the simple fact that they have more time to dedicate to reading them. The more people see it, the more it'll get known. '''Do not leave it all to the last minute''': Make sure you send your application before the final rush. Also, note that the applications submitted very late will get the least attention from mentors, so you may get a low vote because of that. '''Keep it simple''': we don't need a 10-page essay on the project and on you. You just need to be concise and precise. '''Know what you are talking about''': the last thing we need is for students to submit ideas that cannot be accomplished realistically or ideas that aren't even remotely related to MacPorts or the project. If your idea is unusual, be sure to explain why you have chosen MacPorts as the best place for the project. === About Us === We are eager to support and mentor students who want to gain experience by working on the MacPorts Project. We have many ideas for potential internship subjects, yet we are open to anything that is both interesting and relevant to MacPorts. If you have an idea of your own, feel free to [#contact contact us] to discuss it. MacPorts is written in the Tcl scripting language with some low-level parts implemented in C. Most students that have previously applied and successfully completed Google Summer of Code with us did not know Tcl when they applied. Feel free to apply if you don't know Tcl yet, especially if you're willing to learn and already know several scripting languages such as Python, Ruby, PHP or Perl. The best way to apply is to first make contact with us, either by sending a mail to the mailing list, to potential mentors listed below, or to IRC member on #macports on [http://freenode.net/irc_servers.shtml Freenode]. See also [#contact Ways to Contact Us] for in-depth information on how to reach us. ==== What we expect from students for their applications ==== - Write your own abstract and proposal, copying text from this idea page is not enough. - Show us that you fully understand your task and know what you want to do over the summer. - At best, include a short weekly roadmap covering how you would work on the task. - Please use our [SummerOfCodeApplicationTemplate application template]. ==== What you should do before handing in an application ==== - Get familiar with the MacPorts Project resources. Especially [GetMacPortsSource check out the code] and [https://guide.macports.org read the guide]. - Read the [http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html Tcl Tutorial]. - If you plan on working for macports-base, [https://www.youtube.com/watch?v=46qshiDskrM this] could be a good introduction to the codebase. - Subscribe to the [MailingLists mailing list] [https://lists.macports.org/mailman/listinfo/macports-dev macports-dev] if you do not already read it. Don't be too shy to post. '''[#contact Get in contact!]''' Most important is to discuss your ideas with potential mentors via private email, the MacPorts development list, or the IRC channel before applying. == Students == For the students and projects in the previous editions of GSoC with MacPorts, see [[SummerOfCodeArchive]]. == Projects == This is a list of some potential tasks that student GSoC members could undertake. These are just ideas, and while they express our current concerns, we are open to blue-sky projects related to MacPorts. Please note that this list is absolutely '''not exclusive'''! If you have any idea about what you want to see improved in MacPorts, you are free to propose this as your own project. In any case, we recommend you talk to mentors before writing your application. === Ideas === ==== Announcements distributed over the ports tree ==== #news Some announcements about configuration changes could be presented to users when they update their ports tree. That involves a mechanism to add news items to the ports tree and a new `port news` command that allows the user to read them (and also mark them as read). Each news items could define conditions when they should be shown to the user, for example depending on OS version or if a specific port is installed. It will need a new API in macports1.0 to check for unread items, so the port client can poll it, for example when using a `port news` command. Additionally, these news items should also be available on the web. As an example, there is a similar feature in [https://www.gentoo.org/support/news-items/ Gentoo Portage]. You can refer to these emails as well - [https://lists.macports.org/pipermail/macports-dev/2018-March/037801.html March 21] and [https://lists.macports.org/pipermail/macports-dev/2018-March/037865.html March 24, 2018]. * Difficulty: Easy * Languages: Tcl, HTML * Potential mentors: g5pw, raimue ==== Collect build statistics ==== #build-stats Go through the [https://build.macports.org history of builds] and collect per-port statistics & success matrix: * whether the current version of port built on each particular OS/arch * when was the last time the port built on that OS/arch * links to all builds * list of installed files, differences in installed files on different OS versions * perhaps include some basic functionality to allow checking for build reproducibility * what is the latest version of port (in case it's already outdated), ... It would be nice to get a decent website for each port to get a quick overview of the port status & health across different OSes. (Part of statistics collection could also be implemented as an extension to Buildbot or Buildbot setup.) The project has had a previous attempt by a previous student, the details of which can be found here: https://github.com/macports/macports-webapp. You'll find a lot of documentation in docs/ directory to serve as an initial idea but it's open to suggestions for any or complete change. * Difficulty: Easy to medium * Languages: JSON, HTML, Python or any scripting language * Potential mentors: mojca, umeshksingla ==== Improve startupitem code ==== #startupitem MacPorts has the ability to automatically generate startup items for the current platform. For OS X, these are plist files for launchd which will be installed as `/Library/LaunchDaemons/org.macports.*.plist`. The current code would need a little care and could make use of options which have been added in recent releases of launchd. Features that could be useful include (but are not limited to): - Not using daemondo if the daemon works fine under launchd without it - Ability to install multiple plists - Support for LaunchAgents as well as LaunchDaemons - Installing plists in ~/Library for non-root installs if the user wants - only modify specific XML tags to avoid clobbering additions by user - Support startupitems in standalone binary packages (currently a brutal hack is used to include daemondo in such packages, see #43648) It would be great to write some shorthand in a portfile that builds an XML launchd plist. * Difficulty: Easy * Languages: Tcl, C * Potential mentors: larryv, pixilla ==== Managing and Fixing Qt Versions ==== #qt Fix issues in [query:status=assigned|new|reopened&port~=qt3|qt4|qt5 open tickets for Qt 3, Qt 4, and Qt 5], in particular allowing for concurrent installation of the various Qt versions. There are around 50 outstanding tickets for the various Qt versions, many of which would be resolved by installing all or enough of Qt* into the main install prefix subdirectories. Some involve patching and testing on multiple OSs. Some are probably invalid but need to be tested to determine validity. The end goal for this project is to allowing for concurrent installation of the various Qt versions, and then verifying and resolving as many issues as possible that weren't resolved by the concurrent changes. Requires knowledge of Portfile programming (Tcl), Qt programming (primarily C++), and Qt makefile programming (QMake); other programming knowledge that would be useful include shell (e.g., bash) and C. * Difficulty: Medium to Hard * Languages: Tcl, C++, QMake * Potential mentors: michaelld ==== Implement fakeroot functionality ==== #fakeroot Currently, MacPorts uses root privileges in the destroot phase. That should be replaced by a system that runs as the macports user but intercepts all operations that would require root privileges (chown/chmod/etc.) and record the resulting permissions in a database. The existing functionality of trace mode in darwintracelib1.0 could be leveraged for this task. * Difficulty: Medium * Languages: Tcl, C * Potential mentors: jeremyhu ==== Generating Portfiles ==== There are multiple tasks related to the generation of Portfiles (see below). Some of these may not be enough work for a full summer project, so they could be combined while writing proposals freely when the applying student wants to. ===== i. Perl modules integration from CPAN ===== #cpan2port There has been [[browser:contrib/cpan2port|an attempt]] to write a script for automatic generation of Portfiles from CPAN. This would simplify the maintenance of Perl modules in MacPorts. Revive this project and finish the script or rewrite it. Resources: * http://www.gentoo.org/proj/en/perl/g-cpan.xml * http://search.cpan.org/~bingos/CPANPLUS-0.9001/bin/cpan2dist * http://packages.debian.org/stable/dh-make-perl * Difficulty: Easy to medium * Languages: Perl, probably Tcl * Potential mentors: pixilla ===== ii. Read packages from various package managers ===== #foo2port As with the cpan2port proposal above, and with the previous [wiki:pypi2port pypi2port] GSoC entry, except with other various package managers, such as [http://opam.ocamlpro.com/ opam] for ocaml packages, [http://www.haskell.org/cabal/ cabal] for Haskell, [http://luarocks.org/ luarocks] for Lua, [https://npmjs.org/ npm] for node.js, and so on. * Classification: Medium * Languages: Tcl, C, OCaml, Haskell, Lua, Node.js, etc. * Potential mentors: pixilla ==== Phase out dependency on Xcode ==== #xcode MacPorts currently requires a full Xcode installation, even though a lot of ports will install just fine with the Command Line Tools package only. Since we also have a number of ports that need Xcode to build, we cannot completely remove the Xcode dependency. Your task would be to provide a way for maintainers to easily identify ports that depend on Xcode and mark them as such, so MacPorts can warn users without Xcode installed that a port they want to install needs the full Xcode package. To achieve this, you can modify "trace mode", a `DYLD_INSERT_LIBRARIES`-based sandbox to track whether a port has accessed files belonging to the Xcode package. If it does, your modifications should cause a warning to be printed suggesting the port maintainers to add `use_xcode yes` to the Portfile (unless of course, it is already there). You should also implement an error message if a user without Xcode installed tries to install a port that has `use_xcode yes` set. * Difficulty: Medium * Languages: Tcl, C * Potential mentors: cal ==== Speed up trace mode ==== #tracemode Trace mode is a library preloading-based sandbox used to hide files that a port does not depend on or that are not part of a standard system's installation (such as `/usr/local`). This can avoid problems due to incompatible user-installed software and avoid "automagic" dependencies and increase the reproducibility of builds. Unfortunately, enabling trace mode adds a significant performance penalty to the build process. However, the trace mode code can certainly be optimized using appropriate cache data structures, such as a modified [http://en.wikipedia.org/wiki/Trie Trie]. Your task would be to identify the performance bottlenecks, draft appropriate caching data structures and implement them. * Difficulty: Medium to Hard * Programming languages: Tcl, C * Potential mentors: cal ==== Auto-detection of build dependencies ==== #dependencies-gen When creating a new portfile one of the problems is always the specification of the complete (and preferably minimal) list of build dependencies, especially when one starts with a complete install where most dependencies are already available. It is possible to invert the trace mode logic so that it detects all files a configure and/or build process accesses, in ${prefix} but outside of the port's build directory. This information can then be used to generate a dependency tree and information from the registry can then be used to simplify that tree so that it only lists direct dependencies. Can be combined with the above project. Consult mentor. * Difficulty: Medium to Easy * Programming languages: Tcl, C * Potential mentors: cal === Buildbot ideas === While other projects mostly require access to macOS, frontend javascript and/or python developers are welcome to work in close collaboration with buildbot mentors on any OS. ==== Implement better views in JavaScript ==== Buildbot 1.0 lost some advantages of waterfall view from version 0.8, but it supports writing custom views in Javascript. Extend the buildbot core and/or write some views that would make Buildbot 1.0 a lot more useful for MacPorts. Buildbot is currently written in AngularJS 1.5, but could be extended in other more modern frameworks like vue or react. More info about how the output could look like: #55978 * Difficulty: Medium * Programming languages: JavaScript, Python, json, HTML, AngularJS, Vue.js, React * Potential mentors: from Buildbot community === More Ideas/Hints for your own ideas === ==== Shell environment ==== #shell-environment Add support for providing basic and port-provided environmental services to users in the `~/.profile`, `~/.cshrc`, and `~/.xinitrc` files, so that instead of manipulating the user's .profile to modify certain paths, the installer could append "`source /opt/local/etc/bash.rc`" to the end of a user's .profile file and that bash.rc would source all the files in `/opt/local/etc/bash.d`. * Difficulty: Easy * Potential mentors: raimue ==== Bump version and checksum of existing port ==== #bump Homebrew has brew bump-formula-pr. Such functionality saves a lot of work when updating many ports. Bumping ports using PortGroup like GitHub and bitbucket should also be supported. Existing revision should be reset or removed interactively. A suggested commit message for the update should be shown. Use cases (pseudo commands): * `port bump [[portname | pseudo-portname | port-expressions | port-url]]` bumps checksums only * `port bump [[portname | pseudo-portname | port-expressions | port-url]] @` bumps version and checksums * `port bump --livecheck [[portname | pseudo-portname | port-expressions | port-url]] bumps both with livecheck result if ${version} == ${livecheck.version}` See #53851 for more details. * Difficulty: Easy * Languages: Tcl, C * Potential mentors: TBD ==== MacPorts port for self-management ==== #self-management The MacPorts port should be the source for updating a user’s MacPorts installation. Currently, the MacPorts port is used to build the .pkg installer for MacPorts that is used for the initial installation of MacPorts, and port uses the “selfupdate” mechanism for maintaining the MacPorts installation. The selfupdate mechanism is (at least not documented as such) not accessible through the MacPorts API and does not use the MacPorts mechanisms for maintaining ports. * Difficulty: Challenging * Languages: Tcl, C * Potential mentors: TBD ==== Parallel execution ==== #parallel When an action will run targets on multiple ports, run them in parallel when possible and sensible (requires tracking dependencies between both targets and ports and figuring out the maximum reasonable parallelism, e.g. several ports can fetch at once on a fast connection but you only want one 'make -j8' at a time). * Difficulty: Challenging * Languages: Tcl, C * Potential mentors: TBD ==== Migrate muniversal into base (lipo merging) ==== #muniversal Integrate the [[source:trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl|muniversal portgroup]] into base. Not just a direct copy-and-paste, but in a way that makes sense and preserves the way portfiles are expected to behave (which the current portgroup doesn't). * Difficulty: Medium * Languages: Tcl, C * Potential mentors: TBD ==== App portgoup ==== #app Enhance the launching of GUI apps packaged by MacPorts: - Fix app icon bouncing on Dock after app launched (#40110) - Support multiple apps per port (#41681) * Difficulty: Easy * Languages: TCL, XML * Potential mentors: TBD ==== Portfiles ==== #portfiles Sweep through all Portfiles and look for useful opportunities to add more built-in Tcl functions that make Portfiles more (usefully) terse, powerful, flexible or easier to write. I'm sure there is an entirely family of helper functions yet to be written here. This might also include porting additional packages to MacPorts and cleaning up or removing obsolete ports. * Classification: Medium * Language: Tcl * Potential mentors: larryv ==== Documentation and website ==== #docs Improve MacPorts [query:status!=closed&component=guide|server/hosting|website|wiki documentation, website and Trac system]. Note that pure documentation proposals are not allowed by Google. * Difficulty: Easy to difficult * Languages: PHP, Python * Potential mentors: larryv ==== MacPorts statistics ==== #mpstats Enhance collection and reporting of inventory of ports installed by participating users: StatisticsIdeas * Difficulty: Medium * Language: TBD * Potential mentors: TBD {{{ #!comment ==== Improve fetching from version control ==== #fetchtypes Make cvs/svn/git/hg/bzr fetch types checkout into the distfiles dir and then export into the work dir, to [[ticket:16373|avoid having to re-fetch]] after cleaning the work directory. "`fetch.type svn`" is inefficient in that it checks out a new working copy every time, directly to the work area. That would be like a normal port downloading the distfile every time. Instead, we should check out a working copy to that port's distpath, and then in the extract phase we should `svn export` it to the work area. Some checks will be needed in the fetch phase to ensure that an existing working copy: * has no modifications: check `svn status`. Ideally, we would try to clean up the working copy, for example by `svn revert`-ing modified or added or deleted files, and then in a second `svn status` run, delete any unversioned files. But it's already an improvement if we just discard the working copy if `svn status --ignore-externals` produces any output. * is from the right URL: check `svn info`: check if the "URL" is the one we want. If not, check that the "Repository Root" is a substring of the repository we want. If yes, try to `svn switch` to the URL and revision we want; if not, discard the working copy. * Difficulty: Easy * Languages: Tcl, C, bash * Contact: larryv }}} {{{ #!comment # This was just a wild idea by me. After reading it again, I am no longer sure if this is suitable for an idea. The compiler binary checks would be covered by a functioning trace mode already and environment variable checks are hard to implement (if possible at all). # However, I already typed it out now, so I leave it here for discussion with other mentors. --raimue@ ==== Run basic checks on build systems ==== #buildcheck Some mistakes are very common on newly written ports, mostly because build systems do not always respect the usual conventions. While the port works for the initial port author, it may fail for others due to these mistakes. These could be checked for automatically to catch them before adding the port to the ports tree. First, a set of tests could be run on the extracted, patched (and configured) sources. For example, a possible check could include whether the given Makefile respects the CC/CPPFLAGS/CFLAGS/LDFLAGS environment variables, which is one of the most common mistakes. Often smaller projects just [UsingTheRightCompiler hardcode the compiler] to `cc` or even `gcc`. This could be checked for in various ways. One option would be to overwrite Makefiles rules to verify the passed parameters. Another option would be to use a custom compiler script as `CC` that checks the flags in question are always passed to the compiler by the build system and match those given in the Portfile (or the defaults). Other binaries such as `cc`/`gcc` need to be shadowed and invocation must raise an error. These checks would be included as a new option in existing commands, for example `port build --check`, or a new phase `prebuildcheck` to be run before the `build` phase. This mode could be enabled automatically with a flag in `macports.conf` for MacPorts developers. You will definitely need to come up with more ideas to fill the whole summer. * Classification: Easy to Hard * Languages: Tcl * Potential mentors: (raimue) }}} {{{ #!comment # Listing already done tasks here, maybe parts of this could spin-off a new project idea # Done 2009 ==== Logging ==== #logging Currently, MacPorts has no notion of logging of build activities of a given port or sets of ports. When a build is attempted but an error keeps it from completing, there's no way to track the problem other than the build progress that was output to the terminal, if the verbose mode was requested in the first place. Otherwise, the build environment has to be pruned and the build attempted once again to even get a look at the precise error message. This is particularly problematic when automated builds are attempted since there's usually no one around to have a look at the failure spew. An infrastructure to remedy this situation and endow MacPorts with a rich set of logging capabilities has to be developed to open up the door to truly automated build runs of large sets of ports and thus to packaging of binaries, since with logging we'd have a fully reliable way of catching, reporting and processing of all sorts of fetch/configure/build/destroot/install/etc errors. This could be extended with the interaction with a server-side application like MPWA that could consume these logs (read MPWA proposal). A more detailed draft of this task can be found on the LoggingProposal page. Classification: medium task to relatively challenging[[BR]] Programming languages: Tcl and C[[BR]] Potential mentor: blb }}} == Contacting us == #contact There are several ways to contact us: - Dropping a mail to the [MailingLists MacPorts-dev mailing list] will get you most attention. Note that you have to be subscribed to the list in order to send mail to it. We recommend you create a filter matching the header line `List-Id: macports-dev.lists.macports.org` and sort all the emails matching this filter into a separate folder. When sending inquiries about Google Summer of Code, we would welcome if you included "GSoC" in the subject of your mail. - You can get quick feedback and less formal discussion by joining the `#macports` channel on the [http://freenode.net/irc_servers.shtml Freenode IRC network]. You'll need an IRC client to do so – [http://colloquy.info/ Colloquy] is a popular choice for OS X. Please note that due to timezones and day jobs you might not receive an answer right away. Most users will read your messages when they return and answer as soon as they can. Be prepared to wait a few hours. - Feel free to contact any potential mentor via email directly. You can get the email address by appending `@macports.org` to the handle listed in [#Mentors] above. In general, don't hesitate to contact us – we're here to help you and eager to mentor motivated students in this year's GSoC! == Admins == Append `@macports.org` for email. ||= Name =||= Email =||= Area =|| ||= Umesh Singla =|| [wiki:umeshksingla] || Administrator || ||= Mojca Miklavec =|| [wiki:mojca] || Co-admin || == Mentors == The following committers have agreed to be mentors for GSoC 2019 (append `@macports.org` for email if it is missing) ||= Name =||= Email =||= Area =|| ||= Mojca Miklavec =|| mojca || Mentor || ||= Marcus Calhoun-Lopez =|| mcalhoun || Mentor || ||= Michael Dickens =|| michaelld || Mentor || ||= Umesh Singla =|| umeshksingla || Mentor || ||= Jackson Isaac =|| ijackson || Mentor || ||= Pierre Tardy =|| tardyp@gmail.com || Mentor/Buildbot contact || {{{ #!div style="height: 500px;" }}} {{{ #!comment whitespace so that clicking the #contact anchor will only show the relevant information and nothing else }}}