Makefile.gbuild                                     |    9 ---
 Makefile.in                                         |    3 -
 bin/update/create_build_config.py                   |   59 --------------------
 bin/update/tools.py                                 |    8 --
 bin/update/upload_build_config.py                   |   42 --------------
 bin/update/upload_builds.py                         |   34 -----------
 config_host.mk.in                                   |    1 
 configure.ac                                        |   16 -----
 distro-configs/Jenkins/LibreOfficeLinuxUpdater.conf |    1 
 9 files changed, 173 deletions(-)

New commits:
commit 848d035d8659f6c98f220f91da641f7c40064765
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Tue Jan 16 10:50:52 2024 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Tue Jan 16 19:50:58 2024 +0100

    Remove unused `make upload-update-info`
    
    Change-Id: Ifdec48aaf53b0444c2d7ceef554f64795e2f2c38
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162172
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/Makefile.gbuild b/Makefile.gbuild
index 3dce54520b27..31ba1772c50a 100644
--- a/Makefile.gbuild
+++ b/Makefile.gbuild
@@ -46,15 +46,6 @@ create-update-info:
                MAR=$(INSTDIR)/program/mar 
$(SRCDIR)/bin/update/create_full_mar_for_languages.py "$(PRODUCTNAME)" 
"$(WORKDIR)" "$(MAR_NAME_PREFIX)" "$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" 
"$(ONLINEUPDATE_MAR_CERTIFICATENAME)" "$(ONLINEUPDATE_MAR_BASEURL)" 
'$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)'
 \
        )
 
-upload-update-info:
-       $(eval BUILDID := $(shell git -C $(SRCDIR) log -1 --format=%H))
-       $(eval PLATFORM := $(RTL_OS)_$(RTL_ARCH))
-       $(eval UPDATE_DIR := $(WORKDIR)/update-info)
-       $(eval VERSION := 
$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX))
-       MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/create_build_config.py 
"$(PRODUCTNAME)" "$(VERSION)" "$(BUILDID)" "$(PLATFORM)" "$(UPDATE_DIR)" 
LOOnlineUpdater
-       MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/upload_builds.py 
"$(PRODUCTNAME)" "$(BUILDID)" "$(PLATFORM)" "$(UPDATE_DIR)" 
"$(ONLINEUPDATE_MAR_UPLOADURL)" LOOnlineUpdater
-       MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/upload_build_config.py 
"$(UPDATE_DIR)" TODO
-
 create-partial-info:
        $(eval BUILDID := $(shell git -C $(SRCDIR) log -1 --format=%H))
        $(eval VERSION := 
$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX))
diff --git a/Makefile.in b/Makefile.in
index 83a37ecb90e3..ab7090ee1e77 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -499,9 +499,6 @@ upload-symbols:
 create-update-info:
        $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-update-info
 
-upload-update-info:
-       $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-update-info
-
 create-partial-info:
        $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-partial-info
 
diff --git a/bin/update/create_build_config.py 
b/bin/update/create_build_config.py
deleted file mode 100755
index de39b645ce8e..000000000000
--- a/bin/update/create_build_config.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /usr/bin/env python3
-
-import json
-import sys
-import os
-
-from tools import replace_variables_in_string
-
-
-def update_all_url_entries(data, **kwargs):
-    data['complete']['url'] = 
replace_variables_in_string(data['complete']['url'], **kwargs)
-
-    if sys.platform != "cygwin":
-        for language in data['languages']:
-            language['complete']['url'] = 
replace_variables_in_string(language['complete']['url'], **kwargs)
-
-    if 'partials' in data:
-        for partial in data['partials']:
-            partial['file']['url'] = 
replace_variables_in_string(partial['file']['url'], **kwargs)
-
-            if sys.platform == "cygwin":
-                continue
-
-            for lang, lang_file in partial['languages'].items():
-                lang_file['url'] = 
replace_variables_in_string(lang_file['url'], **kwargs)
-
-
-def main(argv):
-    if len(argv) < 7:
-        print("Usage: create_build_config.py $PRODUCTNAME $VERSION $BUILDID 
$PLATFORM $TARGETDIR $CHANNEL")
-        sys.exit(1)
-
-    data = {'productName': argv[1],
-            'version': argv[2],
-            'buildNumber': argv[3],
-            'updateChannel': argv[6],
-            'platform': argv[4]
-            }
-
-    extra_data_files = ['complete_info.json', 'partial_update_info.json']
-    if sys.platform != "cygwin":
-        extra_data_files.append('complete_lang_info.json')
-
-    for extra_file in extra_data_files:
-        extra_file_path = os.path.join(argv[5], extra_file)
-        if not os.path.exists(extra_file_path):
-            continue
-        with open(extra_file_path, "r") as f:
-            extra_data = json.load(f)
-            data.update(extra_data)
-
-    update_all_url_entries(data, channel=argv[6], platform=argv[4], 
buildid=argv[3], version=argv[2])
-
-    with open(os.path.join(argv[5], "build_config.json"), "w") as f:
-        json.dump(data, f, indent=4)
-
-
-if __name__ == "__main__":
-    main(sys.argv)
diff --git a/bin/update/tools.py b/bin/update/tools.py
index ab38d10f4b57..71fcc5cc2f69 100644
--- a/bin/update/tools.py
+++ b/bin/update/tools.py
@@ -48,14 +48,6 @@ def get_file_info(mar_file, url):
     return data
 
 
-def replace_variables_in_string(string, **kwargs):
-    new_string = string
-    for key, val in kwargs.items():
-        new_string = new_string.replace('$(%s)' % key, val)
-
-    return new_string
-
-
 def make_complete_mar_name(target_dir, filename_prefix):
     filename = filename_prefix + "_complete.mar"
     return os.path.join(target_dir, filename)
diff --git a/bin/update/upload_build_config.py 
b/bin/update/upload_build_config.py
deleted file mode 100755
index ec5a94bf3eff..000000000000
--- a/bin/update/upload_build_config.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /usr/bin/env python3
-
-import sys
-import os
-import configparser
-import requests
-
-dir_path = os.path.dirname(os.path.realpath(__file__))
-
-
-def main(argv):
-    updater_config = argv[2]
-
-    config = configparser.ConfigParser()
-    config.read(os.path.expanduser(updater_config))
-
-    user = config["Updater"]["User"]
-    password = config["Updater"]["Password"]
-    base_address = config["Updater"]["ServerURL"]
-
-    login_url = base_address + "accounts/login/"
-
-    session = requests.session()
-    session.get(login_url)
-    csrftoken = session.cookies['csrftoken']
-
-    login_data = {'username': user, 'password': password,
-                  'csrfmiddlewaretoken': csrftoken}
-    session.post(login_url, data=login_data, headers={"Referer": login_url})
-
-    url = base_address + "update/upload/release"
-    data = {'csrfmiddlewaretoken': csrftoken}
-
-    build_config = os.path.join(argv[1], "build_config.json")
-    r = session.post(url, files={'release_config': open(build_config, "r")}, 
data=data)
-    print(r.content)
-    if r.status_code != 200:
-        sys.exit(1)
-
-
-if __name__ == "__main__":
-    main(sys.argv)
diff --git a/bin/update/upload_builds.py b/bin/update/upload_builds.py
deleted file mode 100755
index 97a2f284848a..000000000000
--- a/bin/update/upload_builds.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env python3
-
-import sys
-import os
-import subprocess
-
-from path import convert_to_unix
-
-from tools import replace_variables_in_string
-
-
-def main():
-    # product_name = sys.argv[1]
-    buildid = sys.argv[2]
-    platform = sys.argv[3]
-    update_dir = sys.argv[4]
-    upload_url_arg = sys.argv[5]
-    channel = sys.argv[6]
-
-    upload_url = replace_variables_in_string(upload_url_arg, channel=channel, 
buildid=buildid,
-                                             platform=platform)
-
-    target_url, target_dir = upload_url.split(':')
-
-    command = "ssh %s 'mkdir -p %s'" % (target_url, target_dir)
-    print(command)
-    subprocess.call(command, shell=True)
-    for file in os.listdir(update_dir):
-        if file.endswith('.mar'):
-            subprocess.call(['scp', convert_to_unix(os.path.join(update_dir, 
file)), upload_url])
-
-
-if __name__ == '__main__':
-    main()
diff --git a/config_host.mk.in b/config_host.mk.in
index faa3915d4e3d..ddca2a41ca05 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -515,7 +515,6 @@ export ONLINEUPDATE_MAR_BASEURL=@ONLINEUPDATE_MAR_BASEURL@
 export ONLINEUPDATE_MAR_CERTIFICATEDER=@ONLINEUPDATE_MAR_CERTIFICATEDER@
 export ONLINEUPDATE_MAR_CERTIFICATENAME=@ONLINEUPDATE_MAR_CERTIFICATENAME@
 export ONLINEUPDATE_MAR_CERTIFICATEPATH=@ONLINEUPDATE_MAR_CERTIFICATEPATH@
-export ONLINEUPDATE_MAR_UPLOADURL=@ONLINEUPDATE_MAR_UPLOADURL@
 export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@
 export OOO_VENDOR=@OOO_VENDOR@
 export OPENSSL_CFLAGS=$(gb_SPACE)@OPENSSL_CFLAGS@
diff --git a/configure.ac b/configure.ac
index 859b404d287a..78d9ec669c39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1893,13 +1893,6 @@ libo_FUZZ_ARG_WITH(online-update-mar-certificatepath,
          non-functional.)]),
 ,)
 
-libo_FUZZ_ARG_WITH(online-update-mar-uploadurl,
-    AS_HELP_STRING([--with-online-update-mar-uploadurl=...],
-        [Set the upload URL value for --enable-online-update-mar.
-         (Can be left off for debug purposes, even if that may render the 
feature
-         non-functional.)]),
-,)
-
 libo_FUZZ_ARG_ENABLE(extension-update,
     AS_HELP_STRING([--disable-extension-update],
         [Disable possibility to update installed extensions.]),
@@ -13693,15 +13686,6 @@ else
 fi
 AC_SUBST(ONLINEUPDATE_MAR_CERTIFICATEPATH)
 
-AC_MSG_CHECKING([for mar online update uploadurl])
-ONLINEUPDATE_MAR_UPLOADURL=$with_online_update_mar_uploadurl
-if test -n "$ONLINEUPDATE_MAR_UPLOADURL"; then
-    AC_MSG_RESULT([yes])
-else
-    AC_MSG_RESULT([no])
-fi
-AC_SUBST(ONLINEUPDATE_MAR_UPLOADURL)
-
 
 PRIVACY_POLICY_URL="$with_privacy_policy_url"
 if test "$ENABLE_ONLINE_UPDATE" = TRUE -o "$ENABLE_BREAKPAD" = "TRUE"; then
diff --git a/distro-configs/Jenkins/LibreOfficeLinuxUpdater.conf 
b/distro-configs/Jenkins/LibreOfficeLinuxUpdater.conf
index 9ff8d98add4e..d9af64650eff 100644
--- a/distro-configs/Jenkins/LibreOfficeLinuxUpdater.conf
+++ b/distro-configs/Jenkins/LibreOfficeLinuxUpdater.conf
@@ -36,6 +36,5 @@
 --with-online-update-mar-certificateder=TODO
 --with-online-update-mar-certificatename=TODO
 --with-online-update-mar-certificatepath=TODO
---with-online-update-mar-uploadurl=TODO
 --with-jdk-home=/etc/alternatives/java_sdk_17
 --enable-odk

Reply via email to