From 804dd57476666845339b1947161bcb2971b6de4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Mon, 27 May 2024 17:12:55 +0200 Subject: [PATCH 01/53] remove svn dependencies: change variables, different tool for changelog, load external extensions repository, use fifferent version numbering #3 --- .gitignore | 2 ++ Makefile | 9 +++++- admin/env_refactored.sh | 21 ++++++++---- admin/make-changelog.sh | 9 +++--- admin/prereq.sh | 43 ++++++------------------- admin/update-dist-dir.sh | 11 ++++--- tred_refactored/devel/update_version.pl | 11 ++----- 7 files changed, 48 insertions(+), 58 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c144831ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +extensions +local_www \ No newline at end of file diff --git a/Makefile b/Makefile index 9cb05c7db..b9cbac436 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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} \ No newline at end of file diff --git a/admin/env_refactored.sh b/admin/env_refactored.sh index b3443310e..fb4dc1de9 100644 --- a/admin/env_refactored.sh +++ b/admin/env_refactored.sh @@ -1,8 +1,8 @@ #!/bin/bash # Root dir of the SVN checkout. All dirs are derived from this one -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 @@ -10,10 +10,10 @@ fi # 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) @@ -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="" @@ -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 +TRED_GIT_EXT=git@github.com: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 @@ -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 @@ -104,4 +111,4 @@ CHANGELOG_TO_RSS=${ADMIN_DIR}/changelog2rss.pl MAC_RELEASER=kopp@manfred.ms.mff.cuni.cz MAC_TRED_INSTALLATION='~/tred_installation' MAC_TRED_INSTALLATION_OLD='~/tred_installation_old' -MAC_SVN_DIR='~/TrEd' \ No newline at end of file +MAC_GIT_DIR='~/TrEd' \ No newline at end of file diff --git a/admin/make-changelog.sh b/admin/make-changelog.sh index 9d58d3d50..fa7e1cbb9 100755 --- a/admin/make-changelog.sh +++ b/admin/make-changelog.sh @@ -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 @@ -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 && \ diff --git a/admin/prereq.sh b/admin/prereq.sh index a62331e4f..2fbf1aff3 100755 --- a/admin/prereq.sh +++ b/admin/prereq.sh @@ -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 { @@ -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` diff --git a/admin/update-dist-dir.sh b/admin/update-dist-dir.sh index 62b931961..7e4714df1 100755 --- a/admin/update-dist-dir.sh +++ b/admin/update-dist-dir.sh @@ -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 && \ cp ${TRED_SRC_DIR}/ChangeLog ${TRED_DIST_DIR}.new/ && \ diff --git a/tred_refactored/devel/update_version.pl b/tred_refactored/devel/update_version.pl index 978d12a3c..6bf058dcd 100755 --- a/tred_refactored/devel/update_version.pl +++ b/tred_refactored/devel/update_version.pl @@ -34,14 +34,9 @@ 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"`; +my $VER = '3.' . $git_date; print $VER,"\n" unless $opts{'quiet'}; print STDERR "TrEd::Version: $version_file\n" if $opts{debug}; From aa60ed6fa52312d6f5ef9b32937cc4b843b18bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Mon, 27 May 2024 17:25:03 +0200 Subject: [PATCH 02/53] remove endline from version #3 --- tred_refactored/devel/update_version.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/tred_refactored/devel/update_version.pl b/tred_refactored/devel/update_version.pl index 6bf058dcd..94244f2ac 100755 --- a/tred_refactored/devel/update_version.pl +++ b/tred_refactored/devel/update_version.pl @@ -36,6 +36,7 @@ die "Did not find $version_file!" if !-f $version_file; my $git_date = `git log -1 --date=format:"\%Y\%m\%d" --format="%ad"`; +chomp $git_date; my $VER = '3.' . $git_date; print $VER,"\n" unless $opts{'quiet'}; From 486180ad57b35a528cda7600e8709cebab1c0566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Tue, 28 May 2024 17:54:55 +0200 Subject: [PATCH 03/53] update git ignore and add empty directories #3 --- .gitignore | 12 +++++++++++- dpan/dpan/authors/id/D/DP/DPAN/.gitkeep | 0 win32_strawberry/perl/.gitkeep | 0 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 dpan/dpan/authors/id/D/DP/DPAN/.gitkeep create mode 100644 win32_strawberry/perl/.gitkeep diff --git a/.gitignore b/.gitignore index c144831ea..48b31a016 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +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_www \ No newline at end of file +local_install +local_www +Treex-PML +unix_install +virtualenv +win32_strawberry/perl/* +!win32_strawberry/perl/.gitkeep \ No newline at end of file diff --git a/dpan/dpan/authors/id/D/DP/DPAN/.gitkeep b/dpan/dpan/authors/id/D/DP/DPAN/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/win32_strawberry/perl/.gitkeep b/win32_strawberry/perl/.gitkeep new file mode 100644 index 000000000..e69de29bb From 490a9bb6ad3fbea3890bcdca96a0064b4d8d4e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Tue, 28 May 2024 17:55:54 +0200 Subject: [PATCH 04/53] fix paths in package patches #3 --- dpan/patches/graph-kruskal.sh | 2 +- dpan/patches/syntax-highlight-perl.sh | 2 +- dpan/patches/tk.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dpan/patches/graph-kruskal.sh b/dpan/patches/graph-kruskal.sh index 76baafc8b..cc27a5958 100755 --- a/dpan/patches/graph-kruskal.sh +++ b/dpan/patches/graph-kruskal.sh @@ -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" && \ diff --git a/dpan/patches/syntax-highlight-perl.sh b/dpan/patches/syntax-highlight-perl.sh index 6cc647c6b..e9803f220 100755 --- a/dpan/patches/syntax-highlight-perl.sh +++ b/dpan/patches/syntax-highlight-perl.sh @@ -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" && \ diff --git a/dpan/patches/tk.sh b/dpan/patches/tk.sh index fadb06ea2..8a719f7a3 100755 --- a/dpan/patches/tk.sh +++ b/dpan/patches/tk.sh @@ -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" && \ From d37101bee44f584ac50acb1abb1c0a288c3a1de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Tue, 28 May 2024 17:56:49 +0200 Subject: [PATCH 05/53] remove temporary archive, fix version comment #3 --- admin/update-dist-dir.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/update-dist-dir.sh b/admin/update-dist-dir.sh index 7e4714df1..47db319c1 100755 --- a/admin/update-dist-dir.sh +++ b/admin/update-dist-dir.sh @@ -16,7 +16,8 @@ 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# +rm ${TRED_DIST_DIR}.new.zip && \ +# updates TrEd version in dist/tred.new/tredlib/TrEd/Version.pm according to svn version to 3.#git_date# ${TRED_DIST_DIR}.new/devel/update_version.pl ${TRED_SVN_REPO} && \ echo "WARN: Skipping updating extensions" && \ From 4ea449e328d4376ab6c7437a096d0943dd2f0be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Tue, 28 May 2024 19:51:36 +0200 Subject: [PATCH 06/53] remove svn dependency from dep package build #3 --- admin/release-deb.sh | 6 +++--- unix_install_pkgs/deb/prepare_deb_pkg.sh | 13 ++++++++----- unix_install_pkgs/deb/tred-2.0/debian/changelog | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/admin/release-deb.sh b/admin/release-deb.sh index 9b49c883b..2095018bf 100755 --- a/admin/release-deb.sh +++ b/admin/release-deb.sh @@ -6,7 +6,7 @@ EXTDIR=`dirname $(readlink -fen $0)` . $EXTDIR/env.sh -SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'` +GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"` # Prepare the deb package cd "$PROJECT_DIR/unix_install_pkgs/deb" || exit 1 @@ -14,7 +14,7 @@ cd "$PROJECT_DIR/unix_install_pkgs/deb" || exit 1 # Copying the package to the local www echo "Copying the package to local www ..." -DEB_FILE="tred_2.${SVN_VERSION}_all.deb" +DEB_FILE="tred_3.${GIT_DATE}_all.deb" cp "./${DEB_FILE}" "${TREDWWW}/tred/${DEB_FILE}" d=`pwd` cd "${TREDWWW}/tred/" @@ -29,7 +29,7 @@ ssh ${LOGIN_NAME}@${TESTING_SERVER} "rm -f /var/www/tred/testbed/*.deb" # Upload the package to the testbed website echo "Uploading the package to testbed web ..." -DEB_FILE="tred_2.${SVN_VERSION}_all.deb" +DEB_FILE="tred_3.${GIT_DATE}_all.deb" scp "./${DEB_FILE}" "${LOGIN_NAME}@${REMOTE_WWW}/${DEB_FILE}" # Make sure tred.deb link points to the newest deb package diff --git a/unix_install_pkgs/deb/prepare_deb_pkg.sh b/unix_install_pkgs/deb/prepare_deb_pkg.sh index 844ef08a8..bd7d17876 100755 --- a/unix_install_pkgs/deb/prepare_deb_pkg.sh +++ b/unix_install_pkgs/deb/prepare_deb_pkg.sh @@ -5,18 +5,21 @@ cd `dirname "$0"` || exit 1 rm -f ./*.deb -SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'` +GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"` # Prepare fresh checkout -echo "Export package config dir from SVN so we can work with it ..." -TRED_DEB_DIR="./tred-2.$SVN_VERSION" -svn export ./tred-2.0 "$TRED_DEB_DIR" || exit 2 +echo "Export package config dir from GIT so we can work with it ..." +TRED_DEB_DIR="./tred-3.$GIT_DATE" +git -C ./tred-2.0 archive --output ../$TRED_DEB_DIR.zip HEAD && \ +unzip $TRED_DEB_DIR.zip -d "$TRED_DEB_DIR" && \ +rm $TRED_DEB_DIR.zip || exit 2 + # Fix changelog echo "Fix version and release date in the configuration ..." DATE=`LC_TIME=en_US.UTF-8 date '+%a, %d %b %Y %T %z'` -sed -i "s/%SVN_VERSION%/${SVN_VERSION}/g" "$TRED_DEB_DIR/debian/changelog" || exit 3 +sed -i "s/%GIT_DATE%/${GIT_DATE}/g" "$TRED_DEB_DIR/debian/changelog" || exit 3 sed -i "s/%DATE%/${DATE}/g" "$TRED_DEB_DIR/debian/changelog" || exit 3 # Build the package diff --git a/unix_install_pkgs/deb/tred-2.0/debian/changelog b/unix_install_pkgs/deb/tred-2.0/debian/changelog index 7aca35a40..de75e7ed6 100644 --- a/unix_install_pkgs/deb/tred-2.0/debian/changelog +++ b/unix_install_pkgs/deb/tred-2.0/debian/changelog @@ -1,5 +1,5 @@ -tred (2.%SVN_VERSION%) unstable; urgency=low +tred (3.%GIT_DATE%) unstable; urgency=low * Initial Release. - -- TrEd Developers Team %DATE% + -- TrEd Developers Team %DATE% From 27441e9722da1c0f0efb128989292e31daf7558c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Wed, 29 May 2024 11:19:49 +0200 Subject: [PATCH 07/53] remove svn dependency from rpm #3 --- admin/release-rpm.sh | 6 +++--- unix_install_pkgs/rpm/prepare_rpm_pkg.sh | 10 +++++----- unix_install_pkgs/rpm/specs/tred.spec.fedora | 4 ++-- unix_install_pkgs/rpm/specs/tred.spec.rhel | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/admin/release-rpm.sh b/admin/release-rpm.sh index 00ec19836..a19408948 100755 --- a/admin/release-rpm.sh +++ b/admin/release-rpm.sh @@ -6,7 +6,7 @@ EXTDIR=`dirname $(readlink -fen $0)` . $EXTDIR/env.sh -SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'` +GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"` # Prepare the deb package cd "$PROJECT_DIR/unix_install_pkgs/rpm" || exit 1 @@ -24,7 +24,7 @@ for DISTRO in $DISTROS; do echo "... for $DISTRO ..." d=`pwd` cd "${TREDWWW}/tred/" - ln -sfr "tred-2-${SVN_VERSION}-${DISTRO}.noarch.rpm" "tred-${DISTRO}.rpm" + ln -sfr "tred-3-${GIT_DATE}-${DISTRO}.noarch.rpm" "tred-${DISTRO}.rpm" cd $d done @@ -46,7 +46,7 @@ echo "Creating symlinks for rpm packages ..." DISTROS=`ls -1 ./tred*.rpm | sed -E 's/^.*tred-[0-9]+-[0-9]+-//' | sed 's/[.]noarch[.]rpm$//' | tr "\\n" " "` for DISTRO in $DISTROS; do echo "... for $DISTRO ..." - ssh ${LOGIN_NAME}@${TESTING_SERVER} "cd /var/www/tred/testbed && ln -sf ./tred-2-${SVN_VERSION}-${DISTRO}.noarch.rpm ./tred-${DISTRO}.rpm" + ssh ${LOGIN_NAME}@${TESTING_SERVER} "cd /var/www/tred/testbed && ln -sf ./tred-3-${GIT_DATE}-${DISTRO}.noarch.rpm ./tred-${DISTRO}.rpm" done cd "$EXTDIR" diff --git a/unix_install_pkgs/rpm/prepare_rpm_pkg.sh b/unix_install_pkgs/rpm/prepare_rpm_pkg.sh index 9c372ab46..ceac58a1e 100755 --- a/unix_install_pkgs/rpm/prepare_rpm_pkg.sh +++ b/unix_install_pkgs/rpm/prepare_rpm_pkg.sh @@ -22,13 +22,13 @@ function prepare_rpmdir() { # Build the rmp package. # Arg #1: path to root dir of the rmp workplace # Arg #2: name of the distro (i.e., 'fedora', 'rhel', ...) -# Arg #3: SVN version number +# Arg #3: Git version date function build_rpm() { echo "Building rpm package ..." TRED_SPEC_FILE="$1/SPECS/tred.spec" - sed -i "s/%SVNVERSION%/$3/g" "$TRED_SPEC_FILE" || exit 1 + sed -i "s/%GIT_DATE%/$3/g" "$TRED_SPEC_FILE" || exit 1 rpmbuild -bb --define "_topdir $1" --define "TREDNET $TREDNET" --define "TREDWWW $TREDWWW" "$TRED_SPEC_FILE" || exit 2 - mv "$1/RPMS/noarch/tred-2-$3.noarch.rpm" "./tred-2-$3-$2.noarch.rpm" || exit 3 + mv "$1/RPMS/noarch/tred-3-$3.noarch.rpm" "./tred-3-$3-$2.noarch.rpm" || exit 3 } @@ -36,7 +36,7 @@ SAVE_DIR=`pwd` cd `dirname "$0"` || exit 1 # Initialization -SVN_VERSION=`svn info . | grep 'Revision:' | sed -E 's/[^0-9]+//g'` +GIT_DATE=`git log -1 --date=format:"%Y%m%d" --format="%ad"|tr -d "\n"` rm ./*.rpm @@ -51,7 +51,7 @@ fi ls -1 ./specs/tred.spec.* | sed 's/^.*[.]//' | while read DISTRO; do echo "Preparing RPM package for $DISTRO ..." prepare_rpmdir "$TRED_RPM_DIR" "./specs/tred.spec.$DISTRO" || exit 1 - build_rpm "$TRED_RPM_DIR" "$DISTRO" "$SVN_VERSION" || exit 2 + build_rpm "$TRED_RPM_DIR" "$DISTRO" "$GIT_DATE" || exit 2 done diff --git a/unix_install_pkgs/rpm/specs/tred.spec.fedora b/unix_install_pkgs/rpm/specs/tred.spec.fedora index 9e1356f00..f528d92c4 100644 --- a/unix_install_pkgs/rpm/specs/tred.spec.fedora +++ b/unix_install_pkgs/rpm/specs/tred.spec.fedora @@ -1,6 +1,6 @@ Name: tred -Version: 2 -Release: %SVNVERSION% +Version: 3 +Release: %GIT_DATE% Summary: TrEd tree editor - academic tool for computational liguistics URL: http://ufal.mff.cuni.cz/tred/ License: GPLv2+ diff --git a/unix_install_pkgs/rpm/specs/tred.spec.rhel b/unix_install_pkgs/rpm/specs/tred.spec.rhel index 605bf6728..790986b0e 100644 --- a/unix_install_pkgs/rpm/specs/tred.spec.rhel +++ b/unix_install_pkgs/rpm/specs/tred.spec.rhel @@ -1,6 +1,6 @@ Name: tred -Version: 2 -Release: %SVNVERSION% +Version: 3 +Release: %GIT_DATE% Summary: TrEd tree editor - academic tool for computational liguistics URL: http://ufal.mff.cuni.cz/tred/ License: GPLv2+ From 1ee67d4ce30445643abd45f69968cc420c321a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Wed, 29 May 2024 15:14:02 +0200 Subject: [PATCH 08/53] unix_install is not a part of repository - removing "svn update"(/"git pull") #3 --- admin/update-unix-dep-packages.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/admin/update-unix-dep-packages.sh b/admin/update-unix-dep-packages.sh index ec7704974..6bfe016b8 100755 --- a/admin/update-unix-dep-packages.sh +++ b/admin/update-unix-dep-packages.sh @@ -9,15 +9,9 @@ echo "Updating unix dependency packages" && \ echo "Remove old packages" && \ rm -rf ${TRED_UNIXINST_DIR}/packages_unix/packages && \ -# update svn -echo "Subversion update" && \ -svn up $TRED_UNIXINST_DIR >> $LOG && \ -echo "Subversion status" && \ -svn status $TRED_UNIXINST_DIR && \ - # fetch packages from CPAN && use INSTALL_BASE cd ${TRED_UNIXINST_DIR}/packages_unix && \ -echo "Remove old packages" && \ +echo "Update packages from CPAN" && \ PERLLIB= PERL5LIB= LD_LIBRARY_PATH= ./install -b -C && \ echo "Updating unix dependency packages done." From 674667dd7dc930ff8e64dca9c8be2603de8f6afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Kopp?= Date: Wed, 29 May 2024 15:17:10 +0200 Subject: [PATCH 09/53] update main documentation file (#3) --- tred_refactored/documentation/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tred_refactored/documentation/index.html b/tred_refactored/documentation/index.html index acd921a67..939bd86ba 100644 --- a/tred_refactored/documentation/index.html +++ b/tred_refactored/documentation/index.html @@ -10,7 +10,7 @@ type="application/rss+xml" /> -

Tree Editor TrEd 2.0

+

Tree Editor TrEd 3.0