Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVN to GIT #5

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
804dd57
remove svn dependencies: change variables, different tool for changel…
matyaskopp May 27, 2024
aa60ed6
remove endline from version #3
matyaskopp May 27, 2024
486180a
update git ignore and add empty directories #3
matyaskopp May 28, 2024
490a9bb
fix paths in package patches #3
matyaskopp May 28, 2024
d37101b
remove temporary archive, fix version comment #3
matyaskopp May 28, 2024
4ea449e
remove svn dependency from dep package build #3
matyaskopp May 28, 2024
27441e9
remove svn dependency from rpm #3
matyaskopp May 29, 2024
1ee67d4
unix_install is not a part of repository - removing "svn update"(/"gi…
matyaskopp May 29, 2024
674667d
update main documentation file (#3)
matyaskopp May 29, 2024
93ddd87
changelog script clean up #3
matyaskopp May 29, 2024
1e9d524
remove repository url from update_version #3
matyaskopp May 29, 2024
6abbe40
change SVN_VERSION placeholder to DEV_VERSION #3
matyaskopp May 29, 2024
a4514b7
use git as a source for unix_install folder #3
matyaskopp May 29, 2024
dd621bc
fix version in documentation patching #3
matyaskopp May 29, 2024
9496fa2
fix comments, remove svn2cl #3
matyaskopp May 29, 2024
6ba44e0
change setting for mac #3
matyaskopp Jun 12, 2024
30cded4
fix gitignore #3
matyaskopp Jun 14, 2024
2f3bfe8
force using -std=c89 when compiling Tk::JPEG on macOS #8
matyaskopp Jun 14, 2024
4620b87
add Tk::JPEG patch to configuration #8
matyaskopp Jun 14, 2024
ff103fc
extend gitignore
matyaskopp Sep 30, 2024
8fddd1c
use perlbrew in mac releaser (the default perlbrew perl !!!)
matyaskopp Sep 30, 2024
d09986d
add missing prerequisity for Test-Simple-1.302204
matyaskopp Sep 30, 2024
aa238f3
add missing prerequisity for Tk-CodeText-0.53
matyaskopp Sep 30, 2024
f9fb6f4
add missing prerequisity for Tk-CodeText-0.53
matyaskopp Sep 30, 2024
2102913
add missing prerequisity for Syntax-Kamelon-0.25
matyaskopp Sep 30, 2024
02256c4
add missing prerequisity for XML-TokeParser-0.05
matyaskopp Sep 30, 2024
8aa7057
add missing prerequisity for Syntax-Kamelon-0.25 and XML-Parser-2.47
matyaskopp Sep 30, 2024
dcc5c56
add missing prerequisity for Template-Toolkit-3.102,XML-Parser-2.47,T…
matyaskopp Sep 30, 2024
4659f4b
add missing prerequisity for Tk-ColorEntry-0.08
matyaskopp Sep 30, 2024
a3fb8b8
add missing prerequisity for Convert-Color-0.18
matyaskopp Sep 30, 2024
bc41af8
add missing prerequisity for XML-LibXML-2.0210
matyaskopp Sep 30, 2024
4ba7cbd
add missing prerequisity for Alien-Build-2.83
matyaskopp Sep 30, 2024
b72aad7
add missing prerequisity for XML-LibXML-2.0210
matyaskopp Sep 30, 2024
5bdba74
add missing prerequisity for Alien-Libxml2-0.19
matyaskopp Sep 30, 2024
79df812
add missing prerequisity for Alien-Build-Plugin-Download-GitLab-0.01
matyaskopp Oct 1, 2024
afdd3f4
add missing prerequisity for URI-5.29
matyaskopp Oct 1, 2024
69217a3
add missing prerequisity for Graph-0.9732
matyaskopp Oct 1, 2024
42e89c0
add missing prerequisity for Test-Fatal-0.017
matyaskopp Oct 1, 2024
c124607
add missing prerequisity for HTTP-Message-6.46
matyaskopp Oct 1, 2024
3e8736a
add missing prerequisity for Clone-0.47
matyaskopp Oct 1, 2024
ca163de
update LWP::UserAgent version
matyaskopp Oct 1, 2024
47ecc1e
prerequisities reorder
matyaskopp Oct 2, 2024
396db70
prerequisities reorder
matyaskopp Oct 2, 2024
ef5a4c1
prerequisities reorder
matyaskopp Oct 2, 2024
9c267e8
add missing prerequisity for libwww-perl-6.77 and Alien-Build-2.83
matyaskopp Oct 2, 2024
493ace2
prerequisities reorder
matyaskopp Oct 2, 2024
ff83555
prerequisities reorder
matyaskopp Oct 2, 2024
961b979
prerequisities reorder
matyaskopp Oct 2, 2024
28491c4
add missing prerequisity for Alien-Build-2.83
matyaskopp Oct 2, 2024
4493e6c
add missing prerequisity for HTML-Parser-3.83
matyaskopp Oct 2, 2024
2d6ea52
add info prints
matyaskopp Oct 18, 2024
9581aa8
Merge branch 'svn2git' of github.com:ufal/TrEd into svn2git
Oct 18, 2024
74e21c5
use old TK-CodeText version (newer has Imager-Screenshot dependency, …
matyaskopp Nov 8, 2024
cba5c9f
fix c-header path on MacOS
matyaskopp Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dist
dpan/dpan/authors/id/D/DP/DPAN/*.tar.gz
dpan/dpan/authors/id/D/DP/DPAN/*.tar.gz.patched
!dpan/dpan/authors/id/D/DP/DPAN/.gitkeep
extensions
local_install
local_www
Treex-PML
unix_install
virtualenv
win32_strawberry/perl/*
!win32_strawberry/perl/.gitkeep
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ make-changelog:
# - TrEd version number (based on SVN revision)
# - compile the documentation from DocBook and POD (tred/devel/make_manual)
# - updated extensions dir (SVN working copy)
update-dist-dir: make-changelog
update-dist-dir: make-changelog extensions
cd admin && ./update-dist-dir.sh


Expand Down Expand Up @@ -184,3 +184,10 @@ compile-treex-pml-dist:
install-treex-pml:
cd admin && ./install-treex-pml.sh



#### Extensions repository
extensions:
GIT_DIR=`pwd` && \
. admin/env.sh && \
git clone $${TRED_GIT_EXT} $${TRED_EXT_DIR}
21 changes: 14 additions & 7 deletions admin/env_refactored.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash

# Root dir of the SVN checkout. All dirs are derived from this one
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the comments, too. s/SVN/git/

if [ -z "$SVN_DIR" ]; then
SVN_DIR=$(dirname $(dirname $(dirname $(readlink -fen $0))))
if [ -z "$GIT_DIR" ]; then
GIT_DIR=$(dirname $(dirname $(readlink -fen $0)))
fi


# Installation prefix -- documentation goes to $INSTALL_BASE/doc,
# binaries go to $INSTALL_BASE/exec,
# libraries go to $INSTALL_BASE/lib,
# extensions to $INSTALL_BASE/share
INSTALL_BASE=${SVN_DIR}/local_install
INSTALL_BASE=${GIT_DIR}/local_install

# Local (source) web tree
WWW=${SVN_DIR}/local_www
WWW=${GIT_DIR}/local_www
export TREDWWW=$WWW

# Remote web tree (of the testbed)
Expand All @@ -24,12 +24,13 @@ REMOTE_WWW=${TESTING_SERVER}:/var/www/tred/testbed
# The selected user should log there without password (by certificate)
LOGIN_NAME=tred

PYTHON_ENV=${GIT_DIR}/virtualenv

# TrEd project direcotry (from which Makefile is executed)
PROJECT_DIR=${SVN_DIR}/trunk
PROJECT_DIR=${GIT_DIR}

# Log for svn checkouts and exports during make
LOG=$SVN_DIR/trunk/make_log
LOG=$GIT_DIR/make_log

TRED_HOME_URL="http://ufallab.ms.mff.cuni.cz:24080/tred/testbed"
TRED_EXTENSIONS_URL=""
Expand Down Expand Up @@ -68,6 +69,10 @@ TRED_SVN_EXT=${TRED_SVN}/extensions
TREEX_PML_REPO=https://svn.ms.mff.cuni.cz/svn/perl_libs/trunk/distribution/Treex-PML
WIN32_DIST_REPO=https://svn.ms.mff.cuni.cz/svn/perl_libs/trunk/distribution/win32_build_script

[email protected]:ufal/TrEd-extensions.git
# https://github.com/ufal/TrEd-extensions.git


# PROJECT_DIR=/net/work/projects/tred
ADMIN_DIR=${PROJECT_DIR}/admin
DIST_DIR=${PROJECT_DIR}/dist
Expand All @@ -91,6 +96,8 @@ LRC_CMD=${ADMIN_DIR}/run_on_lrc

# SVN to ChangeLog conversion
SVN_TO_CHANGELOG=${ADMIN_DIR}/svn2cl/svn2cl.sh
# GIT to ChangeLog conversion
GIT_TO_CHANGELOG=${PYTHON_ENV}/bin/git-changelog
# ChangeLog to RSS conversion
CHANGELOG_TO_RSS=${ADMIN_DIR}/changelog2rss.pl

Expand All @@ -104,4 +111,4 @@ CHANGELOG_TO_RSS=${ADMIN_DIR}/changelog2rss.pl
[email protected]
MAC_TRED_INSTALLATION='~/tred_installation'
MAC_TRED_INSTALLATION_OLD='~/tred_installation_old'
MAC_SVN_DIR='~/TrEd'
MAC_GIT_DIR='~/TrEd'
9 changes: 5 additions & 4 deletions admin/make-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

EXTDIR=`dirname $(readlink -fen $0)`
. "$EXTDIR"/env.sh
. ${PYTHON_ENV}/bin/activate

echo "Generating changelog" && \
echo "Updating svn..." && \
svn update ${TRED_SRC_DIR} >> $LOG && \
echo "Updating git..." && \
git pull >> $LOG && \
echo "done" && \

# find the current revision number of svn
Expand All @@ -24,8 +25,8 @@ echo "done" && \
## echo "LAST_COMMIT_IN_CHANGELOG = $LAST_COMMIT_IN_CHANGELOG"

# if [ "$LAST_COMMIT_IN_CHANGELOG" == 0 ]; then
echo "Transforming svn log --> ChangeLog (this takes a while)..." && \
cd ${TRED_SRC_DIR} && ${SVN_TO_CHANGELOG} --include-rev -o ChangeLog && \
echo "Transforming git log --> ChangeLog (this takes a while)..." && \
cd ${TRED_SRC_DIR} && ${GIT_TO_CHANGELOG} > ChangeLog && \
# else
# echo "ChangeLog is already up to date."
# fi && \
Expand Down
43 changes: 9 additions & 34 deletions admin/prereq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,6 @@ function perl_module_presence_and_version_test {
fi
}

# This funcition downloads current version of svn2cl script from web,
# compares its MD5 sum to the MD5 sum found on the web and
# unpacks it, if the MD5 sum is correct
function get_svn2cl {
### svn2cl
SVN2CL_URL="https://arthurdejong.org/svn2cl/"
SVN2CL_FILE_DL="svn2cl.tar.gz"
wget ${SVN2CL_URL}downloads.html -O web >> $LOG

NEWEST_SVN2CL=`grep -o "svn2cl-[0-9.]\+tar.gz" web | head -n 1`
wget -nv ${SVN2CL_URL}${NEWEST_SVN2CL} -O $SVN2CL_FILE_DL >> $LOG
wget -nv ${SVN2CL_URL}${NEWEST_SVN2CL}.md5 -O ${SVN2CL_FILE_DL}.md5 >> $LOG

SVN2CL_MD5_WEB=`cut -d ' ' -f 1 $SVN2CL_FILE_DL.md5`
SVN2CL_MD5_LOCAL=`md5sum $SVN2CL_FILE_DL | cut -d ' ' -f 1`

if [ "$SVN2CL_MD5_WEB" == "$SVN2CL_MD5_LOCAL" ]; then
echo "MD5 sum ok, extracting svn2cl.."
tar xvzf $SVN2CL_FILE_DL -C $ADMIN_DIR
# remove the version of the svn2cl from dir name
mv ${ADMIN_DIR}/svn2cl*/ ${ADMIN_DIR}/svn2cl
echo "done"
else
echo "MD5 sum error, please download and unpack svn2cl to dir $ADMIN_DIR/svn2cl manually..."
exit 1;
fi
rm $SVN2CL_FILE_DL
rm -f web
rm -f ${SVN2CL_FILE_DL}.md5
}

# This function downloads 7zip and unpacks it, if the MD5 sum of the downloaded
# package is correct
function get_7zExtra {
Expand Down Expand Up @@ -124,10 +93,16 @@ else
fi


if [ -x "$SVN_TO_CHANGELOG" ]; then
echo "svn2cl found, OK."
if [ ! -x "$PYTHON_ENV/bin/activate" ]; then
python -m venv ${PYTHON_ENV}
fi
. ${PYTHON_ENV}/bin/activate


if [ -x "$GIT_TO_CHANGELOG" ]; then
echo "git-changelog found, OK."
else
get_svn2cl
pip install git-changelog
fi

BIN_7Z=`which 7z`
Expand Down
11 changes: 7 additions & 4 deletions admin/update-dist-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ if [ -e ${TRED_DIST_DIR}.new ]; then
exit 1;
fi && \

echo "Exporting svn" && \
svn export ${TRED_SVN_REPO} ${TRED_DIST_DIR}.new >> $LOG && \
echo "Exporting git" && \
##svn export ${TRED_SVN_REPO} ${TRED_DIST_DIR}.new >> $LOG && \
git -C ${TRED_SRC_DIR} archive --output ${TRED_DIST_DIR}.new.zip HEAD >> $LOG && \
unzip ${TRED_DIST_DIR}.new.zip -d ${TRED_DIST_DIR}.new >> $LOG && \
# updates TrEd version in dist/tred.new/tredlib/TrEd/Version.pm according to svn version to 1.#svn_version#
${TRED_DIST_DIR}.new/devel/update_version.pl ${TRED_SVN_REPO} && \

echo "Updating extensions" && \
echo "WARN: Skipping updating extensions" && \
#echo "Updating extensions" && \
# perform pre-updates, update svn, then some post-updates for extension (currently only for tmt) according to extension/.make.d directory
${TRED_EXT_DIR}/update && \
#${TRED_EXT_DIR}/update && \
Comment on lines +23 to +26
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does skipping the update mean?


cp ${TRED_SRC_DIR}/ChangeLog ${TRED_DIST_DIR}.new/ && \

Expand Down
Empty file.
2 changes: 1 addition & 1 deletion dpan/patches/graph-kruskal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# should do the trick

EXTDIR=`dirname $(readlink -fen $0)`
SVN_DIR=$(dirname $(dirname $(dirname $(dirname $(readlink -fen $0)))))
GIT_DIR=$(dirname $(dirname $(dirname $(readlink -fen $0))))
. "$EXTDIR/../../admin/env.sh"

echo "Patching Graph::Kruskal" && \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the long run, we should switch to CPAN::Distroprefs (those who can see UFAL internal svn, see MED#446).

Expand Down
2 changes: 1 addition & 1 deletion dpan/patches/syntax-highlight-perl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# forbidden on Windows, so we need to rename the file

EXTDIR=`dirname $(readlink -fen $0)`
SVN_DIR=$(dirname $(dirname $(dirname $(dirname $(readlink -fen $0)))))
GIT_DIR=$(dirname $(dirname $(dirname $(readlink -fen $0))))
. "$EXTDIR/../../admin/env.sh"

echo "Patching Syntax::Highlight::Perl" && \
Expand Down
2 changes: 1 addition & 1 deletion dpan/patches/tk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


EXTDIR=`dirname $(readlink -fen $0)`
SVN_DIR=$(dirname $(dirname $(dirname $(dirname $(readlink -fen $0)))))
GIT_DIR=$(dirname $(dirname $(dirname $(readlink -fen $0))))
. "$EXTDIR/../../admin/env.sh"

echo "Patching Tk" && \
Expand Down
12 changes: 4 additions & 8 deletions tred_refactored/devel/update_version.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@
my $version_file = File::Spec->rel2abs('../tredlib/TrEd/Version.pm',$rb);

die "Did not find $version_file!" if !-f $version_file;
# You'd better pass an arg to set this or this may fail in the future
my $REPO = shift || 'https://svn.ms.mff.cuni.cz/svn/TrEd_refactored/tred_refactored/';

my $svn_version = `svn info "$REPO" |grep "^Revision:" |cut -f2 -d:`;
my $updated_version = sprintf("%04d", $svn_version);
my $VER = '2.' . $updated_version;
chomp $VER;
$VER=~s/\s+//g;

my $git_date = `git log -1 --date=format:"\%Y\%m\%d" --format="%ad"`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backslashes not needed.

chomp $git_date;
my $VER = '3.' . $git_date;

print $VER,"\n" unless $opts{'quiet'};
print STDERR "TrEd::Version: $version_file\n" if $opts{debug};
Expand Down
Empty file added win32_strawberry/perl/.gitkeep
Empty file.