rust-lang / rust

Empowering everyone to build reliable and efficient software.

Home Page:https://www.rust-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tracking issue for RFC 2044: dual-MIT/Apache2 licensing

est31 opened this issue · comments

commented

This is a tracking issue for RFC 2044 (thread, rendered), to put the rust-lang/rfcs repo under dual MIT/Apache-2 licensing terms.

Necessary steps for execution:

Asking past contributors to agree with the licensing terms (with <=40 contributors each to bypass the github mention limit of 50):

And further:

  • PR to rust-lang/rfcs to add LICENSE-MIT and LICENSE-APACHE files, talk about the licensing situation in the README, and edit the template to include the header: rust-lang/rfcs#2075
  • Asking first time contributors who opened PRs before the PR above got merged to agree with the terms: rust-lang/rfcs#2096
  • PR to rust-lang/rfcs to signify the licensing change is complete. Doable once every (or almost every) contributor has signified consent with the licensing terms. Also, figure out what to do about the contributions by people who didn't give their consent: rust-lang/rfcs#2193
commented

In order to document my process, a short note on methodology on how I've obtained the list of github names. I can't use the "contributors" page for that (nor the corresponding github api call), as a) both have limits to only show the top 100 contributors, and b) both completely ignore people not registered on github, or people with git configurations that are not set up to be recognized by github.

So I did the following:

  1. created a directory hashes
  2. obtain a list of commits, ordered by author. git shortlog --format="%H" > shl
  3. pipe that list to the bash script f.sh attached below and sort out dupes (where people used different emails or similar): cat shl | ./f.sh | sort | uniq. Note that I gave myself a github token and used it to authenticate, to get higher rate limits, so the curl command I used was also adjusted to send the token.
  4. This gave me a list of github account names, and for broken configs, it gave me "null HASH" entries. Also one entry invalid-email-address which I found out by grepping for that string in the hashes directory

The bash script reads in the list of commits ordered by author, and for each author, it takes the first commit mentioned, and obtains information about the commit via the github api, and stores it in a json file in the hashes directory. Then it extracts author info from that json file and prints it on stdout.

#!/bin/bash

while read author; do
	read hash;
	[ -f hashes/$hash ] || \
	curl -f "https://api.github.com/repos/rust-lang/rfcs/commits/$hash" -o hashes/$hash || \
	echo "Error for commit $hash"
	[ -f hashes/$hash ] && cat hashes/$hash | jq -r -e '.author.login' | sed "s/^null$/null $hash/"
	while read hash; do
		[ -z "$hash" ] && break
	done
done

I don’t know if it legally matters, but all four sign-off issues have a typo: “to chose” instead of “to choose”.

I left a comment in the pull request, regarding the proposed license header for RFCs; please take a look at that before you start adding license headers to individual RFCs.

@pnkfelix I'm unlocking this issue since it seems to have been locked by accident. If it was intentional feel free to lock it again (and perhaps leave a comment as to why it is being locked).

Status in Oct 2019: Most contributors has signified consent.

The remaining people and their merged PRs are:

Added links to above comment. Also added information about two another RFCs whose major authors are others but they have commits in them.

Tom's contribution isn't substantial (it's a link being changed) and doesn't need copyright assignment.