dw-free -> dreamwidth

Now that dw-free/dw-nonfree are together, rename the top level repository
so that the name is accurate. Update usages within the code.
This commit is contained in:
Mark Smith 2022-10-19 16:06:01 +08:00
parent 3e997a9d1a
commit 067f74a669
27 changed files with 36 additions and 141 deletions

View File

@ -10,7 +10,7 @@ env:
jobs:
build:
if: github.repository == 'dreamwidth/dw-free'
if: github.repository == 'dreamwidth/dreamwidth'
runs-on: ubuntu-latest

View File

@ -10,7 +10,7 @@ env:
jobs:
build:
if: github.repository == 'dreamwidth/dw-free'
if: github.repository == 'dreamwidth/dreamwidth'
runs-on: ubuntu-latest

View File

@ -15,7 +15,7 @@ env:
jobs:
build:
if: github.repository == 'dreamwidth/dw-free'
if: github.repository == 'dreamwidth/dreamwidth'
runs-on: ubuntu-latest

View File

@ -22,7 +22,7 @@ env:
jobs:
deploy:
if: github.repository == 'dreamwidth/dw-free'
if: github.repository == 'dreamwidth/dreamwidth'
runs-on: ubuntu-latest

View File

@ -12,7 +12,7 @@ env:
jobs:
build:
if: github.repository == 'dreamwidth/dw-free'
if: github.repository == 'dreamwidth/dreamwidth'
runs-on: ubuntu-latest

View File

@ -28,7 +28,7 @@ env:
jobs:
deploy:
if: github.repository == 'dreamwidth/dw-free'
if: github.repository == 'dreamwidth/dreamwidth'
runs-on: ubuntu-latest

View File

@ -50,7 +50,7 @@ env:
jobs:
deploy:
if: github.repository == 'dreamwidth/dw-free'
if: github.repository == 'dreamwidth/dreamwidth'
runs-on: ubuntu-latest

View File

@ -1,4 +1,4 @@
![build status](https://travis-ci.com/dreamwidth/dw-free.svg?branch=develop)
# Dreamwidth
Please see the `LICENSE` file for the license of this code. Note that all code
committed to this repository MUST be licensed under the GPL and have proper
@ -7,14 +7,6 @@ copyright notices tagged at the top of the file.
For more information on how to use this software, please harass someone to
actually write out documentation here. :-)
If you just want to get started with a fresh installation, you can get things
rolling along:
perl bin/bootstrap.pl
This will check out the various repositories that we use and put them in the
appropriate place.
Please [see our wiki for more information](http://wiki.dreamwidth.net/).
Thanks!

View File

@ -1,98 +0,0 @@
#!/usr/bin/perl
use warnings;
use strict;
use 5.010;
use Getopt::Long;
# first, try to determine the user's github username: see if they gave a
# --github-user arg, or if the env var GITHUB_USER is set
my $GITHUB_USER;
my $DW_NONFREE;
GetOptions(
'github-user=s' => \$GITHUB_USER,
'dw-nonfree!' => \$DW_NONFREE,
);
$GITHUB_USER //= $ENV{GITHUB_USER} if exists $ENV{GITHUB_USER};
die "Can't find your github username! " . "Try bootstrap.pl --github-user <username>\n"
unless defined $GITHUB_USER;
# github https user url: eg https://rahaeli@github.com/rahaeli
my $github_user_url = "https://$GITHUB_USER\@github.com/$GITHUB_USER";
# see if we can reach a git executable
system( 'bash', '-c', 'type git' );
die "I can't find git on your system -- is it installed?" unless $? == 0;
# see if LJHOME is defined, if it's present, and if we can go there
my $LJHOME = $ENV{LJHOME};
die "Must set the \$LJHOME environment variable before running this.\n"
unless defined $LJHOME;
mkdir $LJHOME unless -d $LJHOME;
chdir($LJHOME) or die "Couldn't chdir to \$LJHOME directory.\n";
# a .git dir in $LJHOME means dw-free is checked out. otherwise, get it
if ( -d '.git' ) {
say "Looks like you already have dw-free checked out; skipping.";
}
else {
say "Checking out dw-free to $LJHOME";
say "Please enter the github password for $GITHUB_USER";
git( 'clone', $github_user_url . '/dw-free.git', $LJHOME );
configure_dw_upstream('dw-free');
}
# now get dw-nonfree if it's not there *and* the user has asked for it
if ( -d "$LJHOME/ext/dw-nonfree/.git" ) {
say "Looks like you already have dw-nonfree checked out; skipping.";
}
elsif ($DW_NONFREE) {
say "Checking out dw-nonfree to $LJHOME/ext";
say "Please use dw-nonfree for dreamwidth.org development only.";
say "See $LJHOME/ext/dw-nonfree/README for details.";
chdir("$LJHOME/ext") or die "Couldn't chdir to ext directory.\n";
say "Please enter the github password for $GITHUB_USER";
git( 'clone', $github_user_url . '/dw-nonfree.git' );
chdir("$LJHOME/ext/dw-nonfree")
or die "Couldn't chdir to dw-nonfree directory.\n";
configure_dw_upstream('dw-nonfree');
}
else {
say "dw-nonfree not installed since it wasn't requested.";
say "If you are developing for dreamwidth.org, you can install";
say "the Dreamwidth-specific items in dw-nonfree by running this";
say "command again with the option --dw-nonfree:";
say " perl bootstrap.pl --github-user <username> --dw-nonfree";
}
# a little syntactic sugar: run a git command
sub git {
system( 'git', @_ );
die "failure trying to run: git @_: $!\n" unless $? == 0;
}
sub configure_dw_upstream {
my ($repo) = @_;
say "Configuring dreamwidth's $repo as the upstream of your $repo.";
my $dw_repo_url = "https://github.com/dreamwidth/$repo";
git( qw{remote add dreamwidth}, $dw_repo_url );
git(qw{fetch dreamwidth});
git(qw{branch --set-upstream develop dreamwidth/develop});
git(qw{branch --set-upstream main dreamwidth/main});
}
# finished :-)
say "Done! You probably want to set up the MySQL database next:";
say "http://wiki.dreamwidth.net/notes/Dreamwidth_Scratch_Installation#Database_setup";

View File

@ -2852,7 +2852,7 @@ CREATE TABLE sitekeywords (
)
EOC
# this table is included, even though it's not used in the stock dw-free
# this table is included, even though it's not used in the stock Dreamwidth
# installation. but if you want to use it, you can, or you can ignore it
# and make your own which you might have to do.
register_tablecreate( 'cc_trans', <<'EOC');

View File

@ -207,5 +207,5 @@ sub timestr {
sub github_url {
my $hash = substr( $_[0], 0, 8 );
return qq|[$hash](https://github.com/dreamwidth/dw-free/commit/$hash)|;
return qq|[$hash](https://github.com/dreamwidth/dreamwidth/commit/$hash)|;
}

View File

@ -3,7 +3,7 @@
# DW::Hooks::PrivList
#
# This module implements the listing of valid arguments for each
# known user privilege in dw-free. Any site that defines a different
# known user privilege in Dreamwidth. Any site that defines a different
# set of privs or privargs must create additional hooks to supplement
# this list.
#

View File

@ -1087,7 +1087,7 @@ sub manage_buttons {
my $poster = $self->poster ? $self->poster->user : "";
# Hack to strip the protocol off the return from LJ::img, so the JS is happy
# see https://github.com/dreamwidth/dw-free/commit/317619ee029f39ecd206cec484e0bfb7fa7c4ef1
# see https://github.com/dreamwidth/dreamwidth/commit/317619ee029f39ecd206cec484e0bfb7fa7c4ef1
sub no_proto_img { my $var = LJ::img(@_); $var =~ s/^https?://; return $var; }
if ( $self->remote_can_edit ) {

View File

@ -77,7 +77,7 @@ sub migrate_user {
# Cannot use $u->migrate_prop_to_esn
# * opt_gettalkemail isn't really a prop
# * ->migrate_prop_to_esn won't take arg1/arg2
# * it no longer exists following https://github.com/dreamwidth/dw-free/issues/2052
# * it no longer exists following https://github.com/dreamwidth/dreamwidth/issues/2052
my $opt_gettalkemail = $u->prop('opt_gettalkemail') // '';
my $opt_getselfemail = $u->prop('opt_getselfemail') // '';

View File

@ -540,7 +540,7 @@ sub check_email {
# Catch misspellings of gmail.com, yahoo.com, hotmail.com, outlook.com,
# aol.com, live.com.
# https://github.com/dreamwidth/dw-free/issues/993#issuecomment-357466645
# https://github.com/dreamwidth/dreamwidth/issues/993#issuecomment-357466645
# explains where 3 comes from.
my $tf_domain = Text::Fuzzy->new( $domain, max => 3, trans => 1 );
my @common_domains = (

View File

@ -20,14 +20,14 @@ RUN apt-get update && \
apt-get install -y curl git cpanminus tzdata rsync vim && \
bash -c 'echo "Etc/UTC" > /etc/timezone' && \
dpkg-reconfigure -f noninteractive tzdata && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-system | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-system | \
xargs apt-get -y install && \
rm -rf /var/lib/apt/lists/* && \
cpanm -nq App::cpm
# Split CPAN dependencies into a second step, since they change more
# frequently than system dependencies
RUN curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-cpanm | \
RUN curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-cpanm | \
cpm install -v --no-color -L /dw/extlib/ - && \
rm -rf /root/.perl-cpm && \
rm -rf /root/.cpanm
@ -35,7 +35,7 @@ RUN curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependenc
# Actually check out the source code now.
RUN mv $LJHOME/extlib /dw-extlib && \
rmdir $LJHOME && \
git clone https://github.com/dreamwidth/dw-free.git $LJHOME && \
git clone https://github.com/dreamwidth/dreamwidth.git $LJHOME && \
mv /dw-extlib $LJHOME/extlib && \
git -C $LJHOME checkout $COMMIT && \
git -C $LJHOME pull --ff-only origin $COMMIT && \

View File

@ -17,11 +17,11 @@ ENV PERL5LIB /dw/extlib/lib/perl5
RUN echo $COMMIT && \
apt-get update && \
apt-get install -y mysql-client && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-system | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-system | \
xargs apt-get -y install && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-dev | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-dev | \
xargs apt-get -y install && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-cpanm | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-cpanm | \
cpm install -v --no-color -L /dw/extlib/ - && \
rm -rf /root/.cpanm && \
rm -rf /root/.perl-cpm && \

View File

@ -21,7 +21,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Actually check out the source code now.
RUN git clone https://github.com/dreamwidth/dw-free.git $LJHOME && \
RUN git clone https://github.com/dreamwidth/dreamwidth.git $LJHOME && \
git -C $LJHOME checkout $COMMIT && \
git -C $LJHOME pull --ff-only origin $COMMIT && \
cd $LJHOME/src/proxy && \

View File

@ -15,9 +15,9 @@ ENV LJHOME /dw
RUN echo $COMMIT && \
apt-get update && \
apt-get install -y mysql-client varnish && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-system | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-system | \
xargs apt-get -y install && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-cpanm | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-cpanm | \
xargs cpanm -n -L /dw/extlib/ && \
rm -rf /var/lib/apt/lists/*

View File

@ -15,9 +15,9 @@ ENV LJHOME /dw
RUN echo $COMMIT && \
apt-get update && \
apt-get install -y mysql-client && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-system | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-system | \
xargs apt-get -y install && \
curl https://raw.githubusercontent.com/dreamwidth/dw-free/main/doc/dependencies-cpanm | \
curl https://raw.githubusercontent.com/dreamwidth/dreamwidth/main/doc/dependencies-cpanm | \
xargs cpanm -n -L /dw/extlib/ && \
rm -rf /var/lib/apt/lists/*

View File

@ -26,7 +26,7 @@ Dreamwidth Studios is based upon the <a href="http://www.livejournal.com">LiveJo
</p>
<p>
Our development community is already healthy and thriving. We've got room for everyone to contribute, whether you've just learned how to say "hello world" or you've been programming for thirty years. Check out our <a href="https://github.com/dreamwidth/dw-free/issues">bug tracker</a> for information on what projects we have open, and our <a href="http://wiki.dreamwidth.net/notes/Category:Development">Development</a> wiki category for useful getting-started notes.
Our development community is already healthy and thriving. We've got room for everyone to contribute, whether you've just learned how to say "hello world" or you've been programming for thirty years. Check out our <a href="https://github.com/dreamwidth/dreamwidth/issues">bug tracker</a> for information on what projects we have open, and our <a href="http://wiki.dreamwidth.net/notes/Category:Development">Development</a> wiki category for useful getting-started notes.
</p>
<h1>Open expression:</h1>

View File

@ -168,10 +168,11 @@ this set of guidelines, contact us and we'll talk it over.</p>
<ul>
<li>The <a href='https://github.com/dreamwidth/'>source code</a> for
Dreamwidth Studios is based on code developed and maintained by
LiveJournal.com. Code in the dw-free repository authored by LiveJournal
is released under the GNU General Public License. Code in the dw-free
repository authored by Dreamwidth Studios, LLC is dual-released under
the GPL and Artistic Licenses.</li>
LiveJournal.com. Code in the Dreamwidth repository authored by LiveJournal
is released under the GNU General Public License. Code in the Dreamwidth
repository authored by Dreamwidth Studios, LLC (excepting code in the
ext/dw-nonfree directory) is dual-released under the GPL and Artistic
Licenses.</li>
<li>Code in the ext/dw-nonfree directory is source-available but not Open
Source. You may not use code from the ext/dw-nonfree directory to run a
production site. You may only use code from the ext/dw-nonfree directory

View File

@ -15,7 +15,7 @@ or redistribute it, with or without modifications.
any of the fields as appropriate:</p>
<blockquote>
<p><a href='https://github.com/dreamwidth/dw-free/issues/new?[% ghi_args %]'>Post
<p><a href='https://github.com/dreamwidth/dreamwidth/issues/new?[% ghi_args %]'>Post
'[% title | html %]' to GitHub Issues</a>.</p>
</blockquote>

View File

@ -173,7 +173,7 @@
var s2Props = getProps();
var s2Methods = getMethods();
// Keyword are from dw-free/src/s2/S2/TokenKeyword.pm
// Keyword are from dreamwidth/src/s2/S2/TokenKeyword.pm
var s2Keywords = ("class else elseif function if builtin property propgroup set static var while foreach while for print println not and or xor " +
"layerinfo extends return delete defined new true false reverse size isnull null readonly instanceof as isa break continue push pop").split(" ");

View File

@ -382,7 +382,7 @@ table#table_yourlayers td { padding: .15em .25em; }
}
/**
* Start overriding some classes set in dw-free/htdocs/stc/
* Start overriding some classes set in dreamwidth/htdocs/stc/
* Other site scheme designers: use your own colors here
* /

View File

@ -29,7 +29,7 @@ my $u2 = temp_user();
ok( !$u1->trusts($u2), "Viewer does not have access to poster" );
# Use an image from dw-free for testing purposes.
# Use an image from dreamwidth for testing purposes.
my $obj = DW::Media->upload_media(
user => $u1,

View File

@ -9,7 +9,7 @@
.development.header=Development
.development.main2=Information about installing and maintaining a Dreamwidth-powered site can be found at <a href="http://wiki.dreamwidth.net">the Dreamwidth Wiki</a>. If you'd like to submit a patch to us, or see a list of the bugs available for someone to work on, check out our <a href="http://github.com/dreamwidth/dw-free">GitHub repository</a>.
.development.main2=Information about installing and maintaining a Dreamwidth-powered site can be found at <a href="http://wiki.dreamwidth.net">the Dreamwidth Wiki</a>. If you'd like to submit a patch to us, or see a list of the bugs available for someone to work on, check out our <a href="http://github.com/dreamwidth/dreamwidth">GitHub repository</a>.
.licensing.header=Licensing Information: