Changes between Version 334 and Version 335 of SummerOfCode


Ignore:
Timestamp:
Oct 15, 2019, 9:03:27 AM (5 years ago)
Author:
umeshksingla (Umesh Singla)
Comment:

update ideas for gsoc 2020

Legend:

Unmodified
Added
Removed
Modified
  • SummerOfCode

    v334 v335  
    9191 - 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.
    9292
    93 '''[#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.
     93'''[#contact Get in contact!]''' Most important is to discuss your ideas with potential mentors via the MacPorts development list, or the IRC channel before applying.
    9494
    9595== Students ==
     
    106106
    107107  macports_base::
    108     You would be expected to extend and improve functionality of the core of the package manager, mainly written Tcl (and C). It's OK if you have no prior experience with Tcl though. See below for various ideas.
     108    You would be expected to extend and improve the functionality of the core of the package manager, mainly written in Tcl (and C). It's OK if you have no prior experience with Tcl though. See below for various ideas.
    109109  ports::
    110     With tens of thousands of available ports probably overlapping with your daily needs of software. Portfiles are written in simple declarative Tcl, but you would probably spend more time figuring out how to (better) package the software which might be written in almost any programming language. A knowledge and passion of any language like C++, Perl, Ruby, Python, Rust, Go, Haskell, JavaScript, ... or technology like Qt, KDE, ... could greatly improve support of certain software in our ecosystem.
     110    With tens of thousands of available ports probably overlapping with your daily needs of the software. Portfiles are written in simple declarative Tcl, but you would probably spend more time figuring out how to (better) package the software which might be written in almost any programming language. A knowledge and passion of any language like C++, Perl, Ruby, Python, Rust, Go, Haskell, JavaScript, ... or technology like Qt, KDE, ... could greatly improve the support of certain software in our ecosystem.
    111111  infrastructure::
    112112    Several independent projects to support development of MacPorts could be undertaken in any language of your choice (gravitating towards python & web), like writing a Django app in Python, improving frontend or backend of Buildbot continuous integration (JavaScript or Python), implementing a way to fire up virtual machines with macOS for continuous integration builds, ...
     
    121121This does not have to be an entire GSOC project, but it could be used as part of the application process and/or a supplement to the main project.
    122122Most version increases in a port require only minor changes.
    123 A small number of updates, such as to the [https://trac.macports.org/ticket/48899 Glasgow Haskell Compiler], would be much more of a challenge.
    124123
    125124* Difficulty: Easy to Hard
    126 * Languages: Tcl, language of the port
    127 * Potential mentors: mcalhoun
     125* Languages: Tcl, the language of the port
     126* Potential mentors: mcalhoun
     127* Importance: Low
    128128
    129129==== Managing and Fixing Qt Versions ==== #qt
    130130
    131 Fix issues in [query:status=assigned|new|reopened&port~=qt3|qt4|qt5&group=type&order=priority 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. 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.
     131Fix 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. 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 allow 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.
    132132
    133133* Difficulty: Medium to Hard
    134134* Languages: Tcl, C++, QMake
    135135* Potential mentors: mcalhoun, michaelld
     136* Importance: Low
    136137
    137138==== Make Blacklisting MacPorts Compilers Easier ==== #blacklisting
    138139
    139140Not all compilers work with all ports.
    140 For example, a port may require [https://en.wikipedia.org/wiki/C%2B%2B11 C++11], which is not supported by GCC 4.2, which is the default compilers on older macOS systems.
    141141MacPorts has a mechanism to blacklist compilers that do not meet the port's requirements.
    142142Currently, blacklisting a range of compilers is very easy (e.g. `compiler.blacklist {clang < 500}` ensures that the Clang compiler supports C++11).
     
    148148* Languages: Tcl
    149149* Potential mentors: mcalhoun
     150* Importance: Low
     151
    150152
    151153==== Add Support for x86_64h Architecture ==== #x86_64h
     
    161163* Languages: Tcl
    162164* Potential mentors: mcalhoun
     165* Importance: Low
    163166
    164167==== Allow for Multiple Runs of Each Phase ==== #multipleruns
     
    173176* Languages: Tcl
    174177* Potential mentors: mcalhoun
     178* Importance: Low
    175179
    176180==== Allow a Variant to More Elegantly Become “undefaulted” ==== #undefaulted
     
    184188* Languages: Tcl
    185189* Potential mentors: mcalhoun
     190* Importance: High
    186191
    187192==== Prevent `port reclaim` from Removing Build Dependencies ==== #reclaim
     
    194199* Languages: Tcl
    195200* Potential mentors: mcalhoun
     201* Importance: Medium
    196202
    197203==== Give Portfile Better Access to CFLAGS, CXXFLAGS, etc. ==== #accessflags
     
    206212* Languages: Tcl
    207213* Potential mentors: mcalhoun
     214* Importance: Low
    208215
    209216==== Simplify Compilers and MPI PortGroups with Recent Base Changes ==== #accessflags
     
    215222* Languages: Tcl
    216223* Potential mentors: mcalhoun
    217 
    218 ==== Phase out dependency on Xcode ==== #xcode
    219 
    220 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.
    221 
    222 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.
    223 
    224 * Difficulty: Medium
    225 * Languages: Tcl, C
    226 * Potential mentors: mcalhoun, cal
     224* Importance: Low
    227225
    228226==== Announcements distributed over the ports tree ==== #news
    229227
    230 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.
     228Some 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 item could define conditions when they should be shown to the user, for example depending on the 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.
    231229
    232230As 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].
     
    234232* Difficulty: Easy
    235233* Languages: Tcl, HTML
    236 * Potential mentors: g5pw, raimue
    237 
    238 ==== Collect build statistics ==== #build-stats
    239 
    240 Go through the [https://build.macports.org history of builds] and collect per-port statistics & success matrix:
    241 * whether the current version of port built on each particular OS/arch
    242 * when was the last time the port built on that OS/arch
    243 * links to all builds
    244 * list of installed files, differences in installed files on different OS versions
    245 * perhaps include some basic functionality to allow checking for build reproducibility
    246 * what is the latest version of port (in case it's already outdated), ...
    247 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.)
    248 
    249 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.
    250 
    251 * Difficulty: Easy to medium
    252 * Languages: JSON, HTML, Python or any scripting language
    253 * Potential mentors: mojca, umeshksingla
     234* Potential mentors: ?
     235* Importance: High
    254236
    255237==== Improve startupitem code ==== #startupitem
    256238
    257 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.
     239MacPorts 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 that have been added in recent releases of launchd.
    258240
    259241Features that could be useful include (but are not limited to):
     
    270252* Languages: Tcl, C
    271253* Potential mentors: larryv, pixilla
     254* Importance: Low
    272255
    273256==== Implement fakeroot functionality ==== #fakeroot
     
    279262* Difficulty: Medium
    280263* Languages: Tcl, C
    281 * Potential mentors: jeremyhu
    282 
    283 ==== Generating Portfiles ====
    284 
    285 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.
    286 
    287 ===== i. Perl modules integration from CPAN ===== #cpan2port
    288 
    289 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.
    290 
    291 Resources:
    292 * http://www.gentoo.org/proj/en/perl/g-cpan.xml
    293 * http://search.cpan.org/~bingos/CPANPLUS-0.9001/bin/cpan2dist
    294 * http://packages.debian.org/stable/dh-make-perl
    295 
    296 * Difficulty: Easy to medium
    297 * Languages: Perl, probably Tcl
    298 * Potential mentors: pixilla
    299 
    300 ===== ii. Read packages from various package managers ===== #foo2port
    301 
    302 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.
    303 
    304 * Classification: Medium
    305 * Languages: Tcl, C, OCaml, Haskell, Lua, Node.js, etc.
    306 * Potential mentors: pixilla
     264* Potential mentors: ?
     265* Importance: Medium
    307266
    308267==== Speed up trace mode ==== #tracemode
     
    315274* Programming languages: Tcl, C
    316275* Potential mentors: cal
     276* Importance: Medium
    317277
    318278==== Auto-detection of build dependencies ==== #dependencies-gen
     
    320280When 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.
    321281
    322 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.
    323 
    324 * Difficulty: Medium to Easy
     282It 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. It can be combined with the above project. Consult mentor.
     283
     284* Difficulty: Easy to Medium
    325285* Programming languages: Tcl, C
    326286* Potential mentors: cal
     287* Importance: Low
    327288
    328289=== Buildbot ideas ===
    329290
    330 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.
    331 
    332 ==== Implement better views in JavaScript ====
    333 
    334 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.
    335 
    336 Buildbot is currently written in AngularJS 1.5, but could be extended in other more modern frameworks like vue or react.
    337 
    338 More info about how the output could look like: #55978
    339 
    340 * Difficulty: Medium
    341 * Programming languages: JavaScript, Python, json, HTML, AngularJS, Vue.js, React
    342 * Potential mentors: from Buildbot community
     291NA
    343292
    344293=== More Ideas/Hints for your own ideas ===
     
    350299* Difficulty: Easy
    351300* Potential mentors: raimue
    352 
    353 ==== Bump version and checksum of existing port ==== #bump
     301* Importance: Low
     302
     303==== Improve `port bump` ==== #bump
    354304
    355305Homebrew 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.
     
    365315* Languages: Tcl, C
    366316* Potential mentors: TBD
    367 
    368 ==== MacPorts port for self-management ==== #self-management
    369 
    370 The MacPorts port should be the source for updating a user’s MacPorts installation.
    371 
    372 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.
     317* Importance: Medium
     318
     319==== Parallel execution ==== #parallel
     320
     321When 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).
    373322
    374323* Difficulty: Challenging
    375324* Languages: Tcl, C
     325* Potential mentors: ?
     326* Importance: Medium
     327
     328==== Migrate muniversal into base (lipo merging) ==== #muniversal
     329
     330Integrate the [[source:trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl|muniversal portgroup]] into the 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).
     331
     332* Difficulty: Medium
     333* Languages: Tcl, C
    376334* Potential mentors: TBD
    377 
    378 ==== Parallel execution ==== #parallel
    379 
    380 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).
    381 
    382 * Difficulty: Challenging
    383 * Languages: Tcl, C
    384 * Potential mentors: TBD
    385 
    386 ==== Migrate muniversal into base (lipo merging) ==== #muniversal
    387 
    388 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).
    389 
    390 * Difficulty: Medium
    391 * Languages: Tcl, C
    392 * Potential mentors: TBD
    393 
    394 ==== App portgoup ==== #app
    395 Enhance the launching of GUI apps packaged by MacPorts:
    396 
    397  - Fix app icon bouncing on Dock after app launched (#40110)
    398  - Support multiple apps per port (#41681)
    399 
    400 * Difficulty: Easy
    401 * Languages: TCL, XML
    402 * Potential mentors: TBD
    403 
    404 ==== Portfiles ==== #portfiles
    405 
    406 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.
    407 
    408 * Classification: Medium
    409 * Language: Tcl
    410 * Potential mentors: larryv
     335* Importance: Medium
    411336
    412337==== Documentation and website ==== #docs
     
    418343* Potential mentors: larryv
    419344
    420 ==== MacPorts statistics ==== #mpstats
    421 
    422 Enhance collection and reporting of inventory of ports installed by participating users: StatisticsIdeas
    423 
    424 * Difficulty: Medium
    425 * Language: TBD
    426 * Potential mentors: TBD
    427 
    428 
    429 {{{
    430 #!comment
    431 ==== Improve fetching from version control ==== #fetchtypes
    432 
    433 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.
    434 "`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.
    435 
    436 Some checks will be needed in the fetch phase to ensure that an existing working copy:
    437 
    438 * 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.
    439 * 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.
    440 
    441 * Difficulty: Easy
    442 * Languages: Tcl, C, bash
    443 * Contact: larryv
    444 }}}
    445 
    446 {{{
    447 #!comment
    448 # 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).
    449 # However, I already typed it out now, so I leave it here for discussion with other mentors. --raimue@
    450 
    451 ==== Run basic checks on build systems ==== #buildcheck
    452 
    453 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.
    454 
    455 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.
    456 
    457 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.
    458 
    459 You will definitely need to come up with more ideas to fill the whole summer.
    460 
    461 * Classification: Easy to Hard
    462 * Languages: Tcl
    463 * Potential mentors: (raimue)
    464 }}}
    465 
    466 {{{
    467 #!comment
    468 # Listing already done tasks here, maybe parts of this could spin-off a new project idea
    469 
    470 # Done 2009
    471 ==== Logging ==== #logging
    472 
    473 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.
    474 
    475 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.
    476 
    477 Classification: medium task to relatively challenging[[BR]]
    478 Programming languages: Tcl and C[[BR]]
    479 Potential mentor: blb
    480 }}}
     345=== New Ideas ===
     3461. Add sanity tests
     3472. Improve UX for macports command line and colors
     3483. Improve ports web application - medium
     3494. pypi2port upt
     3505. buildbot user interface improvements - medium
     3516. coloring - easy
    481352
    482353== Contacting us == #contact
     
    499370== Mentors ==
    500371
    501 The following committers have agreed to be mentors for GSoC 2019 (append `@macports.org` for email if it is missing)
     372The following committers have agreed to be mentors for GSoC 2019 (append `@macports.org` for the email if it is missing)
    502373
    503374||= Name =||= Email =||= Area =||